@openlist-frontend/openlist-frontend 4.0.4 → 4.0.5

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 (344) hide show
  1. package/dist/VERSION +1 -1
  2. package/dist/assets/{2fa-e940f970.js → 2fa-6199c9ed.js} +1 -1
  3. package/dist/assets/{2fa-legacy-2fd1b468.js → 2fa-legacy-7536e64f.js} +1 -1
  4. package/dist/assets/{About-89998bdb.js → About-4bee39e3.js} +1 -1
  5. package/dist/assets/{About-legacy-c539385b.js → About-legacy-67908cfb.js} +1 -1
  6. package/dist/assets/{AddOrEdit-0e170473.js → AddOrEdit-157b4bfd.js} +1 -1
  7. package/dist/assets/{AddOrEdit-196d523f.js → AddOrEdit-6e1d9409.js} +1 -1
  8. package/dist/assets/{AddOrEdit-30d1638a.js → AddOrEdit-db54d2f9.js} +1 -1
  9. package/dist/assets/{AddOrEdit-legacy-4fd1c587.js → AddOrEdit-legacy-38704f8a.js} +1 -1
  10. package/dist/assets/{AddOrEdit-legacy-707ab33c.js → AddOrEdit-legacy-7406fed7.js} +1 -1
  11. package/dist/assets/{AddOrEdit-legacy-92128207.js → AddOrEdit-legacy-cc03c565.js} +1 -1
  12. package/dist/assets/{Common-818c5619.js → Common-450bee98.js} +1 -1
  13. package/dist/assets/{Common-legacy-8ba814c6.js → Common-legacy-93826114.js} +1 -1
  14. package/dist/assets/{Copy-7cddacfb.js → Copy-65b45192.js} +1 -1
  15. package/dist/assets/{Copy-legacy-c3c0b19c.js → Copy-legacy-5fdf9d47.js} +1 -1
  16. package/dist/assets/Decompress-5ccca926.js +1 -0
  17. package/dist/assets/{Decompress-legacy-2a172e8c.js → Decompress-legacy-8a1606b9.js} +1 -1
  18. package/dist/assets/{DeletePopover-2c3873a3.js → DeletePopover-ebc7a7fb.js} +1 -1
  19. package/dist/assets/{DeletePopover-legacy-f92e3ce1.js → DeletePopover-legacy-23237d7a.js} +1 -1
  20. package/dist/assets/File-fb0adc00.js +1 -0
  21. package/dist/assets/{File-legacy-fb063169.js → File-legacy-de6eafc9.js} +1 -1
  22. package/dist/assets/{Folder-148aa14e.js → Folder-3af8a260.js} +2 -2
  23. package/dist/assets/{Folder-legacy-9d135076.js → Folder-legacy-f6ee4bd6.js} +2 -2
  24. package/dist/assets/{FolderTree-9de1ab37.js → FolderTree-1a44a44d.js} +1 -1
  25. package/dist/assets/{FolderTree-legacy-d0f60485.js → FolderTree-legacy-fd63a766.js} +1 -1
  26. package/dist/assets/Grid-b6f2ce89.js +1 -0
  27. package/dist/assets/{Grid-legacy-2499932f.js → Grid-legacy-e37475fc.js} +1 -1
  28. package/dist/assets/{GridItem-790cac91.js → GridItem-2842cf34.js} +1 -1
  29. package/dist/assets/{GridItem-legacy-da545dc0.js → GridItem-legacy-f399498a.js} +1 -1
  30. package/dist/assets/{ImageWithError-af93a4e1.js → ImageWithError-9ed7f1a9.js} +1 -1
  31. package/dist/assets/{ImageWithError-legacy-9bc3f11d.js → ImageWithError-legacy-b50ae91c.js} +1 -1
  32. package/dist/assets/{Images-ff453caf.js → Images-65992347.js} +1 -1
  33. package/dist/assets/{Images-legacy-dc835978.js → Images-legacy-60682f48.js} +1 -1
  34. package/dist/assets/{Layout-ad2deee5.js → Layout-fe51806e.js} +2 -2
  35. package/dist/assets/{Layout-legacy-c3ce62b2.js → Layout-legacy-7eb8c952.js} +2 -2
  36. package/dist/assets/{List-5a1bae33.js → List-1be59122.js} +1 -1
  37. package/dist/assets/{List-legacy-3bb9bf4a.js → List-legacy-e12eb638.js} +1 -1
  38. package/dist/assets/{Messenger-8ec8b970.js → Messenger-cd3588e6.js} +1 -1
  39. package/dist/assets/{Messenger-legacy-8585c26d.js → Messenger-legacy-611e3d48.js} +1 -1
  40. package/dist/assets/{Metas-79ea178d.js → Metas-789ac893.js} +1 -1
  41. package/dist/assets/{Metas-legacy-53a363ad.js → Metas-legacy-dbad177e.js} +1 -1
  42. package/dist/assets/{Other-6d74c1cb.js → Other-2ace97b6.js} +1 -1
  43. package/dist/assets/{Other-legacy-77bcd588.js → Other-legacy-3c18cdfc.js} +1 -1
  44. package/dist/assets/{PackageDownload-e8132841.js → PackageDownload-c6a0da00.js} +1 -1
  45. package/dist/assets/{PackageDownload-legacy-50ccd1c4.js → PackageDownload-legacy-30918983.js} +1 -1
  46. package/dist/assets/{Paginator-e2a864f2.js → Paginator-d103f2ff.js} +1 -1
  47. package/dist/assets/{Paginator-legacy-4f14dee7.js → Paginator-legacy-fc6867fa.js} +1 -1
  48. package/dist/assets/{Password-f5526b0f.js → Password-48cf8322.js} +1 -1
  49. package/dist/assets/{Password-legacy-0a835b72.js → Password-legacy-ccc03021.js} +1 -1
  50. package/dist/assets/{Profile-5a83f592.js → Profile-1af97dfa.js} +1 -1
  51. package/dist/assets/{Profile-legacy-9fcfd352.js → Profile-legacy-8348b1bb.js} +1 -1
  52. package/dist/assets/{PublicKeys-19a81bcf.js → PublicKeys-964230d6.js} +1 -1
  53. package/dist/assets/{PublicKeys-legacy-d04e8eaa.js → PublicKeys-legacy-b991847d.js} +1 -1
  54. package/dist/assets/{ResponsiveGrid-3082e524.js → ResponsiveGrid-c660b42b.js} +1 -1
  55. package/dist/assets/{ResponsiveGrid-legacy-fcf10864.js → ResponsiveGrid-legacy-55f28044.js} +1 -1
  56. package/dist/assets/{S3-8d5f17a3.js → S3-8bbfb918.js} +1 -1
  57. package/dist/assets/{S3-legacy-59bfaeb3.js → S3-legacy-2c72eb53.js} +1 -1
  58. package/dist/assets/{SettingItem-70eb4ae2.js → SettingItem-7b154b19.js} +1 -1
  59. package/dist/assets/{SettingItem-legacy-861fcc82.js → SettingItem-legacy-aa1825fb.js} +1 -1
  60. package/dist/assets/{Storages-17c5796c.js → Storages-426c866c.js} +1 -1
  61. package/dist/assets/{Storages-legacy-47f744a8.js → Storages-legacy-d7dbb295.js} +1 -1
  62. package/dist/assets/Upload-5879c494.js +1 -0
  63. package/dist/assets/{Upload-8029ad48.js → Upload-fac9e504.js} +1 -1
  64. package/dist/assets/{Upload-legacy-8806ed2a.js → Upload-legacy-007fd76b.js} +1 -1
  65. package/dist/assets/{Upload-legacy-0312565f.js → Upload-legacy-9a68bf01.js} +1 -1
  66. package/dist/assets/{Users-1a219982.js → Users-8edeb6bf.js} +1 -1
  67. package/dist/assets/{Users-legacy-5bb8847b.js → Users-legacy-01bf5f48.js} +1 -1
  68. package/dist/assets/{Wether-8025708b.js → Wether-6d0fa0f0.js} +1 -1
  69. package/dist/assets/{Wether-legacy-fcc83b43.js → Wether-legacy-4dbdc21d.js} +1 -1
  70. package/dist/assets/{aliyun_office-f21c7d1e.js → aliyun_office-875b9979.js} +1 -1
  71. package/dist/assets/{aliyun_office-legacy-cef109fb.js → aliyun_office-legacy-15e0325d.js} +1 -1
  72. package/dist/assets/{aliyun_video-75848b44.js → aliyun_video-c99014c3.js} +1 -1
  73. package/dist/assets/{aliyun_video-legacy-ecf5d264.js → aliyun_video-legacy-5e024dcb.js} +1 -1
  74. package/dist/assets/{archive-9cc099f8.js → archive-62d253a7.js} +1 -1
  75. package/dist/assets/{archive-legacy-ce983444.js → archive-legacy-c91d2cfc.js} +1 -1
  76. package/dist/assets/{asciinema-db00c2d9.js → asciinema-2d067302.js} +1 -1
  77. package/dist/assets/{asciinema-legacy-ff18415a.js → asciinema-legacy-91fac8c6.js} +1 -1
  78. package/dist/assets/{audio-c9f8dcb6.js → audio-63f502da.js} +1 -1
  79. package/dist/assets/{audio-legacy-ed69ca29.js → audio-legacy-45cbcc4e.js} +1 -1
  80. package/dist/assets/{backup-restore-dafc7320.js → backup-restore-0aeb4d5f.js} +1 -1
  81. package/dist/assets/{backup-restore-legacy-7076d9f6.js → backup-restore-legacy-393f95ba.js} +1 -1
  82. package/dist/assets/entry-69834e7b.js +1 -0
  83. package/dist/assets/entry-d112e634.js +1 -0
  84. package/dist/assets/entry-legacy-2e63503e.js +1 -0
  85. package/dist/assets/entry-legacy-b7407e56.js +1 -0
  86. package/dist/assets/{flash-f2b4b335.js → flash-c29b68bf.js} +1 -1
  87. package/dist/assets/{flash-legacy-9a66f504.js → flash-legacy-abeaf349.js} +1 -1
  88. package/dist/assets/{heic-163fd56e.js → heic-1a77df15.js} +1 -1
  89. package/dist/assets/{heic-legacy-24569df3.js → heic-legacy-3c6f7bb5.js} +1 -1
  90. package/dist/assets/{helper-c9e49715.js → helper-5bf09953.js} +1 -1
  91. package/dist/assets/{helper-518d42f9.js → helper-c919e34e.js} +1 -1
  92. package/dist/assets/{helper-legacy-010acd73.js → helper-legacy-291a9b6d.js} +1 -1
  93. package/dist/assets/{helper-legacy-a4d25212.js → helper-legacy-6ad15964.js} +1 -1
  94. package/dist/assets/{hls-4d22ed99.js → hls-e57ba0ec.js} +1 -1
  95. package/dist/assets/{hls-legacy-edc88a4a.js → hls-legacy-0a2b5bc6.js} +1 -1
  96. package/dist/assets/{html-d1689566.js → html-33cb0e0d.js} +1 -1
  97. package/dist/assets/{html-legacy-a7d03a31.js → html-legacy-633be7d8.js} +1 -1
  98. package/dist/assets/{icon-43443c9b.js → icon-b516a923.js} +1 -1
  99. package/dist/assets/{icon-legacy-9c4f88cb.js → icon-legacy-f14c7703.js} +1 -1
  100. package/dist/assets/{image-ac9db3b1.js → image-19ccaaae.js} +1 -1
  101. package/dist/assets/{image-legacy-8614aac2.js → image-legacy-50d96617.js} +1 -1
  102. package/dist/assets/{index-0e91056f.js → index-3400cea2.js} +1 -1
  103. package/dist/assets/{index-c66c01aa.js → index-3b1abe07.js} +1 -1
  104. package/dist/assets/{index-5f8c2bf1.js → index-534efff5.js} +1 -1
  105. package/dist/assets/{index-5295a943.js → index-5fdd04f7.js} +1 -1
  106. package/dist/assets/{index-17197e68.js → index-7ab3d35b.js} +1 -1
  107. package/dist/assets/{index-d32f6f5f.js → index-99c43b40.js} +1 -1
  108. package/dist/assets/{index-89e25f40.js → index-a0638b88.js} +1 -1
  109. package/dist/assets/{index-fb908a6f.js → index-c9375034.js} +1 -1
  110. package/dist/assets/{index-d528480f.js → index-d43f3440.js} +1 -1
  111. package/dist/assets/{index-ab115bbe.js → index-ebb2e1ad.js} +2 -2
  112. package/dist/assets/{index-legacy-83f6d352.js → index-legacy-16ccbe96.js} +1 -1
  113. package/dist/assets/{index-legacy-1f04bc87.js → index-legacy-1e4593e9.js} +3 -3
  114. package/dist/assets/{index-legacy-c3bc6b51.js → index-legacy-46ebd4af.js} +1 -1
  115. package/dist/assets/{index-legacy-71cee8fb.js → index-legacy-4f0016ed.js} +1 -1
  116. package/dist/assets/{index-legacy-fb22bd14.js → index-legacy-74bc636e.js} +1 -1
  117. package/dist/assets/{index-legacy-3274dde9.js → index-legacy-8280e63e.js} +1 -1
  118. package/dist/assets/{index-legacy-887a8a59.js → index-legacy-9edb8124.js} +1 -1
  119. package/dist/assets/{index-legacy-f8fed7a6.js → index-legacy-b8f4b57c.js} +1 -1
  120. package/dist/assets/{index-legacy-2bf9588a.js → index-legacy-c93b9947.js} +1 -1
  121. package/dist/assets/{index-legacy-bab82b12.js → index-legacy-f67858f9.js} +1 -1
  122. package/dist/assets/{indexes-0bf9104f.js → indexes-c060677a.js} +1 -1
  123. package/dist/assets/{indexes-legacy-25986e6e.js → indexes-legacy-8e814ad5.js} +1 -1
  124. package/dist/assets/{ipa-5bc7b651.js → ipa-43021d6c.js} +1 -1
  125. package/dist/assets/{ipa-legacy-fa72ffed.js → ipa-legacy-97425003.js} +1 -1
  126. package/dist/assets/{markdown-b2e37b2e.js → markdown-ab00eaa0.js} +1 -1
  127. package/dist/assets/{markdown-legacy-d8ec5b7a.js → markdown-legacy-20f285db.js} +1 -1
  128. package/dist/assets/{markdown_with_word_wrap-f2170302.js → markdown_with_word_wrap-d0cae262.js} +1 -1
  129. package/dist/assets/{markdown_with_word_wrap-legacy-3db94788.js → markdown_with_word_wrap-legacy-1117b498.js} +1 -1
  130. package/dist/assets/offline_download-de036ef5.js +1 -0
  131. package/dist/assets/{offline_download-legacy-3225d665.js → offline_download-legacy-94d3d5e1.js} +1 -1
  132. package/dist/assets/plist-a194700a.js +1 -0
  133. package/dist/assets/{plist-legacy-431b26a0.js → plist-legacy-69ab4ae6.js} +1 -1
  134. package/dist/assets/{polyfills-legacy-84c7163c.js → polyfills-legacy-fa59231c.js} +1 -1
  135. package/dist/assets/{style-5c9bb055.js → style-b9ea5f4f.js} +1 -1
  136. package/dist/assets/{style-legacy-f3c5bf3f.js → style-legacy-eabb8d42.js} +1 -1
  137. package/dist/assets/{text-editor-c9d07d36.js → text-editor-ee442c77.js} +1 -1
  138. package/dist/assets/{text-editor-legacy-8e9eb77c.js → text-editor-legacy-d5b6ca9f.js} +1 -1
  139. package/dist/assets/{url-61e15d10.js → url-a7c81f5f.js} +1 -1
  140. package/dist/assets/{url-legacy-2ab85262.js → url-legacy-f729c809.js} +1 -1
  141. package/dist/assets/{useTitle-7f42a4a0.js → useTitle-e6838a6c.js} +1 -1
  142. package/dist/assets/{useTitle-legacy-d3fd3bb2.js → useTitle-legacy-b04d394f.js} +1 -1
  143. package/dist/assets/{video-87306fb5.js → video-89b66969.js} +1 -1
  144. package/dist/assets/{video-legacy-764c3da4.js → video-legacy-90466987.js} +1 -1
  145. package/dist/assets/{video360-2344185d.js → video360-6fa9ee8f.js} +1 -1
  146. package/dist/assets/{video360-legacy-03ec0e5f.js → video360-legacy-fab92613.js} +1 -1
  147. package/dist/assets/{video_box-5dc05430.js → video_box-91fb063a.js} +1 -1
  148. package/dist/assets/{video_box-legacy-530dc959.js → video_box-legacy-d84b7d99.js} +1 -1
  149. package/dist/i18n.tar.gz +0 -0
  150. package/dist/index.html +3 -3
  151. package/dist/lite/VERSION +1 -0
  152. package/dist/lite/assets/2fa-5ad6f9e4.js +1 -0
  153. package/dist/lite/assets/2fa-legacy-2fd288b7.js +1 -0
  154. package/dist/lite/assets/About-fb277475.js +1 -0
  155. package/dist/lite/assets/About-legacy-520a4221.js +1 -0
  156. package/dist/lite/assets/AddOrEdit-0f9961a3.js +1 -0
  157. package/dist/lite/assets/AddOrEdit-12cf2516.js +1 -0
  158. package/dist/lite/assets/AddOrEdit-1c448b6a.js +1 -0
  159. package/dist/lite/assets/AddOrEdit-legacy-6798d629.js +1 -0
  160. package/dist/lite/assets/AddOrEdit-legacy-a4cdee74.js +1 -0
  161. package/dist/lite/assets/AddOrEdit-legacy-e6ffe626.js +1 -0
  162. package/dist/lite/assets/Common-d80b34ab.js +1 -0
  163. package/dist/lite/assets/Common-legacy-2164b752.js +1 -0
  164. package/dist/lite/assets/Copy-1ea87765.js +1 -0
  165. package/dist/lite/assets/Copy-legacy-3443455a.js +1 -0
  166. package/dist/lite/assets/Decompress-d5f53066.js +1 -0
  167. package/dist/lite/assets/Decompress-legacy-71531bcb.js +1 -0
  168. package/dist/lite/assets/DeletePopover-e6aa8190.js +1 -0
  169. package/dist/lite/assets/DeletePopover-legacy-f168fee6.js +1 -0
  170. package/dist/{assets/File-6f69ae80.js → lite/assets/File-7976d82d.js} +1 -1
  171. package/dist/lite/assets/File-legacy-6437bc07.js +1 -0
  172. package/dist/lite/assets/Folder-431205a1.js +114 -0
  173. package/dist/lite/assets/Folder-6651c4e8.css +1 -0
  174. package/dist/lite/assets/Folder-legacy-39ea60cb.js +49 -0
  175. package/dist/lite/assets/FolderTree-0e14485a.js +1 -0
  176. package/dist/lite/assets/FolderTree-legacy-772f9e27.js +1 -0
  177. package/dist/lite/assets/Grid-58437f58.js +1 -0
  178. package/dist/lite/assets/Grid-legacy-dc5ccfb6.js +1 -0
  179. package/dist/lite/assets/GridItem-86e9b9d4.js +1 -0
  180. package/dist/lite/assets/GridItem-legacy-7d199479.js +1 -0
  181. package/dist/lite/assets/ImageWithError-aa488f14.js +1 -0
  182. package/dist/lite/assets/ImageWithError-legacy-1a56429b.js +1 -0
  183. package/dist/lite/assets/Images-8e90a7a1.js +1 -0
  184. package/dist/lite/assets/Images-legacy-97d31566.js +1 -0
  185. package/dist/lite/assets/Layout-07f5b121.js +5 -0
  186. package/dist/lite/assets/Layout-legacy-cb6ff3a1.js +6 -0
  187. package/dist/lite/assets/List-8f83d082.js +1 -0
  188. package/dist/lite/assets/List-legacy-b408aca0.js +1 -0
  189. package/dist/lite/assets/Messenger-66970fb8.js +1 -0
  190. package/dist/lite/assets/Messenger-legacy-c99ee3e5.js +1 -0
  191. package/dist/lite/assets/Metas-d24aec03.js +1 -0
  192. package/dist/lite/assets/Metas-legacy-bfcf17f6.js +1 -0
  193. package/dist/lite/assets/Other-7be950eb.js +1 -0
  194. package/dist/lite/assets/Other-legacy-9221528b.js +1 -0
  195. package/dist/lite/assets/PackageDownload-f05cba5c.js +1 -0
  196. package/dist/lite/assets/PackageDownload-legacy-90313839.js +1 -0
  197. package/dist/lite/assets/Paginator-bb1fc35e.js +1 -0
  198. package/dist/lite/assets/Paginator-legacy-29cfb767.js +1 -0
  199. package/dist/lite/assets/Password-0b8f5086.js +1 -0
  200. package/dist/lite/assets/Password-legacy-9ebe1df7.js +1 -0
  201. package/dist/lite/assets/Profile-8517a5cf.js +1 -0
  202. package/dist/lite/assets/Profile-legacy-bc4f0774.js +1 -0
  203. package/dist/lite/assets/PublicKeys-9c9a5d48.js +1 -0
  204. package/dist/lite/assets/PublicKeys-legacy-4160eda6.js +1 -0
  205. package/dist/lite/assets/ResponsiveGrid-6579ee84.js +1 -0
  206. package/dist/lite/assets/ResponsiveGrid-legacy-49d17ced.js +1 -0
  207. package/dist/lite/assets/S3-401d9db4.js +1 -0
  208. package/dist/lite/assets/S3-legacy-1dd122d0.js +1 -0
  209. package/dist/lite/assets/SettingItem-02493bf9.js +1 -0
  210. package/dist/lite/assets/SettingItem-legacy-dd989714.js +1 -0
  211. package/dist/lite/assets/Storages-ac590c17.js +1 -0
  212. package/dist/lite/assets/Storages-legacy-b1aeb27b.js +1 -0
  213. package/dist/lite/assets/Upload-0a579f7e.js +5 -0
  214. package/dist/lite/assets/Upload-6b9806e1.js +1 -0
  215. package/dist/lite/assets/Upload-legacy-3a257544.js +1 -0
  216. package/dist/lite/assets/Upload-legacy-90ce020b.js +6 -0
  217. package/dist/lite/assets/Users-83449423.js +1 -0
  218. package/dist/lite/assets/Users-legacy-c21a87e8.js +1 -0
  219. package/dist/lite/assets/Wether-8942a1ba.js +1 -0
  220. package/dist/lite/assets/Wether-legacy-98ba57de.js +1 -0
  221. package/dist/lite/assets/aliyun_office-1ca1adb5.js +1 -0
  222. package/dist/lite/assets/aliyun_office-legacy-8e62db4f.js +1 -0
  223. package/dist/lite/assets/aliyun_video-b8078e3a.js +1 -0
  224. package/dist/lite/assets/aliyun_video-legacy-0fee6c6f.js +1 -0
  225. package/dist/lite/assets/archive-bed92511.js +1 -0
  226. package/dist/lite/assets/archive-legacy-e6f76d6c.js +1 -0
  227. package/dist/lite/assets/asciinema-693672d2.js +1 -0
  228. package/dist/lite/assets/asciinema-9107553b.css +1 -0
  229. package/dist/lite/assets/asciinema-legacy-30459b12.js +1 -0
  230. package/dist/lite/assets/audio-43f4c02b.css +1 -0
  231. package/dist/lite/assets/audio-947f8685.js +1 -0
  232. package/dist/lite/assets/audio-legacy-94dbf472.js +1 -0
  233. package/dist/lite/assets/backup-restore-1c64bd21.js +1 -0
  234. package/dist/lite/assets/backup-restore-legacy-9be2d84e.js +1 -0
  235. package/dist/lite/assets/entry-19be961a.js +1 -0
  236. package/dist/lite/assets/entry-66db444a.js +1 -0
  237. package/dist/lite/assets/entry-legacy-0b760420.js +1 -0
  238. package/dist/lite/assets/entry-legacy-98b54dcd.js +1 -0
  239. package/dist/lite/assets/flash-530d0783.js +1 -0
  240. package/dist/lite/assets/flash-legacy-813cc292.js +1 -0
  241. package/dist/lite/assets/heic-8c1c6d5f.js +1 -0
  242. package/dist/lite/assets/heic-legacy-79f1750a.js +1 -0
  243. package/dist/lite/assets/helper-200d7750.js +1 -0
  244. package/dist/lite/assets/helper-57b2e8f8.js +1 -0
  245. package/dist/lite/assets/helper-legacy-0972b954.js +1 -0
  246. package/dist/lite/assets/helper-legacy-8a5ade97.js +1 -0
  247. package/dist/lite/assets/hls-b7cd2950.js +6 -0
  248. package/dist/lite/assets/hls-legacy-0b2f150f.js +8 -0
  249. package/dist/lite/assets/html-66de9a81.js +1 -0
  250. package/dist/lite/assets/html-legacy-0fd004cb.js +1 -0
  251. package/dist/lite/assets/icon-cd887adc.js +1 -0
  252. package/dist/lite/assets/icon-legacy-4ddd609a.js +1 -0
  253. package/dist/lite/assets/image-6ebb35f4.js +1 -0
  254. package/dist/lite/assets/image-legacy-0664f313.js +1 -0
  255. package/dist/lite/assets/index-1cb33dc7.js +1 -0
  256. package/dist/lite/assets/index-30b06bca.js +20 -0
  257. package/dist/lite/assets/index-55c23df0.js +1 -0
  258. package/dist/lite/assets/index-57ec8696.js +1 -0
  259. package/dist/lite/assets/index-73004303.js +14 -0
  260. package/dist/lite/assets/index-8952a6a7.js +1 -0
  261. package/dist/lite/assets/index-a18c5172.js +1 -0
  262. package/dist/lite/assets/index-b790a26c.js +1 -0
  263. package/dist/lite/assets/index-c0564af7.css +1 -0
  264. package/dist/lite/assets/index-c430df0d.js +1 -0
  265. package/dist/lite/assets/index-f564879e.js +1 -0
  266. package/dist/lite/assets/index-legacy-0aa5b14a.js +27 -0
  267. package/dist/lite/assets/index-legacy-22e929c6.js +1 -0
  268. package/dist/lite/assets/index-legacy-275e1f59.js +1 -0
  269. package/dist/lite/assets/index-legacy-387d8666.js +1 -0
  270. package/dist/lite/assets/index-legacy-4131bdaf.js +18 -0
  271. package/dist/lite/assets/index-legacy-4245df2f.js +1 -0
  272. package/dist/lite/assets/index-legacy-8b61a807.js +1 -0
  273. package/dist/lite/assets/index-legacy-94bb4d8b.js +1 -0
  274. package/dist/lite/assets/index-legacy-9b402cb0.js +1 -0
  275. package/dist/lite/assets/index-legacy-d787d60e.js +1 -0
  276. package/dist/lite/assets/indexes-0f73a8db.js +1 -0
  277. package/dist/lite/assets/indexes-legacy-328ac420.js +1 -0
  278. package/dist/lite/assets/ipa-bae46248.js +1 -0
  279. package/dist/lite/assets/ipa-legacy-c50cf57d.js +1 -0
  280. package/dist/lite/assets/item_type-32dc6fdf.js +1 -0
  281. package/dist/lite/assets/item_type-legacy-d49ae974.js +1 -0
  282. package/dist/lite/assets/lg-22b72ba5.ttf +0 -0
  283. package/dist/lite/assets/lg-f2fe1c00.svg +54 -0
  284. package/dist/lite/assets/lg-fefc5c0d.woff +0 -0
  285. package/dist/lite/assets/loading-298ad3ff.gif +0 -0
  286. package/dist/lite/assets/markdown-e425a3a1.js +1 -0
  287. package/dist/lite/assets/markdown-legacy-bde99c55.js +1 -0
  288. package/dist/lite/assets/markdown_with_word_wrap-cd21ff2a.js +1 -0
  289. package/dist/lite/assets/markdown_with_word_wrap-legacy-faf6a6a9.js +1 -0
  290. package/dist/lite/assets/offline_download-48c994e3.js +1 -0
  291. package/dist/lite/assets/offline_download-legacy-1b0a94f2.js +1 -0
  292. package/dist/lite/assets/plist-1def8fbd.js +1 -0
  293. package/dist/lite/assets/plist-legacy-7645e930.js +1 -0
  294. package/dist/lite/assets/polyfills-legacy-fa59231c.js +1 -0
  295. package/dist/lite/assets/style-a6d16836.css +1 -0
  296. package/dist/lite/assets/style-aaf6ac70.js +1 -0
  297. package/dist/lite/assets/style-legacy-9a91035c.js +1 -0
  298. package/dist/lite/assets/subtitles-octopus-worker-62892886.wasm +0 -0
  299. package/dist/lite/assets/subtitles-octopus-worker-f95f2186.js +1 -0
  300. package/dist/lite/assets/text-editor-eae5389b.js +1 -0
  301. package/dist/lite/assets/text-editor-legacy-d09631a9.js +1 -0
  302. package/dist/lite/assets/url-fd7eab80.js +1 -0
  303. package/dist/lite/assets/url-legacy-fedb58a7.js +1 -0
  304. package/dist/lite/assets/useTitle-59c90831.js +1 -0
  305. package/dist/lite/assets/useTitle-legacy-cfd161e5.js +1 -0
  306. package/dist/lite/assets/video-0c0a35c5.js +7 -0
  307. package/dist/lite/assets/video-legacy-c132c2b4.js +9 -0
  308. package/dist/lite/assets/video360-c202cd77.js +14 -0
  309. package/dist/lite/assets/video360-f0192288.css +1 -0
  310. package/dist/lite/assets/video360-legacy-a7fbdc03.js +16 -0
  311. package/dist/lite/assets/video_box-720e4445.js +6 -0
  312. package/dist/lite/assets/video_box-legacy-8e56c186.js +8 -0
  313. package/dist/lite/assets/webauthn-json.browser-ponyfill-29d8152c.js +1 -0
  314. package/dist/lite/assets/webauthn-json.browser-ponyfill-legacy-456cc8e1.js +1 -0
  315. package/dist/lite/i18n.tar.gz +0 -0
  316. package/dist/lite/images/figplayer.webp +0 -0
  317. package/dist/lite/images/fileball.webp +0 -0
  318. package/dist/lite/images/iPlay.webp +0 -0
  319. package/dist/lite/images/iina.webp +0 -0
  320. package/dist/lite/images/infuse.webp +0 -0
  321. package/dist/lite/images/mpv.webp +0 -0
  322. package/dist/lite/images/mxplayer-pro.webp +0 -0
  323. package/dist/lite/images/mxplayer.webp +0 -0
  324. package/dist/lite/images/nplayer.webp +0 -0
  325. package/dist/lite/images/omniplayer.webp +0 -0
  326. package/dist/lite/images/potplayer.webp +0 -0
  327. package/dist/lite/images/vlc.webp +0 -0
  328. package/dist/lite/index.html +81 -0
  329. package/dist/lite/static/epub.js/viewer.html +467 -0
  330. package/dist/lite/static/libheif/libheif.js +5962 -0
  331. package/dist/lite/static/libheif/libheif.wasm +0 -0
  332. package/dist/lite/static/manifest.json +13 -0
  333. package/dist/lite/streamer/mitm.html +186 -0
  334. package/dist/lite/streamer/sw.js +141 -0
  335. package/package.json +1 -1
  336. package/dist/assets/Decompress-6e76a195.js +0 -1
  337. package/dist/assets/Grid-e6b7b2a7.js +0 -1
  338. package/dist/assets/Upload-085f8347.js +0 -1
  339. package/dist/assets/entry-06c35cbb.js +0 -1
  340. package/dist/assets/entry-5fd69c51.js +0 -1
  341. package/dist/assets/entry-legacy-7d1c456d.js +0 -1
  342. package/dist/assets/entry-legacy-83684d8a.js +0 -1
  343. package/dist/assets/offline_download-b9febd2a.js +0 -1
  344. package/dist/assets/plist-dfabacec.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{cB as ti,d as ii,ac as ai,dO as ni,a5 as Ge,af as ri,av as oi,cO as Je,dP as bt,aT as si,cd as di,ce as _i,am as ci,x as hi,q as li,y as At,ag as ui,as as fi,j as Et,dQ as Rt}from"./index-30b06bca.js";import{O as pi,A as mi}from"./icon-cd887adc.js";import{A as gi,a as yi,V as vi}from"./video_box-720e4445.js";import{H as Si,a as bi,b as Ai}from"./hls-b7cd2950.js";import"./index-f564879e.js";import"./Layout-07f5b121.js";import"./useTitle-59c90831.js";import"./FolderTree-0e14485a.js";import"./index-8952a6a7.js";import"./index-73004303.js";import"./index-a18c5172.js";var Tt={exports:{}};(function($e,ot){(function(me,te){$e.exports=te()})(window,function(){return function(me){var te={};function O(F){if(te[F])return te[F].exports;var M=te[F]={i:F,l:!1,exports:{}};return me[F].call(M.exports,M,M.exports,O),M.l=!0,M.exports}return O.m=me,O.c=te,O.d=function(F,M,f){O.o(F,M)||Object.defineProperty(F,M,{enumerable:!0,get:f})},O.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},O.t=function(F,M){if(1&M&&(F=O(F)),8&M||4&M&&typeof F=="object"&&F&&F.__esModule)return F;var f=Object.create(null);if(O.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:F}),2&M&&typeof F!="string")for(var y in F)O.d(f,y,(function(v){return F[v]}).bind(null,y));return f},O.n=function(F){var M=F&&F.__esModule?function(){return F.default}:function(){return F};return O.d(M,"a",M),M},O.o=function(F,M){return Object.prototype.hasOwnProperty.call(F,M)},O.p="",O(O.s=20)}([function(me,te,O){var F=O(9),M=O.n(F),f=function(){function y(){}return y.e=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","error",T),y.ENABLE_ERROR&&(console.error?console.error(T):console.warn?console.warn(T):console.log(T))},y.i=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","info",T),y.ENABLE_INFO&&(console.info?console.info(T):console.log(T))},y.w=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","warn",T),y.ENABLE_WARN&&(console.warn?console.warn(T):console.log(T))},y.d=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","debug",T),y.ENABLE_DEBUG&&(console.debug?console.debug(T):console.log(T))},y.v=function(v,g){v&&!y.FORCE_GLOBAL_TAG||(v=y.GLOBAL_TAG);var T="[".concat(v,"] > ").concat(g);y.ENABLE_CALLBACK&&y.emitter.emit("log","verbose",T),y.ENABLE_VERBOSE&&console.log(T)},y}();f.GLOBAL_TAG="mpegts.js",f.FORCE_GLOBAL_TAG=!1,f.ENABLE_ERROR=!0,f.ENABLE_INFO=!0,f.ENABLE_WARN=!0,f.ENABLE_DEBUG=!0,f.ENABLE_VERBOSE=!0,f.ENABLE_CALLBACK=!1,f.emitter=new M.a,te.a=f},function(me,te,O){var F;(function(M){M.IO_ERROR="io_error",M.DEMUX_ERROR="demux_error",M.INIT_SEGMENT="init_segment",M.MEDIA_SEGMENT="media_segment",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.RECOMMEND_SEEKPOINT="recommend_seekpoint"})(F||(F={})),te.a=F},function(me,te,O){O.d(te,"c",function(){return M}),O.d(te,"b",function(){return f}),O.d(te,"a",function(){return y});var F=O(3),M={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},f={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},y=function(){function v(g){this._type=g||"undefined",this._status=M.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return v.prototype.destroy=function(){this._status=M.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},v.prototype.isWorking=function(){return this._status===M.kConnecting||this._status===M.kBuffering},Object.defineProperty(v.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(g){this._onContentLengthKnown=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(g){this._onURLRedirect=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(g){this._onDataArrival=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onError",{get:function(){return this._onError},set:function(g){this._onError=g},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onComplete",{get:function(){return this._onComplete},set:function(g){this._onComplete=g},enumerable:!1,configurable:!0}),v.prototype.open=function(g,T){throw new F.c("Unimplemented abstract function!")},v.prototype.abort=function(){throw new F.c("Unimplemented abstract function!")},v}()},function(me,te,O){O.d(te,"d",function(){return f}),O.d(te,"a",function(){return y}),O.d(te,"b",function(){return v}),O.d(te,"c",function(){return g});var F,M=(F=function(T,E){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,I){L.__proto__=I}||function(L,I){for(var w in I)Object.prototype.hasOwnProperty.call(I,w)&&(L[w]=I[w])})(T,E)},function(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function L(){this.constructor=T}F(T,E),T.prototype=E===null?Object.create(E):(L.prototype=E.prototype,new L)}),f=function(){function T(E){this._message=E}return Object.defineProperty(T.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),T.prototype.toString=function(){return this.name+": "+this.message},T}(),y=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),E}(f),v=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),E}(f),g=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),E}(f)},function(me,te,O){var F;(function(M){M.ERROR="error",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.DESTROYING="destroying"})(F||(F={})),te.a=F},function(me,te,O){var F={};(function(){var M=self.navigator.userAgent.toLowerCase(),f=/(edge)\/([\w.]+)/.exec(M)||/(opr)[\/]([\w.]+)/.exec(M)||/(chrome)[ \/]([\w.]+)/.exec(M)||/(iemobile)[\/]([\w.]+)/.exec(M)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+)/.exec(M)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(M)||/(msie) ([\w.]+)/.exec(M)||M.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(M)||M.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(M)||[],y=/(ipad)/.exec(M)||/(ipod)/.exec(M)||/(windows phone)/.exec(M)||/(iphone)/.exec(M)||/(kindle)/.exec(M)||/(android)/.exec(M)||/(windows)/.exec(M)||/(mac)/.exec(M)||/(linux)/.exec(M)||/(cros)/.exec(M)||[],v={browser:f[5]||f[3]||f[1]||"",version:f[2]||f[4]||"0",majorVersion:f[4]||f[2]||"0",platform:y[0]||""},g={};if(v.browser){g[v.browser]=!0;var T=v.majorVersion.split(".");g.version={major:parseInt(v.majorVersion,10),string:v.version},T.length>1&&(g.version.minor=parseInt(T[1],10)),T.length>2&&(g.version.build=parseInt(T[2],10))}v.platform&&(g[v.platform]=!0),(g.chrome||g.opr||g.safari)&&(g.webkit=!0),(g.rv||g.iemobile)&&(g.rv&&delete g.rv,v.browser="msie",g.msie=!0),g.edge&&(delete g.edge,v.browser="msedge",g.msedge=!0),g.opr&&(v.browser="opera",g.opera=!0),g.safari&&g.android&&(v.browser="android",g.android=!0);for(var E in g.name=v.browser,g.platform=v.platform,F)F.hasOwnProperty(E)&&delete F[E];Object.assign(F,g)})(),te.a=F},function(me,te,O){te.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(me,te,O){var F;(function(M){M.ERROR="error",M.SOURCE_OPEN="source_open",M.UPDATE_END="update_end",M.BUFFER_FULL="buffer_full",M.START_STREAMING="start_streaming",M.END_STREAMING="end_streaming"})(F||(F={})),te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=function(){function v(){}return Object.defineProperty(v,"forceGlobalTag",{get:function(){return f.a.FORCE_GLOBAL_TAG},set:function(g){f.a.FORCE_GLOBAL_TAG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"globalTag",{get:function(){return f.a.GLOBAL_TAG},set:function(g){f.a.GLOBAL_TAG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableAll",{get:function(){return f.a.ENABLE_VERBOSE&&f.a.ENABLE_DEBUG&&f.a.ENABLE_INFO&&f.a.ENABLE_WARN&&f.a.ENABLE_ERROR},set:function(g){f.a.ENABLE_VERBOSE=g,f.a.ENABLE_DEBUG=g,f.a.ENABLE_INFO=g,f.a.ENABLE_WARN=g,f.a.ENABLE_ERROR=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableDebug",{get:function(){return f.a.ENABLE_DEBUG},set:function(g){f.a.ENABLE_DEBUG=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableVerbose",{get:function(){return f.a.ENABLE_VERBOSE},set:function(g){f.a.ENABLE_VERBOSE=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableInfo",{get:function(){return f.a.ENABLE_INFO},set:function(g){f.a.ENABLE_INFO=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableWarn",{get:function(){return f.a.ENABLE_WARN},set:function(g){f.a.ENABLE_WARN=g,v._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(v,"enableError",{get:function(){return f.a.ENABLE_ERROR},set:function(g){f.a.ENABLE_ERROR=g,v._notifyChange()},enumerable:!1,configurable:!0}),v.getConfig=function(){return{globalTag:f.a.GLOBAL_TAG,forceGlobalTag:f.a.FORCE_GLOBAL_TAG,enableVerbose:f.a.ENABLE_VERBOSE,enableDebug:f.a.ENABLE_DEBUG,enableInfo:f.a.ENABLE_INFO,enableWarn:f.a.ENABLE_WARN,enableError:f.a.ENABLE_ERROR,enableCallback:f.a.ENABLE_CALLBACK}},v.applyConfig=function(g){f.a.GLOBAL_TAG=g.globalTag,f.a.FORCE_GLOBAL_TAG=g.forceGlobalTag,f.a.ENABLE_VERBOSE=g.enableVerbose,f.a.ENABLE_DEBUG=g.enableDebug,f.a.ENABLE_INFO=g.enableInfo,f.a.ENABLE_WARN=g.enableWarn,f.a.ENABLE_ERROR=g.enableError,f.a.ENABLE_CALLBACK=g.enableCallback},v._notifyChange=function(){var g=v.emitter;if(g.listenerCount("change")>0){var T=v.getConfig();g.emit("change",T)}},v.registerListener=function(g){v.emitter.addListener("change",g)},v.removeListener=function(g){v.emitter.removeListener("change",g)},v.addLogListener=function(g){f.a.emitter.addListener("log",g),f.a.emitter.listenerCount("log")>0&&(f.a.ENABLE_CALLBACK=!0,v._notifyChange())},v.removeLogListener=function(g){f.a.emitter.removeListener("log",g),f.a.emitter.listenerCount("log")===0&&(f.a.ENABLE_CALLBACK=!1,v._notifyChange())},v}();y.emitter=new M.a,te.a=y},function(me,te,O){var F,M=typeof Reflect=="object"?Reflect:null,f=M&&typeof M.apply=="function"?M.apply:function(k,q,W){return Function.prototype.apply.call(k,q,W)};F=M&&typeof M.ownKeys=="function"?M.ownKeys:Object.getOwnPropertySymbols?function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:function(k){return Object.getOwnPropertyNames(k)};var y=Number.isNaN||function(k){return k!=k};function v(){v.init.call(this)}me.exports=v,me.exports.once=function(k,q){return new Promise(function(W,D){function c(d){k.removeListener(q,_),D(d)}function _(){typeof k.removeListener=="function"&&k.removeListener("error",c),W([].slice.call(arguments))}K(k,q,_,{once:!0}),q!=="error"&&function(d,p,V){typeof d.on=="function"&&K(d,"error",p,V)}(k,c,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var g=10;function T(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}function E(k){return k._maxListeners===void 0?v.defaultMaxListeners:k._maxListeners}function L(k,q,W,D){var c,_,d,p;if(T(W),(_=k._events)===void 0?(_=k._events=Object.create(null),k._eventsCount=0):(_.newListener!==void 0&&(k.emit("newListener",q,W.listener?W.listener:W),_=k._events),d=_[q]),d===void 0)d=_[q]=W,++k._eventsCount;else if(typeof d=="function"?d=_[q]=D?[W,d]:[d,W]:D?d.unshift(W):d.push(W),(c=E(k))>0&&d.length>c&&!d.warned){d.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(q)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=k,V.type=q,V.count=d.length,p=V,console&&console.warn&&console.warn(p)}return k}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(k,q,W){var D={fired:!1,wrapFn:void 0,target:k,type:q,listener:W},c=I.bind(D);return c.listener=W,D.wrapFn=c,c}function x(k,q,W){var D=k._events;if(D===void 0)return[];var c=D[q];return c===void 0?[]:typeof c=="function"?W?[c.listener||c]:[c]:W?function(_){for(var d=new Array(_.length),p=0;p<d.length;++p)d[p]=_[p].listener||_[p];return d}(c):B(c,c.length)}function U(k){var q=this._events;if(q!==void 0){var W=q[k];if(typeof W=="function")return 1;if(W!==void 0)return W.length}return 0}function B(k,q){for(var W=new Array(q),D=0;D<q;++D)W[D]=k[D];return W}function K(k,q,W,D){if(typeof k.on=="function")D.once?k.once(q,W):k.on(q,W);else{if(typeof k.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k);k.addEventListener(q,function c(_){D.once&&k.removeEventListener(q,c),W(_)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(k){if(typeof k!="number"||k<0||y(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");g=k}}),v.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},v.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||y(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this},v.prototype.getMaxListeners=function(){return E(this)},v.prototype.emit=function(k){for(var q=[],W=1;W<arguments.length;W++)q.push(arguments[W]);var D=k==="error",c=this._events;if(c!==void 0)D=D&&c.error===void 0;else if(!D)return!1;if(D){var _;if(q.length>0&&(_=q[0]),_ instanceof Error)throw _;var d=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw d.context=_,d}var p=c[k];if(p===void 0)return!1;if(typeof p=="function")f(p,this,q);else{var V=p.length,J=B(p,V);for(W=0;W<V;++W)f(J[W],this,q)}return!0},v.prototype.addListener=function(k,q){return L(this,k,q,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(k,q){return L(this,k,q,!0)},v.prototype.once=function(k,q){return T(q),this.on(k,w(this,k,q)),this},v.prototype.prependOnceListener=function(k,q){return T(q),this.prependListener(k,w(this,k,q)),this},v.prototype.removeListener=function(k,q){var W,D,c,_,d;if(T(q),(D=this._events)===void 0)return this;if((W=D[k])===void 0)return this;if(W===q||W.listener===q)--this._eventsCount==0?this._events=Object.create(null):(delete D[k],D.removeListener&&this.emit("removeListener",k,W.listener||q));else if(typeof W!="function"){for(c=-1,_=W.length-1;_>=0;_--)if(W[_]===q||W[_].listener===q){d=W[_].listener,c=_;break}if(c<0)return this;c===0?W.shift():function(p,V){for(;V+1<p.length;V++)p[V]=p[V+1];p.pop()}(W,c),W.length===1&&(D[k]=W[0]),D.removeListener!==void 0&&this.emit("removeListener",k,d||q)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(k){var q,W,D;if((W=this._events)===void 0)return this;if(W.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):W[k]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete W[k]),this;if(arguments.length===0){var c,_=Object.keys(W);for(D=0;D<_.length;++D)(c=_[D])!=="removeListener"&&this.removeAllListeners(c);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(q=W[k])=="function")this.removeListener(k,q);else if(q!==void 0)for(D=q.length-1;D>=0;D--)this.removeListener(k,q[D]);return this},v.prototype.listeners=function(k){return x(this,k,!0)},v.prototype.rawListeners=function(k){return x(this,k,!1)},v.listenerCount=function(k,q){return typeof k.listenerCount=="function"?k.listenerCount(q):U.call(k,q)},v.prototype.listenerCount=U,v.prototype.eventNames=function(){return this._eventsCount>0?F(this._events):[]}},function(me,te,O){O.d(te,"b",function(){return f}),O.d(te,"a",function(){return y});var F=O(2),M=O(6),f={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},y={NETWORK_EXCEPTION:F.b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:F.b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:F.b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:F.b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:M.a.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:M.a.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:M.a.CODEC_UNSUPPORTED}},function(me,te,O){O.d(te,"d",function(){return F}),O.d(te,"b",function(){return M}),O.d(te,"a",function(){return f}),O.d(te,"c",function(){return y});var F=function(v,g,T,E,L){this.dts=v,this.pts=g,this.duration=T,this.originalDts=E,this.isSyncPoint=L,this.fileposition=null},M=function(){function v(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return v.prototype.appendSyncPoint=function(g){g.isSyncPoint=!0,this.syncPoints.push(g)},v}(),f=function(){function v(){this._list=[]}return v.prototype.clear=function(){this._list=[]},v.prototype.appendArray=function(g){var T=this._list;g.length!==0&&(T.length>0&&g[0].originalDts<T[T.length-1].originalDts&&this.clear(),Array.prototype.push.apply(T,g))},v.prototype.getLastSyncPointBeforeDts=function(g){if(this._list.length==0)return null;var T=this._list,E=0,L=T.length-1,I=0,w=0,x=L;for(g<T[0].dts&&(E=0,w=x+1);w<=x;){if((I=w+Math.floor((x-w)/2))===L||g>=T[I].dts&&g<T[I+1].dts){E=I;break}T[I].dts<g?w=I+1:x=I-1}return this._list[E]},v}(),y=function(){function v(g){this._type=g,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(v.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),v.prototype.isEmpty=function(){return this._list.length===0},v.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},v.prototype._searchNearestSegmentBefore=function(g){var T=this._list;if(T.length===0)return-2;var E=T.length-1,L=0,I=0,w=E,x=0;if(g<T[0].originalBeginDts)return x=-1;for(;I<=w;){if((L=I+Math.floor((w-I)/2))===E||g>T[L].lastSample.originalDts&&g<T[L+1].originalBeginDts){x=L;break}T[L].originalBeginDts<g?I=L+1:w=L-1}return x},v.prototype._searchNearestSegmentAfter=function(g){return this._searchNearestSegmentBefore(g)+1},v.prototype.append=function(g){var T=this._list,E=g,L=this._lastAppendLocation,I=0;L!==-1&&L<T.length&&E.originalBeginDts>=T[L].lastSample.originalDts&&(L===T.length-1||L<T.length-1&&E.originalBeginDts<T[L+1].originalBeginDts)?I=L+1:T.length>0&&(I=this._searchNearestSegmentBefore(E.originalBeginDts)+1),this._lastAppendLocation=I,this._list.splice(I,0,E)},v.prototype.getLastSegmentBefore=function(g){var T=this._searchNearestSegmentBefore(g);return T>=0?this._list[T]:null},v.prototype.getLastSampleBefore=function(g){var T=this.getLastSegmentBefore(g);return T!=null?T.lastSample:null},v.prototype.getLastSyncPointBefore=function(g){for(var T=this._searchNearestSegmentBefore(g),E=this._list[T].syncPoints;E.length===0&&T>0;)T--,E=this._list[T].syncPoints;return E.length>0?E[E.length-1]:null},v}()},function(me,te,O){var F=function(){function M(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return M.prototype.isComplete=function(){var f=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,y=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&f&&y},M.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},M.prototype.getNearestKeyframe=function(f){if(this.keyframesIndex==null)return null;var y=this.keyframesIndex,v=this._search(y.times,f);return{index:v,milliseconds:y.times[v],fileposition:y.filepositions[v]}},M.prototype._search=function(f,y){var v=0,g=f.length-1,T=0,E=0,L=g;for(y<f[0]&&(v=0,E=L+1);E<=L;){if((T=E+Math.floor((L-E)/2))===g||y>=f[T]&&y<f[T+1]){v=T;break}f[T]<y?E=T+1:L=T-1}return v},M}();te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=O(5),v=O(12);function g(a,i,t){var e=a;if(i+t<e.length){for(;t--;)if((192&e[++i])!=128)return!1;return!0}return!1}var T,E=function(a){for(var i=[],t=a,e=0,n=a.length;e<n;)if(t[e]<128)i.push(String.fromCharCode(t[e])),++e;else{if(!(t[e]<192)){if(t[e]<224){if(g(t,e,1)&&(o=(31&t[e])<<6|63&t[e+1])>=128){i.push(String.fromCharCode(65535&o)),e+=2;continue}}else if(t[e]<240){if(g(t,e,2)&&(o=(15&t[e])<<12|(63&t[e+1])<<6|63&t[e+2])>=2048&&(63488&o)!=55296){i.push(String.fromCharCode(65535&o)),e+=3;continue}}else if(t[e]<248){var o;if(g(t,e,3)&&(o=(7&t[e])<<18|(63&t[e+1])<<12|(63&t[e+2])<<6|63&t[e+3])>65536&&o<1114112){o-=65536,i.push(String.fromCharCode(o>>>10|55296)),i.push(String.fromCharCode(1023&o|56320)),e+=4;continue}}}i.push(String.fromCharCode(65533)),++e}return i.join("")},L=O(3),I=(T=new ArrayBuffer(2),new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256),w=function(){function a(){}return a.parseScriptData=function(i,t,e){var n={};try{var o=a.parseValue(i,t,e),r=a.parseValue(i,t+o.size,e-o.size);n[o.data]=r.data}catch(s){f.a.e("AMF",s.toString())}return n},a.parseObject=function(i,t,e){if(e<3)throw new L.a("Data not enough when parse ScriptDataObject");var n=a.parseString(i,t,e),o=a.parseValue(i,t+n.size,e-n.size),r=o.objectEnd;return{data:{name:n.data,value:o.data},size:n.size+o.size,objectEnd:r}},a.parseVariable=function(i,t,e){return a.parseObject(i,t,e)},a.parseString=function(i,t,e){if(e<2)throw new L.a("Data not enough when parse String");var n=new DataView(i,t,e).getUint16(0,!I);return{data:n>0?E(new Uint8Array(i,t+2,n)):"",size:2+n}},a.parseLongString=function(i,t,e){if(e<4)throw new L.a("Data not enough when parse LongString");var n=new DataView(i,t,e).getUint32(0,!I);return{data:n>0?E(new Uint8Array(i,t+4,n)):"",size:4+n}},a.parseDate=function(i,t,e){if(e<10)throw new L.a("Data size invalid when parse Date");var n=new DataView(i,t,e),o=n.getFloat64(0,!I),r=n.getInt16(8,!I);return{data:new Date(o+=60*r*1e3),size:10}},a.parseValue=function(i,t,e){if(e<1)throw new L.a("Data not enough when parse Value");var n,o=new DataView(i,t,e),r=1,s=o.getUint8(0),u=!1;try{switch(s){case 0:n=o.getFloat64(1,!I),r+=8;break;case 1:n=!!o.getUint8(1),r+=1;break;case 2:var l=a.parseString(i,t+1,e-1);n=l.data,r+=l.size;break;case 3:n={};var m=0;for((16777215&o.getUint32(e-4,!I))==9&&(m=3);r<e-4;){var A=a.parseObject(i,t+r,e-r-m);if(A.objectEnd)break;n[A.data.name]=A.data.value,r+=A.size}r<=e-3&&(16777215&o.getUint32(r-1,!I))===9&&(r+=3);break;case 8:for(n={},r+=4,m=0,(16777215&o.getUint32(e-4,!I))==9&&(m=3);r<e-8;){var S=a.parseVariable(i,t+r,e-r-m);if(S.objectEnd)break;n[S.data.name]=S.data.value,r+=S.size}r<=e-3&&(16777215&o.getUint32(r-1,!I))===9&&(r+=3);break;case 9:n=void 0,r=1,u=!0;break;case 10:n=[];var R=o.getUint32(1,!I);r+=4;for(var P=0;P<R;P++){var H=a.parseValue(i,t+r,e-r);n.push(H.data),r+=H.size}break;case 11:var N=a.parseDate(i,t+1,e-1);n=N.data,r+=N.size;break;case 12:var ee=a.parseString(i,t+1,e-1);n=ee.data,r+=ee.size;break;default:r=e,f.a.w("AMF","Unsupported AMF value type "+s)}}catch($){f.a.e("AMF",$.toString())}return{data:n,size:r,objectEnd:u}},a}(),x=function(){function a(i){this.TAG="ExpGolomb",this._buffer=i,this._buffer_index=0,this._total_bytes=i.byteLength,this._total_bits=8*i.byteLength,this._current_word=0,this._current_word_bits_left=0}return a.prototype.destroy=function(){this._buffer=null},a.prototype._fillCurrentWord=function(){var i=this._total_bytes-this._buffer_index;if(i<=0)throw new L.a("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,i),e=new Uint8Array(4);e.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(e.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},a.prototype.readBits=function(i){if(i>32)throw new L.b("ExpGolomb: readBits() bits exceeded max 32bits!");if(i<=this._current_word_bits_left){var t=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t}var e=this._current_word_bits_left?this._current_word:0;e>>>=32-this._current_word_bits_left;var n=i-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(n,this._current_word_bits_left),r=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,e=e<<o|r},a.prototype.readBool=function(){return this.readBits(1)===1},a.prototype.readByte=function(){return this.readBits(8)},a.prototype._skipLeadingZero=function(){var i;for(i=0;i<this._current_word_bits_left;i++)if(this._current_word&2147483648>>>i)return this._current_word<<=i,this._current_word_bits_left-=i,i;return this._fillCurrentWord(),i+this._skipLeadingZero()},a.prototype.readUEG=function(){var i=this._skipLeadingZero();return this.readBits(i+1)-1},a.prototype.readSEG=function(){var i=this.readUEG();return 1&i?i+1>>>1:-1*(i>>>1)},a}(),U=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),o=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[o]=t[r],o++);return new Uint8Array(n.buffer,0,o)},a.parseSPS=function(i){for(var t=i.subarray(1,4),e="avc1.",n=0;n<3;n++){var o=t[n].toString(16);o.length<2&&(o="0"+o),e+=o}var r=a._ebsp2rbsp(i),s=new x(r);s.readByte();var u=s.readByte();s.readByte();var l=s.readByte();s.readUEG();var m=a.getProfileString(u),A=a.getLevelString(l),S=1,R=420,P=8,H=8;if((u===100||u===110||u===122||u===244||u===44||u===83||u===86||u===118||u===128||u===138||u===144)&&((S=s.readUEG())===3&&s.readBits(1),S<=3&&(R=[0,420,422,444][S]),P=s.readUEG()+8,H=s.readUEG()+8,s.readBits(1),s.readBool()))for(var N=S!==3?8:12,ee=0;ee<N;ee++)s.readBool()&&(ee<6?a._skipScalingList(s,16):a._skipScalingList(s,64));s.readUEG();var $=s.readUEG();if($===0)s.readUEG();else if($===1){s.readBits(1),s.readSEG(),s.readSEG();var Q=s.readUEG();for(ee=0;ee<Q;ee++)s.readSEG()}var re=s.readUEG();s.readBits(1);var fe=s.readUEG(),Z=s.readUEG(),ae=s.readBits(1);ae===0&&s.readBits(1),s.readBits(1);var pe=0,oe=0,le=0,Se=0;s.readBool()&&(pe=s.readUEG(),oe=s.readUEG(),le=s.readUEG(),Se=s.readUEG());var Ae=1,ue=1,ge=0,Re=!0,Le=0,xe=0;if(s.readBool()){if(s.readBool()){var De=s.readByte();De>0&&De<16?(Ae=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][De-1],ue=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][De-1]):De===255&&(Ae=s.readByte()<<8|s.readByte(),ue=s.readByte()<<8|s.readByte())}if(s.readBool()&&s.readBool(),s.readBool()&&(s.readBits(4),s.readBool()&&s.readBits(24)),s.readBool()&&(s.readUEG(),s.readUEG()),s.readBool()){var Pe=s.readBits(32),Be=s.readBits(32);Re=s.readBool(),ge=(Le=Be)/(xe=2*Pe)}}var Oe=1;Ae===1&&ue===1||(Oe=Ae/ue);var Ie=0,be=0;S===0?(Ie=1,be=2-ae):(Ie=S===3?1:2,be=(S===1?2:1)*(2-ae));var Ve=16*(fe+1),Fe=16*(Z+1)*(2-ae);Ve-=(pe+oe)*Ie,Fe-=(le+Se)*be;var Xe=Math.ceil(Ve*Oe);return s.destroy(),s=null,{codec_mimetype:e,profile_idc:u,level_idc:l,profile_string:m,level_string:A,chroma_format_idc:S,bit_depth:P,bit_depth_luma:P,bit_depth_chroma:H,ref_frames:re,chroma_format:R,chroma_format_string:a.getChromaFormatString(R),frame_rate:{fixed:Re,fps:ge,fps_den:xe,fps_num:Le},sar_ratio:{width:Ae,height:ue},codec_size:{width:Ve,height:Fe},present_size:{width:Xe,height:Fe}}},a._skipScalingList=function(i,t){for(var e=8,n=8,o=0;o<t;o++)n!==0&&(n=(e+i.readSEG()+256)%256),e=n===0?e:n},a.getProfileString=function(i){switch(i){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},a.getLevelString=function(i){return(i/10).toFixed(1)},a.getChromaFormatString=function(i){switch(i){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},a}(),B=O(6),K=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),o=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[o]=t[r],o++);return new Uint8Array(n.buffer,0,o)},a.parseVPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);return e.readByte(),e.readByte(),e.readBits(4),e.readBits(2),e.readBits(6),{num_temporal_layers:e.readBits(3)+1,temporal_id_nested:e.readBool()}},a.parseSPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);e.readByte(),e.readByte();for(var n=0,o=0,r=0,s=0,u=(e.readBits(4),e.readBits(3)),l=(e.readBool(),e.readBits(2)),m=e.readBool(),A=e.readBits(5),S=e.readByte(),R=e.readByte(),P=e.readByte(),H=e.readByte(),N=e.readByte(),ee=e.readByte(),$=e.readByte(),Q=e.readByte(),re=e.readByte(),fe=e.readByte(),Z=e.readByte(),ae=[],pe=[],oe=0;oe<u;oe++)ae.push(e.readBool()),pe.push(e.readBool());if(u>0)for(oe=u;oe<8;oe++)e.readBits(2);for(oe=0;oe<u;oe++)ae[oe]&&(e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte()),pe[oe]&&e.readByte();e.readUEG();var le=e.readUEG();le==3&&e.readBits(1);var Se=e.readUEG(),Ae=e.readUEG();e.readBool()&&(n+=e.readUEG(),o+=e.readUEG(),r+=e.readUEG(),s+=e.readUEG());var ue=e.readUEG(),ge=e.readUEG(),Re=e.readUEG();for(oe=e.readBool()?0:u;oe<=u;oe++)e.readUEG(),e.readUEG(),e.readUEG();if(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readBool()&&e.readBool())for(var Le=0;Le<4;Le++)for(var xe=0;xe<(Le===3?2:6);xe++)if(e.readBool()){var De=Math.min(64,1<<4+(Le<<1));for(Le>1&&e.readSEG(),oe=0;oe<De;oe++)e.readSEG()}else e.readUEG();e.readBool(),e.readBool(),e.readBool()&&(e.readByte(),e.readUEG(),e.readUEG(),e.readBool());var Pe=e.readUEG(),Be=0;for(oe=0;oe<Pe;oe++){var Oe=!1;if(oe!==0&&(Oe=e.readBool()),Oe){oe===Pe&&e.readUEG(),e.readBool(),e.readUEG();for(var Ie=0,be=0;be<=Be;be++){var Ve=e.readBool(),Fe=!1;Ve||(Fe=e.readBool()),(Ve||Fe)&&Ie++}Be=Ie}else{var Xe=e.readUEG(),lt=e.readUEG();for(Be=Xe+lt,be=0;be<Xe;be++)e.readUEG(),e.readBool();for(be=0;be<lt;be++)e.readUEG(),e.readBool()}}if(e.readBool()){var Zt=e.readUEG();for(oe=0;oe<Zt;oe++){for(be=0;be<Re+4;be++)e.readBits(1);e.readBits(1)}}var ut=0,qe=1,Ke=1,ft=!1,tt=1,it=1;if(e.readBool(),e.readBool(),e.readBool()){if(e.readBool()){var We=e.readByte();We>0&&We<=16?(qe=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][We-1],Ke=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][We-1]):We===255&&(qe=e.readBits(16),Ke=e.readBits(16))}if(e.readBool()&&e.readBool(),e.readBool()&&(e.readBits(3),e.readBool(),e.readBool()&&(e.readByte(),e.readByte(),e.readByte())),e.readBool()&&(e.readUEG(),e.readUEG()),e.readBool(),e.readBool(),e.readBool(),e.readBool()&&(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG()),e.readBool()&&(tt=e.readBits(32),it=e.readBits(32),e.readBool()&&e.readUEG(),e.readBool())){var at=!1,nt=!1,Qe=!1;for(at=e.readBool(),nt=e.readBool(),(at||nt)&&((Qe=e.readBool())&&(e.readByte(),e.readBits(5),e.readBool(),e.readBits(5)),e.readBits(4),e.readBits(4),Qe&&e.readBits(4),e.readBits(5),e.readBits(5),e.readBits(5)),oe=0;oe<=u;oe++){var pt=e.readBool();ft=pt;var mt=!0,rt=1;pt||(mt=e.readBool());var gt=!1;if(mt?e.readUEG():gt=e.readBool(),gt||(rt=e.readUEG()+1),at){for(be=0;be<rt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}if(nt){for(be=0;be<rt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}}}e.readBool()&&(e.readBool(),e.readBool(),e.readBool(),ut=e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG())}e.readBool();var ei="hvc1.".concat(A,".1.L").concat(Z,".B0"),yt=Se-(n+o)*(le===1||le===2?2:1),vt=Ae-(r+s)*(le===1?2:1),St=1;return qe!==1&&Ke!==1&&(St=qe/Ke),e.destroy(),e=null,{codec_mimetype:ei,profile_string:a.getProfileString(A),level_string:a.getLevelString(Z),profile_idc:A,bit_depth:ue+8,ref_frames:1,chroma_format:le,chroma_format_string:a.getChromaFormatString(le),general_level_idc:Z,general_profile_space:l,general_tier_flag:m,general_profile_idc:A,general_profile_compatibility_flags_1:S,general_profile_compatibility_flags_2:R,general_profile_compatibility_flags_3:P,general_profile_compatibility_flags_4:H,general_constraint_indicator_flags_1:N,general_constraint_indicator_flags_2:ee,general_constraint_indicator_flags_3:$,general_constraint_indicator_flags_4:Q,general_constraint_indicator_flags_5:re,general_constraint_indicator_flags_6:fe,min_spatial_segmentation_idc:ut,constant_frame_rate:0,chroma_format_idc:le,bit_depth_luma_minus8:ue,bit_depth_chroma_minus8:ge,frame_rate:{fixed:ft,fps:it/tt,fps_den:tt,fps_num:it},sar_ratio:{width:qe,height:Ke},codec_size:{width:yt,height:vt},present_size:{width:yt*St,height:vt}}},a.parsePPS=function(i){var t=a._ebsp2rbsp(i),e=new x(t);e.readByte(),e.readByte(),e.readUEG(),e.readUEG(),e.readBool(),e.readBool(),e.readBits(3),e.readBool(),e.readBool(),e.readUEG(),e.readUEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool()&&e.readUEG(),e.readSEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool(),e.readBool();var n=e.readBool(),o=e.readBool(),r=1;return o&&n?r=0:o?r=3:n&&(r=2),{parallelismType:r}},a.getChromaFormatString=function(i){switch(i){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},a.getProfileString=function(i){switch(i){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},a.getLevelString=function(i){return(i/30).toFixed(1)},a}();function k(a){return a.byteOffset%2==0&&a.byteLength%2==0}function q(a){return a.byteOffset%4==0&&a.byteLength%4==0}function W(a,i){for(var t=0;t<a.length;t++)if(a[t]!==i[t])return!1;return!0}var D=function(a,i){return a.byteLength===i.byteLength&&(q(a)&&q(i)?function(t,e){return W(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4))}(a,i):k(a)&&k(i)?function(t,e){return W(new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2))}(a,i):function(t,e){return W(t,e)}(a,i))},c=function(){return(c=Object.assign||function(a){for(var i,t=1,e=arguments.length;t<e;t++)for(var n in i=arguments[t])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a}).apply(this,arguments)},_=function(){function a(){}return a.parseOBUs=function(i,t){for(var e=0;e<i.byteLength;){var n=e,o=(i[e],(120&i[e])>>3),r=(4&i[e])!=0,s=(2&i[e])!=0;i[e],e+=1,r&&(e+=1);var u=Number.POSITIVE_INFINITY;if(s){u=0;for(var l=0;;l++){var m=i[e++];if(u|=(127&m)<<7*l,(128&m)==0)break}}console.log(o),o===1?t=c(c({},a.parseSeuqneceHeader(i.subarray(e,e+u))),{sequence_header_data:i.subarray(n,e+u)}):(o==3&&t||o==6&&t)&&(t=a.parseOBUFrameHeader(i.subarray(e,e+u),0,0,t)),e+=u}return t},a.parseSeuqneceHeader=function(i){var t=new x(i),e=t.readBits(3),n=(t.readBool(),t.readBool()),o=!0,r=0,s=1,u=void 0,l=[];if(n)l.push({operating_point_idc:0,level:t.readBits(5),tier:0});else{if(t.readBool()){var m=t.readBits(32),A=t.readBits(32),S=t.readBool();if(S){for(var R=0;t.readBits(1)===0;)R+=1;R>=32||(1<<R)-1+t.readBits(R)}(r=A)/(s=m),o=S,t.readBool()&&(t.readBits(5),t.readBits(32),u=t.readBits(5),t.readBits(5))}for(var P=t.readBool(),H=t.readBits(5),N=0;N<=H;N++){var ee=t.readBits(12),$=t.readBits(5),Q=$>7?t.readBits(1):0;l.push({operating_point_idc:ee,level:$,tier:Q}),P&&t.readBool()&&t.readBits(4)}}var re=l[0],fe=re.level,Z=re.tier,ae=t.readBits(4),pe=t.readBits(4),oe=t.readBits(ae+1)+1,le=t.readBits(pe+1)+1,Se=!1;n||(Se=t.readBool()),Se&&(t.readBits(4),t.readBits(4)),t.readBool(),t.readBool(),t.readBool();var Ae=!1,ue=2,ge=2,Re=0;n||(t.readBool(),t.readBool(),t.readBool(),t.readBool(),(Ae=t.readBool())&&(t.readBool(),t.readBool()),(ue=t.readBool()?2:t.readBits(1))?ge=t.readBool()?2:t.readBits(1):ge=2,Ae?Re=t.readBits(3)+1:Re=0);var Le=t.readBool(),xe=(t.readBool(),t.readBool(),t.readBool()),De=8;e===2&&xe?De=t.readBool()?12:10:De=xe?10:8;var Pe=!1;e!==1&&(Pe=t.readBool()),t.readBool()&&(t.readBits(8),t.readBits(8),t.readBits(8));var Be=1,Oe=1;return Pe?(t.readBits(1),Be=1,Oe=1):(t.readBits(1),e==0?(Be=1,Oe=1):e==1?(Be=0,Oe=0):De==12?t.readBits(1)&&t.readBits(1):(Be=1,Oe=0),Be&&Oe&&t.readBits(2),t.readBits(1)),t.readBool(),t.destroy(),t=null,{codec_mimetype:"av01.".concat(e,".").concat(a.getLevelString(fe,Z),".").concat(De.toString(10).padStart(2,"0")),level:fe,tier:Z,level_string:a.getLevelString(fe,Z),profile_idc:e,profile_string:"".concat(e),bit_depth:De,ref_frames:1,chroma_format:a.getChromaFormat(Pe,Be,Oe),chroma_format_string:a.getChromaFormatString(Pe,Be,Oe),sequence_header:{frame_id_numbers_present_flag:Se,additional_frame_id_length_minus_1:void 0,delta_frame_id_length_minus_2:void 0,reduced_still_picture_header:n,decoder_model_info_present_flag:!1,operating_points:l,buffer_removal_time_length_minus_1:u,equal_picture_interval:o,seq_force_screen_content_tools:ue,seq_force_integer_mv:ge,enable_order_hint:Ae,order_hint_bits:Re,enable_superres:Le,frame_width_bit:ae+1,frame_height_bit:pe+1,max_frame_width:oe,max_frame_height:le},keyframe:void 0,frame_rate:{fixed:o,fps:r/s,fps_den:s,fps_num:r}}},a.parseOBUFrameHeader=function(i,t,e,n){var o=n.sequence_header,r=new x(i),s=(o.max_frame_width,o.max_frame_height,0);o.frame_id_numbers_present_flag&&(s=o.additional_frame_id_length_minus_1+o.delta_frame_id_length_minus_2+3);var u=0,l=!0,m=!0,A=!1;if(!o.reduced_still_picture_header){if(r.readBool())return n;l=(u=r.readBits(2))===2||u===0,(m=r.readBool())&&o.decoder_model_info_present_flag&&o.equal_picture_interval,m&&r.readBool(),A=!!(u===3||u===0&&m)||r.readBool()}n.keyframe=l,r.readBool();var S=o.seq_force_screen_content_tools;o.seq_force_screen_content_tools===2&&(S=r.readBits(1)),S&&(o.seq_force_integer_mv,o.seq_force_integer_mv==2&&r.readBits(1)),o.frame_id_numbers_present_flag&&r.readBits(s);var R=!1;if(R=u==3||!o.reduced_still_picture_header&&r.readBool(),r.readBits(o.order_hint_bits),l||A||r.readBits(3),o.decoder_model_info_present_flag&&r.readBool()){for(var P=0;P<=o.operating_points_cnt_minus_1;P++)if(o.operating_points[P].decoder_model_present_for_this_op[P]){var H=o.operating_points[P].operating_point_idc;(H===0||H>>t&1&&H>>e+8&1)&&r.readBits(o.buffer_removal_time_length_minus_1+1)}}var N=255;if(u===3||u==0&&m||(N=r.readBits(8)),(l||N!==255)&&A&&o.enable_order_hint)for(var ee=0;ee<8;ee++)r.readBits(o.order_hint_bits);if(l){var $=a.frameSizeAndRenderSize(r,R,o);n.codec_size={width:$.FrameWidth,height:$.FrameHeight},n.present_size={width:$.RenderWidth,height:$.RenderHeight},n.sar_ratio={width:$.RenderWidth/$.FrameWidth,height:$.RenderHeight/$.FrameHeight}}return r.destroy(),r=null,n},a.frameSizeAndRenderSize=function(i,t,e){var n=e.max_frame_width,o=e.max_frame_height;t&&(n=i.readBits(e.frame_width_bit)+1,o=i.readBits(e.frame_height_bit)+1);var r=!1;e.enable_superres&&(r=i.readBool());var s=8;r&&(s=i.readBits(3)+9);var u=n;n=Math.floor((8*u+s/2)/s);var l=u,m=o;if(i.readBool()){var A=i.readBits(16)+1,S=i.readBits(16)+1;l=i.readBits(A)+1,m=i.readBits(S)+1}return{UpscaledWidth:u,FrameWidth:n,FrameHeight:o,RenderWidth:l,RenderHeight:m}},a.getLevelString=function(i,t){return"".concat(i.toString(10).padStart(2,"0")).concat(t===0?"M":"H")},a.getChromaFormat=function(i,t,e){return i?0:t===0&&e===0?3:t===1&&e===0?2:t===1&&e===1?1:Number.NaN},a.getChromaFormatString=function(i,t,e){return i?"4:0:0":t===0&&e===0?"4:4:4":t===1&&e===0?"4:2:2":t===1&&e===1?"4:2:0":"Unknown"},a}(),d,p=function(){function a(i,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=i.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=i.hasAudioTrack,this._hasVideo=i.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new v.a,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256}()}return a.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},a.probe=function(i){var t=new Uint8Array(i);if(t.byteLength<9)return{needMoreData:!0};var e={match:!1};if(t[0]!==70||t[1]!==76||t[2]!==86||t[3]!==1)return e;var n,o,r=(4&t[4])>>>2!=0,s=(1&t[4])!=0,u=(n=t)[o=5]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3];return u<9?e:{match:!0,consumed:u,dataOffset:u,hasAudioTrack:r,hasVideoTrack:s}},a.prototype.bindDataSource=function(i){return i.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(a.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(i){this._onTrackMetadata=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(i){this._onMediaInfo=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(i){this._onMetaDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(i){this._onScriptDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onError",{get:function(){return this._onError},set:function(i){this._onError=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(i){this._onDataAvailable=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(i){this._timestampBase=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedDuration",{get:function(){return this._duration},set:function(i){this._durationOverrided=!0,this._duration=i,this._mediaInfo.duration=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasAudio",{set:function(i){this._hasAudioFlagOverrided=!0,this._hasAudio=i,this._mediaInfo.hasAudio=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasVideo",{set:function(i){this._hasVideoFlagOverrided=!0,this._hasVideo=i,this._mediaInfo.hasVideo=i},enumerable:!1,configurable:!0}),a.prototype.resetMediaInfo=function(){this._mediaInfo=new v.a},a.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},a.prototype.parseChunks=function(i,t){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new L.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var e=0,n=this._littleEndian;if(t===0){if(!(i.byteLength>13))return 0;e=a.probe(i).dataOffset}for(this._firstParse&&(this._firstParse=!1,t+e!==this._dataOffset&&f.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(o=new DataView(i,e)).getUint32(0,!n)!==0&&f.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),e+=4);e<i.byteLength;){this._dispatch=!0;var o=new DataView(i,e);if(e+11+4>i.byteLength)break;var r=o.getUint8(0),s=16777215&o.getUint32(0,!n);if(e+11+s+4>i.byteLength)break;if(r===8||r===9||r===18){var u=o.getUint8(4),l=o.getUint8(5),m=o.getUint8(6)|l<<8|u<<16|o.getUint8(7)<<24;16777215&o.getUint32(7,!n)&&f.a.w(this.TAG,"Meet tag which has StreamID != 0!");var A=e+11;switch(r){case 8:this._parseAudioData(i,A,s,m);break;case 9:this._parseVideoData(i,A,s,m,t+e);break;case 18:this._parseScriptData(i,A,s)}var S=o.getUint32(11+s,!n);S!==11+s&&f.a.w(this.TAG,"Invalid PrevTagSize ".concat(S)),e+=11+s+4}else f.a.w(this.TAG,"Unsupported tag type ".concat(r,", skipped")),e+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),e},a.prototype._parseScriptData=function(i,t,e){var n=w.parseScriptData(i,t,e);if(n.hasOwnProperty("onMetaData")){if(n.onMetaData==null||typeof n.onMetaData!="object")return void f.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&f.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;var o=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},o)),typeof o.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof o.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof o.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=o.audiodatarate),typeof o.videodatarate=="number"&&(this._mediaInfo.videoDataRate=o.videodatarate),typeof o.width=="number"&&(this._mediaInfo.width=o.width),typeof o.height=="number"&&(this._mediaInfo.height=o.height),typeof o.duration=="number"){if(!this._durationOverrided){var r=Math.floor(o.duration*this._timescale);this._duration=r,this._mediaInfo.duration=r}}else this._mediaInfo.duration=0;if(typeof o.framerate=="number"){var s=Math.floor(1e3*o.framerate);if(s>0){var u=s/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=s,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if(typeof o.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var l=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,f.a.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(n).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},n))},a.prototype._parseKeyframesIndex=function(i){for(var t=[],e=[],n=1;n<i.times.length;n++){var o=this._timestampBase+Math.floor(1e3*i.times[n]);t.push(o),e.push(i.filepositions[n])}return{times:t,filepositions:e}},a.prototype._parseAudioData=function(i,t,e,n){if(e<=1)f.a.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(this._hasAudioFlagOverrided!==!0||this._hasAudio!==!1){this._littleEndian;var o=new DataView(i,t,e).getUint8(0),r=o>>>4;if(r!==9)if(r===2||r===10){var s=0,u=(12&o)>>>2;if(u>=0&&u<=4){s=this._flvSoundRateTable[u];var l=1&o,m=this._audioMetadata,A=this._audioTrack;if(m||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(m=this._audioMetadata={}).type="audio",m.id=A.id,m.timescale=this._timescale,m.duration=this._duration,m.audioSampleRate=s,m.channelCount=l===0?1:2),r===10){var S=this._parseAACAudioData(i,t+1,e-1);if(S==null)return;if(S.packetType===0){if(m.config){if(D(S.data.config,m.config))return;f.a.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var R=S.data;m.audioSampleRate=R.samplingRate,m.channelCount=R.channelCount,m.codec=R.codec,m.originalCodec=R.originalCodec,m.config=R.config,m.refSampleDuration=1024/m.audioSampleRate*m.timescale,f.a.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",m),(N=this._mediaInfo).audioCodec=m.originalCodec,N.audioSampleRate=m.audioSampleRate,N.audioChannelCount=m.channelCount,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)}else if(S.packetType===1){var P=this._timestampBase+n,H={unit:S.data,length:S.data.byteLength,dts:P,pts:P};A.samples.push(H),A.length+=S.data.length}else f.a.e(this.TAG,"Flv: Unsupported AAC data type ".concat(S.packetType))}else if(r===2){if(!m.codec){var N;if((R=this._parseMP3AudioData(i,t+1,e-1,!0))==null)return;m.audioSampleRate=R.samplingRate,m.channelCount=R.channelCount,m.codec=R.codec,m.originalCodec=R.originalCodec,m.refSampleDuration=1152/m.audioSampleRate*m.timescale,f.a.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",m),(N=this._mediaInfo).audioCodec=m.codec,N.audioSampleRate=m.audioSampleRate,N.audioChannelCount=m.channelCount,N.audioDataRate=R.bitRate,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)}var ee=this._parseMP3AudioData(i,t+1,e-1,!1);if(ee==null)return;P=this._timestampBase+n;var $={unit:ee,length:ee.byteLength,dts:P,pts:P};A.samples.push($),A.length+=ee.length}}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u)}else this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+r);else{if(e<=5)return void f.a.w(this.TAG,"Flv: Invalid audio packet, missing AudioFourCC in Ehnanced FLV payload!");var Q=15&o,re=String.fromCharCode.apply(String,new Uint8Array(i,t,e).slice(1,5));switch(re){case"Opus":this._parseOpusAudioPacket(i,t+5,e-5,n,Q);break;case"fLaC":this._parseFlacAudioPacket(i,t+5,e-5,n,Q);break;default:this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec: "+re)}}}},a.prototype._parseAACAudioData=function(i,t,e){if(!(e<=1)){var n={},o=new Uint8Array(i,t,e);return n.packetType=o[0],o[0]===0?n.data=this._parseAACAudioSpecificConfig(i,t+1,e-1):n.data=o.subarray(1),n}f.a.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},a.prototype._parseAACAudioSpecificConfig=function(i,t,e){var n,o,r=new Uint8Array(i,t,e),s=null,u=0,l=null;if(u=n=r[0]>>>3,(o=(7&r[0])<<1|r[1]>>>7)<0||o>=this._mpegSamplingRates.length)this._onError(B.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var m=this._mpegSamplingRates[o],A=(120&r[1])>>>3;if(!(A<0||A>=8)){u===5&&(l=(7&r[1])<<1|r[2]>>>7,(124&r[2])>>>2);var S=self.navigator.userAgent.toLowerCase();return S.indexOf("firefox")!==-1?o>=6?(u=5,s=new Array(4),l=o-3):(u=2,s=new Array(2),l=o):S.indexOf("android")!==-1?(u=2,s=new Array(2),l=o):(u=5,l=o,s=new Array(4),o>=6?l=o-3:A===1&&(u=2,s=new Array(2),l=o)),s[0]=u<<3,s[0]|=(15&o)>>>1,s[1]=(15&o)<<7,s[1]|=(15&A)<<3,u===5&&(s[1]|=(15&l)>>>1,s[2]=(1&l)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:m,channelCount:A,codec:"mp4a.40."+u,originalCodec:"mp4a.40."+n}}this._onError(B.a.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},a.prototype._parseMP3AudioData=function(i,t,e,n){if(!(e<4)){this._littleEndian;var o=new Uint8Array(i,t,e),r=null;if(n){if(o[0]!==255)return;var s=o[1]>>>3&3,u=(6&o[1])>>1,l=(240&o[2])>>>4,m=(12&o[2])>>>2,A=(o[3]>>>6&3)!==3?2:1,S=0,R=0;switch(s){case 0:S=this._mpegAudioV25SampleRateTable[m];break;case 2:S=this._mpegAudioV20SampleRateTable[m];break;case 3:S=this._mpegAudioV10SampleRateTable[m]}switch(u){case 1:l<this._mpegAudioL3BitRateTable.length&&(R=this._mpegAudioL3BitRateTable[l]);break;case 2:l<this._mpegAudioL2BitRateTable.length&&(R=this._mpegAudioL2BitRateTable[l]);break;case 3:l<this._mpegAudioL1BitRateTable.length&&(R=this._mpegAudioL1BitRateTable[l])}r={bitRate:R,samplingRate:S,channelCount:A,codec:"mp3",originalCodec:"mp3"}}else r=o;return r}f.a.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},a.prototype._parseOpusAudioPacket=function(i,t,e,n,o){if(o===0)this._parseOpusSequenceHeader(i,t,e);else if(o===1)this._parseOpusAudioData(i,t,e,n);else if(o!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(o))},a.prototype._parseOpusSequenceHeader=function(i,t,e){if(e<=16)f.a.w(this.TAG,"Flv: Invalid OpusSequenceHeader, lack of data!");else{var n=this._audioMetadata,o=this._audioTrack;n||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(n=this._audioMetadata={}).type="audio",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration);var r=new DataView(i,t,e);r.setUint8(8,0);var s=r.getUint8(9);r.setUint16(10,r.getUint16(10,!0),!1);var u=r.getUint32(12,!0);r.setUint32(12,r.getUint32(12,!0),!1);var l={config:new Uint8Array(i,t+8,e-8),channelCount:s,samplingFrequence:u,codec:"opus",originalCodec:"opus"};if(n.config){if(D(l.config,n.config))return;f.a.w(this.TAG,"OpusSequenceHeader has been changed, re-generate initialization segment")}n.audioSampleRate=l.samplingFrequence,n.channelCount=l.channelCount,n.codec=l.codec,n.originalCodec=l.originalCodec,n.config=l.config,n.refSampleDuration=20,f.a.v(this.TAG,"Parsed OpusSequenceHeader"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",n);var m=this._mediaInfo;m.audioCodec=n.originalCodec,m.audioSampleRate=n.audioSampleRate,m.audioChannelCount=n.channelCount,m.hasVideo?m.videoCodec!=null&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}},a.prototype._parseOpusAudioData=function(i,t,e,n){var o=this._audioTrack,r=new Uint8Array(i,t,e),s=this._timestampBase+n,u={unit:r,length:r.byteLength,dts:s,pts:s};o.samples.push(u),o.length+=r.length},a.prototype._parseFlacAudioPacket=function(i,t,e,n,o){if(o===0)this._parseFlacSequenceHeader(i,t,e);else if(o===1)this._parseFlacAudioData(i,t,e,n);else if(o!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid Flac audio packet type ".concat(o))},a.prototype._parseFlacSequenceHeader=function(i,t,e){var n=this._audioMetadata,o=this._audioTrack;n||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(n=this._audioMetadata={}).type="audio",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration);var r=new Uint8Array(i,t+4,e-4),s=new x(r),u=s.readBits(16),l=s.readBits(16),m=l===u?l:null;s.readBits(24),s.readBits(24);var A=s.readBits(20),S=s.readBits(3)+1,R=s.readBits(5)+1;s.destroy();var P=new Uint8Array(r.byteLength+4);P.set(r,4),P[0]=128,P[1]=r.byteLength>>>16&255,P[2]=r.byteLength>>>8&255,P[3]=r.byteLength>>>0&255;var H={config:P,channelCount:S,samplingFrequence:A,sampleSize:R,codec:"flac",originalCodec:"flac"};if(n.config){if(D(H.config,n.config))return;f.a.w(this.TAG,"FlacSequenceHeader has been changed, re-generate initialization segment")}n.audioSampleRate=H.samplingFrequence,n.channelCount=H.channelCount,n.sampleSize=H.sampleSize,n.codec=H.codec,n.originalCodec=H.originalCodec,n.config=H.config,n.refSampleDuration=m!=null?1e3*m/H.samplingFrequence:null,f.a.v(this.TAG,"Parsed FlacSequenceHeader"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",n);var N=this._mediaInfo;N.audioCodec=n.originalCodec,N.audioSampleRate=n.audioSampleRate,N.audioChannelCount=n.channelCount,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)},a.prototype._parseFlacAudioData=function(i,t,e,n){var o=this._audioTrack,r=new Uint8Array(i,t,e),s=this._timestampBase+n,u={unit:r,length:r.byteLength,dts:s,pts:s};o.samples.push(u),o.length+=r.length},a.prototype._parseVideoData=function(i,t,e,n,o){if(e<=1)f.a.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(this._hasVideoFlagOverrided!==!0||this._hasVideo!==!1){var r=new Uint8Array(i,t,e)[0],s=(112&r)>>>4;if(128&r){var u=15&r,l=String.fromCharCode.apply(String,new Uint8Array(i,t,e).slice(1,5));if(l==="hvc1")this._parseEnhancedHEVCVideoPacket(i,t+5,e-5,n,o,s,u);else{if(l!=="av01")return void this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(l));this._parseEnhancedAV1VideoPacket(i,t+5,e-5,n,o,s,u)}}else{var m=15&r;if(m===7)this._parseAVCVideoPacket(i,t+1,e-1,n,o,s);else{if(m!==12)return void this._onError(B.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(m));this._parseHEVCVideoPacket(i,t+1,e-1,n,o,s)}}}},a.prototype._parseAVCVideoPacket=function(i,t,e,n,o,r){if(e<4)f.a.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,u=new DataView(i,t,e),l=u.getUint8(0),m=(16777215&u.getUint32(0,!s))<<8>>8;if(l===0)this._parseAVCDecoderConfigurationRecord(i,t+4,e-4);else if(l===1)this._parseAVCVideoData(i,t+4,e-4,n,o,r,m);else if(l!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}},a.prototype._parseHEVCVideoPacket=function(i,t,e,n,o,r){if(e<4)f.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var s=this._littleEndian,u=new DataView(i,t,e),l=u.getUint8(0),m=(16777215&u.getUint32(0,!s))<<8>>8;if(l===0)this._parseHEVCDecoderConfigurationRecord(i,t+4,e-4);else if(l===1)this._parseHEVCVideoData(i,t+4,e-4,n,o,r,m);else if(l!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}},a.prototype._parseEnhancedHEVCVideoPacket=function(i,t,e,n,o,r,s){var u=this._littleEndian,l=new DataView(i,t,e);if(s===0)this._parseHEVCDecoderConfigurationRecord(i,t,e);else if(s===1){var m=(4294967040&l.getUint32(0,!u))>>8;this._parseHEVCVideoData(i,t+3,e-3,n,o,r,m)}else if(s===3)this._parseHEVCVideoData(i,t,e,n,o,r,0);else if(s!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(s))},a.prototype._parseEnhancedAV1VideoPacket=function(i,t,e,n,o,r,s){if(this._littleEndian,s===0)this._parseAV1CodecConfigurationRecord(i,t,e);else if(s===1)this._parseAV1VideoData(i,t,e,n,o,r,0);else{if(s===5)return void this._onError(B.a.FORMAT_ERROR,"Flv: Not Supported MP2T AV1 video packet type ".concat(s));if(s!==2)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(s))}},a.prototype._parseAVCDecoderConfigurationRecord=function(i,t,e){if(e<7)f.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,o=this._videoTrack,r=this._littleEndian,s=new DataView(i,t,e);if(n){if(n.avcc!==void 0){var u=new Uint8Array(i,t,e);if(D(u,n.avcc))return;f.a.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration;var l=s.getUint8(0),m=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),l===1&&m!==0)if(this._naluLengthSize=1+(3&s.getUint8(4)),this._naluLengthSize===3||this._naluLengthSize===4){var A=31&s.getUint8(5);if(A!==0){A>1&&f.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(A));for(var S=6,R=0;R<A;R++){var P=s.getUint16(S,!r);if(S+=2,P!==0){var H=new Uint8Array(i,t+S,P);S+=P;var N=U.parseSPS(H);if(R===0){n.codecWidth=N.codec_size.width,n.codecHeight=N.codec_size.height,n.presentWidth=N.present_size.width,n.presentHeight=N.present_size.height,n.profile=N.profile_string,n.level=N.level_string,n.bitDepth=N.bit_depth,n.chromaFormat=N.chroma_format,n.sarRatio=N.sar_ratio,n.frameRate=N.frame_rate,N.frame_rate.fixed!==!1&&N.frame_rate.fps_num!==0&&N.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var ee=n.frameRate.fps_den,$=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(ee/$);for(var Q=H.subarray(1,4),re="avc1.",fe=0;fe<3;fe++){var Z=Q[fe].toString(16);Z.length<2&&(Z="0"+Z),re+=Z}n.codec=re;var ae=this._mediaInfo;ae.width=n.codecWidth,ae.height=n.codecHeight,ae.fps=n.frameRate.fps,ae.profile=n.profile,ae.level=n.level,ae.refFrames=N.ref_frames,ae.chromaFormat=N.chroma_format_string,ae.sarNum=n.sarRatio.width,ae.sarDen=n.sarRatio.height,ae.videoCodec=re,ae.hasAudio?ae.audioCodec!=null&&(ae.mimeType='video/x-flv; codecs="'+ae.videoCodec+","+ae.audioCodec+'"'):ae.mimeType='video/x-flv; codecs="'+ae.videoCodec+'"',ae.isComplete()&&this._onMediaInfo(ae)}}}var pe=s.getUint8(S);if(pe!==0){for(pe>1&&f.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(pe)),S++,R=0;R<pe;R++)P=s.getUint16(S,!r),S+=2,P!==0&&(S+=P);n.avcc=new Uint8Array(e),n.avcc.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(B.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},a.prototype._parseHEVCDecoderConfigurationRecord=function(i,t,e){if(e<22)f.a.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,o=this._videoTrack,r=this._littleEndian,s=new DataView(i,t,e);if(n){if(n.hvcc!==void 0){var u=new Uint8Array(i,t,e);if(D(u,n.hvcc))return;f.a.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration;var l=s.getUint8(0),m=31&s.getUint8(1);if(l!==0&&l!==1||m===0)this._onError(B.a.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord");else if(this._naluLengthSize=1+(3&s.getUint8(21)),this._naluLengthSize===3||this._naluLengthSize===4){for(var A=s.getUint8(22),S=0,R=23;S<A;S++){var P=63&s.getUint8(R+0),H=s.getUint16(R+1,!r);R+=3;for(var N=0;N<H;N++){var ee=s.getUint16(R+0,!r);if(N===0)if(P===33){R+=2;var $=new Uint8Array(i,t+R,ee),Q=K.parseSPS($);n.codecWidth=Q.codec_size.width,n.codecHeight=Q.codec_size.height,n.presentWidth=Q.present_size.width,n.presentHeight=Q.present_size.height,n.profile=Q.profile_string,n.level=Q.level_string,n.bitDepth=Q.bit_depth,n.chromaFormat=Q.chroma_format,n.sarRatio=Q.sar_ratio,n.frameRate=Q.frame_rate,Q.frame_rate.fixed!==!1&&Q.frame_rate.fps_num!==0&&Q.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var re=n.frameRate.fps_den,fe=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(re/fe),n.codec=Q.codec_mimetype;var Z=this._mediaInfo;Z.width=n.codecWidth,Z.height=n.codecHeight,Z.fps=n.frameRate.fps,Z.profile=n.profile,Z.level=n.level,Z.refFrames=Q.ref_frames,Z.chromaFormat=Q.chroma_format_string,Z.sarNum=n.sarRatio.width,Z.sarDen=n.sarRatio.height,Z.videoCodec=Q.codec_mimetype,Z.hasAudio?Z.audioCodec!=null&&(Z.mimeType='video/x-flv; codecs="'+Z.videoCodec+","+Z.audioCodec+'"'):Z.mimeType='video/x-flv; codecs="'+Z.videoCodec+'"',Z.isComplete()&&this._onMediaInfo(Z),R+=ee}else R+=2+ee;else R+=2+ee}}n.hvcc=new Uint8Array(e),n.hvcc.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Parsed HEVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(B.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1))}},a.prototype._parseAV1CodecConfigurationRecord=function(i,t,e){if(e<4)f.a.w(this.TAG,"Flv: Invalid AV1CodecConfigurationRecord, lack of data!");else{var n=this._videoMetadata,o=this._videoTrack,r=(this._littleEndian,new DataView(i,t,e));n?n.av1c!==void 0&&f.a.w(this.TAG,"Found another AV1CodecConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration);var s=127&r.getUint8(0);if(r.getUint8(1),r.getUint8(1),r.getUint8(2),s===1){var u=_.parseOBUs(new Uint8Array(i,t+4,e-4));if(u!=null){n.profile=u.profile_string,n.level=u.level_string,n.bitDepth=u.bit_depth,n.chromaFormat=u.chroma_format,n.frameRate=u.frame_rate,u.frame_rate.fixed!==!1&&u.frame_rate.fps_num!==0&&u.frame_rate.fps_den!==0||(n.frameRate=this._referenceFrameRate);var l=n.frameRate.fps_den,m=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(l/m),n.codec=u.codec_mimetype,n.extra=u;var A=this._mediaInfo;A.fps=n.frameRate.fps,A.profile=n.profile,A.level=n.level,A.refFrames=u.ref_frames,A.chromaFormat=u.chroma_format_string,A.videoCodec=u.codec_mimetype,A.hasAudio?A.audioCodec!=null&&(A.mimeType='video/x-flv; codecs="'+A.videoCodec+","+A.audioCodec+'"'):A.mimeType='video/x-flv; codecs="'+A.videoCodec+'"',A.isComplete()&&this._onMediaInfo(A),n.av1c=new Uint8Array(e),n.av1c.set(new Uint8Array(i,t,e),0),f.a.v(this.TAG,"Preparing AV1CodecConfigurationRecord")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}else this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord")}},a.prototype._parseAVCVideoData=function(i,t,e,n,o,r,s){for(var u=this._littleEndian,l=new DataView(i,t,e),m=[],A=0,S=0,R=this._naluLengthSize,P=this._timestampBase+n,H=r===1;S<e;){if(S+4>=e){f.a.w(this.TAG,"Malformed Nalu near timestamp ".concat(P,", offset = ").concat(S,", dataSize = ").concat(e));break}var N=l.getUint32(S,!u);if(R===3&&(N>>>=8),N>e-R)return void f.a.w(this.TAG,"Malformed Nalus near timestamp ".concat(P,", NaluSize > DataSize!"));var ee=31&l.getUint8(S+R);ee===5&&(H=!0);var $=new Uint8Array(i,t+S,R+N),Q={type:ee,data:$};m.push(Q),A+=$.byteLength,S+=R+N}if(m.length){var re=this._videoTrack,fe={units:m,length:A,isKeyframe:H,dts:P,cts:s,pts:P+s};H&&(fe.fileposition=o),re.samples.push(fe),re.length+=A}},a.prototype._parseHEVCVideoData=function(i,t,e,n,o,r,s){for(var u=this._littleEndian,l=new DataView(i,t,e),m=[],A=0,S=0,R=this._naluLengthSize,P=this._timestampBase+n,H=r===1;S<e;){if(S+4>=e){f.a.w(this.TAG,"Malformed Nalu near timestamp ".concat(P,", offset = ").concat(S,", dataSize = ").concat(e));break}var N=l.getUint32(S,!u);if(R===3&&(N>>>=8),N>e-R)return void f.a.w(this.TAG,"Malformed Nalus near timestamp ".concat(P,", NaluSize > DataSize!"));var ee=l.getUint8(S+R)>>1&63;ee!==19&&ee!==20&&ee!==21||(H=!0);var $=new Uint8Array(i,t+S,R+N),Q={type:ee,data:$};m.push(Q),A+=$.byteLength,S+=R+N}if(m.length){var re=this._videoTrack,fe={units:m,length:A,isKeyframe:H,dts:P,cts:s,pts:P+s};H&&(fe.fileposition=o),re.samples.push(fe),re.length+=A}},a.prototype._parseAV1VideoData=function(i,t,e,n,o,r,s){this._littleEndian;var u,l=[],m=this._timestampBase+n,A=r===1;if(A){var S=this._videoMetadata,R=_.parseOBUs(new Uint8Array(i,t,e),S.extra);if(R==null)return void this._onError(B.a.FORMAT_ERROR,"Flv: Invalid AV1 VideoData");console.log(R),S.codecWidth=R.codec_size.width,S.codecHeight=R.codec_size.height,S.presentWidth=R.present_size.width,S.presentHeight=R.present_size.height,S.sarRatio=R.sar_ratio;var P=this._mediaInfo;P.width=S.codecWidth,P.height=S.codecHeight,P.sarNum=S.sarRatio.width,P.sarDen=S.sarRatio.height,f.a.v(this.TAG,"Parsed AV1DecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",S)}if(u=e,l.push({unitType:0,data:new Uint8Array(i,t+0,e)}),l.length){var H=this._videoTrack,N={units:l,length:u,isKeyframe:A,dts:m,cts:s,pts:m+s};A&&(N.fileposition=o),H.samples.push(N),H.length+=u}},a}(),V=function(){function a(){}return a.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSynchronousKLVMetadata=null,this.onAsynchronousKLVMetadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},a}(),J=function(){this.program_pmt_pid={}};(function(a){a[a.kMPEG1Audio=3]="kMPEG1Audio",a[a.kMPEG2Audio=4]="kMPEG2Audio",a[a.kPESPrivateData=6]="kPESPrivateData",a[a.kADTSAAC=15]="kADTSAAC",a[a.kLOASAAC=17]="kLOASAAC",a[a.kAC3=129]="kAC3",a[a.kEAC3=135]="kEAC3",a[a.kMetadata=21]="kMetadata",a[a.kSCTE35=134]="kSCTE35",a[a.kH264=27]="kH264",a[a.kH265=36]="kH265"})(d||(d={}));var G,Y=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,av1:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.synchronous_klv_pids={},this.asynchronous_klv_pids={},this.scte_35_pids={},this.smpte2038_pids={}},se=function(){},Ee=function(){},_e=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0};(function(a){a[a.kUnspecified=0]="kUnspecified",a[a.kSliceNonIDR=1]="kSliceNonIDR",a[a.kSliceDPA=2]="kSliceDPA",a[a.kSliceDPB=3]="kSliceDPB",a[a.kSliceDPC=4]="kSliceDPC",a[a.kSliceIDR=5]="kSliceIDR",a[a.kSliceSEI=6]="kSliceSEI",a[a.kSliceSPS=7]="kSliceSPS",a[a.kSlicePPS=8]="kSlicePPS",a[a.kSliceAUD=9]="kSliceAUD",a[a.kEndOfSequence=10]="kEndOfSequence",a[a.kEndOfStream=11]="kEndOfStream",a[a.kFiller=12]="kFiller",a[a.kSPSExt=13]="kSPSExt",a[a.kReserved0=14]="kReserved0"})(G||(G={}));var b,h,C=function(){},z=function(a){var i=a.data.byteLength;this.type=a.type,this.data=new Uint8Array(4+i),new DataView(this.data.buffer).setUint32(0,i),this.data.set(a.data,4)},ne=function(){function a(i){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find H264 startcode until payload end!")}return a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+3>=e.byteLength)return this.eof_flag_=!0,e.byteLength;var n=e[t+0]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],o=e[t+0]<<16|e[t+1]<<8|e[t+2];if(n===1||o===1)return t;t++}},a.prototype.readNextNaluPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_,n=31&i[e+=(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])===1?4:3],o=(128&i[e])>>>7,r=this.findNextStartCodeOffset(e);if(this.current_startcode_offset_=r,!(n>=G.kReserved0)&&o===0){var s=i.subarray(e,r);(t=new C).type=n,t.data=s}}return t},a}(),de=function(){function a(i,t,e){var n=8+i.byteLength+1+2+t.byteLength,o=!1;i[3]!==66&&i[3]!==77&&i[3]!==88&&(o=!0,n+=4);var r=this.data=new Uint8Array(n);r[0]=1,r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=255,r[5]=225;var s=i.byteLength;r[6]=s>>>8,r[7]=255&s;var u=8;r.set(i,8),r[u+=s]=1;var l=t.byteLength;r[u+1]=l>>>8,r[u+2]=255&l,r.set(t,u+3),u+=3+l,o&&(r[u]=252|e.chroma_format_idc,r[u+1]=248|e.bit_depth_luma-8,r[u+2]=248|e.bit_depth_chroma-8,r[u+3]=0,u+=4)}return a.prototype.getData=function(){return this.data},a}();(function(a){a[a.kNull=0]="kNull",a[a.kAACMain=1]="kAACMain",a[a.kAAC_LC=2]="kAAC_LC",a[a.kAAC_SSR=3]="kAAC_SSR",a[a.kAAC_LTP=4]="kAAC_LTP",a[a.kAAC_SBR=5]="kAAC_SBR",a[a.kAAC_Scalable=6]="kAAC_Scalable",a[a.kLayer1=32]="kLayer1",a[a.kLayer2=33]="kLayer2",a[a.kLayer3=34]="kLayer3"})(b||(b={})),function(a){a[a.k96000Hz=0]="k96000Hz",a[a.k88200Hz=1]="k88200Hz",a[a.k64000Hz=2]="k64000Hz",a[a.k48000Hz=3]="k48000Hz",a[a.k44100Hz=4]="k44100Hz",a[a.k32000Hz=5]="k32000Hz",a[a.k24000Hz=6]="k24000Hz",a[a.k22050Hz=7]="k22050Hz",a[a.k16000Hz=8]="k16000Hz",a[a.k12000Hz=9]="k12000Hz",a[a.k11025Hz=10]="k11025Hz",a[a.k8000Hz=11]="k8000Hz",a[a.k7350Hz=12]="k7350Hz"}(h||(h={}));var Te,ye,j=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],X=(Te=function(a,i){return(Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(a,i)},function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function t(){this.constructor=a}Te(a,i),a.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}),ie=function(){},ce=function(a){function i(){return a!==null&&a.apply(this,arguments)||this}return X(i,a),i}(ie),he=function(){function a(i){this.TAG="AACADTSParser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found ADTS syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1])>>>4===4095)return t;t++}},a.prototype.readNextAACFrame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=(8&i[e+1])>>>3,o=(6&i[e+1])>>>1,r=1&i[e+1],s=(192&i[e+2])>>>6,u=(60&i[e+2])>>>2,l=(1&i[e+2])<<2|(192&i[e+3])>>>6,m=(3&i[e+3])<<11|i[e+4]<<3|(224&i[e+5])>>>5;if(i[e+6],e+m>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var A=r===1?7:9,S=m-A;e+=A;var R=this.findNextSyncwordOffset(e+S);if(this.current_syncword_offset_=R,(n===0||n===1)&&o===0){var P=i.subarray(e,e+S);(t=new ie).audio_object_type=s+1,t.sampling_freq_index=u,t.sampling_frequency=j[u],t.channel_config=l,t.data=P}}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),ve=function(){function a(i){this.TAG="AACLOASParser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found LOAS syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+1>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<3|e[t+1]>>>5)===695)return t;t++}},a.prototype.getLATMValue=function(i){for(var t=i.readBits(2),e=0,n=0;n<=t;n++)e<<=8,e|=i.readByte();return e},a.prototype.readNextAACFrame=function(i){for(var t=this.data_,e=null;e==null&&!this.eof_flag_;){var n=this.current_syncword_offset_,o=(31&t[n+1])<<8|t[n+2];if(n+3+o>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var r=new x(t.subarray(n+3,n+3+o)),s=null;if(r.readBool()){if(i==null){f.a.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+o),r.destroy();continue}s=i}else{var u=r.readBool();if(u&&r.readBool()){f.a.e(this.TAG,"audioMuxVersionA is Not Supported"),r.destroy();break}if(u&&this.getLATMValue(r),!r.readBool()){f.a.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),r.destroy();break}if(r.readBits(6)!==0){f.a.e(this.TAG,"more than 2 numSubFrames Not Supported"),r.destroy();break}if(r.readBits(4)!==0){f.a.e(this.TAG,"more than 2 numProgram Not Supported"),r.destroy();break}if(r.readBits(3)!==0){f.a.e(this.TAG,"more than 2 numLayer Not Supported"),r.destroy();break}var l=u?this.getLATMValue(r):0,m=r.readBits(5);l-=5;var A=r.readBits(4);l-=4;var S=r.readBits(4);l-=4,r.readBits(3),(l-=3)>0&&r.readBits(l);var R=r.readBits(3);if(R!==0){f.a.e(this.TAG,"frameLengthType = ".concat(R,". Only frameLengthType = 0 Supported")),r.destroy();break}r.readByte();var P=r.readBool();if(P)if(u)this.getLATMValue(r);else{for(var H=0;;){H<<=8;var N=r.readBool();if(H+=r.readByte(),!N)break}console.log(H)}r.readBool()&&r.readByte(),(s=new ce).audio_object_type=m,s.sampling_freq_index=A,s.sampling_frequency=j[s.sampling_freq_index],s.channel_config=S,s.other_data_present=P}for(var ee=0;;){var $=r.readByte();if(ee+=$,$!==255)break}for(var Q=new Uint8Array(ee),re=0;re<ee;re++)Q[re]=r.readByte();(e=new ce).audio_object_type=s.audio_object_type,e.sampling_freq_index=s.sampling_freq_index,e.sampling_frequency=j[s.sampling_freq_index],e.channel_config=s.channel_config,e.other_data_present=s.other_data_present,e.data=Q,this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+o)}return e},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),Me=function(a){var i=null,t=a.audio_object_type,e=a.audio_object_type,n=a.sampling_freq_index,o=a.channel_config,r=0,s=navigator.userAgent.toLowerCase();s.indexOf("firefox")!==-1?n>=6?(e=5,i=new Array(4),r=n-3):(e=2,i=new Array(2),r=n):s.indexOf("android")!==-1?(e=2,i=new Array(2),r=n):(e=5,r=n,i=new Array(4),n>=6?r=n-3:o===1&&(e=2,i=new Array(2),r=n)),i[0]=e<<3,i[0]|=(15&n)>>>1,i[1]=(15&n)<<7,i[1]|=(15&o)<<3,e===5&&(i[1]|=(15&r)>>>1,i[2]=(1&r)<<7,i[2]|=8,i[3]=0),this.config=i,this.sampling_rate=j[n],this.channel_count=o,this.codec_mimetype="mp4a.40."+e,this.original_codec_mimetype="mp4a.40."+t},Ce=function(){},Ue=function(){};(function(a){a[a.kSpliceNull=0]="kSpliceNull",a[a.kSpliceSchedule=4]="kSpliceSchedule",a[a.kSpliceInsert=5]="kSpliceInsert",a[a.kTimeSignal=6]="kTimeSignal",a[a.kBandwidthReservation=7]="kBandwidthReservation",a[a.kPrivateCommand=255]="kPrivateCommand"})(ye||(ye={}));var ke,He=function(a){var i=a.readBool();return i?(a.readBits(6),{time_specified_flag:i,pts_time:4*a.readBits(31)+a.readBits(2)}):(a.readBits(7),{time_specified_flag:i})},Ye=function(a){var i=a.readBool();return a.readBits(6),{auto_return:i,duration:4*a.readBits(31)+a.readBits(2)}},Ze=function(a,i){var t=i.readBits(8);return a?{component_tag:t}:{component_tag:t,splice_time:He(i)}},et=function(a){return{component_tag:a.readBits(8),utc_splice_time:a.readBits(32)}},kt=function(a){var i=a.readBits(32),t=a.readBool();a.readBits(7);var e={splice_event_id:i,splice_event_cancel_indicator:t};if(t)return e;if(e.out_of_network_indicator=a.readBool(),e.program_splice_flag=a.readBool(),e.duration_flag=a.readBool(),a.readBits(5),e.program_splice_flag)e.utc_splice_time=a.readBits(32);else{e.component_count=a.readBits(8),e.components=[];for(var n=0;n<e.component_count;n++)e.components.push(et(a))}return e.duration_flag&&(e.break_duration=Ye(a)),e.unique_program_id=a.readBits(16),e.avail_num=a.readBits(8),e.avails_expected=a.readBits(8),e},Lt=function(a,i,t,e){return{descriptor_tag:a,descriptor_length:i,identifier:t,provider_avail_id:e.readBits(32)}},wt=function(a,i,t,e){var n=e.readBits(8),o=e.readBits(3);e.readBits(5);for(var r="",s=0;s<o;s++)r+=String.fromCharCode(e.readBits(8));return{descriptor_tag:a,descriptor_length:i,identifier:t,preroll:n,dtmf_count:o,DTMF_char:r}},Mt=function(a){var i=a.readBits(8);return a.readBits(7),{component_tag:i,pts_offset:4*a.readBits(31)+a.readBits(2)}},Ct=function(a,i,t,e){var n=e.readBits(32),o=e.readBool();e.readBits(7);var r={descriptor_tag:a,descriptor_length:i,identifier:t,segmentation_event_id:n,segmentation_event_cancel_indicator:o};if(o)return r;if(r.program_segmentation_flag=e.readBool(),r.segmentation_duration_flag=e.readBool(),r.delivery_not_restricted_flag=e.readBool(),r.delivery_not_restricted_flag?e.readBits(5):(r.web_delivery_allowed_flag=e.readBool(),r.no_regional_blackout_flag=e.readBool(),r.archive_allowed_flag=e.readBool(),r.device_restrictions=e.readBits(2)),!r.program_segmentation_flag){r.component_count=e.readBits(8),r.components=[];for(var s=0;s<r.component_count;s++)r.components.push(Mt(e))}r.segmentation_duration_flag&&(r.segmentation_duration=e.readBits(40)),r.segmentation_upid_type=e.readBits(8),r.segmentation_upid_length=e.readBits(8);var u=new Uint8Array(r.segmentation_upid_length);for(s=0;s<r.segmentation_upid_length;s++)u[s]=e.readBits(8);return r.segmentation_upid=u.buffer,r.segmentation_type_id=e.readBits(8),r.segment_num=e.readBits(8),r.segments_expected=e.readBits(8),r.segmentation_type_id!==52&&r.segmentation_type_id!==54&&r.segmentation_type_id!==56&&r.segmentation_type_id!==58||(r.sub_segment_num=e.readBits(8),r.sub_segments_expected=e.readBits(8)),r},Dt=function(a,i,t,e){return{descriptor_tag:a,descriptor_length:i,identifier:t,TAI_seconds:e.readBits(48),TAI_ns:e.readBits(32),UTC_offset:e.readBits(16)}},Ot=function(a){return{component_tag:a.readBits(8),ISO_code:String.fromCharCode(a.readBits(8),a.readBits(8),a.readBits(8)),Bit_Stream_Mode:a.readBits(3),Num_Channels:a.readBits(4),Full_Srvc_Audio:a.readBool()}},Bt=function(a,i,t,e){for(var n=e.readBits(4),o=[],r=0;r<n;r++)o.push(Ot(e));return{descriptor_tag:a,descriptor_length:i,identifier:t,audio_count:n,components:o}},It=function(a){var i=new x(a),t=i.readBits(8),e=i.readBool(),n=i.readBool();i.readBits(2);var o=i.readBits(12),r=i.readBits(8),s=i.readBool(),u=i.readBits(6),l=4*i.readBits(31)+i.readBits(2),m=i.readBits(8),A=i.readBits(12),S=i.readBits(12),R=i.readBits(8),P=null;R===ye.kSpliceNull?P={}:R===ye.kSpliceSchedule?P=function(le){for(var Se=le.readBits(8),Ae=[],ue=0;ue<Se;ue++)Ae.push(kt(le));return{splice_count:Se,events:Ae}}(i):R===ye.kSpliceInsert?P=function(le){var Se=le.readBits(32),Ae=le.readBool();le.readBits(7);var ue={splice_event_id:Se,splice_event_cancel_indicator:Ae};if(Ae)return ue;if(ue.out_of_network_indicator=le.readBool(),ue.program_splice_flag=le.readBool(),ue.duration_flag=le.readBool(),ue.splice_immediate_flag=le.readBool(),le.readBits(4),ue.program_splice_flag&&!ue.splice_immediate_flag&&(ue.splice_time=He(le)),!ue.program_splice_flag){ue.component_count=le.readBits(8),ue.components=[];for(var ge=0;ge<ue.component_count;ge++)ue.components.push(Ze(ue.splice_immediate_flag,le))}return ue.duration_flag&&(ue.break_duration=Ye(le)),ue.unique_program_id=le.readBits(16),ue.avail_num=le.readBits(8),ue.avails_expected=le.readBits(8),ue}(i):R===ye.kTimeSignal?P=function(le){return{splice_time:He(le)}}(i):R===ye.kBandwidthReservation?P={}:R===ye.kPrivateCommand?P=function(le,Se){for(var Ae=String.fromCharCode(Se.readBits(8),Se.readBits(8),Se.readBits(8),Se.readBits(8)),ue=new Uint8Array(le-4),ge=0;ge<le-4;ge++)ue[ge]=Se.readBits(8);return{identifier:Ae,private_data:ue.buffer}}(S,i):i.readBits(8*S);for(var H=[],N=i.readBits(16),ee=0;ee<N;){var $=i.readBits(8),Q=i.readBits(8),re=String.fromCharCode(i.readBits(8),i.readBits(8),i.readBits(8),i.readBits(8));$===0?H.push(Lt($,Q,re,i)):$===1?H.push(wt($,Q,re,i)):$===2?H.push(Ct($,Q,re,i)):$===3?H.push(Dt($,Q,re,i)):$===4?H.push(Bt($,Q,re,i)):i.readBits(8*(Q-4)),ee+=2+Q}var fe={table_id:t,section_syntax_indicator:e,private_indicator:n,section_length:o,protocol_version:r,encrypted_packet:s,encryption_algorithm:u,pts_adjustment:l,cw_index:m,tier:A,splice_command_length:S,splice_command_type:R,splice_command:P,descriptor_loop_length:N,splice_descriptors:H,E_CRC32:s?i.readBits(32):void 0,CRC32:i.readBits(32)};if(R===ye.kSpliceInsert){var Z=P;if(Z.splice_event_cancel_indicator)return{splice_command_type:R,detail:fe,data:a};if(Z.program_splice_flag&&!Z.splice_immediate_flag){var ae=Z.duration_flag?Z.break_duration.auto_return:void 0,pe=Z.duration_flag?Z.break_duration.duration/90:void 0;return Z.splice_time.time_specified_flag?{splice_command_type:R,pts:(l+Z.splice_time.pts_time)%Math.pow(2,33),auto_return:ae,duraiton:pe,detail:fe,data:a}:{splice_command_type:R,auto_return:ae,duraiton:pe,detail:fe,data:a}}return{splice_command_type:R,auto_return:ae=Z.duration_flag?Z.break_duration.auto_return:void 0,duraiton:pe=Z.duration_flag?Z.break_duration.duration/90:void 0,detail:fe,data:a}}if(R===ye.kTimeSignal){var oe=P;return oe.splice_time.time_specified_flag?{splice_command_type:R,pts:(l+oe.splice_time.pts_time)%Math.pow(2,33),detail:fe,data:a}:{splice_command_type:R,detail:fe,data:a}}return{splice_command_type:R,detail:fe,data:a}};(function(a){a[a.kSliceIDR_W_RADL=19]="kSliceIDR_W_RADL",a[a.kSliceIDR_N_LP=20]="kSliceIDR_N_LP",a[a.kSliceCRA_NUT=21]="kSliceCRA_NUT",a[a.kSliceVPS=32]="kSliceVPS",a[a.kSliceSPS=33]="kSliceSPS",a[a.kSlicePPS=34]="kSlicePPS",a[a.kSliceAUD=35]="kSliceAUD"})(ke||(ke={}));var Pt=function(){},xt=function(a){var i=a.data.byteLength;this.type=a.type,this.data=new Uint8Array(4+i),new DataView(this.data.buffer).setUint32(0,i),this.data.set(a.data,4)},Ut=function(){function a(i){this.TAG="H265AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find H265 startcode until payload end!")}return a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+3>=e.byteLength)return this.eof_flag_=!0,e.byteLength;var n=e[t+0]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],o=e[t+0]<<16|e[t+1]<<8|e[t+2];if(n===1||o===1)return t;t++}},a.prototype.readNextNaluPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_,n=i[e+=(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])===1?4:3]>>1&63,o=(128&i[e])>>>7,r=this.findNextStartCodeOffset(e);if(this.current_startcode_offset_=r,o===0){var s=i.subarray(e,r);(t=new Pt).type=n,t.data=s}}return t},a}(),Nt=function(){function a(i,t,e,n){var o=23+(5+i.byteLength)+(5+t.byteLength)+(5+e.byteLength),r=this.data=new Uint8Array(o);r[0]=1,r[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,r[2]=n.general_profile_compatibility_flags_1,r[3]=n.general_profile_compatibility_flags_2,r[4]=n.general_profile_compatibility_flags_3,r[5]=n.general_profile_compatibility_flags_4,r[6]=n.general_constraint_indicator_flags_1,r[7]=n.general_constraint_indicator_flags_2,r[8]=n.general_constraint_indicator_flags_3,r[9]=n.general_constraint_indicator_flags_4,r[10]=n.general_constraint_indicator_flags_5,r[11]=n.general_constraint_indicator_flags_6,r[12]=n.general_level_idc,r[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,r[14]=255&n.min_spatial_segmentation_idc,r[15]=252|3&n.parallelismType,r[16]=252|3&n.chroma_format_idc,r[17]=248|7&n.bit_depth_luma_minus8,r[18]=248|7&n.bit_depth_chroma_minus8,r[19]=0,r[20]=0,r[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,r[22]=3,r[23]=128|ke.kSliceVPS,r[24]=0,r[25]=1,r[26]=(65280&i.byteLength)>>8,r[27]=(255&i.byteLength)>>0,r.set(i,28),r[23+(5+i.byteLength)+0]=128|ke.kSliceSPS,r[23+(5+i.byteLength)+1]=0,r[23+(5+i.byteLength)+2]=1,r[23+(5+i.byteLength)+3]=(65280&t.byteLength)>>8,r[23+(5+i.byteLength)+4]=(255&t.byteLength)>>0,r.set(t,23+(5+i.byteLength)+5),r[23+(5+i.byteLength+5+t.byteLength)+0]=128|ke.kSlicePPS,r[23+(5+i.byteLength+5+t.byteLength)+1]=0,r[23+(5+i.byteLength+5+t.byteLength)+2]=1,r[23+(5+i.byteLength+5+t.byteLength)+3]=(65280&e.byteLength)>>8,r[23+(5+i.byteLength+5+t.byteLength)+4]=(255&e.byteLength)>>0,r.set(e,23+(5+i.byteLength+5+t.byteLength)+5)}return a.prototype.getData=function(){return this.data},a}(),Vt=function(){},Ft=function(){},Gt=function(){},jt=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],zt=function(){function a(i){this.TAG="AC3Parser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found AC3 syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1]<<0)===2935)return t;t++}},a.prototype.readNextAC3Frame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=i[e+4]>>6,o=[48e3,44200,33e3][n],r=63&i[e+4],s=2*jt[n][r];if(isNaN(s)||e+s>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var u=this.findNextSyncwordOffset(e+s);this.current_syncword_offset_=u;var l=i[e+5]>>3,m=7&i[e+5],A=i[e+6]>>5,S=0;1&A&&A!==1&&(S+=2),4&A&&(S+=2),A===2&&(S+=2);var R=(i[e+6]<<8|i[e+7]<<0)>>12-S&1,P=[2,1,2,3,3,4,4,5][A]+R;(t=new Gt).sampling_frequency=o,t.channel_count=P,t.channel_mode=A,t.bit_stream_identification=l,t.low_frequency_effects_channel_on=R,t.bit_stream_mode=m,t.frame_size_code=r,t.data=i.subarray(e,e+s)}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),Ht=function(a){var i;i=[a.sampling_rate_code<<6|a.bit_stream_identification<<1|a.bit_stream_mode>>2,(3&a.bit_stream_mode)<<6|a.channel_mode<<3|a.low_frequency_effects_channel_on<<2|a.frame_size_code>>4,a.frame_size_code<<4&224],this.config=i,this.sampling_rate=a.sampling_frequency,this.bit_stream_identification=a.bit_stream_identification,this.bit_stream_mode=a.bit_stream_mode,this.low_frequency_effects_channel_on=a.low_frequency_effects_channel_on,this.channel_count=a.channel_count,this.channel_mode=a.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},qt=function(){},Kt=function(){function a(i){this.TAG="EAC3Parser",this.data_=i,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not found AC3 syncword until payload end")}return a.prototype.findNextSyncwordOffset=function(i){for(var t=i,e=this.data_;;){if(t+7>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<8|e[t+1]<<0)===2935)return t;t++}},a.prototype.readNextEAC3Frame=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_syncword_offset_,n=new x(i.subarray(e+2)),o=(n.readBits(2),n.readBits(3),n.readBits(11)+1<<1),r=n.readBits(2),s=null,u=null;r===3?(s=[24e3,22060,16e3][r=n.readBits(2)],u=3):(s=[48e3,44100,32e3][r],u=n.readBits(2));var l=n.readBits(3),m=n.readBits(1),A=n.readBits(5);if(e+o>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var S=this.findNextSyncwordOffset(e+o);this.current_syncword_offset_=S;var R=[2,1,2,3,3,4,4,5][l]+m;n.destroy(),(t=new qt).sampling_frequency=s,t.channel_count=R,t.channel_mode=l,t.bit_stream_identification=A,t.low_frequency_effects_channel_on=m,t.frame_size=o,t.num_blks=[1,2,3,6][u],t.data=i.subarray(e,e+o)}return t},a.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},a.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},a}(),Wt=function(a){var i,t=Math.floor(a.frame_size*a.sampling_frequency/(16*a.num_blks));i=[255&t,248&t,a.sampling_rate_code<<6|a.bit_stream_identification<<1|0,0|a.channel_mode<<1|a.low_frequency_effects_channel_on<<0,0],this.config=i,this.sampling_rate=a.sampling_frequency,this.bit_stream_identification=a.bit_stream_identification,this.num_blks=a.num_blks,this.low_frequency_effects_channel_on=a.low_frequency_effects_channel_on,this.channel_count=a.channel_count,this.channel_mode=a.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"},Yt=function(){},Xt=function(){function a(i){this.TAG="AV1OBUInMpegTsParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=i,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&f.a.e(this.TAG,"Could not find AV1 startcode until payload end!")}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),o=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[o]=t[r],o++);return new Uint8Array(n.buffer,0,o)},a.prototype.findNextStartCodeOffset=function(i){for(var t=i,e=this.data_;;){if(t+2>=e.byteLength)return this.eof_flag_=!0,e.byteLength;if((e[t+0]<<16|e[t+1]<<8|e[t+2])===1)return t;t++}},a.prototype.readNextOBUPayload=function(){for(var i=this.data_,t=null;t==null&&!this.eof_flag_;){var e=this.current_startcode_offset_+3,n=this.findNextStartCodeOffset(e);this.current_startcode_offset_=n,t=a._ebsp2rbsp(i.subarray(e,n))}return t},a}(),Qt=function(){var a=function(i,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])})(i,t)};return function(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=i}a(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),je=function(){return(je=Object.assign||function(a){for(var i,t=1,e=arguments.length;t<e;t++)for(var n in i=arguments[t])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a}).apply(this,arguments)},st=function(a){function i(t,e){var n=a.call(this)||this;return n.TAG="TSDemuxer",n.first_parse_=!0,n.media_info_=new v.a,n.timescale_=90,n.duration_=0,n.current_pmt_pid_=-1,n.program_pmt_map_={},n.pes_slice_queues_={},n.section_slice_queues_={},n.video_metadata_={vps:void 0,sps:void 0,pps:void 0,av1c:void 0,details:void 0},n.audio_metadata_={codec:void 0,audio_object_type:void 0,sampling_freq_index:void 0,sampling_frequency:void 0,channel_config:void 0},n.last_pcr_base_=NaN,n.timestamp_offset_=0,n.audio_last_sample_pts_=void 0,n.aac_last_incomplete_data_=null,n.has_video_=!1,n.has_audio_=!1,n.video_init_segment_dispatched_=!1,n.audio_init_segment_dispatched_=!1,n.video_metadata_changed_=!1,n.audio_metadata_changed_=!1,n.loas_previous_frame=null,n.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},n.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},n.ts_packet_size_=t.ts_packet_size,n.sync_offset_=t.sync_offset,n.config_=e,n}return Qt(i,a),i.prototype.destroy=function(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,a.prototype.destroy.call(this)},i.probe=function(t){var e=new Uint8Array(t),n=-1,o=188;if(e.byteLength<=3*o)return{needMoreData:!0};for(;n===-1;){for(var r=Math.min(1e3,e.byteLength-3*o),s=0;s<r;){if(e[s]===71&&e[s+o]===71&&e[s+2*o]===71){n=s;break}s++}if(n===-1)if(o===188)o=192;else{if(o!==192)break;o=204}}return n===-1?{match:!1}:(o===192&&n>=4?(f.a.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),n-=4):o===204&&f.a.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:o,sync_offset:n})},i.prototype.bindDataSource=function(t){return t.onDataArrival=this.parseChunks.bind(this),this},i.prototype.resetMediaInfo=function(){this.media_info_=new v.a},i.prototype.parseChunks=function(t,e){if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new L.a("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0;for(this.first_parse_&&(this.first_parse_=!1,n=this.sync_offset_);n+this.ts_packet_size_<=t.byteLength;){var o=e+n;this.ts_packet_size_===192&&(n+=4);var r=new Uint8Array(t,n,188),s=r[0];if(s!==71){f.a.e(this.TAG,"sync_byte = ".concat(s,", not 0x47"));break}var u=(64&r[1])>>>6,l=(r[1],(31&r[1])<<8|r[2]),m=(48&r[3])>>>4,A=15&r[3],S=!(!this.pmt_||this.pmt_.pcr_pid!==l),R={},P=4;if(m==2||m==3){var H=r[4];if(H>0&&(S||m==3)&&(R.discontinuity_indicator=(128&r[5])>>>7,R.random_access_indicator=(64&r[5])>>>6,R.elementary_stream_priority_indicator=(32&r[5])>>>5,(16&r[5])>>>4)){var N=300*this.getPcrBase(r)+((1&r[10])<<8|r[11]);this.last_pcr_=N}if(m==2||5+H===188){n+=188,this.ts_packet_size_===204&&(n+=16);continue}P=5+H}if(m==1||m==3){if(l===0||l===this.current_pmt_pid_||this.pmt_!=null&&this.pmt_.pid_stream_type[l]===d.kSCTE35){var ee=188-P;this.handleSectionSlice(t,n+P,ee,{pid:l,file_position:o,payload_unit_start_indicator:u,continuity_conunter:A,random_access_indicator:R.random_access_indicator})}else if(this.pmt_!=null&&this.pmt_.pid_stream_type[l]!=null){ee=188-P;var $=this.pmt_.pid_stream_type[l];l!==this.pmt_.common_pids.h264&&l!==this.pmt_.common_pids.h265&&l!==this.pmt_.common_pids.av1&&l!==this.pmt_.common_pids.adts_aac&&l!==this.pmt_.common_pids.loas_aac&&l!==this.pmt_.common_pids.ac3&&l!==this.pmt_.common_pids.eac3&&l!==this.pmt_.common_pids.opus&&l!==this.pmt_.common_pids.mp3&&this.pmt_.pes_private_data_pids[l]!==!0&&this.pmt_.timed_id3_pids[l]!==!0&&this.pmt_.synchronous_klv_pids[l]!==!0&&this.pmt_.asynchronous_klv_pids[l]!==!0||this.handlePESSlice(t,n+P,ee,{pid:l,stream_type:$,file_position:o,payload_unit_start_indicator:u,continuity_conunter:A,random_access_indicator:R.random_access_indicator})}}n+=188,this.ts_packet_size_===204&&(n+=16)}return this.dispatchAudioVideoMediaSegment(),n},i.prototype.handleSectionSlice=function(t,e,n,o){var r=new Uint8Array(t,e,n),s=this.section_slice_queues_[o.pid];if(o.payload_unit_start_indicator){var u=r[0];if(s!=null&&s.total_length!==0){var l=new Uint8Array(t,e+1,Math.min(n,u));s.slices.push(l),s.total_length+=l.byteLength,s.total_length===s.expected_length?this.emitSectionSlices(s,o):this.clearSlices(s,o)}for(var m=1+u;m<r.byteLength&&r[m+0]!==255;){var A=(15&r[m+1])<<8|r[m+2];this.section_slice_queues_[o.pid]=new _e,(s=this.section_slice_queues_[o.pid]).expected_length=A+3,s.file_position=o.file_position,s.random_access_indicator=o.random_access_indicator,l=new Uint8Array(t,e+m,Math.min(n-m,s.expected_length-s.total_length)),s.slices.push(l),s.total_length+=l.byteLength,s.total_length===s.expected_length?this.emitSectionSlices(s,o):s.total_length>=s.expected_length&&this.clearSlices(s,o),m+=l.byteLength}}else s!=null&&s.total_length!==0&&(l=new Uint8Array(t,e,Math.min(n,s.expected_length-s.total_length)),s.slices.push(l),s.total_length+=l.byteLength,s.total_length===s.expected_length?this.emitSectionSlices(s,o):s.total_length>=s.expected_length&&this.clearSlices(s,o))},i.prototype.handlePESSlice=function(t,e,n,o){var r=new Uint8Array(t,e,n),s=r[0]<<16|r[1]<<8|r[2],u=(r[3],r[4]<<8|r[5]);if(o.payload_unit_start_indicator){if(s!==1)return void f.a.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value ".concat(s));var l=this.pes_slice_queues_[o.pid];l&&(l.expected_length===0||l.expected_length===l.total_length?this.emitPESSlices(l,o):this.clearSlices(l,o)),this.pes_slice_queues_[o.pid]=new _e,this.pes_slice_queues_[o.pid].file_position=o.file_position,this.pes_slice_queues_[o.pid].random_access_indicator=o.random_access_indicator}if(this.pes_slice_queues_[o.pid]!=null){var m=this.pes_slice_queues_[o.pid];m.slices.push(r),o.payload_unit_start_indicator&&(m.expected_length=u===0?0:u+6),m.total_length+=r.byteLength,m.expected_length>0&&m.expected_length===m.total_length?this.emitPESSlices(m,o):m.expected_length>0&&m.expected_length<m.total_length&&this.clearSlices(m,o)}},i.prototype.emitSectionSlices=function(t,e){for(var n=new Uint8Array(t.total_length),o=0,r=0;o<t.slices.length;o++){var s=t.slices[o];n.set(s,r),r+=s.byteLength}t.slices=[],t.expected_length=-1,t.total_length=0;var u=new Ee;u.pid=e.pid,u.data=n,u.file_position=t.file_position,u.random_access_indicator=t.random_access_indicator,this.parseSection(u)},i.prototype.emitPESSlices=function(t,e){for(var n=new Uint8Array(t.total_length),o=0,r=0;o<t.slices.length;o++){var s=t.slices[o];n.set(s,r),r+=s.byteLength}t.slices=[],t.expected_length=-1,t.total_length=0;var u=new se;u.pid=e.pid,u.data=n,u.stream_type=e.stream_type,u.file_position=t.file_position,u.random_access_indicator=t.random_access_indicator,this.parsePES(u)},i.prototype.clearSlices=function(t,e){t.slices=[],t.expected_length=-1,t.total_length=0},i.prototype.parseSection=function(t){var e=t.data,n=t.pid;n===0?this.parsePAT(e):n===this.current_pmt_pid_?this.parsePMT(e):this.pmt_!=null&&this.pmt_.scte_35_pids[n]&&this.parseSCTE35(e)},i.prototype.parsePES=function(t){var e=t.data,n=e[0]<<16|e[1]<<8|e[2],o=e[3],r=e[4]<<8|e[5];if(n===1)if(o!==188&&o!==190&&o!==191&&o!==240&&o!==241&&o!==255&&o!==242&&o!==248){e[6];var s=(192&e[7])>>>6,u=e[8],l=void 0,m=void 0;s!==2&&s!==3||(l=this.getTimestamp(e,9),m=s===3?this.getTimestamp(e,14):l);var A=9+u,S=void 0;if(r!==0){if(r<3+u)return void f.a.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");S=r-3-u}else S=e.byteLength-A;var R=e.subarray(A,A+S);switch(t.stream_type){case d.kMPEG1Audio:case d.kMPEG2Audio:this.parseMP3Payload(R,l);break;case d.kPESPrivateData:this.pmt_.common_pids.av1===t.pid?this.parseAV1Payload(R,l,m,t.file_position,t.random_access_indicator):this.pmt_.common_pids.opus===t.pid?this.parseOpusPayload(R,l):this.pmt_.common_pids.ac3===t.pid?this.parseAC3Payload(R,l):this.pmt_.common_pids.eac3===t.pid?this.parseEAC3Payload(R,l):this.pmt_.asynchronous_klv_pids[t.pid]?this.parseAsynchronousKLVMetadataPayload(R,t.pid,o):this.pmt_.smpte2038_pids[t.pid]?this.parseSMPTE2038MetadataPayload(R,l,m,t.pid,o):this.parsePESPrivateDataPayload(R,l,m,t.pid,o);break;case d.kADTSAAC:this.parseADTSAACPayload(R,l);break;case d.kLOASAAC:this.parseLOASAACPayload(R,l);break;case d.kAC3:this.parseAC3Payload(R,l);break;case d.kEAC3:this.parseEAC3Payload(R,l);break;case d.kMetadata:this.pmt_.timed_id3_pids[t.pid]?this.parseTimedID3MetadataPayload(R,l,m,t.pid,o):this.pmt_.synchronous_klv_pids[t.pid]&&this.parseSynchronousKLVMetadataPayload(R,l,m,t.pid,o);break;case d.kH264:this.parseH264Payload(R,l,m,t.file_position,t.random_access_indicator);break;case d.kH265:this.parseH265Payload(R,l,m,t.file_position,t.random_access_indicator)}}else(o===188||o===191||o===240||o===241||o===255||o===242||o===248)&&t.stream_type===d.kPESPrivateData&&(A=6,S=void 0,S=r!==0?r:e.byteLength-A,R=e.subarray(A,A+S),this.parsePESPrivateDataPayload(R,void 0,void 0,t.pid,o));else f.a.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value ".concat(n))},i.prototype.parsePAT=function(t){var e=t[0];if(e===0){var n=(15&t[1])<<8|t[2],o=(t[3],t[4],(62&t[5])>>>1),r=1&t[5],s=t[6],u=(t[7],null);if(r===1&&s===0)(u=new J).version_number=o;else if((u=this.pat_)==null)return;for(var l=n-5-4,m=-1,A=-1,S=8;S<8+l;S+=4){var R=t[S]<<8|t[S+1],P=(31&t[S+2])<<8|t[S+3];R===0?u.network_pid=P:(u.program_pmt_pid[R]=P,m===-1&&(m=R),A===-1&&(A=P))}r===1&&s===0&&(this.pat_==null&&f.a.v(this.TAG,"Parsed first PAT: ".concat(JSON.stringify(u))),this.pat_=u,this.current_program_=m,this.current_pmt_pid_=A)}else f.a.e(this.TAG,"parsePAT: table_id ".concat(e," is not corresponded to PAT!"))},i.prototype.parsePMT=function(t){var e=t[0];if(e===2){var n=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],r=(62&t[5])>>>1,s=1&t[5],u=t[6],l=(t[7],null);if(s===1&&u===0)(l=new Y).program_number=o,l.version_number=r,this.program_pmt_map_[o]=l;else if((l=this.program_pmt_map_[o])==null)return;l.pcr_pid=(31&t[8])<<8|t[9];for(var m=(15&t[10])<<8|t[11],A=12+m,S=n-9-m-4,R=A;R<A+S;){var P=t[R],H=(31&t[R+1])<<8|t[R+2],N=(15&t[R+3])<<8|t[R+4];l.pid_stream_type[H]=P;var ee=l.common_pids.h264||l.common_pids.h265,$=l.common_pids.adts_aac||l.common_pids.loas_aac||l.common_pids.ac3||l.common_pids.eac3||l.common_pids.opus||l.common_pids.mp3;if(P!==d.kH264||ee)if(P!==d.kH265||ee)if(P!==d.kADTSAAC||$)if(P!==d.kLOASAAC||$)if(P!==d.kAC3||$)if(P!==d.kEAC3||$)if(P!==d.kMPEG1Audio&&P!==d.kMPEG2Audio||$)if(P===d.kPESPrivateData){if(l.pes_private_data_pids[H]=!0,N>0){for(var Q=R+5;Q<R+5+N;){var re=t[Q+0],fe=t[Q+1];if(re===5){var Z=String.fromCharCode.apply(String,Array.from(t.subarray(Q+2,Q+2+fe)));Z==="VANC"?l.smpte2038_pids[H]=!0:Z==="AV01"?l.common_pids.av1=H:Z==="Opus"?l.common_pids.opus=H:Z==="KLVA"&&(l.asynchronous_klv_pids[H]=!0)}else if(re===127){if(H===l.common_pids.opus){var ae=null;if(t[Q+2]===128&&(ae=t[Q+3]),ae==null){f.a.e(this.TAG,"Not Supported Opus channel count.");continue}var pe={codec:"opus",channel_count:15&ae?15&ae:2,channel_config_code:ae,sample_rate:48e3},oe={codec:"opus",meta:pe};this.audio_init_segment_dispatched_==0?(this.audio_metadata_=pe,this.dispatchAudioInitSegment(oe)):this.detectAudioMetadataChange(oe)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(oe))}}else re===128&&H===l.common_pids.av1&&(this.video_metadata_.av1c=t.subarray(Q+2,Q+2+fe));Q+=2+fe}var le=t.subarray(R+5,R+5+N);this.dispatchPESPrivateDataDescriptor(H,P,le)}}else if(P===d.kMetadata){if(N>0)for(Q=R+5;Q<R+5+N;){re=t[Q+0];var Se=t[Q+1];if(re===38){var Ae=t[Q+2]<<8|t[Q+3]<<0,ue=null;Ae===65535&&(ue=String.fromCharCode.apply(String,Array.from(t.subarray(Q+4,Q+4+4))));var ge=null;if(t[Q+4+(Ae===65535?4:0)]===255){var Re=4+(Ae===65535?4:0)+1;ge=String.fromCharCode.apply(String,Array.from(t.subarray(Q+Re,Q+Re+4)))}ue==="ID3 "&&ge==="ID3 "?l.timed_id3_pids[H]=!0:ge==="KLVA"&&(l.synchronous_klv_pids[H]=!0)}Q+=2+Se}}else P===d.kSCTE35&&(l.scte_35_pids[H]=!0);else l.common_pids.mp3=H;else l.common_pids.eac3=H;else l.common_pids.ac3=H;else l.common_pids.loas_aac=H;else l.common_pids.adts_aac=H;else l.common_pids.h265=H;else l.common_pids.h264=H;R+=5+N}o===this.current_program_&&(this.pmt_==null&&f.a.v(this.TAG,"Parsed first PMT: ".concat(JSON.stringify(l))),this.pmt_=l,(l.common_pids.h264||l.common_pids.h265||l.common_pids.av1)&&(this.has_video_=!0),(l.common_pids.adts_aac||l.common_pids.loas_aac||l.common_pids.ac3||l.common_pids.opus||l.common_pids.mp3)&&(this.has_audio_=!0))}else f.a.e(this.TAG,"parsePMT: table_id ".concat(e," is not corresponded to PMT!"))},i.prototype.parseSCTE35=function(t){var e=It(t);if(e.pts!=null){var n=Math.floor(e.pts/this.timescale_);e.pts=n}else e.nearest_pts=this.getNearestTimestampMilliseconds();this.onSCTE35Metadata&&this.onSCTE35Metadata(e)},i.prototype.parseAV1Payload=function(t,e,n,o,r){for(var s=new Xt(t),u=null,l=[],m=0,A=!1,S=null;(u=s.readNextOBUPayload())!=null;){if((S=_.parseOBUs(u,this.video_metadata_.details))&&S.keyframe===!0)if(this.video_init_segment_dispatched_){if(this.detectVideoMetadataChange(null,S)===!0){var R;this.video_metadata_changed_=!0,this.dispatchVideoMediaSegment(),(R=new Uint8Array(new ArrayBuffer(this.video_metadata_.av1c.byteLength+S.sequence_header_data.byteLength))).set(this.video_metadata_.av1c,0),R.set(S.sequence_header_data,this.video_metadata_.av1c.byteLength),S.av1c=R,this.dispatchVideoInitSegment()}}else(R=new Uint8Array(new ArrayBuffer(this.video_metadata_.av1c.byteLength+S.sequence_header_data.byteLength))).set(this.video_metadata_.av1c,0),R.set(S.sequence_header_data,this.video_metadata_.av1c.byteLength),S.av1c=R,this.video_metadata_.details=S,this.dispatchVideoInitSegment();this.video_metadata_.details=S,A||(A=S.keyframe),l.push({data:u}),m+=u.byteLength}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(l.length){var N=this.video_track_,ee={units:l,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:o};N.samples.push(ee),N.length+=m}},i.prototype.parseH264Payload=function(t,e,n,o,r){for(var s=new ne(t),u=null,l=[],m=0,A=!1;(u=s.readNextNaluPayload())!=null;){var S=new z(u);if(S.type===G.kSliceSPS){var R=U.parseSPS(u.data);this.video_init_segment_dispatched_?this.detectVideoMetadataChange(S,R)===!0&&(f.a.v(this.TAG,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:S,pps:void 0,av1c:void 0,details:R}):(this.video_metadata_.sps=S,this.video_metadata_.details=R)}else S.type===G.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=S,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(S.type===G.kSliceIDR||S.type===G.kSliceNonIDR&&r===1)&&(A=!0);this.video_init_segment_dispatched_&&(l.push(S),m+=S.data.byteLength)}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(l.length){var N=this.video_track_,ee={units:l,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:o};N.samples.push(ee),N.length+=m}},i.prototype.parseH265Payload=function(t,e,n,o,r){for(var s=new Ut(t),u=null,l=[],m=0,A=!1;(u=s.readNextNaluPayload())!=null;){var S=new xt(u);if(S.type===ke.kSliceVPS){if(!this.video_init_segment_dispatched_){var R=K.parseVPS(u.data);this.video_metadata_.vps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R)}}else S.type===ke.kSliceSPS?(R=K.parseSPS(u.data),this.video_init_segment_dispatched_?this.detectVideoMetadataChange(S,R)===!0&&(f.a.v(this.TAG,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:S,pps:void 0,av1c:void 0,details:R}):(this.video_metadata_.sps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R))):S.type===ke.kSlicePPS?(!this.video_init_segment_dispatched_||this.video_metadata_changed_)&&(R=K.parsePPS(u.data),this.video_metadata_.pps=S,this.video_metadata_.details=je(je({},this.video_metadata_.details),R),this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):S.type!==ke.kSliceIDR_W_RADL&&S.type!==ke.kSliceIDR_N_LP&&S.type!==ke.kSliceCRA_NUT||(A=!0);this.video_init_segment_dispatched_&&(l.push(S),m+=S.data.byteLength)}var P=Math.floor(e/this.timescale_),H=Math.floor(n/this.timescale_);if(l.length){var N=this.video_track_,ee={units:l,length:m,isKeyframe:A,dts:H,pts:P,cts:P-H,file_position:o};N.samples.push(ee),N.length+=m}},i.prototype.detectVideoMetadataChange=function(t,e){if(e.codec_mimetype!==this.video_metadata_.details.codec_mimetype)return f.a.v(this.TAG,"Video: Codec mimeType changed from "+"".concat(this.video_metadata_.details.codec_mimetype," to ").concat(e.codec_mimetype)),!0;if(e.codec_size.width!==this.video_metadata_.details.codec_size.width||e.codec_size.height!==this.video_metadata_.details.codec_size.height){var n=this.video_metadata_.details.codec_size,o=e.codec_size;return f.a.v(this.TAG,"Video: Coded Resolution changed from "+"".concat(n.width,"x").concat(n.height," to ").concat(o.width,"x").concat(o.height)),!0}return e.present_size.width!==this.video_metadata_.details.present_size.width&&(f.a.v(this.TAG,"Video: Present resolution width changed from "+"".concat(this.video_metadata_.details.present_size.width," to ").concat(e.present_size.width)),!0)},i.prototype.isInitSegmentDispatched=function(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_},i.prototype.dispatchVideoInitSegment=function(){var t=this.video_metadata_.details,e={type:"video"};e.id=this.video_track_.id,e.timescale=1e3,e.duration=this.duration_,e.codecWidth=t.codec_size.width,e.codecHeight=t.codec_size.height,e.presentWidth=t.present_size.width,e.presentHeight=t.present_size.height,e.profile=t.profile_string,e.level=t.level_string,e.bitDepth=t.bit_depth,e.chromaFormat=t.chroma_format,e.sarRatio=t.sar_ratio,e.frameRate=t.frame_rate;var n=e.frameRate.fps_den,o=e.frameRate.fps_num;if(e.refSampleDuration=n/o*1e3,e.codec=t.codec_mimetype,this.video_metadata_.av1c)e.av1c=this.video_metadata_.av1c,this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AV1 for mimeType: ".concat(e.codec));else if(this.video_metadata_.vps){var r=this.video_metadata_.vps.data.subarray(4),s=this.video_metadata_.sps.data.subarray(4),u=this.video_metadata_.pps.data.subarray(4),l=new Nt(r,s,u,t);e.hvcc=l.getData(),this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first HEVCDecoderConfigurationRecord for mimeType: ".concat(e.codec))}else{s=this.video_metadata_.sps.data.subarray(4),u=this.video_metadata_.pps.data.subarray(4);var m=new de(s,u,t);e.avcc=m.getData(),this.video_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AVCDecoderConfigurationRecord for mimeType: ".concat(e.codec))}this.onTrackMetadata("video",e),this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var A=this.media_info_;A.hasVideo=!0,A.width=e.codecWidth,A.height=e.codecHeight,A.fps=e.frameRate.fps,A.profile=e.profile,A.level=e.level,A.refFrames=t.ref_frames,A.chromaFormat=t.chroma_format_string,A.sarNum=e.sarRatio.width,A.sarDen=e.sarRatio.height,A.videoCodec=e.codec,A.hasAudio&&A.audioCodec?A.mimeType='video/mp2t; codecs="'.concat(A.videoCodec,",").concat(A.audioCodec,'"'):A.mimeType='video/mp2t; codecs="'.concat(A.videoCodec,'"'),A.isComplete()&&this.onMediaInfo(A)},i.prototype.dispatchVideoMediaSegment=function(){this.isInitSegmentDispatched()&&this.video_track_.length&&this.onDataAvailable(null,this.video_track_)},i.prototype.dispatchAudioMediaSegment=function(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this.onDataAvailable(this.audio_track_,null)},i.prototype.dispatchAudioVideoMediaSegment=function(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this.onDataAvailable(this.audio_track_,this.video_track_)},i.prototype.parseADTSAACPayload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var n=new Uint8Array(t.byteLength+this.aac_last_incomplete_data_.byteLength);n.set(this.aac_last_incomplete_data_,0),n.set(t,this.aac_last_incomplete_data_.byteLength),t=n}var o,r;if(e!=null&&(r=e/this.timescale_),this.audio_metadata_.codec==="aac"){if(e==null&&this.audio_last_sample_pts_!=null)o=1024/this.audio_metadata_.sampling_frequency*1e3,r=this.audio_last_sample_pts_+o;else if(e==null)return void f.a.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){o=1024/this.audio_metadata_.sampling_frequency*1e3;var s=this.audio_last_sample_pts_+o;Math.abs(s-r)>1&&(f.a.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(s,"ms, PES pts: ").concat(r,"ms")),r=s)}}for(var u,l=new he(t),m=null,A=r;(m=l.readNextAACFrame())!=null;){o=1024/m.sampling_frequency*1e3;var S={codec:"aac",data:m};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"aac",audio_object_type:m.audio_object_type,sampling_freq_index:m.sampling_freq_index,sampling_frequency:m.sampling_frequency,channel_config:m.channel_config},this.dispatchAudioInitSegment(S)):this.detectAudioMetadataChange(S)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(S)),u=A;var R=Math.floor(A),P={unit:m.data,length:m.data.byteLength,pts:R,dts:R};this.audio_track_.samples.push(P),this.audio_track_.length+=m.data.byteLength,A+=o}l.hasIncompleteData()&&(this.aac_last_incomplete_data_=l.getIncompleteData()),u&&(this.audio_last_sample_pts_=u)}},i.prototype.parseLOASAACPayload=function(t,e){var n;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var o=new Uint8Array(t.byteLength+this.aac_last_incomplete_data_.byteLength);o.set(this.aac_last_incomplete_data_,0),o.set(t,this.aac_last_incomplete_data_.byteLength),t=o}var r,s;if(e!=null&&(s=e/this.timescale_),this.audio_metadata_.codec==="aac"){if(e==null&&this.audio_last_sample_pts_!=null)r=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+r;else if(e==null)return void f.a.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){r=1024/this.audio_metadata_.sampling_frequency*1e3;var u=this.audio_last_sample_pts_+r;Math.abs(u-s)>1&&(f.a.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(u,"ms, PES pts: ").concat(s,"ms")),s=u)}}for(var l,m=new ve(t),A=null,S=s;(A=m.readNextAACFrame((n=this.loas_previous_frame)!==null&&n!==void 0?n:void 0))!=null;){this.loas_previous_frame=A,r=1024/A.sampling_frequency*1e3;var R={codec:"aac",data:A};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"aac",audio_object_type:A.audio_object_type,sampling_freq_index:A.sampling_freq_index,sampling_frequency:A.sampling_frequency,channel_config:A.channel_config},this.dispatchAudioInitSegment(R)):this.detectAudioMetadataChange(R)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(R)),l=S;var P=Math.floor(S),H={unit:A.data,length:A.data.byteLength,pts:P,dts:P};this.audio_track_.samples.push(H),this.audio_track_.length+=A.data.byteLength,S+=r}m.hasIncompleteData()&&(this.aac_last_incomplete_data_=m.getIncompleteData()),l&&(this.audio_last_sample_pts_=l)}},i.prototype.parseAC3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,o;if(e!=null&&(o=e/this.timescale_),this.audio_metadata_.codec==="ac-3"){if(e==null&&this.audio_last_sample_pts_!=null)n=1536/this.audio_metadata_.sampling_frequency*1e3,o=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"AC3: Unknown pts")}for(var r,s=new zt(t),u=null,l=o;(u=s.readNextAC3Frame())!=null;){n=1536/u.sampling_frequency*1e3;var m={codec:"ac-3",data:u};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"ac-3",sampling_frequency:u.sampling_frequency,bit_stream_identification:u.bit_stream_identification,bit_stream_mode:u.bit_stream_mode,low_frequency_effects_channel_on:u.low_frequency_effects_channel_on,channel_mode:u.channel_mode},this.dispatchAudioInitSegment(m)):this.detectAudioMetadataChange(m)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(m)),r=l;var A=Math.floor(l),S={unit:u.data,length:u.data.byteLength,pts:A,dts:A};this.audio_track_.samples.push(S),this.audio_track_.length+=u.data.byteLength,l+=n}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseEAC3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,o;if(e!=null&&(o=e/this.timescale_),this.audio_metadata_.codec==="ec-3"){if(e==null&&this.audio_last_sample_pts_!=null)n=256*this.audio_metadata_.num_blks/this.audio_metadata_.sampling_frequency*1e3,o=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"EAC3: Unknown pts")}for(var r,s=new Kt(t),u=null,l=o;(u=s.readNextEAC3Frame())!=null;){n=1536/u.sampling_frequency*1e3;var m={codec:"ec-3",data:u};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"ec-3",sampling_frequency:u.sampling_frequency,bit_stream_identification:u.bit_stream_identification,low_frequency_effects_channel_on:u.low_frequency_effects_channel_on,num_blks:u.num_blks,channel_mode:u.channel_mode},this.dispatchAudioInitSegment(m)):this.detectAudioMetadataChange(m)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(m)),r=l;var A=Math.floor(l),S={unit:u.data,length:u.data.byteLength,pts:A,dts:A};this.audio_track_.samples.push(S),this.audio_track_.length+=u.data.byteLength,l+=n}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseOpusPayload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n,o;if(e!=null&&(o=e/this.timescale_),this.audio_metadata_.codec==="opus"){if(e==null&&this.audio_last_sample_pts_!=null)n=20,o=this.audio_last_sample_pts_+n;else if(e==null)return void f.a.w(this.TAG,"Opus: Unknown pts")}for(var r,s=o,u=0;u<t.length;){n=20;for(var l=(16&t[u+1])!=0,m=(8&t[u+1])!=0,A=u+2,S=0;t[A]===255;)S+=255,A+=1;S+=t[A],A+=1,A+=l?2:0,A+=m?2:0,r=s;var R=Math.floor(s),P=t.slice(A,A+S),H={unit:P,length:P.byteLength,pts:R,dts:R};this.audio_track_.samples.push(H),this.audio_track_.length+=P.byteLength,s+=n,u=A+S}r&&(this.audio_last_sample_pts_=r)}},i.prototype.parseMP3Payload=function(t,e){if(!this.has_video_||this.video_init_segment_dispatched_){var n=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],o=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],r=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],s=t[1]>>>3&3,u=(6&t[1])>>1,l=(240&t[2])>>>4,m=(12&t[2])>>>2,A=(t[3]>>>6&3)!==3?2:1,S=0,R=34;switch(s){case 0:S=[11025,12e3,8e3,0][m];break;case 2:S=[22050,24e3,16e3,0][m];break;case 3:S=[44100,48e3,32e3,0][m]}switch(u){case 1:R=34,l<r.length&&r[l];break;case 2:R=33,l<o.length&&o[l];break;case 3:R=32,l<n.length&&n[l]}var P=new Ft;P.object_type=R,P.sample_rate=S,P.channel_count=A,P.data=t;var H={codec:"mp3",data:P};this.audio_init_segment_dispatched_==0?(this.audio_metadata_={codec:"mp3",object_type:R,sample_rate:S,channel_count:A},this.dispatchAudioInitSegment(H)):this.detectAudioMetadataChange(H)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(H));var N={unit:t,length:t.byteLength,pts:e/this.timescale_,dts:e/this.timescale_};this.audio_track_.samples.push(N),this.audio_track_.length+=t.byteLength}},i.prototype.detectAudioMetadataChange=function(t){if(t.codec!==this.audio_metadata_.codec)return f.a.v(this.TAG,"Audio: Audio Codecs changed from "+"".concat(this.audio_metadata_.codec," to ").concat(t.codec)),!0;if(t.codec==="aac"&&this.audio_metadata_.codec==="aac"){if((e=t.data).audio_object_type!==this.audio_metadata_.audio_object_type)return f.a.v(this.TAG,"AAC: AudioObjectType changed from "+"".concat(this.audio_metadata_.audio_object_type," to ").concat(e.audio_object_type)),!0;if(e.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return f.a.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sampling_freq_index," to ").concat(e.sampling_freq_index)),!0;if(e.channel_config!==this.audio_metadata_.channel_config)return f.a.v(this.TAG,"AAC: Channel configuration changed from "+"".concat(this.audio_metadata_.channel_config," to ").concat(e.channel_config)),!0}else if(t.codec==="ac-3"&&this.audio_metadata_.codec==="ac-3"){var e;if((e=t.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return f.a.v(this.TAG,"AC3: Sampling Frequency changed from "+"".concat(this.audio_metadata_.sampling_frequency," to ").concat(e.sampling_frequency)),!0;if(e.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return f.a.v(this.TAG,"AC3: Bit Stream Identification changed from "+"".concat(this.audio_metadata_.bit_stream_identification," to ").concat(e.bit_stream_identification)),!0;if(e.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return f.a.v(this.TAG,"AC3: BitStream Mode changed from "+"".concat(this.audio_metadata_.bit_stream_mode," to ").concat(e.bit_stream_mode)),!0;if(e.channel_mode!==this.audio_metadata_.channel_mode)return f.a.v(this.TAG,"AC3: Channel Mode changed from "+"".concat(this.audio_metadata_.channel_mode," to ").concat(e.channel_mode)),!0;if(e.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return f.a.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+"".concat(this.audio_metadata_.low_frequency_effects_channel_on," to ").concat(e.low_frequency_effects_channel_on)),!0}else if(t.codec==="opus"&&this.audio_metadata_.codec==="opus"){if((n=t.meta).sample_rate!==this.audio_metadata_.sample_rate)return f.a.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(n.sample_rate)),!0;if(n.channel_count!==this.audio_metadata_.channel_count)return f.a.v(this.TAG,"Opus: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(n.channel_count)),!0}else if(t.codec==="mp3"&&this.audio_metadata_.codec==="mp3"){var n;if((n=t.data).object_type!==this.audio_metadata_.object_type)return f.a.v(this.TAG,"MP3: AudioObjectType changed from "+"".concat(this.audio_metadata_.object_type," to ").concat(n.object_type)),!0;if(n.sample_rate!==this.audio_metadata_.sample_rate)return f.a.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(n.sample_rate)),!0;if(n.channel_count!==this.audio_metadata_.channel_count)return f.a.v(this.TAG,"MP3: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(n.channel_count)),!0}return!1},i.prototype.dispatchAudioInitSegment=function(t){var e={type:"audio"};if(e.id=this.audio_track_.id,e.timescale=1e3,e.duration=this.duration_,this.audio_metadata_.codec==="aac"){var n=t.codec==="aac"?t.data:null,o=new Me(n);e.audioSampleRate=o.sampling_rate,e.channelCount=o.channel_count,e.codec=o.codec_mimetype,e.originalCodec=o.original_codec_mimetype,e.config=o.config,e.refSampleDuration=1024/e.audioSampleRate*e.timescale}else if(this.audio_metadata_.codec==="ac-3"){var r=t.codec==="ac-3"?t.data:null,s=new Ht(r);e.audioSampleRate=s.sampling_rate,e.channelCount=s.channel_count,e.codec=s.codec_mimetype,e.originalCodec=s.original_codec_mimetype,e.config=s.config,e.refSampleDuration=1536/e.audioSampleRate*e.timescale}else if(this.audio_metadata_.codec==="ec-3"){var u=t.codec==="ec-3"?t.data:null,l=new Wt(u);e.audioSampleRate=l.sampling_rate,e.channelCount=l.channel_count,e.codec=l.codec_mimetype,e.originalCodec=l.original_codec_mimetype,e.config=l.config,e.refSampleDuration=256*l.num_blks/e.audioSampleRate*e.timescale}else this.audio_metadata_.codec==="opus"?(e.audioSampleRate=this.audio_metadata_.sample_rate,e.channelCount=this.audio_metadata_.channel_count,e.channelConfigCode=this.audio_metadata_.channel_config_code,e.codec="opus",e.originalCodec="opus",e.config=void 0,e.refSampleDuration=20):this.audio_metadata_.codec==="mp3"&&(e.audioSampleRate=this.audio_metadata_.sample_rate,e.channelCount=this.audio_metadata_.channel_count,e.codec="mp3",e.originalCodec="mp3",e.config=void 0);this.audio_init_segment_dispatched_==0&&f.a.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: ".concat(e.codec)),this.onTrackMetadata("audio",e),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var m=this.media_info_;m.hasAudio=!0,m.audioCodec=e.originalCodec,m.audioSampleRate=e.audioSampleRate,m.audioChannelCount=e.channelCount,m.hasVideo&&m.videoCodec?m.mimeType='video/mp2t; codecs="'.concat(m.videoCodec,",").concat(m.audioCodec,'"'):m.mimeType='video/mp2t; codecs="'.concat(m.audioCodec,'"'),m.isComplete()&&this.onMediaInfo(m)},i.prototype.dispatchPESPrivateDataDescriptor=function(t,e,n){var o=new Ue;o.pid=t,o.stream_type=e,o.descriptor=n,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(o)},i.prototype.parsePESPrivateDataPayload=function(t,e,n,o,r){var s=new Ce;if(s.pid=o,s.stream_id=r,s.len=t.byteLength,s.data=t,e!=null){var u=Math.floor(e/this.timescale_);s.pts=u}else s.nearest_pts=this.getNearestTimestampMilliseconds();if(n!=null){var l=Math.floor(n/this.timescale_);s.dts=l}this.onPESPrivateData&&this.onPESPrivateData(s)},i.prototype.parseTimedID3MetadataPayload=function(t,e,n,o,r){var s=new Ce;if(s.pid=o,s.stream_id=r,s.len=t.byteLength,s.data=t,e!=null){var u=Math.floor(e/this.timescale_);s.pts=u}if(n!=null){var l=Math.floor(n/this.timescale_);s.dts=l}this.onTimedID3Metadata&&this.onTimedID3Metadata(s)},i.prototype.parseSynchronousKLVMetadataPayload=function(t,e,n,o,r){var s=new Yt;if(s.pid=o,s.stream_id=r,s.len=t.byteLength,s.data=t,e!=null){var u=Math.floor(e/this.timescale_);s.pts=u}if(n!=null){var l=Math.floor(n/this.timescale_);s.dts=l}s.access_units=function(m){for(var A=[],S=0;S+5<m.byteLength;){var R=m[S+0],P=m[S+1],H=m[S+2],N=m[S+3]<<8|m[S+4]<<0,ee=m.slice(S+5,S+5+N);A.push({service_id:R,sequence_number:P,flags:H,data:ee}),S+=5+N}return A}(t),this.onSynchronousKLVMetadata&&this.onSynchronousKLVMetadata(s)},i.prototype.parseAsynchronousKLVMetadataPayload=function(t,e,n){var o=new Ce;o.pid=e,o.stream_id=n,o.len=t.byteLength,o.data=t,this.onAsynchronousKLVMetadata&&this.onAsynchronousKLVMetadata(o)},i.prototype.parseSMPTE2038MetadataPayload=function(t,e,n,o,r){var s=new Vt;if(s.pid=o,s.stream_id=r,s.len=t.byteLength,s.data=t,e!=null){var u=Math.floor(e/this.timescale_);s.pts=u}if(s.nearest_pts=this.getNearestTimestampMilliseconds(),n!=null){var l=Math.floor(n/this.timescale_);s.dts=l}s.ancillaries=function(m){for(var A=new x(m),S=0,R=[];S+=6,A.readBits(6)===0;){var P=A.readBool();S+=1;var H=A.readBits(11);S+=11;var N=A.readBits(12);S+=12;var ee=255&A.readBits(10);S+=10;var $=255&A.readBits(10);S+=10;var Q=255&A.readBits(10);S+=10;for(var re=new Uint8Array(Q),fe=0;fe<Q;fe++){var Z=255&A.readBits(10);S+=10,re[fe]=Z}A.readBits(10),S+=10;var ae="User Defined";ee===65?$===7&&(ae="SCTE-104"):ee===95?$===220?ae="ARIB STD-B37 (1SEG)":$===221?ae="ARIB STD-B37 (ANALOG)":$===222?ae="ARIB STD-B37 (SD)":$===223&&(ae="ARIB STD-B37 (HD)"):ee===97&&($===1?ae="EIA-708":$===2&&(ae="EIA-608")),R.push({yc_indicator:P,line_number:H,horizontal_offset:N,did:ee,sdid:$,user_data:re,description:ae,information:{}}),A.readBits(8-(S-Math.floor(S/8))%8),S+=(8-(S-Math.floor(S/8)))%8}return A.destroy(),A=null,R}(t),this.onSMPTE2038Metadata&&this.onSMPTE2038Metadata(s)},i.prototype.getNearestTimestampMilliseconds=function(){return this.audio_last_sample_pts_!=null?Math.floor(this.audio_last_sample_pts_):this.last_pcr_!=null?Math.floor(this.last_pcr_/300/this.timescale_):void 0},i.prototype.getPcrBase=function(t){var e=33554432*t[6]+131072*t[7]+512*t[8]+2*t[9]+(128&t[10])/128+this.timestamp_offset_;return e+4294967296<this.last_pcr_base_&&(e+=8589934592,this.timestamp_offset_+=8589934592),this.last_pcr_base_=e,e},i.prototype.getTimestamp=function(t,e){var n=536870912*(14&t[e])+4194304*(255&t[e+1])+16384*(254&t[e+2])+128*(255&t[e+3])+(254&t[e+4])/2+this.timestamp_offset_;return n+4294967296<this.last_pcr_base_&&(n+=8589934592),n},i}(V),dt=function(a,i,t){if(t||arguments.length===2)for(var e,n=0,o=i.length;n<o;n++)!e&&n in i||(e||(e=Array.prototype.slice.call(i,0,n)),e[n]=i[n]);return a.concat(e||Array.prototype.slice.call(i))},_t=function(){function a(){}return a.init=function(){for(var i in a.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],hvc1:[],hvcC:[],av01:[],av1C:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[],fLaC:[],dfLa:[]},a.types)a.types.hasOwnProperty(i)&&(a.types[i]=[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);var t=a.constants={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSC=t.STCO=t.STTS,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},a.box=function(i){for(var t=8,e=null,n=Array.prototype.slice.call(arguments,1),o=n.length,r=0;r<o;r++)t+=n[r].byteLength;(e=new Uint8Array(t))[0]=t>>>24&255,e[1]=t>>>16&255,e[2]=t>>>8&255,e[3]=255&t,e.set(i,4);var s=8;for(r=0;r<o;r++)e.set(n[r],s),s+=n[r].byteLength;return e},a.generateInitSegment=function(i){var t=a.box(a.types.ftyp,a.constants.FTYP),e=a.moov(i),n=new Uint8Array(t.byteLength+e.byteLength);return n.set(t,0),n.set(e,t.byteLength),n},a.moov=function(i){var t=a.mvhd(i.timescale,i.duration),e=a.trak(i),n=a.mvex(i);return a.box(a.types.moov,t,e,n)},a.mvhd=function(i,t){return a.box(a.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},a.trak=function(i){return a.box(a.types.trak,a.tkhd(i),a.mdia(i))},a.tkhd=function(i){var t=i.id,e=i.duration,n=i.presentWidth,o=i.presentHeight;return a.box(a.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,o>>>8&255,255&o,0,0]))},a.mdia=function(i){return a.box(a.types.mdia,a.mdhd(i),a.hdlr(i),a.minf(i))},a.mdhd=function(i){var t=i.timescale,e=i.duration;return a.box(a.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,85,196,0,0]))},a.hdlr=function(i){var t=null;return t=i.type==="audio"?a.constants.HDLR_AUDIO:a.constants.HDLR_VIDEO,a.box(a.types.hdlr,t)},a.minf=function(i){var t=null;return t=i.type==="audio"?a.box(a.types.smhd,a.constants.SMHD):a.box(a.types.vmhd,a.constants.VMHD),a.box(a.types.minf,t,a.dinf(),a.stbl(i))},a.dinf=function(){return a.box(a.types.dinf,a.box(a.types.dref,a.constants.DREF))},a.stbl=function(i){return a.box(a.types.stbl,a.stsd(i),a.box(a.types.stts,a.constants.STTS),a.box(a.types.stsc,a.constants.STSC),a.box(a.types.stsz,a.constants.STSZ),a.box(a.types.stco,a.constants.STCO))},a.stsd=function(i){return i.type==="audio"?i.codec==="mp3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.mp3(i)):i.codec==="ac-3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.ac3(i)):i.codec==="ec-3"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.ec3(i)):i.codec==="opus"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.Opus(i)):i.codec=="flac"?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.fLaC(i)):a.box(a.types.stsd,a.constants.STSD_PREFIX,a.mp4a(i)):i.type==="video"&&i.codec.startsWith("hvc1")?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.hvc1(i)):i.type==="video"&&i.codec.startsWith("av01")?a.box(a.types.stsd,a.constants.STSD_PREFIX,a.av01(i)):a.box(a.types.stsd,a.constants.STSD_PREFIX,a.avc1(i))},a.mp3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types[".mp3"],n)},a.mp4a=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.mp4a,n,a.esds(i))},a.ac3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types["ac-3"],n,a.box(a.types.dac3,new Uint8Array(i.config)))},a.ec3=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types["ec-3"],n,a.box(a.types.dec3,new Uint8Array(i.config)))},a.esds=function(i){var t=i.config||[],e=t.length,n=new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t).concat([6,1,2]));return a.box(a.types.esds,n)},a.Opus=function(i){var t=i.channelCount,e=i.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.Opus,n,a.dOps(i))},a.dOps=function(i){var t=i.channelCount,e=i.channelConfigCode,n=i.audioSampleRate;if(i.config)return a.box(a.types.dOps,i.config);var o=[];switch(e){case 1:case 2:o=[0];break;case 0:o=[255,1,1,0,1];break;case 128:o=[255,2,0,0,1];break;case 3:o=[1,2,1,0,2,1];break;case 4:o=[1,2,2,0,1,2,3];break;case 5:o=[1,3,2,0,4,1,2,3];break;case 6:o=[1,4,2,0,4,1,2,3,5];break;case 7:o=[1,4,2,0,4,1,2,3,5,6];break;case 8:o=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:o=[1,1,2,0,1];break;case 131:o=[1,1,3,0,1,2];break;case 132:o=[1,1,4,0,1,2,3];break;case 133:o=[1,1,5,0,1,2,3,4];break;case 134:o=[1,1,6,0,1,2,3,4,5];break;case 135:o=[1,1,7,0,1,2,3,4,5,6];break;case 136:o=[1,1,8,0,1,2,3,4,5,6,7]}var r=new Uint8Array(dt([0,t,0,0,n>>>24&255,n>>>17&255,n>>>8&255,n>>>0&255,0,0],o,!0));return a.box(a.types.dOps,r)},a.fLaC=function(i){var t=i.channelCount,e=Math.min(i.audioSampleRate,65535),n=i.sampleSize,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,n,0,0,0,0,e>>>8&255,255&e,0,0]);return a.box(a.types.fLaC,o,a.dfLa(i))},a.dfLa=function(i){var t=new Uint8Array(dt([0,0,0,0],i.config,!0));return a.box(a.types.dfLa,t)},a.avc1=function(i){var t=i.avcc,e=i.codecWidth,n=i.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.avc1,o,a.box(a.types.avcC,t))},a.hvc1=function(i){var t=i.hvcc,e=i.codecWidth,n=i.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.hvc1,o,a.box(a.types.hvcC,t))},a.av01=function(i){var t=i.av1c,e=i.codecWidth||192,n=i.codecHeight||108,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e>>>8&255,255&e,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return a.box(a.types.av01,o,a.box(a.types.av1C,t))},a.mvex=function(i){return a.box(a.types.mvex,a.trex(i))},a.trex=function(i){var t=i.id,e=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return a.box(a.types.trex,e)},a.moof=function(i,t){return a.box(a.types.moof,a.mfhd(i.sequenceNumber),a.traf(i,t))},a.mfhd=function(i){var t=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i]);return a.box(a.types.mfhd,t)},a.traf=function(i,t){var e=i.id,n=a.box(a.types.tfhd,new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])),o=a.box(a.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),r=a.sdtp(i),s=a.trun(i,r.byteLength+16+16+8+16+8+8);return a.box(a.types.traf,n,o,s,r)},a.sdtp=function(i){for(var t=i.samples||[],e=t.length,n=new Uint8Array(4+e),o=0;o<e;o++){var r=t[o].flags;n[o+4]=r.isLeading<<6|r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy}return a.box(a.types.sdtp,n)},a.trun=function(i,t){var e=i.samples||[],n=e.length,o=12+16*n,r=new Uint8Array(o);t+=8+o,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(var s=0;s<n;s++){var u=e[s].duration,l=e[s].size,m=e[s].flags,A=e[s].cts;r.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,m.isLeading<<2|m.dependsOn,m.isDependedOn<<6|m.hasRedundancy<<4|m.isNonSync,0,0,A>>>24&255,A>>>16&255,A>>>8&255,255&A],12+16*s)}return a.box(a.types.trun,r)},a.mdat=function(i){return a.box(a.types.mdat,i)},a}();_t.init();var ze=_t,ct=function(){function a(){}return a.getSilentFrame=function(i,t){if(i==="mp4a.40.2"){if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},a}(),Ne=O(11),ht=function(){function a(i){this.TAG="MP4Remuxer",this._config=i,this._isLive=i.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ne.c("audio"),this._videoSegmentInfoList=new Ne.c("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!y.a.chrome||!(y.a.version.major<50||y.a.version.major===50&&y.a.version.build<2661)),this._fillSilentAfterSeek=y.a.msedge||y.a.msie,this._mp3UseMpegAudio=!y.a.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return a.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},a.prototype.bindDataSource=function(i){return i.onDataAvailable=this.remux.bind(this),i.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(a.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(i){this._onInitSegment=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(i){this._onMediaSegment=i},enumerable:!1,configurable:!0}),a.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},a.prototype.seek=function(i){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},a.prototype.remux=function(i,t){if(!this._onMediaSegment)throw new L.a("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(i,t),t&&this._remuxVideo(t),i&&this._remuxAudio(i)},a.prototype._onTrackMetadataReceived=function(i,t){var e=null,n="mp4",o=t.codec;if(i==="audio")this._audioMeta=t,t.codec==="mp3"&&this._mp3UseMpegAudio?(n="mpeg",o="",e=new Uint8Array):e=ze.generateInitSegment(t);else{if(i!=="video")return;this._videoMeta=t,e=ze.generateInitSegment(t)}if(!this._onInitSegment)throw new L.a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(i,{type:i,data:e.buffer,codec:o,container:"".concat(i,"/").concat(n),mediaDuration:t.duration})},a.prototype._calculateDtsBase=function(i,t){this._dtsBaseInited||(i&&i.samples&&i.samples.length&&(this._audioDtsBase=i.samples[0].dts),t&&t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},a.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},a.prototype.flushStashedSamples=function(){var i=this._videoStashedLastSample,t=this._audioStashedLastSample,e={type:"video",id:1,sequenceNumber:0,samples:[],length:0};i!=null&&(e.samples.push(i),e.length=i.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};t!=null&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(e,!0),this._remuxAudio(n,!0)},a.prototype._remuxAudio=function(i,t){if(this._audioMeta!=null){var e,n=i,o=n.samples,r=void 0,s=-1,u=this._audioMeta.refSampleDuration,l=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,m=this._dtsBaseInited&&this._audioNextDts===void 0,A=!1;if(o&&o.length!==0&&(o.length!==1||t)){var S=0,R=null,P=0;l?(S=0,P=n.length):(S=8,P=8+n.length);var H=null;if(o.length>1&&(P-=(H=o.pop()).length),this._audioStashedLastSample!=null){var N=this._audioStashedLastSample;this._audioStashedLastSample=null,o.unshift(N),P+=N.length}H!=null&&(this._audioStashedLastSample=H);var ee=o[0].dts-this._dtsBase;if(this._audioNextDts)r=ee-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(A=!0);else{var $=this._audioSegmentInfoList.getLastSampleBefore(ee);if($!=null){var Q=ee-($.originalDts+$.duration);Q<=3&&(Q=0),r=ee-($.dts+$.duration+Q)}else r=0}if(A){var re=ee-r,fe=this._videoSegmentInfoList.getLastSegmentBefore(ee);if(fe!=null&&fe.beginDts<re){if(Le=ct.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount)){var Z=fe.beginDts,ae=re-fe.beginDts;f.a.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(Z,", duration: ").concat(ae)),o.unshift({unit:Le,dts:Z,pts:Z}),P+=Le.byteLength}}else A=!1}for(var pe=[],oe=0;oe<o.length;oe++){var le=(N=o[oe]).unit,Se=N.dts-this._dtsBase,Ae=(Z=Se,!1),ue=null,ge=0;if(!(Se<-.001)){if(this._audioMeta.codec!=="mp3"&&u!=null){var Re=Se;if(this._audioNextDts&&(Re=this._audioNextDts),(r=Se-Re)<=-3*u){f.a.w(this.TAG,"Dropping 1 audio frame (originalDts: ".concat(Se," ms ,curRefDts: ").concat(Re," ms) due to dtsCorrection: ").concat(r," ms overlap."));continue}if(r>=3*u&&this._fillAudioTimestampGap&&!y.a.safari){Ae=!0;var Le,xe=Math.floor(r/u);f.a.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"originalDts: ".concat(Se," ms, curRefDts: ").concat(Re," ms, ")+"dtsCorrection: ".concat(Math.round(r)," ms, generate: ").concat(xe," frames")),Z=Math.floor(Re),ge=Math.floor(Re+u)-Z,(Le=ct.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))==null&&(f.a.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Le=le),ue=[];for(var De=0;De<xe;De++){Re+=u;var Pe=Math.floor(Re),Be=Math.floor(Re+u)-Pe,Oe={dts:Pe,pts:Pe,cts:0,unit:Le,size:Le.byteLength,duration:Be,originalDts:Se,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};ue.push(Oe),P+=Oe.size}this._audioNextDts=Re+u}else Z=Math.floor(Re),ge=Math.floor(Re+u)-Z,this._audioNextDts=Re+u}else Z=Se-r,oe!==o.length-1?ge=o[oe+1].dts-this._dtsBase-r-Z:H!=null?ge=H.dts-this._dtsBase-r-Z:ge=pe.length>=1?pe[pe.length-1].duration:Math.floor(u),this._audioNextDts=Z+ge;s===-1&&(s=Z),pe.push({dts:Z,pts:Z,cts:0,unit:N.unit,size:N.unit.byteLength,duration:ge,originalDts:Se,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ae&&pe.push.apply(pe,ue)}}if(pe.length===0)return n.samples=[],void(n.length=0);for(l?R=new Uint8Array(P):((R=new Uint8Array(P))[0]=P>>>24&255,R[1]=P>>>16&255,R[2]=P>>>8&255,R[3]=255&P,R.set(ze.types.mdat,4)),oe=0;oe<pe.length;oe++)le=pe[oe].unit,R.set(le,S),S+=le.byteLength;var Ie=pe[pe.length-1];e=Ie.dts+Ie.duration;var be=new Ne.b;be.beginDts=s,be.endDts=e,be.beginPts=s,be.endPts=e,be.originalBeginDts=pe[0].originalDts,be.originalEndDts=Ie.originalDts+Ie.duration,be.firstSample=new Ne.d(pe[0].dts,pe[0].pts,pe[0].duration,pe[0].originalDts,!1),be.lastSample=new Ne.d(Ie.dts,Ie.pts,Ie.duration,Ie.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(be),n.samples=pe,n.sequenceNumber++;var Ve=null;Ve=l?new Uint8Array:ze.moof(n,s),n.samples=[],n.length=0;var Fe={type:"audio",data:this._mergeBoxes(Ve,R).buffer,sampleCount:pe.length,info:be};l&&m&&(Fe.timestampOffset=s),this._onMediaSegment("audio",Fe)}}},a.prototype._remuxVideo=function(i,t){if(this._videoMeta!=null){var e,n,o=i,r=o.samples,s=void 0,u=-1,l=-1;if(r&&r.length!==0&&(r.length!==1||t)){var m=8,A=null,S=8+i.length,R=null;if(r.length>1&&(S-=(R=r.pop()).length),this._videoStashedLastSample!=null){var P=this._videoStashedLastSample;this._videoStashedLastSample=null,r.unshift(P),S+=P.length}R!=null&&(this._videoStashedLastSample=R);var H=r[0].dts-this._dtsBase;if(this._videoNextDts)s=H-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())s=0;else{var N=this._videoSegmentInfoList.getLastSampleBefore(H);if(N!=null){var ee=H-(N.originalDts+N.duration);ee<=3&&(ee=0),s=H-(N.dts+N.duration+ee)}else s=0}for(var $=new Ne.b,Q=[],re=0;re<r.length;re++){var fe=(P=r[re]).dts-this._dtsBase,Z=P.isKeyframe,ae=fe-s,pe=P.cts,oe=ae+pe;u===-1&&(u=ae,l=oe);var le=0;if(re!==r.length-1?le=r[re+1].dts-this._dtsBase-s-ae:R!=null?le=R.dts-this._dtsBase-s-ae:le=Q.length>=1?Q[Q.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),Z){var Se=new Ne.d(ae,oe,le,P.dts,!0);Se.fileposition=P.fileposition,$.appendSyncPoint(Se)}Q.push({dts:ae,pts:oe,cts:pe,units:P.units,size:P.length,isKeyframe:Z,duration:le,originalDts:fe,flags:{isLeading:0,dependsOn:Z?2:1,isDependedOn:Z?1:0,hasRedundancy:0,isNonSync:Z?0:1}})}for((A=new Uint8Array(S))[0]=S>>>24&255,A[1]=S>>>16&255,A[2]=S>>>8&255,A[3]=255&S,A.set(ze.types.mdat,4),re=0;re<Q.length;re++)for(var Ae=Q[re].units;Ae.length;){var ue=Ae.shift().data;A.set(ue,m),m+=ue.byteLength}var ge=Q[Q.length-1];if(e=ge.dts+ge.duration,n=ge.pts+ge.duration,this._videoNextDts=e,$.beginDts=u,$.endDts=e,$.beginPts=l,$.endPts=n,$.originalBeginDts=Q[0].originalDts,$.originalEndDts=ge.originalDts+ge.duration,$.firstSample=new Ne.d(Q[0].dts,Q[0].pts,Q[0].duration,Q[0].originalDts,Q[0].isKeyframe),$.lastSample=new Ne.d(ge.dts,ge.pts,ge.duration,ge.originalDts,ge.isKeyframe),this._isLive||this._videoSegmentInfoList.append($),o.samples=Q,o.sequenceNumber++,this._forceFirstIDR){var Re=Q[0].flags;Re.dependsOn=2,Re.isNonSync=0}var Le=ze.moof(o,u);o.samples=[],o.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Le,A).buffer,sampleCount:Q.length,info:$})}}},a.prototype._mergeBoxes=function(i,t){var e=new Uint8Array(i.byteLength+t.byteLength);return e.set(i,0),e.set(t,i.byteLength),e},a}(),Jt=O(14),we=O(1),$t=(O(2),function(){function a(i,t){this.TAG="TransmuxingController",this._emitter=new M.a,this._config=t,i.segments||(i.segments=[{duration:i.duration,filesize:i.filesize,url:i.url}]),typeof i.cors!="boolean"&&(i.cors=!0),typeof i.withCredentials!="boolean"&&(i.withCredentials=!1),this._mediaDataSource=i,this._currentSegmentIndex=0;var e=0;this._mediaDataSource.segments.forEach(function(n){n.timestampBase=e,e+=n.duration,n.cors=i.cors,n.withCredentials=i.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)}),isNaN(e)||this._mediaDataSource.duration===e||(this._mediaDataSource.duration=e),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return a.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},a.prototype.on=function(i,t){this._emitter.addListener(i,t)},a.prototype.off=function(i,t){this._emitter.removeListener(i,t)},a.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},a.prototype._loadSegment=function(i,t){this._currentSegmentIndex=i;var e=this._mediaDataSource.segments[i],n=this._ioctl=new Jt.a(e,this._config,i);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)},a.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},a.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},a.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},a.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},a.prototype.seek=function(i){if(this._mediaInfo!=null&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(i);if(t===this._currentSegmentIndex){var e=this._mediaInfo.segments[t];if(e==null)this._pendingSeekTime=i;else{var n=e.getNearestKeyframe(i);this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds}}else{var o=this._mediaInfo.segments[t];o==null?(this._pendingSeekTime=i,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(n=o.getNearestKeyframe(i),this._internalAbort(),this._remuxer.seek(i),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t))}this._enableStatisticsReporter()}},a.prototype._searchSegmentIndexContains=function(i){for(var t=this._mediaDataSource.segments,e=t.length-1,n=0;n<t.length;n++)if(i<t[n].timestampBase){e=n-1;break}return e},a.prototype._onInitChunkArrival=function(i,t){var e=this,n=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(i,t);else{var o=null;(o=p.probe(i)).match&&(this._setupFLVDemuxerRemuxer(o),n=this._demuxer.parseChunks(i,t)),o.match||o.needMoreData||(o=st.probe(i)).match&&(this._setupTSDemuxerRemuxer(o),n=this._demuxer.parseChunks(i,t)),o.match||o.needMoreData||(o=null,f.a.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(function(){e._internalAbort()}),this._emitter.emit(we.a.DEMUX_ERROR,B.a.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return n},a.prototype._setupFLVDemuxerRemuxer=function(i){this._demuxer=new p(i,this._config),this._remuxer||(this._remuxer=new ht(this._config));var t=this._mediaDataSource;t.duration==null||isNaN(t.duration)||(this._demuxer.overridedDuration=t.duration),typeof t.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=t.hasAudio),typeof t.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=t.hasVideo),this._demuxer.timestampBase=t.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},a.prototype._setupTSDemuxerRemuxer=function(i){var t=this._demuxer=new st(i,this._config);this._remuxer||(this._remuxer=new ht(this._config)),t.onError=this._onDemuxException.bind(this),t.onMediaInfo=this._onMediaInfo.bind(this),t.onMetaDataArrived=this._onMetaDataArrived.bind(this),t.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),t.onSynchronousKLVMetadata=this._onSynchronousKLVMetadata.bind(this),t.onAsynchronousKLVMetadata=this._onAsynchronousKLVMetadata.bind(this),t.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),t.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),t.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),t.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},a.prototype._onMediaInfo=function(i){var t=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},i),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,v.a.prototype));var e=Object.assign({},i);Object.setPrototypeOf(e,v.a.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=e,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var n=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(n)})},a.prototype._onMetaDataArrived=function(i){this._emitter.emit(we.a.METADATA_ARRIVED,i)},a.prototype._onScriptDataArrived=function(i){this._emitter.emit(we.a.SCRIPTDATA_ARRIVED,i)},a.prototype._onTimedID3Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.TIMED_ID3_METADATA_ARRIVED,i))},a.prototype._onSynchronousKLVMetadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,i))},a.prototype._onAsynchronousKLVMetadata=function(i){this._emitter.emit(we.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,i)},a.prototype._onSMPTE2038Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.dts!=null&&(i.dts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),this._emitter.emit(we.a.SMPTE2038_METADATA_ARRIVED,i))},a.prototype._onSCTE35Metadata=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),this._emitter.emit(we.a.SCTE35_METADATA_ARRIVED,i))},a.prototype._onPESPrivateDataDescriptor=function(i){this._emitter.emit(we.a.PES_PRIVATE_DATA_DESCRIPTOR,i)},a.prototype._onPESPrivateData=function(i){var t=this._remuxer.getTimestampBase();t!=null&&(i.pts!=null&&(i.pts-=t),i.nearest_pts!=null&&(i.nearest_pts-=t),i.dts!=null&&(i.dts-=t),this._emitter.emit(we.a.PES_PRIVATE_DATA_ARRIVED,i))},a.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},a.prototype._onIOComplete=function(i){var t=i+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(we.a.LOADING_COMPLETE),this._disableStatisticsReporter())},a.prototype._onIORedirect=function(i){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=i},a.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(we.a.RECOVERED_EARLY_EOF)},a.prototype._onIOException=function(i,t){f.a.e(this.TAG,"IOException: type = ".concat(i,", code = ").concat(t.code,", msg = ").concat(t.msg)),this._emitter.emit(we.a.IO_ERROR,i,t),this._disableStatisticsReporter()},a.prototype._onDemuxException=function(i,t){f.a.e(this.TAG,"DemuxException: type = ".concat(i,", info = ").concat(t)),this._emitter.emit(we.a.DEMUX_ERROR,i,t)},a.prototype._onRemuxerInitSegmentArrival=function(i,t){this._emitter.emit(we.a.INIT_SEGMENT,i,t)},a.prototype._onRemuxerMediaSegmentArrival=function(i,t){if(this._pendingSeekTime==null&&(this._emitter.emit(we.a.MEDIA_SEGMENT,i,t),this._pendingResolveSeekPoint!=null&&i==="video")){var e=t.info.syncPoints,n=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,y.a.safari&&e.length>0&&e[0].originalDts===n&&(n=e[0].pts),this._emitter.emit(we.a.RECOMMEND_SEEKPOINT,n)}},a.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},a.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},a.prototype._reportSegmentMediaInfo=function(i){var t=this._mediaInfo.segments[i],e=Object.assign({},t);e.duration=this._mediaInfo.duration,e.segmentCount=this._mediaInfo.segmentCount,delete e.segments,delete e.keyframesIndex,this._emitter.emit(we.a.MEDIA_INFO,e)},a.prototype._reportStatisticsInfo=function(){var i={};i.url=this._ioctl.currentURL,i.hasRedirect=this._ioctl.hasRedirect,i.hasRedirect&&(i.redirectedURL=this._ioctl.currentRedirectedURL),i.speed=this._ioctl.currentSpeed,i.loaderType=this._ioctl.loaderType,i.currentSegmentIndex=this._currentSegmentIndex,i.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(we.a.STATISTICS_INFO,i)},a}());te.a=$t},function(me,te,O){var F,M=O(0),f=function(){function D(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return D.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},D.prototype.addBytes=function(c){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=c,this._totalBytes+=c):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=c,this._totalBytes+=c):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=c,this._totalBytes+=c,this._lastCheckpoint=this._now())},Object.defineProperty(D.prototype,"currentKBps",{get:function(){this.addBytes(0);var c=(this._now()-this._lastCheckpoint)/1e3;return c==0&&(c=1),this._intervalBytes/c/1024},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"averageKBps",{get:function(){var c=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/c/1024},enumerable:!1,configurable:!0}),D}(),y=O(2),v=O(5),g=O(3),T=(F=function(D,c){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,d){_.__proto__=d}||function(_,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(_[p]=d[p])})(D,c)},function(D,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function _(){this.constructor=D}F(D,c),D.prototype=c===null?Object.create(c):(_.prototype=c.prototype,new _)}),E=function(D){function c(_,d){var p=D.call(this,"fetch-stream-loader")||this;return p.TAG="FetchStreamLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._requestAbort=!1,p._abortController=null,p._contentLength=null,p._receivedLength=0,p}return T(c,D),c.isSupported=function(){try{var _=v.a.msedge&&v.a.version.minor>=15048,d=!v.a.msedge||_;return self.fetch&&self.ReadableStream&&d}catch(p){return!1}},c.prototype.destroy=function(){this.isWorking()&&this.abort(),D.prototype.destroy.call(this)},c.prototype.open=function(_,d){var p=this;this._dataSource=_,this._range=d;var V=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(V=_.redirectedURL);var J=this._seekHandler.getConfig(V,d),G=new self.Headers;if(typeof J.headers=="object"){var Y=J.headers;for(var se in Y)Y.hasOwnProperty(se)&&G.append(se,Y[se])}var Ee={method:"GET",headers:G,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var se in this._config.headers)G.append(se,this._config.headers[se]);_.cors===!1&&(Ee.mode="same-origin"),_.withCredentials&&(Ee.credentials="include"),_.referrerPolicy&&(Ee.referrerPolicy=_.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,Ee.signal=this._abortController.signal),this._status=y.c.kConnecting,self.fetch(J.url,Ee).then(function(_e){if(p._requestAbort)return p._status=y.c.kIdle,void _e.body.cancel();if(_e.ok&&_e.status>=200&&_e.status<=299){if(_e.url!==J.url&&p._onURLRedirect){var b=p._seekHandler.removeURLParameters(_e.url);p._onURLRedirect(b)}var h=_e.headers.get("Content-Length");return h!=null&&(p._contentLength=parseInt(h),p._contentLength!==0&&p._onContentLengthKnown&&p._onContentLengthKnown(p._contentLength)),p._pump.call(p,_e.body.getReader())}if(p._status=y.c.kError,!p._onError)throw new g.d("FetchStreamLoader: Http code invalid, "+_e.status+" "+_e.statusText);p._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:_e.status,msg:_e.statusText})}).catch(function(_e){if(!p._abortController||!p._abortController.signal.aborted){if(p._status=y.c.kError,!p._onError)throw _e;p._onError(y.b.EXCEPTION,{code:-1,msg:_e.message})}})},c.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==y.c.kBuffering||!v.a.chrome)&&this._abortController)try{this._abortController.abort()}catch(_){}},c.prototype._pump=function(_){var d=this;return _.read().then(function(p){if(p.done)if(d._contentLength!==null&&d._receivedLength<d._contentLength){d._status=y.c.kError;var V=y.b.EARLY_EOF,J={code:-1,msg:"Fetch stream meet Early-EOF"};if(!d._onError)throw new g.d(J.msg);d._onError(V,J)}else d._status=y.c.kComplete,d._onComplete&&d._onComplete(d._range.from,d._range.from+d._receivedLength-1);else{if(d._abortController&&d._abortController.signal.aborted)return void(d._status=y.c.kComplete);if(d._requestAbort===!0)return d._status=y.c.kComplete,_.cancel();d._status=y.c.kBuffering;var G=p.value.buffer,Y=d._range.from+d._receivedLength;d._receivedLength+=G.byteLength,d._onDataArrival&&d._onDataArrival(G,Y,d._receivedLength),d._pump(_)}}).catch(function(p){if(d._abortController&&d._abortController.signal.aborted)d._status=y.c.kComplete;else if(p.code!==11||!v.a.msedge){d._status=y.c.kError;var V=0,J=null;if(p.code!==19&&p.message!=="network error"||!(d._contentLength===null||d._contentLength!==null&&d._receivedLength<d._contentLength)?(V=y.b.EXCEPTION,J={code:p.code,msg:p.message}):(V=y.b.EARLY_EOF,J={code:p.code,msg:"Fetch stream meet Early-EOF"}),!d._onError)throw new g.d(J.msg);d._onError(V,J)}})},c}(y.a),L=function(){var D=function(c,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(c,_)};return function(c,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=c}D(c,_),c.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),I=function(D){function c(_,d){var p=D.call(this,"xhr-moz-chunked-loader")||this;return p.TAG="MozChunkedLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._xhr=null,p._requestAbort=!1,p._contentLength=null,p._receivedLength=0,p}return L(c,D),c.isSupported=function(){try{var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="moz-chunked-arraybuffer",_.responseType==="moz-chunked-arraybuffer"}catch(d){return M.a.w("MozChunkedLoader",d.message),!1}},c.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),D.prototype.destroy.call(this)},c.prototype.open=function(_,d){this._dataSource=_,this._range=d;var p=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(p=_.redirectedURL);var V=this._seekHandler.getConfig(p,d);this._requestURL=V.url;var J=this._xhr=new XMLHttpRequest;if(J.open("GET",V.url,!0),J.responseType="moz-chunked-arraybuffer",J.onreadystatechange=this._onReadyStateChange.bind(this),J.onprogress=this._onProgress.bind(this),J.onloadend=this._onLoadEnd.bind(this),J.onerror=this._onXhrError.bind(this),_.withCredentials&&(J.withCredentials=!0),typeof V.headers=="object"){var G=V.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}if(typeof this._config.headers=="object"){G=this._config.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}this._status=y.c.kConnecting,J.send()},c.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=y.c.kComplete},c.prototype._onReadyStateChange=function(_){var d=_.target;if(d.readyState===2){if(d.responseURL!=null&&d.responseURL!==this._requestURL&&this._onURLRedirect){var p=this._seekHandler.removeURLParameters(d.responseURL);this._onURLRedirect(p)}if(d.status!==0&&(d.status<200||d.status>299)){if(this._status=y.c.kError,!this._onError)throw new g.d("MozChunkedLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}else this._status=y.c.kBuffering}},c.prototype._onProgress=function(_){if(this._status!==y.c.kError){this._contentLength===null&&_.total!==null&&_.total!==0&&(this._contentLength=_.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var d=_.target.response,p=this._range.from+this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,p,this._receivedLength)}},c.prototype._onLoadEnd=function(_){this._requestAbort!==!0?this._status!==y.c.kError&&(this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},c.prototype._onXhrError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&_.loaded<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)},c}(y.a),w=function(){var D=function(c,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(c,_)};return function(c,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=c}D(c,_),c.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),x=(function(D){function c(_,d){var p=D.call(this,"xhr-msstream-loader")||this;return p.TAG="MSStreamLoader",p._seekHandler=_,p._config=d,p._needStash=!0,p._xhr=null,p._reader=null,p._totalRange=null,p._currentRange=null,p._currentRequestURL=null,p._currentRedirectedURL=null,p._contentLength=null,p._receivedLength=0,p._bufferLimit=16777216,p._lastTimeBufferSize=0,p._isReconnecting=!1,p}w(c,D),c.isSupported=function(){try{if(self.MSStream===void 0||self.MSStreamReader===void 0)return!1;var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="ms-stream",_.responseType==="ms-stream"}catch(d){return M.a.w("MSStreamLoader",d.message),!1}},c.prototype.destroy=function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),D.prototype.destroy.call(this)},c.prototype.open=function(_,d){this._internalOpen(_,d,!1)},c.prototype._internalOpen=function(_,d,p){this._dataSource=_,p?this._currentRange=d:this._totalRange=d;var V=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?V=this._currentRedirectedURL:_.redirectedURL!=null&&(V=_.redirectedURL));var J=this._seekHandler.getConfig(V,d);this._currentRequestURL=J.url;var G=this._reader=new self.MSStreamReader;G.onprogress=this._msrOnProgress.bind(this),G.onload=this._msrOnLoad.bind(this),G.onerror=this._msrOnError.bind(this);var Y=this._xhr=new XMLHttpRequest;if(Y.open("GET",J.url,!0),Y.responseType="ms-stream",Y.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Y.onerror=this._xhrOnError.bind(this),_.withCredentials&&(Y.withCredentials=!0),typeof J.headers=="object"){var se=J.headers;for(var Ee in se)se.hasOwnProperty(Ee)&&Y.setRequestHeader(Ee,se[Ee])}if(typeof this._config.headers=="object"){se=this._config.headers;for(var Ee in se)se.hasOwnProperty(Ee)&&Y.setRequestHeader(Ee,se[Ee])}this._isReconnecting?this._isReconnecting=!1:this._status=y.c.kConnecting,Y.send()},c.prototype.abort=function(){this._internalAbort(),this._status=y.c.kComplete},c.prototype._internalAbort=function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)},c.prototype._xhrOnReadyStateChange=function(_){var d=_.target;if(d.readyState===2)if(d.status>=200&&d.status<=299){if(this._status=y.c.kBuffering,d.responseURL!=null){var p=this._seekHandler.removeURLParameters(d.responseURL);d.responseURL!==this._currentRequestURL&&p!==this._currentRedirectedURL&&(this._currentRedirectedURL=p,this._onURLRedirect&&this._onURLRedirect(p))}var V=d.getResponseHeader("Content-Length");if(V!=null&&this._contentLength==null){var J=parseInt(V);J>0&&(this._contentLength=J,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=y.c.kError,!this._onError)throw new g.d("MSStreamLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}else if(d.readyState===3&&d.status>=200&&d.status<=299){this._status=y.c.kBuffering;var G=d.response;this._reader.readAsArrayBuffer(G)}},c.prototype._xhrOnError=function(_){this._status=y.c.kError;var d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type};if(!this._onError)throw new g.d(p.msg);this._onError(d,p)},c.prototype._msrOnProgress=function(_){var d=_.target.result;if(d!=null){var p=d.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=d.byteLength;var V=this._totalRange.from+this._receivedLength;this._receivedLength+=p.byteLength,this._onDataArrival&&this._onDataArrival(p,V,this._receivedLength),d.byteLength>=this._bufferLimit&&(M.a.v(this.TAG,"MSStream buffer exceeded max size near ".concat(V+p.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()},c.prototype._doReconnectIfNeeded=function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var _={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,_,!0)}},c.prototype._msrOnLoad=function(_){this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)},c.prototype._msrOnError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&this._receivedLength<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"MSStream meet Early-Eof"}):(d=y.b.EARLY_EOF,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)}}(y.a),function(){var D=function(c,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(c,_)};return function(c,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=c}D(c,_),c.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}()),U=function(D){function c(_,d){var p=D.call(this,"xhr-range-loader")||this;return p.TAG="RangeLoader",p._seekHandler=_,p._config=d,p._needStash=!1,p._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],p._currentChunkSizeKB=384,p._currentSpeedNormalized=0,p._zeroSpeedChunkCount=0,p._xhr=null,p._speedSampler=new f,p._requestAbort=!1,p._waitForTotalLength=!1,p._totalLengthReceived=!1,p._currentRequestURL=null,p._currentRedirectedURL=null,p._currentRequestRange=null,p._totalLength=null,p._contentLength=null,p._receivedLength=0,p._lastTimeLoaded=0,p}return x(c,D),c.isSupported=function(){try{var _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="arraybuffer",_.responseType==="arraybuffer"}catch(d){return M.a.w("RangeLoader",d.message),!1}},c.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),D.prototype.destroy.call(this)},Object.defineProperty(c.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),c.prototype.open=function(_,d){this._dataSource=_,this._range=d,this._status=y.c.kConnecting;var p=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(p=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||p?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},c.prototype._openSubRange=function(){var _=1024*this._currentChunkSizeKB,d=this._range.from+this._receivedLength,p=d+_;this._contentLength!=null&&p-this._range.from>=this._contentLength&&(p=this._range.from+this._contentLength-1),this._currentRequestRange={from:d,to:p},this._internalOpen(this._dataSource,this._currentRequestRange)},c.prototype._internalOpen=function(_,d){this._lastTimeLoaded=0;var p=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?p=this._currentRedirectedURL:_.redirectedURL!=null&&(p=_.redirectedURL));var V=this._seekHandler.getConfig(p,d);this._currentRequestURL=V.url;var J=this._xhr=new XMLHttpRequest;if(J.open("GET",V.url,!0),J.responseType="arraybuffer",J.onreadystatechange=this._onReadyStateChange.bind(this),J.onprogress=this._onProgress.bind(this),J.onload=this._onLoad.bind(this),J.onerror=this._onXhrError.bind(this),_.withCredentials&&(J.withCredentials=!0),typeof V.headers=="object"){var G=V.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}if(typeof this._config.headers=="object"){G=this._config.headers;for(var Y in G)G.hasOwnProperty(Y)&&J.setRequestHeader(Y,G[Y])}J.send()},c.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=y.c.kComplete},c.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},c.prototype._onReadyStateChange=function(_){var d=_.target;if(d.readyState===2){if(d.responseURL!=null){var p=this._seekHandler.removeURLParameters(d.responseURL);d.responseURL!==this._currentRequestURL&&p!==this._currentRedirectedURL&&(this._currentRedirectedURL=p,this._onURLRedirect&&this._onURLRedirect(p))}if(d.status>=200&&d.status<=299){if(this._waitForTotalLength)return;this._status=y.c.kBuffering}else{if(this._status=y.c.kError,!this._onError)throw new g.d("RangeLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(y.b.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}}},c.prototype._onProgress=function(_){if(this._status!==y.c.kError){if(this._contentLength===null){var d=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,d=!0;var p=_.total;this._internalAbort(),p!=null&p!==0&&(this._totalLength=p)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,d)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var V=_.loaded-this._lastTimeLoaded;this._lastTimeLoaded=_.loaded,this._speedSampler.addBytes(V)}},c.prototype._normalizeSpeed=function(_){var d=this._chunkSizeKBList,p=d.length-1,V=0,J=0,G=p;if(_<d[0])return d[0];for(;J<=G;){if((V=J+Math.floor((G-J)/2))===p||_>=d[V]&&_<d[V+1])return d[V];d[V]<_?J=V+1:G=V-1}},c.prototype._onLoad=function(_){if(this._status!==y.c.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var d=this._speedSampler.lastSecondKBps;if(d===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(d=this._speedSampler.currentKBps)),d!==0){var p=this._normalizeSpeed(d);this._currentSpeedNormalized!==p&&(this._currentSpeedNormalized=p,this._currentChunkSizeKB=p)}var V=_.target.response,J=this._range.from+this._receivedLength;this._receivedLength+=V.byteLength;var G=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():G=!0,this._onDataArrival&&this._onDataArrival(V,J,this._receivedLength),G&&(this._status=y.c.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},c.prototype._onXhrError=function(_){this._status=y.c.kError;var d=0,p=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(d=y.b.EARLY_EOF,p={code:-1,msg:"RangeLoader meet Early-Eof"}):(d=y.b.EXCEPTION,p={code:-1,msg:_.constructor.name+" "+_.type}),!this._onError)throw new g.d(p.msg);this._onError(d,p)},c}(y.a),B=function(){var D=function(c,_){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var V in p)Object.prototype.hasOwnProperty.call(p,V)&&(d[V]=p[V])})(c,_)};return function(c,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function d(){this.constructor=c}D(c,_),c.prototype=_===null?Object.create(_):(d.prototype=_.prototype,new d)}}(),K=function(D){function c(){var _=D.call(this,"websocket-loader")||this;return _.TAG="WebSocketLoader",_._needStash=!0,_._ws=null,_._requestAbort=!1,_._receivedLength=0,_}return B(c,D),c.isSupported=function(){try{return self.WebSocket!==void 0}catch(_){return!1}},c.prototype.destroy=function(){this._ws&&this.abort(),D.prototype.destroy.call(this)},c.prototype.open=function(_){try{var d=this._ws=new self.WebSocket(_.url);d.binaryType="arraybuffer",d.onopen=this._onWebSocketOpen.bind(this),d.onclose=this._onWebSocketClose.bind(this),d.onmessage=this._onWebSocketMessage.bind(this),d.onerror=this._onWebSocketError.bind(this),this._status=y.c.kConnecting}catch(V){this._status=y.c.kError;var p={code:V.code,msg:V.message};if(!this._onError)throw new g.d(p.msg);this._onError(y.b.EXCEPTION,p)}},c.prototype.abort=function(){var _=this._ws;!_||_.readyState!==0&&_.readyState!==1||(this._requestAbort=!0,_.close()),this._ws=null,this._status=y.c.kComplete},c.prototype._onWebSocketOpen=function(_){this._status=y.c.kBuffering},c.prototype._onWebSocketClose=function(_){this._requestAbort!==!0?(this._status=y.c.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},c.prototype._onWebSocketMessage=function(_){var d=this;if(_.data instanceof ArrayBuffer)this._dispatchArrayBuffer(_.data);else if(_.data instanceof Blob){var p=new FileReader;p.onload=function(){d._dispatchArrayBuffer(p.result)},p.readAsArrayBuffer(_.data)}else{this._status=y.c.kError;var V={code:-1,msg:"Unsupported WebSocket message type: "+_.data.constructor.name};if(!this._onError)throw new g.d(V.msg);this._onError(y.b.EXCEPTION,V)}},c.prototype._dispatchArrayBuffer=function(_){var d=_,p=this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,p,this._receivedLength)},c.prototype._onWebSocketError=function(_){this._status=y.c.kError;var d={code:_.code,msg:_.message};if(!this._onError)throw new g.d(d.msg);this._onError(y.b.EXCEPTION,d)},c}(y.a),k=function(){function D(c){this._zeroStart=c||!1}return D.prototype.getConfig=function(c,_){var d={};if(_.from!==0||_.to!==-1){var p=void 0;p=_.to!==-1?"bytes=".concat(_.from.toString(),"-").concat(_.to.toString()):"bytes=".concat(_.from.toString(),"-"),d.Range=p}else this._zeroStart&&(d.Range="bytes=0-");return{url:c,headers:d}},D.prototype.removeURLParameters=function(c){return c},D}(),q=function(){function D(c,_){this._startName=c,this._endName=_}return D.prototype.getConfig=function(c,_){var d=c;if(_.from!==0||_.to!==-1){var p=!0;d.indexOf("?")===-1&&(d+="?",p=!1),p&&(d+="&"),d+="".concat(this._startName,"=").concat(_.from.toString()),_.to!==-1&&(d+="&".concat(this._endName,"=").concat(_.to.toString()))}return{url:d,headers:{}}},D.prototype.removeURLParameters=function(c){var _=c.split("?")[0],d=void 0,p=c.indexOf("?");p!==-1&&(d=c.substring(p+1));var V="";if(d!=null&&d.length>0)for(var J=d.split("&"),G=0;G<J.length;G++){var Y=J[G].split("="),se=G>0;Y[0]!==this._startName&&Y[0]!==this._endName&&(se&&(V+="&"),V+=J[G])}return V.length===0?_:_+"?"+V},D}(),W=function(){function D(c,_,d){this.TAG="IOController",this._config=_,this._extraData=d,this._stashInitialSize=65536,_.stashInitialSize!=null&&_.stashInitialSize>0&&(this._stashInitialSize=_.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=Math.max(this._stashSize,3145728),this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,_.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=c,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(c.url),this._refTotalLength=c.filesize?c.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new f,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return D.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},D.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},D.prototype.isPaused=function(){return this._paused},Object.defineProperty(D.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"extraData",{get:function(){return this._extraData},set:function(c){this._extraData=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(c){this._onDataArrival=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(c){this._onSeeked=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onError",{get:function(){return this._onError},set:function(c){this._onError=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onComplete",{get:function(){return this._onComplete},set:function(c){this._onComplete=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(c){this._onRedirect=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(c){this._onRecoveredEarlyEof=c},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"currentSpeed",{get:function(){return this._loaderClass===U?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),D.prototype._selectSeekHandler=function(){var c=this._config;if(c.seekType==="range")this._seekHandler=new k(this._config.rangeLoadZeroStart);else if(c.seekType==="param"){var _=c.seekParamStart||"bstart",d=c.seekParamEnd||"bend";this._seekHandler=new q(_,d)}else{if(c.seekType!=="custom")throw new g.b("Invalid seekType in config: ".concat(c.seekType));if(typeof c.customSeekHandler!="function")throw new g.b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new c.customSeekHandler}},D.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=K;else if(E.isSupported())this._loaderClass=E;else if(I.isSupported())this._loaderClass=I;else{if(!U.isSupported())throw new g.d("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=U}},D.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},D.prototype.open=function(c){this._currentRange={from:0,to:-1},c&&(this._currentRange.from=c),this._speedSampler.reset(),c||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},D.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},D.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},D.prototype.resume=function(){if(this._paused){this._paused=!1;var c=this._resumeFrom;this._resumeFrom=0,this._internalSeek(c,!0)}},D.prototype.seek=function(c){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(c,!0)},D.prototype._internalSeek=function(c,_){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(_),this._loader.destroy(),this._loader=null;var d={from:c,to:-1};this._currentRange={from:d.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,d),this._onSeeked&&this._onSeeked()},D.prototype.updateUrl=function(c){if(!c||typeof c!="string"||c.length===0)throw new g.b("Url must be a non-empty string!");this._dataSource.url=c},D.prototype._expandBuffer=function(c){for(var _=this._stashSize;_+1048576<c;)_*=2;if((_+=1048576)!==this._bufferSize){var d=new ArrayBuffer(_);if(this._stashUsed>0){var p=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(d,0,_).set(p,0)}this._stashBuffer=d,this._bufferSize=_}},D.prototype._normalizeSpeed=function(c){var _=this._speedNormalizeList,d=_.length-1,p=0,V=0,J=d;if(c<_[0])return _[0];for(;V<=J;){if((p=V+Math.floor((J-V)/2))===d||c>=_[p]&&c<_[p+1])return _[p];_[p]<c?V=p+1:J=p-1}},D.prototype._adjustStashSize=function(c){var _=0;(_=this._config.isLive?c/8:c<512?c:c>=512&&c<=1024?Math.floor(1.5*c):2*c)>8192&&(_=8192);var d=1024*_+1048576;this._bufferSize<d&&this._expandBuffer(d),this._stashSize=1024*_},D.prototype._dispatchChunks=function(c,_){return this._currentRange.to=_+c.byteLength-1,this._onDataArrival(c,_)},D.prototype._onURLRedirect=function(c){this._redirectedURL=c,this._onRedirect&&this._onRedirect(c)},D.prototype._onContentLengthKnown=function(c){c&&this._fullRequestFlag&&(this._totalLength=c,this._fullRequestFlag=!1)},D.prototype._onLoaderChunkArrival=function(c,_,d){if(!this._onDataArrival)throw new g.a("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(c.byteLength);var p=this._speedSampler.lastSecondKBps;if(p!==0){var V=this._normalizeSpeed(p);this._speedNormalized!==V&&(this._speedNormalized=V,this._adjustStashSize(V))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=_),this._stashUsed+c.byteLength<=this._stashSize)(Y=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(c),this._stashUsed),this._stashUsed+=c.byteLength;else if(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize),this._stashUsed>0){var J=this._stashBuffer.slice(0,this._stashUsed);(se=this._dispatchChunks(J,this._stashByteStart))<J.byteLength?se>0&&(Ee=new Uint8Array(J,se),Y.set(Ee,0),this._stashUsed=Ee.byteLength,this._stashByteStart+=se):(this._stashUsed=0,this._stashByteStart+=se),this._stashUsed+c.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+c.byteLength),Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Y.set(new Uint8Array(c),this._stashUsed),this._stashUsed+=c.byteLength}else(se=this._dispatchChunks(c,_))<c.byteLength&&((G=c.byteLength-se)>this._bufferSize&&(this._expandBuffer(G),Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Y.set(new Uint8Array(c,se),0),this._stashUsed+=G,this._stashByteStart=_+se);else if(this._stashUsed===0){var G;(se=this._dispatchChunks(c,_))<c.byteLength&&((G=c.byteLength-se)>this._bufferSize&&this._expandBuffer(G),(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(c,se),0),this._stashUsed+=G,this._stashByteStart=_+se)}else{var Y,se;if(this._stashUsed+c.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+c.byteLength),(Y=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(c),this._stashUsed),this._stashUsed+=c.byteLength,(se=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&se>0){var Ee=new Uint8Array(this._stashBuffer,se);Y.set(Ee,0)}this._stashUsed-=se,this._stashByteStart+=se}}},D.prototype._flushStashBuffer=function(c){if(this._stashUsed>0){var _=this._stashBuffer.slice(0,this._stashUsed),d=this._dispatchChunks(_,this._stashByteStart),p=_.byteLength-d;if(d<_.byteLength){if(!c){if(d>0){var V=new Uint8Array(this._stashBuffer,0,this._bufferSize),J=new Uint8Array(_,d);V.set(J,0),this._stashUsed=J.byteLength,this._stashByteStart+=d}return 0}M.a.w(this.TAG,"".concat(p," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,p}return 0},D.prototype._onLoaderComplete=function(c,_){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},D.prototype._onLoaderError=function(c,_){switch(M.a.e(this.TAG,"Loader error, code = ".concat(_.code,", msg = ").concat(_.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,c=y.b.UNRECOVERABLE_EARLY_EOF),c){case y.b.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var d=this._currentRange.to+1;return void(d<this._totalLength&&(M.a.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(d,!1)))}c=y.b.UNRECOVERABLE_EARLY_EOF;break;case y.b.UNRECOVERABLE_EARLY_EOF:case y.b.CONNECTING_TIMEOUT:case y.b.HTTP_STATUS_CODE_INVALID:case y.b.EXCEPTION:}if(!this._onError)throw new g.d("IOException: "+_.msg);this._onError(c,_)},D}();te.a=W},function(me,te,O){var F=function(){function M(){}return M.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(f,y){return f.__proto__=y,f},Object.assign=Object.assign||function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(f),v=1;v<arguments.length;v++){var g=arguments[v];if(g!=null)for(var T in g)g.hasOwnProperty(T)&&(y[T]=g[T])}return y},String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(f,y){var v=y>0?0|y:0;return this.substring(v,v+f.length)===f}}),typeof self.Promise!="function"&&O(21).polyfill()},M}();F.install(),te.a=F},function(me,te,O){var F=O(9),M=O.n(F),f=O(0),y=O(5),v=O(7),g=O(3),T=function(){function E(L){this.TAG="MSEController",this._config=L,this._emitter=new M.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onStartStreaming:this._onStartStreaming.bind(this),onEndStreaming:this._onEndStreaming.bind(this),onQualityChange:this._onQualityChange.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._useManagedMediaSource="ManagedMediaSource"in self&&!("MediaSource"in self),this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElementProxy=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]}}return E.prototype.destroy=function(){this._mediaSource&&this.shutdown(),this._mediaSourceObjectURL&&this.revokeObjectURL(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},E.prototype.on=function(L,I){this._emitter.addListener(L,I)},E.prototype.off=function(L,I){this._emitter.removeListener(L,I)},E.prototype.initialize=function(L){if(this._mediaSource)throw new g.a("MediaSource has been attached to an HTMLMediaElement!");this._useManagedMediaSource&&f.a.v(this.TAG,"Using ManagedMediaSource");var I=this._mediaSource=this._useManagedMediaSource?new self.ManagedMediaSource:new self.MediaSource;I.addEventListener("sourceopen",this.e.onSourceOpen),I.addEventListener("sourceended",this.e.onSourceEnded),I.addEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(I.addEventListener("startstreaming",this.e.onStartStreaming),I.addEventListener("endstreaming",this.e.onEndStreaming),I.addEventListener("qualitychange",this.e.onQualityChange)),this._mediaElementProxy=L},E.prototype.shutdown=function(){if(this._mediaSource){var L=this._mediaSource;for(var I in this._sourceBuffers){var w=this._pendingSegments[I];w.splice(0,w.length),this._pendingSegments[I]=null,this._pendingRemoveRanges[I]=null,this._lastInitSegments[I]=null;var x=this._sourceBuffers[I];if(x){if(L.readyState!=="closed"){try{L.removeSourceBuffer(x)}catch(U){f.a.e(this.TAG,U.message)}x.removeEventListener("error",this.e.onSourceBufferError),x.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[I]=null,this._sourceBuffers[I]=null}}if(L.readyState==="open")try{L.endOfStream()}catch(U){f.a.e(this.TAG,U.message)}this._mediaElementProxy=null,L.removeEventListener("sourceopen",this.e.onSourceOpen),L.removeEventListener("sourceended",this.e.onSourceEnded),L.removeEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(L.removeEventListener("startstreaming",this.e.onStartStreaming),L.removeEventListener("endstreaming",this.e.onEndStreaming),L.removeEventListener("qualitychange",this.e.onQualityChange)),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._mediaSource=null}},E.prototype.isManagedMediaSource=function(){return this._useManagedMediaSource},E.prototype.getObject=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSource},E.prototype.getHandle=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSource.handle},E.prototype.getObjectURL=function(){if(!this._mediaSource)throw new g.a("MediaSource has not been initialized yet!");return this._mediaSourceObjectURL==null&&(this._mediaSourceObjectURL=URL.createObjectURL(this._mediaSource)),this._mediaSourceObjectURL},E.prototype.revokeObjectURL=function(){this._mediaSourceObjectURL&&(URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},E.prototype.appendInitSegment=function(L,I){if(I===void 0&&(I=void 0),!this._mediaSource||this._mediaSource.readyState!=="open"||this._mediaSource.streaming===!1)return this._pendingSourceBufferInit.push(L),void this._pendingSegments[L.type].push(L);var w=L,x="".concat(w.container);w.codec&&w.codec.length>0&&(w.codec==="opus"&&y.a.safari&&(w.codec="Opus"),x+=";codecs=".concat(w.codec));var U=!1;if(f.a.v(this.TAG,"Received Initialization Segment, mimeType: "+x),this._lastInitSegments[w.type]=w,x!==this._mimeTypes[w.type]){if(this._mimeTypes[w.type])f.a.v(this.TAG,"Notice: ".concat(w.type," mimeType changed, origin: ").concat(this._mimeTypes[w.type],", target: ").concat(x));else{U=!0;try{var B=this._sourceBuffers[w.type]=this._mediaSource.addSourceBuffer(x);B.addEventListener("error",this.e.onSourceBufferError),B.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(K){return f.a.e(this.TAG,K.message),void this._emitter.emit(v.a.ERROR,{code:K.code,msg:K.message})}}this._mimeTypes[w.type]=x}I||this._pendingSegments[w.type].push(w),U||this._sourceBuffers[w.type]&&!this._sourceBuffers[w.type].updating&&this._doAppendSegments(),y.a.safari&&w.container==="audio/mpeg"&&w.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=w.mediaDuration/1e3,this._updateMediaSourceDuration())},E.prototype.appendMediaSegment=function(L){var I=L;this._pendingSegments[I.type].push(I),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var w=this._sourceBuffers[I.type];!w||w.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},E.prototype.flush=function(){for(var L in this._sourceBuffers)if(this._sourceBuffers[L]){var I=this._sourceBuffers[L];if(this._mediaSource.readyState==="open")try{I.abort()}catch(k){f.a.e(this.TAG,k.message)}var w=this._pendingSegments[L];if(w.splice(0,w.length),this._mediaSource.readyState!=="closed"){for(var x=0;x<I.buffered.length;x++){var U=I.buffered.start(x),B=I.buffered.end(x);this._pendingRemoveRanges[L].push({start:U,end:B})}if(I.updating||this._doRemoveRanges(),y.a.safari){var K=this._lastInitSegments[L];K&&(this._pendingSegments[L].push(K),I.updating||this._doAppendSegments())}}}},E.prototype.endOfStream=function(){var L=this._mediaSource,I=this._sourceBuffers;L&&L.readyState==="open"?I.video&&I.video.updating||I.audio&&I.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,L.endOfStream()):L&&L.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},E.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var L=this._mediaElementProxy.getCurrentTime();for(var I in this._sourceBuffers){var w=this._sourceBuffers[I];if(w){var x=w.buffered;if(x.length>=1&&L-x.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},E.prototype._doCleanupSourceBuffer=function(){var L=this._mediaElementProxy.getCurrentTime();for(var I in this._sourceBuffers){var w=this._sourceBuffers[I];if(w){for(var x=w.buffered,U=!1,B=0;B<x.length;B++){var K=x.start(B),k=x.end(B);if(K<=L&&L<k+3){if(L-K>=this._config.autoCleanupMaxBackwardDuration){U=!0;var q=L-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[I].push({start:K,end:q})}}else k<L&&(U=!0,this._pendingRemoveRanges[I].push({start:K,end:k}))}U&&!w.updating&&this._doRemoveRanges()}}},E.prototype._updateMediaSourceDuration=function(){var L=this._sourceBuffers;if(this._mediaElementProxy.getReadyState()!==0&&this._mediaSource.readyState==="open"&&!(L.video&&L.video.updating||L.audio&&L.audio.updating)){var I=this._mediaSource.duration,w=this._pendingMediaDuration;w>0&&(isNaN(I)||w>I)&&(f.a.v(this.TAG,"Update MediaSource duration from ".concat(I," to ").concat(w)),this._mediaSource.duration=w),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},E.prototype._doRemoveRanges=function(){for(var L in this._pendingRemoveRanges)if(this._sourceBuffers[L]&&!this._sourceBuffers[L].updating)for(var I=this._sourceBuffers[L],w=this._pendingRemoveRanges[L];w.length&&!I.updating;){var x=w.shift();I.remove(x.start,x.end)}},E.prototype._doAppendSegments=function(){var L=this._pendingSegments;for(var I in L)if(this._sourceBuffers[I]&&!this._sourceBuffers[I].updating&&this._mediaSource.streaming!==!1&&L[I].length>0){var w=L[I].shift();if(typeof w.timestampOffset=="number"&&isFinite(w.timestampOffset)){var x=this._sourceBuffers[I].timestampOffset,U=w.timestampOffset/1e3;Math.abs(x-U)>.1&&(f.a.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(x," to ").concat(U)),this._sourceBuffers[I].timestampOffset=U),delete w.timestampOffset}if(!w.data||w.data.byteLength===0)continue;try{this._sourceBuffers[I].appendBuffer(w.data),this._isBufferFull=!1}catch(B){this._pendingSegments[I].unshift(w),B.code===22?(this._isBufferFull||this._emitter.emit(v.a.BUFFER_FULL),this._isBufferFull=!0):(f.a.e(this.TAG,B.message),this._emitter.emit(v.a.ERROR,{code:B.code,msg:B.message}))}}},E.prototype._onSourceOpen=function(){if(f.a.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var L=this._pendingSourceBufferInit;L.length;){var I=L.shift();this.appendInitSegment(I,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(v.a.SOURCE_OPEN)},E.prototype._onStartStreaming=function(){f.a.v(this.TAG,"ManagedMediaSource onStartStreaming"),this._emitter.emit(v.a.START_STREAMING)},E.prototype._onEndStreaming=function(){f.a.v(this.TAG,"ManagedMediaSource onEndStreaming"),this._emitter.emit(v.a.END_STREAMING)},E.prototype._onQualityChange=function(){f.a.v(this.TAG,"ManagedMediaSource onQualityChange")},E.prototype._onSourceEnded=function(){f.a.v(this.TAG,"MediaSource onSourceEnded")},E.prototype._onSourceClose=function(){f.a.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose),this._useManagedMediaSource&&(this._mediaSource.removeEventListener("startstreaming",this.e.onStartStreaming),this._mediaSource.removeEventListener("endstreaming",this.e.onEndStreaming),this._mediaSource.removeEventListener("qualitychange",this.e.onQualityChange)))},E.prototype._hasPendingSegments=function(){var L=this._pendingSegments;return L.video.length>0||L.audio.length>0},E.prototype._hasPendingRemoveRanges=function(){var L=this._pendingRemoveRanges;return L.video.length>0||L.audio.length>0},E.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(v.a.UPDATE_END)},E.prototype._onSourceBufferError=function(L){f.a.e(this.TAG,"SourceBuffer Error: ".concat(L))},E}();te.a=T},function(me,te,O){var F=O(9),M=O.n(F),f=O(18),y=O.n(f),v=O(0),g=O(8),T=O(13),E=O(1),L=(O(19),O(12)),I=function(){function w(x,U){if(this.TAG="Transmuxer",this._emitter=new M.a,U.enableWorker&&typeof Worker<"u")try{this._worker=y()(19),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[x,U]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},g.a.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:g.a.getConfig()})}catch(K){v.a.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new T.a(x,U)}else this._controller=new T.a(x,U);if(this._controller){var B=this._controller;B.on(E.a.IO_ERROR,this._onIOError.bind(this)),B.on(E.a.DEMUX_ERROR,this._onDemuxError.bind(this)),B.on(E.a.INIT_SEGMENT,this._onInitSegment.bind(this)),B.on(E.a.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),B.on(E.a.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),B.on(E.a.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),B.on(E.a.MEDIA_INFO,this._onMediaInfo.bind(this)),B.on(E.a.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),B.on(E.a.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),B.on(E.a.TIMED_ID3_METADATA_ARRIVED,this._onTimedID3MetadataArrived.bind(this)),B.on(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,this._onSynchronousKLVMetadataArrived.bind(this)),B.on(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,this._onAsynchronousKLVMetadataArrived.bind(this)),B.on(E.a.SMPTE2038_METADATA_ARRIVED,this._onSMPTE2038MetadataArrived.bind(this)),B.on(E.a.SCTE35_METADATA_ARRIVED,this._onSCTE35MetadataArrived.bind(this)),B.on(E.a.PES_PRIVATE_DATA_DESCRIPTOR,this._onPESPrivateDataDescriptor.bind(this)),B.on(E.a.PES_PRIVATE_DATA_ARRIVED,this._onPESPrivateDataArrived.bind(this)),B.on(E.a.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),B.on(E.a.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return w.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),g.a.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},w.prototype.on=function(x,U){this._emitter.addListener(x,U)},w.prototype.off=function(x,U){this._emitter.removeListener(x,U)},w.prototype.hasWorker=function(){return this._worker!=null},w.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},w.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},w.prototype.seek=function(x){this._worker?this._worker.postMessage({cmd:"seek",param:x}):this._controller.seek(x)},w.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},w.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},w.prototype._onInitSegment=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.INIT_SEGMENT,x,U)})},w.prototype._onMediaSegment=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.MEDIA_SEGMENT,x,U)})},w.prototype._onLoadingComplete=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(E.a.LOADING_COMPLETE)})},w.prototype._onRecoveredEarlyEof=function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(E.a.RECOVERED_EARLY_EOF)})},w.prototype._onMediaInfo=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.MEDIA_INFO,x)})},w.prototype._onMetaDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.METADATA_ARRIVED,x)})},w.prototype._onScriptDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SCRIPTDATA_ARRIVED,x)})},w.prototype._onTimedID3MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.TIMED_ID3_METADATA_ARRIVED,x)})},w.prototype._onSynchronousKLVMetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,x)})},w.prototype._onAsynchronousKLVMetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,x)})},w.prototype._onSMPTE2038MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SMPTE2038_METADATA_ARRIVED,x)})},w.prototype._onSCTE35MetadataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.SCTE35_METADATA_ARRIVED,x)})},w.prototype._onPESPrivateDataDescriptor=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.PES_PRIVATE_DATA_DESCRIPTOR,x)})},w.prototype._onPESPrivateDataArrived=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.PES_PRIVATE_DATA_ARRIVED,x)})},w.prototype._onStatisticsInfo=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.STATISTICS_INFO,x)})},w.prototype._onIOError=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.IO_ERROR,x,U)})},w.prototype._onDemuxError=function(x,U){var B=this;Promise.resolve().then(function(){B._emitter.emit(E.a.DEMUX_ERROR,x,U)})},w.prototype._onRecommendSeekpoint=function(x){var U=this;Promise.resolve().then(function(){U._emitter.emit(E.a.RECOMMEND_SEEKPOINT,x)})},w.prototype._onLoggingConfigChanged=function(x){this._worker&&this._worker.postMessage({cmd:"logging_config",param:x})},w.prototype._onWorkerMessage=function(x){var U=x.data,B=U.data;if(U.msg==="destroyed"||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(U.msg){case E.a.INIT_SEGMENT:case E.a.MEDIA_SEGMENT:this._emitter.emit(U.msg,B.type,B.data);break;case E.a.LOADING_COMPLETE:case E.a.RECOVERED_EARLY_EOF:this._emitter.emit(U.msg);break;case E.a.MEDIA_INFO:Object.setPrototypeOf(B,L.a.prototype),this._emitter.emit(U.msg,B);break;case E.a.METADATA_ARRIVED:case E.a.SCRIPTDATA_ARRIVED:case E.a.TIMED_ID3_METADATA_ARRIVED:case E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED:case E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED:case E.a.SMPTE2038_METADATA_ARRIVED:case E.a.SCTE35_METADATA_ARRIVED:case E.a.PES_PRIVATE_DATA_DESCRIPTOR:case E.a.PES_PRIVATE_DATA_ARRIVED:case E.a.STATISTICS_INFO:this._emitter.emit(U.msg,B);break;case E.a.IO_ERROR:case E.a.DEMUX_ERROR:this._emitter.emit(U.msg,B.type,B.info);break;case E.a.RECOMMEND_SEEKPOINT:this._emitter.emit(U.msg,B);break;case"logcat_callback":v.a.emitter.emit("log",B.type,B.logcat)}},w}();te.a=I},function(me,te,O){function F(v){var g={};function T(L){if(g[L])return g[L].exports;var I=g[L]={i:L,l:!1,exports:{}};return v[L].call(I.exports,I,I.exports,T),I.l=!0,I.exports}T.m=v,T.c=g,T.i=function(L){return L},T.d=function(L,I,w){T.o(L,I)||Object.defineProperty(L,I,{configurable:!1,enumerable:!0,get:w})},T.r=function(L){Object.defineProperty(L,"__esModule",{value:!0})},T.n=function(L){var I=L&&L.__esModule?function(){return L.default}:function(){return L};return T.d(I,"a",I),I},T.o=function(L,I){return Object.prototype.hasOwnProperty.call(L,I)},T.p="/",T.oe=function(L){throw console.error(L),L};var E=T(T.s=ENTRY_MODULE);return E.default||E}function M(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function f(v,g,T){var E={};E[T]=[];var L=g.toString(),I=L.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!I)return E;for(var w,x=I[1],U=new RegExp("(\\\\n|\\W)"+M(x)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");w=U.exec(L);)w[3]!=="dll-reference"&&E[T].push(w[3]);for(U=new RegExp("\\("+M(x)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");w=U.exec(L);)v[w[2]]||(E[T].push(w[1]),v[w[2]]=O(w[1]).m),E[w[2]]=E[w[2]]||[],E[w[2]].push(w[4]);for(var B,K=Object.keys(E),k=0;k<K.length;k++)for(var q=0;q<E[K[k]].length;q++)B=E[K[k]][q],isNaN(1*B)||(E[K[k]][q]=1*E[K[k]][q]);return E}function y(v){return Object.keys(v).reduce(function(g,T){return g||v[T].length>0},!1)}me.exports=function(v,g){g=g||{};var T={main:O.m},E=g.all?{main:Object.keys(T.main)}:function(U,B){for(var K={main:[B]},k={main:[]},q={main:{}};y(K);)for(var W=Object.keys(K),D=0;D<W.length;D++){var c=W[D],_=K[c].pop();if(q[c]=q[c]||{},!q[c][_]&&U[c][_]){q[c][_]=!0,k[c]=k[c]||[],k[c].push(_);for(var d=f(U,U[c][_],c),p=Object.keys(d),V=0;V<p.length;V++)K[p[V]]=K[p[V]]||[],K[p[V]]=K[p[V]].concat(d[p[V]])}}return k}(T,v),L="";Object.keys(E).filter(function(U){return U!=="main"}).forEach(function(U){for(var B=0;E[U][B];)B++;E[U].push(B),T[U][B]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",L=L+"var "+U+" = ("+F.toString().replace("ENTRY_MODULE",JSON.stringify(B))+")({"+E[U].map(function(K){return JSON.stringify(K)+": "+T[U][K].toString()}).join(",")+"});\n"}),L=L+"new (("+F.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+E.main.map(function(U){return JSON.stringify(U)+": "+T.main[U].toString()}).join(",")+"}))(self);";var I=new self.Blob([L],{type:"text/javascript"});if(g.bare)return I;var w=(self.URL||self.webkitURL||self.mozURL||self.msURL).createObjectURL(I),x=new self.Worker(w);return x.objectURL=w,x}},function(me,te,O){O.r(te),O(0);var F=O(8),M=O(15),f=O(13),y=O(1);te.default=function(v){var g=null,T=(function(G,Y){v.postMessage({msg:"logcat_callback",data:{type:G,logcat:Y}})}).bind(this);function E(G,Y){var se={msg:y.a.INIT_SEGMENT,data:{type:G,data:Y}};v.postMessage(se,[Y.data])}function L(G,Y){var se={msg:y.a.MEDIA_SEGMENT,data:{type:G,data:Y}};v.postMessage(se,[Y.data])}function I(){var G={msg:y.a.LOADING_COMPLETE};v.postMessage(G)}function w(){var G={msg:y.a.RECOVERED_EARLY_EOF};v.postMessage(G)}function x(G){var Y={msg:y.a.MEDIA_INFO,data:G};v.postMessage(Y)}function U(G){var Y={msg:y.a.METADATA_ARRIVED,data:G};v.postMessage(Y)}function B(G){var Y={msg:y.a.SCRIPTDATA_ARRIVED,data:G};v.postMessage(Y)}function K(G){var Y={msg:y.a.TIMED_ID3_METADATA_ARRIVED,data:G};v.postMessage(Y)}function k(G){var Y={msg:y.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,data:G};v.postMessage(Y)}function q(G){var Y={msg:y.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,data:G};v.postMessage(Y)}function W(G){var Y={msg:y.a.SMPTE2038_METADATA_ARRIVED,data:G};v.postMessage(Y)}function D(G){var Y={msg:y.a.SCTE35_METADATA_ARRIVED,data:G};v.postMessage(Y)}function c(G){var Y={msg:y.a.PES_PRIVATE_DATA_DESCRIPTOR,data:G};v.postMessage(Y)}function _(G){var Y={msg:y.a.PES_PRIVATE_DATA_ARRIVED,data:G};v.postMessage(Y)}function d(G){var Y={msg:y.a.STATISTICS_INFO,data:G};v.postMessage(Y)}function p(G,Y){v.postMessage({msg:y.a.IO_ERROR,data:{type:G,info:Y}})}function V(G,Y){v.postMessage({msg:y.a.DEMUX_ERROR,data:{type:G,info:Y}})}function J(G){v.postMessage({msg:y.a.RECOMMEND_SEEKPOINT,data:G})}M.a.install(),v.addEventListener("message",function(G){switch(G.data.cmd){case"init":(g=new f.a(G.data.param[0],G.data.param[1])).on(y.a.IO_ERROR,p.bind(this)),g.on(y.a.DEMUX_ERROR,V.bind(this)),g.on(y.a.INIT_SEGMENT,E.bind(this)),g.on(y.a.MEDIA_SEGMENT,L.bind(this)),g.on(y.a.LOADING_COMPLETE,I.bind(this)),g.on(y.a.RECOVERED_EARLY_EOF,w.bind(this)),g.on(y.a.MEDIA_INFO,x.bind(this)),g.on(y.a.METADATA_ARRIVED,U.bind(this)),g.on(y.a.SCRIPTDATA_ARRIVED,B.bind(this)),g.on(y.a.TIMED_ID3_METADATA_ARRIVED,K.bind(this)),g.on(y.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,k.bind(this)),g.on(y.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,q.bind(this)),g.on(y.a.SMPTE2038_METADATA_ARRIVED,W.bind(this)),g.on(y.a.SCTE35_METADATA_ARRIVED,D.bind(this)),g.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR,c.bind(this)),g.on(y.a.PES_PRIVATE_DATA_ARRIVED,_.bind(this)),g.on(y.a.STATISTICS_INFO,d.bind(this)),g.on(y.a.RECOMMEND_SEEKPOINT,J.bind(this));break;case"destroy":g&&(g.destroy(),g=null),v.postMessage({msg:"destroyed"});break;case"start":g.start();break;case"stop":g.stop();break;case"seek":g.seek(G.data.param);break;case"pause":g.pause();break;case"resume":g.resume();break;case"logging_config":var Y=G.data.param;F.a.applyConfig(Y),Y.enableCallback===!0?F.a.addLogListener(T):F.a.removeLogListener(T)}})}},function(me,te,O){me.exports=O(25).default},function(me,te,O){(function(F,M){/*!
2
+ * @overview es6-promise - a tiny implementation of Promises/A+.
3
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
4
+ * @license Licensed under MIT license
5
+ * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
6
+ * @version v4.2.8+1e68dce6
7
+ */var f;f=function(){function y(j){return typeof j=="function"}var v=Array.isArray?Array.isArray:function(j){return Object.prototype.toString.call(j)==="[object Array]"},g=0,T=void 0,E=void 0,L=function(j,X){k[g]=j,k[g+1]=X,(g+=2)===2&&(E?E(q):d())},I=typeof window<"u"?window:void 0,w=I||{},x=w.MutationObserver||w.WebKitMutationObserver,U=typeof self>"u"&&F!==void 0&&{}.toString.call(F)==="[object process]",B=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function K(){var j=setTimeout;return function(){return j(q,1)}}var k=new Array(1e3);function q(){for(var j=0;j<g;j+=2)(0,k[j])(k[j+1]),k[j]=void 0,k[j+1]=void 0;g=0}var W,D,c,_,d=void 0;function p(j,X){var ie=this,ce=new this.constructor(G);ce[J]===void 0&&de(ce);var he=ie._state;if(he){var ve=arguments[he-1];L(function(){return z(he,ce,ve,ie._result)})}else h(ie,ce,j,X);return ce}function V(j){if(j&&typeof j=="object"&&j.constructor===this)return j;var X=new this(G);return se(X,j),X}U?d=function(){return F.nextTick(q)}:x?(D=0,c=new x(q),_=document.createTextNode(""),c.observe(_,{characterData:!0}),d=function(){_.data=D=++D%2}):B?((W=new MessageChannel).port1.onmessage=q,d=function(){return W.port2.postMessage(0)}):d=I===void 0?function(){try{var j=Function("return this")().require("vertx");return(T=j.runOnLoop||j.runOnContext)!==void 0?function(){T(q)}:K()}catch(X){return K()}}():K();var J=Math.random().toString(36).substring(2);function G(){}function Y(j,X,ie){X.constructor===j.constructor&&ie===p&&X.constructor.resolve===V?function(ce,he){he._state===1?_e(ce,he._result):he._state===2?b(ce,he._result):h(he,void 0,function(ve){return se(ce,ve)},function(ve){return b(ce,ve)})}(j,X):ie===void 0?_e(j,X):y(ie)?function(ce,he,ve){L(function(Me){var Ce=!1,Ue=function(ke,He,Ye,Ze){try{ke.call(He,Ye,Ze)}catch(et){return et}}(ve,he,function(ke){Ce||(Ce=!0,he!==ke?se(Me,ke):_e(Me,ke))},function(ke){Ce||(Ce=!0,b(Me,ke))},Me._label);!Ce&&Ue&&(Ce=!0,b(Me,Ue))},ce)}(j,X,ie):_e(j,X)}function se(j,X){if(j===X)b(j,new TypeError("You cannot resolve a promise with itself"));else if(he=typeof(ce=X),ce===null||he!=="object"&&he!=="function")_e(j,X);else{var ie=void 0;try{ie=X.then}catch(ve){return void b(j,ve)}Y(j,X,ie)}var ce,he}function Ee(j){j._onerror&&j._onerror(j._result),C(j)}function _e(j,X){j._state===void 0&&(j._result=X,j._state=1,j._subscribers.length!==0&&L(C,j))}function b(j,X){j._state===void 0&&(j._state=2,j._result=X,L(Ee,j))}function h(j,X,ie,ce){var he=j._subscribers,ve=he.length;j._onerror=null,he[ve]=X,he[ve+1]=ie,he[ve+2]=ce,ve===0&&j._state&&L(C,j)}function C(j){var X=j._subscribers,ie=j._state;if(X.length!==0){for(var ce=void 0,he=void 0,ve=j._result,Me=0;Me<X.length;Me+=3)ce=X[Me],he=X[Me+ie],ce?z(ie,ce,he,ve):he(ve);j._subscribers.length=0}}function z(j,X,ie,ce){var he=y(ie),ve=void 0,Me=void 0,Ce=!0;if(he){try{ve=ie(ce)}catch(Ue){Ce=!1,Me=Ue}if(X===ve)return void b(X,new TypeError("A promises callback cannot return that same promise."))}else ve=ce;X._state!==void 0||(he&&Ce?se(X,ve):Ce===!1?b(X,Me):j===1?_e(X,ve):j===2&&b(X,ve))}var ne=0;function de(j){j[J]=ne++,j._state=void 0,j._result=void 0,j._subscribers=[]}var Te=function(){function j(X,ie){this._instanceConstructor=X,this.promise=new X(G),this.promise[J]||de(this.promise),v(ie)?(this.length=ie.length,this._remaining=ie.length,this._result=new Array(this.length),this.length===0?_e(this.promise,this._result):(this.length=this.length||0,this._enumerate(ie),this._remaining===0&&_e(this.promise,this._result))):b(this.promise,new Error("Array Methods must be provided an Array"))}return j.prototype._enumerate=function(X){for(var ie=0;this._state===void 0&&ie<X.length;ie++)this._eachEntry(X[ie],ie)},j.prototype._eachEntry=function(X,ie){var ce=this._instanceConstructor,he=ce.resolve;if(he===V){var ve=void 0,Me=void 0,Ce=!1;try{ve=X.then}catch(ke){Ce=!0,Me=ke}if(ve===p&&X._state!==void 0)this._settledAt(X._state,ie,X._result);else if(typeof ve!="function")this._remaining--,this._result[ie]=X;else if(ce===ye){var Ue=new ce(G);Ce?b(Ue,Me):Y(Ue,X,ve),this._willSettleAt(Ue,ie)}else this._willSettleAt(new ce(function(ke){return ke(X)}),ie)}else this._willSettleAt(he(X),ie)},j.prototype._settledAt=function(X,ie,ce){var he=this.promise;he._state===void 0&&(this._remaining--,X===2?b(he,ce):this._result[ie]=ce),this._remaining===0&&_e(he,this._result)},j.prototype._willSettleAt=function(X,ie){var ce=this;h(X,void 0,function(he){return ce._settledAt(1,ie,he)},function(he){return ce._settledAt(2,ie,he)})},j}(),ye=function(){function j(X){this[J]=ne++,this._result=this._state=void 0,this._subscribers=[],G!==X&&(typeof X!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof j?function(ie,ce){try{ce(function(he){se(ie,he)},function(he){b(ie,he)})}catch(he){b(ie,he)}}(this,X):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return j.prototype.catch=function(X){return this.then(null,X)},j.prototype.finally=function(X){var ie=this.constructor;return y(X)?this.then(function(ce){return ie.resolve(X()).then(function(){return ce})},function(ce){return ie.resolve(X()).then(function(){throw ce})}):this.then(X,X)},j}();return ye.prototype.then=p,ye.all=function(j){return new Te(this,j).promise},ye.race=function(j){var X=this;return v(j)?new X(function(ie,ce){for(var he=j.length,ve=0;ve<he;ve++)X.resolve(j[ve]).then(ie,ce)}):new X(function(ie,ce){return ce(new TypeError("You must pass an array to race."))})},ye.resolve=V,ye.reject=function(j){var X=new this(G);return b(X,j),X},ye._setScheduler=function(j){E=j},ye._setAsap=function(j){L=j},ye._asap=L,ye.polyfill=function(){var j=void 0;if(M!==void 0)j=M;else if(typeof self<"u")j=self;else try{j=Function("return this")()}catch(ce){throw new Error("polyfill failed because global object is unavailable in this environment")}var X=j.Promise;if(X){var ie=null;try{ie=Object.prototype.toString.call(X.resolve())}catch(ce){}if(ie==="[object Promise]"&&!X.cast)return}j.Promise=ye},ye.Promise=ye,ye},me.exports=f()}).call(this,O(22),O(23))},function(me,te){var O,F,M=me.exports={};function f(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}function v(B){if(O===setTimeout)return setTimeout(B,0);if((O===f||!O)&&setTimeout)return O=setTimeout,setTimeout(B,0);try{return O(B,0)}catch(K){try{return O.call(null,B,0)}catch(k){return O.call(this,B,0)}}}(function(){try{O=typeof setTimeout=="function"?setTimeout:f}catch(B){O=f}try{F=typeof clearTimeout=="function"?clearTimeout:y}catch(B){F=y}})();var g,T=[],E=!1,L=-1;function I(){E&&g&&(E=!1,g.length?T=g.concat(T):L=-1,T.length&&w())}function w(){if(!E){var B=v(I);E=!0;for(var K=T.length;K;){for(g=T,T=[];++L<K;)g&&g[L].run();L=-1,K=T.length}g=null,E=!1,function(k){if(F===clearTimeout)return clearTimeout(k);if((F===y||!F)&&clearTimeout)return F=clearTimeout,clearTimeout(k);try{F(k)}catch(q){try{return F.call(null,k)}catch(W){return F.call(this,k)}}}(B)}}function x(B,K){this.fun=B,this.array=K}function U(){}M.nextTick=function(B){var K=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)K[k-1]=arguments[k];T.push(new x(B,K)),T.length!==1||E||v(w)},x.prototype.run=function(){this.fun.apply(null,this.array)},M.title="browser",M.browser=!0,M.env={},M.argv=[],M.version="",M.versions={},M.on=U,M.addListener=U,M.once=U,M.off=U,M.removeListener=U,M.removeAllListeners=U,M.emit=U,M.prependListener=U,M.prependOnceListener=U,M.listeners=function(B){return[]},M.binding=function(B){throw new Error("process.binding is not supported")},M.cwd=function(){return"/"},M.chdir=function(B){throw new Error("process.chdir is not supported")},M.umask=function(){return 0}},function(me,te){var O;O=function(){return this}();try{O=O||new Function("return this")()}catch(F){typeof window=="object"&&(O=window)}me.exports=O},function(me,te,O){O.r(te);var F=O(0),M=O(8),f=O(3),y=O(7),v=O(16),g=O(17),T=O(1),E=O(4),L=O(10);te.default=function(I){var w="PlayerEngineWorker",x=(function(b,h){I.postMessage({msg:"logcat_callback",type:b,logcat:h})}).bind(void 0),U=null,B=null,K=null,k=null,q=!1,W=!1,D=0,c=0,_=!1;function d(){K&&(K.shutdown(),K.destroy(),K=null)}function p(){if(U==null||B==null)throw new f.a("Worker not initialized");if(k)throw new f.a("Transmuxer has been initialized");W||(!B.deferLoadAfterSourceOpen||q?((k=new g.a(U,B)).on(T.a.INIT_SEGMENT,function(b,h){K.appendInitSegment(h)}),k.on(T.a.MEDIA_SEGMENT,function(b,h){K.appendMediaSegment(h),I.postMessage({msg:"buffered_position_changed",buffered_position_milliseconds:h.info.endDts})}),k.on(T.a.LOADING_COMPLETE,function(){K.endOfStream(),I.postMessage({msg:"player_event",event:E.a.LOADING_COMPLETE})}),k.on(T.a.RECOVERED_EARLY_EOF,function(){I.postMessage({msg:"player_event",event:E.a.RECOVERED_EARLY_EOF})}),k.on(T.a.IO_ERROR,function(b,h){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.NETWORK_ERROR,error_detail:b,info:h})}),k.on(T.a.DEMUX_ERROR,function(b,h){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.MEDIA_ERROR,error_detail:b,info:h})}),k.on(T.a.MEDIA_INFO,function(b){Ee(T.a.MEDIA_INFO,b)}),k.on(T.a.STATISTICS_INFO,function(b){Ee(T.a.STATISTICS_INFO,b)}),k.on(T.a.RECOMMEND_SEEKPOINT,function(b){(function(h){I.postMessage({msg:"transmuxing_event",event:T.a.RECOMMEND_SEEKPOINT,milliseconds:h})})(b)}),k.on(T.a.METADATA_ARRIVED,function(b){_e(E.a.METADATA_ARRIVED,b)}),k.on(T.a.SCRIPTDATA_ARRIVED,function(b){_e(E.a.SCRIPTDATA_ARRIVED,b)}),k.on(T.a.TIMED_ID3_METADATA_ARRIVED,function(b){_e(E.a.TIMED_ID3_METADATA_ARRIVED,b)}),k.on(T.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,function(b){_e(E.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,b)}),k.on(T.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,function(b){_e(E.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,b)}),k.on(T.a.SMPTE2038_METADATA_ARRIVED,function(b){_e(E.a.SMPTE2038_METADATA_ARRIVED,b)}),k.on(T.a.SCTE35_METADATA_ARRIVED,function(b){_e(E.a.SCTE35_METADATA_ARRIVED,b)}),k.on(T.a.PES_PRIVATE_DATA_DESCRIPTOR,function(b){_e(E.a.PES_PRIVATE_DATA_DESCRIPTOR,b)}),k.on(T.a.PES_PRIVATE_DATA_ARRIVED,function(b){_e(E.a.PES_PRIVATE_DATA_ARRIVED,b)}),k.open()):W=!0)}function V(){K&&K.flush(),k&&(k.close(),k.destroy(),k=null)}function J(){q=!0,W&&(W=!1,p())}function G(){I.postMessage({msg:"mse_event",event:y.a.UPDATE_END})}function Y(){F.a.v(w,"MSE SourceBuffer is full, report to main thread"),I.postMessage({msg:"mse_event",event:y.a.BUFFER_FULL})}function se(b){I.postMessage({msg:"player_event",event:E.a.ERROR,error_type:L.b.MEDIA_ERROR,error_detail:L.b.MEDIA_MSE_ERROR,info:b})}function Ee(b,h){I.postMessage({msg:"transmuxing_event",event:b,info:h})}function _e(b,h){I.postMessage({msg:"player_event",event:b,extraData:h})}I.addEventListener("message",function(b){if(!_){var h=b.data;switch(h.cmd){case"logging_config":var C=h;M.a.applyConfig(C.logging_config),C.logging_config.enableCallback===!0?M.a.addLogListener(x):M.a.removeLogListener(x);break;case"init":U=(C=h).media_data_source,B=C.config;break;case"destroy":(function(){k&&V(),K&&d(),_=!0,I.postMessage({msg:"destroyed"})})();break;case"initialize_mse":(function(){F.a.v(w,"Initializing MediaSource in DedicatedWorker"),(K=new v.a(B)).on(y.a.SOURCE_OPEN,J.bind(this)),K.on(y.a.UPDATE_END,G.bind(this)),K.on(y.a.BUFFER_FULL,Y.bind(this)),K.on(y.a.ERROR,se.bind(this)),K.initialize({getCurrentTime:function(){return D},getReadyState:function(){return c}});var z=K.getHandle();I.postMessage({msg:"mse_init",handle:z},[z])})();break;case"shutdown_mse":d();break;case"load":p();break;case"unload":V();break;case"unbuffered_seek":C=h,K.flush(),k.seek(C.milliseconds);break;case"timeupdate":D=(C=h).current_time;break;case"readystatechange":c=(C=h).ready_state;break;case"pause_transmuxer":k.pause();break;case"resume_transmuxer":k.resume()}}})}},function(me,te,O){O.r(te);var F=O(15),M=O(14),f={enableWorker:!1,enableWorkerForMSE:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyChasingOnPaused:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,liveSync:!1,liveSyncMaxLatency:1.2,liveSyncTargetLatency:.8,liveSyncPlaybackRate:1.2,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function y(){return Object.assign({},f)}var v=function(){function b(){}return b.supportMSEH264Playback=function(){var h=self.MediaSource&&self.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),C=self.ManagedMediaSource&&self.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');return h||C},b.supportMSEH265Playback=function(){var h=self.MediaSource&&self.MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"'),C=self.ManagedMediaSource&&self.ManagedMediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"');return h||C},b.supportNetworkStreamIO=function(){var h=new M.a({},y()),C=h.loaderType;return h.destroy(),C=="fetch-stream-loader"||C=="xhr-moz-chunked-loader"},b.getNetworkLoaderTypeName=function(){var h=new M.a({},y()),C=h.loaderType;return h.destroy(),C},b.supportNativeMediaPlayback=function(h){b.videoElement==null&&(b.videoElement=window.document.createElement("video"));var C=b.videoElement.canPlayType(h);return C==="probably"||C=="maybe"},b.getFeatureList=function(){var h={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return h.msePlayback=b.supportMSEH264Playback(),h.networkStreamIO=b.supportNetworkStreamIO(),h.networkLoaderName=b.getNetworkLoaderTypeName(),h.mseLivePlayback=h.msePlayback&&h.networkStreamIO,h.mseH265Playback=b.supportMSEH265Playback(),h.nativeMP4H264Playback=b.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),h.nativeMP4H265Playback=b.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),h.nativeWebmVP8Playback=b.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),h.nativeWebmVP9Playback=b.supportNativeMediaPlayback('video/webm; codecs="vp9"'),h},b}(),g=O(2),T=O(0),E=O(9),L=O.n(E),I=O(16),w=O(4),x=O(17),U=O(7),B=O(10),K=O(3),k=O(1),q=O(5),W=O(11),D=function(){function b(h,C,z){this.TAG="SeekingHandler",this._config=null,this._media_element=null,this._always_seek_keyframe=!1,this._on_unbuffered_seek=null,this._request_set_current_time=!1,this._seek_request_record_clocktime=null,this._idr_sample_list=new W.a,this.e=null,this._config=h,this._media_element=C,this._on_unbuffered_seek=z,this.e={onMediaSeeking:this._onMediaSeeking.bind(this)};var ne=q.a.chrome&&(q.a.version.major<50||q.a.version.major===50&&q.a.version.build<2661);this._always_seek_keyframe=!!(ne||q.a.msedge||q.a.msie),this._always_seek_keyframe&&(this._config.accurateSeek=!1),this._media_element.addEventListener("seeking",this.e.onMediaSeeking)}return b.prototype.destroy=function(){this._idr_sample_list.clear(),this._idr_sample_list=null,this._media_element.removeEventListener("seeking",this.e.onMediaSeeking),this._media_element=null,this._on_unbuffered_seek=null},b.prototype.seek=function(h){var C=this._isPositionBuffered(h),z=!1;if(h<1&&this._media_element.buffered.length>0){var ne=this._media_element.buffered.start(0);(ne<1&&h<ne||q.a.safari)&&(z=!0,h=q.a.safari?.1:ne)}if(z)this.directSeek(h);else if(C)if(this._always_seek_keyframe){var de=this._getNearestKeyframe(Math.floor(1e3*h));de!=null&&(h=de.dts/1e3),this.directSeek(h)}else this.directSeek(h);else this._idr_sample_list.clear(),this._on_unbuffered_seek(Math.floor(1e3*h)),this._config.accurateSeek&&this.directSeek(h)},b.prototype.directSeek=function(h){this._request_set_current_time=!0,this._media_element.currentTime=h},b.prototype.appendSyncPoints=function(h){this._idr_sample_list.appendArray(h)},b.prototype._onMediaSeeking=function(h){if(this._request_set_current_time)this._request_set_current_time=!1;else{var C=this._media_element.currentTime,z=this._media_element.buffered;if(C<1&&z.length>0){var ne=z.start(0);if(ne<1&&C<ne||q.a.safari){var de=q.a.safari?.1:ne;return void this.directSeek(de)}}if(this._isPositionBuffered(C)){if(this._always_seek_keyframe){var Te=this._getNearestKeyframe(Math.floor(1e3*C));Te!=null&&(C=Te.dts/1e3,this.directSeek(C))}}else this._seek_request_record_clocktime=b._getClockTime(),window.setTimeout(this._pollAndApplyUnbufferedSeek.bind(this),50)}},b.prototype._pollAndApplyUnbufferedSeek=function(){if(this._seek_request_record_clocktime!=null)if(this._seek_request_record_clocktime<=b._getClockTime()-100){var h=this._media_element.currentTime;this._seek_request_record_clocktime=null,this._isPositionBuffered(h)||(this._idr_sample_list.clear(),this._on_unbuffered_seek(Math.floor(1e3*h)),this._config.accurateSeek&&this.directSeek(h))}else window.setTimeout(this._pollAndApplyUnbufferedSeek.bind(this),50)},b.prototype._isPositionBuffered=function(h){for(var C=this._media_element.buffered,z=0;z<C.length;z++){var ne=C.start(z),de=C.end(z);if(h>=ne&&h<de)return!0}return!1},b.prototype._getNearestKeyframe=function(h){return this._idr_sample_list.getLastSyncPointBeforeDts(h)},b._getClockTime=function(){return self.performance&&self.performance.now?self.performance.now():Date.now()},b}(),c=function(){function b(h,C,z,ne){this.TAG="LoadingController",this._config=null,this._media_element=null,this._on_pause_transmuxer=null,this._on_resume_transmuxer=null,this._paused=!1,this.e=null,this._config=h,this._media_element=C,this._on_pause_transmuxer=z,this._on_resume_transmuxer=ne,this.e={onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this)}}return b.prototype.destroy=function(){this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this.e=null,this._media_element=null,this._config=null,this._on_pause_transmuxer=null,this._on_resume_transmuxer=null},b.prototype.notifyBufferedPositionChanged=function(h){!this._config.isLive&&this._config.lazyLoad&&(h==null?this._suspendTransmuxerIfNeeded():this._suspendTransmuxerIfBufferedPositionExceeded(h))},b.prototype._onMediaTimeUpdate=function(h){this._paused&&this._resumeTransmuxerIfNeeded()},b.prototype._suspendTransmuxerIfNeeded=function(){for(var h=this._media_element.buffered,C=this._media_element.currentTime,z=0,ne=0;ne<h.length;ne++){var de=h.start(ne),Te=h.end(ne);if(de<=C&&C<Te){z=Te;break}}z>0&&this._suspendTransmuxerIfBufferedPositionExceeded(z)},b.prototype._suspendTransmuxerIfBufferedPositionExceeded=function(h){h>=this._media_element.currentTime+this._config.lazyLoadMaxDuration&&!this._paused&&(T.a.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this.suspendTransmuxer(),this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate))},b.prototype.suspendTransmuxer=function(){this._paused=!0,this._on_pause_transmuxer()},b.prototype._resumeTransmuxerIfNeeded=function(){for(var h=this._media_element.buffered,C=this._media_element.currentTime,z=this._config.lazyLoadRecoverDuration,ne=!1,de=0;de<h.length;de++){var Te=h.start(de),ye=h.end(de);if(C>=Te&&C<ye){C>=ye-z&&(ne=!0);break}}ne&&(T.a.v(this.TAG,"Continue loading from paused position"),this.resumeTransmuxer(),this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate))},b.prototype.resumeTransmuxer=function(){this._paused=!1,this._on_resume_transmuxer()},b}(),_=function(){function b(h,C){this.TAG="StartupStallJumper",this._media_element=null,this._on_direct_seek=null,this._canplay_received=!1,this.e=null,this._media_element=h,this._on_direct_seek=C,this.e={onMediaCanPlay:this._onMediaCanPlay.bind(this),onMediaStalled:this._onMediaStalled.bind(this),onMediaProgress:this._onMediaProgress.bind(this)},this._media_element.addEventListener("canplay",this.e.onMediaCanPlay),this._media_element.addEventListener("stalled",this.e.onMediaStalled),this._media_element.addEventListener("progress",this.e.onMediaProgress)}return b.prototype.destroy=function(){this._media_element.removeEventListener("canplay",this.e.onMediaCanPlay),this._media_element.removeEventListener("stalled",this.e.onMediaStalled),this._media_element.removeEventListener("progress",this.e.onMediaProgress),this._media_element=null,this._on_direct_seek=null},b.prototype._onMediaCanPlay=function(h){this._canplay_received=!0,this._media_element.removeEventListener("canplay",this.e.onMediaCanPlay)},b.prototype._onMediaStalled=function(h){this._detectAndFixStuckPlayback(!0)},b.prototype._onMediaProgress=function(h){this._detectAndFixStuckPlayback()},b.prototype._detectAndFixStuckPlayback=function(h){var C=this._media_element,z=C.buffered;h||!this._canplay_received||C.readyState<2?z.length>0&&C.currentTime<z.start(0)&&(T.a.w(this.TAG,"Playback seems stuck at ".concat(C.currentTime,", seek to ").concat(z.start(0))),this._on_direct_seek(z.start(0)),this._media_element.removeEventListener("progress",this.e.onMediaProgress)):this._media_element.removeEventListener("progress",this.e.onMediaProgress)},b}(),d=function(){function b(h,C,z){this._config=null,this._media_element=null,this._on_direct_seek=null,this._config=h,this._media_element=C,this._on_direct_seek=z}return b.prototype.destroy=function(){this._on_direct_seek=null,this._media_element=null,this._config=null},b.prototype.notifyBufferedRangeUpdate=function(){this._chaseLiveLatency()},b.prototype._chaseLiveLatency=function(){var h=this._media_element.buffered,C=this._media_element.currentTime,z=this._media_element.paused;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&h.length!=0&&(this._config.liveBufferLatencyChasingOnPaused||!z)){var ne=h.end(h.length-1);if(ne>this._config.liveBufferLatencyMaxLatency&&ne-C>this._config.liveBufferLatencyMaxLatency){var de=ne-this._config.liveBufferLatencyMinRemain;this._on_direct_seek(de)}}},b}(),p=function(){function b(h,C){this._config=null,this._media_element=null,this.e=null,this._config=h,this._media_element=C,this.e={onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this)},this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate)}return b.prototype.destroy=function(){this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element=null,this._config=null},b.prototype._onMediaTimeUpdate=function(h){if(this._config.isLive&&this._config.liveSync){var C=this._getCurrentLatency();if(C>this._config.liveSyncMaxLatency){var z=Math.min(2,Math.max(1,this._config.liveSyncPlaybackRate));this._media_element.playbackRate=z}else C>this._config.liveSyncTargetLatency||this._media_element.playbackRate!==1&&this._media_element.playbackRate!==0&&(this._media_element.playbackRate=1)}},b.prototype._getCurrentLatency=function(){if(!this._media_element)return 0;var h=this._media_element.buffered,C=this._media_element.currentTime;return h.length==0?0:h.end(h.length-1)-C},b}(),V=function(){function b(h,C){this.TAG="PlayerEngineMainThread",this._emitter=new E,this._media_element=null,this._mse_controller=null,this._transmuxer=null,this._pending_seek_time=null,this._seeking_handler=null,this._loading_controller=null,this._startup_stall_jumper=null,this._live_latency_chaser=null,this._live_latency_synchronizer=null,this._mse_source_opened=!1,this._has_pending_load=!1,this._loaded_metadata_received=!1,this._media_info=null,this._statistics_info=null,this.e=null,this._media_data_source=h,this._config=y(),typeof C=="object"&&Object.assign(this._config,C),h.isLive===!0&&(this._config.isLive=!0),this.e={onMediaLoadedMetadata:this._onMediaLoadedMetadata.bind(this)}}return b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this._transmuxer&&this.unload(),this._media_element&&this.detachMediaElement(),this.e=null,this._media_data_source=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(h,C){var z=this;this._emitter.addListener(h,C),h===w.a.MEDIA_INFO&&this._media_info?Promise.resolve().then(function(){return z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):h==w.a.STATISTICS_INFO&&this._statistics_info&&Promise.resolve().then(function(){return z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)})},b.prototype.off=function(h,C){this._emitter.removeListener(h,C)},b.prototype.attachMediaElement=function(h){var C=this;this._media_element=h,h.src="",h.removeAttribute("src"),h.srcObject=null,h.load(),h.addEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._mse_controller=new I.a(this._config),this._mse_controller.on(U.a.UPDATE_END,this._onMSEUpdateEnd.bind(this)),this._mse_controller.on(U.a.BUFFER_FULL,this._onMSEBufferFull.bind(this)),this._mse_controller.on(U.a.SOURCE_OPEN,this._onMSESourceOpen.bind(this)),this._mse_controller.on(U.a.ERROR,this._onMSEError.bind(this)),this._mse_controller.on(U.a.START_STREAMING,this._onMSEStartStreaming.bind(this)),this._mse_controller.on(U.a.END_STREAMING,this._onMSEEndStreaming.bind(this)),this._mse_controller.initialize({getCurrentTime:function(){return C._media_element.currentTime},getReadyState:function(){return C._media_element.readyState}}),this._mse_controller.isManagedMediaSource()?(h.disableRemotePlayback=!0,h.srcObject=this._mse_controller.getObject()):h.src=this._mse_controller.getObjectURL()},b.prototype.detachMediaElement=function(){this._media_element&&(this._mse_controller.shutdown(),this._media_element.removeEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element=null,this._mse_controller.revokeObjectURL()),this._mse_controller&&(this._mse_controller.destroy(),this._mse_controller=null)},b.prototype.load=function(){var h=this;if(!this._media_element)throw new K.a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new K.a("load() has been called, please call unload() first!");this._has_pending_load||(!this._config.deferLoadAfterSourceOpen||this._mse_source_opened?(this._transmuxer=new x.a(this._media_data_source,this._config),this._transmuxer.on(k.a.INIT_SEGMENT,function(C,z){h._mse_controller.appendInitSegment(z)}),this._transmuxer.on(k.a.MEDIA_SEGMENT,function(C,z){h._mse_controller.appendMediaSegment(z),!h._config.isLive&&C==="video"&&z.data&&z.data.byteLength>0&&"info"in z&&h._seeking_handler.appendSyncPoints(z.info.syncPoints),h._loading_controller.notifyBufferedPositionChanged(z.info.endDts/1e3)}),this._transmuxer.on(k.a.LOADING_COMPLETE,function(){h._mse_controller.endOfStream(),h._emitter.emit(w.a.LOADING_COMPLETE)}),this._transmuxer.on(k.a.RECOVERED_EARLY_EOF,function(){h._emitter.emit(w.a.RECOVERED_EARLY_EOF)}),this._transmuxer.on(k.a.IO_ERROR,function(C,z){h._emitter.emit(w.a.ERROR,B.b.NETWORK_ERROR,C,z)}),this._transmuxer.on(k.a.DEMUX_ERROR,function(C,z){h._emitter.emit(w.a.ERROR,B.b.MEDIA_ERROR,C,z)}),this._transmuxer.on(k.a.MEDIA_INFO,function(C){h._media_info=C,h._emitter.emit(w.a.MEDIA_INFO,Object.assign({},C))}),this._transmuxer.on(k.a.STATISTICS_INFO,function(C){h._statistics_info=h._fillStatisticsInfo(C),h._emitter.emit(w.a.STATISTICS_INFO,Object.assign({},C))}),this._transmuxer.on(k.a.RECOMMEND_SEEKPOINT,function(C){h._media_element&&!h._config.accurateSeek&&h._seeking_handler.directSeek(C/1e3)}),this._transmuxer.on(k.a.METADATA_ARRIVED,function(C){h._emitter.emit(w.a.METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SCRIPTDATA_ARRIVED,function(C){h._emitter.emit(w.a.SCRIPTDATA_ARRIVED,C)}),this._transmuxer.on(k.a.TIMED_ID3_METADATA_ARRIVED,function(C){h._emitter.emit(w.a.TIMED_ID3_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,function(C){h._emitter.emit(w.a.SYNCHRONOUS_KLV_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,function(C){h._emitter.emit(w.a.ASYNCHRONOUS_KLV_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SMPTE2038_METADATA_ARRIVED,function(C){h._emitter.emit(w.a.SMPTE2038_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.SCTE35_METADATA_ARRIVED,function(C){h._emitter.emit(w.a.SCTE35_METADATA_ARRIVED,C)}),this._transmuxer.on(k.a.PES_PRIVATE_DATA_DESCRIPTOR,function(C){h._emitter.emit(w.a.PES_PRIVATE_DATA_DESCRIPTOR,C)}),this._transmuxer.on(k.a.PES_PRIVATE_DATA_ARRIVED,function(C){h._emitter.emit(w.a.PES_PRIVATE_DATA_ARRIVED,C)}),this._seeking_handler=new D(this._config,this._media_element,this._onRequiredUnbufferedSeek.bind(this)),this._loading_controller=new c(this._config,this._media_element,this._onRequestPauseTransmuxer.bind(this),this._onRequestResumeTransmuxer.bind(this)),this._startup_stall_jumper=new _(this._media_element,this._onRequestDirectSeek.bind(this)),this._config.isLive&&this._config.liveBufferLatencyChasing&&(this._live_latency_chaser=new d(this._config,this._media_element,this._onRequestDirectSeek.bind(this))),this._config.isLive&&this._config.liveSync&&(this._live_latency_synchronizer=new p(this._config,this._media_element)),this._media_element.readyState>0&&this._seeking_handler.directSeek(0),this._transmuxer.open()):this._has_pending_load=!0)},b.prototype.unload=function(){var h,C,z,ne,de,Te,ye,j,X;(h=this._media_element)===null||h===void 0||h.pause(),(C=this._live_latency_synchronizer)===null||C===void 0||C.destroy(),this._live_latency_synchronizer=null,(z=this._live_latency_chaser)===null||z===void 0||z.destroy(),this._live_latency_chaser=null,(ne=this._startup_stall_jumper)===null||ne===void 0||ne.destroy(),this._startup_stall_jumper=null,(de=this._loading_controller)===null||de===void 0||de.destroy(),this._loading_controller=null,(Te=this._seeking_handler)===null||Te===void 0||Te.destroy(),this._seeking_handler=null,(ye=this._mse_controller)===null||ye===void 0||ye.flush(),(j=this._transmuxer)===null||j===void 0||j.close(),(X=this._transmuxer)===null||X===void 0||X.destroy(),this._transmuxer=null},b.prototype.play=function(){return this._media_element.play()},b.prototype.pause=function(){this._media_element.pause()},b.prototype.seek=function(h){this._media_element&&this._seeking_handler?this._seeking_handler.seek(h):this._pending_seek_time=h},Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return Object.assign({},this._media_info)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return Object.assign({},this._statistics_info)},enumerable:!1,configurable:!0}),b.prototype._onMSESourceOpen=function(){this._mse_source_opened=!0,this._has_pending_load&&(this._has_pending_load=!1,this.load())},b.prototype._onMSEUpdateEnd=function(){this._config.isLive&&this._config.liveBufferLatencyChasing&&this._live_latency_chaser&&this._live_latency_chaser.notifyBufferedRangeUpdate(),this._loading_controller.notifyBufferedPositionChanged()},b.prototype._onMSEBufferFull=function(){T.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._loading_controller.suspendTransmuxer()},b.prototype._onMSEError=function(h){this._emitter.emit(w.a.ERROR,B.b.MEDIA_ERROR,B.a.MEDIA_MSE_ERROR,h)},b.prototype._onMSEStartStreaming=function(){this._loaded_metadata_received&&(this._config.isLive||(T.a.v(this.TAG,"Resume transmuxing task due to ManagedMediaSource onStartStreaming"),this._loading_controller.resumeTransmuxer()))},b.prototype._onMSEEndStreaming=function(){this._config.isLive||(T.a.v(this.TAG,"Suspend transmuxing task due to ManagedMediaSource onEndStreaming"),this._loading_controller.suspendTransmuxer())},b.prototype._onMediaLoadedMetadata=function(h){this._loaded_metadata_received=!0,this._pending_seek_time!=null&&(this._seeking_handler.seek(this._pending_seek_time),this._pending_seek_time=null)},b.prototype._onRequestDirectSeek=function(h){this._seeking_handler.directSeek(h)},b.prototype._onRequiredUnbufferedSeek=function(h){this._mse_controller.flush(),this._transmuxer.seek(h)},b.prototype._onRequestPauseTransmuxer=function(){this._transmuxer.pause()},b.prototype._onRequestResumeTransmuxer=function(){this._transmuxer.resume()},b.prototype._fillStatisticsInfo=function(h){if(h.playerType="MSEPlayer",!(this._media_element instanceof HTMLVideoElement))return h;var C=!0,z=0,ne=0;if(this._media_element.getVideoPlaybackQuality){var de=this._media_element.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._media_element.webkitDecodedFrameCount!=null?(z=this._media_element.webkitDecodedFrameCount,ne=this._media_element.webkitDroppedFrameCount):C=!1;return C&&(h.decodedFrames=z,h.droppedFrames=ne),h},b}(),J=O(18),G=O(8),Y=function(){function b(h,C){this.TAG="PlayerEngineDedicatedThread",this._emitter=new E,this._media_element=null,this._worker_destroying=!1,this._seeking_handler=null,this._loading_controller=null,this._startup_stall_jumper=null,this._live_latency_chaser=null,this._live_latency_synchronizer=null,this._pending_seek_time=null,this._media_info=null,this._statistics_info=null,this.e=null,this._media_data_source=h,this._config=y(),typeof C=="object"&&Object.assign(this._config,C),h.isLive===!0&&(this._config.isLive=!0),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this),onMediaLoadedMetadata:this._onMediaLoadedMetadata.bind(this),onMediaTimeUpdate:this._onMediaTimeUpdate.bind(this),onMediaReadyStateChanged:this._onMediaReadyStateChange.bind(this)},G.a.registerListener(this.e.onLoggingConfigChanged),this._worker=J(24,{all:!0}),this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",media_data_source:this._media_data_source,config:this._config}),this._worker.postMessage({cmd:"logging_config",logging_config:G.a.getConfig()})}return b.isSupported=function(){return!!self.Worker&&(!(!self.MediaSource||!("canConstructInDedicatedWorker"in self.MediaSource)||self.MediaSource.canConstructInDedicatedWorker!==!0)||!(!self.ManagedMediaSource||!("canConstructInDedicatedWorker"in self.ManagedMediaSource)||self.ManagedMediaSource.canConstructInDedicatedWorker!==!0))},b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this.unload(),this.detachMediaElement(),this._worker_destroying=!0,this._worker.postMessage({cmd:"destroy"}),G.a.removeListener(this.e.onLoggingConfigChanged),this.e=null,this._media_data_source=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(h,C){var z=this;this._emitter.addListener(h,C),h===w.a.MEDIA_INFO&&this._media_info?Promise.resolve().then(function(){return z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):h==w.a.STATISTICS_INFO&&this._statistics_info&&Promise.resolve().then(function(){return z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)})},b.prototype.off=function(h,C){this._emitter.removeListener(h,C)},b.prototype.attachMediaElement=function(h){this._media_element=h,this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element.addEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.addEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element.addEventListener("readystatechange",this.e.onMediaReadyStateChanged),this._worker.postMessage({cmd:"initialize_mse"})},b.prototype.detachMediaElement=function(){this._worker.postMessage({cmd:"shutdown_mse"}),this._media_element&&(this._media_element.removeEventListener("loadedmetadata",this.e.onMediaLoadedMetadata),this._media_element.removeEventListener("timeupdate",this.e.onMediaTimeUpdate),this._media_element.removeEventListener("readystatechange",this.e.onMediaReadyStateChanged),this._media_element.src="",this._media_element.removeAttribute("src"),this._media_element.srcObject=null,this._media_element.load(),this._media_element=null)},b.prototype.load=function(){this._worker.postMessage({cmd:"load"}),this._seeking_handler=new D(this._config,this._media_element,this._onRequiredUnbufferedSeek.bind(this)),this._loading_controller=new c(this._config,this._media_element,this._onRequestPauseTransmuxer.bind(this),this._onRequestResumeTransmuxer.bind(this)),this._startup_stall_jumper=new _(this._media_element,this._onRequestDirectSeek.bind(this)),this._config.isLive&&this._config.liveBufferLatencyChasing&&(this._live_latency_chaser=new d(this._config,this._media_element,this._onRequestDirectSeek.bind(this))),this._config.isLive&&this._config.liveSync&&(this._live_latency_synchronizer=new p(this._config,this._media_element)),this._media_element.readyState>0&&this._seeking_handler.directSeek(0)},b.prototype.unload=function(){var h,C,z,ne,de,Te;(h=this._media_element)===null||h===void 0||h.pause(),this._worker.postMessage({cmd:"unload"}),(C=this._live_latency_synchronizer)===null||C===void 0||C.destroy(),this._live_latency_synchronizer=null,(z=this._live_latency_chaser)===null||z===void 0||z.destroy(),this._live_latency_chaser=null,(ne=this._startup_stall_jumper)===null||ne===void 0||ne.destroy(),this._startup_stall_jumper=null,(de=this._loading_controller)===null||de===void 0||de.destroy(),this._loading_controller=null,(Te=this._seeking_handler)===null||Te===void 0||Te.destroy(),this._seeking_handler=null},b.prototype.play=function(){return this._media_element.play()},b.prototype.pause=function(){this._media_element.pause()},b.prototype.seek=function(h){this._media_element&&this._seeking_handler?this._seeking_handler.seek(h):this._pending_seek_time=h},Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return Object.assign({},this._media_info)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return Object.assign({},this._statistics_info)},enumerable:!1,configurable:!0}),b.prototype._onLoggingConfigChanged=function(h){var C;(C=this._worker)===null||C===void 0||C.postMessage({cmd:"logging_config",logging_config:h})},b.prototype._onMSEUpdateEnd=function(){this._config.isLive&&this._config.liveBufferLatencyChasing&&this._live_latency_chaser&&this._live_latency_chaser.notifyBufferedRangeUpdate(),this._loading_controller.notifyBufferedPositionChanged()},b.prototype._onMSEBufferFull=function(){T.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._loading_controller.suspendTransmuxer()},b.prototype._onMediaLoadedMetadata=function(h){this._pending_seek_time!=null&&(this._seeking_handler.seek(this._pending_seek_time),this._pending_seek_time=null)},b.prototype._onRequestDirectSeek=function(h){this._seeking_handler.directSeek(h)},b.prototype._onRequiredUnbufferedSeek=function(h){this._worker.postMessage({cmd:"unbuffered_seek",milliseconds:h})},b.prototype._onRequestPauseTransmuxer=function(){this._worker.postMessage({cmd:"pause_transmuxer"})},b.prototype._onRequestResumeTransmuxer=function(){this._worker.postMessage({cmd:"resume_transmuxer"})},b.prototype._onMediaTimeUpdate=function(h){this._worker.postMessage({cmd:"timeupdate",current_time:h.target.currentTime})},b.prototype._onMediaReadyStateChange=function(h){this._worker.postMessage({cmd:"readystatechange",ready_state:h.target.readyState})},b.prototype._onWorkerMessage=function(h){var C,z=h.data,ne=z.msg;if(ne=="destroyed"||this._worker_destroying)return this._worker_destroying=!1,(C=this._worker)===null||C===void 0||C.terminate(),void(this._worker=null);switch(ne){case"mse_init":var de=z;"ManagedMediaSource"in self&&!("MediaSource"in self)&&(this._media_element.disableRemotePlayback=!0),this._media_element.srcObject=de.handle;break;case"mse_event":(de=z).event==U.a.UPDATE_END?this._onMSEUpdateEnd():de.event==U.a.BUFFER_FULL&&this._onMSEBufferFull();break;case"transmuxing_event":if((de=z).event==k.a.MEDIA_INFO){var Te=z;this._media_info=Te.info,this._emitter.emit(w.a.MEDIA_INFO,Object.assign({},Te.info))}else if(de.event==k.a.STATISTICS_INFO){var ye=z;this._statistics_info=this._fillStatisticsInfo(ye.info),this._emitter.emit(w.a.STATISTICS_INFO,Object.assign({},ye.info))}else if(de.event==k.a.RECOMMEND_SEEKPOINT){var j=z;this._media_element&&!this._config.accurateSeek&&this._seeking_handler.directSeek(j.milliseconds/1e3)}break;case"player_event":if((de=z).event==w.a.ERROR){var X=z;this._emitter.emit(w.a.ERROR,X.error_type,X.error_detail,X.info)}else if("extraData"in de){var ie=z;this._emitter.emit(ie.event,ie.extraData)}break;case"logcat_callback":de=z,T.a.emitter.emit("log",de.type,de.logcat);break;case"buffered_position_changed":de=z,this._loading_controller.notifyBufferedPositionChanged(de.buffered_position_milliseconds/1e3)}},b.prototype._fillStatisticsInfo=function(h){if(h.playerType="MSEPlayer",!(this._media_element instanceof HTMLVideoElement))return h;var C=!0,z=0,ne=0;if(this._media_element.getVideoPlaybackQuality){var de=this._media_element.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._media_element.webkitDecodedFrameCount!=null?(z=this._media_element.webkitDecodedFrameCount,ne=this._media_element.webkitDroppedFrameCount):C=!1;return C&&(h.decodedFrames=z,h.droppedFrames=ne),h},b}(),se=function(){function b(h,C){this.TAG="MSEPlayer",this._type="MSEPlayer",this._media_element=null,this._player_engine=null;var z=h.type.toLowerCase();if(z!=="mse"&&z!=="mpegts"&&z!=="m2ts"&&z!=="flv")throw new K.b("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");if(C&&C.enableWorkerForMSE&&Y.isSupported())try{this._player_engine=new Y(h,C)}catch(ne){T.a.e(this.TAG,"Error while initializing PlayerEngineDedicatedThread, fallback to PlayerEngineMainThread"),this._player_engine=new V(h,C)}else this._player_engine=new V(h,C)}return b.prototype.destroy=function(){this._player_engine.destroy(),this._player_engine=null,this._media_element=null},b.prototype.on=function(h,C){this._player_engine.on(h,C)},b.prototype.off=function(h,C){this._player_engine.off(h,C)},b.prototype.attachMediaElement=function(h){this._media_element=h,this._player_engine.attachMediaElement(h)},b.prototype.detachMediaElement=function(){this._media_element=null,this._player_engine.detachMediaElement()},b.prototype.load=function(){this._player_engine.load()},b.prototype.unload=function(){this._player_engine.unload()},b.prototype.play=function(){return this._player_engine.play()},b.prototype.pause=function(){this._player_engine.pause()},Object.defineProperty(b.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){return this._media_element.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"duration",{get:function(){return this._media_element.duration},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"volume",{get:function(){return this._media_element.volume},set:function(h){this._media_element.volume=h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"muted",{get:function(){return this._media_element.muted},set:function(h){this._media_element.muted=h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"currentTime",{get:function(){return this._media_element?this._media_element.currentTime:0},set:function(h){this._player_engine.seek(h)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"mediaInfo",{get:function(){return this._player_engine.mediaInfo},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){return this._player_engine.statisticsInfo},enumerable:!1,configurable:!0}),b}(),Ee=function(){function b(h,C){this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new L.a,this._config=y(),typeof C=="object"&&Object.assign(this._config,C);var z=h.type.toLowerCase();if(z==="mse"||z==="mpegts"||z==="m2ts"||z==="flv")throw new K.b("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");if(h.hasOwnProperty("segments"))throw new K.b("NativePlayer(".concat(h.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=h,this._mediaElement=null}return b.prototype.destroy=function(){this._emitter.emit(w.a.DESTROYING),this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},b.prototype.on=function(h,C){var z=this;h===w.a.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){z._emitter.emit(w.a.MEDIA_INFO,z.mediaInfo)}):h===w.a.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){z._emitter.emit(w.a.STATISTICS_INFO,z.statisticsInfo)}),this._emitter.addListener(h,C)},b.prototype.off=function(h,C){this._emitter.removeListener(h,C)},b.prototype.attachMediaElement=function(h){if(this._mediaElement=h,h.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{h.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(C){}},b.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},b.prototype.load=function(){if(!this._mediaElement)throw new K.a("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},b.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},b.prototype.play=function(){return this._mediaElement.play()},b.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(b.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(h){this._mediaElement.volume=h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(h){this._mediaElement.muted=h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(h){this._mediaElement?this._mediaElement.currentTime=h:this._pendingSeekTime=h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"mediaInfo",{get:function(){var h={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(h.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(h.width=this._mediaElement.videoWidth,h.height=this._mediaElement.videoHeight)),h},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"statisticsInfo",{get:function(){var h={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return h;var C=!0,z=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var de=this._mediaElement.getVideoPlaybackQuality();z=de.totalVideoFrames,ne=de.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(z=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):C=!1;return C&&(h.decodedFrames=z,h.droppedFrames=ne),h},enumerable:!1,configurable:!0}),b.prototype._onvLoadedMetadata=function(h){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(w.a.MEDIA_INFO,this.mediaInfo)},b.prototype._reportStatisticsInfo=function(){this._emitter.emit(w.a.STATISTICS_INFO,this.statisticsInfo)},b}();F.a.install();var _e={createPlayer:function(b,h){var C=b;if(C==null||typeof C!="object")throw new K.b("MediaDataSource must be an javascript object!");if(!C.hasOwnProperty("type"))throw new K.b("MediaDataSource must has type field to indicate video file type!");switch(C.type){case"mse":case"mpegts":case"m2ts":case"flv":return new se(C,h);default:return new Ee(C,h)}},isSupported:function(){return v.supportMSEH264Playback()},getFeatureList:function(){return v.getFeatureList()}};_e.BaseLoader=g.a,_e.LoaderStatus=g.c,_e.LoaderErrors=g.b,_e.Events=w.a,_e.ErrorTypes=B.b,_e.ErrorDetails=B.a,_e.MSEPlayer=se,_e.NativePlayer=Ee,_e.LoggingControl=G.a,Object.defineProperty(_e,"version",{enumerable:!0,get:function(){return"1.8.0"}}),te.default=_e}])})})(Tt);var Ei=Tt.exports;const Ri=ti(Ei);var Ti=fi("<span>");const Ui=()=>{var w,x,U;const{pathname:$e,searchParams:ot}=ii(),{proxyLink:me}=ai(),te=ni();let O=Ge.objs.filter(B=>B.type===pi.VIDEO);O.length===0&&(O=[Ge.obj]);const F=()=>{const B=O.findIndex(K=>K.name===Ge.obj.name);B<O.length-1&&te(Et(Rt(location.pathname),O[B+1].name)+"?auto_fullscreen="+f.fullscreen)},M=()=>{const B=O.findIndex(K=>K.name===Ge.obj.name);B>0&&te(Et(Rt(location.pathname),O[B-1].name)+"?auto_fullscreen="+f.fullscreen)};let f,y,v,g={id:$e(),container:"#video-player",url:Ge.raw_url,title:Ge.obj.name,volume:.5,autoplay:ri("video_autoplay"),autoSize:!1,autoMini:!0,loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,screenshot:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,theme:oi(),controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){M()}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){F()}}],quality:[],plugins:[gi],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0,crossOrigin:"anonymous"},type:Je(Ge.obj.name),customType:{flv:function(B,K){y=Ri.createPlayer({type:"flv",url:K},{referrerPolicy:"same-origin"}),y.attachMediaElement(B),y.load()},m3u8:function(B,K){v=new Si,v.loadSource(K),v.attachMedia(B),B.src||(B.src=K)}},lang:["en","zh-cn","zh-tw"].includes(bt().toLowerCase())?bt().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0};const T=Ge.related.filter(B=>{for(const K of[".srt",".ass",".vtt"])if(B.name.endsWith(K))return!0;return!1}),E=Ge.related.find(B=>{for(const K of[".xml"])if(B.name.endsWith(K))return!0;return!1});if(T.length!=0){let B=function(W){switch(K?"ass":"webvtt"){case"ass":f.subtitle.show=!1,f.emit("artplayer-plugin-ass:visible",W);break;case"webvtt":default:f.subtitle.show=W,f.emit("artplayer-plugin-ass:visible",!1);break}},K=!1;const k=T[0];Je(k.name).toLowerCase()==="ass"?(K=!0,(w=g.plugins)==null||w.push(bi({subUrl:me(k,!0)}))):g.subtitle={url:me(k,!0),type:Je(k.name),escape:!1};const q=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(W){var c;W.tooltip=W.switch?"Hide":"Show",B(!W.switch);const D=(c=g.settings)==null?void 0:c.find(_=>_.id==="setting_subtitle");return D&&(D.tooltip=W.tooltip),!W.switch}}];T.forEach((W,D)=>{q.push({default:D===0,html:(()=>{var c=Ti();return c.style.setProperty("max-width","200px"),c.style.setProperty("overflow","hidden"),c.style.setProperty("text-overflow","ellipsis"),c.style.setProperty("word-break","break-all"),c.style.setProperty("white-space","normal"),c.style.setProperty("display","-webkit-box"),c.style.setProperty("-webkit-line-clamp","2"),c.style.setProperty("-webkit-box-orient","vertical"),c.style.setProperty("font-size","12px"),si(c,()=>W.name),di(()=>_i(c,"title",W.name)),c})(),name:W.name,url:me(W,!0)})}),(x=g.settings)==null||x.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:mi({size:24}),selector:q,onSelect:function(W){var c,_;Je(W.name).toLowerCase()==="ass"?(K=!0,this.emit("artplayer-plugin-ass:switch",W.url),B(!0)):(K=!1,this.subtitle.switch(W.url,{name:W.name}),this.once("subtitleLoad",B.bind(this,!0)));const D=q.find(d=>d.id==="setting_subtitle_display");return D&&!D.switch&&((_=(c=D.$html)==null?void 0:c.click)==null||_.call(c)),D==null?void 0:D.tooltip}})}E&&((U=g.plugins)==null||U.push(Ai({danmuku:me(E,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,synchronousPlayback:!1,lockTime:5,maxLength:100,theme:"dark",heatmap:!0}))),ci(()=>{f=new yi(g);let B;switch(ot.auto_fullscreen){case"true":B=!0;case"false":B=!1;default:B=!1}f.on("ready",()=>{f.fullscreen=B}),f.on("video:ended",()=>{L()&&F()}),f.on("error",()=>{f.video.crossOrigin&&(console.log("Error detected. Trying to remove Cross-Origin attribute. Screenshot may not be available."),f.video.crossOrigin=null)})}),hi(()=>{f&&f.video&&(f.video.src=""),f==null||f.destroy(),y==null||y.destroy(),v==null||v.destroy()});const[L,I]=li();return At(vi,{onAutoNextChange:I,get children(){return At(ui,{w:"$full",h:"60vh",id:"video-player"})}})};export{Ui as default};