box-content-preview 3.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/LICENSE +397 -0
  2. package/README.md +435 -0
  3. package/dist/lib/237.js +34 -0
  4. package/dist/lib/274.js +103 -0
  5. package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
  6. package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
  7. package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
  8. package/dist/lib/492.js +34 -0
  9. package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
  10. package/dist/lib/5ea0869845becef03a06.svg +4 -0
  11. package/dist/lib/671.js +34 -0
  12. package/dist/lib/76692c54994797ddfb04.svg +3 -0
  13. package/dist/lib/815.js +34 -0
  14. package/dist/lib/8475f8e672ed83e24520.svg +6 -0
  15. package/dist/lib/88.css +23 -0
  16. package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
  17. package/dist/lib/assets/loading_ghost.gif +0 -0
  18. package/dist/lib/bb72d81b39be40898db2.svg +3 -0
  19. package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
  20. package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
  21. package/dist/lib/cmaps/78-H.bcmap +0 -0
  22. package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
  23. package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
  24. package/dist/lib/cmaps/78-V.bcmap +0 -0
  25. package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
  26. package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
  27. package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
  28. package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
  29. package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
  30. package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
  31. package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
  32. package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
  33. package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
  34. package/dist/lib/cmaps/Add-H.bcmap +0 -0
  35. package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
  36. package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
  37. package/dist/lib/cmaps/Add-V.bcmap +0 -0
  38. package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
  39. package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
  40. package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
  41. package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
  42. package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
  43. package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
  44. package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
  45. package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  46. package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
  47. package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
  48. package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
  49. package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
  50. package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
  51. package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
  52. package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  53. package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
  54. package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
  55. package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
  56. package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
  57. package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
  58. package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
  59. package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
  60. package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  61. package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
  62. package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
  63. package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
  64. package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  65. package/dist/lib/cmaps/B5-H.bcmap +0 -0
  66. package/dist/lib/cmaps/B5-V.bcmap +0 -0
  67. package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
  68. package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
  69. package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
  70. package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
  71. package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
  72. package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
  73. package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
  74. package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
  75. package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
  76. package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
  77. package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
  78. package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
  79. package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
  80. package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
  81. package/dist/lib/cmaps/EUC-H.bcmap +0 -0
  82. package/dist/lib/cmaps/EUC-V.bcmap +0 -0
  83. package/dist/lib/cmaps/Ext-H.bcmap +0 -0
  84. package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
  85. package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
  86. package/dist/lib/cmaps/Ext-V.bcmap +0 -0
  87. package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
  88. package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
  89. package/dist/lib/cmaps/GB-H.bcmap +4 -0
  90. package/dist/lib/cmaps/GB-V.bcmap +0 -0
  91. package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
  92. package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
  93. package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
  94. package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
  95. package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
  96. package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
  97. package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
  98. package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
  99. package/dist/lib/cmaps/GBT-H.bcmap +0 -0
  100. package/dist/lib/cmaps/GBT-V.bcmap +0 -0
  101. package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
  102. package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
  103. package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
  104. package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
  105. package/dist/lib/cmaps/H.bcmap +0 -0
  106. package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
  107. package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
  108. package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
  109. package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
  110. package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
  111. package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
  112. package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
  113. package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
  114. package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
  115. package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
  116. package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
  117. package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
  118. package/dist/lib/cmaps/Hankaku.bcmap +0 -0
  119. package/dist/lib/cmaps/Hiragana.bcmap +0 -0
  120. package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
  121. package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
  122. package/dist/lib/cmaps/KSC-H.bcmap +0 -0
  123. package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
  124. package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
  125. package/dist/lib/cmaps/KSC-V.bcmap +0 -0
  126. package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
  127. package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  128. package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  129. package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
  130. package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
  131. package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
  132. package/dist/lib/cmaps/Katakana.bcmap +0 -0
  133. package/dist/lib/cmaps/LICENSE +36 -0
  134. package/dist/lib/cmaps/NWP-H.bcmap +0 -0
  135. package/dist/lib/cmaps/NWP-V.bcmap +0 -0
  136. package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
  137. package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
  138. package/dist/lib/cmaps/Roman.bcmap +0 -0
  139. package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  140. package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  141. package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  142. package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  143. package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  144. package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  145. package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  146. package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  147. package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
  148. package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
  149. package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
  150. package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
  151. package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
  152. package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
  153. package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
  154. package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
  155. package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  156. package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  157. package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  158. package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  159. package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  160. package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  161. package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  162. package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  163. package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  164. package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  165. package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  166. package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  167. package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  168. package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  169. package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  170. package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  171. package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  172. package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  173. package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  174. package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  175. package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  176. package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  177. package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  178. package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
  179. package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
  180. package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
  181. package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
  182. package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
  183. package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
  184. package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
  185. package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
  186. package/dist/lib/cmaps/V.bcmap +0 -0
  187. package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
  188. package/dist/lib/exif/exif-reader.min.js +8 -0
  189. package/dist/lib/exif/exif.js +822 -0
  190. package/dist/lib/exif/exif.min.js +21 -0
  191. package/dist/lib/fde82a50e6de20239861.svg +5 -0
  192. package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
  193. package/dist/lib/index.css +84 -0
  194. package/dist/lib/index.d.ts +147 -0
  195. package/dist/lib/index.js +41639 -0
  196. package/dist/lib/pdfjs-lib.js +46 -0
  197. package/dist/lib/pdfjs-viewer-css.js +36 -0
  198. package/dist/lib/pdfjs-viewer.js +8118 -0
  199. package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
  200. package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
  201. package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
  202. package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
  203. package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
  204. package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
  205. package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
  206. package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
  207. package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
  208. package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
  209. package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
  210. package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
  211. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  212. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  213. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  214. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  215. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  216. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
  217. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
  218. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  219. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
  220. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  221. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
  222. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
  223. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
  224. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
  225. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
  226. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
  227. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
  228. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
  229. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
  230. package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
  231. package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
  232. package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
  233. package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
  234. package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
  235. package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
  236. package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
  237. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  238. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  239. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  240. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  241. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  242. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
  243. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
  244. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
  245. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
  246. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
  247. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
  248. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
  249. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
  250. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
  251. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
  252. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
  253. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
  254. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
  255. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
  256. package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
  257. package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
  258. package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
  259. package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
  260. package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
  261. package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
  262. package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
  263. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  264. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  265. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  266. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  267. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  268. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
  269. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
  270. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  271. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
  272. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  273. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
  274. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
  275. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
  276. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
  277. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
  278. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
  279. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
  280. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
  281. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
  282. package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
  283. package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
  284. package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
  285. package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
  286. package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
  287. package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
  288. package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
  289. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  290. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  291. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  292. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  293. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  294. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
  295. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
  296. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  297. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
  298. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  299. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
  300. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
  301. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
  302. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
  303. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
  304. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
  305. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
  306. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
  307. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
  308. package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
  309. package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
  310. package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
  311. package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
  312. package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
  313. package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
  314. package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
  315. package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
  316. package/dist/lib/third-party/text/0.112.0/github.css +123 -0
  317. package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
  318. package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
  319. package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
  320. package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
  321. package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
  322. package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
  323. package/dist/lib/third-party/text/0.114.0/github.css +123 -0
  324. package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
  325. package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
  326. package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
  327. package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
  328. package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
  329. package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
  330. package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
  331. package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
  332. package/dist/lib/third-party/text/2.65.0/github.css +99 -0
  333. package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
  334. package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
  335. package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
  336. package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
  337. package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
  338. package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
  339. package/package.json +198 -0
@@ -0,0 +1,438 @@
1
+ (function(){var g={};
2
+ (function(window){var m,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
3
+ function ea(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){ea();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}function ia(a){ea();var b=a[Symbol.iterator];return b?b.call(a):fa(a)}
4
+ function ja(a,b){if(b){for(var c=ba,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];f in c||(c[f]={});c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&aa(c,d,{configurable:!0,writable:!0,value:f})}}
5
+ ja("Promise",function(a){function b(a){this.V=0;this.f=void 0;this.a=[];var b=this.c();try{a(b.resolve,b.reject)}catch(k){b.reject(k)}}function c(){this.a=null}function d(a){return a instanceof b?a:new b(function(b){b(a)})}if(a)return a;c.prototype.b=function(a){null==this.a&&(this.a=[],this.f());this.a.push(a)};c.prototype.f=function(){var a=this;this.c(function(){a.h()})};var e=ba.setTimeout;c.prototype.c=function(a){e(a,0)};c.prototype.h=function(){for(;this.a&&this.a.length;){var a=this.a;this.a=
6
+ [];for(var b=0;b<a.length;++b){var c=a[b];delete a[b];try{c()}catch(l){this.g(l)}}}this.a=null};c.prototype.g=function(a){this.c(function(){throw a;})};b.prototype.c=function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c=!1;return{resolve:a(this.l),reject:a(this.b)}};b.prototype.l=function(a){if(a===this)this.b(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof b)this.m(a);else{a:switch(typeof a){case "object":var c=null!=a;break a;case "function":c=
7
+ !0;break a;default:c=!1}c?this.j(a):this.g(a)}};b.prototype.j=function(a){var b=void 0;try{b=a.then}catch(k){this.b(k);return}"function"==typeof b?this.s(b,a):this.g(a)};b.prototype.b=function(a){this.h(2,a)};b.prototype.g=function(a){this.h(1,a)};b.prototype.h=function(a,b){if(0!=this.V)throw Error("Cannot settle("+a+", "+b|"): Promise already settled in state"+this.V);this.V=a;this.f=b;this.i()};b.prototype.i=function(){if(null!=this.a){for(var a=this.a,b=0;b<a.length;++b)a[b].call(),a[b]=null;
8
+ this.a=null}};var f=new c;b.prototype.m=function(a){var b=this.c();a.rb(b.resolve,b.reject)};b.prototype.s=function(a,b){var c=this.c();try{a.call(b,c.resolve,c.reject)}catch(l){c.reject(l)}};b.prototype.then=function(a,c){function d(a,b){return"function"==typeof a?function(b){try{e(a(b))}catch(v){f(v)}}:b}var e,f,g=new b(function(a,b){e=a;f=b});this.rb(d(a,e),d(c,f));return g};b.prototype["catch"]=function(a){return this.then(void 0,a)};b.prototype.rb=function(a,b){function c(){switch(d.V){case 1:a(d.f);
9
+ break;case 2:b(d.f);break;default:throw Error("Unexpected state: "+d.V);}}var d=this;null==this.a?f.b(c):this.a.push(function(){f.b(c)})};b.resolve=d;b.reject=function(a){return new b(function(b,c){c(a)})};b.race=function(a){return new b(function(b,c){for(var e=ia(a),f=e.next();!f.done;f=e.next())d(f.value).rb(b,c)})};b.all=function(a){var c=ia(a),e=c.next();return e.done?d([]):new b(function(a,b){function f(b){return function(c){g[b]=c;h--;0==h&&a(g)}}var g=[],h=0;do g.push(void 0),h++,d(e.value).rb(f(g.length-
10
+ 1),b),e=c.next();while(!e.done)})};return b});ja("Array.prototype.find",function(a){return a?a:function(a,c){a:{var b=this;b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(a.call(c,g,f,b)){b=g;break a}}b=void 0}return b}});var ka=this;ka.Ye=!0;function n(a,b){var c=a.split("."),d=ka;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
11
+ function la(a,b){function c(){}c.prototype=b.prototype;a.df=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.bf=function(a,c,f){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}};/*
12
+
13
+ Copyright 2016 Google Inc.
14
+
15
+ Licensed under the Apache License, Version 2.0 (the "License");
16
+ you may not use this file except in compliance with the License.
17
+ You may obtain a copy of the License at
18
+
19
+ http://www.apache.org/licenses/LICENSE-2.0
20
+
21
+ Unless required by applicable law or agreed to in writing, software
22
+ distributed under the License is distributed on an "AS IS" BASIS,
23
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
+ See the License for the specific language governing permissions and
25
+ limitations under the License.
26
+ */
27
+ function ma(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function na(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function oa(a){return a.a/(1-Math.pow(a.c,a.b))};function pa(){this.b=new ma(2);this.c=new ma(5);this.a=0}pa.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(oa(this.b),oa(this.c))};function qa(){}function ra(){}window.console&&window.console.log.bind&&(qa=console.warn.bind(console));function p(a,b,c,d){this.severity=a;this.category=b;this.code=c;this.data=Array.prototype.slice.call(arguments,3);this.handled=!1}n("shaka.util.Error",p);p.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};p.Severity={RECOVERABLE:1,CRITICAL:2};p.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
28
+ p.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,
29
+ MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
30
+ DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,
31
+ HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
32
+ LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,
33
+ CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,UNSUPPORTED_UPGRADE_REQUEST:9010};var sa=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function ta(a){var b;a instanceof ta?(ua(this,a.fa),this.Aa=a.Aa,this.ja=a.ja,va(this,a.Oa),this.Y=a.Y,wa(this,xa(a.a)),this.va=a.va):a&&(b=String(a).match(sa))?(ua(this,b[1]||"",!0),this.Aa=ya(b[2]||""),this.ja=ya(b[3]||"",!0),va(this,b[4]),this.Y=ya(b[5]||"",!0),wa(this,b[6]||"",!0),this.va=ya(b[7]||"")):this.a=new za(null)}m=ta.prototype;m.fa="";m.Aa="";m.ja="";m.Oa=null;m.Y="";m.va="";
34
+ m.toString=function(){var a=[],b=this.fa;b&&a.push(Aa(b,Ba,!0),":");if(b=this.ja){a.push("//");var c=this.Aa;c&&a.push(Aa(c,Ba,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Oa;null!=b&&a.push(":",String(b))}if(b=this.Y)this.ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(Aa(b,"/"==b.charAt(0)?Ca:Da,!0));(b=this.a.toString())&&a.push("?",b);(b=this.va)&&a.push("#",Aa(b,Ea));return a.join("")};
35
+ m.resolve=function(a){var b=new ta(this);"data"===b.fa&&(b=new ta);var c=!!a.fa;c?ua(b,a.fa):c=!!a.Aa;c?b.Aa=a.Aa:c=!!a.ja;c?b.ja=a.ja:c=null!=a.Oa;var d=a.Y;if(c)va(b,a.Oa);else if(c=!!a.Y){if("/"!=d.charAt(0))if(this.ja&&!this.Y)d="/"+d;else{var e=b.Y.lastIndexOf("/");-1!=e&&(d=b.Y.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==h?
36
+ ((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Y=d:c=""!==a.a.toString();c?wa(b,xa(a.a)):c=!!a.va;c&&(b.va=a.va);return b};function ua(a,b,c){a.fa=c?ya(b,!0):b;a.fa&&(a.fa=a.fa.replace(/:$/,""))}function va(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Oa=b}else a.Oa=null}function wa(a,b,c){b instanceof za?a.a=b:(c||(b=Aa(b,Fa)),a.a=new za(b))}
37
+ function ya(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Aa(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,Ga),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ga(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ba=/[#\/\?@]/g,Da=/[#\?:]/g,Ca=/[#\?]/g,Fa=/[#\?@]/g,Ea=/#/g;function za(a){this.b=a||null}za.prototype.a=null;za.prototype.c=null;
38
+ za.prototype.add=function(a,b){if(!this.a&&(this.a={},this.c=0,this.b))for(var c=this.b.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.b=null;(c=this.a.hasOwnProperty(a)&&this.a[a])||(this.a[a]=c=[]);c.push(b);this.c++;return this};
39
+ za.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var a=[],b;for(b in this.a)for(var c=encodeURIComponent(b),d=this.a[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.b=a.join("&")};function xa(a){var b=new za;b.b=a.b;if(a.a){var c={},d;for(d in a.a)c[d]=a.a[d].concat();b.a=c;b.c=a.c}return b};function u(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve=a;c.reject=b;return c}u.prototype.resolve=function(){};u.prototype.reject=function(){};function Ha(a,b,c){var d=Ia();this.j=null==a.maxAttempts?d.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?d.baseDelay:a.baseDelay;this.i=null==a.fuzzFactor?d.fuzzFactor:a.fuzzFactor;this.h=null==a.backoffFactor?d.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;this.c=b||!1;this.g=c||null;this.c&&(this.a=1)}function Ja(a){if(a.a>=a.j)if(a.c)a.a=1,a.b=a.f;else return Promise.reject();var b=new u;a.a?(Ka(a,b.resolve,a.b*(1+(2*Math.random()-1)*a.i)),a.b*=a.h):b.resolve();a.a++;return b}
40
+ function Ia(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}}function Ka(a,b,c){if(a.g)if(a.g()||0==c)b();else{var d=Math.min(200,c);La(function(){Ka(this,b,c-d)}.bind(a),d)}else La(b,c)}function La(a,b){window.setTimeout(a,b)};function Ma(a,b,c,d,e){var f=e in d,g;for(g in b){var h=e+"."+g,k=f?d[e]:c[g];if(f||g in a)void 0===b[g]?void 0===k||f?delete a[g]:a[g]=k:k.constructor==Object&&b[g]&&b[g].constructor==Object?(a[g]||(a[g]=k),Ma(a[g],b[g],k,d,h)):typeof b[g]==typeof k&&null!=b[g]&&b[g].constructor==k.constructor&&(a[g]=b[g])}}
41
+ function Na(a){function b(a){switch(typeof a){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return a;default:if(!a)return a;if(0<=c.indexOf(a))return null;var d=a.constructor==Array;if(a.constructor!=Object&&!d)return null;c.push(a);var f=d?[]:{},g;for(g in a)f[g]=b(a[g]);d&&(f.length=a.length);return f}}var c=[];return b(a)};function Oa(a,b){return a.reduce(function(a,b,e){return b["catch"](a.bind(null,e))}.bind(null,b),Promise.reject())}function Pa(a,b){return a.concat(b)}function Qa(){}function Ra(a){return null!=a}function Sa(a,b,c){return c.indexOf(a)==b};function x(a){this.f=!1;this.a=[];this.b=[];this.c=[];this.g=a||null}n("shaka.net.NetworkingEngine",x);x.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3};x.PluginPriority={Ze:1,af:2,We:3};var Ta={};function Ua(a,b,c){c=c||3;var d=Ta[a];if(!d||c>=d.je)Ta[a]={je:c,he:b}}x.registerScheme=Ua;x.unregisterScheme=function(a){delete Ta[a]};x.prototype.le=function(a){this.b.push(a)};x.prototype.registerRequestFilter=x.prototype.le;x.prototype.Pe=function(a){var b=this.b;a=b.indexOf(a);0<=a&&b.splice(a,1)};
42
+ x.prototype.unregisterRequestFilter=x.prototype.Pe;x.prototype.bd=function(){this.b=[]};x.prototype.clearAllRequestFilters=x.prototype.bd;x.prototype.me=function(a){this.c.push(a)};x.prototype.registerResponseFilter=x.prototype.me;x.prototype.Qe=function(a){var b=this.c;a=b.indexOf(a);0<=a&&b.splice(a,1)};x.prototype.unregisterResponseFilter=x.prototype.Qe;x.prototype.cd=function(){this.c=[]};x.prototype.clearAllResponseFilters=x.prototype.cd;
43
+ function Va(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b}}x.prototype.destroy=function(){this.f=!0;this.b=[];this.c=[];for(var a=[],b=0;b<this.a.length;++b)a.push(this.a[b]["catch"](Qa));return Promise.all(a)};x.prototype.destroy=x.prototype.destroy;
44
+ x.prototype.request=function(a,b,c){var d=c||function(){return!1};if(this.f)return Promise.reject();b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Na(b.retryParameters):Ia();b.uris=Na(b.uris);var e=Date.now(),f=Promise.resolve();this.b.forEach(function(c){f=f.then(c.bind(null,a,b))});f=f["catch"](function(a){throw new p(2,1,1006,a);});f=f.then(function(){var f=Date.now()-e,h=new Ha(b.retryParameters,!1,c);return Ja(h).then(function(){return Wa(this,a,b,h,0,f,
45
+ d)}.bind(this))}.bind(this));this.a.push(f);return f.then(function(b){0<=this.a.indexOf(f)&&this.a.splice(this.a.indexOf(f),1);this.g&&!b.fromCache&&1==a&&this.g(b.timeMs,b.data.byteLength);return b}.bind(this))["catch"](function(a){a&&(a.severity=2);0<=this.a.indexOf(f)&&this.a.splice(this.a.indexOf(f),1);return Promise.reject(a)}.bind(this))};x.prototype.request=x.prototype.request;
46
+ function Wa(a,b,c,d,e,f,g){if(a.f||g())return Promise.reject();var h=new ta(c.uris[e]),k=h.fa;k||(k=location.protocol,k=k.slice(0,-1),ua(h,k),c.uris[e]=h.toString());k=(k=Ta[k])?k.he:null;if(!k)return Promise.reject(new p(2,1,1E3,h));var l=Date.now();return k(c.uris[e],c,b).then(function(a){void 0==a.timeMs&&(a.timeMs=Date.now()-l);var c=Date.now(),d=Promise.resolve();this.c.forEach(function(c){d=d.then(function(){return Promise.resolve(c(b,a))}.bind(this))}.bind(this));d=d["catch"](function(a){var b=
47
+ 2;a instanceof p&&(b=a.severity);throw new p(b,1,1007,a);});return d.then(function(){a.timeMs+=Date.now()-c;a.timeMs+=f;return a})}.bind(a))["catch"](function(a){if(a&&1==a.severity)return e=(e+1)%c.uris.length,g()?Promise.reject():Ja(d).then(function(){return Wa(this,b,c,d,e,f,g)}.bind(this),function(){throw a;});throw a;}.bind(a))};function Xa(a,b){for(var c=[],d=0;d<a.length;++d){for(var e=!1,f=0;f<c.length&&!(e=b?b(a[d],c[f]):a[d]===c[f]);++f);e||c.push(a[d])}return c}function Ya(a,b,c){for(var d=0;d<a.length;++d)if(c(a[d],b))return d;return-1}function Za(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function $a(a,b){var c=0;a.forEach(function(a){c+=b(a)?1:0});return c};function ab(){this.a={}}ab.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};ab.prototype.get=function(a){return(a=this.a[a])?a.slice():null};ab.prototype.remove=function(a,b){var c=this.a[a];if(c)for(var d=0;d<c.length;++d)c[d]==b&&(c.splice(d,1),--d)};function z(){this.a=new ab}z.prototype.destroy=function(){bb(this);this.a=null;return Promise.resolve()};function A(a,b,c,d){a.a&&(b=new cb(b,c,d),a.a.push(c,b))}function db(a,b,c,d){A(a,b,c,function(a){this.ia(b,c);d(a)}.bind(a))}z.prototype.ia=function(a,b){if(this.a)for(var c=this.a.get(b)||[],d=0;d<c.length;++d){var e=c[d];e.target==a&&(e.ia(),this.a.remove(b,e))}};function bb(a){if(a.a){var b=a.a,c=[],d;for(d in b.a)c.push.apply(c,b.a[d]);for(b=0;b<c.length;++b)c[b].ia();a.a.a={}}}
48
+ function cb(a,b,c){this.target=a;this.type=b;this.a=c;this.target.addEventListener(b,c,!1)}cb.prototype.ia=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function B(a,b){var c=b||{},d;for(d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}B.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};B.prototype.stopImmediatePropagation=function(){this.a=!0};B.prototype.stopPropagation=function(){};function C(a,b){if(0==b.length)return a;var c=b.map(function(a){return new ta(a)});return a.map(function(a){return new ta(a)}).map(function(a){return c.map(a.resolve.bind(a))}).reduce(Pa,[]).map(function(a){return a.toString()})}function eb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:[]}}var fb=1/15;function gb(a){return!a||0==Object.keys(a).length}function hb(a){return Object.keys(a).map(function(b){return a[b]})}function ib(a,b){return Object.keys(a).every(function(c){return b(c,a[c])})}function jb(a,b){Object.keys(a).forEach(function(c){b(c,a[c])})};function kb(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}var lb={codecs:"codecs",frameRate:"framerate",bandwidth:"bitrate",width:"width",height:"height",channelsCount:"channels"};function D(a){if(!a)return"";a=new Uint8Array(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=escape(mb(a));try{return decodeURIComponent(a)}catch(b){throw new p(2,2,2004);}}n("shaka.util.StringUtils.fromUTF8",D);
49
+ function nb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new p(2,2,2004);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(new Uint8Array(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(var e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return mb(c)}n("shaka.util.StringUtils.fromUTF16",nb);
50
+ function ob(a){var b=new Uint8Array(a);if(239==b[0]&&187==b[1]&&191==b[2])return D(b);if(254==b[0]&&255==b[1])return nb(b.subarray(2),!1);if(255==b[0]&&254==b[1])return nb(b.subarray(2),!0);var c=function(a,b){return a.byteLength<=b||32<=a[b]&&126>=a[b]}.bind(null,b);if(0==b[0]&&0==b[2])return nb(a,!1);if(0==b[1]&&0==b[3])return nb(a,!0);if(c(0)&&c(1)&&c(2)&&c(3))return D(a);throw new p(2,2,2003);}n("shaka.util.StringUtils.fromBytesAutoDetect",ob);
51
+ function pb(a){a=encodeURIComponent(a);a=unescape(a);for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b.buffer}n("shaka.util.StringUtils.toUTF8",pb);function mb(a){for(var b="",c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};function qb(a){this.a=null;this.b=function(){this.a=null;a()}.bind(this)}qb.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)};function rb(a,b){a.cancel();a.a=setTimeout(a.b,1E3*b)}function sb(a,b){a.cancel();var c=function(){this.b();this.a=setTimeout(c,1E3*b)}.bind(a);a.a=setTimeout(c,1E3*b)};function tb(a,b){var c=void 0==b?!0:b,d=window.btoa(String.fromCharCode.apply(null,a)).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}n("shaka.util.Uint8ArrayUtils.toBase64",tb);function ub(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}n("shaka.util.Uint8ArrayUtils.fromBase64",ub);
52
+ function vb(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b}n("shaka.util.Uint8ArrayUtils.fromHex",vb);function wb(a){for(var b="",c=0;c<a.length;++c){var d=a[c].toString(16);1==d.length&&(d="0"+d);b+=d}return b}n("shaka.util.Uint8ArrayUtils.toHex",wb);function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!=b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!=b[c])return!1;return!0}n("shaka.util.Uint8ArrayUtils.equal",xb);
53
+ function yb(a){for(var b=0,c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(b);var d=0;for(c=0;c<arguments.length;++c)b.set(arguments[c],d),d+=arguments[c].length;return b}n("shaka.util.Uint8ArrayUtils.concat",yb);function zb(a){this.s=a;this.l=this.j=this.u=null;this.L=!1;this.b=null;this.g=new z;this.a=[];this.m=[];this.i=new u;this.f=null;this.h=function(b){this.i.reject(b);a.onError(b)}.bind(this);this.A={};this.I=new qb(this.ke.bind(this));this.da=this.c=!1;this.K=[];this.ca=!1;this.w=new qb(this.ie.bind(this));sb(this.w,1);this.i["catch"](function(){})}m=zb.prototype;
54
+ m.destroy=function(){this.c=!0;var a=[];this.a.forEach(function(b){b=b.ga.close()["catch"](Qa);var c=new Promise(function(a){setTimeout(a,1E3)});a.push(Promise.race([b,c]))});this.i.reject();this.g&&a.push(this.g.destroy());this.l&&a.push(this.l.setMediaKeys(null)["catch"](Qa));this.w&&(this.w.cancel(),this.w=null);this.I&&(this.I.cancel(),this.I=null);this.g=this.l=this.j=this.u=this.b=null;this.a=[];this.m=[];this.s=this.h=this.f=null;return Promise.all(a)};m.configure=function(a){this.f=a};
55
+ m.init=function(a,b){var c={},d=[];this.da=b;this.m=a.offlineSessionIds;Ab(this,a,b||0<a.offlineSessionIds.length,c,d);return d.length?Bb(this,c,d):(this.L=!0,Promise.resolve())};
56
+ function Cb(a,b){if(!a.j)return db(a.g,b,"encrypted",function(){this.h(new p(2,6,6010))}.bind(a)),Promise.resolve();a.l=b;db(a.g,a.l,"play",a.Nd.bind(a));var c=a.l.setMediaKeys(a.j);c=c["catch"](function(a){return Promise.reject(new p(2,6,6003,a.message))});var d=null;a.b.serverCertificate&&a.b.serverCertificate.length&&(d=a.j.setServerCertificate(a.b.serverCertificate).then(function(){})["catch"](function(a){return Promise.reject(new p(2,6,6004,a.message))}));return Promise.all([c,d]).then(function(){if(this.c)return Promise.reject();
57
+ Db(this);this.b.initData.length||this.m.length||A(this.g,this.l,"encrypted",this.Cd.bind(this))}.bind(a))["catch"](function(a){return this.c?Promise.resolve():Promise.reject(a)}.bind(a))}function Eb(a,b){return Promise.all(b.map(function(a){return Fb(this,a).then(function(a){if(a){for(var b=new u,c=0;c<this.a.length;c++)if(this.a[c].ga==a){this.a[c].na=b;break}return Promise.all([a.remove(),b])}}.bind(this))}.bind(a)))}
58
+ function Db(a){var b=a.b?a.b.initData:[];b.forEach(function(a){Gb(this,a.initDataType,a.initData)}.bind(a));a.m.forEach(function(a){Fb(this,a)}.bind(a));b.length||a.m.length||a.i.resolve();return a.i}m.keySystem=function(){return this.b?this.b.keySystem:""};function Hb(a){return a.a.map(function(a){return a.ga.sessionId})}m.ub=function(){var a=this.a.map(function(a){a=a.ga.expiration;return isNaN(a)?Infinity:a});return Math.min.apply(Math,a)};
59
+ function Ab(a,b,c,d,e){var f=Ib(a),g=Jb(a,b);b.periods.forEach(function(a){a.variants.forEach(function(a){f&&(a.drmInfos=[f]);g&&(a.drmInfos=g);a.drmInfos.forEach(function(b){Kb(this,b);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready");var f=d[b.keySystem];f||(f={audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:c?"required":"optional",sessionTypes:[c?"persistent-license":"temporary"],label:b.keySystem,
60
+ drmInfos:[]},d[b.keySystem]=f,e.push(b.keySystem));f.drmInfos.push(b);b.distinctiveIdentifierRequired&&(f.distinctiveIdentifier="required");b.persistentStateRequired&&(f.persistentState="required");var g=[];a.video&&g.push(a.video);a.audio&&g.push(a.audio);g.forEach(function(a){("video"==a.type?f.videoCapabilities:f.audioCapabilities).push({robustness:("video"==a.type?b.videoRobustness:b.audioRobustness)||"",contentType:kb(a.mimeType,a.codecs)})}.bind(this))}.bind(this))}.bind(this))}.bind(a))}
61
+ function Bb(a,b,c){if(1==c.length&&""==c[0])return Promise.reject(new p(2,6,6E3));var d=new u,e=d;[!0,!1].forEach(function(a){c.forEach(function(c){var d=b[c];d.drmInfos.some(function(a){return!!a.licenseServerUri})==a&&(0==d.audioCapabilities.length&&delete d.audioCapabilities,0==d.videoCapabilities.length&&delete d.videoCapabilities,e=e["catch"](function(){return this.c?Promise.reject():navigator.requestMediaKeySystemAccess(c,[d])}.bind(this)))}.bind(this))}.bind(a));e=e["catch"](function(){return Promise.reject(new p(2,
62
+ 6,6001))});e=e.then(function(a){if(this.c)return Promise.reject();var c=0<=navigator.userAgent.indexOf("Edge/"),d=a.getConfiguration();this.u=(d.audioCapabilities||[]).concat(d.videoCapabilities||[]).map(function(a){return a.contentType});c&&(this.u=null);c=b[a.keySystem];Lb(this,a.keySystem,c,c.drmInfos);return this.b.licenseServerUri?a.createMediaKeys():Promise.reject(new p(2,6,6012))}.bind(a)).then(function(a){if(this.c)return Promise.reject();this.j=a;this.L=!0}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();
63
+ this.u=this.b=null;return a instanceof p?Promise.reject(a):Promise.reject(new p(2,6,6002,a.message))}.bind(a));d.reject();return e}
64
+ function Kb(a,b){var c=b.keySystem;if(c){if(!b.licenseServerUri){var d=a.f.servers[c];d&&(b.licenseServerUri=d)}b.keyIds||(b.keyIds=[]);if(c=a.f.advanced[c])b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=c.persistentStateRequired),b.videoRobustness||(b.videoRobustness=c.videoRobustness),b.audioRobustness||(b.audioRobustness=c.audioRobustness),b.serverCertificate||(b.serverCertificate=c.serverCertificate)}}
65
+ function Ib(a){if(gb(a.f.clearKeys))return null;var b=[],c=[],d;for(d in a.f.clearKeys){var e=a.f.clearKeys[d],f=vb(d);e=vb(e);f={kty:"oct",kid:tb(f,!1),k:tb(e,!1)};b.push(f);c.push(f.kid)}a=JSON.stringify({keys:b});c=JSON.stringify({kids:c});c=[{initData:new Uint8Array(pb(c)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
66
+ initData:c,keyIds:[]}}function Jb(a,b){var c=a.f,d=Object.keys(c.servers);return!d.length||b.periods.some(function(a){return a.variants.some(function(a){return a.drmInfos.length})})?null:d.map(function(a){return{keySystem:a,licenseServerUri:c.servers[a],distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]}})}
67
+ function Lb(a,b,c,d){var e=[],f=[],g=[],h=[];Mb(d,e,f,g,h);a.b={keySystem:b,licenseServerUri:e[0],distinctiveIdentifierRequired:"required"==c.distinctiveIdentifier,persistentStateRequired:"required"==c.persistentState,audioRobustness:c.audioCapabilities?c.audioCapabilities[0].robustness:"",videoRobustness:c.videoCapabilities?c.videoCapabilities[0].robustness:"",serverCertificate:f[0],initData:g,keyIds:h}}
68
+ function Mb(a,b,c,d,e){function f(a,b){return a.keyId&&a.keyId==b.keyId?!0:a.initDataType==b.initDataType&&xb(a.initData,b.initData)}a.forEach(function(a){-1==b.indexOf(a.licenseServerUri)&&b.push(a.licenseServerUri);a.serverCertificate&&-1==Ya(c,a.serverCertificate,xb)&&c.push(a.serverCertificate);a.initData&&a.initData.forEach(function(a){-1==Ya(d,a,f)&&d.push(a)});if(a.keyIds)for(var g=0;g<a.keyIds.length;++g)-1==e.indexOf(a.keyIds[g])&&e.push(a.keyIds[g])})}
69
+ m.Cd=function(a){for(var b=new Uint8Array(a.initData),c=0;c<this.a.length;++c)if(xb(b,this.a[c].initData))return;Gb(this,a.initDataType,b)};
70
+ function Fb(a,b){try{var c=a.j.createSession("persistent-license")}catch(f){var d=new p(2,6,6005,f.message);a.h(d);return Promise.reject(d)}A(a.g,c,"message",a.Cc.bind(a));A(a.g,c,"keystatuseschange",a.yc.bind(a));var e={initData:null,ga:c,loaded:!1,Sb:Infinity,na:null};a.a.push(e);return c.load(b).then(function(a){if(!this.c){if(a)return e.loaded=!0,this.a.every(function(a){return a.loaded})&&this.i.resolve(),c;this.a.splice(this.a.indexOf(e),1);this.h(new p(2,6,6013))}}.bind(a),function(a){this.c||
71
+ (this.a.splice(this.a.indexOf(e),1),this.h(new p(2,6,6005,a.message)))}.bind(a))}
72
+ function Gb(a,b,c){try{var d=a.da?a.j.createSession("persistent-license"):a.j.createSession()}catch(e){a.h(new p(2,6,6005,e.message));return}A(a.g,d,"message",a.Cc.bind(a));A(a.g,d,"keystatuseschange",a.yc.bind(a));a.a.push({initData:c,ga:d,loaded:!1,Sb:Infinity,na:null});d.generateRequest(b,c.buffer)["catch"](function(a){if(!this.c){for(var b=0;b<this.a.length;++b)if(this.a[b].ga==d){this.a.splice(b,1);break}this.h(new p(2,6,6006,a.message))}}.bind(a))}
73
+ m.Cc=function(a){this.f.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.ca?this.K.push(a):Nb(this,a)};
74
+ function Nb(a,b){for(var c=b.target,d,e=0;e<a.a.length;e++)if(a.a[e].ga==c){d=a.a[e];break}e=Va([a.b.licenseServerUri],a.f.retryParameters);e.body=b.message;e.method="POST";"com.microsoft.playready"!=a.b.keySystem&&"com.chromecast.playready"!=a.b.keySystem||Ob(e);a.s.Ya.request(2,e).then(function(a){return this.c?Promise.reject():c.update(a.data).then(function(){this.s.onEvent(new B("drmsessionupdate"));d&&(d.na&&d.na.resolve(),setTimeout(function(){d.loaded=!0;this.a.every(function(a){return a.loaded})&&
75
+ this.i.resolve()}.bind(this),5E3))}.bind(this))}.bind(a),function(a){if(this.c)return Promise.resolve();a=new p(2,6,6007,a);this.h(a);d&&d.na&&d.na.reject(a)}.bind(a))["catch"](function(a){if(this.c)return Promise.resolve();a=new p(2,6,6008,a.message);this.h(a);d&&d.na&&d.na.reject(a)}.bind(a))}
76
+ function Ob(a){var b=nb(a.body,!0,!0);if(-1==b.indexOf("PlayReadyKeyMessage"))a.headers["Content-Type"]="text/xml; charset=utf-8";else{b=(new DOMParser).parseFromString(b,"application/xml");for(var c=b.getElementsByTagName("HttpHeader"),d=0;d<c.length;++d)a.headers[c[d].querySelector("name").textContent]=c[d].querySelector("value").textContent;a.body=ub(b.querySelector("Challenge").textContent).buffer}}
77
+ m.yc=function(a){a=a.target;var b;for(b=0;b<this.a.length&&this.a[b].ga!=a;++b);if(b!=this.a.length){var c=!1;a.keyStatuses.forEach(function(a,d){if("string"==typeof d){var e=d;d=a;a=e}if("com.microsoft.playready"==this.b.keySystem&&16==d.byteLength){e=new DataView(d);var f=e.getUint32(0,!0),k=e.getUint16(4,!0),l=e.getUint16(6,!0);e.setUint32(0,f,!1);e.setUint16(4,k,!1);e.setUint16(6,l,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==a&&(a="usable");"status-pending"!=a&&(this.a[b].loaded=
78
+ !0,this.a.every(function(a){return a.loaded})&&this.i.resolve());"expired"==a&&(c=!0);e=wb(new Uint8Array(d));this.A[e]=a}.bind(this));var d=a.expiration-Date.now();(0>d||c&&1E3>d)&&!this.a[b].na&&(this.a.splice(b,1),a.close());rb(this.I,.5)}};m.ke=function(){function a(a,c){return"expired"==c}!gb(this.A)&&ib(this.A,a)&&this.h(new p(2,6,6014));this.s.Tb(this.A)};
79
+ function Pb(){var a=[],b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:b}],d={};"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(b){var e=navigator.requestMediaKeySystemAccess(b,c).then(function(a){var c=a.getConfiguration().sessionTypes;c=
80
+ c?0<=c.indexOf("persistent-license"):!1;0<=navigator.userAgent.indexOf("Tizen 3")&&(c=!1);d[b]={persistentState:c};return a.createMediaKeys()})["catch"](function(){d[b]=null});a.push(e)});return Promise.all(a).then(function(){return d})}m.Nd=function(){for(var a=0;a<this.K.length;a++)Nb(this,this.K[a]);this.ca=!0;this.K=[]};function Qb(a,b){var c=a.keySystem();return 0==b.drmInfos.length||b.drmInfos.some(function(a){return a.keySystem==c})}
81
+ function Rb(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=0;d<a.length;d++)for(var e=0;e<b.length;e++)if(a[d].keySystem==b[e].keySystem){var f=a[d];e=b[e];var g=[];g=g.concat(f.initData||[]);g=g.concat(e.initData||[]);var h=[];h=h.concat(f.keyIds);h=h.concat(e.keyIds);c.push({keySystem:f.keySystem,licenseServerUri:f.licenseServerUri||e.licenseServerUri,distinctiveIdentifierRequired:f.distinctiveIdentifierRequired||e.distinctiveIdentifierRequired,persistentStateRequired:f.persistentStateRequired||
82
+ e.persistentStateRequired,videoRobustness:f.videoRobustness||e.videoRobustness,audioRobustness:f.audioRobustness||e.audioRobustness,serverCertificate:f.serverCertificate||e.serverCertificate,initData:g,keyIds:h});break}return c}m.ie=function(){this.a.forEach(function(a){var b=a.Sb,c=a.ga.expiration;isNaN(c)&&(c=Infinity);c!=b&&(this.s.onExpirationUpdated(a.ga.sessionId,c),a.Sb=c)}.bind(this))};function Sb(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Tb(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)?!1:b>=a.start(0)&&b<=a.end(a.length-1)}function Ub(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=a.length-1;0<=d&&a.end(d)>b;--d)c+=a.end(d)-Math.max(a.start(d),b);return c}function Vb(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Wb(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.c=[];this.a.on("data",this.g.bind(this));this.a.on("done",this.f.bind(this))}Wb.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
83
+ function Xb(a,b){var c=b.replace("mp2t","mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Yb(a,b){a.b=new u;a.c=[];var c=new Uint8Array(b);a.a.push(c);a.a.flush();return a.b}
84
+ Wb.prototype.g=function(a){var b=new Uint8Array(a.data.byteLength+a.initSegment.byteLength);b.set(a.initSegment,0);b.set(a.data,a.initSegment.byteLength);this.c.push(b)};Wb.prototype.f=function(){var a=yb.apply(null,this.c);this.b.resolve(a)};function Zb(a){this.c=null;this.f=a;this.i=this.g=0;this.h=Infinity;this.b=this.a=null}var E={};n("shaka.text.TextEngine.registerParser",function(a,b){E[a]=b});n("shaka.text.TextEngine.unregisterParser",function(a){delete E[a]});Zb.prototype.destroy=function(){this.f=this.c=null;return Promise.resolve()};Zb.prototype.ze=function(a){this.f=a};Zb.prototype.setDisplayer=Zb.prototype.ze;
85
+ Zb.prototype.Kb=function(a){var b={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.c.parseMedia(new Uint8Array(a),b)[0].startTime}catch(c){throw new p(2,2,2009,c);}};
86
+ function $b(a,b,c,d){return Promise.resolve().then(function(){if(this.c&&this.f)if(null==c||null==d)this.c.parseInit(new Uint8Array(b));else{var a={periodStart:this.g,segmentStart:this.g+c,segmentEnd:this.g+d};a=this.c.parseMedia(new Uint8Array(b),a).filter(function(a){return a.startTime>=this.i&&a.startTime<this.h}.bind(this));this.f.append(a);null==this.a&&(this.a=Math.max(c,this.i));this.b=Math.min(d,this.h)}}.bind(a))}
87
+ Zb.prototype.remove=function(a,b){return Promise.resolve().then(function(){!this.f||!this.f.remove(a,b)||null==this.a||b<=this.a||a>=this.b||(a<=this.a&&b>=this.b?this.a=this.b=null:a<=this.a&&b<this.b?this.a=b:a>this.a&&b>=this.b&&(this.b=a))}.bind(this))};function ac(a,b,c){this.g=a;this.f=b;this.l=c;this.b={};this.a=null;this.c={};this.i=new z;this.j=!1;this.h={}}
88
+ function bc(){var a={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(b){a[b]=!!E[b]||
89
+ MediaSource.isTypeSupported(b);var c=b.split(";")[0];a[c]=a[c]||a[b]});return a}m=ac.prototype;m.destroy=function(){this.j=!0;var a=[],b;for(b in this.c){var c=this.c[b],d=c[0];this.c[b]=c.slice(0,1);d&&a.push(d.p["catch"](Qa));for(d=1;d<c.length;++d)c[d].p["catch"](Qa),c[d].p.reject()}this.a&&a.push(this.a.destroy());for(b in this.h)a.push(this.h[b].destroy());return Promise.all(a).then(function(){this.i.destroy();this.l=this.a=this.f=this.g=this.i=null;this.b={};this.h={};this.c={}}.bind(this))};
90
+ m.init=function(a){for(var b in a){var c=a[b];c=kb(c.mimeType,c.codecs);"text"==b?cc(this,c):(!MediaSource.isTypeSupported(c)&&window.muxjs&&"mp2t"==c.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Xb(b,c))&&(this.h[b]=new Wb,c=Xb(b,c)),c=this.f.addSourceBuffer(c),A(this.i,c,"error",this.Le.bind(this,b)),A(this.i,c,"updateend",this.Ma.bind(this,b)),this.b[b]=c,this.c[b]=[])}};function cc(a,b){a.a||(a.a=new Zb(a.l));a.a.c=new E[b]}
91
+ function dc(a,b){if("text"==b)var c=a.a.a;else c=ec(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}m.Gb=function(){var a=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Vb(this.g.buffered),audio:Vb(ec(this,"audio")),video:Vb(ec(this,"video")),text:a}};function ec(a,b){try{return a.b[b].buffered}catch(c){return null}}
92
+ function fc(a,b,c,d,e){return"text"==b?$b(a.a,c,d,e):a.h[b]?Yb(a.h[b],c).then(function(a){return gc(this,b,this.Rc.bind(this,b,a.buffer))}.bind(a)):gc(a,b,a.Rc.bind(a,b,c))}m.remove=function(a,b,c){return"text"==a?this.a.remove(b,c):gc(this,a,this.Sc.bind(this,a,b,c))};function hc(a,b){return"text"==b?a.a?a.a.remove(0,Infinity):Promise.resolve():gc(a,b,a.Sc.bind(a,b,0,a.f.duration))}
93
+ function ic(a,b,c,d,e){return"text"==b?(a.a.g=c,a=a.a,a.i=d,a.h=e,Promise.resolve()):Promise.all([gc(a,b,a.Yc.bind(a,b)),gc(a,b,a.Be.bind(a,b,c)),gc(a,b,a.ye.bind(a,b,d,e))])}m.endOfStream=function(a){return jc(this,function(){a?this.f.endOfStream(a):this.f.endOfStream()}.bind(this))};m.ha=function(a){return jc(this,function(){this.f.duration=a}.bind(this))};m.S=function(){return this.f.duration};m.Rc=function(a,b){this.b[a].appendBuffer(b)};
94
+ m.Sc=function(a,b,c){c<=b?this.Ma(a):this.b[a].remove(b,c)};m.Yc=function(a){var b=this.b[a].appendWindowStart,c=this.b[a].appendWindowEnd;this.b[a].abort();this.b[a].appendWindowStart=b;this.b[a].appendWindowEnd=c;this.Ma(a)};m.gd=function(a){this.g.currentTime-=.001;this.Ma(a)};m.Be=function(a,b){0>b&&(b+=.001);this.b[a].timestampOffset=b;this.Ma(a)};m.ye=function(a,b,c){this.b[a].appendWindowStart=0;this.b[a].appendWindowEnd=c;this.b[a].appendWindowStart=b;this.Ma(a)};
95
+ m.Le=function(a){this.c[a][0].p.reject(new p(2,3,3014,this.g.error?this.g.error.code:0))};m.Ma=function(a){var b=this.c[a][0];b&&(b.p.resolve(),kc(this,a))};function gc(a,b,c){if(a.j)return Promise.reject();c={start:c,p:new u};a.c[b].push(c);if(1==a.c[b].length)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new p(2,3,3017,b)):c.p.reject(new p(2,3,3015,d)),kc(a,b)}return c.p}
96
+ function jc(a,b){if(a.j)return Promise.reject();var c=[],d;for(d in a.b){var e=new u,f={start:function(a){a.resolve()}.bind(null,e),p:e};a.c[d].push(f);c.push(e);1==a.c[d].length&&f.start()}return Promise.all(c).then(function(){var a;try{b()}catch(k){var c=Promise.reject(new p(2,3,3015,k))}for(a in this.b)kc(this,a);return c}.bind(a),function(){return Promise.reject()}.bind(a))}function kc(a,b){a.c[b].shift();var c=a.c[b][0];if(c)try{c.start()}catch(d){c.p.reject(new p(2,3,3015,d)),kc(a,b)}};function lc(a,b,c){return c==b||a>=mc&&c==b.split("-")[0]||a>=nc&&c.split("-")[0]==b.split("-")[0]?!0:!1}var mc=1,nc=2;function oc(a){a=a.toLowerCase().split("-");var b=pc[a[0]];b&&(a[0]=b);return a.join("-")}
97
+ var pc={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
98
+ fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
99
+ lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
100
+ srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function qc(a,b,c){var d=a.video;return d&&(d.width<b.minWidth||d.width>b.maxWidth||d.width>c.width||d.height<b.minHeight||d.height>b.maxHeight||d.height>c.height||d.width*d.height<b.minPixels||d.width*d.height>b.maxPixels)||a.bandwidth<b.minBandwidth||a.bandwidth>b.maxBandwidth?!1:!0}function rc(a,b,c){var d=!1;a.variants.forEach(function(a){var e=a.allowedByApplication;a.allowedByApplication=qc(a,b,c);e!=a.allowedByApplication&&(d=!0)});return d}
101
+ function sc(a,b,c,d){d.variants=d.variants.filter(function(d){return a&&a.L&&!Qb(a,d)?!1:tc(d.audio,a,b)&&tc(d.video,a,c)});d.textStreams=d.textStreams.filter(function(a){return!!E[kb(a.mimeType,a.codecs)]})}
102
+ function tc(a,b,c){if(!a)return!0;var d=null;b&&b.L&&(d=b.u);b=kb(a.mimeType,a.codecs);var e=kb(a.mimeType,a.codecs),f=a.mimeType,g;for(g in lb){var h=a[g],k=lb[g];h&&(f+="; "+k+'="'+h+'"')}return!(E[e]||MediaSource.isTypeSupported(f)||window.muxjs&&"mp2t"==e.split(";")[0].split("/")[1]&&MediaSource.isTypeSupported(Xb(a.type,e)))||d&&a.encrypted&&0>d.indexOf(b)||c&&(a.mimeType!=c.mimeType||a.codecs.split(".")[0]!=c.codecs.split(".")[0])?!1:!0}
103
+ function uc(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=[];b&&k.push.apply(k,b.roles);c&&k.push.apply(k,c.roles);k=Xa(k);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,frameRate:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,
104
+ roles:k,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null};c&&(a.videoId=c.id,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.channelsCount=b.channelsCount,a.audioBandwidth=b.bandwidth||null,a.label=b.label);return a}
105
+ function vc(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}function wc(a){var b=[],c=xc(a.variants);a=a.textStreams;c.forEach(function(a){b.push(uc(a))});a.forEach(function(a){b.push(vc(a))});return b}
106
+ function yc(a,b,c){return xc(a.variants).map(function(a){var d=uc(a);a.video&&a.audio?d.active=c==a.video.id&&b==a.audio.id:a.video?d.active=c==a.video.id:a.audio&&(d.active=b==a.audio.id);return d})}function zc(a,b){return a.textStreams.map(function(a){var c=vc(a);c.active=b==a.id;return c})}function Ac(a,b){for(var c=0;c<a.variants.length;c++)if(a.variants[c].id==b.id)return a.variants[c];return null}
107
+ function Bc(a,b){for(var c=0;c<a.textStreams.length;c++)if(a.textStreams[c].id==b.id)return a.textStreams[c];return null}function Cc(a){return a.allowedByApplication&&a.allowedByKeySystem}function xc(a){return a.filter(function(a){return Cc(a)})}
108
+ function Dc(a,b,c,d){var e=xc(a),f=e;a=e.filter(function(a){return a.primary});a.length&&(f=a);var g=f.length?f[0].language:"";f=f.filter(function(a){return a.language==g});if(b){var h=oc(b);[nc,mc,0].forEach(function(a){var b=!1;e.forEach(function(c){h=oc(h);var e=oc(c.language);lc(a,h,e)&&(b?f.push(c):(f=[c],b=!0),d&&(d.audio=!0))})})}if(c&&(b=Ec(f,c),b.length))return b;b=f.map(function(a){return(a.audio?a.audio.roles:[]).concat(a.video?a.video.roles:[])}).reduce(Pa,[]);return b.length?Ec(f,b[0]):
109
+ f}function Fc(a,b,c,d){var e=a,f=a.filter(function(a){return a.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(a){return a.language==g});if(b){var h=oc(b);[nc,mc,0].forEach(function(b){var c=!1;a.forEach(function(a){var f=oc(a.language);lc(b,h,f)&&(c?e.push(a):(e=[a],c=!0),d&&(d.text=!0))})})}b=c?Gc(e,c):e.filter(function(a){return 0==a.roles.length});if(b.length)return b;b=e.map(function(a){return a.roles}).reduce(Pa,[]);return b.length?Gc(e,b[0]):e}
110
+ function Ec(a,b){return a.filter(function(a){return a.audio&&0<=a.audio.roles.indexOf(b)||a.video&&0<=a.video.roles.indexOf(b)})}function Gc(a,b){return a.filter(function(a){return 0<=a.roles.indexOf(b)})}function Hc(a,b,c){for(var d=0;d<c.length;d++)if(c[d].audio==a&&c[d].video==b)return c[d];return null}function Ic(a,b,c){function d(a,b){return null==a?null==b:b.id==a}for(var e=0;e<c.length;e++)if(d(a,c[e].audio)&&d(b,c[e].video))return c[e];return null}
111
+ function Jc(a,b){for(var c=a.periods.length-1;0<c;--c)if(b+fb>=a.periods[c].startTime)return c;return 0}function Kc(a,b){for(var c=0;c<a.periods.length;++c){var d=a.periods[c];if("text"==b.type)for(var e=0;e<d.textStreams.length;++e){if(d.textStreams[e]==b)return c}else for(e=0;e<d.variants.length;++e){var f=d.variants[e];if(f.audio==b||f.video==b||f.video&&f.video.trickModeVideo==b)return c}}return-1};function F(){this.h=null;this.c=!1;this.b=new pa;this.g=[];this.i=!1;this.a=this.f=null}n("shaka.abr.SimpleAbrManager",F);F.prototype.stop=function(){this.h=null;this.c=!1;this.g=[];this.f=null};F.prototype.stop=F.prototype.stop;F.prototype.init=function(a){this.h=a};F.prototype.init=F.prototype.init;
112
+ F.prototype.chooseVariant=function(){var a=Lc(this.a.restrictions,this.g),b=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);if(this.g.length&&!a.length)throw new p(2,4,4012);for(var c=a[0]||null,d=0;d<a.length;++d){var e=a[d],f=(a[d+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;b>=e.bandwidth/this.a.bandwidthDowngradeTarget&&b<=f&&(c=e)}this.f=Date.now();return c};F.prototype.chooseVariant=F.prototype.chooseVariant;F.prototype.enable=function(){this.c=!0};
113
+ F.prototype.enable=F.prototype.enable;F.prototype.disable=function(){this.c=!1};F.prototype.disable=F.prototype.disable;F.prototype.segmentDownloaded=function(a,b){var c=this.b;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;na(c.b,e,d);na(c.c,e,d)}if(null!=this.f&&this.c)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;c=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(c)}};
114
+ F.prototype.segmentDownloaded=F.prototype.segmentDownloaded;F.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};F.prototype.getBandwidthEstimate=F.prototype.getBandwidthEstimate;F.prototype.setVariants=function(a){this.g=a};F.prototype.setVariants=F.prototype.setVariants;F.prototype.configure=function(a){this.a=a};F.prototype.configure=F.prototype.configure;
115
+ function Lc(a,b){return b.filter(function(b){return qc(b,a,{width:Infinity,height:Infinity})}).sort(function(a,b){return a.bandwidth-b.bandwidth})};var Mc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Nc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Oc=["loop","playbackRate"],Pc=["pause","play"],Qc="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),Rc={drmInfo:20,getAudioLanguages:2,getAudioLanguagesAndRoles:2,
116
+ getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},Sc={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Tc=[["getConfiguration","configure"]],Uc=[["isTextTrackVisible","setTextTrackVisibility"]],Zc="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
117
+ $c=["load","unload"];function ad(a){return JSON.stringify(a,function(a,c){if("function"!=typeof c){if(c instanceof Event||c instanceof B){var b={},e;for(e in c){var f=c[e];f&&"object"==typeof f?"detail"==e&&(b[e]=f):e in Event||(b[e]=f)}return b}if(c instanceof TimeRanges)for(b={__type__:"TimeRanges",length:c.length,start:[],end:[]},e=0;e<c.length;++e)b.start.push(c.start(e)),b.end.push(c.end(e));else b="number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return b}})}
118
+ function bd(a){return JSON.parse(a,function(a,c){return"NaN"==c?NaN:"-Infinity"==c?-Infinity:"Infinity"==c?Infinity:c&&"object"==typeof c&&"TimeRanges"==c.__type__?cd(c):c})}function cd(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}};function dd(a,b,c,d,e,f){this.K=a;this.g=b;this.L=c;this.j=!1;this.A=d;this.I=e;this.u=f;this.b=this.h=!1;this.w="";this.i=null;this.l=this.wc.bind(this);this.m=this.Jd.bind(this);this.a={video:{},player:{}};this.s=0;this.c={};this.f=null}var ed=!1,G=null;m=dd.prototype;m.destroy=function(){fd(this);G&&gd(this);this.I=this.A=this.g=null;this.b=this.h=!1;this.m=this.l=this.f=this.c=this.a=this.i=null;return Promise.resolve()};m.X=function(){return this.b};m.Xb=function(){return this.w};
119
+ m.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.g();var a=new chrome.cast.SessionRequest(this.K);a=new chrome.cast.ApiConfig(a,this.xc.bind(this),this.Qd.bind(this),"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ed&&setTimeout(this.g.bind(this),20);(a=G)&&a.status!=chrome.cast.SessionStatus.STOPPED?this.xc(a):G=null}else window.__onGCastApiAvailable=function(a){a&&this.init()}.bind(this)};
120
+ m.$b=function(a){this.i=a;this.b&&hd({type:"appData",appData:this.i})};m.cast=function(a){if(!this.h)return Promise.reject(new p(1,8,8E3));if(!ed)return Promise.reject(new p(1,8,8001));if(this.b)return Promise.reject(new p(1,8,8002));this.f=new u;chrome.cast.requestSession(this.Ub.bind(this,a),this.vc.bind(this));return this.f};m.tb=function(){this.b&&(fd(this),G&&(gd(this),G.stop(function(){},function(){}),G=null))};
121
+ m.get=function(a,b){if("video"==a){if(0<=Pc.indexOf(b))return this.Hc.bind(this,a,b)}else if("player"==a){if(Sc[b]&&!this.get("player","isLive")())return function(){};if(0<=Zc.indexOf(b))return this.Hc.bind(this,a,b);if(0<=$c.indexOf(b))return this.oe.bind(this,a,b);if(Rc[b])return this.Ec.bind(this,a,b)}return this.Ec(a,b)};m.set=function(a,b,c){this.a[a][b]=c;hd({type:"set",targetName:a,property:b,value:c})};
122
+ m.Ub=function(a,b){G=b;b.addUpdateListener(this.l);b.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m);this.wc();hd({type:"init",initState:a,appData:this.i});this.f.resolve()};m.vc=function(a){var b=8003;switch(a.code){case "cancel":b=8004;break;case "timeout":b=8005;break;case "receiver_unavailable":b=8006}this.f.reject(new p(2,8,b,a))};m.Ec=function(a,b){return this.a[a][b]};m.Hc=function(a,b){hd({type:"call",targetName:a,methodName:b,args:Array.prototype.slice.call(arguments,2)})};
123
+ m.oe=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=new u,e=this.s.toString();this.s++;this.c[e]=d;hd({type:"asyncCall",targetName:a,methodName:b,args:c,id:e});return d};m.xc=function(a){var b=this.u();this.f=new u;this.j=!0;this.Ub(b,a)};m.Qd=function(a){ed="available"==a;this.g()};function gd(a){var b=G;b.removeUpdateListener(a.l);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.m)}
124
+ m.wc=function(){var a=G?"connected"==G.status:!1;if(this.b&&!a){this.I();for(var b in this.a)this.a[b]={};fd(this)}this.w=(this.b=a)?G.receiver.friendlyName:"";this.g()};function fd(a){for(var b in a.c){var c=a.c[b];delete a.c[b];c.reject(new p(1,7,7E3))}}
125
+ m.Jd=function(a,b){var c=bd(b);switch(c.type){case "event":var d=c.targetName,e=c.event;this.A(d,new B(e.type,e));break;case "update":e=c.update;for(d in e){c=this.a[d]||{};for(var f in e[d])c[f]=e[d][f]}this.j&&(this.L(),this.j=!1);break;case "asyncComplete":if(d=c.id,f=c.error,c=this.c[d],delete this.c[d],c)if(f){d=new p(f.severity,f.category,f.code);for(e in f)d[e]=f[e];c.reject(d)}else c.resolve()}};function hd(a){a=ad(a);G.sendMessage("urn:x-cast:com.google.shaka.v2",a,function(){},ra)};function H(){this.Bb=new ab;this.jb=this}H.prototype.addEventListener=function(a,b){this.Bb.push(a,b)};H.prototype.removeEventListener=function(a,b){this.Bb.remove(a,b)};H.prototype.dispatchEvent=function(a){for(var b=this.Bb.get(a.type)||[],c=0;c<b.length;++c){a.target=this.jb;a.currentTarget=this.jb;var d=b[c];try{d.handleEvent?d.handleEvent(a):d.call(this,a)}catch(e){}if(a.a)break}return a.defaultPrevented};function I(a,b,c){H.call(this);this.c=a;this.b=b;this.i=this.g=this.f=this.j=this.h=null;this.a=new dd(c,this.Ge.bind(this),this.He.bind(this),this.Ie.bind(this),this.Je.bind(this),this.oc.bind(this));id(this)}la(I,H);n("shaka.cast.CastProxy",I);I.prototype.destroy=function(a){a&&this.a&&this.a.tb();a=[this.i?this.i.destroy():null,this.b?this.b.destroy():null,this.a?this.a.destroy():null];this.a=this.i=this.j=this.h=this.b=this.c=null;return Promise.all(a)};I.prototype.destroy=I.prototype.destroy;
126
+ I.prototype.vd=function(){return this.h};I.prototype.getVideo=I.prototype.vd;I.prototype.nd=function(){return this.j};I.prototype.getPlayer=I.prototype.nd;I.prototype.Zc=function(){return this.a?this.a.h&&ed:!1};I.prototype.canCast=I.prototype.Zc;I.prototype.X=function(){return this.a?this.a.X():!1};I.prototype.isCasting=I.prototype.X;I.prototype.Xb=function(){return this.a?this.a.Xb():""};I.prototype.receiverName=I.prototype.Xb;I.prototype.cast=function(){var a=this.oc();return this.a.cast(a).then(function(){return this.b.zb()}.bind(this))};
127
+ I.prototype.cast=I.prototype.cast;I.prototype.$b=function(a){this.a.$b(a)};I.prototype.setAppData=I.prototype.$b;I.prototype.Ne=function(){var a=this.a;if(a.b){var b=a.u();chrome.cast.requestSession(a.Ub.bind(a,b),a.vc.bind(a))}};I.prototype.suggestDisconnect=I.prototype.Ne;I.prototype.tb=function(){this.a.tb()};I.prototype.forceDisconnect=I.prototype.tb;
128
+ function id(a){a.a.init();a.i=new z;Mc.forEach(function(a){A(this.i,this.c,a,this.Ue.bind(this))}.bind(a));Qc.forEach(function(a){A(this.i,this.b,a,this.ge.bind(this))}.bind(a));a.h={};for(var b in a.c)Object.defineProperty(a.h,b,{configurable:!1,enumerable:!0,get:a.Te.bind(a,b),set:a.Ve.bind(a,b)});a.j={};for(b in a.b)Object.defineProperty(a.j,b,{configurable:!1,enumerable:!0,get:a.fe.bind(a,b)});a.f=new H;a.f.jb=a.h;a.g=new H;a.g.jb=a.j}m=I.prototype;
129
+ m.oc=function(){var a={video:{},player:{},playerAfterLoad:{},manifest:this.b.Ib(),startTime:null};this.c.pause();Oc.forEach(function(b){a.video[b]=this.c[b]}.bind(this));this.c.ended||(a.startTime=this.c.currentTime);Tc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.player[c]=b}.bind(this));Uc.forEach(function(b){var c=b[1];b=this.b[b[0]]();a.playerAfterLoad[c]=b}.bind(this));return a};m.Ge=function(){this.dispatchEvent(new B("caststatuschanged"))};
130
+ m.He=function(){this.f.dispatchEvent(new B(this.h.paused?"pause":"play"))};
131
+ m.Je=function(){Tc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));var a=this.a.get("player","getManifestUri")(),b=this.a.get("video","ended"),c=Promise.resolve(),d=this.c.autoplay,e=null;b||(e=this.a.get("video","currentTime"));a&&(this.c.autoplay=!1,c=this.b.load(a,e),c["catch"](function(a){this.b.dispatchEvent(new B("error",{detail:a}))}.bind(this)));var f={};Oc.forEach(function(a){f[a]=this.a.get("video",a)}.bind(this));c.then(function(){Oc.forEach(function(a){this.c[a]=
132
+ f[a]}.bind(this));Uc.forEach(function(a){var b=a[1];a=this.a.get("player",a[0])();this.b[b](a)}.bind(this));this.c.autoplay=d;a&&this.c.play()}.bind(this))};
133
+ m.Te=function(a){if("addEventListener"==a)return this.f.addEventListener.bind(this.f);if("removeEventListener"==a)return this.f.removeEventListener.bind(this.f);if(this.a.X()&&0==Object.keys(this.a.a.video).length){var b=this.c[a];if("function"!=typeof b)return b}return this.a.X()?this.a.get("video",a):(b=this.c[a],"function"==typeof b&&(b=b.bind(this.c)),b)};m.Ve=function(a,b){this.a.X()?this.a.set("video",a,b):this.c[a]=b};m.Ue=function(a){this.a.X()||this.f.dispatchEvent(new B(a.type,a))};
134
+ m.fe=function(a){return"addEventListener"==a?this.g.addEventListener.bind(this.g):"removeEventListener"==a?this.g.removeEventListener.bind(this.g):"getMediaElement"==a?function(){return this.h}.bind(this):"getNetworkingEngine"==a?this.b.pc.bind(this.b):"getManifest"==a?this.a.X()?function(){return null}:this.b.Fa.bind(this.b):this.a.X()&&0==Object.keys(this.a.a.video).length&&Rc[a]||!this.a.X()?(a=this.b[a],a.bind(this.b)):this.a.get("player",a)};m.ge=function(a){this.a.X()||this.g.dispatchEvent(a)};
135
+ m.Ie=function(a,b){this.a.X()&&("video"==a?this.f.dispatchEvent(b):"player"==a&&this.g.dispatchEvent(b))};function jd(a,b,c,d){H.call(this);this.a=a;this.b=b;this.s={video:a,player:b};this.u=c||function(){};this.w=d||function(a){return a};this.m=!1;this.g=!0;this.f=0;this.l=!1;this.i=!0;this.j=this.h=this.c=null;kd(this)}la(jd,H);n("shaka.cast.CastReceiver",jd);jd.prototype.isConnected=function(){return this.m};jd.prototype.isConnected=jd.prototype.isConnected;jd.prototype.xd=function(){return this.g};jd.prototype.isIdle=jd.prototype.xd;
136
+ jd.prototype.destroy=function(){var a=this.b?this.b.destroy():Promise.resolve();null!=this.j&&window.clearTimeout(this.j);this.u=this.s=this.b=this.a=null;this.m=!1;this.g=!0;this.j=this.h=this.c=null;return a.then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})};jd.prototype.destroy=jd.prototype.destroy;
137
+ function kd(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=a.Bc.bind(a);b.onSenderDisconnected=a.Bc.bind(a);b.onSystemVolumeChanged=a.fd.bind(a);a.h=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.h.onMessage=a.Ed.bind(a);a.c=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.c.onMessage=a.Td.bind(a);b.start();Mc.forEach(function(a){this.a.addEventListener(a,this.Fc.bind(this,"video"))}.bind(a));Qc.forEach(function(a){this.b.addEventListener(a,this.Fc.bind(this,
138
+ "player"))}.bind(a));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.b.ac(3840,2160):a.b.ac(1920,1080);a.a.addEventListener("loadeddata",function(){this.l=!0}.bind(a));a.b.addEventListener("loading",function(){this.g=!1;ld(this)}.bind(a));a.a.addEventListener("playing",function(){this.g=!1;ld(this)}.bind(a));a.a.addEventListener("pause",function(){ld(this)}.bind(a));a.b.addEventListener("unloading",function(){this.g=!0;ld(this)}.bind(a));
139
+ a.a.addEventListener("ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&(this.g=!0,ld(this))}.bind(this),5E3)}.bind(a))}m=jd.prototype;m.Bc=function(){this.f=0;this.i=!0;this.m=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ld(this)};function ld(a){Promise.resolve().then(function(){this.dispatchEvent(new B("caststatuschanged"));md(this)||nd(this,0)}.bind(a))}
140
+ function od(a,b,c){for(var d in b.player)a.b[d](b.player[d]);a.u(c);c=Promise.resolve();var e=a.a.autoplay;b.manifest&&(a.a.autoplay=!1,c=a.b.load(b.manifest,b.startTime),c["catch"](function(a){this.b.dispatchEvent(new B("error",{detail:a}))}.bind(a)));c.then(function(){for(var a in b.video){var c=b.video[a];this.a[a]=c}for(a in b.playerAfterLoad)c=b.playerAfterLoad[a],this.b[a](c);this.a.autoplay=e;b.manifest&&(this.a.play(),nd(this,0))}.bind(a))}
141
+ m.Fc=function(a,b){this.b&&(this.Vb(),pd(this,{type:"event",targetName:a,event:b},this.c))};
142
+ m.Vb=function(){null!=this.j&&window.clearTimeout(this.j);this.j=window.setTimeout(this.Vb.bind(this),500);var a={video:{},player:{}};Nc.forEach(function(b){a.video[b]=this.a[b]}.bind(this));if(this.b.P())for(var b in Sc){var c=Sc[b];0==this.f%c&&(a.player[b]=this.b[b]())}for(b in Rc)c=Rc[b],0==this.f%c&&(a.player[b]=this.b[b]());if(b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())a.video.volume=b.level,a.video.muted=b.muted;this.l&&(this.f+=1);pd(this,{type:"update",update:a},
143
+ this.c);md(this)};function md(a){return a.i&&(a.a.duration||a.b.P())?(qd(a),a.i=!1,!0):!1}function qd(a){var b={contentId:a.b.Ib(),streamType:a.b.P()?"LIVE":"BUFFERED",duration:a.a.duration,contentType:""};nd(a,0,b)}m.fd=function(){var a=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();a&&pd(this,{type:"update",update:{video:{volume:a.level,muted:a.muted}}},this.c);pd(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)};
144
+ m.Td=function(a){var b=bd(a.data);switch(b.type){case "init":this.f=0;this.l=!1;this.i=!0;od(this,b.initState,b.appData);this.Vb();break;case "appData":this.u(b.appData);break;case "set":var c=b.targetName,d=b.property,e=b.value;if("video"==c)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==d){b.setSystemVolumeLevel(e);break}else if("muted"==d){b.setSystemVolumeMuted(e);break}this.s[c][d]=e;break;case "call":c=b.targetName;d=b.methodName;e=b.args;var f=this.s[c];f[d].apply(f,e);break;
145
+ case "asyncCall":c=b.targetName,d=b.methodName,"player"==c&&"load"==d&&(this.f=0,this.l=!1),e=b.args,b=b.id,a=a.senderId,f=this.s[c],e=f[d].apply(f,e),"player"==c&&"load"==d&&(e=e.then(function(){this.i=!0}.bind(this))),e.then(this.Mc.bind(this,a,b,null),this.Mc.bind(this,a,b))}};
146
+ m.Ed=function(a){var b=bd(a.data);switch(b.type){case "PLAY":this.a.play();nd(this,0);break;case "PAUSE":this.a.pause();nd(this,0);break;case "SEEK":a=b.currentTime;var c=b.resumeState;null!=a&&(this.a.currentTime=Number(a));c&&"PLAYBACK_START"==c?(this.a.play(),nd(this,0)):c&&"PLAYBACK_PAUSE"==c&&(this.a.pause(),nd(this,0));break;case "STOP":this.b.zb().then(function(){nd(this,0)}.bind(this));break;case "GET_STATUS":nd(this,Number(b.requestId));break;case "VOLUME":c=b.volume;a=c.level;c=c.muted;
147
+ var d=this.a.volume,e=this.a.muted;null!=a&&(this.a.volume=Number(a));null!=c&&(this.a.muted=c);d==this.a.volume&&e==this.a.muted||nd(this,0);break;case "LOAD":this.f=0;this.i=this.l=!1;c=b.media.contentId;a=b.currentTime;c=this.w(c);this.a.autoplay=!0;this.b.load(c,a).then(function(){qd(this)}.bind(this))["catch"](function(a){var c="LOAD_FAILED";7==a.category&&7E3==a.code&&(c="LOAD_CANCELLED");pd(this,{requestId:Number(b.requestId),type:c},this.h)}.bind(this));break;default:pd(this,{requestId:Number(b.requestId),
148
+ type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.h)}};m.Mc=function(a,b,c){pd(this,{type:"asyncComplete",id:b,error:c},this.c,a)};function pd(a,b,c,d){a.m&&(a=ad(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}
149
+ function nd(a,b,c){var d=a.a.playbackRate;var e=rd;e=a.g?e.IDLE:a.b.sc()?e.Tc:a.a.paused?e.Vc:e.Wc;d={mediaSessionId:0,playbackRate:d,playerState:e,currentTime:a.a.currentTime,supportedMediaCommands:15,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);pd(a,{requestId:b,type:"MEDIA_STATUS",status:[d]},a.h)}var rd={IDLE:"IDLE",Wc:"PLAYING",Tc:"BUFFERING",Vc:"PAUSED"};function sd(a,b){var c=J(a,b);return 1!=c.length?null:c[0]}function J(a,b){return Array.prototype.filter.call(a.childNodes,function(a){return a instanceof Element&&a.tagName==b})}function td(a){var b=a.firstChild;return b&&b.nodeType==Node.TEXT_NODE?a.textContent.trim():null}function K(a,b,c,d){var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?void 0!=d?d:null:e}
150
+ function ud(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function vd(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
151
+ function wd(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function xd(a){a=Number(a);return 0===a%1?a:null}function yd(a){a=Number(a);return 0===a%1&&0<a?a:null}function zd(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Ad(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1]/b[2]):Number(a);return isNaN(a)?null:a};var Bd={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"};
152
+ function Cd(a,b,c){a=Dd(a);var d=null,e=[],f=[],g=a.map(function(a){return a.keyId}).filter(Ra);if(g.length&&1<g.filter(Sa).length)throw new p(2,4,4010);c||(f=a.filter(function(a){return"urn:mpeg:dash:mp4protection:2011"==a.Lc?(d=a.init||d,!1):!0}),f.length&&(e=Ed(d,b,f),0==e.length&&(e=[eb("",d)])));!a.length||!c&&f.length||(e=hb(Bd).map(function(a){return eb(a,d)}));var h=g[0]||null;h&&e.forEach(function(a){a.initData.forEach(function(a){a.keyId=h})});return{kc:h,cf:d,drmInfos:e,nc:!0}}
153
+ function Fd(a,b,c,d){var e=Cd(a,b,d);if(c.nc){a=1==c.drmInfos.length&&!c.drmInfos[0].keySystem;b=0==e.drmInfos.length;if(0==c.drmInfos.length||a&&!b)c.drmInfos=e.drmInfos;c.nc=!1}else if(0<e.drmInfos.length&&(c.drmInfos=c.drmInfos.filter(function(a){return e.drmInfos.some(function(b){return b.keySystem==a.keySystem})}),0==c.drmInfos.length))throw new p(2,4,4008);return e.kc||c.kc}function Ed(a,b,c){return c.map(function(c){var d=Bd[c.Lc];return d?[eb(d,c.init||a)]:b(c.node)||[]}).reduce(Pa,[])}
154
+ function Dd(a){return a.map(function(a){var b=a.getAttribute("schemeIdUri"),d=a.getAttribute("cenc:default_KID"),e=J(a,"cenc:pssh").map(td);if(!b)return null;b=b.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),0<=d.indexOf(" ")))throw new p(2,4,4009);var f=[];try{f=e.map(function(a){return{initDataType:"cenc",initData:ub(a),keyId:null}})}catch(g){throw new p(2,4,4007);}return{node:a,Lc:b,keyId:d,init:0<f.length?f:null}}).filter(Ra)};function Gd(a,b,c,d,e){null!=e&&(e=Math.round(e));var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(a,b,c){if("$$"==a)return"$";var d=f[b];if(null==d)return a;"RepresentationID"==b&&c&&(c=void 0);a=d.toString();c=window.parseInt(c,10)||1;return Array(Math.max(0,c-a.length)+1).join("0")+a})}
155
+ function Hd(a,b){var c=Id(a,b,"timescale"),d=1;c&&(d=yd(c)||1);c=Id(a,b,"duration");(c=yd(c||""))&&(c/=d);var e=Id(a,b,"startNumber"),f=Number(Id(a,b,"presentationTimeOffset"))||0,g=zd(e||"");if(null==e||null==g)g=1;var h=Jd(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.M.duration||Infinity;h=J(h,"S");for(var l=[],q=0,w=0;w<h.length;++w){var r=h[w],t=K(r,"t",zd),y=K(r,"d",zd);r=K(r,"r",xd);null!=t&&(t-=f);if(!y)break;t=null!=t?t:q;r=r||0;if(0>r)if(w+1<h.length){r=K(h[w+1],"t",zd);if(null==r)break;
156
+ else if(t>=r)break;r=Math.ceil((r-t)/y)-1}else{if(Infinity==k)break;else if(t/e>=k)break;r=Math.ceil((k*e-t)/y)-1}0<l.length&&t!=q&&(l[l.length-1].end=t/e);for(var v=0;v<=r;++v)q=t+y,l.push({start:t/e,end:q/e,Re:t}),t=q}e=l}return{timescale:d,R:c,za:g,aa:f/d||0,gc:f,H:e}}function Id(a,b,c){return[b(a.v),b(a.T),b(a.Z)].filter(Ra).map(function(a){return a.getAttribute(c)}).reduce(function(a,b){return a||b})}
157
+ function Jd(a,b,c){return[b(a.v),b(a.T),b(a.Z)].filter(Ra).map(function(a){return sd(a,c)}).reduce(function(a,b){return a||b})}function Kd(a,b){var c=new DOMParser;try{var d=D(a);var e=c.parseFromString(d,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==b)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f}
158
+ function Ld(a,b,c,d,e,f){for(var g=a.getAttribute("xlink:href"),h=a.getAttribute("xlink:actuate")||"onRequest",k=0;k<a.attributes.length;k++){var l=a.attributes[k].nodeName;-1!=l.indexOf("xlink:")&&(a.removeAttribute(l),--k)}if(5<=f)return Promise.reject(new p(2,4,4028));if("onLoad"!=h)return Promise.reject(new p(2,4,4027));var q=C([d],[g]);return e.request(0,Va(q,b)).then(function(d){d=Kd(d.data,a.tagName);if(!d)return Promise.reject(new p(2,4,4001,g));for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);
159
+ for(;d.childNodes.length;){var h=d.childNodes[0];d.removeChild(h);a.appendChild(h)}for(h=0;h<d.attributes.length;h++){var k=d.attributes[h].nodeName,l=d.getAttribute(k);a.setAttribute(k,l)}return Md(a,b,c,q[0],e,f+1)}.bind(a))}
160
+ function Md(a,b,c,d,e,f){f=f||0;if(a.getAttribute("xlink:href")){var g=Ld(a,b,c,d,e,f);c&&(g=g["catch"](function(){return Md(a,b,c,d,e,f)}));return g}for(g=0;g<a.childNodes.length;g++){var h=a.childNodes[g];h instanceof Element&&"urn:mpeg:dash:resolve-to-zero:2013"==h.getAttribute("xlink:href")&&(a.removeChild(h),--g)}var k=[];for(g=0;g<a.childNodes.length;g++)h=a.childNodes[g],h.nodeType==Node.ELEMENT_NODE&&(h=Md(h,b,c,d,e,f),k.push(h));return Promise.all(k).then(function(){return a})};function L(a,b,c){this.a=a;this.O=b;this.D=c}n("shaka.media.InitSegmentReference",L);L.prototype.Eb=function(){return this.a()};L.prototype.createUris=L.prototype.Eb;L.prototype.Jb=function(){return this.O};L.prototype.getStartByte=L.prototype.Jb;L.prototype.Hb=function(){return this.D};L.prototype.getEndByte=L.prototype.Hb;function M(a,b,c,d,e,f){this.position=a;this.startTime=b;this.endTime=c;this.a=d;this.O=e;this.D=f}n("shaka.media.SegmentReference",M);M.prototype.U=function(){return this.position};
161
+ M.prototype.getPosition=M.prototype.U;M.prototype.Kb=function(){return this.startTime};M.prototype.getStartTime=M.prototype.Kb;M.prototype.kd=function(){return this.endTime};M.prototype.getEndTime=M.prototype.kd;M.prototype.Eb=function(){return this.a()};M.prototype.createUris=M.prototype.Eb;M.prototype.Jb=function(){return this.O};M.prototype.getStartByte=M.prototype.Jb;M.prototype.Hb=function(){return this.D};M.prototype.getEndByte=M.prototype.Hb;function N(a,b){this.G=a;this.b=b==Nd;this.a=0}n("shaka.util.DataViewReader",N);var Nd=1;N.Endianness={Xe:0,$e:Nd};N.prototype.ea=function(){return this.a<this.G.byteLength};N.prototype.hasMoreData=N.prototype.ea;N.prototype.U=function(){return this.a};N.prototype.getPosition=N.prototype.U;N.prototype.ld=function(){return this.G.byteLength};N.prototype.getLength=N.prototype.ld;N.prototype.$=function(){try{var a=this.G.getUint8(this.a);this.a+=1;return a}catch(b){Od()}};N.prototype.readUint8=N.prototype.$;
162
+ N.prototype.ab=function(){try{var a=this.G.getUint16(this.a,this.b);this.a+=2;return a}catch(b){Od()}};N.prototype.readUint16=N.prototype.ab;N.prototype.C=function(){try{var a=this.G.getUint32(this.a,this.b);this.a+=4;return a}catch(b){Od()}};N.prototype.readUint32=N.prototype.C;N.prototype.Gc=function(){try{var a=this.G.getInt32(this.a,this.b);this.a+=4;return a}catch(b){Od()}};N.prototype.readInt32=N.prototype.Gc;
163
+ N.prototype.Qa=function(){try{if(this.b){var a=this.G.getUint32(this.a,!0);var b=this.G.getUint32(this.a+4,!0)}else b=this.G.getUint32(this.a,!1),a=this.G.getUint32(this.a+4,!1)}catch(c){Od()}if(2097151<b)throw new p(2,3,3001);this.a+=8;return b*Math.pow(2,32)+a};N.prototype.readUint64=N.prototype.Qa;N.prototype.Pa=function(a){this.a+a>this.G.byteLength&&Od();var b=new Uint8Array(this.G.buffer,this.G.byteOffset+this.a,a);this.a+=a;return new Uint8Array(b)};N.prototype.readBytes=N.prototype.Pa;
164
+ N.prototype.F=function(a){this.a+a>this.G.byteLength&&Od();this.a+=a};N.prototype.skip=N.prototype.F;N.prototype.Kc=function(a){this.a<a&&Od();this.a-=a};N.prototype.rewind=N.prototype.Kc;N.prototype.seek=function(a){(0>a||a>this.G.byteLength)&&Od();this.a=a};N.prototype.seek=N.prototype.seek;N.prototype.Wb=function(){for(var a=this.a;this.ea()&&0!=this.G.getUint8(this.a);)this.a+=1;a=new Uint8Array(this.G.buffer,this.G.byteOffset+a,this.a-a);this.a+=1;return D(a)};
165
+ N.prototype.readTerminatedString=N.prototype.Wb;function Od(){throw new p(2,3,3E3);};function O(){this.c=[];this.b=[];this.a=!1}n("shaka.util.Mp4Parser",O);O.prototype.B=function(a,b){var c=Pd(a);this.c[c]=0;this.b[c]=b;return this};O.prototype.box=O.prototype.B;O.prototype.W=function(a,b){var c=Pd(a);this.c[c]=1;this.b[c]=b;return this};O.prototype.fullBox=O.prototype.W;O.prototype.stop=function(){this.a=!0};O.prototype.stop=O.prototype.stop;
166
+ O.prototype.parse=function(a,b){var c=new Uint8Array(a);c=new N(new DataView(c.buffer,c.byteOffset,c.byteLength),0);for(this.a=!1;c.ea()&&!this.a;)this.xb(0,c,b)};O.prototype.parse=O.prototype.parse;
167
+ O.prototype.xb=function(a,b,c){var d=b.U(),e=b.C(),f=b.C();switch(e){case 0:e=b.G.byteLength-d;break;case 1:e=b.Qa()}var g=this.b[f];if(g){var h=null,k=null;1==this.c[f]&&(k=b.C(),h=k>>>24,k&=16777215);f=d+e;c&&f>b.G.byteLength&&(f=b.G.byteLength);f-=b.U();b=0<f?b.Pa(f):new Uint8Array(0);b=new N(new DataView(b.buffer,b.byteOffset,b.byteLength),0);g({la:this,Dc:c||!1,version:h,flags:k,o:b,size:e,start:d+a})}else b.F(d+e-b.U())};O.prototype.parseNext=O.prototype.xb;
168
+ function P(a){for(;a.o.ea()&&!a.la.a;)a.la.xb(a.start,a.o,a.Dc)}O.children=P;function Qd(a){for(var b=a.o.C();0<b&&!a.la.a;--b)a.la.xb(a.start,a.o,a.Dc)}O.sampleDescription=Qd;function Rd(a){return function(b){a(b.o.Pa(b.o.G.byteLength-b.o.U()))}}O.allData=Rd;function Pd(a){for(var b=0,c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};function Sd(a,b,c,d){var e,f=(new O).W("sidx",function(a){e=Td(b,d,c,a)});a&&f.parse(a);if(e)return e;throw new p(2,3,3004);}
169
+ function Td(a,b,c,d){var e=[];d.o.F(4);var f=d.o.C();if(0==f)throw new p(2,3,3005);if(0==d.version){var g=d.o.C();var h=d.o.C()}else g=d.o.Qa(),h=d.o.Qa();d.o.F(2);var k=d.o.ab();a=a+d.size+h;for(h=0;h<k;h++){var l=d.o.C(),q=(l&2147483648)>>>31;l&=2147483647;var w=d.o.C();d.o.F(4);if(1==q)throw new p(2,3,3006);e.push(new M(e.length,g/f-b,(g+w)/f-b,function(){return c},a,a+l-1));g+=w;a+=l}d.la.stop();return e};function Q(a){this.a=a}n("shaka.media.SegmentIndex",Q);Q.prototype.destroy=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.destroy;Q.prototype.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&a<c.endTime)return c.position}return this.a.length&&a<this.a[0].startTime?this.a[0].position:null};Q.prototype.find=Q.prototype.find;
170
+ Q.prototype.get=function(a){if(0==this.a.length)return null;a-=this.a[0].position;return 0>a||a>=this.a.length?null:this.a[a]};Q.prototype.get=Q.prototype.get;Q.prototype.offset=function(a){for(var b=0;b<this.a.length;++b)this.a[b].startTime+=a,this.a[b].endTime+=a};Q.prototype.offset=Q.prototype.offset;
171
+ Q.prototype.Pb=function(a){for(var b=[],c=0,d=0;c<this.a.length&&d<a.length;){var e=this.a[c],f=a[d];e.startTime<f.startTime?(b.push(e),c++):(e.startTime>f.startTime?0==c&&b.push(f):(.1<Math.abs(e.endTime-f.endTime)?(f=new M(e.position,f.startTime,f.endTime,f.a,f.O,f.D),b.push(f)):b.push(e),c++),d++)}for(;c<this.a.length;)b.push(this.a[c++]);if(b.length)for(c=b[b.length-1].position+1;d<a.length;)f=a[d++],f=new M(c++,f.startTime,f.endTime,f.a,f.O,f.D),b.push(f);else b=a;this.a=b};
172
+ Q.prototype.merge=Q.prototype.Pb;Q.prototype.Fb=function(a){for(var b=0;b<this.a.length;++b)if(this.a[b].endTime>a){this.a.splice(0,b);return}this.a=[]};Q.prototype.evict=Q.prototype.Fb;
173
+ function Ud(a,b){for(;a.a.length;){var c=a.a[a.a.length-1];if(c.startTime>=b)a.a.pop();else break}for(;a.a.length;)if(c=a.a[0],0>=c.endTime)a.a.shift();else break;0!=a.a.length&&(c=a.a[0],c.startTime<fb&&(a.a[0]=new M(c.position,0,c.endTime,c.a,c.O,c.D)),c=a.a[a.a.length-1],a.a[a.a.length-1]=new M(c.position,c.startTime,b,c.a,c.O,c.D))};function Vd(a){this.b=a;this.a=new N(a,0);Wd||(Wd=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Wd;Vd.prototype.ea=function(){return this.a.ea()};
174
+ function Xd(a){var b=Yd(a);if(7<b.length)throw new p(2,3,3002);for(var c=0,d=0;d<b.length;d++)c=256*c+b[d];b=c;c=Yd(a);a:{for(d=0;d<Wd.length;d++)if(xb(c,Wd[d])){d=!0;break a}d=!1}if(d)c=a.b.byteLength-a.a.U();else{if(8==c.length&&c[1]&224)throw new p(2,3,3001);d=c[0]&(1<<8-c.length)-1;for(var e=1;e<c.length;e++)d=256*d+c[e];c=d}c=a.a.U()+c<=a.b.byteLength?c:a.b.byteLength-a.a.U();d=new DataView(a.b.buffer,a.b.byteOffset+a.a.U(),c);a.a.F(c);return new Zd(b,d)}
175
+ function Yd(a){var b=a.a.$(),c;for(c=1;8>=c&&!(b&1<<8-c);c++);if(8<c)throw new p(2,3,3002);var d=new Uint8Array(c);d[0]=b;for(b=1;b<c;b++)d[b]=a.a.$();return d}function Zd(a,b){this.id=a;this.a=b}function $d(a){if(8<a.a.byteLength)throw new p(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new p(2,3,3001);for(var b=0,c=0;c<a.a.byteLength;c++){var d=a.a.getUint8(c);b=256*b+d}return b};function ae(){}
176
+ ae.prototype.parse=function(a,b,c,d){var e;b=new Vd(new DataView(b));if(440786851!=Xd(b).id)throw new p(2,3,3008);var f=Xd(b);if(408125543!=f.id)throw new p(2,3,3009);b=f.a.byteOffset;f=new Vd(f.a);for(e=null;f.ea();){var g=Xd(f);if(357149030==g.id){e=g;break}}if(!e)throw new p(2,3,3010);f=new Vd(e.a);e=1E6;for(g=null;f.ea();){var h=Xd(f);if(2807729==h.id)e=$d(h);else if(17545==h.id)if(g=h,4==g.a.byteLength)g=g.a.getFloat32(0);else if(8==g.a.byteLength)g=g.a.getFloat64(0);else throw new p(2,3,3003);
177
+ }if(null==g)throw new p(2,3,3011);f=e/1E9;e=g*f;a=Xd(new Vd(new DataView(a)));if(475249515!=a.id)throw new p(2,3,3007);return be(a,b,f,e,c,d)};function be(a,b,c,d,e,f){function g(){return e}var h=[];a=new Vd(a.a);for(var k=null,l=null;a.ea();){var q=Xd(a);if(187==q.id){var w=ce(q);w&&(q=c*w.Se,w=b+w.ne,null!=k&&h.push(new M(h.length,k-f,q-f,g,l,w-1)),k=q,l=w)}}null!=k&&h.push(new M(h.length,k-f,d-f,g,l,null));return h}
178
+ function ce(a){var b=new Vd(a.a);a=Xd(b);if(179!=a.id)throw new p(2,3,3013);a=$d(a);b=Xd(b);if(183!=b.id)throw new p(2,3,3012);b=new Vd(b.a);for(var c=0;b.ea();){var d=Xd(b);if(241==d.id){c=$d(d);break}}return{Se:a,ne:c}};function de(a,b){var c=Jd(a,b,"Initialization");if(!c)return null;var d=a.v.ba,e=c.getAttribute("sourceURL");e&&(d=C(a.v.ba,[e]));e=0;var f=null;if(c=K(c,"range",wd))e=c.start,f=c.end;return new L(function(){return d},e,f)}
179
+ function ee(a,b){var c=Number(Id(a,fe,"presentationTimeOffset"))||0,d=Id(a,fe,"timescale"),e=1;d&&(e=yd(d)||1);c=c/e||0;d=de(a,fe);var f=a.v.contentType;e=a.v.mimeType.split("/")[1];if("text"!=f&&"mp4"!=e&&"webm"!=e)throw new p(2,4,4006);if("webm"==e&&!d)throw new p(2,4,4005);f=Jd(a,fe,"RepresentationIndex");var g=Id(a,fe,"indexRange"),h=a.v.ba;g=wd(g||"");if(f){var k=f.getAttribute("sourceURL");k&&(h=C(a.v.ba,[k]));g=K(f,"range",wd,g)}if(!g)throw new p(2,4,4002);e=ge(a,b,d,h,g.start,g.end,e,c);return{createSegmentIndex:e.createSegmentIndex,
180
+ findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:d,aa:c}}
181
+ function ge(a,b,c,d,e,f,g,h){var k=a.presentationTimeline,l=!a.Ea||!a.M.Lb,q=a.M.index,w=a.M.duration,r=b,t=null;return{createSegmentIndex:function(){var a=[r(d,e,f),"webm"==g?r(c.a(),c.O,c.D):null];r=null;return Promise.all(a).then(function(a){var b=a[0];a=a[1]||null;b="mp4"==g?Sd(b,e,d,h):(new ae).parse(b,a,d,h);k.Za(b,0==q);t=new Q(b);l&&Ud(t,w)})},findSegmentPosition:function(a){return t.find(a)},getSegmentReference:function(a){return t.get(a)}}}function fe(a){return a.bb};function he(a,b){var c=de(a,ie);var d=je(a);var e=Hd(a,ie),f=e.za;0==f&&(f=1);var g=0;e.R?g=e.R*(f-1):e.H&&0<e.H.length&&(g=e.H[0].start);d={R:e.R,startTime:g,za:f,aa:e.aa,H:e.H,La:d};if(!d.R&&!d.H&&1<d.La.length)throw new p(2,4,4002);if(!d.R&&!a.M.duration&&!d.H&&1==d.La.length)throw new p(2,4,4002);if(d.H&&0==d.H.length)throw new p(2,4,4002);f=e=null;a.Z.id&&a.v.id&&(f=a.Z.id+","+a.v.id,e=b[f]);g=ke(a.M.duration,d.za,a.v.ba,d);e?(e.Pb(g),f=a.presentationTimeline.Ja(),e.Fb(f-a.M.start)):(a.presentationTimeline.Za(g,
182
+ 0==a.M.index),e=new Q(g),f&&a.Ea&&(b[f]=e));a.Ea&&a.M.Lb||Ud(e,a.M.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:e.find.bind(e),getSegmentReference:e.get.bind(e),initSegmentReference:c,aa:d.aa}}function ie(a){return a.qa}
183
+ function ke(a,b,c,d){var e=d.La.length;d.H&&d.H.length!=d.La.length&&(e=Math.min(d.H.length,d.La.length));for(var f=[],g=d.startTime,h=0;h<e;h++){var k=d.La[h],l=C(c,[k.zd]);var q=null!=d.R?g+d.R:d.H?d.H[h].end:g+a;f.push(new M(h+b,g,q,function(a){return a}.bind(null,l),k.start,k.end));g=q}return f}
184
+ function je(a){return[a.v.qa,a.T.qa,a.Z.qa].filter(Ra).map(function(a){return J(a,"SegmentURL")}).reduce(function(a,c){return 0<a.length?a:c}).map(function(b){b.getAttribute("indexRange")&&!a.rc&&(a.rc=!0);var c=b.getAttribute("media");b=K(b,"mediaRange",wd,{start:0,end:null});return{zd:c,start:b.start,end:b.end}})};function le(a,b,c,d){var e=me(a);var f=Hd(a,ne);var g=Id(a,ne,"media"),h=Id(a,ne,"index");f={R:f.R,timescale:f.timescale,za:f.za,aa:f.aa,gc:f.gc,H:f.H,Ob:g,Xa:h};g=0+(f.Xa?1:0);g+=f.H?1:0;g+=f.R?1:0;if(0==g)throw new p(2,4,4002);1!=g&&(f.Xa&&(f.H=null),f.R=null);if(!f.Xa&&!f.Ob)throw new p(2,4,4002);if(f.Xa){c=a.v.mimeType.split("/")[1];if("mp4"!=c&&"webm"!=c)throw new p(2,4,4006);if("webm"==c&&!e)throw new p(2,4,4005);d=Gd(f.Xa,a.v.id,null,a.bandwidth||null,null);d=C(a.v.ba,[d]);a=ge(a,b,e,d,0,null,
185
+ c,f.aa)}else f.R?(d||a.presentationTimeline.wb(f.R),a=oe(a,f)):(d=b=null,a.Z.id&&a.v.id&&(d=a.Z.id+","+a.v.id,b=c[d]),g=pe(a,f),b?(b.Pb(g),c=a.presentationTimeline.Ja(),b.Fb(c-a.M.start)):(a.presentationTimeline.Za(g,0==a.M.index),b=new Q(g),d&&a.Ea&&(c[d]=b)),a.Ea&&a.M.Lb||Ud(b,a.M.duration),a={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b)});return{createSegmentIndex:a.createSegmentIndex,findSegmentPosition:a.findSegmentPosition,
186
+ getSegmentReference:a.getSegmentReference,initSegmentReference:e,aa:f.aa}}function ne(a){return a.eb}
187
+ function oe(a,b){var c=a.M.duration,d=b.R,e=b.za,f=b.timescale,g=b.Ob,h=a.bandwidth||null,k=a.v.id,l=a.v.ba;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0>a||c&&a>=c?null:Math.floor(a/d)},getSegmentReference:function(a){var b=a*d,q=b+d;c&&(q=Math.min(q,c));return 0>q||c&&b>=c?null:new M(a,b,q,function(){var c=Gd(g,k,a+e,h,b*f);return C(l,[c])},0,null)}}}
188
+ function pe(a,b){for(var c=[],d=0;d<b.H.length;d++){var e=d+b.za;c.push(new M(e,b.H[d].start,b.H[d].end,function(a,b,c,d,e,q){a=Gd(a,b,e,c,q);return C(d,[a]).map(function(a){return a.toString()})}.bind(null,b.Ob,a.v.id,a.bandwidth||null,a.v.ba,e,b.H[d].Re+b.gc),0,null))}return c}function me(a){var b=Id(a,ne,"initialization");if(!b)return null;var c=a.v.id,d=a.bandwidth||null,e=a.v.ba;return new L(function(){var a=Gd(b,c,null,d,null);return C(e,[a])},0,null)};var qe={},re={};n("shaka.media.ManifestParser.registerParserByExtension",function(a,b){re[a]=b});n("shaka.media.ManifestParser.registerParserByMime",function(a,b){qe[a]=b});function se(){var a={},b;for(b in qe)a[b]=!0;for(b in re)a[b]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(b){a[b]=!!qe[b]});["mpd","m3u8","ism"].forEach(function(b){a[b]=!!re[b]});return a}
189
+ function te(a,b,c,d){var e=d;e||(d=(new ta(a)).Y.split("/").pop().split("."),1<d.length&&(d=d.pop().toLowerCase(),e=re[d]));if(e)return Promise.resolve(e);c=Va([a],c);c.method="HEAD";return b.request(0,c).then(function(b){(b=b.headers["content-type"])&&(b=b.toLowerCase());return(e=qe[b])?e:Promise.reject(new p(2,4,4E3,a))},function(a){a.severity=2;return Promise.reject(a)})};function R(a,b){this.c=a;this.l=b;this.f=this.a=Infinity;this.b=1;this.j=this.g=0;this.i=!0;this.h=0}n("shaka.media.PresentationTimeline",R);R.prototype.S=function(){return this.a};R.prototype.getDuration=R.prototype.S;R.prototype.ha=function(a){this.a=a};R.prototype.setDuration=R.prototype.ha;R.prototype.pd=function(){return this.c};R.prototype.getPresentationStartTime=R.prototype.pd;R.prototype.Oc=function(a){this.j=a};R.prototype.setClockOffset=R.prototype.Oc;
190
+ R.prototype.yb=function(a){this.i=a};R.prototype.setStatic=R.prototype.yb;R.prototype.bc=function(a){this.f=a};R.prototype.setSegmentAvailabilityDuration=R.prototype.bc;R.prototype.Pc=function(a){this.l=a};R.prototype.setDelay=R.prototype.Pc;R.prototype.Za=function(a,b){0!=a.length&&(b&&(this.g=Math.max(this.g,a[0].startTime)),this.b=a.reduce(function(a,b){return Math.max(a,b.endTime-b.startTime)},this.b))};R.prototype.notifySegments=R.prototype.Za;
191
+ R.prototype.wb=function(a){this.b=Math.max(this.b,a)};R.prototype.notifyMaxSegmentDuration=R.prototype.wb;R.prototype.P=function(){return Infinity==this.a&&!this.i};R.prototype.isLive=R.prototype.P;R.prototype.wa=function(){return Infinity!=this.a&&!this.i};R.prototype.isInProgress=R.prototype.wa;R.prototype.Ja=function(){if(Infinity==this.f)return this.h;var a=this.Ia()-this.f;return Math.max(this.h,a)};R.prototype.getSegmentAvailabilityStart=R.prototype.Ja;R.prototype.Nc=function(a){this.h=a};
192
+ R.prototype.setAvailabilityStart=R.prototype.Nc;R.prototype.Ia=function(){return this.P()||this.wa()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.b-this.c),this.a):this.a};R.prototype.getSegmentAvailabilityEnd=R.prototype.Ia;R.prototype.Ga=function(a){Infinity==this.f&&(a=0);var b=this.Ia();a=Math.min(this.g+a,b);return Math.max(this.Ja(),a)};R.prototype.getSafeSeekRangeStart=R.prototype.Ga;R.prototype.Va=function(){return this.Ga(0)};R.prototype.getSeekRangeStart=R.prototype.Va;
193
+ R.prototype.Ha=function(){var a=this.P()||this.wa()?this.l:0;return Math.max(0,this.Ia()-a)};R.prototype.getSeekRangeEnd=R.prototype.Ha;function ue(){this.a=this.b=null;this.g=[];this.c=null;this.i=[];this.h=1;this.j={};this.l=0;this.f=null}n("shaka.dash.DashParser",ue);m=ue.prototype;m.configure=function(a){this.b=a};m.start=function(a,b){this.g=[a];this.a=b;return ve(this).then(function(){this.a&&we(this,0);return this.c}.bind(this))};m.stop=function(){this.b=this.a=null;this.g=[];this.c=null;this.i=[];this.j={};null!=this.f&&(window.clearTimeout(this.f),this.f=null);return Promise.resolve()};m.update=function(){ve(this)["catch"](function(a){if(this.a)this.a.onError(a)}.bind(this))};
194
+ m.onExpirationUpdated=function(){};function ve(a){return a.a.networkingEngine.request(0,Va(a.g,a.b.retryParameters),function(){return!this.a}.bind(a)).then(function(a){if(this.a)return xe(this,a.data,a.uri)}.bind(a))}function xe(a,b,c){b=Kd(b,"MPD");if(!b)throw new p(2,4,4001,c);return Md(b,a.b.retryParameters,a.b.dash.xlinkFailGracefully,c,a.a.networkingEngine).then(function(a){return ye(this,a,c)}.bind(a))}
195
+ function ye(a,b,c){c=[c];var d=J(b,"Location").map(td).filter(Ra);0<d.length&&(c=a.g=d);d=J(b,"BaseURL").map(td);c=C(c,d);var e=K(b,"minBufferTime",vd);a.l=K(b,"minimumUpdatePeriod",vd,-1);var f=K(b,"availabilityStartTime",ud);d=K(b,"timeShiftBufferDepth",vd);var g=K(b,"suggestedPresentationDelay",vd),h=K(b,"maxSegmentDuration",vd),k=b.getAttribute("type")||"static";if(a.c)var l=a.c.presentationTimeline;else{var q=Math.max(a.b.dash.defaultPresentationDelay,1.5*e);l=new R(f,null!=g?g:q)}f=ze(a,{Ea:"static"!=
196
+ k,presentationTimeline:l,Z:null,M:null,T:null,v:null,bandwidth:0,rc:!1},c,b);g=f.duration;var w=f.periods;l.yb("static"==k);"static"!=k&&f.lc||l.ha(g||Infinity);l.bc(null!=d?d:Infinity);l.wb(h||1);if(a.c)return Promise.resolve();b=J(b,"UTCTiming");d=l.P();return Ae(a,c,b,d).then(function(a){this.a&&(l.Oc(a),this.c={presentationTimeline:l,periods:w,offlineSessionIds:[],minBufferTime:e||0})}.bind(a))}
197
+ function ze(a,b,c,d){var e=K(d,"mediaPresentationDuration",vd),f=[],g=0;d=J(d,"Period");for(var h=0;h<d.length;h++){var k=d[h];g=K(k,"start",vd,g);var l=K(k,"duration",vd),q=null;if(h!=d.length-1){var w=K(d[h+1],"start",vd);null!=w&&(q=w-g)}else null!=e&&(q=e-g);null==q&&(q=l);k=Be(a,b,c,{start:g,duration:q,node:k,index:h,Lb:null==q||h==d.length-1});f.push(k);l=b.Z.id;-1==a.i.indexOf(l)&&(a.i.push(l),a.c&&(a.a.filterNewPeriod(k),a.c.periods.push(k)));if(null==q){g=null;break}g+=q}null==a.c&&a.a.filterAllPeriods(f);
198
+ return null!=e?{periods:f,duration:e,lc:!1}:{periods:f,duration:g,lc:!0}}
199
+ function Be(a,b,c,d){b.Z=Ce(d.node,null,c);b.M=d;b.Z.id||(b.Z.id="__shaka_period_"+d.start);J(d.node,"EventStream").forEach(a.de.bind(a,d.start,d.duration));c=J(d.node,"AdaptationSet").map(a.be.bind(a,b)).filter(Ra);var e=c.map(function(a){return a.pe}).reduce(Pa,[]),f=e.filter(Sa);if(b.Ea&&e.length!=f.length)throw new p(2,4,4018);var g=c.filter(function(a){return!a.fc});c.filter(function(a){return a.fc}).forEach(function(a){var b=a.streams[0],c=a.fc;g.forEach(function(a){a.id==c&&a.streams.forEach(function(a){a.trickModeVideo=
200
+ b})})});e=De(g,"video");f=De(g,"audio");if(!e.length&&!f.length)throw new p(2,4,4004);f.length||(f=[null]);e.length||(e=[null]);b=[];for(c=0;c<f.length;c++)for(var h=0;h<e.length;h++)Ee(a,f[c],e[h],b);a=De(g,"text");e=[];for(c=0;c<a.length;c++)e.push.apply(e,a[c].streams);return{startTime:d.start,textStreams:e,variants:b}}function De(a,b){return a.filter(function(a){return a.contentType==b})}
201
+ function Ee(a,b,c,d){if(b||c)if(b&&c){var e=b.drmInfos;var f=c.drmInfos;if(e.length&&f.length?0<Rb(e,f).length:1){var g=Rb(b.drmInfos,c.drmInfos);for(e=0;e<b.streams.length;e++)for(var h=0;h<c.streams.length;h++)f=(c.streams[h].bandwidth||0)+(b.streams[e].bandwidth||0),f={id:a.h++,language:b.language,primary:b.Nb||c.Nb,audio:b.streams[e],video:c.streams[h],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}}else for(g=b||c,e=0;e<g.streams.length;e++)f=g.streams[e].bandwidth||
202
+ 0,f={id:a.h++,language:g.language||"und",primary:g.Nb,audio:b?g.streams[e]:null,video:c?g.streams[e]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},d.push(f)}
203
+ m.be=function(a,b){a.T=Ce(b,a.Z,null);var c=!1,d=J(b,"Role"),e=d.map(function(a){return a.getAttribute("value")}).filter(Ra),f=void 0;"text"==a.T.contentType&&(f="subtitle");for(var g=0;g<d.length;g++){var h=d[g].getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(h=d[g].getAttribute("value"),h){case "main":c=!0;break;case "caption":case "subtitle":f=h}}var k=null,l=!1;J(b,"EssentialProperty").forEach(function(a){"http://dashif.org/guidelines/trickmode"==a.getAttribute("schemeIdUri")?
204
+ k=a.getAttribute("value"):l=!0});if(l)return null;d=J(b,"ContentProtection");var q=Cd(d,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);d=oc(b.getAttribute("lang")||"und");h=b.getAttribute("label");g=J(b,"Representation");e=g.map(this.ee.bind(this,a,q,f,d,h,c,e)).filter(function(a){return!!a});if(0==e.length)throw new p(2,4,4003);a.T.contentType&&"application"!=a.T.contentType||(a.T.contentType=Fe(e[0].mimeType,e[0].codecs),e.forEach(function(b){b.type=a.T.contentType}));e.forEach(function(a){q.drmInfos.forEach(function(b){a.keyId&&
205
+ b.keyIds.push(a.keyId)})});f=g.map(function(a){return a.getAttribute("id")}).filter(Ra);return{id:a.T.id||"__fake__"+this.h++,contentType:a.T.contentType,language:d,Nb:c,streams:e,drmInfos:q.drmInfos,fc:k,pe:f}};
206
+ m.ee=function(a,b,c,d,e,f,g,h){a.v=Ce(h,a.T,null);if(!Ge(a.v))return null;a.bandwidth=K(h,"bandwidth",yd)||0;var k=this.qe.bind(this);if(a.v.bb)k=ee(a,k);else if(a.v.qa)k=he(a,this.j);else if(a.v.eb)k=le(a,k,this.j,!!this.c);else{var l=a.v.ba,q=a.M.duration||0;k={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(a){return 0<=a&&a<q?1:null},getSegmentReference:function(a){return 1!=a?null:new M(1,0,q,function(){return l},0,null)},initSegmentReference:null,aa:0}}h=J(h,"ContentProtection");
207
+ h=Fd(h,this.b.dash.customScheme,b,this.b.dash.ignoreDrmInfo);return{id:this.h++,createSegmentIndex:k.createSegmentIndex,findSegmentPosition:k.findSegmentPosition,getSegmentReference:k.getSegmentReference,initSegmentReference:k.initSegmentReference,presentationTimeOffset:k.aa,mimeType:a.v.mimeType,codecs:a.v.codecs,frameRate:a.v.frameRate,bandwidth:a.bandwidth,width:a.v.width,height:a.v.height,kind:c,encrypted:0<b.drmInfos.length,keyId:h,language:d,label:e,type:a.T.contentType,primary:f,trickModeVideo:null,
208
+ containsEmsgBoxes:a.v.containsEmsgBoxes,roles:g,channelsCount:a.v.Rb}};m.Ke=function(){this.f=null;var a=Date.now();ve(this).then(function(){this.a&&we(this,(Date.now()-a)/1E3)}.bind(this))["catch"](function(a){this.a&&(a.severity=1,this.a.onError(a),we(this,0))}.bind(this))};function we(a,b){0>a.l||(a.f=window.setTimeout(a.Ke.bind(a),1E3*Math.max(Math.max(3,a.l)-b,0)))}
209
+ function Ce(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Rb:null};c=c||b.ba;var d=J(a,"BaseURL").map(td),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=K(a,"frameRate",Ad)||b.frameRate,k=!!J(a,"InbandEventStream").length,l=J(a,"AudioChannelConfiguration");l=He(l)||b.Rb;e||(e=Fe(f,g));return{ba:C(c,d),bb:sd(a,"SegmentBase")||b.bb,qa:sd(a,"SegmentList")||b.qa,eb:sd(a,"SegmentTemplate")||
210
+ b.eb,width:K(a,"width",zd)||b.width,height:K(a,"height",zd)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,containsEmsgBoxes:k||b.containsEmsgBoxes,id:a.getAttribute("id"),Rb:l}}
211
+ function He(a){for(var b=0;b<a.length;++b){var c=a[b],d=c.getAttribute("schemeIdUri");if(d&&(c=c.getAttribute("value")))switch(d){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":d=parseInt(c,10);if(!d)continue;return d;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(d=parseInt(c,
212
+ 16)){for(a=0;d;)d&1&&++a,d>>=1;return a}}}return null}function Ge(a){var b=0+(a.bb?1:0);b+=a.qa?1:0;b+=a.eb?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.bb&&(a.qa=null),a.eb=null);return!0}function Ie(a,b,c,d){b=C(b,[c]);b=Va(b,a.b.retryParameters);b.method=d;return a.a.networkingEngine.request(0,b).then(function(a){if("HEAD"==d){if(!a.headers||!a.headers.date)return 0;a=a.headers.date}else a=D(a.data);a=Date.parse(a);return isNaN(a)?0:a-Date.now()})}
213
+ function Ae(a,b,c,d){c=c.map(function(a){return{scheme:a.getAttribute("schemeIdUri"),value:a.getAttribute("value")}});var e=a.b.dash.clockSyncUri;d&&!c.length&&e&&c.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return Oa(c,function(a){var c=a.value;switch(a.scheme){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Ie(this,b,c,"HEAD");case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return Ie(this,
214
+ b,c,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return a=Date.parse(c),isNaN(a)?0:a-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(a))["catch"](function(){return 0})}
215
+ m.de=function(a,b,c){var d=c.getAttribute("schemeIdUri")||"",e=c.getAttribute("value")||"",f=K(c,"timescale",zd)||1;J(c,"Event").forEach(function(c){var g=K(c,"presentationTime",zd)||0,k=K(c,"duration",zd)||0;g=g/f+a;k=g+k/f;null!=b&&(g=Math.min(g,a+b),k=Math.min(k,a+b));c={schemeIdUri:d,value:e,startTime:g,endTime:k,id:c.getAttribute("id")||"",eventElement:c};this.a.onTimelineRegionAdded(c)}.bind(this))};
216
+ m.qe=function(a,b,c){a=Va(a,this.b.retryParameters);null!=b&&(a.headers.Range="bytes="+b+"-"+(null!=c?c:""));return this.a.networkingEngine.request(1,a).then(function(a){return a.data})};function Fe(a,b){return E[kb(a,b)]?"text":a.split("/")[0]}re.mpd=ue;qe["application/dash+xml"]=ue;function Je(a,b,c,d){this.uri=a;this.type=b;this.a=c;this.segments=d||null}function Ke(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=d||null}Ke.prototype.toString=function(){function a(a){return a.name+'="'+a.value+'"'}return this.value?"#"+this.name+":"+this.value:0<this.a.length?"#"+this.name+":"+this.a.map(a).join(","):"#"+this.name};function Le(a,b){this.name=a;this.value=b}Ke.prototype.getAttribute=function(a){var b=this.a.filter(function(b){return b.name==a});return b.length?b[0]:null};
217
+ function Me(a,b,c){c=c||null;return(a=a.getAttribute(b))?a.value:c}function Ne(a,b){this.a=b;this.uri=a};function Oe(a,b){return a.filter(function(a){return a.name==b})}function Pe(a,b){var c=Oe(a,b);return c.length?c[0]:null}function Qe(a,b,c){return a.filter(function(a){var d=a.getAttribute("TYPE");a=a.getAttribute("GROUP-ID");return d.value==b&&a.value==c})}function Re(a,b){return C([a],[b])[0]};function Se(a){this.b=a;this.a=0}function Te(a,b){b.lastIndex=a.a;var c=b.exec(a.b);c=null==c?null:{position:c.index,length:c[0].length,se:c};if(a.a==a.b.length||null==c||c.position!=a.a)return null;a.a+=c.length;return c.se}function Ue(a){return a.a==a.b.length?null:(a=Te(a,/[^ \t\n]*/gm))?a[0]:null};function Ve(){this.a=0}
218
+ function We(a,b,c){b=D(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new p(2,4,4015);b=0;for(var e=[],f=1;f<d.length;)if(/^#(?!EXT)/m.test(d[f]))f+=1;else{var g=d[f];g=Xe(a.a++,g);if(0<=Ze.indexOf(g.name))b=1;else if(0<=$e.indexOf(g.name)){if(1!=b)throw new p(2,4,4017);d=d.splice(f,d.length-f);a=af(a,d,e);return new Je(c,b,e,a)}e.push(g);f+=1;"EXT-X-STREAM-INF"==g.name&&(g.a.push(new Le("URI",d[f])),f+=1)}return new Je(c,b,e)}
219
+ function af(a,b,c){var d=[],e=[];b.forEach(function(a){if(/^(#EXT)/.test(a))a=Xe(this.a++,a),0<=Ze.indexOf(a.name)?c.push(a):e.push(a);else{if(/^#(?!EXT)/m.test(a))return[];d.push(new Ne(a.trim(),e));e=[]}}.bind(a));return d}
220
+ function Xe(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new p(2,4,4016);var d=c[1],e=c[2];c=[];if(e&&0<=e.indexOf("=")){e=new Se(e);for(var f,g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Te(e,g);)c.push(new Le(f[1],f[2]||f[3]))}else if(e)return new Ke(a,d,c,e);return new Ke(a,d,c)}var Ze="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),$e="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function bf(a){return new Promise(function(b){var c=bf.parse(a);b({uri:a,data:c.data,headers:{"content-type":c.contentType}})})}n("shaka.net.DataUriPlugin",bf);
221
+ bf.parse=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new p(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new p(2,1,1004,a);var c=b[0];b=window.decodeURIComponent(b.slice(1).join(","));c=c.split(";");var d=null;1<c.length&&(d=c[1]);if("base64"==d)a=ub(b).buffer;else{if(d)throw new p(2,1,1005,a);a=pb(b)}return{data:a,contentType:c[0]}};Ua("data",bf);function cf(){this.h=this.c=null;this.I=1;this.u={};this.A={};this.L={};this.a={};this.b=null;this.l="";this.s=new Ve;this.j=this.i=null;this.f=df;this.m=null;this.g=0;this.w=Infinity}n("shaka.hls.HlsParser",cf);m=cf.prototype;m.configure=function(a){this.h=a};m.start=function(a,b){this.c=b;this.l=a;return ef(this,a).then(function(b){return ff(this,b.data,a).then(function(){gf(this,this.i);return this.m}.bind(this))}.bind(this))};
222
+ m.stop=function(){this.h=this.c=null;this.u={};this.A={};this.m=null;return Promise.resolve()};m.update=function(){if(this.f!=hf.oa){var a=[],b;for(b in this.a)a.push(jf(this,this.a[b],b));return Promise.all(a)}};
223
+ function jf(a,b,c){ef(a,c).then(function(a){var d=hf,f=We(this.s,a.data,c);if(1!=f.type)throw new p(2,4,4017);a=Pe(f.a,"EXT-X-MEDIA-SEQUENCE");var g=b.stream;kf(this,f,a?Number(a.value):0,g.mimeType,g.codecs).then(function(a){b.cb.a=a;a=a[a.length-1];Pe(f.a,"EXT-X-ENDLIST")&&(lf(this,d.oa),this.b.ha(a.endTime))}.bind(this))}.bind(a))}m.onExpirationUpdated=function(){};
224
+ function ff(a,b,c){b=We(a.s,b,c);if(0!=b.type)throw new p(2,4,4022);return mf(a,b).then(function(a){this.c.filterAllPeriods([a]);var b=Infinity,c=0,d=0,h=Infinity,k;for(k in this.a){var l=this.a[k];b=Math.min(b,l.Qb);c=Math.max(c,l.Qb);d=Math.max(d,l.yd);"text"!=l.stream.type&&(h=Math.min(h,l.duration))}l=null;var q=0;this.f!=hf.oa&&(l=Date.now()/1E3-d,q=3*this.g);this.b=new R(l,q);this.b.yb(this.f==hf.oa);this.b.wb(this.g);if(this.f!=hf.oa){b=3*this.g;this.b.Pc(b);this.i=this.w;this.f==hf.hc&&this.b.bc(b);
225
+ for(b=0;95443.7176888889<=c;)b+=95443.7176888889,c-=95443.7176888889;if(b)for(k in this.a)l=this.a[k],95443.7176888889>l.Qb&&(l.stream.presentationTimeOffset=-b,l.cb.offset(b))}else for(k in this.b.ha(h),this.a)l=this.a[k],l.stream.presentationTimeOffset=b,l.cb.offset(-b),Ud(l.cb,h);this.m={presentationTimeline:this.b,periods:[a],offlineSessionIds:[],minBufferTime:0}}.bind(a))}
226
+ function mf(a,b){var c=b.a,d=Oe(b.a,"EXT-X-MEDIA").filter(function(a){return"SUBTITLES"==nf(a,"TYPE")}.bind(a)).map(function(a){return of(this,a)}.bind(a));return Promise.all(d).then(function(a){var d=Oe(c,"EXT-X-STREAM-INF").map(function(a){return pf(this,a,b)}.bind(this));return Promise.all(d).then(function(b){return{startTime:0,variants:b.reduce(Pa,[]),textStreams:a}}.bind(this))}.bind(a))}
227
+ function pf(a,b,c){var d=Me(b,"CODECS","avc1.42E01E,mp4a.40.2").split(","),e=b.getAttribute("RESOLUTION"),f=null,g=null,h=Me(b,"FRAME-RATE"),k=Number(nf(b,"BANDWIDTH"));if(e){var l=e.value.split("x");f=l[0];g=l[1]}c=Oe(c.a,"EXT-X-MEDIA");var q=Me(b,"AUDIO"),w=Me(b,"VIDEO");q?c=Qe(c,"AUDIO",q):w&&(c=Qe(c,"VIDEO",w));if(l=qf("text",d)){var r=Me(b,"SUBTITLES");r&&(r=Qe(c,"SUBTITLES",r),r.length&&(a.u[r[0].id].stream.codecs=l));d.splice(d.indexOf(l),1)}c=c.map(function(a){return rf(this,a,d)}.bind(a));
228
+ var t=[],y=[];return Promise.all(c).then(function(a){q?t=a:w&&(y=a);a=!1;if(t.length||y.length)if(t.length)if(nf(b,"URI")==t[0].Zb){var c="audio";a=!0}else c="video";else c="audio";else 1==d.length?(c=qf("video",d),c=e||h||c?"video":"audio"):(c="video",d=[d.join(",")]);return a?Promise.resolve():sf(this,b,d,c)}.bind(a)).then(function(a){a&&("audio"==a.stream.type?t=[a]:y=[a]);y&&tf(y);t&&tf(t);return uf(this,t,y,k,f,g,h)}.bind(a))}
229
+ function tf(a){a.forEach(function(a){var b=a.stream.codecs.split(",");b=b.filter(function(a){return"mp4a.40.34"!=a});a.stream.codecs=b.join(",")})}
230
+ function uf(a,b,c,d,e,f,g){c.forEach(function(a){if(a=a.stream)a.width=Number(e)||void 0,a.height=Number(f)||void 0,a.frameRate=Number(g)||void 0}.bind(a));b.length||(b=[null]);c.length||(c=[null]);for(var h=[],k=0;k<b.length;k++)for(var l=0;l<c.length;l++){var q=b[k]?b[k].stream:null,w=c[l]?c[l].stream:null,r=b[k]?b[k].drmInfos:null,t=c[l]?c[l].drmInfos:null;if(q&&w)if(r.length&&t.length?0<Rb(r,t).length:1)var y=Rb(r,t);else continue;else q?y=r:w&&(y=t);r=(c[k]?c[k].Zb:"")+" - "+(b[k]?b[k].Zb:"");
231
+ a.A[r]||(q=vf(a,q,w,d,y),h.push(q),a.A[r]=q)}return h}function vf(a,b,c,d,e){return{id:a.I++,language:b?b.language:"und",primary:!!b&&b.primary||!!c&&c.primary,audio:b,video:c,bandwidth:d,drmInfos:e,allowedByApplication:!0,allowedByKeySystem:!0}}function of(a,b){nf(b,"TYPE");return rf(a,b,[]).then(function(a){return a.stream})}
232
+ function rf(a,b,c){var d=nf(b,"URI");d=Re(a.l,d);if(a.a[d])return Promise.resolve(a.a[d]);var e=nf(b,"TYPE").toLowerCase();"subtitles"==e&&(e="text");var f=oc(Me(b,"LANGUAGE","und")),g=Me(b,"NAME"),h=b.getAttribute("DEFAULT"),k=b.getAttribute("AUTOSELECT"),l=Me(b,"CHANNELS");return xf(a,d,c,e,f,!!h||!!k,g,"audio"==e?yf(l):null).then(function(a){if(this.a[d])return this.a[d];this.u[b.id]=a;return this.a[d]=a}.bind(a))}function yf(a){if(!a)return null;a=a.split("/")[0];return parseInt(a,10)}
233
+ function sf(a,b,c,d){var e=nf(b,"URI");e=Re(a.l,e);return a.a[e]?Promise.resolve(a.a[e]):xf(a,e,c,d,"und",!1,null,null).then(function(a){return this.a[e]?this.a[e]:this.a[e]=a}.bind(a))}
234
+ function xf(a,b,c,d,e,f,g,h){var k=b;b=Re(a.l,b);var l,q="",w;return ef(a,b).then(function(a){l=We(this.s,a.data,b);if(1!=l.type)throw new p(2,4,4017);a=l;var e=hf,f=Pe(a.a,"EXT-X-PLAYLIST-TYPE"),g=Pe(a.a,"EXT-X-ENDLIST");g=f&&"VOD"==f.value||g;f=f&&"EVENT"==f.value&&!g;f=!g&&!f;g?lf(this,e.oa):(f?lf(this,e.hc):lf(this,e.Uc),a=zf(a.a,"EXT-X-TARGETDURATION"),a=Number(a.value),this.g=Math.max(a,this.g),this.w=Math.min(a,this.w));if(1==c.length)q=c[0];else if(a=qf(d,c),null!=a)q=a;else throw new p(2,
235
+ 4,4025,c);return Af(this,d,q,l)}.bind(a)).then(function(a){w=a;a=Pe(l.a,"EXT-X-MEDIA-SEQUENCE");return kf(this,l,a?Number(a.value):0,w,q)}.bind(a)).then(function(a){var b=a[0].startTime,c=a[a.length-1].endTime,v=c-b;a=new Q(a);var r=Bf(l),Vc=void 0;"text"==d&&(Vc="subtitle");var Wc=[];l.segments.forEach(function(a){a=Oe(a.a,"EXT-X-KEY");Wc.push.apply(Wc,a)});var Xc=!1,Yc=[],wf=null;Wc.forEach(function(a){if("NONE"!=nf(a,"METHOD")){Xc=!0;var b=nf(a,"KEYFORMAT");if(a=(b=Cf[b])?b(a):null)a.keyIds.length&&
236
+ (wf=a.keyIds[0]),Yc.push(a)}});if(Xc&&!Yc.length)throw new p(2,4,4026);r={id:this.I++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:a.find.bind(a),getSegmentReference:a.get.bind(a),initSegmentReference:r,presentationTimeOffset:0,mimeType:w,codecs:q,kind:Vc,encrypted:Xc,keyId:wf,language:e,label:g||null,type:d,primary:f,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:h};this.L[r.id]=a;return{stream:r,
237
+ cb:a,drmInfos:Yc,Zb:k,Qb:b,yd:c,duration:v}}.bind(a))}function Bf(a){var b=Oe(a.a,"EXT-X-MAP");if(!b.length)return null;if(1<b.length)throw new p(2,4,4020);b=b[0];var c=nf(b,"URI"),d=Re(a.uri,c);a=0;c=null;if(b=Me(b,"BYTERANGE"))a=b.split("@"),b=Number(a[0]),a=Number(a[1]),c=a+b-1;return new L(function(){return[d]},a,c)}
238
+ function Df(a,b,c,d,e){var f=c.a,g=Re(a.uri,c.uri);a=zf(f,"EXTINF").value.split(",");a=e+Number(a[0]);c=0;var h=null;if(f=Pe(f,"EXT-X-BYTERANGE"))c=f.value.split("@"),f=Number(c[0]),c=c[1]?Number(c[1]):b.D+1,h=c+f-1;return new M(d,e,a,function(){return[g]},c,h)}
239
+ function kf(a,b,c,d,e){var f=b.segments,g=[],h=Re(b.uri,f[0].uri),k=Df(b,null,f[0],c,0),l=Bf(b);return Ef(a,b.uri,l,k,d,e).then(function(a){h.split("/").pop();for(var d=0;d<f.length;++d){var e=g[g.length-1];e=Df(b,e,f[d],c+d,0==d?a:e.endTime);g.push(e)}return g}.bind(a))}
240
+ function Ff(a,b){var c=a.c.networkingEngine,d=Va(b.a(),a.h.retryParameters),e={},f=b.O;e.Range="bytes="+f+"-"+(f+2048-1);var g={};if(0!=f||null!=b.D)f="bytes="+f+"-",null!=b.D&&(f+=b.D),g.Range=f;d.headers=e;return c.request(1,d)["catch"](function(){qa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",d.uris[0]);d.headers=g;return c.request(1,d)})}
241
+ function Ef(a,b,c,d,e,f){if(a.m&&(b=a.a[b].cb.get(d.position)))return Promise.resolve(b.startTime);d=[Ff(a,d)];if("video/mp4"==e||"audio/mp4"==e)c?d.push(Ff(a,c)):d.push(d[0]);return Promise.all(d).then(function(a){if("video/mp4"==e||"audio/mp4"==e)return Gf(a[0].data,a[1].data);if("audio/mpeg"==e)return 0;if("video/mp2t"==e)return Hf(a[0].data);if("application/mp4"==e||0==e.indexOf("text/")){a=a[0].data;var b=kb(e,f);if(E[b]){var c=new Zb(null);c.c=new E[b];a=c.Kb(a)}else a=0;return a}throw new p(2,
242
+ 4,4030);}.bind(a))}function Gf(a,b){var c=0;(new O).B("moov",P).B("trak",P).B("mdia",P).W("mdhd",function(a){a.o.F(0==a.version?8:16);c=a.o.C();a.la.stop()}).parse(b,!0);if(!c)throw new p(2,4,4030);var d=0,e=!1;(new O).B("moof",P).B("traf",P).W("tfdt",function(a){d=(0==a.version?a.o.C():a.o.Qa())/c;e=!0;a.la.stop()}).parse(a,!0);if(!e)throw new p(2,4,4030);return d}
243
+ function Hf(a){function b(){throw new p(2,4,4030);}a=new N(new DataView(a),0);for(var c=0,d=0;;)if(c=a.U(),d=a.$(),71!=d&&b(),a.ab()&16384||b(),d=(a.$()&48)>>4,0!=d&&2!=d||b(),3==d&&(d=a.$(),a.F(d)),1!=a.C()>>8)a.seek(c+188),d=a.$(),71!=d&&(a.seek(c+192),d=a.$()),71!=d&&(a.seek(c+204),d=a.$()),71!=d&&b(),a.Kc(1);else return a.F(3),c=a.$()>>6,0!=c&&1!=c||b(),0==a.$()&&b(),c=a.$(),d=a.ab(),a=a.ab(),(1073741824*((c&14)>>1)+((d&65534)<<14|(a&65534)>>1))/9E4}
244
+ function qf(a,b){for(var c=If[a],d=0;d<c.length;d++)for(var e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return"text"==a?"":null}
245
+ function Af(a,b,c,d){d=Re(d.uri,d.segments[0].uri);var e=(new ta(d)).Y.split(".").pop(),f=Jf[b][e];if(f)return Promise.resolve(f);if("text"==b)return c&&"vtt"!=c?Promise.resolve("application/mp4"):Promise.resolve("text/vtt");b=Va([d],a.h.retryParameters);b.method="HEAD";return a.c.networkingEngine.request(1,b).then(function(a){a=a.headers["content-type"];if(!a)throw new p(2,4,4021,e);return a.split(";")[0]})}function nf(a,b){var c=a.getAttribute(b);if(!c)throw new p(2,4,4023,b);return c.value}
246
+ function zf(a,b){var c=Pe(a,b);if(!c)throw new p(2,4,4024,b);return c}function ef(a,b){return a.c.networkingEngine.request(0,Va([b],a.h.retryParameters),function(){return!this.c}.bind(a))}
247
+ var If={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Jf={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
248
+ cf.prototype.K=function(){this.c&&(this.j=null,this.update().then(function(){gf(this,this.i)}.bind(this))["catch"](function(a){this.c&&(a.severity=1,this.c.onError(a),gf(this,0))}.bind(this)))};function gf(a,b){null!=a.i&&null!=b&&(a.j=window.setTimeout(a.K.bind(a),1E3*b))}function lf(a,b){a.f=b;a.b&&a.b.yb(a.f==hf.oa);a.f==hf.oa&&null!=a.j&&(window.clearTimeout(a.j),a.j=null,a.i=null)}
249
+ var Cf={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=nf(a,"METHOD");if("SAMPLE-AES-CENC"!=b&&"SAMPLE-AES-CTR"!=b)return null;b=nf(a,"URI");b=bf.parse(b);b=new Uint8Array(b.data);b=eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Me(a,"KEYID"))b.keyIds=[a.substr(2).toLowerCase()];return b}},df="VOD",hf={oa:df,Uc:"EVENT",hc:"LIVE"};re.m3u8=cf;qe["application/x-mpegurl"]=cf;qe["application/vnd.apple.mpegurl"]=cf;function Kf(a,b,c,d){this.a=a;this.u=b;this.s=c;this.w=d;this.h=new z;this.b=null;this.g=!1;this.m=a.readyState;this.c=!1;this.j=this.A=-1;this.f=this.i=!1;b=this.l.bind(this);A(this.h,a,"waiting",b);this.b=new qb(b);sb(this.b,.25)}Kf.prototype.destroy=function(){var a=this.h.destroy();this.w=this.u=this.a=this.h=null;null!=this.b&&(this.b.cancel(),this.b=null);return a};Kf.prototype.$a=function(){this.f=!0;this.l()};
250
+ Kf.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.g)return}else this.g=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var a=this.s.smallGapLimit,b=this.a.currentTime,c=this.a.buffered;a:{if(c&&c.length&&!(1==c.length&&1E-6>c.end(0)-c.start(0))){var d=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(d=.5);for(var e=0;e<c.length;e++)if(c.start(e)>b&&(0==e||c.end(e-1)-b<=d)){d=e;break a}}d=null}if(null==d){if(c=this.a.currentTime,
251
+ b=this.a.buffered,3>this.a.readyState&&0<this.a.playbackRate)if(this.j!=c)this.j=c,this.A=Date.now(),this.i=!1;else if(!this.i&&this.A<Date.now()-1E3)for(d=0;d<b.length;d++)if(c>=b.start(d)&&c<b.end(d)-.5){this.a.currentTime+=.1;this.j=this.a.currentTime;this.i=!0;break}}else if(0!=d||this.f){e=c.start(d);var f=this.u.presentationTimeline.Ha();if(!(e>=f)){f=e-b;a=f<=a;var g=!1;.001>f||(a||this.c||(this.c=!0,b=new B("largegap",{currentTime:b,gapSize:f}),b.cancelable=!0,this.w(b),this.s.jumpLargeGaps&&
252
+ !b.defaultPrevented&&(g=!0)),!a&&!g)||(0!=d&&c.end(d-1),this.a.currentTime=e)}}}}};function Lf(a,b,c){this.a=a;this.j=b;this.i=c;this.b=new z;this.g=1;this.h=!1;this.c=null;this.f=new qb(this.Bd.bind(this));0<a.readyState?this.zc():(db(this.b,a,"loadedmetadata",this.zc.bind(this)),A(this.b,a,"timeupdate",function(){rb(this.f,.1)}.bind(this)));A(this.b,a,"ratechange",this.Pd.bind(this))}m=Lf.prototype;m.destroy=function(){var a=this.b.destroy();this.b=null;null!=this.c&&(this.c.cancel(),this.c=null);null!=this.f&&(this.f.cancel(),this.f=null);this.j=this.a=null;return a};
253
+ function Mf(a){return 0<a.a.readyState?a.a.currentTime:a.i}function Nf(a,b){0<a.a.readyState?Of(a,a.a.currentTime,b):(a.i=b,setTimeout(a.j,0))}m.Ua=function(){return this.g};function Pf(a,b){null!=a.c&&(a.c.cancel(),a.c=null);a.g=b;a.a.playbackRate=a.h||0>b?0:b;!a.h&&0>b&&(a.c=new qb(function(){this.a.currentTime+=b/4}.bind(a)),sb(a.c,.25))}m.Pd=function(){var a=this.h||0>this.g?0:this.g;this.a.playbackRate&&this.a.playbackRate!=a&&Pf(this,this.a.playbackRate)};
254
+ m.zc=function(){this.b.ia(this.a,"timeupdate");this.f.cancel();.001>Math.abs(this.a.currentTime-this.i)?this.Ac():(db(this.b,this.a,"seeking",this.Ac.bind(this)),this.a.currentTime=this.i)};m.Ac=function(){A(this.b,this.a,"seeking",this.j.bind(this))};m.Bd=function(){this.i=this.a.currentTime;this.j()};function Of(a,b,c){a.a.currentTime=c;var d=0,e=function(){!this.a||10<=d++||this.a.currentTime!=b||(this.a.currentTime=c,setTimeout(e,100))}.bind(a);setTimeout(e,100)};function Qf(a,b,c,d,e,f){this.b=a;this.c=b;this.h=c;this.i=e;this.f=null;this.g=new Kf(a,b,c,f);b=this.Rd.bind(this);null==d&&(d=this.c.presentationTimeline,d=Infinity>d.S()?d.Va():d.Ha());d=Rf(this,Sf(this,d));this.a=new Lf(a,b,d);this.f=new qb(this.Od.bind(this));sb(this.f,.25)}m=Qf.prototype;m.destroy=function(){var a=Promise.all([this.a.destroy(),this.g.destroy()]);this.g=this.a=null;null!=this.f&&(this.f.cancel(),this.f=null);this.i=this.h=this.c=this.b=null;return a};
255
+ function Tf(a){var b=Mf(a.a);0<a.b.readyState&&(a.b.paused||(b=Sf(a,b)));return b}m.Ua=function(){return this.a.Ua()};m.$a=function(){this.g.$a()};m.Od=function(){if(0!=this.b.readyState&&!this.b.seeking&&!this.b.paused){var a=this.b.currentTime,b=this.c.presentationTimeline.Va();a<b&&(a=Uf(this,a),this.b.currentTime=a)}};m.Rd=function(){var a=this.g;a.g=!0;a.f=!1;a.c=!1;a=Mf(this.a);var b=Uf(this,a);.001<Math.abs(b-a)?Nf(this.a,b):this.i()};
256
+ function Rf(a,b){var c=a.c.presentationTimeline.S();return b>=c?c-a.h.durationBackoff:b}function Uf(a,b){var c=Tb.bind(null,a.b.buffered),d=1*Math.max(a.c.minBufferTime||0,a.h.rebufferingGoal),e=a.c.presentationTimeline,f=e.Ga(0),g=e.Ha(),h=e.S(),k=e.Ga(d),l=e.Ga(5);d=e.Ga(d+5);return b>=h?Rf(a,b):b>g?g:b<f?c(l)?l:d:b>=k||c(b)?b:d}function Sf(a,b){var c=a.c.presentationTimeline.Va();if(b<c)return c;c=a.c.presentationTimeline.Ha();return b>c?c:b};function Vf(a,b,c,d,e,f,g){this.a=a;this.w=b;this.g=c;this.u=d;this.l=e;this.h=f;this.A=g;this.c=[];this.j=new z;this.b=!1;this.i=-1;this.f=null;Wf(this)}Vf.prototype.destroy=function(){var a=this.j?this.j.destroy():Promise.resolve();this.j=null;Xf(this);this.A=this.h=this.l=this.u=this.g=this.w=this.a=null;this.c=[];return a};
257
+ Vf.prototype.s=function(a){if(!this.c.some(function(b){return b.info.schemeIdUri==a.schemeIdUri&&b.info.startTime==a.startTime&&b.info.endTime==a.endTime})){var b={info:a,status:1};this.c.push(b);var c=new B("timelineregionadded",{detail:Yf(a)});this.h(c);this.m(!0,b)}};function Yf(a){var b=Na(a);b.eventElement=a.eventElement;return b}
258
+ Vf.prototype.m=function(a,b){var c=b.info.startTime>this.a.currentTime?1:b.info.endTime<this.a.currentTime?3:2,d=2==b.status,e=2==c;if(c!=b.status){if(!a||d||e)d||this.h(new B("timelineregionenter",{detail:Yf(b.info)})),e||this.h(new B("timelineregionexit",{detail:Yf(b.info)}));b.status=c}};function Wf(a){Xf(a);a.f=window.setTimeout(a.I.bind(a),250)}function Xf(a){a.f&&(window.clearTimeout(a.f),a.f=null)}
259
+ Vf.prototype.I=function(){this.f=null;Wf(this);var a=Jc(this.g,this.a.currentTime);a!=this.i&&(-1!=this.i&&this.A(),this.i=a);a=Ub(this.a.buffered,this.a.currentTime);var b=Sb(this.a.buffered),c=this.g.presentationTimeline,d=c.Ia();b=c.P()&&b>=d;c="ended"==this.w.readyState;b=b||this.a.ended||c;this.b?(c=1*Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(b||a>=c)&&0!=this.b&&(this.b=!1,this.l(!1))):!b&&.5>a&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.m.bind(this,!1))};function Zf(a,b){this.a=b;this.b=a;this.h=null;this.i=1;this.m=Promise.resolve();this.g=[];this.j={};this.c={};this.s=!1;this.A=null;this.w=this.f=this.l=!1;this.u=0}m=Zf.prototype;m.destroy=function(){for(var a in this.c)$f(this.c[a]);this.h=this.c=this.j=this.g=this.m=this.b=this.a=null;this.f=!0;return Promise.resolve()};
260
+ m.configure=function(a){this.h=a;this.A=new Ha({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};m.init=function(){var a=Tf(this.a.Na);a=this.a.uc(this.b.periods[Jc(this.b,a)]);return a.variant||a.text?ag(this,a).then(function(){this.a&&this.a.Fd&&this.a.Fd()}.bind(this)):Promise.reject(new p(2,5,5005))};
261
+ function S(a){var b=Tf(a.a.Na);return a.b.periods[Jc(a.b,b)]}function bg(a){var b=a.c.video||a.c.audio;return b?a.b.periods[b.xa]:null}function cg(a){return dg(a,"audio")}function eg(a){return dg(a,"video")}function dg(a,b){var c=a.c[b];return c?c.pa||c.stream:null}function fg(a,b){hc(a.a.J,"text");a.u++;a.w=!1;var c=a.u;a.a.J.init({text:b});return gg(a,[b]).then(function(){if(this.u==c&&!this.c.text&&!this.w){var a=Tf(this.a.Na);this.c.text=hg(b,Jc(this.b,a));ig(this,this.c.text,0)}}.bind(a))}
262
+ function jg(a,b){var c=a.c.video;if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;if(e){var f=c.pa;f||(kg(a,e,!1),c.pa=d)}}else if(f=c.pa)c.pa=null,kg(a,f,!0)}}function lg(a,b,c){b.video&&kg(a,b.video,c);b.audio&&kg(a,b.audio,c)}
263
+ function kg(a,b,c){var d=a.c[b.type];if(!d&&"text"==b.type&&a.h.ignoreTextStreamFailures)fg(a,b);else if(d){var e=Kc(a.b,b);c&&e!=d.xa?mg(a):(d.pa&&(b.trickModeVideo?(d.pa=b,b=b.trickModeVideo):d.pa=null),(e=a.g[e])&&e.Ra&&(e=a.j[b.id])&&e.Ra&&d.stream!=b&&("text"==b.type&&cc(a.a.J,kb(b.mimeType,b.codecs)),d.stream=b,d.vb=!0,c&&(d.ua?d.Ab=!0:d.ya?(d.sa=!0,d.Ab=!0):($f(d),ng(a,d,!0)))))}}
264
+ function og(a){var b=Tf(a.a.Na);Object.keys(a.c).every(function(a){var c=this.a.J;"text"==a?(a=c.a,a=b>=a.a&&b<a.b):(a=ec(c,a),a=Tb(a,b));return a}.bind(a))||mg(a)}function mg(a){for(var b in a.c){var c=a.c[b];c.ua||c.sa||(c.ya?c.sa=!0:null==dc(a.a.J,b)?null==c.ra&&ig(a,c,0):($f(c),ng(a,c,!1)))}}
265
+ function ag(a,b,c){var d=Tf(a.a.Na),e=Jc(a.b,d),f={};d=[];b.variant&&b.variant.audio&&(f.audio=b.variant.audio,d.push(b.variant.audio));b.variant&&b.variant.video&&(f.video=b.variant.video,d.push(b.variant.video));b.text&&(f.text=b.text,d.push(b.text));a.a.J.init(f);pg(a);return gg(a,d).then(function(){if(!this.f)for(var a in f){var b=f[a];this.c[a]||(this.c[a]=hg(b,e,c),ig(this,this.c[a],0))}}.bind(a))}
266
+ function hg(a,b,c){return{stream:a,type:a.type,Ka:null,ka:null,pa:null,vb:!0,xa:b,endOfStream:!1,ya:!1,ra:null,sa:!1,Ab:!1,ua:!1,Yb:!1,Wa:!1,Ic:c||0}}
267
+ function qg(a,b){var c=a.g[b];if(c)return c.N;c={N:new u,Ra:!1};a.g[b]=c;var d=a.b.periods[b].variants.map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);a.video&&a.video.trickModeVideo&&b.push(a.video.trickModeVideo);return b}).reduce(Pa,[]).filter(Sa);d.push.apply(d,a.b.periods[b].textStreams);a.m=a.m.then(function(){if(!this.f)return gg(this,d)}.bind(a)).then(function(){this.f||(this.g[b].N.resolve(),this.g[b].Ra=!0)}.bind(a))["catch"](function(a){this.f||(this.g[b].N.reject(),
268
+ delete this.g[b],this.a.onError(a))}.bind(a));return c.N}
269
+ function gg(a,b){b.map(function(a){return a.id}).filter(Sa);for(var c=[],d=0;d<b.length;++d){var e=b[d],f=a.j[e.id];f?c.push(f.N):(a.j[e.id]={N:new u,Ra:!1},c.push(e.createSegmentIndex()))}return Promise.all(c).then(function(){if(!this.f)for(var a=0;a<b.length;++a){var c=this.j[b[a].id];c.Ra||(c.N.resolve(),c.Ra=!0)}}.bind(a))["catch"](function(a){if(!this.f){for(var c=0;c<b.length;c++)this.j[b[c].id].N.reject(),delete this.j[b[c].id];return Promise.reject(a)}}.bind(a))}
270
+ function pg(a){var b=a.b.presentationTimeline.S();Infinity>b?a.a.J.ha(b):a.a.J.ha(Math.pow(2,32))}m.Me=function(a){if(!this.f&&!a.ya&&null!=a.ra&&!a.ua)if(a.ra=null,a.sa)ng(this,a,a.Ab);else{try{var b=rg(this,a);null!=b&&(ig(this,a,b),a.Wa=!1)}catch(c){sg(this,c);return}b=hb(this.c);tg(this,a);b.every(function(a){return a.endOfStream})&&this.a.J.endOfStream().then(function(){var a=this.a.J.S();a<this.b.presentationTimeline.S()&&this.b.presentationTimeline.ha(a)}.bind(this))}};
271
+ function rg(a,b){var c=Tf(a.a.Na),d=b.Ka&&b.ka?a.b.periods[Kc(a.b,b.Ka)].startTime+b.ka.endTime:Math.max(c,b.Ic),e=Kc(a.b,b.stream),f=Jc(a.b,d);var g=a.a.J;var h=b.type;"text"==h?(g=g.a,g=null==g.b||g.b<c?0:g.b-Math.max(c,g.a)):(g=ec(g,h),g=Ub(g,c));h=Math.max(a.i*Math.max(a.b.minBufferTime||0,a.h.rebufferingGoal),a.i*a.h.bufferingGoal);if(d>=a.b.presentationTimeline.S())return b.endOfStream=!0,null;b.endOfStream=!1;b.xa=f;if(f!=e)return null;if(g>=h)return.5;d=a.a.J;f=b.type;d="text"==f?d.a.b:Sb(ec(d,
272
+ f));b.ka&&b.stream==b.Ka?(f=b.ka.position+1,d=ug(a,b,e,f)):(f=b.ka?b.stream.findSegmentPosition(Math.max(0,a.b.periods[Kc(a.b,b.Ka)].startTime+b.ka.endTime-a.b.periods[e].startTime)):b.stream.findSegmentPosition(Math.max(0,(d||c)-a.b.periods[e].startTime)),null==f?d=null:(g=null,null==d&&(g=ug(a,b,e,Math.max(0,f-1))),d=g||ug(a,b,e,f)));if(!d)return 1;b.Ic=0;vg(a,b,c,e,d);return null}
273
+ function ug(a,b,c,d){c=a.b.periods[c];b=b.stream.getSegmentReference(d);if(!b)return null;d=a.b.presentationTimeline;a=d.Ja();d=d.Ia();return c.startTime+b.endTime<a||c.startTime+b.startTime>d?null:b}
274
+ function vg(a,b,c,d,e){var f=a.b.periods[d],g=b.stream,h=a.b.presentationTimeline.S(),k=a.b.periods[d+1];d=wg(a,b,d,Math.max(0,f.startTime-.1),k?k.startTime:h);b.ya=!0;b.vb=!1;h=xg(a,e);Promise.all([d,h]).then(function(a){if(!this.f&&!this.l)return yg(this,b,c,f,g,e,a[1])}.bind(a)).then(function(){this.f||this.l||(b.ya=!1,b.Yb=!1,b.sa||this.a.$a(),ig(this,b,0),zg(this,g))}.bind(a))["catch"](function(a){this.f||this.l||(b.ya=!1,"text"==b.type&&this.h.ignoreTextStreamFailures?delete this.c.text:3017==
275
+ a.code?Ag(this,b,a):(b.Wa=!0,a.severity=2,sg(this,a)))}.bind(a))}function Ag(a,b,c){if(!hb(a.c).some(function(a){return a!=b&&a.Yb})){var d=Math.round(100*a.i);if(20<d)a.i-=.2;else if(4<d)a.i-=.04;else{b.Wa=!0;a.l=!0;a.a.onError(c);return}b.Yb=!0}ig(a,b,4)}
276
+ function wg(a,b,c,d,e){if(!b.vb)return Promise.resolve();c=ic(a.a.J,b.type,a.b.periods[c].startTime-b.stream.presentationTimeOffset,d,e);if(!b.stream.initSegmentReference)return c;a=xg(a,b.stream.initSegmentReference).then(function(a){if(!this.f)return fc(this.a.J,b.type,a,null,null)}.bind(a))["catch"](function(a){b.vb=!0;return Promise.reject(a)});return Promise.all([c,a])}
277
+ function yg(a,b,c,d,e,f,g){e.containsEmsgBoxes&&(new O).W("emsg",a.ce.bind(a,d,f)).parse(g);return Bg(a,b,c).then(function(){if(!this.f)return fc(this.a.J,b.type,g,f.startTime,f.endTime)}.bind(a)).then(function(){if(!this.f)return b.Ka=e,b.ka=f,Promise.resolve()}.bind(a))}
278
+ m.ce=function(a,b,c){var d=c.o.Wb(),e=c.o.Wb(),f=c.o.C(),g=c.o.C(),h=c.o.C(),k=c.o.C(),l=c.o.Pa(c.o.G.byteLength-c.o.U());a=a.startTime+b.startTime+g/f;if("urn:mpeg:dash:event:2012"==d)this.a.Hd();else this.a.onEvent(new B("emsg",{detail:{startTime:a,endTime:a+h/f,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:k,messageData:l}}));c.la.stop()};
279
+ function Bg(a,b,c){var d=Math.max(a.h.bufferBehind,a.b.presentationTimeline.b),e=dc(a.a.J,b.type);if(null==e)return Promise.resolve();c=c-e-d;return 0>=c?Promise.resolve():a.a.J.remove(b.type,e,e+c).then(function(){}.bind(a))}function zg(a,b){if(!a.s&&(a.s=hb(a.c).every(function(a){return"text"==a.type?!0:!a.sa&&!a.ua&&a.ka}),a.s)){var c=Kc(a.b,b);a.g[c]||qg(a,c).then(function(){this.a.tc()}.bind(a))["catch"](Qa);for(c=0;c<a.b.periods.length;++c)qg(a,c)["catch"](Qa);a.a.Ud&&a.a.Ud()}}
280
+ function tg(a,b){if(b.xa!=Kc(a.b,b.stream)){var c=b.xa,d=hb(a.c);d.every(function(a){return a.xa==c})&&d.every(Cg)&&qg(a,c).then(function(){if(!this.f&&d.every(function(a){var b=Kc(this.b,a.stream);return Cg(a)&&a.xa==c&&b!=c}.bind(this))){var a=this.b.periods[c],b=this.a.uc(a),g={};b.variant&&b.variant.video&&(g.video=b.variant.video);b.variant&&b.variant.audio&&(g.audio=b.variant.audio);b.text&&(g.text=b.text);for(var h in this.c)if(!g[h]&&"text"!=h){this.a.onError(new p(2,5,5005));return}for(h in g)if(!this.c[h])if("text"==
281
+ h)ag(this,{text:g.text},a.startTime),delete g[h];else{this.a.onError(new p(2,5,5005));return}for(h in this.c)(a=g[h])?(kg(this,a,!1),ig(this,this.c[h],0)):delete this.c[h];this.a.tc()}}.bind(a))["catch"](Qa)}}function Cg(a){return!a.ya&&null==a.ra&&!a.sa&&!a.ua}function xg(a,b){var c=Va(b.a(),a.h.retryParameters);if(0!=b.O||null!=b.D){var d="bytes="+b.O+"-";null!=b.D&&(d+=b.D);c.headers.Range=d}return a.a.Ya.request(1,c).then(function(a){return a.data})}
282
+ function ng(a,b,c){b.sa=!1;b.Ab=!1;b.ua=!0;hc(a.a.J,b.type).then(function(){if(!this.f&&c){var a=this.a.J,e=b.type;return"text"==e?Promise.resolve():gc(a,e,a.gd.bind(a,e))}}.bind(a)).then(function(){this.f||(b.Ka=null,b.ka=null,b.ua=!1,b.endOfStream=!1,ig(this,b,0))}.bind(a))}function ig(a,b,c){b.ra=window.setTimeout(a.Me.bind(a,b),1E3*c)}function $f(a){null!=a.ra&&(window.clearTimeout(a.ra),a.ra=null)}
283
+ function sg(a,b){Ja(a.A).then(function(){this.a.onError(b);b.handled||this.h.failureCallback(b)}.bind(a))};function Dg(a,b){return new Promise(function(c,d){var e=new Dg.c;e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onload=function(b){b=b.target;var e=b.getAllResponseHeaders().trim().split("\r\n").reduce(function(a,b){var c=b.split(": ");a[c[0].toLowerCase()]=c.slice(1).join(": ");return a},{});if(200<=b.status&&299>=b.status&&202!=b.status)b.responseURL&&(a=b.responseURL),c({uri:a,data:b.response,headers:e,fromCache:!!e["x-shaka-from-cache"]});
284
+ else{var f=null;try{f=ob(b.response)}catch(l){}d(new p(401==b.status||403==b.status?2:1,1,1001,a,b.status,f,e))}};e.onerror=function(){d(new p(1,1,1002,a))};e.ontimeout=function(){d(new p(1,1,1003,a))};for(var f in b.headers)e.setRequestHeader(f,b.headers[f]);e.send(b.body)})}n("shaka.net.HttpPlugin",Dg);Dg.c=window.XMLHttpRequest;Ua("http",Dg,1);Ua("https",Dg,1);function Eg(){this.b=null;this.a=[]}function Fg(){if(!window.indexedDB)return Promise.resolve();var a=window.indexedDB.deleteDatabase("shaka_offline_db"),b=new u;a.onsuccess=function(){b.resolve()};a.onerror=Gg.bind(null,a,b);return b}Eg.prototype.init=function(a){return Hg(a).then(function(a){this.b=a}.bind(this))};
285
+ Eg.prototype.destroy=function(){return Promise.all(this.a.map(function(a){try{a.transaction.abort()}catch(b){}return a.N["catch"](Qa)})).then(function(){this.b&&(this.b.close(),this.b=null)}.bind(this))};Eg.prototype.Fa=function(a){return Ig(this,"manifest-v3",a)};function Jg(a,b){return Kg(a,b)}function Ig(a,b,c){var d;return Lg(a,b,"readonly",function(a){d=a.get(c)}).then(function(){return d.result})}
286
+ function Kg(a,b){return Lg(a,"manifest-v3","readonly",function(a){a.openCursor().onsuccess=function(a){if(a=a.target.result)b(a.key,a.value),a["continue"]()}})}function Mg(a,b,c){return Lg(a,"manifest-v3","readwrite",function(a){a.put(c,b)})}function Ng(a,b,c){var d;return Lg(a,b,"readwrite",function(a){a.add(c).onsuccess=function(a){d=a.target.result}}).then(function(){return d})}
287
+ function Og(a,b,c,d){return Lg(a,b,"readwrite",function(a){c.forEach(function(b){a["delete"](b).onsuccess=function(){d&&d(b)}})})}function Lg(a,b,c,d){var e={transaction:a.b.transaction([b],c),N:new u};e.transaction.oncomplete=function(){a.a.splice(a.a.indexOf(e),1);e.N.resolve()};e.transaction.onabort=function(b){a.a.splice(a.a.indexOf(e),1);Gg(e.transaction,e.N,b)};e.transaction.onerror=Pg();b=e.transaction.objectStore(b);d(b);a.a.push(e);return e.N}
288
+ function Qg(a,b,c){function d(){var b=f.pop();b?e(b,d):(a.reject(new p(1,9,9010,g)),c.abort())}function e(a,b){c.objectStore(a).openCursor().onsuccess=function(a){(a=a.target.result)?(g.push(a.value.originalManifestUri),a["continue"]()):b()}}var f=["manifest","manifest-v2"].filter(function(a){return b.objectStoreNames.contains(a)}),g=[];d()}function Gg(a,b,c){b.reject(a.error?new p(2,9,9001,a.error):new p(2,9,9002));c.preventDefault()}
289
+ function Hg(a){function b(){return new Promise(function(a){setTimeout(a,1E3)})}var c=a||0,d=0<c;a=Rg(d);for(var e=0;e<c;e++)a=a.then(function(a){return a?a:b().then(function(){return Rg(d)})});return a.then(function(a){return a?a:Promise.reject(new p(2,9,9001,"Failed to issue upgrade after "+c+" retries"))})}
290
+ function Rg(a){var b=new u,c=!1,d=window.indexedDB.open("shaka_offline_db",3);d.onupgradeneeded=function(a){var d=a.target.transaction,e=d.db,h={autoIncrement:!0};0==a.oldVersion?(e.createObjectStore("manifest-v3",h),e.createObjectStore("segment-v3",h)):Qg(b,e,d);c=!0};d.onsuccess=function(d){d=d.target.result;a&&!c?(d.close(),b.resolve(null)):b.resolve(d)};d.onerror=Pg(function(){b.reject(new p(2,9,9001,"Failed to open IndexedDB Connection",d.error.message))});return b}
291
+ function Pg(a){return function(b){b.preventDefault();a&&a(b)}};function Sg(a,b,c){this.b={};this.i=[];this.h=a;this.j=b;this.m=c;this.g=this.a=null;this.f=this.c=0;this.l=[]}function Tg(a,b){a.l.push(b)}Sg.prototype.destroy=function(){var a=this.h,b=this.i,c=this.g||Promise.resolve();b.length&&(c=c.then(function(){return Og(a,"segment-v3",b,null)}));this.b={};this.i=[];this.g=this.a=this.m=this.j=this.h=null;return c};function Ug(a,b,c,d,e){a.b[b]=a.b[b]||[];a.b[b].push({uris:c.a(),O:c.O,D:c.D,jc:d,Vd:e})}
292
+ function Vg(a,b){a.c=0;a.f=0;hb(a.b).forEach(function(a){a.forEach(this.s.bind(this))}.bind(a));a.a=b;var c=hb(a.b).map(function(a){var b=0,c=function(){if(!this.a)return Promise.reject(new p(2,9,9002));if(b>=a.length)return Promise.resolve();var d=a[b++];return Wg(this,d).then(c)}.bind(this);return c()}.bind(a));a.b={};a.g=Promise.all(c).then(function(){return Ng(this.h,"manifest-v3",b)}.bind(a)).then(function(a){this.i=[];return a}.bind(a));return a.g}
293
+ function Wg(a,b){var c=Va(b.uris,a.m);if(0!=b.O||null!=b.D)c.headers.Range="bytes="+b.O+"-"+(null==b.D?"":b.D);var d;return a.j.request(1,c).then(function(a){if(!this.a)return Promise.reject(new p(2,9,9002));d=a.data.byteLength;return Ng(this.h,"segment-v3",{data:a.data})}.bind(a)).then(function(a){if(!this.a)return Promise.reject(new p(2,9,9002));this.a.size+=d;this.f+=null==b.D?b.jc:b.D-b.O+1;this.i.push(a);b.Vd(a);Xg(this)}.bind(a))}Sg.prototype.s=function(a){this.c+=null==a.D?a.jc:a.D-a.O+1};
294
+ function Xg(a){var b=0==a.c?0:a.f/a.c,c=a.a.size;a.l.forEach(function(a){a(b,c)})};function Yg(a){return(a=/^offline:manifest\/([0-9]+)$/.exec(a))?Number(a[1]):null};function Zg(a,b,c){var d=void 0==b.expiration?Infinity:b.expiration,e=b.presentationTimeline.S();b=wc(b.periods[0]);return{offlineUri:null,originalManifestUri:a,duration:e,size:0,expiration:d,tracks:b,appMetadata:c}}function $g(a,b){var c=ah(b.periods[0],[],new R(null,0)),d=b.appMetadata||{};c=wc(c);return{offlineUri:a,originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
295
+ function ah(a,b,c){var d=a.streams.filter(bh),e=a.streams.filter(ch);b=dh(d,e,b);d=a.streams.filter(eh).map(fh);a.streams.forEach(function(a,b){var d=a.segments.map(function(a,b){return gh(b,a)});c.Za(d,0==b)});return{startTime:a.startTime,variants:b,textStreams:d}}function gh(a,b){var c="offline:segment/"+b.dataKey;return new M(a,b.startTime,b.endTime,function(){return[c]},0,null)}
296
+ function dh(a,b,c){var d={},e=[];e.push.apply(e,a);e.push.apply(e,b);e.forEach(function(a){a.variantIds.forEach(function(a){d[a]||(d[a]={id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:c,allowedByApplication:!0,allowedByKeySystem:!0})})});a.forEach(function(a){var b=fh(a);a.variantIds.forEach(function(a){a=d[a];a.language=b.language;a.primary=a.primary||b.primary;a.audio=b})});b.forEach(function(a){var b=fh(a);a.variantIds.forEach(function(a){a=d[a];a.primary=a.primary||b.primary;
297
+ a.video=b})});return hb(d)}
298
+ function fh(a){var b=a.segments.map(function(a,b){return gh(b,a)});b=new Q(b);b={id:a.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b),initSegmentReference:null,presentationTimeOffset:a.presentationTimeOffset,mimeType:a.mimeType,codecs:a.codecs,width:a.width||void 0,height:a.height||void 0,frameRate:a.frameRate||void 0,kind:a.kind,encrypted:a.encrypted,keyId:a.keyId,language:a.language,label:a.label||null,type:a.contentType,primary:a.primary,
299
+ trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};null!=a.initSegmentKey&&(b.initSegmentReference=hh(a.initSegmentKey));return b}function hh(a){var b="offline:segment/"+a;return new L(function(){return[b]},0,null)}function bh(a){return"audio"==a.contentType}function ch(a){return"video"==a.contentType}function eh(a){return"text"==a.contentType};function ih(){return jh().then(function(){var a=new Eg;return a.init().then(function(){return a})})}function kh(){return jh().then(function(){return Fg()})}function jh(){return null!=window.indexedDB?Promise.resolve():Promise.reject(new p(2,9,9E3))};function lh(){this.a=-1}m=lh.prototype;m.configure=function(){};m.start=function(a){var b=Yg(a);if(null==b)return Promise.reject(new p(2,1,9004,a));this.a=b;var c;return ih().then(function(a){c=a;return c.Fa(b)}.bind(this)).then(function(a){if(!a)throw new p(2,9,9003,b);return mh(a)}).then(function(a){return c.destroy().then(function(){return a})},function(a){return c.destroy().then(function(){throw a;})})};m.stop=function(){return Promise.resolve()};m.update=function(){};
300
+ m.onExpirationUpdated=function(a,b){var c=this.a,d;ih().then(function(a){d=a;return d.Fa(c)}).then(function(e){if(e&&!(0>e.sessionIds.indexOf(a))&&(void 0==e.expiration||e.expiration>b))return e.expiration=b,Mg(d,c,e)})["catch"](function(){}).then(function(){return d.destroy()})};function mh(a){var b=new R(null,0);b.ha(a.duration);var c=a.drmInfo?[a.drmInfo]:[];return{presentationTimeline:b,minBufferTime:2,offlineSessionIds:a.sessionIds,periods:a.periods.map(function(a){return ah(a,c,b)})}}
301
+ qe["application/x-offline-manifest"]=lh;function nh(a){if(null!=Yg(a))return nh.a(a);var b=(b=/^offline:segment\/([0-9]+)$/.exec(a))?Number(b[1]):null;return null!=b?nh.b(b,a):Promise.reject(new p(2,1,9004,a))}n("shaka.offline.OfflineScheme",nh);nh.a=function(a){a={uri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(a)};
302
+ nh.b=function(a,b){var c,d;return ih().then(function(b){c=b;return Ig(c,"segment-v3",a)}).then(function(a){d=a;return c.destroy()}).then(function(){if(!d)throw new p(2,9,9003,a);return{uri:b,data:d.data,headers:{}}})};Ua("offline",nh);function T(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region={x:0,y:0,width:100,height:100};this.position=null;this.positionAlign=oh;this.size=100;this.textAlign=ph;this.writingDirection=qh;this.lineInterpretation=rh;this.line=null;this.lineHeight="";this.lineAlign=sh;this.displayAlign=th;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=uh;this.fontStyle=vh;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}n("shaka.text.Cue",T);var oh="auto";
303
+ T.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:oh};var ph="center",wh={LEFT:"left",RIGHT:"right",CENTER:ph,START:"start",END:"end"};T.textAlign=wh;var th="before",xh={BEFORE:th,CENTER:"center",AFTER:"after"};T.displayAlign=xh;var qh=0;T.writingDirection={HORIZONTAL_LEFT_TO_RIGHT:qh,HORIZONTAL_RIGHT_TO_LEFT:1,VERTICAL_LEFT_TO_RIGHT:2,VERTICAL_RIGHT_TO_LEFT:3};var rh=0;T.lineInterpretation={LINE_NUMBER:rh,PERCENTAGE:1};var sh="center",yh={CENTER:sh,START:"start",END:"end"};
304
+ T.lineAlign=yh;var uh=400;T.fontWeight={NORMAL:uh,BOLD:700};var vh="normal",zh={NORMAL:vh,ITALIC:"italic",OBLIQUE:"oblique"};T.fontStyle=zh;T.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function U(a){this.a=null;for(var b=0;b<a.textTracks.length;++b){var c=a.textTracks[b];c.mode="disabled";"Shaka Player TextTrack"==c.label&&(this.a=c)}this.a||(this.a=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden";this.b=this.a.cues}n("shaka.text.SimpleTextDisplayer",U);U.prototype.remove=function(a,b){if(!this.a)return!1;Ah(this,function(c){return c.startTime>=b||c.endTime<=a?!1:!0});return!0};U.prototype.remove=U.prototype.remove;
305
+ U.prototype.append=function(a){for(var b=[],c=0;c<a.length;c++){var d=Bh(a[c]);d&&b.push(d)}b.slice().sort(function(a,c){return a.startTime!=c.startTime?a.startTime-c.startTime:a.endTime!=c.endTime?a.endTime-c.startTime:b.indexOf(c)-b.indexOf(a)}).forEach(function(a){this.a.addCue(a)}.bind(this))};U.prototype.append=U.prototype.append;U.prototype.destroy=function(){this.a&&Ah(this,function(){return!0});this.a=null;return Promise.resolve()};U.prototype.destroy=U.prototype.destroy;
306
+ U.prototype.isTextVisible=function(){return"showing"==this.a.mode};U.prototype.isTextVisible=U.prototype.isTextVisible;U.prototype.setTextVisibility=function(a){this.a.mode=a?"showing":"hidden"};U.prototype.setTextVisibility=U.prototype.setTextVisibility;
307
+ function Bh(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;b.size=a.size;try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");2==a.writingDirection?b.vertical="lr":3==a.writingDirection&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
308
+ function Ah(a,b){for(var c=a.b,d=[],e=0;e<c.length;++e)b(c[e])&&d.push(c[e]);for(e=0;e<d.length;++e)a.a.removeCue(d[e])};function Ch(){this.a=Promise.resolve();this.b=this.c=this.f=!1;this.i=new Promise(function(a){this.g=a}.bind(this));this.l=[];this.j=[]}Ch.prototype.then=function(a){this.a=this.a.then(a).then(function(a){return this.b?(this.g(),Promise.reject(this.h)):Promise.resolve(a)}.bind(this));return this};
309
+ function Dh(a){a.f||(a.a=a.a.then(function(a){this.c=!0;this.l.forEach(function(a){a()});return Promise.resolve(a)}.bind(a),function(a){this.c=!0;return this.b?(this.g(),Promise.reject(this.h)):Promise.reject(a)}.bind(a)));a.f=!0;return a.a}Ch.prototype.cancel=function(a){if(this.c)return Promise.resolve();this.b=!0;this.h=a;this.j.forEach(function(a){a()});return this.i};function V(a,b){H.call(this);this.L=!1;this.f=a;this.qb=!1;this.u=null;this.m=new z;this.h=this.Cb=this.b=this.i=this.a=this.w=this.g=this.nb=this.ca=this.da=this.l=this.s=null;this.Xc=1E9;this.lb=[];this.pb=!1;this.ta=!0;this.K=this.Ta=this.Da=null;this.ic=!1;this.A=null;this.ob=[];this.I={};this.c=Eh(this);this.mb={width:Infinity,height:Infinity};this.j=Fh();this.kb=0;this.Ba=this.c.preferredAudioLanguage;this.Ca=this.c.preferredTextLanguage;this.hb=this.ib="";b&&b(this);this.s=new x(this.Ee.bind(this));
310
+ this.nb=Gh(this);A(this.m,this.f,"error",this.Xd.bind(this))}la(V,H);n("shaka.Player",V);function Hh(a){if(!a.Da)return Promise.resolve();var b=Promise.resolve();a.i&&(b=a.i.stop(),a.i=null);a=a.Da.cancel(new p(2,7,7E3));return Promise.all([b,a])}V.prototype.destroy=function(){this.L=!0;return Hh(this).then(function(){var a=Promise.all([this.Ta,Ih(this),this.m?this.m.destroy():null,this.s?this.s.destroy():null]);this.f=null;this.qb=!1;this.c=this.s=this.h=this.m=null;return a}.bind(this))};
311
+ V.prototype.destroy=V.prototype.destroy;V.version="v2.3.3";var Jh={};V.registerSupportPlugin=function(a,b){Jh[a]=b};V.isBrowserSupported=function(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};
312
+ V.probeSupport=function(){return Pb().then(function(a){var b=se(),c=bc();a={manifest:b,media:c,drm:a};for(var d in Jh)a[d]=Jh[d]();return a})};
313
+ V.prototype.load=function(a,b,c){var d=this.zb(),e=new Ch;this.Da=e;this.dispatchEvent(new B("loading"));var f=Date.now();return Dh(e.then(function(){return d}).then(function(){this.j=Fh();A(this.m,this.f,"playing",this.gb.bind(this));A(this.m,this.f,"pause",this.gb.bind(this));A(this.m,this.f,"ended",this.gb.bind(this));this.h=new this.c.abrFactory;this.h.configure(this.c.abr);this.u=new this.c.textDisplayFactory;this.u.setTextVisibility(this.qb);return te(a,this.s,this.c.manifest.retryParameters,
314
+ c)}.bind(this)).then(function(b){this.i=new b;this.i.configure(this.c.manifest);return this.i.start(a,{networkingEngine:this.s,filterNewPeriod:this.sb.bind(this),filterAllPeriods:this.cc.bind(this),onTimelineRegionAdded:this.Wd.bind(this),onEvent:this.fb.bind(this),onError:this.Sa.bind(this)})}.bind(this)).then(function(b){b.periods.some(function(a){return a.variants.some(function(a){return a.video&&a.audio})})&&b.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return a.video&&
315
+ a.audio})});if(0==b.periods.length)throw new p(2,4,4014);this.b=b;this.Cb=a;this.l=new zb({Ya:this.s,onError:this.Sa.bind(this),Tb:this.Gd.bind(this),onExpirationUpdated:this.Dd.bind(this),onEvent:this.fb.bind(this)});this.l.configure(this.c.drm);return this.l.init(b,!1)}.bind(this)).then(function(){this.cc(this.b.periods);this.kb=Date.now()/1E3;this.Ba=this.c.preferredAudioLanguage;this.Ca=this.c.preferredTextLanguage;var a=this.b.presentationTimeline.S(),b=this.c.playRangeEnd,c=this.c.playRangeStart;
316
+ 0<c&&(this.P()||this.b.presentationTimeline.Nc(c));b<a&&(this.P()||this.b.presentationTimeline.ha(b));return Promise.all([Cb(this.l,this.f),this.nb])}.bind(this)).then(function(){this.h.init(this.Fe.bind(this));this.g=new Qf(this.f,this.b,this.c.streaming,void 0==b?null:b,this.De.bind(this),this.fb.bind(this));this.w=new Vf(this.f,this.da,this.b,this.c.streaming,this.Qc.bind(this),this.fb.bind(this),this.Ce.bind(this));this.ca=new ac(this.f,this.da,this.u);this.a=new Zf(this.b,{Na:this.g,J:this.ca,
317
+ Ya:this.s,uc:this.Ad.bind(this),tc:this.$c.bind(this),onError:this.Sa.bind(this),onEvent:this.fb.bind(this),Hd:this.Id.bind(this),$a:this.Sd.bind(this),filterNewPeriod:this.sb.bind(this),filterAllPeriods:this.cc.bind(this)});this.a.configure(this.c.streaming);Kh(this);this.dispatchEvent(new B("streaming"));return this.a.init()}.bind(this)).then(function(){if(this.c.streaming.startAtSegmentBoundary){var a=Lh(this,Tf(this.g));Nf(this.g.a,a)}this.b.periods.forEach(this.sb.bind(this));Mh(this);Nh(this);
318
+ a=S(this.a);var b=Dc(a.variants,this.Ba,this.ib);this.h.setVariants(b);a.variants.some(function(a){return a.primary});this.ob.forEach(this.w.s.bind(this.w));this.ob=[];db(this.m,this.f,"loadeddata",function(){this.j.loadLatency=(Date.now()-f)/1E3}.bind(this));this.Da=null}.bind(this)))["catch"](function(a){this.Da==e&&(this.Da=null,this.dispatchEvent(new B("unloading")));return Promise.reject(a)}.bind(this))};V.prototype.load=V.prototype.load;
319
+ function Kh(a){function b(a){return(a.video?a.video.codecs.split(".")[0]:"")+"-"+(a.audio?a.audio.codecs.split(".")[0]:"")}var c={};a.b.periods.forEach(function(a){a.variants.forEach(function(a){var d=b(a);d in c||(c[d]=[]);c[d].push(a)})});var d=null,e=Infinity;jb(c,function(a,b){var c=0,f=0;b.forEach(function(a){c+=a.bandwidth||0;++f});var g=c/f;g<e&&(d=a,e=g)});a.b.periods.forEach(function(a){a.variants=a.variants.filter(function(a){return b(a)==d?!0:!1})})}
320
+ function Gh(a){a.da=new MediaSource;var b=new u;A(a.m,a.da,"sourceopen",b.resolve);a.f.src=window.URL.createObjectURL(a.da);return b}V.prototype.configure=function(a){Ma(this.c,a,Eh(this),Oh(),"");Ph(this)};V.prototype.configure=V.prototype.configure;
321
+ function Ph(a){a.i&&a.i.configure(a.c.manifest);a.l&&a.l.configure(a.c.drm);if(a.a){a.a.configure(a.c.streaming);try{a.b.periods.forEach(a.sb.bind(a))}catch(e){a.Sa(e)}var b=cg(a.a),c=eg(a.a),d=S(a.a);(b=Hc(b,c,d.variants))&&b.allowedByApplication&&b.allowedByKeySystem||Qh(a,d)}a.h&&(a.h.configure(a.c.abr),a.c.abr.enabled&&!a.ta?a.h.enable():a.h.disable())}V.prototype.getConfiguration=function(){var a=Eh(this);Ma(a,this.c,Eh(this),Oh(),"");return a};V.prototype.getConfiguration=V.prototype.getConfiguration;
322
+ V.prototype.re=function(){this.c=Eh(this);Ph(this)};V.prototype.resetConfiguration=V.prototype.re;V.prototype.md=function(){return this.f};V.prototype.getMediaElement=V.prototype.md;V.prototype.pc=function(){return this.s};V.prototype.getNetworkingEngine=V.prototype.pc;V.prototype.Ib=function(){return this.Cb};V.prototype.getManifestUri=V.prototype.Ib;V.prototype.P=function(){return this.b?this.b.presentationTimeline.P():!1};V.prototype.isLive=V.prototype.P;
323
+ V.prototype.wa=function(){return this.b?this.b.presentationTimeline.wa():!1};V.prototype.isInProgress=V.prototype.wa;V.prototype.wd=function(){if(!this.b||!this.b.periods.length)return!1;var a=this.b.periods[0].variants;return a.length?!a[0].video:!1};V.prototype.isAudioOnly=V.prototype.wd;V.prototype.te=function(){var a=0,b=0;this.b&&(b=this.b.presentationTimeline,a=b.Va(),b=b.Ha());return{start:a,end:b}};V.prototype.seekRange=V.prototype.te;
324
+ V.prototype.keySystem=function(){return this.l?this.l.keySystem():""};V.prototype.keySystem=V.prototype.keySystem;V.prototype.drmInfo=function(){return this.l?this.l.b:null};V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.ub=function(){return this.l?this.l.ub():Infinity};V.prototype.getExpiration=V.prototype.ub;V.prototype.sc=function(){return this.pb};V.prototype.isBuffering=V.prototype.sc;
325
+ V.prototype.zb=function(){if(this.L)return Promise.resolve();this.dispatchEvent(new B("unloading"));return Hh(this).then(function(){this.Ta||(this.Ta=Rh(this).then(function(){this.Ta=null}.bind(this)));return this.Ta}.bind(this))};V.prototype.unload=V.prototype.zb;V.prototype.Ua=function(){return this.g?this.g.Ua():0};V.prototype.getPlaybackRate=V.prototype.Ua;V.prototype.Oe=function(a){this.g&&Pf(this.g.a,a);this.a&&jg(this.a,1!=a)};V.prototype.trickPlay=V.prototype.Oe;
326
+ V.prototype.ad=function(){this.g&&Pf(this.g.a,1);this.a&&jg(this.a,!1)};V.prototype.cancelTrickPlay=V.prototype.ad;V.prototype.ud=function(){if(!this.b||!this.g)return[];var a=Jc(this.b,Tf(this.g)),b=this.I[a]||{};return yc(this.b.periods[a],b.audio,b.video)};V.prototype.getVariantTracks=V.prototype.ud;V.prototype.td=function(){if(!this.b||!this.g)return[];var a=Jc(this.b,Tf(this.g));return zc(this.b.periods[a],(this.I[a]||{}).text).filter(function(a){return 0>this.lb.indexOf(a.id)}.bind(this))};
327
+ V.prototype.getTextTracks=V.prototype.td;V.prototype.we=function(a){if(this.a){var b=S(this.a);if(a=Bc(b,a))Sh(this,a,!1),this.ta?this.A=a:kg(this.a,a,!0),this.Ca=a.language}};V.prototype.selectTextTrack=V.prototype.we;
328
+ V.prototype.xe=function(a,b){if(this.a){this.c.abr.enabled&&qa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var c=S(this.a);(c=Ac(c,a))&&Cc(c)&&(Th(this,c,!1),Uh(this,c,b),this.Ba=c.language)}};V.prototype.selectVariantTrack=V.prototype.xe;V.prototype.jd=function(){if(!this.a)return[];var a=S(this.a);a=xc(a.variants).map(function(a){return a.audio}).filter(Sa);return Vh(a)};
329
+ V.prototype.getAudioLanguagesAndRoles=V.prototype.jd;V.prototype.sd=function(){if(!this.a)return[];var a=S(this.a);return Vh(a.textStreams)};V.prototype.getTextLanguagesAndRoles=V.prototype.sd;V.prototype.hd=function(){if(!this.a)return[];var a=S(this.a);return xc(a.variants).map(function(a){return a.language}).filter(Sa)};V.prototype.getAudioLanguages=V.prototype.hd;V.prototype.rd=function(){return this.a?S(this.a).textStreams.map(function(a){return a.language}).filter(Sa):[]};
330
+ V.prototype.getTextLanguages=V.prototype.rd;function Vh(a){var b=[];a.forEach(function(a){if(a){var c=a.language;a.roles.length?a.roles.forEach(function(a){b.push({language:c,role:a})}):b.push({language:c,role:""})}else b.push({language:"und",role:""})});return Xa(b,function(a,b){return a.language==b.language&&a.role==b.role})}V.prototype.ue=function(a,b){if(this.a){var c=S(this.a);this.Ba=a;this.ib=b||"";Qh(this,c)}};V.prototype.selectAudioLanguage=V.prototype.ue;
331
+ V.prototype.ve=function(a,b){if(this.a){var c=S(this.a);this.Ca=a;this.hb=b||"";Qh(this,c)}};V.prototype.selectTextLanguage=V.prototype.ve;V.prototype.Mb=function(){return this.u?this.u.isTextVisible():this.qb};V.prototype.isTextTrackVisible=V.prototype.Mb;V.prototype.Ae=function(a){this.u&&this.u.setTextVisibility(a);this.qb=a;Wh(this);this.a&&(a?(a=S(this.a),a=Fc(a.textStreams,this.Ca,this.hb)[0],fg(this.a,a)):(a=this.a,a.w=!0,a.c.text&&($f(a.c.text),delete a.c.text)))};
332
+ V.prototype.setTextTrackVisibility=V.prototype.Ae;V.prototype.od=function(){return this.b?new Date(1E3*this.b.presentationTimeline.c+1E3*this.f.currentTime):null};V.prototype.getPlayheadTimeAsDate=V.prototype.od;V.prototype.qd=function(){return this.b?new Date(1E3*this.b.presentationTimeline.c):null};V.prototype.getPresentationStartTimeAsDate=V.prototype.qd;V.prototype.Gb=function(){return this.ca?this.ca.Gb():{total:[],audio:[],video:[],text:[]}};V.prototype.getBufferedInfo=V.prototype.Gb;
333
+ V.prototype.getStats=function(){Yh(this);this.gb();var a=null,b=null,c=this.f;c=c&&c.getVideoPlaybackQuality?c.getVideoPlaybackQuality():{};if(this.g&&this.b){var d=Jc(this.b,Tf(this.g)),e=this.b.periods[d];if(d=this.I[d])b=Ic(d.audio,d.video,e.variants),a=b.video||{}}a||(a={});b||(b={});return{width:a.width||0,height:a.height||0,streamBandwidth:b.bandwidth||0,decodedFrames:Number(c.totalVideoFrames),droppedFrames:Number(c.droppedVideoFrames),estimatedBandwidth:this.h?this.h.getBandwidthEstimate():
334
+ NaN,loadLatency:this.j.loadLatency,playTime:this.j.playTime,bufferingTime:this.j.bufferingTime,switchHistory:Na(this.j.switchHistory),stateHistory:Na(this.j.stateHistory)}};V.prototype.getStats=V.prototype.getStats;
335
+ V.prototype.addTextTrack=function(a,b,c,d,e,f){if(!this.a)return Promise.reject();for(var g=S(this.a),h,k=0;k<this.b.periods.length;k++)if(this.b.periods[k]==g){if(k==this.b.periods.length-1){if(h=this.b.presentationTimeline.S()-g.startTime,Infinity==h)return Promise.reject()}else h=this.b.periods[k+1].startTime-g.startTime;break}var l={id:this.Xc++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1!=b?null:new M(1,0,
336
+ h,function(){return[a]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:d,codecs:e||"",kind:c,encrypted:!1,keyId:null,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};this.lb.push(l.id);g.textStreams.push(l);return fg(this.a,l).then(function(){if(!this.L){var a=this.b.periods.indexOf(g),d=dg(this.a,"text");d&&(this.I[a].text=d.id);this.lb.splice(this.lb.indexOf(l.id),1);Qh(this,g);Mh(this);return{id:l.id,active:!1,
337
+ type:"text",bandwidth:0,language:b,label:f||null,kind:c,width:null,height:null}}}.bind(this))};V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.ac=function(a,b){this.mb.width=a;this.mb.height=b};V.prototype.setMaxHardwareResolution=V.prototype.ac;V.prototype.Jc=function(){if(this.a){var a=this.a;if(a.f)a=!1;else if(a.l)a=!1;else{for(var b in a.c){var c=a.c[b];c.Wa&&(c.Wa=!1,ig(a,c,.1))}a=!0}}else a=!1;return a};V.prototype.retryStreaming=V.prototype.Jc;V.prototype.Fa=function(){return this.b};
338
+ V.prototype.getManifest=V.prototype.Fa;function Th(a,b,c){b.video&&Zh(a,b.video);b.audio&&Zh(a,b.audio);var d=bg(a.a);b!=Hc(cg(a.a),eg(a.a),d?d.variants:[])&&a.j.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth})}function Sh(a,b,c){Zh(a,b);a.j.switchHistory.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null})}function Zh(a,b){var c=Kc(a.b,b);a.I[c]||(a.I[c]={});a.I[c][b.type]=b.id}
339
+ function Ih(a){a.m&&(a.m.ia(a.da,"sourceopen"),a.m.ia(a.f,"loadeddata"),a.m.ia(a.f,"playing"),a.m.ia(a.f,"pause"),a.m.ia(a.f,"ended"));a.f&&(a.f.removeAttribute("src"),a.f.load());var b=Promise.all([a.h?a.h.stop():null,a.l?a.l.destroy():null,a.ca?a.ca.destroy():null,a.g?a.g.destroy():null,a.w?a.w.destroy():null,a.a?a.a.destroy():null,a.i?a.i.stop():null,a.u?a.u.destroy():null]);a.ta=!0;a.l=null;a.ca=null;a.g=null;a.w=null;a.a=null;a.i=null;a.u=null;a.b=null;a.Cb=null;a.nb=null;a.da=null;a.ob=[];a.I=
340
+ {};a.j=Fh();return b}function Rh(a){return a.i?Ih(a).then(function(){this.L||(this.Qc(!1),this.nb=Gh(this))}.bind(a)):Promise.resolve()}function Oh(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0)}}}
341
+ function Eh(a){var b=5E5;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink);return{drm:{retryParameters:Ia(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:Ia(),dash:{customScheme:function(a){if(a)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10}},streaming:{retryParameters:Ia(),failureCallback:a.dd.bind(a),rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,
342
+ startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1},abrFactory:F,textDisplayFactory:function(a){return new U(a)}.bind(null,a.f),abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",restrictions:{minWidth:0,maxWidth:Infinity,
343
+ minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity}}m=V.prototype;m.dd=function(a){var b=[1001,1002,1003];this.P()&&0<=b.indexOf(a.code)&&(a.severity=1,this.Jc())};function Fh(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}
344
+ m.cc=function(a){a.forEach(sc.bind(null,this.l,this.a?cg(this.a):null,this.a?eg(this.a):null));var b=$a(a,function(a){return a.variants.some(Cc)});if(0==b)throw new p(2,4,9009);if(b<a.length)throw new p(2,4,4011);a.forEach(function(a){rc(a,this.c.restrictions,this.mb)&&this.a&&S(this.a)==a&&Mh(this);if(!a.variants.some(Cc))throw new p(2,4,4012);}.bind(this))};
345
+ m.sb=function(a){sc(this.l,this.a?cg(this.a):null,this.a?eg(this.a):null,a);var b=a.variants,c=b.some(Cc);rc(a,this.c.restrictions,this.mb)&&this.a&&S(this.a)==a&&Mh(this);a=b.some(Cc);if(!c)throw new p(2,4,4011);if(!a)throw new p(2,4,4012);};function Uh(a,b,c){a.ta?(a.K=b,a.ic=c||!1):lg(a.a,b,c||!1)}function Yh(a){if(a.b){var b=Date.now()/1E3;a.pb?a.j.bufferingTime+=b-a.kb:a.j.playTime+=b-a.kb;a.kb=b}}
346
+ function Lh(a,b){function c(a,b){if(!a)return null;var c=a.findSegmentPosition(b-f.startTime);return null==c?null:(c=a.getSegmentReference(c))?c.startTime+f.startTime:null}var d=cg(a.a),e=eg(a.a),f=S(a.a);d=c(d,b);e=c(e,b);return null!=e&&null!=d?Math.max(e,d):null!=e?e:null!=d?d:b}m.Ee=function(a,b){this.h&&this.h.segmentDownloaded(a,b)};m.Qc=function(a){Yh(this);this.pb=a;this.gb();if(this.g){var b=this.g.a;a!=b.h&&(b.h=a,Pf(b,b.g))}this.dispatchEvent(new B("buffering",{buffering:a}))};m.Ce=function(){Mh(this)};
347
+ m.gb=function(){if(!this.L){var a=this.pb?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var b=Date.now()/1E3;if(this.j.stateHistory.length){var c=this.j.stateHistory[this.j.stateHistory.length-1];c.duration=b-c.timestamp;if(a==c.state)return}this.j.stateHistory.push({timestamp:b,state:a,duration:0})}};m.De=function(){if(this.w){var a=this.w;a.c.forEach(a.m.bind(a,!0))}this.a&&og(this.a)};
348
+ function $h(a,b){if(!b||!b.length)return a.Sa(new p(2,4,4012)),null;a.h.setVariants(b);return a.h.chooseVariant()}function Qh(a,b){var c=Dc(b.variants,a.Ba,a.ib),d=Fc(b.textStreams,a.Ca,a.hb);if(c=$h(a,c))Th(a,c,!0),Uh(a,c,!0);(d=d[0])&&a.Mb()&&(Sh(a,d,!0),a.ta?a.A=d:kg(a.a,d,!0));Nh(a)}
349
+ m.Ad=function(a){this.ta=!0;this.h.disable();var b={audio:!1,text:!1},c=Dc(a.variants,this.Ba,this.ib,b),d=Fc(a.textStreams,this.Ca,this.hb,b);c=$h(this,c);d=d[0]||null;if(this.K){a:{var e=this.b;for(var f=0;f<e.periods.length;++f)for(var g=e.periods[f],h=0;h<g.variants.length;++h)if(g.variants[h]==this.K){e=f;break a}e=-1}e=this.b.periods[e];e==a&&(c=this.K);this.K=null}this.A&&(e=Kc(this.b,this.A),e=this.b.periods[e],e==a&&(d=this.A),this.A=null);c&&Th(this,c,!0);d&&(Sh(this,d,!0),!bg(this.a)&&
350
+ c&&c.audio&&b.text&&d.language!=c.audio.language&&(this.u.setTextVisibility(!0),Wh(this)));return this.Mb()?{variant:c,text:d}:{variant:c,text:null}};m.$c=function(){this.ta=!1;this.c.abr.enabled&&this.h.enable();this.K&&(lg(this.a,this.K,this.ic),this.K=null);this.A&&(kg(this.a,this.A,!0),this.A=null)};m.Id=function(){this.i&&this.i.update&&this.i.update()};m.Sd=function(){this.g&&this.g.$a()};m.Fe=function(a,b){Th(this,a,!0);this.a&&(lg(this.a,a,b||!1),Nh(this))};
351
+ function Nh(a){Promise.resolve().then(function(){this.L||this.dispatchEvent(new B("adaptation"))}.bind(a))}function Mh(a){Promise.resolve().then(function(){this.L||this.dispatchEvent(new B("trackschanged"))}.bind(a))}function Wh(a){a.dispatchEvent(new B("texttrackvisibility"))}m.Sa=function(a){if(!this.L){var b=new B("error",{detail:a});this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)}};m.Wd=function(a){this.w?this.w.s(a):this.ob.push(a)};m.fb=function(a){this.dispatchEvent(a)};
352
+ m.Xd=function(){if(this.f.error){var a=this.f.error.code;if(1!=a){var b=this.f.error.msExtendedCode;b&&(0>b&&(b+=Math.pow(2,32)),b=b.toString(16));this.Sa(new p(2,3,3016,a,b,this.f.error.message))}}};
353
+ m.Gd=function(a){var b=["output-restricted","internal-error"],c=S(this.a),d=!1,e=Object.keys(a),f=1==e.length&&"00"==e[0];e.length&&c.variants.forEach(function(c){var e=[];c.audio&&e.push(c.audio);c.video&&e.push(c.video);e.forEach(function(e){var g=c.allowedByKeySystem;e.keyId&&(e=a[f?"00":e.keyId],c.allowedByKeySystem=!!e&&0>b.indexOf(e));g!=c.allowedByKeySystem&&(d=!0)})});(e=Hc(cg(this.a),eg(this.a),c.variants))&&!e.allowedByKeySystem&&Qh(this,c);d&&Mh(this)};
354
+ m.Dd=function(a,b){if(this.i&&this.i.onExpirationUpdated)this.i.onExpirationUpdated(a,b);this.dispatchEvent(new B("expirationupdated"))};function W(a){if(!a||a.constructor!=V)throw new p(2,9,9008);this.g=null;this.a=a;this.b=ai(this);this.f=null;this.l=!1;this.c=this.s=this.h=this.i=null}n("shaka.offline.Storage",W);function bi(){return null!=window.indexedDB}W.support=bi;W.prototype.destroy=function(){var a=this.g,b=this.c?this.c.destroy()["catch"](function(){}).then(function(){if(a)return a.destroy()}):Promise.resolve();this.b=this.a=this.c=this.g=null;return b};W.prototype.destroy=W.prototype.destroy;
355
+ W.prototype.configure=function(a){Ma(this.b,a,ai(this),{},"")};W.prototype.configure=W.prototype.configure;
356
+ W.prototype.store=function(a,b,c){function d(a){f=a}if(this.l)return Promise.reject(new p(2,9,9006));this.l=!0;var e=b||{},f=null;return ci(this).then(function(){X(this);return di(this,a,d,c)}.bind(this)).then(function(b){X(this);if(f)throw f;return ei(this,a,b.manifest,e,b.ed)}.bind(this)).then(function(a){X(this);return fi(this).then(function(){return a})}.bind(this))["catch"](function(a){f=f||a;return fi(this).then(function(){throw f;})}.bind(this))};W.prototype.store=W.prototype.store;
357
+ function ei(a,b,c,d,e){if(c.presentationTimeline.P()||c.presentationTimeline.wa())throw new p(2,9,9005,b);a.h=c;a.f=e;a.j(c.periods);a.s=Zg(b,c,d);var f=gi(a,b,d);return Vg(a.c,f).then(function(a){return $g("offline:manifest/"+a,f)})}W.prototype.remove=function(a){return a.offlineUri?(qa("Removing downloaded content using shakaExtern.StoredContent is deprecated. Please remove using the offline uri."),hi(this,a.offlineUri)):hi(this,a)};W.prototype.remove=W.prototype.remove;
358
+ function hi(a,b){function c(a){6013!=a.code&&(e=a)}var d=Yg(b);if(null==d)return Promise.reject(new p(2,9,9004,b));var e=null,f,g;return ci(a).then(function(){X(this);return this.g.Fa(d)}.bind(a)).then(function(a){X(this);if(!a)throw new p(2,9,9003,b);f=a;a=mh(f);g=new zb({Ya:this.a.s,onError:c,Tb:function(){},onExpirationUpdated:function(){},onEvent:function(){}});g.configure(this.a.getConfiguration().drm);return g.init(a,this.b.usePersistentLicense||!1)}.bind(a)).then(function(){return Eb(g,f.sessionIds)}.bind(a)).then(function(){return g.destroy()}.bind(a)).then(function(){X(this);
359
+ if(e)throw e;return ii(this,b,d,f)}.bind(a))}function ii(a,b,c,d){function e(){k++;f(g,k/l)}var f=a.b.progressCallback,g=$g(b,d),h=ji(d),k=0,l=h.length+1;return Promise.resolve().then(function(){X(this);return Og(this.g,"segment-v3",h,e)}.bind(a)).then(function(){X(this);return Og(this.g,"manifest-v3",[c],e)}.bind(a))}W.prototype.list=function(){var a=[];return ci(this).then(function(){X(this);return Jg(this.g,function(b,c){var d=$g("offline:manifest/"+b,c);a.push(d)})}.bind(this)).then(function(){return a})};
360
+ W.prototype.list=W.prototype.list;
361
+ function di(a,b,c,d){function e(){}var f=a.a.s,g=a.a.getConfiguration(),h,k,l;return te(b,f,g.manifest.retryParameters,d).then(function(a){X(this);l=new a;l.configure(g.manifest);return l.start(b,{networkingEngine:f,filterAllPeriods:this.j.bind(this),filterNewPeriod:this.m.bind(this),onTimelineRegionAdded:function(){},onEvent:function(){},onError:c})}.bind(a)).then(function(a){X(this);h=a;k=new zb({Ya:f,onError:c,Tb:e,onExpirationUpdated:function(){},onEvent:function(){}});k.configure(g.drm);return k.init(h,
362
+ this.b.usePersistentLicense||!1)}.bind(a)).then(function(){X(this);return ki(h)}.bind(a)).then(function(){X(this);return Db(k)}.bind(a)).then(function(){X(this);return l.stop()}.bind(a)).then(function(){X(this);return{manifest:h,ed:k}}.bind(a))["catch"](function(a){if(l)return l.stop().then(function(){throw a;});throw a;})}
363
+ W.prototype.u=function(a){var b=[],c=oc(this.a.getConfiguration().preferredAudioLanguage),d=[0,mc,nc],e=a.filter(function(a){return"variant"==a.type});d=d.map(function(a){return e.filter(function(b){b=oc(b.language);return lc(a,c,b)})});for(var f,g=0;g<d.length;g++)if(d[g].length){f=d[g];break}f||(d=e.filter(function(a){return a.primary}),d.length&&(f=d));f||(f=e,e.map(function(a){return a.language}).filter(Sa));var h=f.filter(function(a){return a.height&&480>=a.height});h.length&&(h.sort(function(a,
364
+ b){return b.height-a.height}),f=h.filter(function(a){return a.height==h[0].height}));f.sort(function(a,b){return a.bandwidth-b.bandwidth});f.length&&b.push(f[Math.floor(f.length/2)]);b.push.apply(b,a.filter(function(a){return"text"==a.type}));return b};function ai(a){return{trackSelectionCallback:a.u.bind(a),progressCallback:function(a,c){if(a||c)return null},usePersistentLicense:!0}}
365
+ function ci(a){if(null==window.indexedDB)return Promise.reject(new p(2,9,9E3));if(a.g)return Promise.resolve();var b=a.a.s,c=a.a.getConfiguration().streaming.retryParameters;return ih().then(function(a){this.g=a;this.c=new Sg(a,b,c);Tg(this.c,function(a,b){var c=this.s;c.size=b;this.b.progressCallback(c,a)}.bind(this))}.bind(a))}W.prototype.j=function(a){a.forEach(this.m.bind(this))};
366
+ W.prototype.m=function(a){var b=null;if(this.i){var c=this.i.filter(function(a){return"variant"==a.type})[0];c&&(b=Ac(a,c))}var d=c=null;b&&(b.audio&&(c=b.audio),b.video&&(d=b.video));sc(this.f,c,d,a);rc(a,this.a.getConfiguration().restrictions,{width:Infinity,height:Infinity})};function fi(a){var b=a.f?a.f.destroy():Promise.resolve();a.f=null;a.h=null;a.l=!1;a.i=null;return b}
367
+ function ki(a){var b=a.periods.map(function(a){return a.variants}).reduce(Pa,[]).map(function(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}).reduce(Pa,[]).filter(Sa);a=a.periods.map(function(a){return a.textStreams}).reduce(Pa,[]);b.push.apply(b,a);return Promise.all(b.map(function(a){return a.createSegmentIndex()}))}
368
+ function gi(a,b,c){var d=a.h.periods.map(a.w.bind(a)),e=a.f.b,f=Hb(a.f);if(e&&a.b.usePersistentLicense){if(!f.length)throw new p(2,9,9007,b);e.initData=[]}return{originalManifestUri:b,duration:a.h.presentationTimeline.S(),size:0,expiration:a.f.ub(),periods:d,sessionIds:a.b.usePersistentLicense?f:[],drmInfo:e,appMetadata:c}}
369
+ W.prototype.w=function(a){var b=yc(a,null,null),c=zc(a,null);b=this.b.trackSelectionCallback(b.concat(c));null==this.i&&(this.i=b,this.j(this.h.periods));for(c=b.length-1;0<c;--c){for(var d=!1,e=c-1;0<=e;--e)if(b[c].type==b[e].type&&b[c].kind==b[e].kind&&b[c].language==b[e].language){d=!0;break}if(d)break}d=[];for(c=0;c<b.length;c++){var f=Ac(a,b[c]);f?(f.audio&&((e=d.filter(function(a){return a.id==f.audio.id})[0])?e.variantIds.push(f.id):(e=f.video?f.bandwidth/2:f.bandwidth,d.push(li(this,f.audio,
370
+ e,f.id)))),f.video&&((e=d.filter(function(a){return a.id==f.video.id})[0])?e.variantIds.push(f.id):(e=f.audio?f.bandwidth/2:f.bandwidth,d.push(li(this,f.video,e,f.id))))):d.push(li(this,Bc(a,b[c]),0))}return{startTime:a.startTime,streams:d}};
371
+ function li(a,b,c,d){var e={id:b.id,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset||0,contentType:b.type,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width||null,height:b.height||null,initSegmentKey:null,encrypted:b.encrypted,keyId:b.keyId,segments:[],variantIds:[]};null!=d&&e.variantIds.push(d);d=a.h.presentationTimeline.Ja();mi(b,d,function(a){var d=a.startTime,f=a.endTime;Ug(this.c,b.type,a,(f-d)*c/8,function(a){e.segments.push({startTime:d,
372
+ endTime:f,dataKey:a})})}.bind(a));(d=b.initSegmentReference)&&Ug(a.c,b.contentType,d,0,function(a){e.initSegmentKey=a});return e}function mi(a,b,c){b=a.findSegmentPosition(b);for(var d=null==b?null:a.getSegmentReference(b);d;)c(d),d=a.getSegmentReference(++b)}function X(a){if(!a.a)throw new p(2,9,9002);}
373
+ function ji(a){var b=[];a.periods.forEach(function(a){a.streams.forEach(function(a){null!=a.initSegmentKey&&b.push(a.initSegmentKey);a.segments.forEach(function(a){b.push(a.dataKey)})})});return b}W.deleteAll=function(){return kh()};Jh.offline=bi;n("shaka.polyfill.installAll",function(){for(var a=0;a<ni.length;++a)ni[a]()});var ni=[];function oi(a){ni.push(a)}n("shaka.polyfill.register",oi);function pi(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
374
+ oi(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
375
+ "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",pi);document.addEventListener("webkitfullscreenerror",pi);document.addEventListener("mozfullscreenchange",pi);document.addEventListener("mozfullscreenerror",pi);document.addEventListener("MSFullscreenChange",pi);document.addEventListener("MSFullscreenError",pi)}});oi(function(){var a=navigator.userAgent;a&&0<=a.indexOf("CrKey")&&delete window.indexedDB});var qi;function ri(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}qi.call(this,a,b,c)}oi(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==ri||(qi=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=ri)});oi(function(){if(4503599627370497!=Math.round(4503599627370497)){var a=Math.round;Math.round=function(b){var c=b;4503599627370496>=b&&(c=a(b));return c}}});function si(a){this.f=[];this.b=[];this.a=[];(new O).W("pssh",this.c.bind(this)).parse(a.buffer)}si.prototype.c=function(a){if(!(1<a.version)){var b=wb(a.o.Pa(16)),c=[];if(0<a.version)for(var d=a.o.C(),e=0;e<d;++e){var f=wb(a.o.Pa(16));c.push(f)}d=a.o.C();a.o.F(d);this.b.push.apply(this.b,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1})}};function ti(a,b){try{var c=new ui(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
376
+ function ui(a,b){this.keySystem=a;for(var c=!1,d=0;d<b.length;++d){var e=b[d],f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=0;h<e.audioCapabilities.length;++h){var k=e.audioCapabilities[h];if(k.contentType){g=!0;var l=k.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,l)&&(f.audioCapabilities.push(k),c=!0)}}if(e.videoCapabilities)for(h=
377
+ 0;h<e.videoCapabilities.length;++h)k=e.videoCapabilities[h],k.contentType&&(g=!0,l=k.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,l)&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}ui.prototype.createMediaKeys=function(){var a=new vi(this.keySystem);return Promise.resolve(a)};
378
+ ui.prototype.getConfiguration=function(){return this.a};function wi(a){var b=this.mediaKeys;b&&b!=a&&xi(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?xi(a,this):Promise.resolve()}function vi(a){this.a=new MSMediaKeys(a);this.b=new z}vi.prototype.createSession=function(a){var b=a||"temporary";if("temporary"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new yi(this.a,b)};vi.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
379
+ function xi(a,b){function c(){b.msSetMediaKeys(d.a);b.removeEventListener("loadedmetadata",c)}bb(a.b);if(!b)return Promise.resolve();A(a.b,b,"msneedkey",zi);var d=a;try{return 1<=b.readyState?b.msSetMediaKeys(a.a):b.addEventListener("loadedmetadata",c),Promise.resolve()}catch(e){return Promise.reject(e)}}function yi(a){H.call(this);this.c=null;this.g=a;this.b=this.a=null;this.f=new z;this.sessionId="";this.expiration=NaN;this.closed=new u;this.keyStatuses=new Ai}la(yi,H);m=yi.prototype;
380
+ m.generateRequest=function(a,b){this.a=new u;try{this.c=this.g.createSession("video/mp4",new Uint8Array(b),null),A(this.f,this.c,"mskeymessage",this.Md.bind(this)),A(this.f,this.c,"mskeyadded",this.Kd.bind(this)),A(this.f,this.c,"mskeyerror",this.Ld.bind(this)),Bi(this,"status-pending")}catch(c){this.a.reject(c)}return this.a};m.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};m.update=function(a){this.b=new u;try{this.c.update(new Uint8Array(a))}catch(b){this.b.reject(b)}return this.b};
381
+ m.close=function(){try{this.c.close(),this.closed.resolve(),bb(this.f)}catch(a){this.closed.reject(a)}return this.closed};m.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
382
+ function zi(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";var c=a.initData;if(c){var d=new si(c);if(1>=d.a.length)a=c;else{var e=[];for(a=0;a<d.a.length;a++)e.push(c.subarray(d.a[a].start,d.a[a].end+1));c=Xa(e,Ci);for(a=d=0;a<c.length;a++)d+=c[a].length;d=new Uint8Array(d);for(a=e=0;a<c.length;a++)d.set(c[a],e),e+=c[a].length;a=d}}else a=c;b.initData=a;this.dispatchEvent(b)}function Ci(a,b){return xb(a,b)}
383
+ m.Md=function(a){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new B("message",{messageType:void 0==this.keyStatuses.a?"licenserequest":"licenserenewal",message:a.message.buffer}))};m.Kd=function(){this.a?(Bi(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Bi(this,"usable"),this.b.resolve(),this.b=null)};
384
+ m.Ld=function(){var a=Error("EME PatchedMediaKeysMs key error");a.errorCode=this.c.error;if(null!=this.a)this.a.reject(a),this.a=null;else if(null!=this.b)this.b.reject(a),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Bi(this,"output-not-allowed");break;default:Bi(this,"internal-error")}};function Bi(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;a.dispatchEvent(new B("keystatuseschange"))}
385
+ function Ai(){this.size=0;this.a=void 0}var Di;m=Ai.prototype;m.forEach=function(a){this.a&&a(this.a,Di)};m.get=function(a){if(this.has(a))return this.a};m.has=function(a){var b=Di;return this.a&&xb(new Uint8Array(a),new Uint8Array(b))?!0:!1};m.entries=function(){};m.keys=function(){};m.values=function(){};function Ei(){return Promise.reject(Error("The key system specified is not supported."))}function Fi(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Gi(){throw new TypeError("Illegal constructor.");}Gi.prototype.createSession=function(){};Gi.prototype.setServerCertificate=function(){};function Hi(){throw new TypeError("Illegal constructor.");}Hi.prototype.getConfiguration=function(){};Hi.prototype.createMediaKeys=function(){};var Ii="";function Ji(a){Ii=a;Ki=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Li;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Mi;window.MediaKeys=Ni;window.MediaKeySystemAccess=Oi}function Pi(a){var b=Ii;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Li(a,b){try{var c=new Oi(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
386
+ function Mi(a){var b=this.mediaKeys;b&&b!=a&&Qi(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Qi(a,this);return Promise.resolve()}
387
+ function Oi(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=0;f<b.length;++f){var g=b[f],h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=0;l<g.audioCapabilities.length;++l){var q=
388
+ g.audioCapabilities[l];if(q.contentType){k=!0;var w=q.contentType.split(";")[0];e.canPlayType(w,this.a)&&(h.audioCapabilities.push(q),d=!0)}}if(g.videoCapabilities)for(l=0;l<g.videoCapabilities.length;++l)q=g.videoCapabilities[l],q.contentType&&(k=!0,e.canPlayType(q.contentType,this.a)&&(h.videoCapabilities.push(q),d=!0));k||(d=e.canPlayType("video/mp4",this.a)||e.canPlayType("video/webm",this.a));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
389
+ d=!1);if(d){this.b=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Oi.prototype.createMediaKeys=function(){var a=new Ni(this.a);return Promise.resolve(a)};Oi.prototype.getConfiguration=function(){return this.b};function Ni(a){this.g=a;this.b=null;this.a=new z;this.c=[];this.f={}}
390
+ function Qi(a,b){a.b=b;bb(a.a);var c=Ii;b&&(A(a.a,b,c+"needkey",a.ae.bind(a)),A(a.a,b,c+"keymessage",a.$d.bind(a)),A(a.a,b,c+"keyadded",a.Yd.bind(a)),A(a.a,b,c+"keyerror",a.Zd.bind(a)))}m=Ni.prototype;m.createSession=function(a){var b=a||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");a=this.b||document.createElement("video");a.src||(a.src="about:blank");b=new Ri(a,this.g,b);this.c.push(b);return b};
391
+ m.setServerCertificate=function(){return Promise.resolve(!1)};m.ae=function(a){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="webm";b.initData=a.initData;this.b.dispatchEvent(b)};m.$d=function(a){var b=Si(this,a.sessionId);b&&(a=new B("message",{messageType:void 0==b.keyStatuses.a?"licenserequest":"licenserenewal",message:a.message}),b.b&&(b.b.resolve(),b.b=null),b.dispatchEvent(a))};
392
+ m.Yd=function(a){if(a=Si(this,a.sessionId))Ti(a,"usable"),a.a&&a.a.resolve(),a.a=null};
393
+ m.Zd=function(a){var b=Si(this,a.sessionId);if(b){var c=Error("EME v0.1b key error");c.errorCode=a.errorCode;c.errorCode.systemCode=a.systemCode;!a.sessionId&&b.b?(c.method="generateRequest",45==a.systemCode&&(c.message="Unsupported session type."),b.b.reject(c),b.b=null):a.sessionId&&b.a?(c.method="update",b.a.reject(c),b.a=null):(c=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ti(b,"output-restricted"):1==c?Ti(b,"expired"):Ti(b,"internal-error"))}};
394
+ function Si(a,b){var c=a.f[b];return c?c:(c=a.c.shift())?(c.sessionId=b,a.f[b]=c):null}function Ri(a,b,c){H.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new u;this.keyStatuses=new Ui}la(Ri,H);
395
+ function Vi(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=new Uint8Array(pb("LOAD_SESSION|"+c));else{var e=pb("PERSISTENT|"),f=new Uint8Array(e.byteLength+b.byteLength);f.set(new Uint8Array(e),0);f.set(new Uint8Array(b),e.byteLength);d=f}else d=new Uint8Array(b)}catch(h){return Promise.reject(h)}a.b=new u;var g=Pi("generateKeyRequest");try{a.f[g](a.c,d)}catch(h){if("InvalidStateError"!=h.name)return a.b=null,Promise.reject(h);
396
+ setTimeout(function(){try{this.f[g](this.c,d)}catch(k){this.b.reject(k),this.b=null}}.bind(a),10)}return a.b}m=Ri.prototype;
397
+ m.dc=function(a,b){if(this.a)this.a.then(this.dc.bind(this,a,b))["catch"](this.dc.bind(this,a,b));else{this.a=a;if("webkit-org.w3.clearkey"==this.c){var c=D(b);var d=JSON.parse(c);"oct"!=d.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);c=ub(d.keys[0].k);d=ub(d.keys[0].kid)}else c=new Uint8Array(b),d=null;var e=Pi("addKey");try{this.f[e](this.c,c,d,this.sessionId)}catch(f){this.a.reject(f),this.a=null}}};
398
+ function Ti(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;a.dispatchEvent(new B("keystatuseschange"))}m.generateRequest=function(a,b){return Vi(this,b,null)};m.load=function(a){return"persistent-license"==this.g?Vi(this,null,a):Promise.reject(Error("Not a persistent session."))};m.update=function(a){var b=new u;this.dc(b,a);return b};
399
+ m.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Pi("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};m.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Ui(){this.size=0;this.a=void 0}var Ki;m=Ui.prototype;m.forEach=function(a){this.a&&a(this.a,Ki)};m.get=function(a){if(this.has(a))return this.a};
400
+ m.has=function(a){var b=Ki;return this.a&&xb(new Uint8Array(a),new Uint8Array(b))?!0:!1};m.entries=function(){};m.keys=function(){};m.values=function(){};oi(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?Ji("webkit"):HTMLMediaElement.prototype.generateKeyRequest?Ji(""):window.MSMediaKeys?(Di=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=wi,window.MediaKeys=vi,window.MediaKeySystemAccess=ui,navigator.requestMediaKeySystemAccess=
401
+ ti):(navigator.requestMediaKeySystemAccess=Ei,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Fi,window.MediaKeys=Gi,window.MediaKeySystemAccess=Hi))});function Wi(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,arguments);b.abort=function(){};return b}}function Xi(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
402
+ function Yi(){var a=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var b=0,c=0;c<this.sourceBuffers.length;++c){var f=this.sourceBuffers[c];f=f.buffered.end(f.buffered.length-1);b=Math.max(b,f)}if(!isNaN(this.duration)&&b<this.duration)for(this.qc=!0,c=0;c<this.sourceBuffers.length;++c)f=this.sourceBuffers[c],f.mc=!1;return a.apply(this,arguments)};var b=!1,c=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var a=c.apply(this,
403
+ arguments);a.mediaSource_=this;a.addEventListener("updateend",Zi,!1);b||(this.addEventListener("sourceclose",$i,!1),b=!0);return a}}function Zi(a){var b=a.target,c=b.mediaSource_;if(c.qc){a.preventDefault();a.stopPropagation();a.stopImmediatePropagation();b.mc=!0;for(a=0;a<c.sourceBuffers.length;++a)if(0==c.sourceBuffers[a].mc)return;c.qc=!1}}
404
+ function $i(a){a=a.target;for(var b=0;b<a.sourceBuffers.length;++b)a.sourceBuffers[b].removeEventListener("updateend",Zi,!1);a.removeEventListener("sourceclose",$i,!1)}function aj(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1]?!1:a(b)}}
405
+ function bj(){var a=MediaSource.isTypeSupported,b=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(c){for(var d=c.split(/ *; */),e=d[0],f={},g=1;g<d.length;++g){var h=d[g].split("="),k=h[0];h=h[1].replace(/"(.*)"/,"$1");f[k]=h}d=f.codecs;if(!d)return a(c);var l=!1,q=!1;c=d.split(",").filter(function(a){if(b.test(a))return q=!0,!1;/^(hev|hvc)1\.2/.test(a)&&(l=!0);return!0});q&&(l=!1);f.codecs=c.join(",");l&&(f.eotf="smpte2084");for(k in f)h=f[k],e+="; "+k+'="'+h+'"';return cast.__platform__.canDisplayType(e)}}
406
+ oi(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)bj();else if(navigator.vendor&&0<=navigator.vendor.indexOf("Apple")){var a=navigator.appVersion;aj();0<=a.indexOf("Version/8")?window.MediaSource=null:0<=a.indexOf("Version/9")?Wi():0<=a.indexOf("Version/10")?(Wi(),Yi()):0<=a.indexOf("Version/11")&&(Wi(),Xi())}});function Y(a){this.c=[];this.b=[];this.V=cj;if(a)try{a(this.ma.bind(this),this.a.bind(this))}catch(b){this.a(b)}}var cj=0;function dj(a){var b=new Y;b.ma(void 0);return b.then(function(){return a})}function ej(a){var b=new Y;b.a(a);return b}function fj(a){function b(a,b,c){a.V==cj&&(e[b]=c,d++,d==e.length&&a.ma(e))}var c=new Y;if(!a.length)return c.ma([]),c;for(var d=0,e=Array(a.length),f=c.a.bind(c),g=0;g<a.length;++g)a[g]&&a[g].then?a[g].then(b.bind(null,c,g),f):b(c,g,a[g]);return c}
407
+ function gj(a){for(var b=new Y,c=b.ma.bind(b),d=b.a.bind(b),e=0;e<a.length;++e)a[e]&&a[e].then?a[e].then(c,d):c(a[e]);return b}Y.prototype.then=function(a,b){var c=new Y;switch(this.V){case 1:hj(this,c,a);break;case 2:hj(this,c,b);break;case cj:this.c.push({N:c,Db:a}),this.b.push({N:c,Db:b})}return c};Y.prototype["catch"]=function(a){return this.then(void 0,a)};
408
+ Y.prototype.ma=function(a){if(this.V==cj){this.f=a;this.V=1;for(a=0;a<this.c.length;++a)hj(this,this.c[a].N,this.c[a].Db);this.c=[];this.b=[]}};Y.prototype.a=function(a){if(this.V==cj){this.f=a;this.V=2;for(a=0;a<this.b.length;++a)hj(this,this.b[a].N,this.b[a].Db);this.c=[];this.b=[]}};
409
+ function hj(a,b,c){ij.push(function(){if(c&&"function"==typeof c){try{var a=c(this.f)}catch(f){b.a(f);return}try{var e=a&&a.then}catch(f){b.a(f);return}a instanceof Y?a==b?b.a(new TypeError("Chaining cycle detected")):a.then(b.ma.bind(b),b.a.bind(b)):e?jj(a,e,b):b.ma(a)}else 1==this.V?b.ma(this.f):b.a(this.f)}.bind(a));null==kj&&(kj=lj(mj))}
410
+ function jj(a,b,c){try{var d=!1;b.call(a,function(a){if(!d){d=!0;try{var b=a&&a.then}catch(g){c.a(g);return}b?jj(a,b,c):c.ma(a)}},c.a.bind(c))}catch(e){c.a(e)}}function mj(){for(;ij.length;){null!=kj&&(nj(kj),kj=null);var a=ij;ij=[];for(var b=0;b<a.length;++b)a[b]()}}function lj(){return 0}function nj(){}var kj=null,ij=[];
411
+ oi(function(a){window.setImmediate?(lj=function(a){return window.setImmediate(a)},nj=function(a){window.clearImmediate(a)}):(lj=function(a){return window.setTimeout(a,0)},nj=function(a){window.clearTimeout(a)});if(!window.Promise||a)window.Promise=Y,window.Promise.resolve=dj,window.Promise.reject=ej,window.Promise.all=fj,window.Promise.race=gj,window.Promise.prototype.then=Y.prototype.then,window.Promise.prototype["catch"]=Y.prototype["catch"]});oi(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this,arguments);b&&b["catch"](function(){});return b}}});function oj(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}oi(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=oj)}});function pj(a,b,c){return new window.TextTrackCue(a,b,c)}function qj(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}oi(function(){if(!window.VTTCue&&window.TextTrackCue){var a=TextTrackCue.length;if(3==a)window.VTTCue=pj;else if(6==a)window.VTTCue=qj;else{try{var b=!!pj(1,2,"")}catch(c){b=!1}b&&(window.VTTCue=pj)}}});function rj(){}rj.prototype.parseInit=function(){};
412
+ rj.prototype.parseMedia=function(a,b){var c=D(a),d=[],e=new DOMParser,f=null;try{f=e.parseFromString(c,"text/xml")}catch(Vc){throw new p(2,2,2005);}if(f){var g=f.getElementsByTagName("tt")[0];if(g){e=g.getAttribute("ttp:frameRate");f=g.getAttribute("ttp:subFrameRate");var h=g.getAttribute("ttp:frameRateMultiplier");var k=g.getAttribute("ttp:tickRate");c=g.getAttribute("xml:space")||"default"}else throw new p(2,2,2005);if("default"!=c&&"preserve"!=c)throw new p(2,2,2005);c="default"==c;e=new sj(e,
413
+ f,h,k);f=tj(g.getElementsByTagName("styling")[0]);h=tj(g.getElementsByTagName("layout")[0]);g=tj(g.getElementsByTagName("body")[0]);for(k=0;k<g.length;k++){var l=g[k];var q=b.periodStart;var w=e,r=f,t=h,y=c;if(l.hasAttribute("begin")||l.hasAttribute("end")||!/^\s*$/.test(l.textContent)){uj(l,y);y=vj(l.getAttribute("begin"),w);var v=vj(l.getAttribute("end"),w);w=vj(l.getAttribute("dur"),w);var Xh=l.textContent;null==v&&null!=w&&(v=y+w);if(null==y||null==v)throw new p(2,2,2001);q=new T(y+q,v+q,Xh);
414
+ y=wj(l,"region",t);t=q;"rtl"==Z(l,y,r,"tts:direction")&&(t.writingDirection=1);v=Z(l,y,r,"tts:writingMode");"tb"==v||"tblr"==v?t.writingDirection=2:"tbrl"==v?t.writingDirection=3:"rltb"==v||"rl"==v?t.writingDirection=1:v&&(t.writingDirection=qh);if(v=Z(l,y,r,"tts:origin"))v=xj.exec(v),null!=v&&(t.region.x=Number(v[1]),t.region.y=Number(v[2]));if(v=Z(l,y,r,"tts:extent"))v=xj.exec(v),null!=v&&(t.region.width=Number(v[1]),t.region.height=Number(v[2]));if(v=Z(l,y,r,"tts:textAlign"))t.positionAlign=yj[v],
415
+ t.lineAlign=zj[v],t.textAlign=wh[v.toUpperCase()];if(v=Z(l,y,r,"tts:displayAlign"))t.displayAlign=xh[v.toUpperCase()];if(v=Z(l,y,r,"tts:color"))t.color=v;if(v=Z(l,y,r,"tts:backgroundColor"))t.backgroundColor=v;if(v=Z(l,y,r,"tts:fontFamily"))t.fontFamily=v;(v=Z(l,y,r,"tts:fontWeight"))&&"bold"==v&&(t.fontWeight=700);(v=Z(l,y,r,"tts:wrapOption"))&&"noWrap"==v&&(t.wrapLine=!1);(v=Z(l,y,r,"tts:lineHeight"))&&v.match(Aj)&&(t.lineHeight=v);(v=Z(l,y,r,"tts:fontSize"))&&v.match(Aj)&&(t.fontSize=v);if(v=Z(l,
416
+ y,r,"tts:fontStyle"))t.fontStyle=zh[v.toUpperCase()];(y=Bj(y,r,"tts:textDecoration"))&&Cj(t,y);(l=Dj(l,r,"tts:textDecoration"))&&Cj(t,l)}else q=null;q&&d.push(q)}}return d};
417
+ var Ej=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Fj=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gj=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hj=/^(\d*(?:\.\d*)?)f$/,Ij=/^(\d*(?:\.\d*)?)t$/,Jj=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,xj=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,Aj=/^(\d+px|\d+em)$/,zj={left:"start",center:sh,right:"end",start:"start",end:"end"},yj={left:"line-left",center:"center",right:"line-right"};
418
+ function tj(a){var b=[];if(!a)return b;for(var c=a.childNodes,d=0;d<c.length;d++){var e="span"==c[d].nodeName&&"p"==a.nodeName;c[d].nodeType!=Node.ELEMENT_NODE||"br"==c[d].nodeName||e||(e=tj(c[d]),b=b.concat(e))}b.length||b.push(a);return b}function uj(a,b){for(var c=a.childNodes,d=0;d<c.length;d++)if("br"==c[d].nodeName&&0<d)c[d-1].textContent+="\n";else if(0<c[d].childNodes.length)uj(c[d],b);else if(b){var e=c[d].textContent.trim();e=e.replace(/\s+/g," ");c[d].textContent=e}}
419
+ function Cj(a,b){for(var c=b.split(" "),d=0;d<c.length;d++)switch(c[d]){case "underline":0>a.textDecoration.indexOf("underline")&&a.textDecoration.push("underline");break;case "noUnderline":0<=a.textDecoration.indexOf("underline")&&Za(a.textDecoration,"underline");break;case "lineThrough":0>a.textDecoration.indexOf("lineThrough")&&a.textDecoration.push("lineThrough");break;case "noLineThrough":0<=a.textDecoration.indexOf("lineThrough")&&Za(a.textDecoration,"lineThrough");break;case "overline":0>a.textDecoration.indexOf("overline")&&
420
+ a.textDecoration.push("overline");break;case "noOverline":0<=a.textDecoration.indexOf("overline")&&Za(a.textDecoration,"overline")}}function Z(a,b,c,d){return(a=Dj(a,c,d))?a:Bj(b,c,d)}function Bj(a,b,c){for(var d=tj(a),e=0;e<d.length;e++){var f=d[e].getAttribute(c);if(f)return f}return(a=wj(a,"style",b))?a.getAttribute(c):null}function Dj(a,b,c){return(a=wj(a,"style",b))?a.getAttribute(c):null}
421
+ function wj(a,b,c){if(!a||1>c.length)return null;var d=null,e=a;for(a=null;e&&!(a=e.getAttribute(b))&&(e=e.parentNode,e instanceof Element););if(b=a)for(a=0;a<c.length;a++)if(c[a].getAttribute("xml:id")==b){d=c[a];break}return d}
422
+ function vj(a,b){var c=null;if(Ej.test(a)){c=Ej.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.b;f+=g/b.frameRate;c=f+60*e+3600*d}else Fj.test(a)?c=Kj(Fj,a):Gj.test(a)?c=Kj(Gj,a):Hj.test(a)?(c=Hj.exec(a),c=Number(c[1])/b.frameRate):Ij.test(a)?(c=Ij.exec(a),c=Number(c[1])/b.a):Jj.test(a)&&(c=Kj(Jj,a));return c}
423
+ function Kj(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}function sj(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=a[1]/a[2])}E["application/ttml+xml"]=rj;function Lj(){this.a=new rj}Lj.prototype.parseInit=function(a){var b=!1;(new O).B("moov",P).B("trak",P).B("mdia",P).B("minf",P).B("stbl",P).W("stsd",Qd).B("stpp",function(a){b=!0;a.la.stop()}).parse(a);if(!b)throw new p(2,2,2007);};Lj.prototype.parseMedia=function(a,b){var c=!1,d=[];(new O).B("mdat",Rd(function(a){c=!0;d=d.concat(this.a.parseMedia(a,b))}.bind(this))).parse(a);if(!c)throw new p(2,2,2007);return d};E['application/mp4; codecs="stpp"']=Lj;
424
+ E['application/mp4; codecs="stpp.TTML.im1t"']=Lj;function Mj(){}Mj.prototype.parseInit=function(){};
425
+ Mj.prototype.parseMedia=function(a,b){var c=D(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");c=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new p(2,2,2E3);var d=b.segmentStart;if(null==d&&(d=0,0<=c[0].indexOf("X-TIMESTAMP-MAP"))){var e=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=c[0].match(/MPEGTS:(\d+)/m);e&&f&&(d=Nj(new Se(e[1])),d=b.periodStart+(Number(f[1])/9E4-d))}f=[];for(e=1;e<c.length;e++){var g=c[e].split("\n"),h=d;if(1==g.length&&!g[0]||/^NOTE($|[ \t])/.test(g[0])||
426
+ "STYLE"==g[0])var k=null;else{k=null;0>g[0].indexOf("--\x3e")&&(k=g[0],g.splice(0,1));var l=new Se(g[0]),q=Nj(l),w=Te(l,/[ \t]+--\x3e[ \t]+/g),r=Nj(l);if(null==q||null==w||null==r)throw new p(2,2,2001);g=new T(q+h,r+h,g.slice(1).join("\n").trim());Te(l,/[ \t]+/gm);for(h=Ue(l);h;)Oj(g,h),Te(l,/[ \t]+/gm),h=Ue(l);null!=k&&(g.id=k);k=g}k&&f.push(k)}return f};
427
+ function Oj(a,b){var c;if(c=/^align:(start|middle|center|end|left|right)$/.exec(b))c=c[1],"middle"==c?a.textAlign=ph:a.textAlign=wh[c.toUpperCase()];else if(c=/^vertical:(lr|rl)$/.exec(b))a.writingDirection="lr"==c[1]?2:3;else if(c=/^size:([\d.]+)%$/.exec(b))a.size=Number(c[1]);else if(c=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(c[1]),c[2]&&(c=c[2],a.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==c?"line-right":"center");
428
+ else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=yh[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rh,a.line=Number(c[1]),c[2]&&(a.lineAlign=yh[c[2].toUpperCase()])}function Nj(a){a=Te(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}E["text/vtt"]=Mj;
429
+ E['text/vtt; codecs="vtt"']=Mj;function Pj(){this.a=null}Pj.prototype.parseInit=function(a){var b=!1;(new O).B("moov",P).B("trak",P).B("mdia",P).W("mdhd",function(a){0==a.version?(a.o.F(4),a.o.F(4),this.a=a.o.C(),a.o.F(4)):(a.o.F(8),a.o.F(8),this.a=a.o.C(),a.o.F(8));a.o.F(4)}.bind(this)).B("minf",P).B("stbl",P).W("stsd",Qd).B("wvtt",function(){b=!0}).parse(a);if(!this.a)throw new p(2,2,2008);if(!b)throw new p(2,2,2008);};
430
+ Pj.prototype.parseMedia=function(a,b){if(!this.a)throw new p(2,2,2008);var c=0,d=[],e=[],f=[],g=!1,h=!1,k=!1,l=null;(new O).B("moof",P).B("traf",P).W("tfdt",function(a){g=!0;c=0==a.version?a.o.C():a.o.Qa()}).W("tfhd",function(a){var b=a.flags;a=a.o;a.F(4);b&1&&a.F(8);b&2&&a.F(4);l=b&8?a.C():null}).W("trun",function(a){h=!0;var b=a.version,c=a.flags;a=a.o;var e=a.C();c&1&&a.F(4);c&4&&a.F(4);for(var f=[],g=0;g<e;g++){var k={duration:null,ec:null};c&256&&(k.duration=a.C());c&512&&a.F(4);c&1024&&a.F(4);
431
+ c&2048&&(k.ec=0==b?a.C():a.Gc());f.push(k)}d=f}).B("vtte",function(){e.push(null)}).B("vttc",Rd(function(a){e.push(a)})).B("mdat",function(a){k=!0;P(a)}).parse(a);if(!k&&!g&&!h)throw new p(2,2,2008);for(var q=c,w=0;w<d.length;w++){var r=d[w],t=e[w],y=r.duration||l;y&&(r=r.ec?c+r.ec:q,q=r+y,t&&f.push(Qj(t,b.periodStart+r/this.a,b.periodStart+q/this.a)))}return f.filter(Ra)};
432
+ function Qj(a,b,c){var d,e,f;(new O).B("payl",Rd(function(a){d=D(a)})).B("iden",Rd(function(a){e=D(a)})).B("sttg",Rd(function(a){f=D(a)})).parse(a);return d?Rj(d,e,f,b,c):null}function Rj(a,b,c,d,e){a=new T(d,e,a);b&&(a.id=b);if(c)for(b=new Se(c),c=Ue(b);c;)Oj(a,c),Te(b,/[ \t]+/gm),c=Ue(b);return a}E['application/mp4; codecs="wvtt"']=Pj;}.call(g,this));
433
+ if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
434
+ else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
435
+ else this.shaka=g.shaka;
436
+ })();
437
+
438
+ //# sourceMappingURL=shaka-player.compiled.map