shaka-player 3.1.4 → 3.1.7

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 (332) hide show
  1. package/.csslintrc +11 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  3. package/.github/workflows/build-and-test.yaml +130 -0
  4. package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
  5. package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
  6. package/.github/workflows/demo-version-index.yaml +29 -0
  7. package/.github/workflows/nightly-demo.yaml +42 -0
  8. package/.github/workflows/release-please.yaml +145 -0
  9. package/.github/workflows/safari-homedir-launcher.sh +18 -0
  10. package/.github/workflows/selenium-lab-tests.yaml +93 -0
  11. package/AUTHORS +2 -0
  12. package/CHANGELOG.md +1540 -1474
  13. package/CONTRIBUTING.md +2 -2
  14. package/CONTRIBUTORS +2 -0
  15. package/README.md +7 -7
  16. package/app-engine/README.md +9 -0
  17. package/app-engine/demo-version-index/README.md +14 -0
  18. package/app-engine/demo-version-index/app.yaml +2 -0
  19. package/app-engine/demo-version-index/main.py +162 -0
  20. package/app-engine/demo-version-index/requirements.txt +6 -0
  21. package/app-engine/demo-version-index/templates/index.html +114 -0
  22. package/app-engine/shaka-player-demo/README.md +18 -0
  23. package/app-engine/shaka-player-demo/app.yaml +61 -0
  24. package/app-engine/shaka-player-demo/main.py +95 -0
  25. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  26. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  27. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  28. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  29. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  30. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  31. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  32. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  33. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  34. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  35. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  36. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  37. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  38. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  39. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  40. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  41. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  42. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  43. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  44. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  45. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  46. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  47. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  48. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  49. package/app-engine/shaka-player-demo/posters/sources.txt +46 -0
  50. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  51. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  52. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  53. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  54. package/app-engine/shaka-player-demo/posters.py +110 -0
  55. package/app-engine/shaka-player-demo/requirements.txt +5 -0
  56. package/app-engine/shaka-player-demo/time.txt +1 -0
  57. package/build/README.md +1 -1
  58. package/build/checkversion.py +1 -1
  59. package/build/conformance.textproto +13 -0
  60. package/build/docker/Dockerfile +20 -0
  61. package/build/docker/docker-compose.yml +10 -0
  62. package/build/gendeps.py +18 -15
  63. package/build/shaka-lab.yaml +163 -0
  64. package/build/shakaBuildHelpers.py +4 -29
  65. package/build/test.py +93 -28
  66. package/build/wrapper.template.js +2 -2
  67. package/demo/TengwarTelcontar.woff2 +0 -0
  68. package/demo/asset_card.js +1 -2
  69. package/demo/cast_receiver/index.html +1 -1
  70. package/demo/cast_receiver/receiver_app.css +14 -14
  71. package/demo/common/assets.js +2 -0
  72. package/demo/config.js +0 -1
  73. package/demo/custom.js +0 -1
  74. package/demo/customWarning.txt +2 -2
  75. package/demo/demo.less +29 -18
  76. package/demo/demo_uncompiled.js +1 -13
  77. package/demo/index.html +1 -1
  78. package/demo/main.js +3 -3
  79. package/dist/controls.css +2 -2
  80. package/dist/controls.css.map +1 -1
  81. package/dist/demo.compiled.debug.js +191 -194
  82. package/dist/demo.compiled.debug.map +4 -4
  83. package/dist/demo.compiled.js +191 -194
  84. package/dist/demo.compiled.map +4 -4
  85. package/dist/demo.css +1 -1
  86. package/dist/demo.css.map +1 -1
  87. package/dist/deps.js +224 -218
  88. package/dist/locales.js +30 -30
  89. package/dist/receiver.compiled.debug.js +43 -45
  90. package/dist/receiver.compiled.debug.map +4 -4
  91. package/dist/receiver.compiled.js +43 -45
  92. package/dist/receiver.compiled.map +4 -4
  93. package/dist/shaka-player.compiled.d.ts +237 -222
  94. package/dist/shaka-player.compiled.debug.d.ts +237 -222
  95. package/dist/shaka-player.compiled.debug.externs.js +20 -3
  96. package/dist/shaka-player.compiled.debug.js +361 -365
  97. package/dist/shaka-player.compiled.debug.map +4 -4
  98. package/dist/shaka-player.compiled.externs.js +20 -3
  99. package/dist/shaka-player.compiled.js +811 -815
  100. package/dist/shaka-player.compiled.map +4 -4
  101. package/dist/shaka-player.ui.d.ts +281 -275
  102. package/dist/shaka-player.ui.debug.d.ts +281 -275
  103. package/dist/shaka-player.ui.debug.externs.js +34 -26
  104. package/dist/shaka-player.ui.debug.js +384 -389
  105. package/dist/shaka-player.ui.debug.map +4 -4
  106. package/dist/shaka-player.ui.externs.js +34 -26
  107. package/dist/shaka-player.ui.js +945 -950
  108. package/dist/shaka-player.ui.map +4 -4
  109. package/docs/design/REDESIGN.md +33 -33
  110. package/docs/design/codec_preferences.md +1 -1
  111. package/docs/design/dash-audio-channels.md +3 -3
  112. package/docs/design/dash-manifests.md +1 -1
  113. package/docs/design/gap-jumping.md +3 -3
  114. package/docs/design/preload.md +2 -2
  115. package/docs/tutorials/faq.md +8 -8
  116. package/docs/tutorials/index.json +1 -0
  117. package/docs/tutorials/plugins.md +3 -3
  118. package/docs/tutorials/selenium-grid-config.md +122 -0
  119. package/docs/tutorials/welcome.md +10 -2
  120. package/externs/shaka/text.js +10 -0
  121. package/karma.conf.js +156 -45
  122. package/lib/abr/simple_abr_manager.js +12 -6
  123. package/lib/ads/ad_manager.js +1 -0
  124. package/lib/cast/cast_proxy.js +6 -4
  125. package/lib/cast/cast_receiver.js +3 -0
  126. package/lib/cea/cea608_data_channel.js +3 -3
  127. package/lib/cea/cea608_memory.js +1 -1
  128. package/lib/cea/cea708_service.js +6 -5
  129. package/lib/cea/cea_decoder.js +1 -1
  130. package/lib/cea/i_caption_decoder.js +2 -3
  131. package/lib/cea/mp4_cea_parser.js +11 -5
  132. package/lib/cea/sei_processor.js +6 -3
  133. package/lib/dash/dash_parser.js +43 -31
  134. package/lib/dash/mpd_utils.js +4 -5
  135. package/lib/dash/segment_list.js +1 -2
  136. package/lib/dash/segment_template.js +3 -3
  137. package/lib/hls/hls_parser.js +11 -9
  138. package/lib/hls/manifest_text_parser.js +4 -3
  139. package/lib/media/adaptation_set.js +1 -2
  140. package/lib/media/closed_caption_parser.js +0 -1
  141. package/lib/media/content_workarounds.js +2 -2
  142. package/lib/media/drm_engine.js +3 -2
  143. package/lib/media/media_source_engine.js +3 -2
  144. package/lib/media/mp4_segment_index_parser.js +1 -4
  145. package/lib/media/playhead.js +2 -2
  146. package/lib/media/presentation_timeline.js +18 -8
  147. package/lib/media/region_observer.js +39 -33
  148. package/lib/media/region_timeline.js +17 -19
  149. package/lib/media/streaming_engine.js +12 -9
  150. package/lib/media/time_ranges_utils.js +1 -3
  151. package/lib/media/video_wrapper.js +1 -1
  152. package/lib/net/networking_engine.js +5 -1
  153. package/lib/offline/storage.js +14 -15
  154. package/lib/player.js +52 -22
  155. package/lib/polyfill/all.js +2 -3
  156. package/lib/polyfill/encryption_scheme.js +1 -1
  157. package/lib/polyfill/media_capabilities.js +32 -17
  158. package/lib/polyfill/mediasource.js +1 -1
  159. package/lib/routing/walker.js +2 -3
  160. package/lib/text/cue.js +7 -1
  161. package/lib/text/simple_text_displayer.js +2 -1
  162. package/lib/text/text_engine.js +1 -1
  163. package/lib/text/ttml_text_parser.js +92 -63
  164. package/lib/text/ui_text_displayer.js +18 -12
  165. package/lib/util/buffer_utils.js +1 -3
  166. package/lib/util/ebml_parser.js +3 -3
  167. package/lib/util/error.js +1 -1
  168. package/lib/util/fake_event_target.js +21 -1
  169. package/lib/util/iterables.js +0 -46
  170. package/lib/util/mp4_box_parsers.js +1 -4
  171. package/lib/util/mp4_parser.js +5 -7
  172. package/lib/util/periods.js +8 -9
  173. package/lib/util/platform.js +3 -3
  174. package/lib/util/pssh.js +1 -4
  175. package/lib/util/stream_utils.js +60 -8
  176. package/lib/util/string_utils.js +3 -5
  177. package/lib/util/uint8array_utils.js +3 -5
  178. package/lib/util/xml_utils.js +34 -7
  179. package/package.json +62 -40
  180. package/roadmap.md +17 -17
  181. package/test/abr/simple_abr_manager_unit.js +3 -8
  182. package/test/ads/ad_manager_unit.js +0 -6
  183. package/test/cast/cast_proxy_unit.js +0 -8
  184. package/test/cast/cast_receiver_integration.js +1 -18
  185. package/test/cast/cast_receiver_unit.js +1 -9
  186. package/test/cast/cast_sender_unit.js +0 -6
  187. package/test/cast/cast_utils_unit.js +0 -13
  188. package/test/cea/cea608_memory_unit.js +0 -5
  189. package/test/cea/cea708_service_unit.js +0 -7
  190. package/test/cea/cea708_window_unit.js +0 -5
  191. package/test/cea/cea_decoder_unit.js +0 -6
  192. package/test/cea/dtvcc_packet_builder_unit.js +0 -3
  193. package/test/cea/dtvcc_packet_unit.js +0 -5
  194. package/test/cea/mp4_cea_parser_unit.js +0 -4
  195. package/test/dash/dash_parser_content_protection_unit.js +1 -10
  196. package/test/dash/dash_parser_live_unit.js +45 -15
  197. package/test/dash/dash_parser_manifest_unit.js +37 -18
  198. package/test/dash/dash_parser_segment_base_unit.js +1 -8
  199. package/test/dash/dash_parser_segment_list_unit.js +1 -7
  200. package/test/dash/dash_parser_segment_template_unit.js +0 -9
  201. package/test/dash/mpd_utils_unit.js +3 -11
  202. package/test/demo/demo_unit.js +0 -5
  203. package/test/deprecate/enforcer_unit.js +0 -4
  204. package/test/deprecate/version_unit.js +0 -2
  205. package/test/hls/hls_live_unit.js +2 -14
  206. package/test/hls/hls_parser_unit.js +76 -15
  207. package/test/hls/manifest_text_parser_unit.js +0 -10
  208. package/test/media/adaptation_set_criteria_unit.js +3 -7
  209. package/test/media/adaptation_set_unit.js +0 -2
  210. package/test/media/buffering_observer_unit.js +1 -4
  211. package/test/media/closed_caption_parser_unit.js +0 -3
  212. package/test/media/drm_engine_integration.js +3 -17
  213. package/test/media/drm_engine_unit.js +7 -26
  214. package/test/media/manifest_parser_unit.js +0 -4
  215. package/test/media/media_source_engine_integration.js +0 -7
  216. package/test/media/media_source_engine_unit.js +1 -14
  217. package/test/media/mp4_segment_index_parser_unit.js +0 -4
  218. package/test/media/play_rate_controller_unit.js +0 -4
  219. package/test/media/playhead_unit.js +8 -16
  220. package/test/media/presentation_timeline_unit.js +4 -7
  221. package/test/media/region_observer_unit.js +40 -10
  222. package/test/media/region_timeline_unit.js +40 -25
  223. package/test/media/segment_index_unit.js +0 -6
  224. package/test/media/segment_reference_unit.js +0 -3
  225. package/test/media/stall_detector_unit.js +0 -5
  226. package/test/media/streaming_engine_integration.js +11 -37
  227. package/test/media/streaming_engine_unit.js +155 -34
  228. package/test/media/time_ranges_utils_unit.js +0 -2
  229. package/test/media/transmuxer_integration.js +0 -6
  230. package/test/media/webm_segment_index_parser_unit.js +0 -4
  231. package/test/net/data_uri_plugin_unit.js +0 -7
  232. package/test/net/http_plugin_unit.js +0 -9
  233. package/test/net/networking_engine_unit.js +0 -11
  234. package/test/offline/download_progress_estimator_unit.js +0 -2
  235. package/test/offline/indexeddb_storage_unit.js +0 -6
  236. package/test/offline/manifest_convert_unit.js +0 -8
  237. package/test/offline/offline_integration.js +1 -10
  238. package/test/offline/offline_manifest_parser_unit.js +0 -6
  239. package/test/offline/offline_scheme_unit.js +0 -8
  240. package/test/offline/offline_uri_unit.js +0 -2
  241. package/test/offline/storage_compatibility_unit.js +1 -14
  242. package/test/offline/storage_integration.js +1 -25
  243. package/test/player_external.js +2 -10
  244. package/test/player_integration.js +21 -28
  245. package/test/player_load_graph_integration.js +1 -6
  246. package/test/player_src_equals_external.js +3 -9
  247. package/test/player_src_equals_integration.js +0 -7
  248. package/test/player_unit.js +57 -42
  249. package/test/routing/walker_unit.js +0 -8
  250. package/test/test/assets/large_file.mpd +1 -1
  251. package/test/test/boot.js +75 -22
  252. package/test/test/externs/jasmine.js +2 -2
  253. package/test/test/externs/karma.js +4 -0
  254. package/test/test/namespace.js +10 -0
  255. package/test/test/util/canned_idb.js +0 -8
  256. package/test/test/util/cea_utils.js +0 -6
  257. package/test/test/util/dash_parser_util.js +0 -13
  258. package/test/test/util/fake_ad.js +0 -3
  259. package/test/test/util/fake_ad_manager.js +0 -9
  260. package/test/test/util/fake_demo_main.js +0 -5
  261. package/test/test/util/fake_drm_engine.js +0 -6
  262. package/test/test/util/fake_media_source_engine.js +0 -7
  263. package/test/test/util/fake_networking_engine.js +0 -5
  264. package/test/test/util/fake_text_displayer.js +0 -5
  265. package/test/test/util/indexeddb_utils.js +1 -10
  266. package/test/test/util/jasmine_fetch.js +0 -1
  267. package/test/test/util/loader.js +0 -18
  268. package/test/test/util/manifest_generator.js +9 -14
  269. package/test/test/util/manifest_parser_util.js +0 -6
  270. package/test/test/util/offline_utils.js +0 -5
  271. package/test/test/util/simple_fakes.js +9 -26
  272. package/test/test/util/stream_generator.js +0 -14
  273. package/test/test/util/streaming_engine_util.js +0 -15
  274. package/test/test/util/test_scheme.js +1 -19
  275. package/test/test/util/ttml_utils.js +79 -0
  276. package/test/test/util/ui_utils.js +0 -9
  277. package/test/test/util/util.js +15 -26
  278. package/test/test/util/waiter.js +84 -43
  279. package/test/text/cue_integration.js +0 -4
  280. package/test/text/lrc_text_parser_unit.js +0 -4
  281. package/test/text/mp4_ttml_parser_unit.js +10 -23
  282. package/test/text/mp4_vtt_parser_unit.js +1 -7
  283. package/test/text/sbv_text_parser_unit.js +0 -4
  284. package/test/text/simple_text_displayer_unit.js +1 -8
  285. package/test/text/srt_text_parser_unit.js +0 -4
  286. package/test/text/ssa_text_parser_unit.js +0 -5
  287. package/test/text/text_engine_unit.js +2 -7
  288. package/test/text/text_track_integration.js +0 -2
  289. package/test/text/ttml_text_parser_unit.js +495 -237
  290. package/test/text/ui_text_displayer_unit.js +44 -41
  291. package/test/text/vtt_text_parser_unit.js +0 -9
  292. package/test/text/web_vtt_generator_unit.js +0 -3
  293. package/test/ui/ad_ui_unit.js +0 -11
  294. package/test/ui/localization_unit.js +0 -3
  295. package/test/ui/text_displayer_layout_unit.js +9 -19
  296. package/test/ui/ui_customization_unit.js +0 -6
  297. package/test/ui/ui_integration.js +0 -16
  298. package/test/ui/ui_unit.js +1 -17
  299. package/test/util/abortable_operation_unit.js +4 -9
  300. package/test/util/array_utils_unit.js +0 -2
  301. package/test/util/buffer_utils_unit.js +0 -2
  302. package/test/util/data_view_reader_unit.js +0 -4
  303. package/test/util/ebml_parser_unit.js +0 -4
  304. package/test/util/event_manager_unit.js +0 -3
  305. package/test/util/fake_event_target_unit.js +0 -5
  306. package/test/util/functional_unit.js +1 -1
  307. package/test/util/iterables_unit.js +0 -64
  308. package/test/util/language_utils_unit.js +0 -3
  309. package/test/util/manifest_parser_utils_unit.js +0 -2
  310. package/test/util/mp4_box_parsers_unit.js +0 -5
  311. package/test/util/mp4_parser_unit.js +0 -4
  312. package/test/util/multi_map_unit.js +0 -3
  313. package/test/util/object_utils_unit.js +0 -2
  314. package/test/util/periods_unit.js +14 -7
  315. package/test/util/pssh_unit.js +0 -5
  316. package/test/util/state_history_unit.js +0 -2
  317. package/test/util/stream_utils_unit.js +38 -37
  318. package/test/util/string_utils_unit.js +0 -6
  319. package/test/util/text_parser_unit.js +0 -2
  320. package/test/util/xml_utils_unit.js +0 -4
  321. package/ui/controls.js +3 -0
  322. package/ui/less/ad_controls.less +4 -4
  323. package/ui/less/buttons.less +5 -9
  324. package/ui/less/containers.less +5 -7
  325. package/ui/less/overflow_menu.less +4 -4
  326. package/ui/less/range_elements.less +5 -0
  327. package/ui/locales/sjn-translations.yaml +257 -0
  328. package/ui/locales/sjn.json +42 -0
  329. package/ui/localization.js +12 -36
  330. package/ui/text_selection.js +1 -0
  331. package/externs/media_capabilities.js +0 -16
  332. package/externs/svgelement.js +0 -18
@@ -9,868 +9,864 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
- function fa(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ha=fa(this);function ia(a,b){if(b)a:{for(var c=ha,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ca(c,d,{configurable:!0,writable:!0,value:f})}}
14
- ia("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
- ia("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ha[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ja(aa(this))}})}return a});function ja(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ka(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
17
- if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
18
- function ra(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ug=b.prototype}function sa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ta(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}sa.prototype.u=function(a){this.h=a};
19
- function ua(a,b){a.i={Zd:b,de:!0};a.g=a.m||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function v(a,b,c){a.g=c;return{value:b}}sa.prototype.v=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a){a.m=0;a.j=2}function wa(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.Zd;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.de?a.g=a.m||a.j:void 0!=c.v&&a.j<c.v?(a.g=c.v,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new sa;this.h=a}function Aa(a,b){ta(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Da(a)}
21
- function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}
22
- function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.de)throw b.Zd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ea(a){this.next=function(b){ta(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Da(a));return b};this["throw"]=function(b){ta(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.u):(ua(a.g,b),b=Da(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a,b){var c=new Ea(new za(b));qa&&a.prototype&&qa(c,a.prototype);return c}
24
- function Ga(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Ga(new Ea(new za(a)))}
25
- ia("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ha.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
- g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.I),reject:g(this.l)}};b.prototype.I=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.H(g):this.m(g)}};
27
- b.prototype.H=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.T(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.L();this.C()};b.prototype.L=function(){var g=this;e(function(){if(g.F()){var h=ha.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
- function(){if(this.s)return!1;var g=ha.CustomEvent,h=ha.Event,k=ha.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ha.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.O=function(g){var h=this.j();g.vc(h.resolve,h.reject)};b.prototype.T=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(x){m(x)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.vc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.vc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).vc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(x){p[u]=x;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).vc(n(p.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- ia("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
- Ha(k,g)&&Ha(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ia("Map",function(a){function b(){var h={};return h.Ua=h.next=h.head=h}function c(h,k){var l=h.g;return ja(function(){if(l){for(;l.head!=h.g;)l=l.Ua;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ia:p}}return{id:l,
36
- list:m,index:-1,ia:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ia?l.ia.value=k:(l.ia={next:this.g,Ua:this.g.Ua,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Ua.next=l.ia,this.g.Ua=l.ia,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Ua.next=h.ia.next,h.ia.next.Ua=h.ia.Ua,
38
- h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ua=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
12
+ var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
+ function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function fa(a,b){if(b)a:{for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
+ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
+ function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
+ if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.gg=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
+ function sa(a,b){a.i={Pd:b,Vd:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.Pd;a.i=null;return b}function va(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Vd?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
+ function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
+ function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Vd)throw b.Pd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ca(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
+ function Da(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Da(new Ca(new ya(a)))}function Ea(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
+ fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
27
+ b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
28
+ function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
+ b.prototype.I=function(g){var h=this.j();g.oc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.oc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.oc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).oc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).oc(n(p.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Fa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Fa(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Fa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Fa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Fa(k,g)&&Fa(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Fa(k,g)&&Fa(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ fa("Map",function(a){function b(){var h={};return h.Ra=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Ra;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Fa(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
36
+ list:m,index:-1,fa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Ra:this.g.Ra,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Ra.next=l.fa,this.g.Ra=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Ra.next=h.fa.next,h.fa.next.Ra=h.fa.Ra,
38
+ h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ra=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
- ia("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
+ fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});ia("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ia("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
43
- function Ja(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ia("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ja(this,b,"includes").indexOf(b,c||0)}});
44
- function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ga:e,xe:f}}return{ga:-1,xe:void 0}}ia("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).ga}});function La(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}
45
- ia("Array.prototype.values",function(a){return a?a:function(){return La(this,function(b,c){return c})}});ia("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).xe}});ia("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ja(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});ia("Array.prototype.keys",function(a){return a?a:function(){return La(this,function(b){return b})}});
46
- var Ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};ia("Object.assign",function(a){return a||Ma});
47
- ia("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
48
- ia("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ia("Array.prototype.entries",function(a){return a?a:function(){return La(this,function(b,c){return[b,c]})}});
49
- ia("String.prototype.repeat",function(a){return a?a:function(b){var c=Ja(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ia("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ia("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
50
- ia("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Na=this||self;function M(a,b){var c=a.split("."),d=Na;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
43
+ function Ga(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ga(this,b,"includes").indexOf(b,c||0)}});
44
+ function Ha(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Td:e,me:f}}return{Td:-1,me:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ha(this,b,c).Td}});function Ia(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}
45
+ fa("Array.prototype.values",function(a){return a?a:function(){return Ia(this,function(b,c){return c})}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ha(this,b,c).me}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ga(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});fa("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
46
+ var La="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Fa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||La});
47
+ fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
48
+ fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ia(this,function(b,c){return[b,c]})}});
49
+ fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ga(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
50
+ fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Fa(b,d)&&c.push([d,b[d]]);return c}});var Ma=this||self;function N(a,b){var c=a.split("."),d=Ma;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
51
51
  @license
52
52
  Shaka Player
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function Oa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function Pa(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function Sa(a){return a.g/(1-Math.pow(a.i,a.h))};function Ta(){this.h=new Oa(2);this.i=new Oa(5);this.g=0}Ta.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Sa(this.h),Sa(this.i))};function Ua(){}function Va(){}function Wa(){}function Xa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Wa.apply(Ua,ka(c)))}function $a(){}function ab(){}function bb(){}function db(){}var Za=new Set;
57
- if(window.console&&window.console.log.bind){var eb={},fb=(eb[1]=console.error.bind(console),eb[2]=console.warn.bind(console),eb[3]=console.info.bind(console),eb[4]=console.log.bind(console),eb[5]=console.debug.bind(console),eb[6]=console.debug.bind(console),eb);Wa=fb[2];Va=fb[1]};function gb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
58
- var jb=function ib(a){var c;return Fa(ib,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?v(d,c,3):d.v(0);c++;return d.v(2)})},mb=function kb(a){var c,d,e,f,g,h;return Fa(kb,function(k){1==k.g&&(c=-1,e=d=void 0,f=t(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.v(0):v(k,{ga:c,vf:d,item:e,next:void 0},0);h=g.value;return 0<=c?v(k,{ga:c,item:e,vf:d,next:h},5):k.v(5)}c++;d=e;e=h;g=f.next();return k.v(2)})};function nb(){}function ob(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(pb(a)==pb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=qb(a),d=qb(b),e=t(jb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function pb(a){return a instanceof ArrayBuffer?a:a.buffer}function rb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
59
- function qb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,Uint8Array)}function tb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,DataView)}function sb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(pb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",nb);nb.toDataView=tb;nb.toUint8=qb;nb.toArrayBuffer=rb;nb.equal=ob;function N(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
60
- N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
56
+ function Na(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}Na.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function Oa(a){return a.g/(1-Math.pow(a.i,a.h))};function Pa(){this.h=new Na(2);this.i=new Na(5);this.g=0}Pa.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};Pa.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Oa(this.h),Oa(this.i))};function Qa(){}function Ra(){}function Sa(){}function Ua(a){var b=Ea.apply(1,arguments);Va.has(a)||(Va.add(a),Sa.apply(Qa,ia(b)))}function Wa(){}function Xa(){}function Za(){}function $a(){}var Va=new Set;if(window.console&&window.console.log.bind){var ab={},bb=(ab[1]=console.error.bind(console),ab[2]=console.warn.bind(console),ab[3]=console.info.bind(console),ab[4]=console.log.bind(console),ab[5]=console.debug.bind(console),ab[6]=console.debug.bind(console),ab);Sa=bb[2];Ra=bb[1]};function cb(){}function db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(eb(a)==eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=gb(a),d=gb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function eb(a){return a instanceof ArrayBuffer?a:a.buffer}function hb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
57
+ function gb(a,b,c){c=void 0===c?Infinity:c;return ib(a,void 0===b?0:b,c,Uint8Array)}function jb(a,b,c){c=void 0===c?Infinity:c;return ib(a,void 0===b?0:b,c,DataView)}function ib(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(eb(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",cb);cb.toDataView=jb;cb.toUint8=gb;cb.toArrayBuffer=hb;cb.equal=db;function O(a,b,c){var d=Ea.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
58
+ O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
61
59
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,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,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,
62
60
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,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,RESTRICTIONS_CANNOT_BE_MET:4012,
63
61
  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_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,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
64
62
  HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,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,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
65
63
  ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,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,
66
- INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function ub(a){this.h=a;this.g=void 0}ub.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function vb(){}function wb(a){if(!a)return"";a=qb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Va('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
67
- function xb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=tb(a);d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return yb.value()(c)}
68
- function zb(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=qb(a);if(239==c[0]&&187==c[1]&&191==c[2])return wb(c);if(254==c[0]&&255==c[1])return xb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return xb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return xb(a,!1);if(0==c[1]&&0==c[3])return xb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return wb(a);throw new N(2,2,2003);}function Ab(a){var b=new TextEncoder;return rb(b.encode(a))}
69
- function Bb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=t(mb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ga,f.item.charCodeAt(0),b);return c}M("shaka.util.StringUtils",vb);vb.resetFromCharCode=function(){yb.g=void 0};vb.toUTF16=Bb;vb.toUTF8=Ab;vb.fromBytesAutoDetect=zb;vb.fromUTF16=xb;vb.fromUTF8=wb;
70
- var yb=new ub(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Wa:65536};0<b.Wa;b={Wa:b.Wa},b.Wa/=2)if(a(b.Wa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wa));return e}}(b);return null});function Cb(a,b){this.R=tb(a);this.h=b==Db;this.g=0}q=Cb.prototype;q.oa=function(){return this.g<this.R.byteLength};q.$=function(){return this.g};q.Te=function(){return this.R.byteLength};q.aa=function(){try{var a=this.R.getUint8(this.g);this.g+=1;return a}catch(b){throw Eb();}};q.Gb=function(){try{var a=this.R.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Eb();}};q.N=function(){try{var a=this.R.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Eb();}};
71
- q.ke=function(){try{var a=this.R.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Eb();}};q.Hb=function(){try{if(this.h){var a=this.R.getUint32(this.g,!0);var b=this.R.getUint32(this.g+4,!0)}else b=this.R.getUint32(this.g,!1),a=this.R.getUint32(this.g+4,!1)}catch(c){throw Eb();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.bb=function(a){if(this.g+a>this.R.byteLength)throw Eb();var b=qb(this.R,this.g,a);this.g+=a;return b};
72
- q.skip=function(a){if(this.g+a>this.R.byteLength)throw Eb();this.g+=a};q.me=function(a){if(this.g<a)throw Eb();this.g-=a};q.seek=function(a){if(0>a||a>this.R.byteLength)throw Eb();this.g=a};q.bc=function(){for(var a=this.g;this.oa()&&0!=this.R.getUint8(this.g);)this.g+=1;a=qb(this.R,a,this.g-a);this.g+=1;return wb(a)};function Eb(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",Cb);Cb.prototype.readTerminatedString=Cb.prototype.bc;Cb.prototype.seek=Cb.prototype.seek;Cb.prototype.rewind=Cb.prototype.me;
73
- Cb.prototype.skip=Cb.prototype.skip;Cb.prototype.readBytes=Cb.prototype.bb;Cb.prototype.readUint64=Cb.prototype.Hb;Cb.prototype.readInt32=Cb.prototype.ke;Cb.prototype.readUint32=Cb.prototype.N;Cb.prototype.readUint16=Cb.prototype.Gb;Cb.prototype.readUint8=Cb.prototype.aa;Cb.prototype.getLength=Cb.prototype.Te;Cb.prototype.getPosition=Cb.prototype.$;Cb.prototype.hasMoreData=Cb.prototype.oa;var Db=1;Cb.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Db};function Fb(a,b){this.g=a;this.h=b}Fb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Gb(a,b){var c=new Fb(4,0),d=Hb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ib(a,b,c,d){Wa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Jb(a,b,c,d){Va([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Hb=null;function Kb(a,b){return a.concat(b)}function Lb(){}function Mb(a){return null!=a}function Nb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Gb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Gb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Ob(){this.i=[];this.h=[];this.g=!1}q=Ob.prototype;q.box=function(a,b){var c=Pb(a);this.i[c]=Qb;this.h[c]=b;return this};q.U=function(a,b){var c=Pb(a);this.i[c]=Rb;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Cb(a,0);for(this.g=!1;a.oa()&&!this.g;)this.Kc(0,a,b,c)};
74
- q.Kc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.R.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.R.byteLength-e;break;case 1:if(d&&b.$()+8>b.R.byteLength){this.g=!0;return}f=b.Hb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Rb){if(d&&b.$()+4>b.R.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.R.byteLength&&(g=b.R.byteLength);d&&g>b.R.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.bb(d):new Uint8Array(0),b=new Cb(b,0),k({parser:this,partialOkay:c||
75
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.R.byteLength-b.$()))}};function Sb(a){for(var b=Tb(a);a.reader.oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay)}function Ub(a){var b=Tb(a),c=a.reader.N();c=t(jb(c));for(var d=c.next();!d.done&&(a.parser.Kc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Vb(a){return function(b){a(b.reader.bb(b.reader.R.byteLength-b.reader.$()))}}
76
- function Pb(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Wb(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Tb(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Ob);Ob.headerSize=Tb;Ob.typeToString=Wb;Ob.allData=Vb;Ob.sampleDescription=Ub;Ob.children=Sb;Ob.prototype.parseNext=Ob.prototype.Kc;Ob.prototype.parse=Ob.prototype.parse;Ob.prototype.stop=Ob.prototype.stop;
77
- Ob.prototype.fullBox=Ob.prototype.U;Ob.prototype.box=Ob.prototype.box;var Qb=0,Rb=1;function Xb(a){this.h=a;this.g=null}Xb.prototype.V=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Xb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.fc=function(){this.stop();this.h();return this};P.prototype.V=function(a){var b=this;this.stop();this.g=(new Xb(function(){b.h()})).V(a);return this};P.prototype.Da=function(a){var b=this;this.stop();this.g=(new Xb(function(){b.g.V(a);b.h()})).V(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.Da;P.prototype.tickAfter=P.prototype.V;
78
- P.prototype.tickNow=P.prototype.fc;function Yb(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Zb(a){return""!=$b().canPlayType(a)}function ac(){return bc("Xbox One")}function cc(){return bc("Tizen")}function dc(){return bc("CrKey")}function ec(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!cc()}function fc(){if(!ec())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}
79
- function bc(a){return(navigator.userAgent||"").includes(a)}function $b(){if(gc)return gc;hc||(hc=new P(function(){gc=null}));(gc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(gc=document.createElement("video"));hc.V(1);return gc}var hc=null,gc=null;function ic(){}function jc(a){a=qb(a);a=yb.value()(a);return btoa(a)}function kc(a,b){b=void 0==b?!0:b;var c=jc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function lc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=t(mb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ga]=c.item.charCodeAt(0);return a}
80
- function mc(a){var b=a.length/2,c=new Uint8Array(b);b=t(jb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function nc(a){var b=qb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
81
- function oc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=t(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(qb(c),e),e+=c.byteLength;return d}M("shaka.util.Uint8ArrayUtils",ic);ic.concat=oc;ic.toHex=nc;ic.fromHex=mc;ic.fromBase64=lc;ic.toBase64=kc;ic.toStandardBase64=jc;
82
- ic.equal=function(a,b){Gb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return ob(a,b)};function pc(a){function b(){d=!0}function c(l){f.push(l);Sb(l)}a=qb(a);var d=!1,e,f=[],g=[];(new Ob).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Ub(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,Zb:1701733238})}).U("avc3",function(l){g.push({box:l,Zb:1701733238})}).U("ac-3",function(l){g.push({box:l,Zb:1701733217})}).U("ec-3",function(l){g.push({box:l,Zb:1701733217})}).U("mp4a",function(l){g.push({box:l,Zb:1701733217})}).parse(a);
83
- if(d)return a;if(0==g.length||!e)throw db(nc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=qc(a,e,k.box,f,k.Zb);return a}
84
- function qc(a,b,c,d,e){var f=rc.value(),g=a.subarray(c.start,c.start+c.size),h=tb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=tb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);sc(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=ac()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,sc(e,d.start,d.size+k.byteLength);k=tb(e,b.start);b=Tb(b);a=k.getUint32(b);
85
- k.setUint32(b,a+1);return e}function sc(a,b,c){a=tb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var rc=new ub(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function tc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function uc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function vc(a,b,c){c||(c=tc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Uc:d.Uc},e=a.next()){d.Uc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Uc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
86
- function wc(a,b,c){c||(c=tc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function xc(a,b,c){this.startTime=a;this.direction=yc;this.endTime=b;this.payload=c;this.region=new zc;this.position=null;this.positionAlign=Ac;this.size=0;this.textAlign=Bc;this.writingMode=Cc;this.lineInterpretation=Dc;this.line=null;this.lineHeight="";this.lineAlign=Ec;this.displayAlign=Fc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Gc;this.fontStyle=Hc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
87
- [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=!1;this.cellResolution={columns:32,rows:15}}xc.prototype.clone=function(){var a=new xc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
88
- function Ic(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!wc(a.nestedCues,b.nestedCues,Ic))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!wc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",xc);var Ac="auto";
89
- xc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ac};var Bc="center",Jc={LEFT:"left",RIGHT:"right",CENTER:Bc,START:"start",END:"end"};xc.textAlign=Jc;var Fc="after",Kc={BEFORE:"before",CENTER:"center",AFTER:Fc};xc.displayAlign=Kc;var yc="ltr";xc.direction={HORIZONTAL_LEFT_TO_RIGHT:yc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Cc="horizontal-tb";xc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Cc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Dc=0;
90
- xc.lineInterpretation={LINE_NUMBER:Dc,PERCENTAGE:1};var Ec="start",Lc={CENTER:"center",START:Ec,END:"end"};xc.lineAlign=Lc;var Mc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};xc.defaultTextColor=Mc;var Nc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};xc.defaultTextBackgroundColor=Nc;var Gc=400;xc.fontWeight={NORMAL:Gc,BOLD:700};
91
- var Hc="normal",Oc={NORMAL:Hc,ITALIC:"italic",OBLIQUE:"oblique"};xc.fontStyle=Oc;xc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function zc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Pc;this.scroll=Qc}M("shaka.text.CueRegion",zc);var Pc=1;zc.units={PX:0,PERCENTAGE:Pc,LINES:2};var Qc="";zc.scrollMode={NONE:Qc,UP:"up"};function Rc(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Sc(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){r=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){u=x;break}if(-1===
92
- r||-1===u)p=Tc(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(x=p[r]){var w=x.l,y=x.i,C=x.j,D=x.h;if(w!=h||y!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Sc(d,e,w,y,C,D),h=w,k=y,l=C,m=D;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Tc(d,e),a.nestedCues.push(n));n=Sc(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
93
- function Sc(a,b,c,d,e,f){a=new xc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Tc(a,b){var c=new xc(a,b,"");c.lineBreak=!0;return c}function Uc(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Vc(){this.l=!1;this.F=this.I=0;this.H=Wc;this.i=[];this.g=this.h=this.j=0;this.C=this.s=!1;this.u="white";this.m="black";Xc(this)}function Xc(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Yc())}function Yc(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Zc(a,b){$c(a)&&(a.i[a.h][a.g]=new Uc(b,a.C,a.s,a.m,a.u),a.g++)}function $c(a){var b=a.g<a.F&&0<=a.g;return a.h<a.I&&0<=a.h&&b}Vc.prototype.isVisible=function(){return this.l};
94
- function ad(a,b,c){var d=new xc(a.j,b,"");d.textAlign=a.H===bd?"left":a.H===cd?"right":Bc;if(c=Rc(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var bd=0,cd=1,Wc=2;function dd(){this.i=[];this.h=null;this.g=0}function ed(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new fd(a.h)),a.h=null,a.g=0))}function fd(a){this.g=0;this.h=a}fd.prototype.oa=function(){return this.g<this.h.length};fd.prototype.$=function(){return this.g};function gd(a){if(!a.oa())throw new N(2,2,3E3);return a.h[a.g++]}fd.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function hd(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
95
- function id(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=gd(b).value;b=null;c=t(jd(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ad(e,d,a.i)),Xc(e);return b}if(137===c)for(b=gd(b).value,b=t(jd(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=gd(b).value;b=null;c=t(jd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ad(e,d,a.i)),e.l=!1;return b}if(139===c){c=gd(b).value;
96
- b=null;c=t(jd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ad(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=gd(b).value,kd(a,b,d);if(143===c)return d=kd(a,255,d),ld(a),d;if(144===c)b.skip(1),d=gd(b).value,a.g&&(a.g.s=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=gd(b).value,c=gd(b).value,b.skip(1),a.g&&(b=md((c&48)>>4,(c&12)>>2,c&3),a.g.u=md((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=gd(b).value,b=gd(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
97
- b.skip(1),d=gd(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Vc;f.j=d;a.h[c]=f}d=gd(b).value;gd(b);gd(b);f=gd(b).value;var g=gd(b).value;b=gd(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.I=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}
98
- var jd=function nd(a,b){var d,e;return Fa(nd,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?v(f,d,5):f.v(5):f.v(0);b>>=1;d++;return f.v(2)})};function kd(a,b,c){var d=null;b=t(jd(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ad(f,c,a.i));a.h[e]=null}return d}function ld(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function md(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return od[a<<2|b<<1|c]}
99
- var pd=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),od="black blue green cyan red magenta yellow white".split(" ");function qd(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";rd(this)}function sd(a,b,c){return Rc(new xc(b,c,""),"CC"+(a.C<<1|a.u+1),a.i,b,c)}function rd(a){td(a,0,15);a.g=1}function ud(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case vd:d=wd.has(c)?wd.get(c):String.fromCharCode(c);break;case xd:d=yd.get(c);break;case zd:a.i[a.g].pop();d=Ad.get(c);break;case Bd:a.i[a.g].pop(),d=Cd.get(c)}d&&a.i[a.g].push(new Uc(d,a.m,a.j,a.s,a.l))}}
100
- function Dd(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function td(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
101
- var vd=0,xd=1,zd=2,Bd=3,wd=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),yd=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Ad=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
102
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Cd=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
103
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Ed(a,b){this.h=Fd;this.s=new qd(a,b);this.i=new qd(a,b);this.l=new qd(a,b);this.g=this.i;this.j=0;this.m=null}function Gd(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Hd&&a.h!==Id&&(e=sd(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,td(c,0,15),c=a.l,c.g=0<c.h?c.h:0,td(c,0,15),d.g=15);a.h=Hd;d.h=b;return e}function Jd(a){a.h=Kd;a.g=a.l;a.g.h=0}function Ld(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Id}
104
- var Fd=0,Kd=1,Hd=3,Id=4,Md="black green blue cyan red yellow magenta black".split(" "),Nd="white green blue cyan red yellow magenta white_italics".split(" ");function Od(){this.h=[];this.g=[];this.i=new dd;this.l=0;this.u=new Map([["CC1",new Ed(0,0)],["CC2",new Ed(0,1)],["CC3",new Ed(1,0)],["CC4",new Ed(1,1)]]);this.s=this.m=0;this.j=new Map;Pd(this)}function Pd(a){a.m=0;a.s=0;a=t(a.u.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,rd(b.i),rd(b.l),rd(b.s)}
105
- function Qd(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Rd(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())ed(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Sd(a,e.value),c.push.apply(c,ka(e));a.i.i=[];a.h=[];a.g=[];return c}
106
- function Rd(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Ba&&255===b.Ra||!b.Ba&&!b.Ra||!Td(b.Ba)||!Td(b.Ra))return 45<=++a.l&&Pd(a),null;a.l=0;b.Ba&=127;b.Ra&=127;if(!b.Ba&&!b.Ra)return null;d=null;if(16===(b.Ba&112))a:{var e=b.Ba;d=b.Ra;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Nd[f]:7===f&&(h=!0);
107
- d=1===(d&1);if(c.h!==Id){f=c.g;if(c.h===Hd&&e!==f.g){var k=1+e-f.h;Dd(f,k,1+f.g-f.h,f.h);td(f,0,k-1);td(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.s="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ud(c.g,vd,32),g=!1,e=Nd[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Md[(d&14)>>1]),c.g.s=g;else if(17===(e&247)&&48===(d&240))ud(c.g,xd,d);else if(18===
108
- (e&246)&&32===(d&224))ud(c.g,e&1?Bd:zd,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ra){case 32:Jd(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Gd(c,2,d);break;case 38:e=Gd(c,3,d);break;case 39:e=Gd(c,4,d);break;case 40:ud(c.g,vd,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:rd(c.s);Ld(c);break;case 43:Ld(c);break;case 44:e=c.i;g=null;c.h!==Id&&(g=sd(e,c.j,d));td(e,0,15);e=g;break;case 45:e=c.g;c.h!==Hd?e=null:(g=sd(e,c.j,d),h=e.g-e.h+1,Dd(e,h-1,h,e.h),td(e,
109
- 0,h-1),td(e,e.g,15-e.g),c.j=d,e=g);break;case 46:td(c.l,0,15);break;case 47:e=null,c.h!==Id&&(e=sd(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Jd(c),c.j=d}d=e;break a}d=null}else e=b.Ra,ud(c.g,vd,b.Ba),ud(c.g,vd,e);return d}
110
- function Sd(a,b){var c=[];try{for(;b.oa();){var d=gd(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=gd(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new hd(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=gd(e),l=k.value,m=k.pts;if(16===l){var n=gd(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!$c(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=ad(r,p,g.i));if(r.h+1>=r.I){p=r;for(var u=0,x=1;15>x;x++,
111
- u++)p.i[u]=p.i[x];for(x=0;1>x;x++,u++)p.i[u]=Yc()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=ad(r,p,g.i));r.i[r.h]=Yc();r.g=0;break;case 12:r.isVisible()&&(e=ad(r,p,g.i)),Xc(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=id(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Zc(g.g,"\u266a"):Zc(g.g,
112
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Zc(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(pd.has(e)){var y=pd.get(e);Zc(g.g,y)}else Zc(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Zc(g.g,"_"):Zc(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Td(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ud(){}var Wd=function Vd(a,b){var d,e,f,g;return Fa(Vd,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ka(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.v(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.v(4):v(h,d.subarray(e,e+g),4)}e+=g;return h.v(2)})};function Xd(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,Xd:c,Le:d}}function Yd(a,b){return{fd:1==b?a.Hb():a.N()}}function Zd(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
113
- function $d(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=t(jb(d)),g=f.next();!g.done;g=f.next())g={Gd:null,sampleSize:null,Mc:null},c&256&&(g.Gd=a.N()),c&512&&(g.sampleSize=a.N()),c&1024&&a.skip(4),c&2048&&(g.Mc=0==b?a.N():a.ke()),e.push(g);return{tg:d,ne:e}};function ae(){this.j=new Ud;this.i=new Map;this.h=this.g=0}
114
- ae.prototype.init=function(a){var b=this,c=[],d=[];(new Ob).box("moov",Sb).box("mvex",Sb).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",Sb).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",Sb).U("mdhd",function(e){e=Zd(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
115
- ae.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ob).box("moof",Sb).box("traf",Sb).U("trun",function(k){f=$d(k.reader,k.version,k.flags).ne}).U("tfhd",function(k){k=Xd(k.reader,k.flags);d=k.Xd||b.g;e=k.Le||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Yd(k.reader,k.version).fd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,u=0,x=p;for(r.length&&(x=r[0].sampleSize||p);k.oa();){var w=k.N();if(6==
116
- (k.aa()&31)){var y=0;r.length>u&&(y=r[u].Mc||0);y=(l+y)/m;for(var C=t(Wd(b.j,k.bb(w-1))),D=C.next();!D.done;D=C.next())c.push({tf:D.value,pts:y})}else k.skip(w-1);x-=w+4;0==x&&(l=r.length>u?l+(r[u].Gd||n):l+n,u++,x=r.length>u?r[u].sampleSize||p:p)}}).parse(a,!1);return c};function be(){this.h=new ae;this.g=new Od}be.prototype.init=function(a){this.h.init(a)};
117
- function ce(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=qb(e.tf);if(0<f.length&&(d=a.g,e=e.pts,f=new Cb(f,0),181===f.aa()&&49===f.Gb()&&1195456820===f.N()&&3===f.aa())){var g=f.aa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.aa(),l=(k&4)>>2,m=f.aa(),n=f.aa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ba:m,Ra:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Qd(a.g)}
118
- ;function de(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ee(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function fe(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(ge(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
119
- function he(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ge(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ge(a){if(!a)return[];for(var b=[],c=t(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};/*
64
+ INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function kb(a){this.h=a;this.g=void 0}kb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function lb(){}function mb(a){if(!a)return"";a=gb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function nb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=jb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ob.value()(d)}
65
+ function pb(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=gb(a);if(239==c[0]&&187==c[1]&&191==c[2])return mb(c);if(254==c[0]&&255==c[1])return nb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return nb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return nb(a,!1);if(0==c[1]&&0==c[3])return nb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return mb(a);throw new O(2,2,2003);}function qb(a){var b=new TextEncoder;return hb(b.encode(a))}
66
+ function rb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",lb);lb.resetFromCharCode=function(){ob.g=void 0};lb.toUTF16=rb;lb.toUTF8=qb;lb.fromBytesAutoDetect=pb;lb.fromUTF16=nb;lb.fromUTF8=mb;
67
+ var ob=new kb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ta:65536};0<b.Ta;b={Ta:b.Ta},b.Ta/=2)if(a(b.Ta))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ta)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ta));return e}}(b);return null});function sb(a,b){this.N=jb(a);this.h=b==tb;this.g=0}r=sb.prototype;r.na=function(){return this.g<this.N.byteLength};r.W=function(){return this.g};r.Ie=function(){return this.N.byteLength};r.X=function(){try{var a=this.N.getUint8(this.g);this.g+=1;return a}catch(b){throw ub();}};r.Bb=function(){try{var a=this.N.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ub();}};r.L=function(){try{var a=this.N.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ub();}};
68
+ r.$d=function(){try{var a=this.N.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ub();}};r.Cb=function(){try{if(this.h){var a=this.N.getUint32(this.g,!0);var b=this.N.getUint32(this.g+4,!0)}else b=this.N.getUint32(this.g,!1),a=this.N.getUint32(this.g+4,!1)}catch(c){throw ub();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Wa=function(a){if(this.g+a>this.N.byteLength)throw ub();var b=gb(this.N,this.g,a);this.g+=a;return b};
69
+ r.skip=function(a){if(this.g+a>this.N.byteLength)throw ub();this.g+=a};r.be=function(a){if(this.g<a)throw ub();this.g-=a};r.seek=function(a){if(0>a||a>this.N.byteLength)throw ub();this.g=a};r.Wb=function(){for(var a=this.g;this.na()&&0!=this.N.getUint8(this.g);)this.g+=1;a=gb(this.N,a,this.g-a);this.g+=1;return mb(a)};function ub(){return new O(2,3,3E3)}N("shaka.util.DataViewReader",sb);sb.prototype.readTerminatedString=sb.prototype.Wb;sb.prototype.seek=sb.prototype.seek;sb.prototype.rewind=sb.prototype.be;
70
+ sb.prototype.skip=sb.prototype.skip;sb.prototype.readBytes=sb.prototype.Wa;sb.prototype.readUint64=sb.prototype.Cb;sb.prototype.readInt32=sb.prototype.$d;sb.prototype.readUint32=sb.prototype.L;sb.prototype.readUint16=sb.prototype.Bb;sb.prototype.readUint8=sb.prototype.X;sb.prototype.getLength=sb.prototype.Ie;sb.prototype.getPosition=sb.prototype.W;sb.prototype.hasMoreData=sb.prototype.na;var tb=1;sb.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:tb};function vb(){this.i=[];this.h=[];this.g=!1}r=vb.prototype;r.box=function(a,b){var c=wb(a);this.i[c]=xb;this.h[c]=b;return this};r.P=function(a,b){var c=wb(a);this.i[c]=yb;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new sb(a,0);for(this.g=!1;a.na()&&!this.g;)this.Dc(0,a,b,c)};
71
+ r.Dc=function(a,b,c,d){var e=b.W();if(d&&e+8>b.N.byteLength)this.g=!0;else{var f=b.L(),g=b.L(),h=!1;switch(f){case 0:f=b.N.byteLength-e;break;case 1:if(d&&b.W()+8>b.N.byteLength){this.g=!0;return}f=b.Cb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==yb){if(d&&b.W()+4>b.N.byteLength){this.g=!0;return}m=b.L();l=m>>>24;m&=16777215}g=e+f;c&&g>b.N.byteLength&&(g=b.N.byteLength);d&&g>b.N.byteLength?this.g=!0:(d=g-b.W(),b=0<d?b.Wa(d):new Uint8Array(0),b=new sb(b,0),k({parser:this,partialOkay:c||
72
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.W(),b.N.byteLength-b.W()))}};function zb(a){for(var b=Ab(a);a.reader.na()&&!a.parser.g;)a.parser.Dc(a.start+b,a.reader,a.partialOkay)}function Bb(a){for(var b=Ab(a),c=a.reader.L(),d=0;d<c&&(a.parser.Dc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Cb(a){return function(b){a(b.reader.Wa(b.reader.N.byteLength-b.reader.W()))}}
73
+ function wb(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Db(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ab(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",vb);vb.headerSize=Ab;vb.typeToString=Db;vb.allData=Cb;vb.sampleDescription=Bb;vb.children=zb;vb.prototype.parseNext=vb.prototype.Dc;vb.prototype.parse=vb.prototype.parse;vb.prototype.stop=vb.prototype.stop;
74
+ vb.prototype.fullBox=vb.prototype.P;vb.prototype.box=vb.prototype.box;var xb=0,yb=1;function Eb(a){this.h=a;this.g=null}Eb.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Eb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.$b=function(){this.stop();this.h();return this};P.prototype.R=function(a){var b=this;this.stop();this.g=(new Eb(function(){b.h()})).R(a);return this};P.prototype.ya=function(a){var b=this;this.stop();this.g=(new Eb(function(){b.g.R(a);b.h()})).R(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.ya;P.prototype.tickAfter=P.prototype.R;
75
+ P.prototype.tickNow=P.prototype.$b;function Fb(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Gb(a){return""!=Hb().canPlayType(a)}function Ib(){return Jb("Xbox One")}function Kb(){return Jb("Tizen")}function Lb(){return Jb("CrKey")}function Mb(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Kb()}function Nb(){if(!Mb())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}
76
+ function Jb(a){return(navigator.userAgent||"").includes(a)}function Hb(){if(Ob)return Ob;Pb||(Pb=new P(function(){Ob=null}));(Ob=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ob=document.createElement("video"));Pb.R(1);return Ob}var Pb=null,Ob=null;function Qb(a,b){this.g=a;this.h=b}Qb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Rb(a,b){var c=new Qb(4,0),d=Sb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Tb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ub(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Sb=null;function Vb(){}function Wb(a){a=gb(a);a=ob.value()(a);return btoa(a)}function Xb(a,b){b=void 0==b?!0:b;var c=Wb(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Yb(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}function Zb(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
77
+ function $b(a){var b=gb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function ac(){for(var a=Ea.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(gb(d),c),c+=d.byteLength;return b}N("shaka.util.Uint8ArrayUtils",Vb);Vb.concat=ac;Vb.toHex=$b;Vb.fromHex=Zb;Vb.fromBase64=Yb;Vb.toBase64=Xb;Vb.toStandardBase64=Wb;
78
+ Vb.equal=function(a,b){Rb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return db(a,b)};function bc(a){function b(){d=!0}function c(l){f.push(l);zb(l)}a=gb(a);var d=!1,e,f=[],g=[];(new vb).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);Bb(l)}).P("encv",b).P("enca",b).P("avc1",function(l){g.push({box:l,Vb:1701733238})}).P("avc3",function(l){g.push({box:l,Vb:1701733238})}).P("ac-3",function(l){g.push({box:l,Vb:1701733217})}).P("ec-3",function(l){g.push({box:l,Vb:1701733217})}).P("mp4a",function(l){g.push({box:l,Vb:1701733217})}).parse(a);
79
+ if(d)return a;if(0==g.length||!e)throw $a($b(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=dc(a,e,k.box,f,k.Vb);return a}
80
+ function dc(a,b,c,d,e){var f=ec.value(),g=a.subarray(c.start,c.start+c.size),h=jb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=jb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);fc(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ib()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,fc(e,d.start,d.size+k.byteLength);k=jb(e,b.start);b=Ab(b);a=k.getUint32(b);
81
+ k.setUint32(b,a+1);return e}function fc(a,b,c){a=jb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ec=new kb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function gc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function hc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function ic(a,b,c){c||(c=gc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Mc:d.Mc},e=a.next()){d.Mc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Mc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
82
+ function jc(a,b,c){c||(c=gc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function kc(a,b,c){this.startTime=a;this.direction=lc;this.endTime=b;this.payload=c;this.region=new mc;this.position=null;this.positionAlign=nc;this.size=0;this.textAlign=oc;this.writingMode=pc;this.lineInterpretation=qc;this.line=null;this.lineHeight="";this.lineAlign=rc;this.displayAlign=sc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=tc;this.fontStyle=uc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
83
+ [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}kc.prototype.clone=function(){var a=new kc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
84
+ function vc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!jc(a.nestedCues,b.nestedCues,vc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!jc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",kc);var nc="auto";
85
+ kc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nc};var oc="center",wc={LEFT:"left",RIGHT:"right",CENTER:oc,START:"start",END:"end"};kc.textAlign=wc;var sc="after",xc={BEFORE:"before",CENTER:"center",AFTER:sc};kc.displayAlign=xc;var lc="ltr";kc.direction={HORIZONTAL_LEFT_TO_RIGHT:lc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var pc="horizontal-tb";kc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:pc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var qc=0;
86
+ kc.lineInterpretation={LINE_NUMBER:qc,PERCENTAGE:1};var rc="start",yc={CENTER:"center",START:rc,END:"end"};kc.lineAlign=yc;var zc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};kc.defaultTextColor=zc;var Ac={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};kc.defaultTextBackgroundColor=Ac;var tc=400;kc.fontWeight={NORMAL:tc,BOLD:700};
87
+ var uc="normal",Bc={NORMAL:uc,ITALIC:"italic",OBLIQUE:"oblique"};kc.fontStyle=Bc;kc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function mc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Cc;this.scroll=Ec}N("shaka.text.CueRegion",mc);var Cc=1;mc.units={PX:0,PERCENTAGE:Cc,LINES:2};var Ec="";mc.scrollMode={NONE:Ec,UP:"up"};function Fc(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Gc(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){q=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
88
+ q||-1===v)p=Hc(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(x=p[q]){var w=x.l,y=x.i,D=x.j,B=x.h;if(w!=h||y!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Gc(d,e,w,y,D,B),h=w,k=y,l=D,m=B;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Hc(d,e),a.nestedCues.push(n));n=Gc(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
89
+ function Gc(a,b,c,d,e,f){a=new kc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Hc(a,b){var c=new kc(a,b,"");c.lineBreak=!0;return c}function Ic(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Jc(a,b){return a.concat(b)}function Kc(){}function Lc(a){return null!=a}function Mc(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Rb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Rb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Nc(){this.l=!1;this.B=this.F=0;this.C=Oc;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Pc(this)}function Pc(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Qc())}function Qc(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Rc(a,b){Sc(a)&&(a.i[a.h][a.g]=new Ic(b,a.u,a.o,a.m,a.s),a.g++)}function Sc(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Nc.prototype.isVisible=function(){return this.l};
90
+ function Tc(a,b,c){var d=new kc(a.j,b,"");d.textAlign=a.C===Uc?"left":a.C===Vc?"right":oc;if(c=Fc(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Uc=0,Vc=1,Oc=2;function Wc(){this.i=[];this.h=null;this.g=0}function Xc(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Yc(a.h)),a.h=null,a.g=0))}function Yc(a){this.g=0;this.h=a}Yc.prototype.na=function(){return this.g<this.h.length};Yc.prototype.W=function(){return this.g};function Zc(a){if(!a.na())throw new O(2,2,3E3);return a.h[a.g++]}Yc.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function $c(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
91
+ function ad(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Zc(b).value;b=null;c=t(bd(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Tc(e,d,a.i)),Pc(e);return b}if(137===c)for(b=Zc(b).value,b=t(bd(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Zc(b).value;b=null;c=t(bd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Tc(e,d,a.i)),e.l=!1;return b}if(139===c){c=Zc(b).value;
92
+ b=null;c=t(bd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Tc(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Zc(b).value,cd(a,b,d);if(143===c)return d=cd(a,255,d),dd(a),d;if(144===c)b.skip(1),d=Zc(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Zc(b).value,c=Zc(b).value,b.skip(1),a.g&&(b=ed((c&48)>>4,(c&12)>>2,c&3),a.g.s=ed((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Zc(b).value,b=Zc(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
93
+ b.skip(1),d=Zc(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nc;f.j=d;a.h[c]=f}d=Zc(b).value;Zc(b);Zc(b);f=Zc(b).value;var g=Zc(b).value;b=Zc(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.B=(g&63)+1;a.g=a.h[c]}}}return null}function bd(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
94
+ function cd(a,b,c){var d=null;b=t(bd(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Tc(f,c,a.i));a.h[e]=null}return d}function dd(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ed(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return fd[a<<2|b<<1|c]}
95
+ var gd=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),fd="black blue green cyan red magenta yellow white".split(" ");function hd(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";id(this)}function jd(a,b,c){return Fc(new kc(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function id(a){kd(a,0,15);a.g=1}function ld(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case md:d=nd.has(c)?nd.get(c):String.fromCharCode(c);break;case od:d=pd.get(c);break;case qd:a.i[a.g].pop();d=rd.get(c);break;case sd:a.i[a.g].pop(),d=td.get(c)}d&&a.i[a.g].push(new Ic(d,a.m,a.j,a.o,a.l))}}
96
+ function ud(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function kd(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
97
+ var md=0,od=1,qd=2,sd=3,nd=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),pd=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),rd=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
98
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),td=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
99
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function vd(a,b){this.h=wd;this.o=new hd(a,b);this.i=new hd(a,b);this.l=new hd(a,b);this.g=this.i;this.j=0;this.m=null}function xd(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==yd&&a.h!==zd&&(e=jd(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,kd(c,0,15),c=a.l,c.g=0<c.h?c.h:0,kd(c,0,15),d.g=15);a.h=yd;d.h=b;return e}function Ad(a){a.h=Bd;a.g=a.l;a.g.h=0}function Cd(a){Ua("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=zd}
100
+ var wd=0,Bd=1,yd=3,zd=4,Dd="black green blue cyan red yellow magenta black".split(" "),Ed="white green blue cyan red yellow magenta white_italics".split(" ");function Fd(){this.h=[];this.g=[];this.i=new Wc;this.l=0;this.s=new Map([["CC1",new vd(0,0)],["CC2",new vd(0,1)],["CC3",new vd(1,0)],["CC4",new vd(1,1)]]);this.o=this.m=0;this.j=new Map;Gd(this)}function Gd(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,id(b.i),id(b.l),id(b.o)}
101
+ function Hd(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Id(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Xc(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Jd(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
102
+ function Id(a,b){var c=b.type;if(16===(b.wa&112)){var d=b.wa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.wa&&255===b.Oa||!b.wa&&!b.Oa||!Kd(b.wa)||!Kd(b.Oa))return 45<=++a.l&&Gd(a),null;a.l=0;b.wa&=127;b.Oa&=127;if(!b.wa&&!b.Oa)return null;d=null;if(16===(b.wa&112))a:{var e=b.wa;d=b.Oa;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Ed[f]:7===f&&(h=!0);
103
+ d=1===(d&1);if(c.h!==zd){f=c.g;if(c.h===yd&&e!==f.g){var k=1+e-f.h;ud(f,k,1+f.g-f.h,f.h);kd(f,0,k-1);kd(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ld(c.g,md,32),g=!1,e=Ed[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Dd[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))ld(c.g,od,d);else if(18===
104
+ (e&246)&&32===(d&224))ld(c.g,e&1?sd:qd,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Oa){case 32:Ad(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=xd(c,2,d);break;case 38:e=xd(c,3,d);break;case 39:e=xd(c,4,d);break;case 40:ld(c.g,md,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:id(c.o);Cd(c);break;case 43:Cd(c);break;case 44:e=c.i;g=null;c.h!==zd&&(g=jd(e,c.j,d));kd(e,0,15);e=g;break;case 45:e=c.g;c.h!==yd?e=null:(g=jd(e,c.j,d),h=e.g-e.h+1,ud(e,h-1,h,e.h),kd(e,
105
+ 0,h-1),kd(e,e.g,15-e.g),c.j=d,e=g);break;case 46:kd(c.l,0,15);break;case 47:e=null,c.h!==zd&&(e=jd(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ad(c),c.j=d}d=e;break a}d=null}else e=b.Oa,ld(c.g,md,b.wa),ld(c.g,md,e);return d}
106
+ function Jd(a,b){var c=[];try{for(;b.na();){var d=Zc(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Zc(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new $c(e));for(var g=a.j.get(e),h=b.W();b.W()-h<f;){e=b;var k=Zc(e),l=k.value,m=k.pts;if(16===l){var n=Zc(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Sc(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Tc(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,x=1;15>x;x++,
107
+ v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=Qc()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Tc(q,p,g.i));q.i[q.h]=Qc();q.g=0;break;case 12:q.isVisible()&&(e=Tc(q,p,g.i)),Pc(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=ad(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Rc(g.g,"\u266a"):Rc(g.g,
108
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Rc(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(gd.has(e)){var y=gd.get(e);Rc(g.g,y)}else Rc(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Rc(g.g,"_"):Rc(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Kd(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ld(a,b){var c=null,d=null,e=a.L();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:e,Nd:c,Ae:d}}function Md(a,b){return{Wc:1==b?a.Cb():a.L()}}function Nd(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.L()}}
109
+ function Od(a,b,c){var d=a.L(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={vd:null,sampleSize:null,Fc:null};c&256&&(g.vd=a.L());c&512&&(g.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(g.Fc=0==b?a.L():a.$d());e.push(g)}return{fg:d,ce:e}};function Pd(){this.i=new Map;this.h=this.g=0}
110
+ Pd.prototype.init=function(a){var b=this,c=[],d=[];(new vb).box("moov",zb).box("mvex",zb).P("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.L();f=f.L();b.g=e;b.h=f}).box("trak",zb).P("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.L();c.push(e)}).box("mdia",zb).P("mdhd",function(e){e=Nd(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
111
+ Pd.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new vb).box("moof",zb).box("traf",zb).P("trun",function(k){f=Od(k.reader,k.version,k.flags).ce}).P("tfhd",function(k){k=Ld(k.reader,k.flags);d=k.Nd||b.g;e=k.Ae||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).P("tfdt",function(k){g=Md(k.reader,k.version).Wc}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,x=p;for(q.length&&(x=q[0].sampleSize||p);k.na();){var w=k.L();if(6==
112
+ (k.X()&31)){var y=0;q.length>v&&(y=q[v].Fc||0);y=(l+y)/m;for(var D=[],B,A=k.Wa(w-1),E=B=0;E<A.length;)2==B&&3==A[E]?(B=0,A=[].concat(ia(A)),A.splice(E,1),A=new Uint8Array(A)):0==A[E]?B++:B=0,E++;B=A;for(E=0;E<B.length;){for(A=0;255==B[E];)A+=255,E++;A+=B[E++];for(var G=0;255==B[E];)G+=255,E++;G+=B[E++];4==A&&D.push(B.subarray(E,E+G));E+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({ff:B.value,pts:y})}else try{k.skip(w-1)}catch(H){break}x-=w+4;0==x&&(l=q.length>v?l+(q[v].vd||n):l+n,v++,x=q.length>
113
+ v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Qd(){this.h=new Pd;this.g=new Fd}Qd.prototype.init=function(a){this.h.init(a)};
114
+ function Rd(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=gb(e.ff);if(0<f.length&&(d=a.g,e=e.pts,f=new sb(f,0),181===f.X()&&49===f.Bb()&&1195456820===f.L()&&3===f.X())){var g=f.X();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.X(),l=(k&4)>>2,m=f.X(),n=f.X();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,wa:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Hd(a.g)}
115
+ ;function Sd(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Td(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Ud(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Vd(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
116
+ function Wd(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Vd(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Vd(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};/*
120
117
  @license
121
118
  Copyright 2008 The Closure Library Authors
122
119
  SPDX-License-Identifier: Apache-2.0
123
120
  */
124
- var ie=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
121
+ var Xd=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
125
122
  @license
126
123
  Copyright 2006 The Closure Library Authors
127
124
  SPDX-License-Identifier: Apache-2.0
128
125
  */
129
- function je(a){var b;a instanceof je?(ke(this,a.Ga),this.qb=a.qb,this.Ia=a.Ia,le(this,a.Fb),this.ya=a.ya,me(this,a.g.clone()),this.hb=a.hb):a&&(b=String(a).match(ie))?(ke(this,b[1]||"",!0),this.qb=ne(b[2]||""),this.Ia=ne(b[3]||"",!0),le(this,b[4]),this.ya=ne(b[5]||"",!0),me(this,b[6]||"",!0),this.hb=ne(b[7]||"")):this.g=new oe(null)}q=je.prototype;q.Ga="";q.qb="";q.Ia="";q.Fb=null;q.ya="";q.hb="";
130
- q.toString=function(){var a=[],b=this.Ga;b&&a.push(pe(b,qe,!0),":");if(b=this.Ia){a.push("//");var c=this.qb;c&&a.push(pe(c,qe,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Fb;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Ia&&"/"!=b.charAt(0)&&a.push("/"),a.push(pe(b,"/"==b.charAt(0)?re:se,!0));(b=this.g.toString())&&a.push("?",b);(b=this.hb)&&a.push("#",pe(b,te));return a.join("")};
131
- q.resolve=function(a){var b=this.clone();"data"===b.Ga&&(b=new je);var c=!!a.Ga;c?ke(b,a.Ga):c=!!a.qb;c?b.qb=a.qb:c=!!a.Ia;c?b.Ia=a.Ia:c=null!=a.Fb;var d=a.ya;if(c)le(b,a.Fb);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Ia&&!this.ya)d="/"+d;else{var e=b.ya.lastIndexOf("/");-1!=e&&(d=b.ya.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(""):".."==
132
- h?((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.ya=d:c=""!==a.g.toString();c?me(b,a.g.clone()):c=!!a.hb;c&&(b.hb=a.hb);return b};q.clone=function(){return new je(this)};function ke(a,b,c){a.Ga=c?ne(b,!0):b;a.Ga&&(a.Ga=a.Ga.replace(/:$/,""))}function le(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Fb=b}else a.Fb=null}function me(a,b,c){b instanceof oe?a.g=b:(c||(b=pe(b,ue)),a.g=new oe(b))}
133
- function ne(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function pe(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ve),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ve(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var qe=/[#\/\?@]/g,se=/[#\?:]/g,re=/[#\?]/g,ue=/[#\?@]/g,te=/#/g;function oe(a){this.g=a||null}q=oe.prototype;q.va=null;q.xc=null;
134
- q.add=function(a,b){if(!this.va&&(this.va={},this.xc=0,this.g))for(var c=this.g.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.g=null;(c=this.va.hasOwnProperty(a)&&this.va[a])||(this.va[a]=c=[]);c.push(b);this.xc++;return this};
135
- q.toString=function(){if(this.g)return this.g;if(!this.va)return"";var a=[],b;for(b in this.va)for(var c=encodeURIComponent(b),d=this.va[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new oe;a.g=this.g;if(this.va){var b={},c;for(c in this.va)b[c]=this.va[c].concat();a.va=b;a.xc=this.xc}return a};function we(a,b){if(0==b.length)return a;var c=b.map(function(d){return new je(d)});return a.map(function(d){return new je(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Kb,[]).map(function(d){return d.toString()})}function xe(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:b||[],keyIds:new Set}}
136
- function ye(a,b){if(1==b.length)return b[0];var c=ze(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function ze(a,b){for(var c=t(Ae[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Be?"":null}var Be="text",Ce={Pa:"video",eb:"audio",ba:Be,oc:"image",Sf:"application"},Ae={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function De(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}De.prototype.resolve=function(){};De.prototype.reject=function(){};function Ee(){}M("shaka.dependencies",Ee);Ee.has=function(a){return Fe.has(a)};Ee.add=function(a,b){if(!Ge[a])throw Error(a+" is not supported");Fe.set(a,function(){return b})};var Ge={muxjs:"muxjs"};Ee.Allowed=Ge;var Fe=new Map([["muxjs",function(){return window.muxjs}]]);function He(){var a=this;this.s=Fe.get("muxjs")();this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(oc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:oc.apply(ic,ka(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}He.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
137
- function Ie(a,b){if(!Fe.get("muxjs")()||!Je(a))return!1;if(b)return MediaSource.isTypeSupported(Ke(b,a));var c=Ke("audio",a),d=Ke("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Je(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
138
- function Ke(a,b){var c=b.replace(/mp2t/i,"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 Le(a,b){a.l=!0;a.h=new De;a.m=[];a.j=[];a.i=[];var c=qb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Me(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Ne(a,b,c){a=Me(a,b);return Fe.get("muxjs")()&&Je(a)?Ke(c,a):a}function Oe(a){var b=[a.mimeType];Pe.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function Qe(a){a=a.split(".");var b=a[0];a.pop();return b}function Re(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
139
- var Pe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Se(a){this.s=null;this.i=a;this.j=this.C=0;this.l=Infinity;this.h=this.g=null;this.u="";this.m=new Map}function Te(a){return Ue[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Se.prototype.destroy=function(){this.i=this.s=null;this.m.clear();return Promise.resolve()};
140
- function Ve(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return v(h,Promise.resolve(),2);if(!a.s||!a.i)return h["return"]();if(null==c||null==d)return a.s.parseInit(qb(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.s.parseMedia(qb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
141
- Se.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return v(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function We(a,b,c){a.j=b;a.l=c}function Xe(a,b,c){a.u=b;if(b=a.m.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
142
- function Ye(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new xc(c.startTime,c.endTime,c.text)});return b}function Ze(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ze(a,d.value,c)}
143
- function $e(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ze(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.u&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.m.has(f)||a.m.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.m.get(f).set(h,k);a.g=null==a.g?Math.max(c,
144
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}M("shaka.text.TextEngine",Se);Se.prototype.destroy=Se.prototype.destroy;Se.findParser=function(a){return Ue[a]};Se.unregisterParser=function(a){delete Ue[a]};Se.registerParser=function(a,b){Ue[a]=b};var Ue={};function af(a){this.g=!1;this.h=new De;this.i=a}af.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function bf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function cf(){this.g={}}cf.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};cf.prototype.get=function(a){return(a=this.g[a])?a.slice():null};cf.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function df(a,b){for(var c in a.g)b(c,a.g[c])}cf.prototype.size=function(){return Object.keys(this.g).length};function ef(){this.g=new cf}q=ef.prototype;q.release=function(){this.ob();this.g=null};q.B=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};q.wa=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};q.Ea=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ea(),this.g.remove(b,e))}};
145
- q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ka(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ea();this.g.g={}}};M("shaka.util.EventManager",ef);ef.prototype.removeAll=ef.prototype.ob;ef.prototype.unlisten=ef.prototype.Ea;ef.prototype.listenOnce=ef.prototype.wa;ef.prototype.listen=ef.prototype.B;ef.prototype.release=ef.prototype.release;function ff(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gf(a,d);this.target.addEventListener(b,c,this.g)}
146
- ff.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hf(a)?b:b.capture||!1}
147
- function hf(a){var b=jf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}jf=b}return b||!1}var jf=void 0;function kf(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.I={};this.i=null;this.L=d||function(){};this.l={};this.h=new ef;this.u={};this.C=b;this.F=new De;this.s=lf(this,this.F);this.J=new af(function(){return mf(e)});this.H=""}function lf(a,b){var c=new MediaSource;a.h.wa(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=nf(c);a.g.src=a.H;return c}function pf(a){var b=Me(a.mimeType,a.codecs),c=Oe(a);return Te(b)||MediaSource.isTypeSupported(c)||Ie(b,a.type)}q=kf.prototype;
148
- q.destroy=function(){return this.J.destroy()};
149
- function mf(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Lb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return v(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.s=null;a.i=null;a.m=null;a.j={};a.u={};a.C=null;a.l=
126
+ function Yd(a){var b;a instanceof Yd?(Zd(this,a.Ba),this.kb=a.kb,this.Da=a.Da,$d(this,a.Ab),this.ta=a.ta,ae(this,a.g.clone()),this.ab=a.ab):a&&(b=String(a).match(Xd))?(Zd(this,b[1]||"",!0),this.kb=ce(b[2]||""),this.Da=ce(b[3]||"",!0),$d(this,b[4]),this.ta=ce(b[5]||"",!0),ae(this,b[6]||"",!0),this.ab=ce(b[7]||"")):this.g=new de(null)}r=Yd.prototype;r.Ba="";r.kb="";r.Da="";r.Ab=null;r.ta="";r.ab="";
127
+ r.toString=function(){var a=[],b=this.Ba;b&&a.push(ee(b,fe,!0),":");if(b=this.Da){a.push("//");var c=this.kb;c&&a.push(ee(c,fe,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ab;null!=b&&a.push(":",String(b))}if(b=this.ta)this.Da&&"/"!=b.charAt(0)&&a.push("/"),a.push(ee(b,"/"==b.charAt(0)?ge:he,!0));(b=this.g.toString())&&a.push("?",b);(b=this.ab)&&a.push("#",ee(b,ie));return a.join("")};
128
+ r.resolve=function(a){var b=this.clone();"data"===b.Ba&&(b=new Yd);var c=!!a.Ba;c?Zd(b,a.Ba):c=!!a.kb;c?b.kb=a.kb:c=!!a.Da;c?b.Da=a.Da:c=null!=a.Ab;var d=a.ta;if(c)$d(b,a.Ab);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Da&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.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(""):".."==
129
+ h?((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.ta=d:c=""!==a.g.toString();c?ae(b,a.g.clone()):c=!!a.ab;c&&(b.ab=a.ab);return b};r.clone=function(){return new Yd(this)};function Zd(a,b,c){a.Ba=c?ce(b,!0):b;a.Ba&&(a.Ba=a.Ba.replace(/:$/,""))}function $d(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ab=b}else a.Ab=null}function ae(a,b,c){b instanceof de?a.g=b:(c||(b=ee(b,je)),a.g=new de(b))}
130
+ function ce(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ee(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ke),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ke(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var fe=/[#\/\?@]/g,he=/[#\?:]/g,ge=/[#\?]/g,je=/[#\?@]/g,ie=/#/g;function de(a){this.g=a||null}r=de.prototype;r.qa=null;r.qc=null;
131
+ r.add=function(a,b){if(!this.qa&&(this.qa={},this.qc=0,this.g))for(var c=this.g.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.g=null;(c=this.qa.hasOwnProperty(a)&&this.qa[a])||(this.qa[a]=c=[]);c.push(b);this.qc++;return this};
132
+ r.toString=function(){if(this.g)return this.g;if(!this.qa)return"";var a=[],b;for(b in this.qa)for(var c=encodeURIComponent(b),d=this.qa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new de;a.g=this.g;if(this.qa){var b={},c;for(c in this.qa)b[c]=this.qa[c].concat();a.qa=b;a.qc=this.qc}return a};function le(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Yd(d)});return a.map(function(d){return new Yd(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Jc,[]).map(function(d){return d.toString()})}function me(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:b||[],keyIds:new Set}}
133
+ function ne(a,b){if(1==b.length)return b[0];var c=oe(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function oe(a,b){for(var c=t(pe[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==qe?"":null}var qe="text",re={Na:"video",Ya:"audio",Z:qe,ic:"image",Ef:"application"},pe={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function se(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}se.prototype.resolve=function(){};se.prototype.reject=function(){};function te(){}N("shaka.dependencies",te);te.has=function(a){return ue.has(a)};te.add=function(a,b){if(!ve[a])throw Error(a+" is not supported");ue.set(a,function(){return b})};var ve={muxjs:"muxjs"};te.Allowed=ve;var ue=new Map([["muxjs",function(){return window.muxjs}]]);function we(){var a=this;this.o=ue.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(ac(b.initSegment,b.data))});this.g.on("done",function(){var b={data:ac.apply(Vb,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}we.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
134
+ function xe(a,b){if(!ue.get("muxjs")()||!ye(a))return!1;if(b)return MediaSource.isTypeSupported(ze(b,a));var c=ze("audio",a),d=ze("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function ye(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
135
+ function ze(a,b){var c=b.replace(/mp2t/i,"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 Ae(a,b){a.l=!0;a.h=new se;a.m=[];a.j=[];a.i=[];var c=gb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function Be(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Ce(a,b,c){a=Be(a,b);return ue.get("muxjs")()&&ye(a)?ze(c,a):a}function De(a){var b=[a.mimeType];Ee.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function Fe(a){a=a.split(".");var b=a[0];a.pop();return b}function Ge(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
136
+ var Ee=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function He(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function Ie(a){return Je[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}He.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
137
+ function Ke(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(gb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(gb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);z(h)})}
138
+ He.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function Le(a,b,c){a.j=b;a.m=c}function Me(a,b,c){a.s=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
139
+ function Ne(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new kc(c.startTime,c.endTime,c.text)});return b}function Oe(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Oe(a,d.value,c)}
140
+ function Pe(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Oe(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.s&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
141
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",He);He.prototype.destroy=He.prototype.destroy;He.findParser=function(a){return Je[a]};He.unregisterParser=function(a){delete Je[a]};He.registerParser=function(a,b){Je[a]=b};var Je={};function Qe(a){this.g=!1;this.h=new se;this.i=a}Qe.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Re(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function Se(){this.g={}}Se.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};Se.prototype.get=function(a){return(a=this.g[a])?a.slice():null};Se.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function Te(a,b){for(var c in a.g)b(c,a.g[c])}Se.prototype.size=function(){return Object.keys(this.g).length};function Ue(){this.g=new Se}r=Ue.prototype;r.release=function(){this.ib();this.g=null};r.v=function(a,b,c,d){this.g&&(a=new Ve(a,b,c,d),this.g.push(b,a))};r.ra=function(a,b,c,d){function e(g){f.za(a,b,e);c(g)}var f=this;this.v(a,b,e,d)};r.za=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.za(),this.g.remove(b,e))}};
142
+ r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.za();this.g.g={}}};N("shaka.util.EventManager",Ue);Ue.prototype.removeAll=Ue.prototype.ib;Ue.prototype.unlisten=Ue.prototype.za;Ue.prototype.listenOnce=Ue.prototype.ra;Ue.prototype.listen=Ue.prototype.v;Ue.prototype.release=Ue.prototype.release;function Ve(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=We(a,d);this.target.addEventListener(b,c,this.g)}
143
+ Ve.prototype.za=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function We(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Xe(a)?b:b.capture||!1}
144
+ function Xe(a){var b=Ye;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Ye=b}return b||!1}var Ye=void 0;function Ze(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.G={};this.g=null;this.I=d||function(){};this.i={};this.o=new Ue;this.s={};this.u=b;this.C=new se;this.m=$e(this,this.C);this.B=new Qe(function(){return af(e)});this.F=""}function $e(a,b){var c=new MediaSource;a.o.ra(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=bf(c);a.j.src=a.F;return c}function cf(a){var b=Be(a.mimeType,a.codecs),c=De(a);return Ie(b)||MediaSource.isTypeSupported(c)||xe(b,a.type)}r=Ze.prototype;
145
+ r.destroy=function(){return this.B.destroy()};
146
+ function af(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Kc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
150
147
  {};z(l)})}
151
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=Ce,v(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={sa:e.sa},g=f.next())e.sa=g.value,h=a.get(e.sa),k=Me(h.mimeType,h.codecs),e.sa==d.ba?qf(c,k):(!b&&MediaSource.isTypeSupported(k)||!Ie(k,e.sa)||(c.u[e.sa]=new He,k=Ke(e.sa,k)),l=c.s.addSourceBuffer(k),c.h.B(l,"error",function(n){return function(){c.l[n.sa][0].p.reject(new N(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.B(l,"updateend",function(n){return function(){return rf(c,n.sa)}}(e)),
152
- c.j[e.sa]=l,c.I[e.sa]=k,c.l[e.sa]=[]);z(m)})};function qf(a,b){a.i||(a.i=new Se(a.m));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.s=Nb(Ue[b]))}function sf(a){return a.s?"ended"==a.s.readyState:!0}function tf(a,b){if(b==Be)var c=a.i.g;else c=uf(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}function vf(a,b){return b==Be?a.i.h:de(uf(a,b))}
153
- function wf(a,b,c){if(b==Be)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=uf(a,b);return fe(a,c)}q.zc=function(){var a={total:ge(this.g.buffered),audio:ge(uf(this,"audio")),video:ge(uf(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function uf(a,b){try{return a.j[b].buffered}catch(c){return null}}
154
- function xf(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return L(function(u){if(1==u.g){g=Ce;if(b==g.ba)return v(u,Ve(a.i,c,d,e),0);if(a.u[b])return v(u,Le(a.u[b],c),10);if(f)return a.i||qf(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ce(a.C,c),h.length&&(k=a.j[g.Pa].timestampOffset,$e(a.i,h,d,e,k))),c=yf(a,c,d,b),v(u,zf(a,b,function(){a.j[b].appendBuffer(c)}),0);c=yf(a,c,d,b);return v(u,zf(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=u.h;a.i||qf(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
155
- m,e));l.captions&&l.captions.length&&(n=a.j[g.Pa].timestampOffset,p=Ye(l.captions),$e(a.i,p,d,e,n));r=l.data;r=yf(a,r,d,b);return v(u,zf(a,b,function(){a.j[b].appendBuffer(r)}),0)})}function Af(a,b){var c=vf(a,"video")||0;Xe(a.i,b,c)}function Bf(a){a.i&&Xe(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return L(function(f){e=Ce;return a==e.ba?v(f,d.i.remove(b,c),0):v(f,zf(d,a,function(){c<=b?rf(d,a):d.j[a].remove(b,c)}),0)})};
156
- function Cf(a,b){var c;return L(function(d){c=Ce;return b==c.ba?a.i?v(d,a.i.remove(0,Infinity),0):d["return"]():v(d,zf(a,b,function(){var e=a.s.duration;0>=e?rf(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return L(function(d){c=Ce;return a==c.ba?d["return"]():v(d,zf(b,a,function(){b.g.currentTime-=.001;rf(b,a)}),0)})};
157
- function Df(a,b,c,d,e){var f;return L(function(g){f=Ce;return b==f.ba?(a.i.C=c,We(a.i,d,e),g["return"]()):v(g,Promise.all([zf(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;rf(a,b)}),zf(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;rf(a,b)}),zf(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;rf(a,b)})]),0)})}
158
- q.endOfStream=function(a){var b=this;return L(function(c){return v(c,Ef(b,function(){sf(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.La=function(a){var b=this;return L(function(c){return v(c,Ef(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function rf(a,b){var c=a.l[b][0];c&&(c.p.resolve(),Ff(a,b))}function zf(a,b,c){bf(a.J);c={start:c,p:new De};a.l[b].push(c);1==a.l[b].length&&Gf(a,b);return c.p}
159
- function Ef(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:bf(a.J);c=[];d={};for(e in a.j)d.Lb=new De,f={start:function(l){return function(){return l.Lb.resolve()}}(d),p:d.Lb},a.l[e].push(f),c.push(d.Lb),1==a.l[e].length&&f.start(),d={Lb:d.Lb};B(k,2);return v(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.j)Ff(a,h)}z(k)}})}function Ff(a,b){a.l[b].shift();Gf(a,b)}
160
- function Gf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ff(a,b)}}function yf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(cc()||ac())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=pc(b));return b}var nf=window.URL.createObjectURL;function Hf(a,b){a=If(a);b=If(b);return a.split("-")[0]==b.split("-")[0]}function Jf(a,b){a=If(a);b=If(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Kf(a,b){a=If(a);b=If(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function If(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Lf.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Mf(a,b){a=If(a);b=If(b);return b==a?4:Jf(b,a)?3:Kf(b,a)?2:Jf(a,b)?1:0}
161
- function Nf(a){return a.language?If(a.language):a.audio&&a.audio.language?If(a.audio.language):a.video&&a.video.language?If(a.video.language):"und"}
162
- function Of(a,b){for(var c=If(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(If(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Jf(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Kf(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Jf(c,f))return f;return null}
163
- var Lf=new Map([["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",
148
+ r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=re,u(m,c.C,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={oa:e.oa},g=f.next())e.oa=g.value,h=a.get(e.oa),k=Be(h.mimeType,h.codecs),e.oa==d.Z?df(c,k):(!b&&MediaSource.isTypeSupported(k)||!xe(k,e.oa)||(c.s[e.oa]=new we,k=ze(e.oa,k)),l=c.m.addSourceBuffer(k),c.o.v(l,"error",function(n){return function(){c.i[n.oa][0].p.reject(new O(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.v(l,"updateend",function(n){return function(){return ef(c,n.oa)}}(e)),
149
+ c.h[e.oa]=l,c.G[e.oa]=k,c.i[e.oa]=[]);z(m)})};function df(a,b){a.g||(a.g=new He(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Mc(Je[b]))}function ff(a){return a.m?"ended"==a.m.readyState:!0}function gf(a,b){if(b==qe)var c=a.g.g;else c=hf(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}function jf(a,b){return b==qe?a.g.h:Sd(hf(a,b))}
150
+ function kf(a,b,c){if(b==qe)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=hf(a,b);return Ud(a,c)}r.sc=function(){var a={total:Vd(this.j.buffered),audio:Vd(hf(this,"audio")),video:Vd(hf(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function hf(a,b){try{return a.h[b].buffered}catch(c){return null}}
151
+ function lf(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=re;if(b==g.Z)return u(v,Ke(a.g,c,d,e),0);if(a.s[b])return u(v,Ae(a.s[b],c),10);if(f)return a.g||df(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=Rd(a.u,c),h.length&&(k=a.h[g.Na].timestampOffset,Pe(a.g,h,d,e,k))),c=mf(a,c,d,b),u(v,nf(a,b,function(){a.h[b].appendBuffer(c)}),0);c=mf(a,c,d,b);return u(v,nf(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||df(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.I(l.metadata,
152
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=Ne(l.captions),Pe(a.g,p,d,e,n));q=l.data;q=mf(a,q,d,b);return u(v,nf(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function of(a,b){var c=jf(a,"video")||0;Me(a.g,b,c)}function pf(a){a.g&&Me(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=re;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,nf(d,a,function(){c<=b?ef(d,a):d.h[a].remove(b,c)}),0)})};
153
+ function qf(a,b){var c;return L(function(d){c=re;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,nf(a,b,function(){var e=a.m.duration;0>=e?ef(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=re;return a==c.Z?d["return"]():u(d,nf(b,a,function(){b.j.currentTime-=.001;ef(b,a)}),0)})};
154
+ function rf(a,b,c,d,e){var f;return L(function(g){f=re;return b==f.Z?(a.g.u=c,Le(a.g,d,e),g["return"]()):u(g,Promise.all([nf(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;ef(a,b)}),nf(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;ef(a,b)}),nf(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ef(a,b)})]),0)})}
155
+ r.endOfStream=function(a){var b=this;return L(function(c){return u(c,tf(b,function(){ff(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ha=function(a){var b=this;return L(function(c){return u(c,tf(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function ef(a,b){var c=a.i[b][0];c&&(c.p.resolve(),uf(a,b))}function nf(a,b,c){Re(a.B);c={start:c,p:new se};a.i[b].push(c);1==a.i[b].length&&vf(a,b);return c.p}
156
+ function tf(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Re(a.B);c=[];d={};for(e in a.h)d.Gb=new se,f={start:function(l){return function(){return l.Gb.resolve()}}(d),p:d.Gb},a.i[e].push(f),c.push(d.Gb),1==a.i[e].length&&f.start(),d={Gb:d.Gb};C(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)uf(a,h)}z(k)}})}function uf(a,b){a.i[b].shift();vf(a,b)}
157
+ function vf(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),uf(a,b)}}function mf(a,b,c,d){var e=a.j.mediaKeys;null==c&&e&&(Kb()||Ib())&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=bc(b));return b}var bf=window.URL.createObjectURL;function wf(a,b){a=xf(a);b=xf(b);return a.split("-")[0]==b.split("-")[0]}function yf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function zf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function xf(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Af.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Bf(a,b){a=xf(a);b=xf(b);return b==a?4:yf(b,a)?3:zf(b,a)?2:yf(a,b)?1:0}
158
+ function Cf(a){return a.language?xf(a.language):a.audio&&a.audio.language?xf(a.audio.language):a.video&&a.video.language?xf(a.video.language):"und"}
159
+ function Df(a,b){for(var c=xf(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(xf(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,yf(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,zf(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,yf(c,f))return f;return null}
160
+ var Af=new Map([["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",
164
161
  "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"],["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",
165
162
  "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"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
166
163
  "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",
167
164
  "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"],["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",
168
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Pf(a,b){var c=Qf(a.variants,b);c=Rf(c);c=Sf(c);var d=Tf(c);a.variants=a.variants.filter(function(e){return Uf(e)==d?!0:!1})}function Rf(a){var b=new cf;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Uf(c);b.push(d,c)}return b}
169
- function Sf(a){var b=0,c=new Map,d=a.size();df(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new cf);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function Tf(a){var b="",c=Infinity;df(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
170
- function Uf(a){var b="";a.video&&(b=Qe(a.video.codecs));var c="";a.audio&&(c=Qe(a.audio.codecs));return b+"-"+c}function Vf(a,b,c){a.variants=a.variants.filter(function(d){return Wf(d,b,c)})}
171
- function Wf(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
172
- function Xf(a,b,c,d){return L(function(e){if(1==e.g)return d?v(e,$f(c,0<c.offlineSessionIds.length),2):(Yf(c,a),Zf(c),e.v(2));ag(b,c);bg(c);cg(c);z(e)})}function Yf(a,b){a.variants=a.variants.filter(function(c){return b&&b.L?dg(b,c)?!0:!1:!0})}
173
- function $f(a,b){return L(function(c){if(1==c.g)return v(c,eg(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(ac()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return ab(fg(d)),!1;(e=d.decodingInfos.some(function(f){return f.supported}))||ab(fg(d));return e});z(c)})}
174
- function Zf(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!pf(c)||b&&!pf(b)||ac()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
175
- function eg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return L(function(u){if(d=a.some(function(x){return x.decodingInfos.length}))return u["return"]();e=window.shakaMediaCapabilities;f=[];g=function(x,w){var y;return L(function(C){if(1==C.g)return B(C,2),v(C,e.decodingInfo(w),4);if(2!=C.g)return y=C.h,x.decodingInfos.push(y),wa(C,0);F(C);JSON.stringify(w);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=gg(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return v(u,Promise.all(f),
165
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ef(a,b){var c=Ff(a.variants,b);c=Gf(c);c=Hf(c);var d=If(c);a.variants=a.variants.filter(function(e){return Jf(e)==d?!0:!1})}function Gf(a){var b=new Se;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Jf(c);b.push(d,c)}return b}
166
+ function Hf(a){var b=0,c=new Map,d=a.size();Te(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new Se);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function If(a){var b="",c=Infinity;Te(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
167
+ function Jf(a){var b="";a.video&&(b=Fe(a.video.codecs));var c="";a.audio&&(c=Fe(a.audio.codecs));return b+"-"+c}function Kf(a,b,c){a.variants=a.variants.filter(function(d){return Lf(d,b,c)})}
168
+ function Lf(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
169
+ function Mf(a,b,c,d){return L(function(e){if(1==e.g)return d?u(e,Pf(c,0<c.offlineSessionIds.length),2):(Nf(c,a),Of(c),e.A(2));Qf(b,c);Rf(c);Sf(c);z(e)})}function Nf(a,b){a.variants=a.variants.filter(function(c){return b&&b.M?Tf(b,c)?!0:!1:!0})}
170
+ function Pf(a,b){return L(function(c){if(1==c.g)return u(c,Uf(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Vf(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ne("video",g);g=ne("audio",g);g=Ce(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Ce(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Wf(f.codecs),f=Ce(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Ib()&&e&&(e.width&&
171
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Xa(Xf(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Xa(Xf(d));return e});z(c)})}function Of(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!cf(c)||b&&!cf(b)||Ib()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
172
+ function Uf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(x){return x.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(x,w){var y;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return y=D.h,x.decodingInfos.push(y),ua(D,0);F(D);JSON.stringify(w);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Yf(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
176
173
  0)})}
177
- function gg(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ye("video",g);f="vp9"==f?"vp09.00.10.08":f;g=ye("audio",g);g=Ne(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ne(e.mimeType,"vp9"==f?"vp09.00.10.08":f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};
178
- if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f="ac-3"==d.codecs.toLowerCase()&&cc()?"ec-3":d.codecs,f=Ne(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;
179
- g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,
180
- r=t(h.initData),u=r.next();!u.done;u=r.next())p.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=
181
- m;a.push(l)}return a}function ag(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!hg(d,a.audio)||c&&a&&a.video&&!hg(c,a.video)?!1:!0})}function bg(a){a.textStreams=a.textStreams.filter(function(b){return Te(Me(b.mimeType,b.codecs))})}function cg(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(bc("Web0S")||cc()||dc())&&c.push("image/webp");return c.includes(b.mimeType)})}
182
- function hg(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
183
- function ig(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=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
174
+ function Yf(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ne("video",g);f=Vf(f);g=ne("audio",g);g=Ce(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Vf(f);f=Ce(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
175
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Wf(d.codecs),f=Ce(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
176
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
177
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Wf(a){return Kb()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
178
+ function Vf(a){return"vp9"==a?"vp09.00.10.08":a}function Qf(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Zf(d,a.audio)||c&&a&&a.video&&!Zf(c,a.video)?!1:!0})}function Rf(a){a.textStreams=a.textStreams.filter(function(b){return Ie(Be(b.mimeType,b.codecs))})}function Sf(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Jb("Web0S")||Kb()||Lb())&&c.push("image/webp");return c.includes(b.mimeType)})}
179
+ function Zf(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
180
+ function $f(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=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
184
181
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
185
182
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
186
- function jg(a){return{id:a.id,active:!1,type:Be,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
183
+ function ag(a){return{id:a.id,active:!1,type:qe,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
187
184
  originalTextId:a.originalId,originalImageId:null}}
188
- function kg(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
189
- originalTextId:null,originalImageId:a.originalId}}function lg(a){a.__shaka_id||(a.__shaka_id=mg++);return a.__shaka_id}function ng(a){var b=og(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
190
- function og(a){return{id:lg(a),active:!1,type:"",bandwidth:0,language:If(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
191
- function pg(a){return a.allowedByApplication&&a.allowedByKeySystem}function qg(a){return a.filter(function(b){return pg(b)})}
192
- function Qf(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ka(e))):d.get(Math.min.apply(Math,ka(c)))}
193
- function rg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Of(If(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return If(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=sg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Kb,[]);return a.length?
194
- sg(e,a[0]):e}function sg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function fg(a){var b=[];a.audio&&b.push(tg(a.audio));a.video&&b.push(tg(a.video));return b.join(", ")}
195
- function tg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var mg=0;function ug(){var a=this;this.j=null;this.i=!1;this.g=new Ta;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.o.useNetworkInformation&&a.i){a.g=new Ta;var b=a.chooseVariant();b&&a.j(b)}});this.h=[];this.m=1;this.s=!1;this.o=this.l=null}q=ug.prototype;q.stop=function(){this.j=null;this.i=!1;this.h=[];this.m=1;this.l=null};q.init=function(a){this.j=a};
196
- q.chooseVariant=function(){var a=vg(this.o.restrictions,this.h),b=this.g.getBandwidthEstimate(wg(this));this.h.length&&!a.length&&(a=vg(null,this.h),a=[a[0]]);var c=a[0]||null;a=t(mb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.m)?1:Math.abs(this.m);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.o.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.o.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.i=!0};
197
- q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;Pa(c.h,e,d);Pa(c.i,e,d)}if(null!=this.l&&this.i)a:{if(!this.s){if(!(128E3<=this.g.g))break a;this.s=!0}else if(Date.now()-this.l<1E3*this.o.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(wg(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)};q.setVariants=function(a){this.h=a};
198
- q.playbackRateChanged=function(a){this.m=a};q.configure=function(a){this.o=a};function wg(a){var b=a.o.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.o.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function vg(a,b){a&&(b=b.filter(function(c){return Wf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",ug);ug.prototype.configure=ug.prototype.configure;
199
- ug.prototype.playbackRateChanged=ug.prototype.playbackRateChanged;ug.prototype.setVariants=ug.prototype.setVariants;ug.prototype.getBandwidthEstimate=ug.prototype.getBandwidthEstimate;ug.prototype.segmentDownloaded=ug.prototype.segmentDownloaded;ug.prototype.disable=ug.prototype.disable;ug.prototype.enable=ug.prototype.enable;ug.prototype.chooseVariant=ug.prototype.chooseVariant;ug.prototype.init=ug.prototype.init;ug.prototype.stop=ug.prototype.stop;function xg(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}xg.prototype.add=function(a){return yg(this.h,a)?(this.g.add(a),!0):!1};
200
- function yg(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&zg(c,d)&&Ag(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(zg(c,d)&&Ag(c.roles,d.roles)));return c?!1:!0}xg.prototype.values=function(){return this.g.values()};
201
- function zg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return Qe(g)}),d=b.codecs.split(",").map(function(g){return Qe(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=t(jb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
202
- function Ag(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Bg(a){this.g=a;this.h=new Cg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Bg.prototype.create=function(a){var b=this,c=a.filter(function(d){return yg(b.g,d)});return c.length?new xg(c[0],c):this.h.create(a)};function Cg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
203
- Cg.prototype.create=function(a){var b=[];b=Dg(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Eg(b,this.j);a.length&&(b=a);this.g&&(a=Qf(b,this.g),a.length&&(b=a));this.h&&(a=Fg(b,this.h),a.length&&(b=a));a=new xg(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,yg(a.h,c)&&a.add(c);return a};function Dg(a,b){var c=If(b),d=Of(c,a.map(function(e){return Nf(e)}));return d?a.filter(function(e){return d==Nf(e)}):[]}
204
- function Eg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Fg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Gg(){this.g=Hg;this.h=(new Map).set(Hg,2).set(Ig,1)}function Jg(a,b,c){a.h.set(Hg,c).set(Ig,b)}var Ig=0,Hg=1;function Kg(a,b){var c=Lg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
205
- function Mg(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return v(d,new Promise(function(e){(new P(e)).V(c/1E3)}),2)}a.h*=a.m;z(d)})}function Lg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ng(a,b){this.promise=a;this.i=b;this.g=!1}function Og(a){return new Ng(Promise.reject(a),function(){return Promise.resolve()})}function Pg(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ng(a,function(){return Promise.resolve()})}function Qg(a){return new Ng(Promise.resolve(a),function(){return Promise.resolve()})}function Rg(a){return new Ng(a,function(){return a["catch"](function(){})})}Ng.prototype.abort=function(){this.g=!0;return this.i()};
206
- function Sg(a){return new Ng(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ng.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
207
- Ng.prototype.ca=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Tg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new De,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ng(f,function(){return d()})};
208
- function Tg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ng);Ng.prototype.chain=Ng.prototype.ca;Ng.prototype["finally"]=Ng.prototype["finally"];Ng.all=Sg;Ng.prototype.abort=Ng.prototype.abort;Ng.notAbortable=Rg;Ng.completed=Qg;Ng.aborted=Pg;Ng.failed=Og;function R(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});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.g=!1}
209
- function Ug(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);function Vg(){this.sc=new cf;this.rc=this}Vg.prototype.addEventListener=function(a,b){this.sc.push(a,b)};Vg.prototype.removeEventListener=function(a,b){this.sc.remove(a,b)};Vg.prototype.dispatchEvent=function(a){var b=this.sc.get(a.type)||[],c=this.sc.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.rc;a.currentTarget=this.rc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function Wg(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Xg(a){var b={},c;for(c in a)b[c]=a[c];return b};function Yg(){this.g=[]}function Zg(a,b){a.g.push(b["finally"](function(){uc(a.g,b)}))}Yg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $g(a){Vg.call(this);this.i=!1;this.l=new Yg;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}ra($g,Vg);q=$g.prototype;q.Ld=function(a){this.m=a};function ah(a,b,c,d){c=c||bh;var e=ch[a];if(!e||c>=e.priority)ch[a]={priority:c,uf:b,wf:void 0===d?!1:d}}q.xf=function(a){this.g.add(a)};q.Of=function(a){this.g["delete"](a)};q.Ie=function(){this.g.clear()};q.yf=function(a){this.h.add(a)};q.Pf=function(a){this.h["delete"](a)};q.Je=function(){this.h.clear()};
210
- function dh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
211
- q.request=function(a,b){var c=this,d=new eh;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new fh(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Wg(b.retryParameters):Lg();b.uris=Wg(b.uris);e=gh(this,a,b);var f=e.ca(function(){return hh(c,a,b,new Kg(b.retryParameters,!1),0,null,d)}),g=f.ca(function(n){return ih(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
212
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ca(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.kf||!c.j||r.fromCache||a!=jh||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new fh(m.promise,function(){return m.abort()},d);Zg(this.l,e);return e};
213
- function gh(a,b,c){var d=Qg(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Zc:e.Zc},f=a.next())e.Zc=f.value,d=d.ca(function(g){return function(){c.body&&(c.body=rb(c.body));return g.Zc(b,c)}}(e));return d.ca(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
214
- function hh(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new je(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ke(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ch[k])?k.uf:null;if(!m)return Og(new N(2,1,1E3,h));var n=k.wf,p=null,r=null,u=!1,x;return Rg(Mg(d)).ca(function(){if(a.i)return Pg();x=Date.now();var w=m(c.uris[e],c,b,function(D,A,E){p&&p.stop();r&&r.V(C/1E3);a.j&&b==jh&&(a.j(D,A),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
215
- y&&(p=new P(function(){u=!0;w.abort()}),p.V(y/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){u=!0;w.abort()}));return w}).ca(function(w){p&&p.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,kf:l}},function(w){p&&p.stop();r&&r.stop();if(a.i)return Pg();u&&(w=new N(1,1,1003,c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=(new Map).set("error",w);y=new R("retry",y);a.dispatchEvent(y);e=(e+1)%c.uris.length;
216
- return hh(a,b,c,d,e,w,g)}}throw w;})}function ih(a,b,c){var d=Qg(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={$c:e.$c},f=a.next())e.$c=f.value,d=d.ca(function(g){return function(){var h=c.response;h.data&&(h.data=rb(h.data));return g.$c(b,h)}}(e));return d.ca(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",$g);$g.prototype.request=$g.prototype.request;$g.prototype.destroy=$g.prototype.destroy;
217
- $g.makeRequest=dh;$g.defaultRetryParameters=function(){return Lg()};$g.prototype.clearAllResponseFilters=$g.prototype.Je;$g.prototype.unregisterResponseFilter=$g.prototype.Pf;$g.prototype.registerResponseFilter=$g.prototype.yf;$g.prototype.clearAllRequestFilters=$g.prototype.Ie;$g.prototype.unregisterRequestFilter=$g.prototype.Of;$g.prototype.registerRequestFilter=$g.prototype.xf;$g.unregisterScheme=function(a){delete ch[a]};$g.registerScheme=ah;$g.prototype.setForceHTTPS=$g.prototype.Ld;
218
- function eh(){this.g=0}$g.NumBytesRemainingClass=eh;function fh(a,b,c){Ng.call(this,a,b);this.h=c}ra(fh,Ng);$g.PendingRequest=fh;var jh=1;$g.RequestType={MANIFEST:0,SEGMENT:jh,LICENSE:2,APP:3,TIMING:4};var bh=3;$g.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bh};var ch={};function kh(){}function lh(a){a=zb(a);return(new je(a)).Ia}function mh(a,b,c){function d(h){tb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(qb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Bb(b,!0):e=b;a=zb(a);a=Bb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",kh);kh.initDataTransform=mh;kh.defaultGetContentId=lh;function nh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function oh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function ph(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function qh(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.u=new Set;this.g=this.m=null;this.qa=this.L=!1;this.H=0;this.i=null;this.h=new ef;this.j=new Map;this.C=[];this.s=new De;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.ra=new Map;this.ea=new Map;this.T=new P(function(){return rh(c)});this.F=!1;this.I=[];this.O=!1;this.pa=(new P(function(){sh(c)})).Da(b);this.s["catch"](function(){});this.J=new af(function(){return th(c)});this.Y=!1}q=qh.prototype;q.destroy=function(){return this.J.destroy()};
219
- function th(a){return L(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.pa.stop(),a.pa=null,a.T.stop(),a.T=null,v(b,uh(a),2);case 2:if(!a.g){b.v(3);break}B(b,4);return v(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:F(b);case 5:a.g=null;case 3:a.i=null,a.u.clear(),a.m=null,a.C=[],a.o=null,a.l=function(){},a.D=null,a.Y=!1,z(b)}})}q.configure=function(a){this.o=a};function vh(a,b,c,d){a.qa=!0;a.C=[];a.F=c;return wh(a,b,!!d)}
220
- function xh(a,b,c,d){a.C=c;a.F=0<c.length;return wh(a,b,!!d)}function yh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}];g.set(b,e);return zh(a,g,[],!1)}
221
- function wh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y;return L(function(C){if(1==C.g){if(d=Ah(a))for(e=t(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});h||(k=nh(a.o.servers),Bh(b,k));l=t(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=Ch(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,Dh(u,nh(a.o.servers),nh(a.o.advanced||{}));return c?
222
- v(C,eg(b,a.F,a.Y),2):(x=Eh(a,b),C.v(2))}w=h||Object.keys(a.o.servers).length;if(!w)return a.L=!0,C["return"](Promise.resolve());y=zh(a,x,b,c);return C["return"](h?y:y["catch"](function(){}))})}
223
- q.Pb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.m)return b.h.wa(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.wa(b.g,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())Fh(b,g.value);b.O=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.B(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return uh(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return v(e,
224
- c,2)}bf(b.J);Gh(b);b.i.initData.length||b.C.length||(d=function(f){return Kh(b,f.initDataType,qb(f.initData))},b.h.B(b.g,"encrypted",d));z(e)})};function Lh(a){var b;return L(function(c){if(1==c.g){if(!(a.m&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.v(0);B(c,3);return v(c,a.m.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return wa(c,0);b=F(c);throw new N(2,6,6004,b.message);})}
225
- function Mh(a,b){var c,d,e;return L(function(f){if(1==f.g)return v(f,Nh(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Ma=new De,d.push(e.Ma);d.push(c.remove());return v(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}function Gh(a){for(var b=(a.i?a.i.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Kh(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Nh(a,d.value);b.length||a.C.length||a.s.resolve();return a.s}
226
- function Kh(a,b,c){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(ob(c,e.value.initData)&&!bc("Tizen 2"))return;Oh(a,b,c)}function Ph(a){return a?a.keySystem:""}function Qh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Rh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(cc()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.u.has(b)||a.u.has(c)}return a.u.has(b)}
227
- function Sh(a){a=a.j.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Tb=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Bc=function(){return oh(this.ea)};
228
- function Eh(a,b){for(var c=new Set,d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ch(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=t(c);for(e=d.next();!e.done;e=d.next())Dh(e.value,nh(a.o.servers),nh(a.o.advanced||{}));f=a.F?"required":"optional";var g=a.F?["persistent-license"]:["temporary"];d=new Map;c=t(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
229
- sessionTypes:g,label:e.keySystem,drmInfos:[]});c=t(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=t([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Th(g),k=null;"ac-3"==g.codecs.toLowerCase()&&cc()&&(k=Th(g,"ec-3"));var l=t(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ka(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
185
+ function bg(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
186
+ originalTextId:null,originalImageId:a.originalId}}function cg(a){a.__shaka_id||(a.__shaka_id=dg++);return a.__shaka_id}function eg(a){var b=fg(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
187
+ function fg(a){return{id:cg(a),active:!1,type:"",bandwidth:0,language:xf(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
188
+ function gg(a){return a.allowedByApplication&&a.allowedByKeySystem}function hg(a){return a.filter(function(b){return gg(b)})}
189
+ function Ff(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
190
+ function ig(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Df(xf(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return xf(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=jg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Jc,[]);return a.length?
191
+ jg(e,a[0]):e}function jg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Xf(a){var b=[];a.audio&&b.push(kg(a.audio));a.video&&b.push(kg(a.video));return b.join(", ")}
192
+ function kg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var dg=0;function lg(){var a=this;this.l=null;this.j=!1;this.h=new Pa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Pa;var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=lg.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
193
+ r.chooseVariant=function(){var a=mg(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(ng(this));this.i.length&&!a.length&&(a=mg(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
194
+ r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){if(!(128E3<=this.h.g))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;var c=this.chooseVariant();this.h.getBandwidthEstimate(ng(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)};r.setVariants=function(a){this.i=a};
195
+ r.playbackRateChanged=function(a){this.o=a};r.configure=function(a){this.g=a};function ng(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function mg(a,b){a&&(b=b.filter(function(c){return Lf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}N("shaka.abr.SimpleAbrManager",lg);lg.prototype.configure=lg.prototype.configure;
196
+ lg.prototype.playbackRateChanged=lg.prototype.playbackRateChanged;lg.prototype.setVariants=lg.prototype.setVariants;lg.prototype.getBandwidthEstimate=lg.prototype.getBandwidthEstimate;lg.prototype.segmentDownloaded=lg.prototype.segmentDownloaded;lg.prototype.disable=lg.prototype.disable;lg.prototype.enable=lg.prototype.enable;lg.prototype.chooseVariant=lg.prototype.chooseVariant;lg.prototype.init=lg.prototype.init;lg.prototype.stop=lg.prototype.stop;function og(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}og.prototype.add=function(a){return pg(this.h,a)?(this.g.add(a),!0):!1};
197
+ function pg(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&qg(c,d)&&rg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(qg(c,d)&&rg(c.roles,d.roles)));return c?!1:!0}og.prototype.values=function(){return this.g.values()};
198
+ function qg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Fe(f)}),d=b.codecs.split(",").map(function(f){return Fe(f)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function rg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function sg(a){this.g=a;this.h=new tg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}sg.prototype.create=function(a){var b=this,c=a.filter(function(d){return pg(b.g,d)});return c.length?new og(c[0],c):this.h.create(a)};function tg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
199
+ tg.prototype.create=function(a){var b=[];b=ug(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=vg(b,this.j);a.length&&(b=a);this.g&&(a=Ff(b,this.g),a.length&&(b=a));this.h&&(a=wg(b,this.h),a.length&&(b=a));a=new og(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,pg(a.h,c)&&a.add(c);return a};function ug(a,b){var c=xf(b),d=Df(c,a.map(function(e){return Cf(e)}));return d?a.filter(function(e){return d==Cf(e)}):[]}
200
+ function vg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function wg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function xg(){this.g=yg;this.h=(new Map).set(yg,2).set(zg,1)}function Ag(a,b,c){a.h.set(yg,c).set(zg,b)}var zg=0,yg=1;function Bg(a,b){var c=Cg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
201
+ function Dg(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new P(e)).R(c/1E3)}),2)}a.h*=a.m;z(d)})}function Cg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Eg(a,b){this.promise=a;this.i=b;this.g=!1}function Fg(a){return new Eg(Promise.reject(a),function(){return Promise.resolve()})}function Gg(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new Eg(a,function(){return Promise.resolve()})}function Hg(a){return new Eg(Promise.resolve(a),function(){return Promise.resolve()})}function Ig(a){return new Eg(a,function(){return a["catch"](function(){})})}Eg.prototype.abort=function(){this.g=!0;return this.i()};
202
+ function Jg(a){return new Eg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Eg.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
203
+ Eg.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Kg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new se,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Eg(f,function(){return d()})};
204
+ function Kg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Eg);Eg.prototype.chain=Eg.prototype.$;Eg.prototype["finally"]=Eg.prototype["finally"];Eg.all=Jg;Eg.prototype.abort=Eg.prototype.abort;Eg.notAbortable=Ig;Eg.completed=Hg;Eg.aborted=Gg;Eg.failed=Fg;function Q(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});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.g=!1}
205
+ function Lg(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",Q);function Mg(){this.da=new Se;this.mc=this}Mg.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Mg.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Mg.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.mc;a.currentTarget=this.mc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
206
+ Mg.prototype.release=function(){this.da=null};function Ng(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Og(a){var b={},c;for(c in a)b[c]=a[c];return b};function Pg(){this.g=[]}function Qg(a,b){a.g.push(b["finally"](function(){hc(a.g,b)}))}Pg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Rg(a){Mg.call(this);this.i=!1;this.l=new Pg;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Rg,Mg);r=Rg.prototype;r.Bd=function(a){this.m=a};function Sg(a,b,c,d){c=c||Tg;var e=Ug[a];if(!e||c>=e.priority)Ug[a]={priority:c,gf:b,hf:void 0===d?!1:d}}r.jf=function(a){this.g.add(a)};r.Af=function(a){this.g["delete"](a)};r.xe=function(){this.g.clear()};r.kf=function(a){this.h.add(a)};r.Bf=function(a){this.h["delete"](a)};r.ye=function(){this.h.clear()};
207
+ function Vg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Mg.prototype.release.call(this);return this.l.destroy()};
208
+ r.request=function(a,b){var c=this,d=new Wg;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new Xg(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ng(b.retryParameters):Cg();b.uris=Ng(b.uris);e=Yg(this,a,b);var f=e.$(function(){return Zg(c,a,b,new Bg(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return $g(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
209
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Ye||!c.j||q.fromCache||a!=ah||c.j(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Xg(m.promise,function(){return m.abort()},d);Qg(this.l,e);return e};
210
+ function Yg(a,b,c){var d=Hg(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Rc:e.Rc},f=a.next())e.Rc=f.value,d=d.$(function(g){return function(){c.body&&(c.body=hb(c.body));return g.Rc(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
211
+ function Zg(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Yd(c.uris[e]),k=h.Ba,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Zd(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ug[k])?k.gf:null;if(!m)return Fg(new O(2,1,1E3,h));var n=k.hf,p=null,q=null,v=!1,x;return Ig(Dg(d)).$(function(){if(a.i)return Gg();x=Date.now();var w=m(c.uris[e],c,b,function(B,A,E){p&&p.stop();q&&q.R(D/1E3);a.j&&b==ah&&(a.j(B,A),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
212
+ y&&(p=new P(function(){v=!0;w.abort()}),p.R(y/1E3));var D=c.retryParameters.stallTimeout;D&&(q=new P(function(){v=!0;w.abort()}));return w}).$(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,Ye:l}},function(w){p&&p.stop();q&&q.stop();if(a.i)return Gg();v&&(w=new O(1,1,1003,c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=(new Map).set("error",w);y=new Q("retry",y);a.dispatchEvent(y);e=(e+1)%c.uris.length;
213
+ return Zg(a,b,c,d,e,w,g)}}throw w;})}function $g(a,b,c){var d=Hg(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Sc:e.Sc},f=a.next())e.Sc=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=hb(h.data));return g.Sc(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}N("shaka.net.NetworkingEngine",Rg);Rg.prototype.request=Rg.prototype.request;Rg.prototype.destroy=Rg.prototype.destroy;
214
+ Rg.makeRequest=Vg;Rg.defaultRetryParameters=function(){return Cg()};Rg.prototype.clearAllResponseFilters=Rg.prototype.ye;Rg.prototype.unregisterResponseFilter=Rg.prototype.Bf;Rg.prototype.registerResponseFilter=Rg.prototype.kf;Rg.prototype.clearAllRequestFilters=Rg.prototype.xe;Rg.prototype.unregisterRequestFilter=Rg.prototype.Af;Rg.prototype.registerRequestFilter=Rg.prototype.jf;Rg.unregisterScheme=function(a){delete Ug[a]};Rg.registerScheme=Sg;Rg.prototype.setForceHTTPS=Rg.prototype.Bd;
215
+ function Wg(){this.g=0}Rg.NumBytesRemainingClass=Wg;function Xg(a,b,c){Eg.call(this,a,b);this.h=c}pa(Xg,Eg);Rg.PendingRequest=Xg;var ah=1;Rg.RequestType={MANIFEST:0,SEGMENT:ah,LICENSE:2,APP:3,TIMING:4};var Tg=3;Rg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Tg};var Ug={};function bh(){}function ch(a){a=pb(a);return(new Yd(a)).Da}function dh(a,b,c){function d(h){jb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=rb(b,!0):e=b;a=pb(a);a=rb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",bh);bh.initDataTransform=dh;bh.defaultGetContentId=ch;function eh(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function fh(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function gh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function hh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function ih(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function jh(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.B=new Set;this.j=this.s=null;this.ia=this.M=!1;this.I=0;this.g=null;this.o=new Ue;this.i=new Map;this.C=[];this.u=new se;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.V=new P(function(){return kh(c)});this.F=!1;this.K=[];this.T=!1;this.ea=(new P(function(){lh(c)})).ya(b);this.u["catch"](function(){});this.l=new Qe(function(){return mh(c)});this.Y=!1}r=jh.prototype;r.destroy=function(){return this.l.destroy()};
216
+ function mh(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,nh(a),2);case 2:if(!a.j){b.A(3);break}C(b,4);return u(b,a.j.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.j=null;case 3:a.g=null,a.B.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.G=null,a.Y=!1,z(b)}})}r.configure=function(a){this.h=a};function oh(a,b,c,d){a.ia=!0;a.C=[];a.F=c;return ph(a,b,!!d)}
217
+ function qh(a,b,c,d){a.C=c;a.F=0<c.length;return ph(a,b,!!d)}function rh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}];g.set(b,e);return sh(a,g,[],!1)}
218
+ function ph(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,x,w,y;return L(function(D){if(1==D.g){if(d=th(a))for(e=t(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});h||(k=gh(a.h.servers),uh(b,k));l=t(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=vh(m),p=t(n),q=p.next();!q.done;q=p.next())v=q.value,wh(v,gh(a.h.servers),gh(a.h.advanced||{}));return c?
219
+ u(D,Uf(b,a.F,a.Y),2):(x=xh(a,b),D.A(2))}w=h||Object.keys(a.h.servers).length;if(!w)return a.M=!0,D["return"](Promise.resolve());y=sh(a,x,b,c);return D["return"](h?y:y["catch"](function(){}))})}
220
+ r.Lb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.ra(a,"encrypted",function(){b.m(new O(2,6,6010))}),e["return"]();b.j=a;b.o.ra(b.j,"play",function(){for(var f=t(b.K),g=f.next();!g.done;g=f.next())yh(b,g.value);b.T=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.j&&b.o.v(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return nh(b)});c=b.j.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});return u(e,
221
+ c,2)}Re(b.l);zh(b);b.g.initData.length||b.C.length||(d=function(f){return Ah(b,f.initDataType,gb(f.initData))},b.o.v(b.j,"encrypted",d));z(e)})};function Bh(a){var b;return L(function(c){if(1==c.g){if(!(a.s&&a.g&&a.g.serverCertificate&&a.g.serverCertificate.length))return c.A(0);C(c,3);return u(c,a.s.setServerCertificate(a.g.serverCertificate),5)}if(3!=c.g)return ua(c,0);b=F(c);throw new O(2,6,6004,b.message);})}
222
+ function Ch(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Dh(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ia=new se,d.push(e.Ia);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}function zh(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Ah(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Dh(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}
223
+ function Ah(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(db(c,e.value.initData)&&!Jb("Tizen 2"))return;Eh(a,b,c)}function Fh(a){return a?a.keySystem:""}function Gh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(Kb()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.B.has(b)||a.B.has(c)}return a.B.has(b)}
224
+ function Ih(a){a=a.i.keys();a=eh(a,function(b){return b.sessionId});return Array.from(a)}r.Pb=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.uc=function(){return hh(this.da)};
225
+ function xh(a,b){for(var c=new Set,d=t(b),e=d.next();!e.done;e=d.next()){var f=t(vh(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=t(c);for(e=d.next();!e.done;e=d.next())wh(e.value,gh(a.h.servers),gh(a.h.advanced||{}));f=a.F?"required":"optional";var g=a.F?["persistent-license"]:["temporary"];d=new Map;c=t(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
226
+ sessionTypes:g,label:e.keySystem,drmInfos:[]});c=t(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=t([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Jh(g),k=null;"ac-3"==g.codecs.toLowerCase()&&Kb()&&(k=Jh(g,"ec-3"));var l=t(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ia(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
230
227
  (e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m.sessionType&&(e.sessionTypes=[m.sessionType]);m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}
231
- function Th(a,b){var c=Me(a.mimeType,b||a.codecs);return Ie(c)?Ke(a.type,c):c}
232
- function zh(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,x,w;return L(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var C=t(c),D=C.next();!D.done;D=C.next()){var A=t(Ch(D.value));for(D=A.next();!D.done;D=A.next()){var E=D.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new N(2,6,6E3);C=t([!0,!1]);for(A=C.next();!A.done;A=C.next())for(A=A.value,E=t(c),D=E.next();!D.done;D=E.next()){var G=t(D.value.decodingInfos);for(D=G.next();!D.done;D=G.next()){var H=
233
- D.value;if(H.supported&&H.keySystemAccess){D=e.get(H.keySystemAccess.keySystem);var J=t(D);for(D=J.next();!D.done;D=J.next())if(!!D.value.licenseServerUri==A){f=H.keySystemAccess;break a}}}}f=null}y.v(2);break}return v(y,Uh(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new N(2,6,6001);bf(a.J);B(y,4);a.u.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=t(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.u.add(p.contentType.toLowerCase());r=t(l);for(n=r.next();!n.done;n=
234
- r.next())u=n.value,a.u.add(u.contentType.toLowerCase());if(d){A=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];H=new Set;Vh(C,E,D,G,H);J=a.F?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:E[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||J,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:D[0],initData:G,keyIds:H};C=t(C);for(E=
235
- C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(A.persistentStateRequired=E.persistentStateRequired);C=A}else C=g.keySystem,A=b.get(g.keySystem),E=[],D=[],G=[],H=new Set,Vh(A.drmInfos,E,D,G,H),C={keySystem:C,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",
236
- audioRobustness:(A.audioCapabilities?A.audioCapabilities[0].robustness:"")||"",videoRobustness:(A.videoCapabilities?A.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:H};a.i=C;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return v(y,g.createMediaKeys(),6);case 6:return x=y.h,bf(a.J),a.m=x,a.L=!0,v(y,Lh(a),7);case 7:bf(a.J);wa(y,0);break;case 4:w=F(y);bf(a.J,w);a.i=null;a.u.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
237
- function Uh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return L(function(u){switch(u.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t([!0,!1]);h=g.next();case 2:if(h.done){u.v(4);break}k=h.value;l=t(b.keys());m=l.next();case 5:if(m.done){h=g.next();u.v(2);break}n=m.value;p=b.get(n);r=p.drmInfos.some(function(x){return!!x.licenseServerUri});
238
- if(r!=k){u.v(6);break}B(u,8);return v(u,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=u.h,u["return"](c);case 8:F(u);case 9:bf(a.J);case 6:m=l.next();u.v(5);break;case 4:return u["return"](c)}})}
239
- function Ah(a){a=nh(a.o.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=mc(f),h=mc(e);g={kty:"oct",kid:kc(g,!1),k:kc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:qb(Ab(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
228
+ function Jh(a,b){var c=Be(a.mimeType,b||a.codecs);return xe(c)?ze(a.type,c):c}
229
+ function sh(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,x,w;return L(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var D=t(c),B=D.next();!B.done;B=D.next()){var A=t(vh(B.value));for(B=A.next();!B.done;B=A.next()){var E=B.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new O(2,6,6E3);D=t([!0,!1]);for(A=D.next();!A.done;A=D.next())for(A=A.value,E=t(c),B=E.next();!B.done;B=E.next()){var G=t(B.value.decodingInfos);for(B=G.next();!B.done;B=G.next()){var H=
230
+ B.value;if(H.supported&&H.keySystemAccess){B=e.get(H.keySystemAccess.keySystem);var K=t(B);for(B=K.next();!B.done;B=K.next())if(!!B.value.licenseServerUri==A){f=H.keySystemAccess;break a}}}}f=null}y.A(2);break}return u(y,Nh(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new O(2,6,6001);Re(a.l);C(y,4);a.B.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=t(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.B.add(p.contentType.toLowerCase());q=t(l);for(n=q.next();!n.done;n=
231
+ q.next())v=n.value,a.B.add(v.contentType.toLowerCase());if(d){A=g.keySystem;D=e.get(g.keySystem);E=[];B=[];G=[];H=new Set;Oh(D,E,B,G,H);K=a.F?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:E[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||K,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:B[0],initData:G,keyIds:H};D=t(D);for(E=
232
+ D.next();!E.done;E=D.next())E=E.value,E.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(A.persistentStateRequired=E.persistentStateRequired);D=A}else D=g.keySystem,A=b.get(g.keySystem),E=[],B=[],G=[],H=new Set,Oh(A.drmInfos,E,B,G,H),D={keySystem:D,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",
233
+ audioRobustness:(A.audioCapabilities?A.audioCapabilities[0].robustness:"")||"",videoRobustness:(A.videoCapabilities?A.videoCapabilities[0].robustness:"")||"",serverCertificate:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(y,g.createMediaKeys(),6);case 6:return x=y.h,Re(a.l),a.s=x,a.M=!0,u(y,Bh(a),7);case 7:Re(a.l);ua(y,0);break;case 4:w=F(y);Re(a.l,w);a.g=null;a.B.clear();if(w instanceof O)throw w;throw new O(2,6,6002,w.message);}})}
234
+ function Nh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){switch(v.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t([!0,!1]);h=g.next();case 2:if(h.done){v.A(4);break}k=h.value;l=t(b.keys());m=l.next();case 5:if(m.done){h=g.next();v.A(2);break}n=m.value;p=b.get(n);q=p.drmInfos.some(function(x){return!!x.licenseServerUri});
235
+ if(q!=k){v.A(6);break}C(v,8);return u(v,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=v.h,v["return"](c);case 8:F(v);case 9:Re(a.l);case 6:m=l.next();v.A(5);break;case 4:return v["return"](c)}})}
236
+ function th(a){a=gh(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Zb(f),h=Zb(e);g={kty:"oct",kid:Xb(g,!1),k:Xb(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:gb(qb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
240
237
  sessionType:"",initData:d,keyIds:new Set(c)}}
241
- function Nh(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.m.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.B(c,"message",function(k){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.I.push(k):Fh(a,k)});a.h.B(c,"keystatuseschange",function(k){return Wh(a,k)});e={initData:null,loaded:!1,zd:Infinity,Ma:null,type:"persistent-license"};a.j.set(c,e);B(h,2);return v(h,c.load(b),4);case 4:f=h.h;bf(a.J);
242
- if(!f)return a.j["delete"](c),a.l(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Xh(a)&&a.s.resolve();return h["return"](c);case 2:g=F(h),bf(a.J,g),a.j["delete"](c),a.l(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
243
- function Oh(a,b,c){var d=a.i.sessionType;try{var e=a.m.createSession(d)}catch(f){a.l(new N(2,6,6005,f.message));return}a.h.B(e,"message",function(f){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.I.push(f):Fh(a,f)});a.h.B(e,"keystatuseschange",function(f){return Wh(a,f)});a.j.set(e,{initData:c,loaded:!1,zd:Infinity,Ma:null,type:d});try{c=a.o.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.l(b);return}a.o.logLicenseExchange&&kc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.J.g){a.j["delete"](e);
244
- var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.l(new N(2,6,6006,f.message,f,h))}})}function Yh(a,b,c){"skd"==b&&(b=c.serverCertificate,c=lh(a),a=mh(a,c,b));return a}
245
- function Fh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;L(function(w){switch(w.g){case 1:return c=b.target,a.o.logLicenseExchange&&kc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.o.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=dh([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Qh(a.i.keySystem)&&Zh(g),h=Date.now(),B(w,2),l=a.D.Cb.request(2,g),v(w,
246
- l.promise,4);case 4:k=w.h;wa(w,3);break;case 2:return m=F(w),n=new N(2,6,6007,m),a.l(n),d&&d.Ma&&d.Ma.reject(n),w["return"]();case 3:if(a.J.g)return w["return"]();a.H+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&kc(k.data);B(w,5);return v(w,c.update(k.data),7);case 7:wa(w,6);break;case 5:return p=F(w),r=new N(2,6,6008,p.message),a.l(r),d&&d.Ma&&d.Ma.reject(r),w["return"]();case 6:u=new R("drmsessionupdate"),a.D.onEvent(u),d&&(d.Ma&&d.Ma.resolve(),x=new P(function(){d.loaded=!0;Xh(a)&&a.s.resolve()}),
247
- x.V($h)),z(w)}})}function Zh(a){var b=xb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=lc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
248
- function Wh(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Qh(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=tb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=nc(h);a.ra.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ma&&(a.j["delete"](c),c.close()["catch"](function(){}));
249
- Xh(a)&&(a.s.resolve(),a.T.V(ai))}function rh(a){var b=a.ra,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new N(2,6,6014));a.D.Ic(oh(c))}
250
- function bi(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
251
- c],f=new Map,g=function(l){var m,n,p;return L(function(r){switch(r.g){case 1:return B(r,2),v(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,bc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),v(r,m.createMediaKeys(),5);case 5:wa(r,0);break;case 2:F(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),v(k,Promise.all(h),2)):k["return"](oh(f))})}
252
- function ci(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).V(di)}),B(c,2),v(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);F(c);z(c)})}
253
- function uh(a){var b;return L(function(c){b=Array.from(a.j.entries());a.j.clear();return v(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return B(g,2),a.qa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?v(g,ci(e),5):v(g,e.remove(),5);if(2!=g.g)return wa(g,0);F(g);z(g)})})),0)})}
254
- function dg(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=Th(c),!Rh(a,c))||d&&d.encrypted&&(d=Th(d),!Rh(a,d)))return!1;var e=Ph(a.i);d=Ch(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
255
- function ei(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Fa:f.Fa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Fa=[];f.Fa=f.Fa.concat(e.initData||[]);f.Fa=f.Fa.concat(h.initData||[]);f.Fa=f.Fa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Fa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ka(e.keyIds),ka(h.keyIds))):
256
- e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,initData:f.Fa,keyIds:g});break}}return c}
257
- function Ch(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function sh(a){a.j.forEach(function(b,c){var d=b.zd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.zd=e)})}function Xh(a){a=a.j.values();return hb(a,function(b){return b.loaded})}
258
- function Bh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
259
- function Vh(a,b,c,d,e){var f={};a=t(a);for(var g=a.next();!g.done;f={za:f.za},g=a.next()){f.za=g.value;b.includes(f.za.licenseServerUri)||b.push(f.za.licenseServerUri);f.za.serverCertificate&&(c.some(function(l){return function(m){return ob(m,l.za.serverCertificate)}}(f))||c.push(f.za.serverCertificate));if(f.za.initData){g={};for(var h=t(f.za.initData),k=h.next();!k.done;g={kc:g.kc},k=h.next())g.kc=k.value,d.some(function(l){return function(m){var n=l.kc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
260
- n.initDataType&&ob(m.initData,n.initData)}}(g))||d.push(g.kc)}if(f.za.keyIds)for(g=t(f.za.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
261
- function Dh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
262
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var di=1,$h=5,ai=.5,fi=new ub(function(){return rb(new Uint8Array([0]))});function gi(){}function hi(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=ii[d.toLowerCase()]))return k["return"](e);if(f=ji(a))if(g=ki[f])return k["return"](g);return d?k.v(2):v(k,li(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ii[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
263
- function li(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=dh([a],c),d.method="HEAD",v(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ji(a){a=(new je(a)).ya.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",gi);gi.unregisterParserByMime=function(a){delete ii[a]};gi.registerParserByMime=function(a,b){ii[a]=b};
264
- gi.registerParserByExtension=function(a,b){ki[a]=b};var ii={},ki={};function mi(a,b,c){this.na=a;this.ka=b;this.fa=c}mi.prototype.Wb=function(){return this.ka};mi.prototype.Sb=function(){return this.fa};function ni(a,b){return a&&b?a.Wb()==b.Wb()&&a.Sb()==b.Sb()&&wc(a.na(),b.na()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.Sb;mi.prototype.getStartByte=mi.prototype.Wb;
265
- function oi(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.ka=d;this.fa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}q=oi.prototype;q.na=function(){return this.i()};q.df=function(){return this.startTime};q.Re=function(){return this.endTime};q.Wb=function(){return this.ka};q.Sb=function(){return this.fa};M("shaka.media.SegmentReference",oi);oi.prototype.getEndByte=oi.prototype.Sb;oi.prototype.getStartByte=oi.prototype.Wb;
266
- oi.prototype.getEndTime=oi.prototype.Re;oi.prototype.getStartTime=oi.prototype.df;oi.prototype.getUris=oi.prototype.na;function T(a,b,c){this.j=a;this.Lc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.C=0;this.F=void 0===c?!0:c;this.H=0}q=T.prototype;q.getDuration=function(){return this.l};q.Xe=function(){return this.g};q.La=function(a){this.l=a};q.cf=function(){return this.j};q.se=function(a){this.s=a};q.ec=function(a){this.u=a};q.Od=function(a){this.m=a};q.Jf=function(a){this.Lc=a};q.Qe=function(){return this.Lc};
267
- q.Db=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.xd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.xd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.wd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Z=function(){return Infinity==this.l&&!this.u};
268
- q.mb=function(){return Infinity!=this.l&&!this.u};q.ab=function(){return Math.max(this.C,this.ib()-this.m)};q.te=function(a){this.C=a};q.ib=function(){return this.Z()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.H,this.l):this.h||this.l};q.Vb=function(a){var b=Math.max(this.i,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ib()-this.m+a,this.Sa()))};q.zb=function(){return this.Vb(0)};
269
- q.Sa=function(){return Math.max(0,this.ib()-(this.Z()||this.mb()?this.Lc:0))};q.we=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.re=function(a){this.H=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.re;T.prototype.usingPresentationStartTime=T.prototype.we;T.prototype.getSeekRangeEnd=T.prototype.Sa;T.prototype.getSeekRangeStart=T.prototype.zb;T.prototype.getSafeSeekRangeStart=T.prototype.Vb;T.prototype.getSegmentAvailabilityEnd=T.prototype.ib;
270
- T.prototype.setUserSeekStart=T.prototype.te;T.prototype.getSegmentAvailabilityStart=T.prototype.ab;T.prototype.isInProgress=T.prototype.mb;T.prototype.isLive=T.prototype.Z;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.wd;T.prototype.notifyMinSegmentStartTime=T.prototype.xd;T.prototype.notifySegments=T.prototype.Db;T.prototype.getDelay=T.prototype.Qe;T.prototype.setDelay=T.prototype.Jf;T.prototype.setSegmentAvailabilityDuration=T.prototype.Od;
271
- T.prototype.setStatic=T.prototype.ec;T.prototype.setClockOffset=T.prototype.se;T.prototype.getPresentationStartTime=T.prototype.cf;T.prototype.setDuration=T.prototype.La;T.prototype.getMaxSegmentDuration=T.prototype.Xe;T.prototype.getDuration=T.prototype.getDuration;function pi(a,b){this.j=a;this.m=qi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}pi.prototype.release=function(){this.j=null;this.i=function(){}};function ri(a,b){a.i=b}function si(a){this.g=a}function qi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(ge(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function ti(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.o=c;this.u=e;this.h=new ef;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.B(a,"waiting",function(){return ui(f)});this.l=(new P(function(){ui(f)})).Da(.25)}ti.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.C=this.u=null};ti.prototype.Bd=function(){this.m=!0;ui(this)};
272
- function ui(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=qi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.s&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.o.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=he(b,g,a.o.gapDetectionThreshold);if(!(null==
273
- c||0==c&&!a.m||(d=b.start(c),d>=a.C.Sa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new R("largegap",g),g.cancelable=!0,a.u(g),a.o.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function vi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wi.value().get(b),c.wa(a,b,d))}var wi=new ub(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function xi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new yi(a);vi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zi(d,d.j)})}xi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ai(a){return a.m?a.g.currentTime:a.j}function Bi(a,b){0<a.g.readyState?Ci(a.i,b):vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){zi(a,a.j)})}
274
- function zi(a,b){.001>Math.abs(a.g.currentTime-b)?Di(a):(a.h.wa(a.g,"seeking",function(){Di(a)}),Ci(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Di(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function yi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}yi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
275
- function Ci(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Ei(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.wa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new ef;vi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Ei.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Ei.prototype.m=function(a){this.i=this.j?this.i:a};Ei.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Ei.prototype.F=function(){};
276
- function Fi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.o=c;this.C=e;this.u=null;this.j=new ti(a,b.presentationTimeline,c,Gi(a,c),f);this.h=new xi(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Ai(g.h);h=Hi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Bi(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Ii(this,d));this.s=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ai(g.h),k=g.g.zb(),l=g.g.Sa();3>l-k&&(k=
277
- l-3);h<k&&(h=Hi(g,h),g.i.currentTime=h)}})).Da(.25)}Fi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.o=null;this.C=function(){}};Fi.prototype.m=function(a){Bi(this.h,a)};Fi.prototype.l=function(){var a=Ai(this.h);return 0<this.i.readyState&&!this.i.paused?Ji(this,a):a};
278
- function Ii(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.zb():a.g.Sa():0>b&&(b=a.g.Sa()+b);return Ki(a,Ji(a,b))}Fi.prototype.F=function(){this.j.Bd()};function Ki(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Hi(a,b){var c=Math.max(a.H,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.zb(),f=a.g.Sa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Vb(c),k=a.g.Vb(d);c=a.g.Vb(c+d);return b>=g?Ki(a,b):b>f?f:b<e?ee(a.i.buffered,k)?k:c:b>=h||ee(a.i.buffered,b)?b:c}
279
- function Ji(a,b){var c=a.g.zb();if(b<c)return c;c=a.g.Sa();return b>c?c:b}function Gi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new pi(new si(a),b.stallThreshold);ri(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=U.prototype;q.destroy=function(){Gb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.nf=function(){this.i=!0};
280
- q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};q.offset=function(a){if(!this.i)for(var b=t(this.M),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
281
- q.Gc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ka(a)))};q.Bb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Gc(a);this.gb(b)};q.gb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
282
- q.$a=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new oi(a.startTime,b,a.i,a.ka,a.fa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
283
- q.Oc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ka(d)):(c.g.stop(),c.g=null)}),this.g.Da(a))};U.prototype[Symbol.iterator]=function(){return this.yb(0)};U.prototype.yb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Li(this,b,d)};
284
- function Mi(a,b,c){return new U([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Mi;U.prototype.getIteratorForTime=U.prototype.yb;U.prototype.updateEvery=U.prototype.Oc;U.prototype.fit=U.prototype.$a;U.prototype.evict=U.prototype.gb;U.prototype.mergeAndEvict=U.prototype.Bb;U.prototype.merge=U.prototype.Gc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.nf;
285
- U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Li(a,b,c){this.i=a;this.h=b;this.g=c}Li.prototype.seek=function(a){Gb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.yb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
286
- Li.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.na().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Li.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.na().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Li);Li.prototype.next=Li.prototype.next;Li.prototype.current=Li.prototype.current;
287
- Li.prototype.seek=Li.prototype.seek;function Ni(){U.call(this,[]);this.j=[]}ra(Ni,U);q=Ni.prototype;q.clone=function(){var a=new Ni;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};
288
- q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Gc=function(){};q.gb=function(){};q.Bb=function(){};q.$a=function(){};q.Oc=function(){};M("shaka.media.MetaSegmentIndex",Ni);Ni.prototype.updateEvery=Ni.prototype.Oc;Ni.prototype.fit=Ni.prototype.$a;Ni.prototype.mergeAndEvict=Ni.prototype.Bb;Ni.prototype.evict=Ni.prototype.gb;Ni.prototype.merge=Ni.prototype.Gc;
289
- Ni.prototype.offset=Ni.prototype.offset;Ni.prototype.get=Ni.prototype.get;Ni.prototype.find=Ni.prototype.find;Ni.prototype.release=Ni.prototype.release;function Oi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Dc();this.h=new P(function(){b.g.ie(.25*b.i)})}Oi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Oi.prototype.set=function(a){this.i=a;Pi(this)};Oi.prototype.Ac=function(){return this.g.Ac()};function Pi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Dc()!=b&&a.g.Nd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Dc()&&a.g.Nd(0)};function Qi(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Ri(b,!1)})).Da(.25)}Qi.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
290
- function Ri(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?Si:e>h.endTime?Ti:Ui;d.j.set(h,l);for(var m=t(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.tb==k&&n.sb==l&&n.lb(h,f)}}};function Vi(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new P(function(){for(var c=b.j(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).Da(2)}Vi.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function Wi(a,b){a.h=b};function Xi(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{tb:null,sb:Ui,lb:function(c,d){return b.g(c,d)}},{tb:Si,sb:Ui,lb:function(c,d){return b.g(c,d)}},{tb:Ti,sb:Ui,lb:function(c,d){return b.g(c,d)}},{tb:Ui,sb:Si,lb:function(c,d){return b.h(c,d)}},{tb:Ui,sb:Ti,lb:function(c,d){return b.h(c,d)}},{tb:Si,sb:Ti,lb:function(c,d){return b.i(c,d)}},{tb:Ti,sb:Si,lb:function(c,d){return b.i(c,d)}}]}
291
- Xi.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function Yi(a,b,c,d){a.g=b;a.h=c;a.i=d}var Si=1,Ui=2,Ti=3;function Zi(a,b,c,d,e){a=dh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function $i(a,b){var c=this;this.D=b;this.A=a;this.o=null;this.l=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.j=!1;this.J=new af(function(){return aj(c)})}$i.prototype.destroy=function(){return this.J.destroy()};function aj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,bj(e),b.push(cj(e));return v(f,Promise.all(b),2)}a.g.clear();a.D=null;a.A=null;a.o=null;z(f)})}
292
- $i.prototype.configure=function(a){this.o=a;this.s=new Kg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};$i.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return v(b,dj(a),2);bf(a.J);a.m=!0;z(b)})};
293
- function ej(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=Ce,B(k,2),v(k,Cf(a.D.S,c.ba),4);case 4:wa(k,3);break;case 2:if(d=F(k),a.D)a.D.onError(d);case 3:e=Me(b.mimeType,b.codecs);qf(a.D.S,e);f=a.D.S.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=fj(b),a.g.set(c.ba,h),gj(a,h,0);z(k)}})}function hj(a){var b=a.g.get(Be);b&&(bj(b),cj(b)["catch"](function(){}),a.g["delete"](Be));a.i=null}
294
- function ij(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.pb&&(jj(a,e,!1,0,!1),c.pb=d)}else if(d=c.pb)c.pb=null,jj(a,d,!0,0,!1)}}function kj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.m&&(b.video&&jj(a,b.video,c,d,e),b.audio&&jj(a,b.audio,c,d,e))}function lj(a,b){a.i=b;a.m&&jj(a,b,!0,0,!1)}
295
- function jj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Be?f&&(f.pb&&(b.trickModeVideo?(f.pb=b,b=b.trickModeVideo):f.pb=null),f.stream!=b||e)&&(b.type==Be&&qf(a.D.S,Me(b.mimeType,b.codecs)),f.stream=b,f.da=null,c&&(f.Qb?f.Rc=!0:f.Ta?(f.rb=!0,f.wc=d,f.Rc=!0):(bj(f),mj(a,f,!0,d)["catch"](function(g){if(a.D)a.D.onError(g)}))),nj(a,f)["catch"](function(g){if(a.D)a.D.onError(g)})):ej(a,b)}
296
- function nj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.xa)return e["return"]();c=b.stream;d=b.xa;return c.segmentIndex?e.v(2):v(e,c.createSegmentIndex(),2)}if(b.xa!=d||b.stream!=c)return e["return"]();var f=a.D.Cc();var g=vf(a.D.S,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.fa?k.fa-k.ka:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.fa?k.fa-k.ka:null)||0),k=a.D.getBandwidthEstimate(),
297
- f=8*h/k<(g||0)-f-Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal)||b.xa.h.g>h?!0:!1):f=!1;f&&b.xa.abort();z(e)})}function oj(a,b){b.Qb||b.rb||(b.Ta?(b.rb=!0,b.wc=0):null==tf(a.D.S,b.type)?null==b.Na&&gj(a,b,0):(bj(b),mj(a,b,!1,0)["catch"](function(c){if(a.D)a.D.onError(c)})))}
298
- function dj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=Ce;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.eb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Pa,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ba,a.i),d.add(a.i));e=a.D.S;f=a.o.forceTransmuxTS;return v(n,e.init(c,f),2)}bf(a.J);var p=a.A.presentationTimeline.getDuration();Infinity>p?a.D.S.La(p):a.D.S.La(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
299
- (m=fj(l),a.g.set(k,m),gj(a,m,0));z(n)})}function fj(a){return{stream:a,type:a.type,da:null,Ca:null,Fc:null,td:null,sd:null,rd:null,pb:null,endOfStream:!1,Ta:!1,Na:null,rb:!1,wc:0,Rc:!1,Qb:!1,Ed:!1,Xb:!1,xa:null}}
300
- $i.prototype.$b=function(a){var b=this,c,d,e,f,g;return L(function(h){switch(h.g){case 1:bf(b.J);if(a.Ta||null==a.Na||a.Qb)return h["return"]();a.Na=null;if(!a.rb){h.v(2);break}return v(h,mj(b,a,a.Rc,a.wc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.v(4);break}c=a.stream;return v(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Na&&gj(b,a,0),h["return"]();case 4:B(h,6);d=pj(b,a);null!=d&&(gj(b,a,d),a.Xb=!1);wa(h,7);break;case 6:return e=F(h),v(h,qj(b,e),
301
- 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.v(0);break}return v(h,b.D.S.endOfStream(),10);case 10:bf(b.J),g=b.D.S.getDuration(),0!=g&&g<b.A.presentationTimeline.getDuration()&&b.A.presentationTimeline.La(g),z(h)}})};
302
- function pj(a,b){if(rj(b))return Af(a.D.S,b.stream.originalId||""),null;b.type==Be&&Bf(a.D.S);var c=a.D.Cc(),d=b.Ca?b.Ca.endTime:c,e=wf(a.D.S,b.type,c),f=Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.l;if(d>=a.A.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Be))&&rj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=vf(a.D.S,b.type);e=sj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.g.values());g=t(g);for(var h=
303
- g.next();!h.done;h=g.next())h=h.value,rj(h)||h.da&&!h.da.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.A.presentationTimeline.g)return 1;tj(a,b,c,e)["catch"](function(){});return null}
304
- function sj(a,b,c,d){if(b.da)return b.da.current();if(b.Ca||d)return b.da=b.stream.segmentIndex.yb(b.Ca?b.Ca.endTime:d),b.da&&b.da.next().value;a=a.o.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.da=b.stream.segmentIndex.yb(d),e=b.da&&b.da.next().value);e||(b.da=b.stream.segmentIndex.yb(c),e=b.da&&b.da.next().value);return e}
305
- function tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,x;return L(function(w){switch(w.g){case 1:return e=Ce,f=b.stream,g=b.da,b.Ta=!0,B(w,2),v(w,uj(a,b,d),4);case 4:bf(a.J);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.o.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var C,D,A;return L(function(E){bf(a.J);if(a.j)return E["return"]();n=vj(n,y);C=!1;D=0;(new Ob).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.v(0);
306
- A=n.subarray(0,D);n=n.subarray(D);return v(E,wj(a,b,c,f,d,A),0)})},v(w,xj(a,b,d,p),6);l=xj(a,b,d);return v(w,l,7);case 7:return m=w.h,bf(a.J),a.j?w["return"]():b.rb?(b.Ta=!1,gj(a,b,0),w["return"]()):v(w,wj(a,b,c,f,d,m),6);case 6:bf(a.J);if(a.j)return w["return"]();b.Ca=d;g.next();b.Ta=!1;b.Ed=!1;r=a.D.S.zc();u=r[b.type];bb(JSON.stringify(u));b.rb||a.D.Bd();gj(a,b,0);wa(w,0);break;case 2:x=F(w);bf(a.J,x);if(a.j)return w["return"]();b.Ta=!1;if(7001==x.code)b.Ta=!1,b.Na=null,gj(a,b,0),w.v(0);else if(b.type==
307
- e.ba&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ba),w.v(0);else if(3017==x.code)yj(a,b,x),w.v(0);else if(1001==x.code&&x.data&&404==x.data[1])b.Ta=!1,b.Na=null,gj(a,b,1),w.v(0);else return b.Xb=!0,x.severity=2,v(w,qj(a,x),0)}})}function vj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
308
- function yj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Ed})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Xb=!0;a.j=!0;a.D.onError(c);return}b.Ed=!0}gj(a,b,4)}
309
- function uj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.td||e!=b.sd||f!=b.rd)h=function(){var n;return L(function(p){if(1==p.g)return B(p,2),b.sd=e,b.rd=f,b.td=g,v(p,Df(a.D.S,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=F(p);b.sd=null;b.rd=null;b.td=null;throw n;})},d.push(h());!ni(c.h,b.Fc)&&(b.Fc=c.h)&&(k=xj(a,b,c.h),l=function(){var n,p,r;return L(function(u){switch(u.g){case 1:return B(u,2),v(u,k,4);
310
- case 4:return n=u.h,bf(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,v(u,xf(a.D.S,b.type,n,null,null,p),5);case 5:wa(u,0);break;case 2:throw r=F(u),b.Fc=null,r;}})},d.push(l()));return v(m,Promise.all(d),0)})}
311
- function wj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Ob).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.bc();var n=k.reader.bc();var p=k.reader.N();var r=k.reader.N();var u=k.reader.N();var x=k.reader.N();var w=e.startTime+r/p}else p=k.reader.N(),w=k.reader.Hb()/p+e.timestampOffset,r=w-e.startTime,u=k.reader.N(),x=k.reader.N(),m=k.reader.bc(),n=k.reader.bc();
312
- k=k.reader.bb(k.reader.R.byteLength-k.reader.$());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.D.sf():(l=(new Map).set("detail",{startTime:w,endTime:w+u/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:u,id:x,messageData:k}),l=new R(zj,l),a.D.onEvent(l)))}).parse(f),v(h,Aj(a,b,c),2);if(3!=h.g)return bf(a.J),v(h,xf(a.D.S,b.type,f,e.startTime,e.endTime,g),3);bf(a.J);z(h)})}
313
- function Aj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.A.presentationTimeline.g);e=tf(a.D.S,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():v(h,a.D.S.remove(b.type,e,e+g),2)}bf(a.J);z(h)})}function rj(a){return a&&a.type==Be&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
314
- function xj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=jh,f=Zi(c.na(),c.ka,c.fa,a.o.retryParameters,d),g=a.D.Cb.request(e,f),b.xa=g,v(k,g.promise,2);h=k.h;b.xa=null;return k["return"](h.data)})}
315
- function mj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.rb=!1,b.Rc=!1,b.wc=0,b.Qb=!0,b.Ca=null,b.Fc=null,b.da=null,d?(e=a.D.Cc(),f=a.D.S.getDuration(),v(g,a.D.S.remove(b.type,e+d,f),3)):v(g,Cf(a.D.S,b.type),4);if(3!=g.g)return bf(a.J),c?v(g,a.D.S.flush(b.type),3):g.v(3);bf(a.J);b.Qb=!1;b.endOfStream=!1;gj(a,b,0);z(g)})}
316
- function gj(a,b,c){var d=b.type;if(d!=Be||a.g.has(d))b.Na=(new Xb(function(){var e;return L(function(f){if(1==f.g)return B(f,2),v(f,a.$b(b),4);if(2!=f.g)return wa(f,0);e=F(f);if(a.D)a.D.onError(e);z(f)})})).V(c)}function bj(a){null!=a.Na&&(a.Na.stop(),a.Na=null)}function cj(a){return L(function(b){return a.xa?v(b,a.xa.abort(),0):b.v(0)})}function qj(a,b){return L(function(c){if(1==c.g)return v(c,Mg(a.s),2);bf(a.J);a.D.onError(b);b.handled||a.o.failureCallback(b);z(c)})};function Bj(a,b){var c=Cj(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Dj(d)});this.J=new af(function(){return Ej(d)})}Bj.prototype.destroy=function(){return this.J.destroy()};function Ej(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Fj(a),v(e,a.u,2);a.g&&a.g.Ja.nb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.nb();a.g=null;a.m=[];a.j=null;z(e)})}
317
- function Gj(a,b){var c={Eb:function(){},Hc:function(){},nb:function(){},onError:function(){},Jc:function(){},sg:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();Fj(a);return c}
318
- function Dj(a){return L(function(b){if(a.J.g)b=b.v(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ja.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Eb(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ja:c.Ja}):c.Ja.Jc();c=!0}c?c=Promise.resolve():a.g?c=Hj(a):(a.j.rf(a.i),a.s=new De,c=a.s);b=v(b,c,1)}return b})}
319
- function Hj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.Ze(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Ne(a.i,a.l,a.g.payload),v(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ja.Hc(),a.g=null);wa(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ja.nb();else a.g.Ja.onError(b);a.g=null;a.h=null;c=a;return v(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Fj(a){a.s&&(a.s.resolve(),a.s=null)};function Ij(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Ij.prototype;q.remove=function(a,b){if(!this.g)return!1;Jj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
320
- q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Gb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
321
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={ub:e.ub},f=c.next())e.ub=f.value,a.some(function(g){return function(h){return h.startTime==g.ub.startTime&&h.endTime==g.ub.endTime&&h.text==g.ub.payload?!0:!1}}(e))||(f=Kj(e.ub))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
322
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Jj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
323
- function Kj(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;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(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}
324
- function Jj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Ij);Ij.prototype.setTextVisibility=Ij.prototype.setTextVisibility;Ij.prototype.isTextVisible=Ij.prototype.isTextVisible;Ij.prototype.destroy=Ij.prototype.destroy;Ij.prototype.append=Ij.prototype.append;Ij.prototype.remove=Ij.prototype.remove;function Lj(){}function Mj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Lj);Lj.removeAllChildren=Mj;function Nj(a,b){var c=this;this.m=!1;this.l=[];this.g=a;this.u=b;this.i=document.createElement("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.u.appendChild(this.i);this.C=(new P(function(){Oj(c)})).Da(.25);this.j=new Map;this.h=new ef;this.h.B(document,"fullscreenchange",function(){Oj(c,!0)});this.s=null;"ResizeObserver"in
325
- window&&(this.s=new ResizeObserver(function(){Oj(c,!0)}),this.s.observe(this.i))}q=Nj.prototype;q.append=function(a){var b=[].concat(ka(this.l)),c={};a=t(a);for(var d=a.next();!d.done;c={ic:c.ic},d=a.next())c.ic=d.value,b.some(function(e){return function(f){return Ic(f,e.ic)}}(c))||this.l.push(c.ic);Oj(this)};
326
- q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.m=!1;this.l=[];this.C&&this.C.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.s&&(this.s.disconnect(),this.s=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Oj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};
327
- function Pj(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ye:null;l&&(g.push(l.Vd),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Qj(a,k,e),l=a.j.get(k),n=l.ye,f=!0));0<k.nestedCues.length&&n&&Pj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
328
- h=t(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Vd)}}function Oj(a,b){if(a.i){var c=a.g.currentTime;(!a.m||(void 0===b?0:b))&&0<a.j.size&&(Mj(a.i),a.j.clear());if(a.m){for(var d=new Map,e=t(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Pj(a,a.l,a.i,c,[])}}}
329
- function Qj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Gb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";var f=document.createElement(e);"br"!=e&&Rj(a,f,b,c);c=f;!d&&b.nestedCues.length&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),f.appendChild(c));a.j.set(b,{Vd:f,ye:c})}
330
- function Rj(a,b,c,d){var e=b.style,f=0==c.nestedCues.length,g=1<d.length;e.whiteSpace="pre-wrap";var h=c.payload.replace(/\s+$/g,function(l){return"\u00a0".repeat(l.length)});e.backgroundColor=c.backgroundColor;e.border=c.border;e.color=c.color;e.direction=c.direction;e.opacity=c.opacity;e.paddingLeft=Sj(c.linePadding,c,a.u);e.paddingRight=Sj(c.linePadding,c,a.u);if(c.backgroundImage)e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition=
331
- "center";else{if(c.nestedCues.length)var k=b;else k=document.createElement("span"),b.appendChild(k);c.border&&(k.style.border=c.border);(b=Tj(d,function(l){return l.backgroundColor}))?k.style.backgroundColor=b:h&&(k.style.backgroundColor="rgba(0, 0, 0, 0.8)");h&&(k.textContent=h)}g?e.display="inline":(e.display="flex",e.flexDirection="column",e.alignItems="center",e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");f||(e.margin="0");e.fontFamily=c.fontFamily;
332
- e.fontWeight=c.fontWeight.toString();e.fontStyle=c.fontStyle;e.letterSpacing=c.letterSpacing;e.fontSize=Sj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(e.position="absolute",e.left="0",e.top="0",c.writingMode==Cc?(e.width="100%",c.lineAlign==Ec?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(e.height="100%",c.lineAlign==Ec?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%")):(e.height="100%",c.lineAlign==Ec?e.right=c.line+"%":"end"==c.lineAlign&&
333
- (e.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Pc?"%":"px",f=c.region.viewportAnchorUnits==Pc?"%":"px",e.height=c.region.height+(c.region.heightUnits==Pc?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+f,e.left=c.region.viewportAnchorX+f);e.lineHeight=c.lineHeight;c.position&&(c.writingMode==Cc?e.paddingLeft=c.position:e.paddingTop=c.position);"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right");
334
- e.textAlign=c.textAlign;e.textDecoration=c.textDecoration.join(" ");e.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Cc?e.width=c.size+"%":e.height=c.size+"%")}
335
- function Sj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Nf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Nf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Tj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Nj);Nj.prototype.setTextVisibility=Nj.prototype.setTextVisibility;
336
- Nj.prototype.isTextVisible=Nj.prototype.isTextVisible;Nj.prototype.remove=Nj.prototype.remove;Nj.prototype.destroy=Nj.prototype.destroy;Nj.prototype.append=Nj.prototype.append;function Uj(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Gb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
337
- g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}M("shaka.text.WebVttGenerator",function(){});function Vj(){}
338
- function Wj(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Wg(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Wg(l)),k=Wj(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Va("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Va("Invalid config, unrecognized key "+
339
- k),g=!1)}return g}function Xj(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}M("shaka.util.ConfigUtils",Vj);Vj.convertToConfigObject=Xj;Vj.mergeConfigObjects=Wj;function Yj(){}
340
- function Zj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Lg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Yh,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Lg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
238
+ function Dh(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.v(c,"message",function(k){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.T?a.K.push(k):yh(a,k)});a.o.v(c,"keystatuseschange",function(k){return Ph(a,k)});e={initData:null,loaded:!1,qd:Infinity,Ia:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;Re(a.l);
239
+ if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Qh(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),Re(a.l,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
240
+ function Eh(a,b,c){var d=a.g.sessionType;try{var e=a.s.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.o.v(e,"message",function(f){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.T?a.K.push(f):yh(a,f)});a.o.v(e,"keystatuseschange",function(f){return Ph(a,f)});a.i.set(e,{initData:c,loaded:!1,qd:Infinity,Ia:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Xb(c);e.generateRequest(b,c)["catch"](function(f){if(!a.l.g){a.i["delete"](e);
241
+ var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new O(2,6,6006,f.message,f,h))}})}function Rh(a,b,c){"skd"==b&&(b=c.serverCertificate,c=ch(a),a=dh(a,c,b));return a}
242
+ function yh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,x;L(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Xb(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Vg([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Gh(a.g.keySystem)&&Sh(g),h=Date.now(),C(w,2),l=a.G.xb.request(2,g),u(w,
243
+ l.promise,4);case 4:k=w.h;ua(w,3);break;case 2:return m=F(w),n=new O(2,6,6007,m),a.m(n),d&&d.Ia&&d.Ia.reject(n),w["return"]();case 3:if(a.l.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Xb(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:ua(w,6);break;case 5:return p=F(w),q=new O(2,6,6008,p.message),a.m(q),d&&d.Ia&&d.Ia.reject(q),w["return"]();case 6:v=new Q("drmsessionupdate"),a.G.onEvent(v),d&&(d.Ia&&d.Ia.resolve(),x=new P(function(){d.loaded=!0;Qh(a)&&a.u.resolve()}),
244
+ x.R(Th)),z(w)}})}function Sh(a){var b=nb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Yb(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
245
+ function Ph(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Gh(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=jb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=$b(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ia&&(a.i["delete"](c),c.close()["catch"](function(){}));
246
+ Qh(a)&&(a.u.resolve(),a.V.R(Uh))}function kh(a){var b=a.ja,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.Bc(hh(c))}
247
+ function Vh(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
248
+ c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Jb("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:ua(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](hh(f))})}
249
+ function Wh(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).R(Xh)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);z(c)})}
250
+ function nh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return C(g,2),a.ia||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Wh(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);F(g);z(g)})})),0)})}
251
+ function Tf(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=Jh(c),!Hh(a,c))||d&&d.encrypted&&(d=Jh(d),!Hh(a,d)))return!1;var e=Fh(a.g);d=vh(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
252
+ function Yh(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Aa:f.Aa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Aa=[];f.Aa=f.Aa.concat(e.initData||[]);f.Aa=f.Aa.concat(h.initData||[]);f.Aa=f.Aa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Aa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
253
+ e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,initData:f.Aa,keyIds:g});break}}return c}
254
+ function vh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function lh(a){a.i.forEach(function(b,c){var d=b.qd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.qd=e)})}function Qh(a){a=a.i.values();return fh(a,function(b){return b.loaded})}
255
+ function uh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
256
+ function Oh(a,b,c,d,e){var f={};a=t(a);for(var g=a.next();!g.done;f={ua:f.ua},g=a.next()){f.ua=g.value;b.includes(f.ua.licenseServerUri)||b.push(f.ua.licenseServerUri);f.ua.serverCertificate&&(c.some(function(l){return function(m){return db(m,l.ua.serverCertificate)}}(f))||c.push(f.ua.serverCertificate));if(f.ua.initData){g={};for(var h=t(f.ua.initData),k=h.next();!k.done;g={dc:g.dc},k=h.next())g.dc=k.value,d.some(function(l){return function(m){var n=l.dc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
257
+ n.initDataType&&db(m.initData,n.initData)}}(g))||d.push(g.dc)}if(f.ua.keyIds)for(g=t(f.ua.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
258
+ function wh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
259
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Xh=1,Th=5,Uh=.5,Zh=new kb(function(){return hb(new Uint8Array([0]))});function $h(){}function ai(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=bi[d.toLowerCase()]))return k["return"](e);if(f=ci(a))if(g=di[f])return k["return"](g);return d?k.A(2):u(k,ei(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=bi[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
260
+ function ei(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Vg([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ci(a){a=(new Yd(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",$h);$h.unregisterParserByMime=function(a){delete bi[a]};$h.registerParserByMime=function(a,b){bi[a]=b};
261
+ $h.registerParserByExtension=function(a,b){di[a]=b};var bi={},di={};function fi(a,b,c){this.ma=a;this.ha=b;this.ba=c}fi.prototype.Sb=function(){return this.ha};fi.prototype.Ob=function(){return this.ba};function gi(a,b){return a&&b?a.Sb()==b.Sb()&&a.Ob()==b.Ob()&&jc(a.ma(),b.ma()):a==b}N("shaka.media.InitSegmentReference",fi);fi.prototype.getEndByte=fi.prototype.Ob;fi.prototype.getStartByte=fi.prototype.Sb;
262
+ function hi(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.ha=d;this.ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}r=hi.prototype;r.ma=function(){return this.i()};r.getStartTime=function(){return this.startTime};r.Ge=function(){return this.endTime};r.Sb=function(){return this.ha};r.Ob=function(){return this.ba};N("shaka.media.SegmentReference",hi);hi.prototype.getEndByte=hi.prototype.Ob;
263
+ hi.prototype.getStartByte=hi.prototype.Sb;hi.prototype.getEndTime=hi.prototype.Ge;hi.prototype.getStartTime=hi.prototype.getStartTime;hi.prototype.getUris=hi.prototype.ma;function S(a,b,c){this.l=a;this.Ec=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.C=0}r=S.prototype;r.getDuration=function(){return this.i};r.Me=function(){return this.g};r.Ha=function(a){this.i=a};r.Se=function(){return this.l};r.he=function(a){this.o=a};r.Zb=function(a){this.s=a};r.Ed=function(a){this.m=a};r.wf=function(a){this.Ec=a};r.Fe=function(){return this.Ec};
264
+ r.yb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.od(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.od=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.nd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.U=function(){return Infinity==this.i&&!this.s};
265
+ r.gb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.bb()-this.m)};r.ie=function(a){this.u=a};r.bb=function(){return this.U()||this.gb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.C,this.i):this.h?Math.min(this.h,this.i):this.i};r.Rb=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.bb()-this.m+a,this.Pa()))};r.ub=function(){return this.Rb(0)};
266
+ r.Pa=function(){return Math.max(0,this.bb()-(this.U()||this.gb()?this.Ec:0))};r.le=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.ge=function(a){this.C=a};N("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.ge;S.prototype.usingPresentationStartTime=S.prototype.le;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.ub;S.prototype.getSafeSeekRangeStart=S.prototype.Rb;S.prototype.getSegmentAvailabilityEnd=S.prototype.bb;
267
+ S.prototype.setUserSeekStart=S.prototype.ie;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.gb;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.nd;S.prototype.notifyMinSegmentStartTime=S.prototype.od;S.prototype.notifySegments=S.prototype.yb;S.prototype.getDelay=S.prototype.Fe;S.prototype.setDelay=S.prototype.wf;S.prototype.setSegmentAvailabilityDuration=S.prototype.Ed;
268
+ S.prototype.setStatic=S.prototype.Zb;S.prototype.setClockOffset=S.prototype.he;S.prototype.getPresentationStartTime=S.prototype.Se;S.prototype.setDuration=S.prototype.Ha;S.prototype.getMaxSegmentDuration=S.prototype.Me;S.prototype.getDuration=S.prototype.getDuration;function ii(a,b){this.j=a;this.m=ji(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ii.prototype.release=function(){this.j=null;this.i=function(){}};function ki(a,b){a.i=b}function li(a){this.g=a}function ji(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Vd(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function mi(a,b,c,d,e){var f=this;this.g=a;this.B=b;this.l=c;this.u=e;this.i=new Ue;this.s=!1;this.C=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.v(a,"waiting",function(){return ni(f)});this.m=(new P(function(){ni(f)})).ya(.25)}mi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.u=null};mi.prototype.rd=function(){this.o=!0;ni(this)};
269
+ function ni(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.C&&(a.j=!1,a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ji(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Wd(b,g,a.l.gapDetectionThreshold);if(!(null==
270
+ c||0==c&&!a.o||(d=b.start(c),d>=a.B.Pa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function oi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=pi.value().get(b),c.ra(a,b,d))}var pi=new kb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function qi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Ue;this.i=new ri(a);oi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){si(d,d.j)})}qi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function ti(a){return a.m?a.g.currentTime:a.j}function ui(a,b){0<a.g.readyState?vi(a.i,b):oi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){si(a,a.j)})}
271
+ function si(a,b){.001>Math.abs(a.g.currentTime-b)?wi(a):(a.h.ra(a.g,"seeking",function(){wi(a)}),vi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function wi(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function ri(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ri.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
272
+ function vi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ya(.1)};function xi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.ra(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new Ue;oi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}xi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};xi.prototype.o=function(a){this.h=this.j?this.h:a};xi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};xi.prototype.C=function(){};
273
+ function yi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.B=e;this.u=null;this.j=new mi(a,b.presentationTimeline,c,zi(a,c),f);this.h=new qi(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=ti(g.h);h=Ai(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;ui(g.h,h);h=void 0;break a}g.B();h=void 0}return h},Bi(this,d));this.s=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=ti(g.h),k=g.g.ub(),l=g.g.Pa();3>l-k&&(k=
274
+ l-3);h<k&&(h=Ai(g,h),g.i.currentTime=h)}})).ya(.25)}yi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};yi.prototype.o=function(a){ui(this.h,a)};yi.prototype.m=function(){var a=ti(this.h);return 0<this.i.readyState&&!this.i.paused?Ci(this,a):a};
275
+ function Bi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ub():a.g.Pa():0>b&&(b=a.g.Pa()+b);return Di(a,Ci(a,b))}yi.prototype.C=function(){this.j.rd()};function Di(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ai(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ub(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Rb(c),k=a.g.Rb(d);c=a.g.Rb(c+d);return b>=g?Di(a,b):b>f?f:b<e?Td(a.i.buffered,k)?k:c:b>=h||Td(a.i.buffered,b)?b:c}
276
+ function Ci(a,b){var c=a.g.ub();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function zi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ii(new li(a),b.stallThreshold);ki(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Rb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.af=function(){this.i=!0};
277
+ r.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};r.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};r.offset=function(a){if(!this.i)for(var b=t(this.J),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
278
+ r.zc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};r.wb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.zc(a);this.$a(b)};r.$a=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
279
+ r.Va=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new hi(a.startTime,b,a.i,a.ha,a.ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
280
+ r.Gc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.ya(a))};T.prototype[Symbol.iterator]=function(){return this.tb(0)};T.prototype.tb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ei(this,b,d)};
281
+ function Fi(a,b,c){return new T([new hi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",T);T.forSingleSegment=Fi;T.prototype.getIteratorForTime=T.prototype.tb;T.prototype.updateEvery=T.prototype.Gc;T.prototype.fit=T.prototype.Va;T.prototype.evict=T.prototype.$a;T.prototype.mergeAndEvict=T.prototype.wb;T.prototype.merge=T.prototype.zc;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.af;
282
+ T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function Ei(a,b,c){this.i=a;this.h=b;this.g=c}Ei.prototype.seek=function(a){Rb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.tb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
283
+ Ei.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.ma().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Ei.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.ma().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Ei);Ei.prototype.next=Ei.prototype.next;Ei.prototype.current=Ei.prototype.current;
284
+ Ei.prototype.seek=Ei.prototype.seek;function Gi(){T.call(this,[]);this.j=[]}pa(Gi,T);r=Gi.prototype;r.clone=function(){var a=new Gi;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};
285
+ r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.zc=function(){};r.$a=function(){};r.wb=function(){};r.Va=function(){};r.Gc=function(){};N("shaka.media.MetaSegmentIndex",Gi);Gi.prototype.updateEvery=Gi.prototype.Gc;Gi.prototype.fit=Gi.prototype.Va;Gi.prototype.mergeAndEvict=Gi.prototype.wb;Gi.prototype.evict=Gi.prototype.$a;Gi.prototype.merge=Gi.prototype.zc;
286
+ Gi.prototype.offset=Gi.prototype.offset;Gi.prototype.get=Gi.prototype.get;Gi.prototype.find=Gi.prototype.find;Gi.prototype.release=Gi.prototype.release;function Hi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.wc();this.h=new P(function(){b.g.Yd(.25*b.i)})}Hi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Hi.prototype.set=function(a){this.i=a;Ii(this)};Hi.prototype.tc=function(){return this.g.tc()};function Ii(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.wc()!=b&&a.g.Dd(b);return}catch(c){}a.h.ya(.25);0!=a.g.wc()&&a.g.Dd(0)};function Ji(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Ki(b,!1)})).ya(.25)}Ji.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
287
+ function Ki(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?Li:e>h.endTime?Mi:Ni;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.nb==k&&n.mb==l&&n.fb(h,f)}}};function Oi(a){Mg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ya(2)}pa(Oi,Mg);Oi.prototype.release=function(){this.g.clear();this.h.stop();Mg.prototype.release.call(this)};function Pi(a){Mg.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{nb:null,mb:Ni,fb:function(c,d){return Qi(b,"enter",c,d)}},{nb:Li,mb:Ni,fb:function(c,d){return Qi(b,"enter",c,d)}},{nb:Mi,mb:Ni,fb:function(c,d){return Qi(b,"enter",c,d)}},{nb:Ni,mb:Li,fb:function(c,d){return Qi(b,"exit",c,d)}},{nb:Ni,mb:Mi,fb:function(c,d){return Qi(b,"exit",c,d)}},{nb:Li,mb:Mi,fb:function(c,d){return Qi(b,"skip",c,d)}},{nb:Mi,mb:Li,fb:function(c,d){return Qi(b,"skip",c,d)}}];this.h=new Ue;this.h.v(this.i,"regionremove",
288
+ function(c){b.g["delete"](c.region)})}pa(Pi,Mg);Pi.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Mg.prototype.release.call(this)};function Qi(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Li=1,Ni=2,Mi=3;function Ri(a,b,c,d,e){a=Vg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Si(a,b){var c=this;this.g=b;this.m=a;this.l=null;this.u=1;this.o=this.j=null;this.h=new Map;this.B=!1;this.C=null;this.s=!1;this.i=new Qe(function(){return Ti(c)})}Si.prototype.destroy=function(){return this.i.destroy()};function Ti(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Ui(e),b.push(Vi(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.l=null;z(f)})}
289
+ Si.prototype.configure=function(a){this.l=a;this.C=new Bg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};Si.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,Wi(a),2);Re(a.i);a.B=!0;z(b)})};
290
+ function Xi(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=re,C(k,2),u(k,qf(a.g.O,c.Z),4);case 4:ua(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Be(b.mimeType,b.codecs);df(a.g.O,e);f=a.g.O.l;if(g=f.isTextVisible()||a.l.alwaysStreamText)h=Yi(b),a.h.set(c.Z,h),Zi(a,h,0);z(k)}})}function $i(a){var b=a.h.get(qe);b&&(Ui(b),Vi(b)["catch"](function(){}),a.h["delete"](qe));a.o=null}
291
+ function aj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.jb&&(bj(a,e,!1,0,!1),c.jb=d)}else if(d=c.jb)c.jb=null,bj(a,d,!0,0,!1)}}function cj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.j=b;a.B&&(b.video&&bj(a,b.video,c,d,e),b.audio&&bj(a,b.audio,c,d,e))}function dj(a,b){a.o=b;a.B&&bj(a,b,!0,0,!1)}
292
+ function bj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=qe?f&&(f.jb&&(b.trickModeVideo?(f.jb=b,b=b.trickModeVideo):f.jb=null),f.stream!=b||e)&&(b.type==qe&&df(a.g.O,Be(b.mimeType,b.codecs)),f.stream=b,f.aa=null,c&&(f.Mb?f.Jc=!0:f.Ga?(f.lb=!0,f.pc=d,f.Jc=!0):(Ui(f),ej(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),fj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Xi(a,b)}
293
+ function fj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.vc();var g=jf(a.g.O,b.type),h=b.stream.segmentIndex.find(b.xa?b.xa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ba?k.ba-k.ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ba?k.ba-k.ha:null)||0),k=a.g.getBandwidthEstimate(),
294
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.l.rebufferingGoal)||b.sa.h.g>h?!0:!1):f=!1;f&&b.sa.abort();z(e)})}function gj(a,b){b.Mb||b.lb||(b.Ga?(b.lb=!0,b.pc=0):null==gf(a.g.O,b.type)?null==b.Ja&&Zi(a,b,0):(Ui(b),ej(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
295
+ function Wi(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=re;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.Ya,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.Na,a.j.video),d.add(a.j.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.O;f=a.l.forceTransmuxTS;return u(n,e.init(c,f),2)}Re(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.O.Ha(p):a.g.O.Ha(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.h.has(k)||
296
+ (m=Yi(l),a.h.set(k,m),Zi(a,m,0));z(n)})}function Yi(a){return{stream:a,type:a.type,aa:null,xa:null,yc:null,kd:null,jd:null,hd:null,jb:null,endOfStream:!1,Ga:!1,Ja:null,lb:!1,pc:0,Jc:!1,Mb:!1,td:!1,Tb:!1,sa:null}}
297
+ function hj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:Re(a.i);if(b.Ga||null==b.Ja||b.Mb)return h["return"]();b.Ja=null;if(!b.lb){h.A(2);break}return u(h,ej(a,b,b.Jc,b.pc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return null==b.Ja&&Zi(a,b,0),h["return"]();case 4:C(h,6);d=ij(a,b);null!=d&&(Zi(a,b,d),b.Tb=!1);ua(h,7);break;case 6:return e=F(h),u(h,jj(a,e),8);case 8:return h["return"]();
298
+ case 7:f=Array.from(a.h.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:Re(a.i),g=a.g.O.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ha(g),z(h)}})}
299
+ function ij(a,b){if(kj(b))return of(a.g.O,b.stream.originalId||""),null;b.type==qe&&pf(a.g.O);var c=a.g.vc(),d=b.xa?b.xa.endTime:c,e=kf(a.g.O,b.type,c),f=Math.max(a.m.minBufferTime||0,a.l.rebufferingGoal,a.l.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(qe))&&kj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=jf(a.g.O,b.type);e=lj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.h.values());g=t(g);for(var h=
300
+ g.next();!h.done;h=g.next())h=h.value,kj(h)||h.aa&&!h.aa.current()||(f=Math.min(f,h.xa?h.xa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return 1;mj(a,b,c,e)["catch"](function(){});return null}
301
+ function lj(a,b,c,d){if(b.aa)return b.aa.current();if(b.xa||d)return b.aa=b.stream.segmentIndex.tb(b.xa?b.xa.endTime:d),b.aa&&b.aa.next().value;a=a.l.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.aa=b.stream.segmentIndex.tb(d),e=b.aa&&b.aa.next().value);e||(b.aa=b.stream.segmentIndex.tb(c),e=b.aa&&b.aa.next().value);return e}
302
+ function mj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,x;return L(function(w){switch(w.g){case 1:return e=re,f=b.stream,g=b.aa,b.Ga=!0,C(w,2),u(w,nj(a,b,d),4);case 4:Re(a.i);if(a.s)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.l.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var D,B,A;return L(function(E){Re(a.i);if(a.s)return E["return"]();n=oj(n,y);D=!1;B=0;(new vb).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return E.A(0);
303
+ A=n.subarray(0,B);n=n.subarray(B);return u(E,pj(a,b,c,f,d,A),0)})},u(w,qj(a,b,d,p),6);l=qj(a,b,d);return u(w,l,7);case 7:return m=w.h,Re(a.i),a.s?w["return"]():b.lb?(b.Ga=!1,Zi(a,b,0),w["return"]()):u(w,pj(a,b,c,f,d,m),6);case 6:Re(a.i);if(a.s)return w["return"]();b.xa=d;g.next();b.Ga=!1;b.td=!1;q=a.g.O.sc();v=q[b.type];Za(JSON.stringify(v));b.lb||a.g.rd();Zi(a,b,0);ua(w,0);break;case 2:x=F(w);Re(a.i,x);if(a.s)return w["return"]();b.Ga=!1;if(7001==x.code)b.Ga=!1,b.Ja=null,Zi(a,b,0),w.A(0);else if(b.type==
304
+ e.Z&&a.l.ignoreTextStreamFailures)a.h["delete"](e.Z),w.A(0);else if(3017==x.code)rj(a,b,x),w.A(0);else if(1001==x.code&&x.data&&404==x.data[1])b.Ga=!1,b.Ja=null,Zi(a,b,1),w.A(0);else return b.Tb=!0,x.severity=2,u(w,jj(a,x),0)}})}function oj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
305
+ function rj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.td})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Tb=!0;a.s=!0;a.g.onError(c);return}b.td=!0}Zi(a,b,4)}
306
+ function nj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.kd||e!=b.jd||f!=b.hd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.jd=e,b.hd=f,b.kd=g,u(p,rf(a.g.O,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.jd=null;b.hd=null;b.kd=null;throw n;})},d.push(h());!gi(c.h,b.yc)&&(b.yc=c.h)&&(k=qj(a,b,c.h),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
307
+ case 4:return n=v.h,Re(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,lf(a.g.O,b.type,n,null,null,p),5);case 5:ua(v,0);break;case 2:throw q=F(v),b.yc=null,q;}})},d.push(l()));return u(m,Promise.all(d),0)})}
308
+ function pj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new vb).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Wb();var n=k.reader.Wb();var p=k.reader.L();var q=k.reader.L();var v=k.reader.L();var x=k.reader.L();var w=e.startTime+q/p}else p=k.reader.L(),w=k.reader.Cb()/p+e.timestampOffset,q=w-e.startTime,v=k.reader.L(),x=k.reader.L(),m=k.reader.Wb(),n=k.reader.Wb();
309
+ k=k.reader.Wa(k.reader.N.byteLength-k.reader.W());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.ef():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:x,messageData:k}),l=new Q(sj,l),a.g.onEvent(l)))}).parse(f),u(h,tj(a,b,c),2);if(3!=h.g)return Re(a.i),u(h,lf(a.g.O,b.type,f,e.startTime,e.endTime,g),3);Re(a.i);z(h)})}
310
+ function tj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.l.bufferBehind,a.m.presentationTimeline.g);e=gf(a.g.O,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.O.remove(b.type,e,e+g),2)}Re(a.i);z(h)})}function kj(a){return a&&a.type==qe&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
311
+ function qj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=ah,f=Ri(c.ma(),c.ha,c.ba,a.l.retryParameters,d),g=a.g.xb.request(e,f),b.sa=g,u(k,g.promise,2);h=k.h;b.sa=null;return k["return"](h.data)})}
312
+ function ej(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.lb=!1,b.Jc=!1,b.pc=0,b.Mb=!0,b.xa=null,b.yc=null,b.aa=null,d?(e=a.g.vc(),f=a.g.O.getDuration(),u(g,a.g.O.remove(b.type,e+d,f),3)):u(g,qf(a.g.O,b.type),4);if(3!=g.g)return Re(a.i),c?u(g,a.g.O.flush(b.type),3):g.A(3);Re(a.i);b.Mb=!1;b.endOfStream=!1;Zi(a,b,0);z(g)})}
313
+ function Zi(a,b,c){var d=b.type;if(d!=qe||a.h.has(d))b.Ja=(new Eb(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,hj(a,b),4);if(2!=f.g)return ua(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function Ui(a){null!=a.Ja&&(a.Ja.stop(),a.Ja=null)}function Vi(a){return L(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function jj(a,b){return L(function(c){if(1==c.g)return u(c,Dg(a.C),2);Re(a.i);a.g.onError(b);b.handled||a.l.failureCallback(b);z(c)})};function uj(a,b){var c=vj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return wj(d)});this.s=new Qe(function(){return xj(d)})}uj.prototype.destroy=function(){return this.s.destroy()};function xj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),yj(a),u(e,a.u,2);a.g&&a.g.Ea.hb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ea.hb();a.g=null;a.m=[];a.j=null;z(e)})}
314
+ function zj(a,b){var c={zb:function(){},Ac:function(){},hb:function(){},onError:function(){},Cc:function(){},eg:function(){}};a.m.push({create:b,Ea:c});a.h&&a.h.abort();yj(a);return c}
315
+ function wj(a){return L(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.eb)var c=!1;else{a.g&&(a.g.Ea.hb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ea.zb(),a.g={node:d.node,payload:d.payload,eb:d.eb,Ea:c.Ea}):c.Ea.Cc();c=!0}c?c=Promise.resolve():a.g?c=Aj(a):(a.j.df(a.i),a.o=new se,c=a.o);b=u(b,c,1)}return b})}
316
+ function Aj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.Oe(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ce(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ea.Ac(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ea.hb();else a.g.Ea.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function yj(a){a.o&&(a.o.resolve(),a.o=null)};function Bj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Bj.prototype;r.remove=function(a,b){if(!this.g)return!1;Cj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
317
+ r.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Rb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
318
+ g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={ob:e.ob},f=c.next())e.ob=f.value,a.some(function(g){return function(h){return h.startTime==g.ob.startTime&&h.endTime==g.ob.endTime&&h.text==g.ob.payload?!0:!1}}(e))||(f=Dj(e.ob))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
319
+ d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};r.destroy=function(){this.g&&(Cj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
320
+ function Dj(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;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(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}
321
+ function Cj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Bj);Bj.prototype.setTextVisibility=Bj.prototype.setTextVisibility;Bj.prototype.isTextVisible=Bj.prototype.isTextVisible;Bj.prototype.destroy=Bj.prototype.destroy;Bj.prototype.append=Bj.prototype.append;Bj.prototype.remove=Bj.prototype.remove;function Ej(){}function Fj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Ej);Ej.removeAllChildren=Fj;function Gj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.s=(new P(function(){Hj(c)})).ya(.25);this.h=new Map;this.o=new Ue;this.o.v(document,"fullscreenchange",function(){Hj(c,!0)});this.l=null;"ResizeObserver"in
322
+ window&&(this.l=new ResizeObserver(function(){Hj(c,!0)}),this.l.observe(this.g))}r=Gj.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={bc:c.bc},d=a.next())c.bc=d.value,b.some(function(e){return function(f){return vc(f,e.bc)}}(c))||this.i.push(c.bc);Hj(this)};
323
+ r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Hj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
324
+ function Ij(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ne:null;l&&(g.push(l.Ld),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Jj(a,k,e),l=a.h.get(k),n=l.ne,f=!0));0<k.nestedCues.length&&n&&Ij(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,q){return p.startTime!=q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});
325
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.Ld)}}function Hj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Fj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Ij(a,a.i,a.g,c,[])}}}
326
+ function Jj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Rb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Kj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{Ld:f,ne:c})}
327
+ function Kj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Lj(c.linePadding,c,a.m);f.paddingRight=Lj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
328
+ "center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Mj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
329
+ g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Lj(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==pc?(f.width="100%",c.lineAlign==rc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==rc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
330
+ rc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Cc?"%":"px",d=c.region.viewportAnchorUnits==Cc?"%":"px",f.height=c.region.height+(c.region.heightUnits==Cc?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==pc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==
331
+ c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==pc?f.width=c.size+"%":f.height=c.size+"%")}
332
+ function Lj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Mj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}N("shaka.text.UITextDisplayer",Gj);Gj.prototype.setTextVisibility=Gj.prototype.setTextVisibility;
333
+ Gj.prototype.isTextVisible=Gj.prototype.isTextVisible;Gj.prototype.remove=Gj.prototype.remove;Gj.prototype.destroy=Gj.prototype.destroy;Gj.prototype.append=Gj.prototype.append;function Nj(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Rb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
334
+ g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}N("shaka.text.WebVttGenerator",function(){});function Oj(){}
335
+ function Pj(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ng(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ng(l)),k=Pj(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
336
+ k),g=!1)}return g}function Qj(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}N("shaka.util.ConfigUtils",Oj);Oj.convertToConfigObject=Qj;Oj.mergeConfigObjects=Pj;function Rj(){}
337
+ function Sj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Cg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Rh,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Cg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
341
338
  autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"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:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}},
342
- hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Lg(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
343
- forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||cc()||dc())d.gapDetectionThreshold=.5;if(bc("Web0S")||cc()||dc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return L(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?v(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
344
- h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ug},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
345
- preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](ak(g,f.preferredAudioLanguage))})};return f}
346
- function bk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Wj(a,b,c||Zj(),d,"")}
347
- function ak(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Of(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return If(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
348
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Be&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Yj);Yj.mergeConfigObjects=bk;function ck(){this.g=null;this.h=[]}function dk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function ek(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
349
- function fk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function gk(){this.i=this.h=null;this.g=[]}function hk(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function ik(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function jk(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.T=this.C=this.Y=NaN;this.h=new ck;this.g=new gk};function V(a,b){Vg.call(this);var c=this;this.l=kk;this.pc=this.g=null;this.Y=!1;this.h=new ef;this.dd=this.u=this.Ya=this.A=this.tc=this.s=this.i=this.hc=this.I=this.qc=this.F=this.Ha=this.C=this.L=this.m=this.P=null;this.ld=1E9;this.o=lk(this);this.kd={width:Infinity,height:Infinity};this.j=null;this.pa=new Cg(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.qa=this.o.preferredTextLanguage;this.Nb=this.o.preferredTextRole;this.Za=this.o.preferForcedSubs;
350
- this.ed=[];b&&b(this);this.P=mk(this);this.P.Ld(this.o.streaming.forceHTTPS);this.H=null;nk&&(this.H=Nb(nk));this.h.B(window,"online",function(){c.Fd()});this.ta={name:"detach"};this.Qa={name:"attach"};this.T={name:"unload"};this.nd={name:"manifest-parser"};this.jd={name:"manifest"};this.ra={name:"media-source"};this.gd={name:"drm-engine"};this.O={name:"load"};this.od={name:"src-equals-drm-engine"};this.Oa={name:"src-equals"};var d=new Map;d.set(this.Qa,function(e,f){return Rg(ok(c,e,f))});d.set(this.ta,
351
- function(e){e.G&&(c.h.Ea(e.G,"error"),e.G=null);c.H&&c.H.release();c.g=null;e=Promise.resolve();return Rg(e)});d.set(this.T,function(e){return Rg(pk(c,e))});d.set(this.ra,function(e){e=qk(c,e);return Rg(e)});d.set(this.nd,function(e,f){var g=rk(c,e,f);return Rg(g)});d.set(this.jd,function(e){return sk(c,e)});d.set(this.gd,function(e){e=tk(c,e);return Rg(e)});d.set(this.O,function(e,f){return Rg(uk(c,e,f))});d.set(this.od,function(e,f){var g=vk(c,e,f);return Rg(g)});d.set(this.Oa,function(e,f){return wk(c,
352
- e,f)});this.ea=new Bj(this.ta,{Ze:function(e,f,g,h){var k=null;e==c.ta&&(k=g==c.ta?c.ta:c.Qa);e==c.Qa&&(k=g==c.ta||f.G!=h.G?c.ta:g==c.Qa?c.Qa:g==c.ra||g==c.O?c.ra:g==c.Oa?c.od:null);e==c.ra&&(k=g==c.O&&f.G==h.G?c.nd:c.T);e==c.nd&&(k=xk(c.O,c.jd,c.T,g,f,h));e==c.jd&&(k=xk(c.O,c.gd,c.T,g,f,h));e==c.gd&&(k=xk(c.O,c.O,c.T,g,f,h));e==c.od&&(k=g==c.Oa&&f.G==h.G?c.Oa:c.T);if(e==c.O||e==c.Oa)k=c.T;e==c.T&&(k=h.G&&f.G==h.G?c.Qa:c.ta);return k},Ne:function(e,f,g){c.dispatchEvent(yk(zk,(new Map).set("state",
353
- e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?v(f,pk(c,e),2):f["return"](e.G?c.Qa:c.ta)})},rf:function(e){c.dispatchEvent(yk(Ak,(new Map).set("state",e.name)))}});a&&this.Pb(a,!0)}ra(V,Vg);function yk(a,b){return new R(a,b)}q=V.prototype;
354
- q.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Bk)return c["return"]();a.l=Bk;b=Gj(a.ea,function(){return{node:a.ta,payload:Cj(),kb:!1}});return v(c,new Promise(function(d){b.Eb=function(){};b.Hc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Jc=function(){d()}}),2);case 2:return v(c,a.ea.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.dd=null;a.u=null;a.o=null;a.j=null;a.pc=null;if(!a.P){c.v(0);break}return v(c,a.P.destroy(),5);case 5:a.P=
355
- null,z(c)}})};q.Pb=function(a,b){b=void 0===b?!0:b;if(this.l==Bk)return Promise.reject(Ck());var c=Cj();c.G=a;Yb()||(b=!1);var d=b?this.ra:this.Qa,e=Gj(this.ea,function(){return{node:d,payload:c,kb:!1}});e.Eb=function(){};return Dk(e)};q.detach=function(){var a=this;if(this.l==Bk)return Promise.reject(Ck());var b=Gj(this.ea,function(){return{node:a.ta,payload:Cj(),kb:!1}});b.Eb=function(){};return Dk(b)};
356
- q.Rd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Bk)return Promise.reject(Ck());Yb()||(a=!1);var c=Cj(),d=Gj(this.ea,function(e){var f=e.G&&a?b.ra:e.G?b.Qa:b.ta;c.G=e.G;return{node:f,payload:c,kb:!1}});d.Eb=function(){};return Dk(d)};
357
- q.load=function(a,b,c){var d=this;if(this.l==Bk)return Promise.reject(Ck());this.dispatchEvent(yk(Ek));var e=Cj();e.uri=a;e.Pd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Fk(this,e)?this.Oa:this.O,g=Gj(this.ea,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,kb:!0}});this.j=new jk;g.Eb=function(){};return new Promise(function(h,k){g.Jc=function(){return k(new N(2,7,7002))};g.Hc=function(){h();d.dispatchEvent(yk(Gk))};g.nb=function(){return k(Ck())};g.onError=
339
+ hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Cg(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
340
+ forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||Kb()||Lb())d.gapDetectionThreshold=.5;if(Jb("Web0S")||Kb()||Lb())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return L(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
341
+ h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new lg},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
342
+ preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](Tj(g,f.preferredAudioLanguage))})};return f}
343
+ function Uj(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Pj(a,b,c||Sj(),d,"")}
344
+ function Tj(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Df(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return xf(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
345
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=qe&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Rj);Rj.mergeConfigObjects=Uj;function Vj(){this.g=null;this.h=[]}function Wj(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Xj(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
346
+ function Yj(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Zj(){this.i=this.h=null;this.g=[]}function ak(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function bk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ck(){this.o=this.s=this.F=this.B=this.m=this.j=this.C=this.l=this.i=this.G=this.I=this.K=this.u=this.M=NaN;this.h=new Vj;this.g=new Zj};function U(a,b){Mg.call(this);var c=this;this.m=dk;this.jc=this.g=null;this.ia=!1;this.l=new Ue;this.Xc=this.u=this.Ib=this.i=this.nc=this.G=this.j=this.rc=this.K=this.ac=this.C=this.Ma=this.B=this.M=this.o=this.F=null;this.ed=1E9;this.h=ek(this);this.bd={width:Infinity,height:Infinity};this.s=null;this.Ca=new tg(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ka=this.h.preferredTextLanguage;this.Kb=this.h.preferredTextRole;this.Jb=this.h.preferForcedSubs;
347
+ this.kc=[];b&&b(this);this.F=fk(this);this.F.Bd(this.h.streaming.forceHTTPS);this.I=null;gk&&(this.I=Mc(gk));this.l.v(window,"online",function(){c.ud()});this.T={name:"detach"};this.V={name:"attach"};this.ea={name:"unload"};this.fd={name:"manifest-parser"};this.ad={name:"manifest"};this.La={name:"media-source"};this.Yc={name:"drm-engine"};this.Y={name:"load"};this.gd={name:"src-equals-drm-engine"};this.pb={name:"src-equals"};var d=new Map;d.set(this.V,function(e,f){return Ig(hk(c,e,f))});d.set(this.T,
348
+ function(e){e.D&&(c.l.za(e.D,"error"),e.D=null);c.I&&c.I.release();c.g=null;e=Promise.resolve();return Ig(e)});d.set(this.ea,function(e){return Ig(ik(c,e))});d.set(this.La,function(e){e=jk(c,e);return Ig(e)});d.set(this.fd,function(e,f){var g=kk(c,e,f);return Ig(g)});d.set(this.ad,function(e){return lk(c,e)});d.set(this.Yc,function(e){e=mk(c,e);return Ig(e)});d.set(this.Y,function(e,f){return Ig(nk(c,e,f))});d.set(this.gd,function(e,f){var g=ok(c,e,f);return Ig(g)});d.set(this.pb,function(e,f){return pk(c,
349
+ e,f)});this.ja=new uj(this.T,{Oe:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.D!=h.D?c.T:g==c.V?c.V:g==c.La||g==c.Y?c.La:g==c.pb?c.gd:null);e==c.La&&(k=g==c.Y&&f.D==h.D?c.fd:c.ea);e==c.fd&&(k=qk(c.Y,c.ad,c.ea,g,f,h));e==c.ad&&(k=qk(c.Y,c.Yc,c.ea,g,f,h));e==c.Yc&&(k=qk(c.Y,c.Y,c.ea,g,f,h));e==c.gd&&(k=g==c.pb&&f.D==h.D?c.pb:c.ea);if(e==c.Y||e==c.pb)k=c.ea;e==c.ea&&(k=h.D&&f.D==h.D?c.V:c.T);return k},Ce:function(e,f,g){c.dispatchEvent(rk(sk,(new Map).set("state",e.name)));
350
+ return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,ik(c,e),2):f["return"](e.D?c.V:c.T)})},df:function(e){c.dispatchEvent(rk(tk,(new Map).set("state",e.name)))}});a&&this.Lb(a,!0)}pa(U,Mg);function rk(a,b){return new Q(a,b)}r=U.prototype;
351
+ r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.m==uk)return c["return"]();a.m=uk;b=zj(a.ja,function(){return{node:a.T,payload:vj(),eb:!1}});return u(c,new Promise(function(d){b.zb=function(){};b.Ac=function(){d()};b.hb=function(){d()};b.onError=function(){d()};b.Cc=function(){d()}}),2);case 2:return u(c,a.ja.destroy(),3);case 3:a.l&&(a.l.release(),a.l=null);a.Xc=null;a.u=null;a.h=null;a.s=null;a.jc=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;
352
+ case 4:Mg.prototype.release.call(a),z(c)}})};r.Lb=function(a,b){b=void 0===b?!0:b;if(this.m==uk)return Promise.reject(vk());var c=vj();c.D=a;Fb()||(b=!1);var d=b?this.La:this.V,e=zj(this.ja,function(){return{node:d,payload:c,eb:!1}});e.zb=function(){};return wk(e)};r.detach=function(){var a=this;if(this.m==uk)return Promise.reject(vk());var b=zj(this.ja,function(){return{node:a.T,payload:vj(),eb:!1}});b.zb=function(){};return wk(b)};
353
+ r.Hd=function(a){var b=this;a=void 0===a?!0:a;if(this.m==uk)return Promise.reject(vk());Fb()||(a=!1);var c=vj(),d=zj(this.ja,function(e){var f=e.D&&a?b.La:e.D?b.V:b.T;c.D=e.D;return{node:f,payload:c,eb:!1}});d.zb=function(){};return wk(d)};
354
+ r.load=function(a,b,c){var d=this;if(this.m==uk)return Promise.reject(vk());this.dispatchEvent(rk(xk));var e=vj();e.uri=a;e.Fd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=yk(this,e)?this.pb:this.Y,g=zj(this.ja,function(h){if(null==h.D)return null;e.D=h.D;return{node:f,payload:e,eb:!0}});this.s=new ck;g.zb=function(){};return new Promise(function(h,k){g.Cc=function(){return k(new O(2,7,7002))};g.Ac=function(){h();d.dispatchEvent(rk(zk))};g.hb=function(){return k(vk())};g.onError=
358
355
  function(l){return k(l)}})};
359
- function Fk(a,b){if(!Yb())return!0;var c=b.mimeType,d=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[ji(d)]);if(c){if(""==(b.G||$b()).canPlayType(c))return!1;if(!Yb()||!(c in ii||ji(d)in ki)||a.o.streaming.preferNativeHls)return!0;if(ec())return a.o.streaming.useNativeHlsOnSafari}return!1}
360
- function ok(a,b,c){null==b.G&&(b.G=c.G,a.h.B(b.G,"error",function(){var d=Hk(a);d&&Ik(a,d)}));a.g=b.G;return Promise.resolve()}
361
- function pk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Bk&&(a.l=kk),c=a.ed.map(function(p){return p()}),a.ed=[],v(n,Promise.all(c),2);case 2:a.dispatchEvent(yk(Jk));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.Ea(b.G,"loadedmetadata"),a.h.Ea(b.G,"playing"),a.h.Ea(b.G,"pause"),a.h.Ea(b.G,"ended"),a.h.Ea(b.G,"ratechange"));a.Ha&&(a.Ha.release(),a.Ha=null);a.qc&&(a.qc.stop(),a.qc=null);if(!a.s){n.v(3);break}return v(n,a.s.stop(),4);case 4:a.s=null,a.tc=null;
362
- case 3:if(!a.u){n.v(5);break}return v(n,a.u.stop(),5);case 5:if(!a.i){n.v(7);break}return v(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.F&&(a.F.release(),a.F=null);a.C&&(a.C.release(),a.C=null);if(!a.L){n.v(9);break}return v(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.H)a.H.onAssetUnload();if(!b.G||!b.G.src){n.v(11);break}return v(n,new Promise(function(p){return(new P(p)).V(.1)}),12);case 12:for(b.G.removeAttribute("src"),b.G.load();b.G.lastChild;)b.G.removeChild(b.G.firstChild);case 11:if(!a.m){n.v(13);
363
- break}return v(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ya=null;a.I=null;if(a.A){d=t(a.A.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.A.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.A=null;a.j=new jk;a.hd=null;Kk(a);z(n)}})}
364
- function qk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new be,d=a.o.textDisplayFactory,e=Nb(d),a.hd=d,f=Lk(b.G,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),u=r.next();!u.done;u=r.next())Mk(a,n,p,"ID3",u.value);if(a.H)a.H.onHlsTimedMetadata(m,n)}}),v(g,f.F,2);a.L=f;z(g)})}
365
- function rk(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.P,a.Ya=d,f=a,v(h,hi(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.tc=h.h;a.s=Nb(a.tc);g=Wg(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.s.configure(g);z(h)})}
366
- function sk(a,b){var c=b.uri,d=a.P;a.hc=new Vi(function(){return a.Hd()});Wi(a.hc,function(g){Nk(a,Ok,g);if(a.H)a.H.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return L(function(h){return h["return"](a.yc(g))})},makeTextStreamsForClosedCaptions:function(g){return Pk(a,g)},onTimelineRegionAdded:function(g){var h=a.hc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
367
- l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ik(a,g)},isLowLatencyMode:function(){return a.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ng(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,v(m,a.s.start(c,e),2);g.A=m.h;h=yk(Qk);a.dispatchEvent(h);if(0==
368
- a.A.variants.length)throw new N(2,4,4036);Rk(a.A);k=Date.now()/1E3;l=k-f;a.j.H=l;z(m)})}(),function(){return a.s.stop()})}
369
- function tk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Sk(a,{Cb:a.P,onError:function(f){Ik(a,f)},Ic:function(f){Tk(a,f)},onExpirationUpdated:function(f,g){Uk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Vk&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.o.useMediaCapabilities||Zf(a.A),a.m.configure(a.o.drm),v(e,xh(a.m,a.A.variants,a.A.offlineSessionIds,a.o.useMediaCapabilities),2)):3!=e.g?v(e,a.m.Pb(b.G),3):v(e,a.yc(a.A),0)})}
370
- function uk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return L(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Ya=e;a.F=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Nd:function(w){b.G.playbackRate=w},ie:function(w){b.G.currentTime+=w}});f=function(){return Wk(a)};g=function(){return Xk(a)};a.h.B(d,"playing",f);a.h.B(d,"pause",f);a.h.B(d,"ended",f);a.h.B(d,"ratechange",g);h=a.o.abrFactory;a.u&&a.dd==h||(a.dd=h,a.u=Nb(h),"function"!=typeof a.u.playbackRateChanged&&
371
- (Gb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.o.abr));a.pa=new Cg(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.qa=a.o.preferredTextLanguage;a.Nb=a.o.preferredTextRole;a.Za=a.o.preferForcedSubs;Yk(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.u.init(function(w,y,C){y=void 0===y?!1:y;C=void 0===C?0:C;a.i&&w!=a.i.h&&(hk(a.j.g,w,!0),kj(a.i,w,y,C),Zk(a))});
372
- a.C=$k(a,b.startTime);a.Ha=al(a);k=Math.max(a.A.minBufferTime,a.o.streaming.rebufferingGoal);bl(a,k);Pf(a.A,a.o.preferredAudioChannelCount);a.i=cl(a);a.i.configure(a.o.streaming);a.l=dl;a.dispatchEvent(yk(el));l=null;if(m=a.Ec().find(function(w){return w.active})){x.v(2);break}l=fl(a)?a.u.chooseVariant():null;gl(a,l,!0,!1,0);if(!a.o.streaming.startAtSegmentBoundary){x.v(3);break}n=a.C.l();return v(x,hl(l,n),4);case 4:p=x.h,a.C.m(p);case 3:Zk(a);case 2:return r=a.jb().find(function(w){return w.active}),
373
- r||((u=rg(a.A.textStreams,a.qa,a.Nb,a.Za)[0]||null)&&ik(a.j.g,u,!0),l&&(u?(l.audio&&il(a,l.audio,u)&&(a.Y=!0),a.Y&&a.L.m.setTextVisibility(!0),jl(a)):a.Y=!1),u&&(a.o.streaming.alwaysStreamText||a.qd())&&lj(a.i,u)),v(x,a.i.start(),5);case 5:a.o.abr.enabled&&(a.u.enable(),kl(a)),ag(a.i?a.i.h:null,a.A),ll(a.A),ml(a),fl(a),a.A.variants.some(function(w){return w.primary}),a.h.wa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Pd}),z(x)}})}
374
- function vk(a,b,c){var d,e,f,g;return L(function(h){return 1==h.g?(d=Ce,e=Date.now()/1E3,f=!0,a.m=Sk(a,{Cb:a.P,onError:function(k){Ik(a,k)},Ic:function(k){Tk(a,k)},onExpirationUpdated:function(k,l){Uk(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==Vk&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.m.configure(a.o.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
375
- "video/mp4",codecs:c.mimeType?Re(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Pa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,v(h,xh(a.m,[g],[]),2)):v(h,a.m.Pb(b.G),0)})}
376
- function wk(a,b,c){function d(){return Wk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ya=b.uri;a.C=new Ei(b.G);null!=b.startTime&&a.C.m(b.startTime);a.F=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Nd:function(g){b.G.playbackRate=g},ie:function(g){b.G.currentTime+=g}});bl(a,a.o.streaming.rebufferingGoal);a.h.B(b.G,"playing",d);a.h.B(b.G,"pause",d);a.h.B(b.G,"ended",d);a.h.B(b.G,"ratechange",function(){return Xk(a)});"none"!=a.g.preload&&a.h.wa(a.g,"loadedmetadata",
377
- function(){a.j.l=Date.now()/1E3-c.Pd});a.g.audioTracks&&(a.h.B(a.g.audioTracks,"addtrack",function(){return ml(a)}),a.h.B(a.g.audioTracks,"removetrack",function(){return ml(a)}),a.h.B(a.g.audioTracks,"change",function(){return ml(a)}));a.g.textTracks&&(a.h.B(a.g.textTracks,"addtrack",function(g){ml(a);nl(a,g)}),a.h.B(a.g.textTracks,"removetrack",function(){return ml(a)}),a.h.B(a.g.textTracks,"change",function(){return ml(a)}));b.G.src=b.uri;(cc()||bc("Web0S"))&&b.G.load();a.l=ol;a.dispatchEvent(yk(el));
378
- var e=new De;vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.ed.push(function(){f=!0});vi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return L(function(h){if(1==h.g){if(f)return h["return"]();pl(a);g=ql(a);return g.find(function(k){return"disabled"!=k.mode})?h.v(2):v(h,new Promise(function(k){a.h.wa(a.g.textTracks,"change",k);(new P(k)).V(1)}),2)}if(f)return h["return"]();rl(a);z(h)})});a.g.error?e.reject(Hk(a)):"none"==a.g.preload&&(Wa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
379
- e.resolve());a.h.wa(a.g,"error",function(){e.reject(Hk(a))});return new Ng(e,function(){e.reject(new N(2,7,7001));return Promise.resolve()})}function pl(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.o.preferredVariantRole;""!=c&&a.Id(b,c)}}function rl(a){var b=a.o.preferredTextLanguage,c=a.o.preferForcedSubs;if(""!=b){a.Jd(b,"",c);var d=a.o.preferredTextRole;""!=d&&a.Jd(b,d,c)}}
380
- function nl(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.B(c,"cuechange",function(){if(c.activeCues)for(var d=t(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Mk(a,e.startTime,e.endTime,e.type,e.value),a.H)a.H.onCueMetadataChange(e.value)}),(new P(function(){var d=sl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).fc().V(.5))}
381
- function Mk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(yk(tl,b))}function Rk(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Sk(a,b){return new qh(b,a.o.drm.updateExpirationTime)}function mk(a){return new $g(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
382
- function $k(a,b){return new Fi(a.g,a.A,a.o.streaming,b,function(){a.Ha&&Ri(a.Ha,!0);if(a.i)for(var c=a.i,d=c.D.Cc(),e=c.o.smallGapLimit,f=t(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.da=null;var k=c.D.S;g==Be?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=uf(k,g),k=ee(k,d,e));if(!k&&(null!=vf(c.D.S,g)&&oj(c,h),h.xa&&(h.xa.abort(),h.xa=null),g===Be))for(g=c.D.S.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Pd(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())ld(h.value)}a.I&&
383
- ul(a)},function(c){return a.dispatchEvent(c)})}function al(a){var b=new Xi(a.hc);Yi(b,function(d){Nk(a,vl,d)},function(d){Nk(a,wl,d)},function(d,e){e||(Nk(a,vl,d),Nk(a,wl,d))});var c=new Qi(a.g);c.g.add(b);return c}function bl(a,b){a.I=new Gg;a.I.g=Ig;Jg(a.I,b,Math.min(.5,b/2));Kk(a);a.qc=(new P(function(){ul(a)})).Da(.25)}
384
- function ul(a){switch(a.l){case ol:if(a.g.ended)var b=!0;else{var c=de(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case dl:a:if(a.g.ended||sf(a.L))b=!0;else{if(a.A.presentationTimeline.Z()){c=a.A.presentationTimeline.ib();var d=de(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=fe(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Hg:Ig;c.g=d;b!=d&&Kk(a)}function Lk(a,b,c,d){return new kf(a,b,c,d)}
385
- function cl(a){return new $i(a.A,{Cc:function(){return a.C.l()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},S:a.L,Cb:a.P,onError:function(b){return Ik(a,b)},onEvent:function(b){return a.dispatchEvent(b)},sf:function(){a.s&&a.s.update&&a.s.update()},Bd:function(){a.C&&a.C.F();ul(a)}})}
386
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Gb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
387
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=bk(this.o,a,lk(this));xl(this);return c};
388
- function xl(a){if(a.s){var b=Wg(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.s.configure(b)}a.m&&a.m.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{yl(a,a.A)}catch(f){Ik(a,f)}a.u&&fl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||zl(a)}a.P&&a.P.Ld(a.o.streaming.forceHTTPS);if(a.L&&(b=a.o.textDisplayFactory,a.hd!=b)){var c=Nb(b),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.hd=b;a.i&&(b=a.i,(c=b.g.get(Be))&&
389
- jj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.o.abr),a.o.abr.enabled?a.u.enable():a.u.disable(),kl(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.A&&(b=Math.max(b,a.A.minBufferTime)),Jg(a.I,b,Math.min(.5,b/2)));a.A&&Yk(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd)}q.getConfiguration=function(){var a=lk(this);bk(a,this.o,lk(this));return a};q.Df=function(){for(var a in this.o)delete this.o[a];bk(this.o,lk(this),lk(this));xl(this)};q.Ue=function(){return this.l};q.Ye=function(){return this.g};
390
- q.Ub=function(){return this.P};q.md=function(){return this.Ya};q.ae=function(){return this.H?this.H:null};q.Z=function(){return this.A?this.A.presentationTimeline.Z():this.g&&this.g.src?Infinity==this.g.duration:!1};q.mb=function(){return this.A?this.A.presentationTimeline.mb():!1};q.lf=function(){if(this.A){var a=this.A.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
391
- q.Hd=function(){if(this.A){var a=this.A.presentationTimeline;return{start:a.zb(),end:a.Sa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.keySystem=function(){return Ph(this.drmInfo())};q.drmInfo=function(){return this.m?this.m.i:null};q.Tb=function(){return this.m?this.m.Tb():Infinity};q.Bc=function(){return this.m?this.m.Bc():{}};q.pd=function(){return this.I?this.I.g==Ig:!1};q.$e=function(){return this.g?this.F?this.F.i:1:0};
392
- q.Mf=function(a){0==a?Wa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.l==dl&&(this.u.playbackRateChanged(a),ij(this.i,1<Math.abs(a))))};q.Ge=function(){var a=this.F.Ac();this.l==ol&&this.F.set(a);this.l==dl&&(this.F.set(a),this.u.playbackRateChanged(a),ij(this.i,!1))};
393
- q.Ec=function(){if(this.A){for(var a=this.i?this.i.h:null,b=[],c=0,d=t(this.A.variants),e=d.next();!e.done;e=d.next())if(e=e.value,pg(e)){var f=ig(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ng(g)}):[]};
394
- q.jb=function(){if(this.A){for(var a=this.i?this.i.i:null,b=[],c=t(this.A.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=jg(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?ql(this).map(function(f){var g=og(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
395
- q.Se=function(){return this.A?this.A.imageStreams.map(function(a){return kg(a)}):[]};
396
- q.hf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D;return L(function(A){if(1==A.g)return c.A?(d=c.A.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?A.v(3):v(A,d.createSegmentIndex(),3):A["return"](null):A.v(2);if(2!=A.g){e=d.segmentIndex.find(b);if(null==e)return A["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return A["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;r=l*m;u=f.j-f.startTime;
397
- x=u/r;w=f.startTime;C=y=0;1<r&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return A["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.na(),width:n})}return A["return"](null)})};
398
- q.pe=function(a){if(this.A&&this.i){var b=this.A.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(ik(this.j.g,b,!1),lj(this.i,b),Al(this),this.qa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ql(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,lg(c)==a.id?c.mode=this.Y?"showing":"hidden":c.mode="disabled";Al(this)}};
399
- q.qe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.A&&this.i){this.o.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.A.variants.find(function(e){return e.id==a.id});d&&pg(d)&&(gl(this,d,!1,b,c),this.pa=new Bg(d),fl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
400
- lg(c)==a.id){Bl(this,c);break}};q.Pe=function(){return Cl(this.Ec())};q.gf=function(){return Cl(this.jb())};q.Oe=function(){return Array.from(Dl(this.Ec()))};q.ff=function(){return Array.from(Dl(this.jb()))};
401
- q.Id=function(a,b){if(this.A&&this.C){this.pa=new Cg(a,b||"",0,"");if(!this.o.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.pa.create(this.A.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=ig(f);this.qe(c,!0);return}}zl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
402
- c=If(a);f=d=null;e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ng(g);If(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Bl(this,f):d&&Bl(this,d)}};
403
- q.Jd=function(a,b,c){c=void 0===c?!1:c;if(this.A&&this.C){if(this.qa=a,this.Nb=b||"",this.Za=c,(a=rg(this.A.textStreams,this.qa,this.Nb,this.Za)[0]||null)&&a!=this.i.i&&(ik(this.j.g,a,!1),this.o.streaming.alwaysStreamText||this.qd()))lj(this.i,a),Al(this)}else{var d=If(a);(a=this.jb().find(function(e){return If(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.pe(a)}};
404
- q.Ef=function(a){if(this.A&&this.C){for(var b=null,c=t(this.A.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.pa=new Cg(b.language,"",0,a),zl(this))}};q.qd=function(){var a=this.Y;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ql(this).some(function(b){return"showing"==b.mode}):a};
405
- function ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
406
- q.Kf=function(a){a=!!a;if(this.Y!=a){this.Y=a;if(this.l==dl)this.L.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=rg(this.A.textStreams,this.qa,this.Nb,this.Za),0<a.length&&(lj(this.i,a[0]),Al(this))):hj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=ql(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}jl(this)}};
407
- q.bf=function(){if(!this.Z())return null;var a=this.ea.l,b=0;if(this.C)b=this.C.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.A?new Date(1E3*(this.A.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
408
- q.be=function(){if(!this.Z())return null;if(this.A)return new Date(1E3*this.A.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zc=function(){if(this.l==dl)return this.L.zc();var a={total:[],audio:[],video:[],text:[]};this.l==ol&&(a.total=ge(this.g.buffered));return a};
409
- q.getStats=function(){if(this.l!=dl&&this.l!=ol)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Wk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
410
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.T=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.H?a.H:NaN):a=NaN;this.j.m=a;if(this.l==dl){if(a=this.i.h)this.j.u=(this.F?this.F.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.Y=a.video.width||NaN,c.C=b);this.Z()&&(a=this.be().valueOf()+1E3*this.Hd().end,this.j.F=(Date.now()-a)/1E3);this.A&&this.A.presentationTimeline&&
411
- (this.j.I=this.A.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.Y;c=d.C;b=d.u;var e=d.O,f=d.T,g=d.L,h=d.s,k=d.i,l=d.l,m=d.H,n=d.j,p=ek(d.h,"playing"),r=ek(d.h,"paused"),u=ek(d.h,"buffering"),x=d.m,w=d.F,y=d.I,C=fk(d.h),D=[];d=t(d.g.g);for(var A=d.next();!A.done;A=d.next())A=A.value,D.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
412
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:u,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:C,switchHistory:D}};
413
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Gb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=dl&&this.l!=ol)throw new N(1,7,7004);if(!d){var h=ji(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new N(1,2,2011,h);}if(this.l==ol){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
414
- f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.jb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return ml(this),a;throw new N(1,2,2012);}h=this.A.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
415
- keyIds:new Set,language:b,label:f||null,type:Be,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!Te(Me(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.A.textStreams.push(a);ml(this);return jg(a)};
416
- q.Ce=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,x,w,y,C,D;return L(function(A){switch(A.g){case 1:if(h.l!=dl&&h.l!=ol)throw new N(1,7,7004);if(d){A.v(2);break}k=ji(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){A.v(3);break}B(A,4);return v(A,li(a,h.P,h.o.streaming.retryParameters),6);case 6:d=A.h;wa(A,3);break;case 4:F(A);case 3:if(!d)throw new N(1,
417
- 2,2011,k);case 2:if(h.l!=ol){A.v(7);break}if("text/vtt"==d){A.v(8);break}return v(A,El(a,h.P,h.o.streaming.retryParameters),9);case 9:l=A.h,m=Fl(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=nf(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);r=h.jb();if(u=r.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return ml(h),
418
- A["return"](u);throw new N(1,2,2012);case 7:x=Ce;w=h.A.presentationTimeline.getDuration();if(Infinity==w)throw new N(1,4,4033);y={id:h.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.ba,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};C=
419
- Me(y.mimeType,y.codecs);D=Te(C);if(!D)throw new N(2,2,2014,d);h.A.textStreams.push(y);ml(h);return A["return"](jg(y))}})};function El(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=jh,e=dh([a],c),e.method="GET",v(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Fl(a,b,c){var d=Ue[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=qb(b),b=c.parseMedia(b,a),Uj(b);throw new N(2,2,2014,c);}
420
- q.Md=function(a,b){this.kd.width=a;this.kd.height=b};q.Fd=function(){if(this.l==dl){var a=this.i;if(a.J.g)a=!1;else if(a.j)a=!1;else{for(var b=t(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Xb&&(c.Xb=!1,gj(a,c,.1));a=!0}}else a=!1;return a};q.Ve=function(){Wa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.A};
421
- q.We=function(){return this.tc};function lk(a){var b=Zj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.Fd())};b.textDisplayFactory=function(){return a.pc?new Nj(a.g,a.pc):new Ij(a.g)};return b}q.ue=function(a){this.pc=a};
422
- function Pk(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Ni;h={id:a.ld++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
423
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Be,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.yc=function(a){var b=this;return L(function(c){if(1==c.g)return v(c,Gl(b,a),2);yl(b,a);z(c)})};
424
- function Gl(a,b){var c;return L(function(d){if(1==d.g)return c=a.i?a.i.h:null,v(d,Xf(a.m,c,b,a.o.useMediaCapabilities),2);ll(b);z(d)})}
425
- function yl(a,b){if(a.l!=Bk){for(var c=a.o.restrictions,d=a.kd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Wf(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&ml(a);if((c=a.m?a.m.i:null)&&a.m.m)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
426
- f.next())g=g.value,Kh(a.m,g.initDataType,g.initData);Hl(a,b)}}
427
- function hl(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return L(function(p){if(1==p.g)return k?v(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},v(h,e(c,b),2);if(3!=h.g)return f=h.h,v(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
428
- function Kk(a){var b=a.pd();if(a.j&&a.I&&a.C){var c=a.F;c.j=b;Pi(c);Wk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(yk(Il,b))}function Xk(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=yk(Jl),a.dispatchEvent(b))}function Wk(a){if(a.j&&a.I){var b=a.j.h;a.I.g==Ig?dk(b,"buffering"):a.g.paused?dk(b,"paused"):a.g.ended?dk(b,"ended"):dk(b,"playing")}}
429
- function fl(a){try{Hl(a,a.A)}catch(c){return Ik(a,c),!1}var b=a.A.variants.filter(function(c){return pg(c)});b=a.pa.create(b);a.u.setVariants(Array.from(b.values()));return!0}function zl(a){var b;if(b=fl(a)?a.u.chooseVariant():null)gl(a,b,!0,!0,0),Zk(a)}function gl(a,b,c,d,e){var f=a.i.h;b==f?d&&kj(a.i,b,d,e,!0):(hk(a.j.g,b,c),kj(a.i,b,d,e),c=null,f&&(c=ig(f)),b=ig(b),Kl(a,c,b))}
430
- function Bl(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ng(c);var d=ng(b);Kl(a,c,d)}function il(a,b,c){a=If(a.o.preferredTextLanguage);b=If(b.language);c=If(c.language);return Hf(c,a)&&!Hf(b,c)}function Zk(a){var b=yk(Ll);Ml(a,b)}function ml(a){var b=yk(Nl);Ml(a,b)}function Kl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=yk(Ol,b);Ml(a,b)}function Al(a){var b=yk(Pl);Ml(a,b)}function jl(a){var b=yk(Ql);Ml(a,b)}
431
- function kl(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Ml(a,yk(Rl,b))}function Ik(a,b){if(a.l!=Bk){var c=yk(Sl,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Nk(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(yk(b,c))}
432
- function Hk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
433
- function Tk(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.A.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Tl.includes(l)}h!=f.allowedByKeySystem&&
434
- (e=!0)}}}e&&fl(a);(d=a.i.h)&&!d.allowedByKeySystem&&zl(a);e&&ml(a)}}function Uk(a,b,c){if(a.s&&a.s.onExpirationUpdated)a.s.onExpirationUpdated(b,c);b=yk(Ul);a.dispatchEvent(b)}function Yk(a,b,c){0<b&&(a.Z()||a.te(b));b=a.getDuration();c<b&&(a.Z()||a.La(c))}
435
- function Hl(a,b){var c=a.m?a.m.Bc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?Tl.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
436
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function ll(a){if(!a.variants.some(pg))throw new N(2,4,4032);}function Ml(a,b){L(function(c){if(1==c.g)return v(c,Promise.resolve(),2);a.l!=Bk&&a.dispatchEvent(b);z(c)})}function Dl(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(If(c.language)):b.add("und");return b}
437
- function Cl(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=If(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
438
- h.push({language:l,role:n,label:p})}});return h}function Ck(){return new N(2,7,7E3)}function xk(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Cj(){return{G:null,mimeType:null,startTime:null,Pd:NaN,uri:null}}function Dk(a){return new Promise(function(b,c){a.nb=function(){return c(Ck())};a.Hc=function(){return b()};a.onError=function(d){return c(d)};a.Jc=function(){return c(Ck())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ue;
439
- V.prototype.getManifestParserFactory=V.prototype.We;V.prototype.getManifest=V.prototype.Ve;V.prototype.retryStreaming=V.prototype.Fd;V.prototype.setMaxHardwareResolution=V.prototype.Md;V.prototype.addTextTrackAsync=V.prototype.Ce;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.zc;V.prototype.getPresentationStartTimeAsDate=V.prototype.be;V.prototype.getPlayheadTimeAsDate=V.prototype.bf;
440
- V.prototype.setTextTrackVisibility=V.prototype.Kf;V.prototype.isTextTrackVisible=V.prototype.qd;V.prototype.selectVariantsByLabel=V.prototype.Ef;V.prototype.selectTextLanguage=V.prototype.Jd;V.prototype.selectAudioLanguage=V.prototype.Id;V.prototype.getTextLanguages=V.prototype.ff;V.prototype.getAudioLanguages=V.prototype.Oe;V.prototype.getTextLanguagesAndRoles=V.prototype.gf;V.prototype.getAudioLanguagesAndRoles=V.prototype.Pe;V.prototype.selectVariantTrack=V.prototype.qe;
441
- V.prototype.selectTextTrack=V.prototype.pe;V.prototype.getThumbnails=V.prototype.hf;V.prototype.getImageTracks=V.prototype.Se;V.prototype.getTextTracks=V.prototype.jb;V.prototype.getVariantTracks=V.prototype.Ec;V.prototype.cancelTrickPlay=V.prototype.Ge;V.prototype.trickPlay=V.prototype.Mf;V.prototype.getPlaybackRate=V.prototype.$e;V.prototype.isBuffering=V.prototype.pd;V.prototype.getKeyStatuses=V.prototype.Bc;V.prototype.getExpiration=V.prototype.Tb;V.prototype.drmInfo=V.prototype.drmInfo;
442
- V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.Hd;V.prototype.isAudioOnly=V.prototype.lf;V.prototype.isInProgress=V.prototype.mb;V.prototype.isLive=V.prototype.Z;V.prototype.getAdManager=V.prototype.ae;V.prototype.getAssetUri=V.prototype.md;V.prototype.getNetworkingEngine=V.prototype.Ub;V.prototype.getMediaElement=V.prototype.Ye;V.prototype.getLoadMode=V.prototype.Ue;V.prototype.resetConfiguration=V.prototype.Df;V.prototype.getConfiguration=V.prototype.getConfiguration;
443
- V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Rd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Pb;
444
- V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?v(h,bi(),3):h.v(2);2!=h.g&&(b=h.h);var k={};if(Yb()){for(var l in ii)k[l]=!0;for(var m in ki)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Yb()?!!ii[n]:Zb(n);for(var p in l)k[p]=
445
- Yb()?!!ki[p]:Zb(l[p]);c=k;k={};p=t('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",video/mp4; codecs="av01.0.01M.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="vp09.00.10.08",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(","));
446
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Yb()?Te(l)?!0:MediaSource.isTypeSupported(l)||Ie(l):Zb(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Vl;for(g in f)e[g]=f[g]();return h["return"](e)})};
447
- V.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Wa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||bc("Trident/"))return!1;var a=fc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
448
- !1:Yb()?!0:Zb("application/x-mpegurl")};V.setAdManagerFactory=function(a){nk=a};V.registerSupportPlugin=function(a,b){Vl[a]=b};V.prototype.destroy=V.prototype.destroy;
449
- var Rl="abrstatuschanged",Ll="adaptation",Il="buffering",Vk="drmsessionupdate",zj="emsg",Sl="error",Ul="expirationupdated",Gk="loaded",Ek="loading",Qk="manifestparsed",tl="metadata",zk="onstatechange",Ak="onstateidle",Jl="ratechange",el="streaming",Pl="textchanged",Ql="texttrackvisibility",Ok="timelineregionadded",vl="timelineregionenter",wl="timelineregionexit",Nl="trackschanged",Jk="unloading",Ol="variantchanged",Wl={Tf:Rl,Uf:Ll,Vf:Il,Wf:Vk,Yf:zj,Error:Sl,Zf:Ul,$f:"largegap",ag:Gk,bg:Ek,cg:Qk,Metadata:tl,
450
- dg:zk,eg:Ak,fg:Jl,gg:"sessiondata",hg:el,ig:Pl,jg:Ql,kg:Ok,lg:vl,mg:wl,ng:Nl,og:Jk,pg:Ol},Bk=0,kk=1,dl=2,ol=3;V.LoadMode={DESTROYED:Bk,NOT_LOADED:kk,MEDIA_SOURCE:dl,SRC_EQUALS:ol};V.version="v3.1.4";var Xl=["3","1"];Hb=new function(a){this.g=a;this.i=Ib;this.h=Jb}(new Fb(Number(Xl[0]),Number(Xl[1])));var Tl=["output-restricted","internal-error"],Vl={},nk=null;function Yl(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new ef;this.h.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
451
- q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
452
- q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};M("shaka.ads.ClientSideAd",W);
453
- W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;
454
- W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Zl(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.C=NaN;this.j=d;this.s=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.4");this.i=null;this.h.wa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){$l(e,f)});this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
455
- function(f){am(e,f)});this.g.onended=function(){e.l.contentComplete()}}Zl.prototype.stop=function(){this.i&&this.i.stop();this.m&&Mj(this.m)};Zl.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function am(a,b){b.getError();bm(a,null);a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
456
- function $l(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.i=b.getAdsManager(a.g);a.j(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push(new cm(e.value));a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}dm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
457
- a.h.B(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){bm(a,null)}}
458
- function dm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new R(d,e))}a.h.B(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){am(a,c)});a.h.B(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){em(a,c)});a.h.B(a.i,google.ima.AdEvent.Type.STARTED,function(c){em(a,c)});a.h.B(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.B(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.B(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
459
- function(c){b(c,"ad-third-quartile")});a.h.B(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.B(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){bm(a,c)});a.h.B(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){bm(a,c)});a.h.B(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.B(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.B(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
460
- a.h.B(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.s.j=!0;b(c,"ad-paused")});a.h.B(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.s.j=!1;b(c,"ad-resumed")});a.h.B(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.B(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.B(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.B(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.B(a.i,
461
- google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.B(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.B(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.B(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.B(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.B(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.B(a.i,google.ima.AdEvent.Type.AD_METADATA,
462
- function(c){b(c,"ad-metadata")});a.h.B(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.B(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.B(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function em(a,b){var c=b.getAd();a.s=new W(c,a.i);c=(new Map).set("ad",a.s).set("sdkAdObject",c).set("originalEvent",b);a.j(new R("ad-started",c));a.m.setAttribute("ad-active","true");a.g.pause()}
463
- function bm(a,b){a.j(new R("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
464
- q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
465
- q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
356
+ function yk(a,b){if(!Fb())return!0;var c=b.mimeType,d=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[ci(d)]);if(c){if(""==(b.D||Hb()).canPlayType(c))return!1;if(!Fb()||!(c in bi||ci(d)in di)||a.h.streaming.preferNativeHls)return!0;if(Mb())return a.h.streaming.useNativeHlsOnSafari}return!1}
357
+ function hk(a,b,c){null==b.D&&(b.D=c.D,a.l.v(b.D,"error",function(){var d=Ak(a);d&&Bk(a,d)}));a.g=b.D;return Promise.resolve()}
358
+ function ik(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.m!=uk&&(a.m=dk),c=a.kc.map(function(p){return p()}),a.kc=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(rk(Ck));b.mimeType=null;b.startTime=null;b.uri=null;b.D&&(a.l.za(b.D,"loadedmetadata"),a.l.za(b.D,"playing"),a.l.za(b.D,"pause"),a.l.za(b.D,"ended"),a.l.za(b.D,"ratechange"));a.Ma&&(a.Ma.release(),a.Ma=null);a.ac&&(a.ac.stop(),a.ac=null);if(!a.G){n.A(3);break}return u(n,a.G.stop(),4);case 4:a.G=null,a.nc=null;
359
+ case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.C&&(a.C.release(),a.C=null);a.B&&(a.B.release(),a.B=null);if(!a.M){n.A(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.D||!b.D.src){n.A(11);break}return u(n,new Promise(function(p){return(new P(p)).R(.1)}),12);case 12:for(b.D.removeAttribute("src"),b.D.load();b.D.lastChild;)b.D.removeChild(b.D.firstChild);case 11:if(!a.o){n.A(13);
360
+ break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ib=null;a.K=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new ck;a.Zc=null;Dk(a);z(n)}})}
361
+ function jk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Qd,d=a.h.textDisplayFactory,e=Mc(d),a.Zc=d,f=Ek(b.D,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())Fk(a,n,p,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),u(g,f.C,2);a.M=f;z(g)})}
362
+ function kk(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Ib=d,f=a,u(h,ai(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.nc=h.h;a.G=Mc(a.nc);g=Ng(a.h.manifest);c.D&&"AUDIO"===c.D.nodeName&&(g.disableVideo=!0);a.G.configure(g);z(h)})}
363
+ function lk(a,b){var c=b.uri,d=a.F;a.rc=new Oi(function(){return a.wd()});a.rc.addEventListener("regionadd",function(g){g=g.region;Gk(a,Hk,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return L(function(h){return h["return"](Ik(a,g))})},makeTextStreamsForClosedCaptions:function(g){return Jk(a,g)},onTimelineRegionAdded:function(g){var h=a.rc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==
364
+ g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new Q("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Bk(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Eg(function(){var g,h,k,l;return L(function(m){if(1==
365
+ m.g)return g=a,u(m,a.G.start(c,e),2);g.i=m.h;h=rk(Kk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);Lk(a.i);k=Date.now()/1E3;l=k-f;a.s.C=l;z(m)})}(),function(){return a.G.stop()})}
366
+ function mk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=Mk(a,{xb:a.F,onError:function(f){Bk(a,f)},Bc:function(f){Nk(a,f)},onExpirationUpdated:function(f,g){Ok(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Pk&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.h.useMediaCapabilities||Of(a.i),a.o.configure(a.h.drm),u(e,qh(a.o,a.i.variants,a.i.offlineSessionIds,a.h.useMediaCapabilities),2)):3!=e.g?u(e,a.o.Lb(b.D),3):u(e,Ik(a,a.i),0)})}
367
+ function nk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.D;e=b.uri;a.Ib=e;a.C=new Hi({wc:function(){return b.D.playbackRate},tc:function(){return b.D.defaultPlaybackRate},Dd:function(w){b.D.playbackRate=w},Yd:function(w){b.D.currentTime+=w}});f=function(){return Qk(a)};g=function(){return Rk(a)};a.l.v(d,"playing",f);a.l.v(d,"pause",f);a.l.v(d,"ended",f);a.l.v(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Xc==h||(a.Xc=h,a.u=Mc(h),"function"!=typeof a.u.playbackRateChanged&&
368
+ (Rb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ca=new tg(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ka=a.h.preferredTextLanguage;a.Kb=a.h.preferredTextRole;a.Jb=a.h.preferForcedSubs;Sk(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(w,y,D){y=void 0===y?!1:y;D=void 0===D?0:D;a.j&&w!=a.j.j&&(ak(a.s.g,w,!0),cj(a.j,w,y,D),Tk(a))});
369
+ a.B=Uk(a,b.startTime);a.Ma=Vk(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Wk(a,k);Ef(a.i,a.h.preferredAudioChannelCount);a.j=Xk(a);a.j.configure(a.h.streaming);a.m=Yk;a.dispatchEvent(rk(Zk));l=null;if(m=a.xc().find(function(w){return w.active})){x.A(2);break}l=$k(a)?a.u.chooseVariant():null;al(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(3);break}n=a.B.m();return u(x,bl(l,n),4);case 4:p=x.h,a.B.o(p);case 3:Tk(a);case 2:return q=a.cb().find(function(w){return w.active}),
370
+ q||((v=ig(a.i.textStreams,a.Ka,a.Kb,a.Jb)[0]||null)&&bk(a.s.g,v,!0),l&&(v?(l.audio&&cl(a,l.audio,v)&&(a.ia=!0),a.ia&&a.M.l.setTextVisibility(!0),dl(a)):a.ia=!1),v&&(a.h.streaming.alwaysStreamText||a.dd())&&dj(a.j,v)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),el(a)),Qf(a.j?a.j.j:null,a.i),fl(a.i),gl(a),$k(a),a.i.variants.some(function(w){return w.primary}),a.l.ra(d,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Fd}),z(x)}})}
371
+ function ok(a,b,c){var d,e,f,g;return L(function(h){return 1==h.g?(d=re,e=Date.now()/1E3,f=!0,a.o=Mk(a,{xb:a.F,onError:function(k){Bk(a,k)},Bc:function(k){Nk(a,k)},onExpirationUpdated:function(k,l){Ok(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==Pk&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.o.configure(a.h.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
372
+ "video/mp4",codecs:c.mimeType?Ge(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.Y=!0,u(h,qh(a.o,[g],[]),2)):u(h,a.o.Lb(b.D),0)})}
373
+ function pk(a,b,c){function d(){return Qk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ib=b.uri;a.B=new xi(b.D);var e=!1;a.kc.push(function(){e=!0});null!=b.startTime&&a.B.o(b.startTime);a.C=new Hi({wc:function(){return b.D.playbackRate},tc:function(){return b.D.defaultPlaybackRate},Dd:function(g){b.D.playbackRate=g},Yd:function(g){b.D.currentTime+=g}});Wk(a,a.h.streaming.rebufferingGoal);a.l.v(b.D,"playing",d);a.l.v(b.D,"pause",d);a.l.v(b.D,"ended",d);a.l.v(b.D,"ratechange",function(){return Rk(a)});
374
+ "none"!=a.g.preload&&a.l.ra(a.g,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Fd});a.g.audioTracks&&(a.l.v(a.g.audioTracks,"addtrack",function(){return gl(a)}),a.l.v(a.g.audioTracks,"removetrack",function(){return gl(a)}),a.l.v(a.g.audioTracks,"change",function(){return gl(a)}));a.g.textTracks&&(a.l.v(a.g.textTracks,"addtrack",function(g){e||(gl(a),hl(a,g))}),a.l.v(a.g.textTracks,"removetrack",function(){return gl(a)}),a.l.v(a.g.textTracks,"change",function(){return gl(a)}));b.D.src=b.uri;(Kb()||
375
+ Jb("Web0S"))&&b.D.load();a.m=il;a.dispatchEvent(rk(Zk));var f=new se;oi(a.g,HTMLMediaElement.HAVE_METADATA,a.l,function(){f.resolve()});oi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var g;return L(function(h){if(1==h.g){if(e)return h["return"]();jl(a);g=kl(a);return g.find(function(k){return"disabled"!=k.mode})?h.A(2):u(h,new Promise(function(k){a.l.ra(a.g.textTracks,"change",k);(new P(k)).R(1)}),2)}if(e)return h["return"]();ll(a);z(h)})});a.g.error?f.reject(Ak(a)):"none"==a.g.preload&&
376
+ (Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),f.resolve());a.l.ra(a.g,"error",function(){f.reject(Ak(a))});return new Eg(f,function(){f.reject(new O(2,7,7001));return Promise.resolve()})}function jl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.xd(b);var c=a.h.preferredVariantRole;""!=c&&a.xd(b,c)}}
377
+ function ll(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.yd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.yd(b,d,c)}}
378
+ function hl(a,b){var c=b.track;if("metadata"==c.kind){c.mode="hidden";a.l.v(c,"cuechange",function(){if(c.activeCues)for(var e=t(c.activeCues),f=e.next();!f.done;f=e.next())if(f=f.value,Fk(a,f.startTime,f.endTime,f.type,f.value),a.I)a.I.onCueMetadataChange(f.value)});var d=(new P(function(){var e=ml(a);e=t(e);for(var f=e.next();!f.done;f=e.next())f.value.mode="hidden"})).$b().R(.5);a.kc.push(function(){d.stop()})}}
379
+ function Fk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(rk(nl,b))}function Lk(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Mk(a,b){return new jh(b,a.h.drm.updateExpirationTime)}function fk(a){return new Rg(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
380
+ function Uk(a,b){return new yi(a.g,a.i,a.h.streaming,b,function(){a.Ma&&Ki(a.Ma,!0);if(a.j)for(var c=a.j,d=c.g.vc(),e=c.l.smallGapLimit,f=t(c.h.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.h.get(g);h.aa=null;var k=c.g.O;g==qe?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=hf(k,g),k=Td(k,d,e));if(!k&&((null!=jf(c.g.O,g)||h.Ga)&&gj(c,h),h.sa&&(h.sa.abort(),h.sa=null),g===qe))for(g=c.g.O.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Gd(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())dd(h.value)}a.K&&
381
+ ol(a)},function(c){return a.dispatchEvent(c)})}function Vk(a){var b=new Pi(a.rc);b.addEventListener("enter",function(d){Gk(a,pl,d.region)});b.addEventListener("exit",function(d){Gk(a,ql,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Gk(a,pl,e),Gk(a,ql,e))});var c=new Ji(a.g);c.g.add(b);return c}function Wk(a,b){a.K=new xg;a.K.g=zg;Ag(a.K,b,Math.min(.5,b/2));Dk(a);a.ac=(new P(function(){ol(a)})).ya(.25)}
382
+ function ol(a){switch(a.m){case il:if(a.g.ended)var b=!0;else{var c=Sd(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Yk:a:if(a.g.ended||ff(a.M))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.bb();var d=Sd(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ud(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?yg:zg;c.g=d;b!=d&&Dk(a)}function Ek(a,b,c,d){return new Ze(a,b,c,d)}
383
+ function Xk(a){return new Si(a.i,{vc:function(){return a.B.m()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},O:a.M,xb:a.F,onError:function(b){return Bk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ef:function(){a.G&&a.G.update&&a.G.update()},rd:function(){a.B&&a.B.C();ol(a)}})}
384
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Qj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Rb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
385
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Uj(this.h,a,ek(this));rl(this);return c};
386
+ function rl(a){if(a.G){var b=Ng(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.G.configure(b)}a.o&&a.o.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{sl(a,a.i)}catch(f){Bk(a,f)}a.u&&$k(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||tl(a)}a.F&&a.F.Bd(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.Zc!=b)){var c=Mc(b),d=a.M,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.Zc=b;a.j&&(b=a.j,(c=b.h.get(qe))&&
387
+ bj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),el(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ag(a.K,b,Math.min(.5,b/2)));a.i&&Sk(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=ek(this);Uj(a,this.h,ek(this));return a};r.qf=function(){for(var a in this.h)delete this.h[a];Uj(this.h,ek(this),ek(this));rl(this)};r.Je=function(){return this.m};r.Ne=function(){return this.g};
388
+ r.Qb=function(){return this.F};r.$c=function(){return this.Ib};r.Rd=function(){return this.I?this.I:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.gb=function(){return this.i?this.i.presentationTimeline.gb():!1};r.Ze=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
389
+ r.wd=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ub(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.keySystem=function(){return Fh(this.drmInfo())};r.drmInfo=function(){return this.o?this.o.g:null};r.Pb=function(){return this.o?this.o.Pb():Infinity};r.uc=function(){return this.o?this.o.uc():{}};r.cd=function(){return this.K?this.K.g==zg:!1};r.Pe=function(){return this.g?this.C?this.C.i:1:0};
390
+ r.zf=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.C.set(a),this.m==Yk&&(this.u.playbackRateChanged(a),aj(this.j,1<Math.abs(a))))};r.ve=function(){var a=this.C.tc();this.m==il&&this.C.set(a);this.m==Yk&&(this.C.set(a),this.u.playbackRateChanged(a),aj(this.j,!1))};
391
+ r.xc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,gg(e)){var f=$f(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return eg(g)}):[]};
392
+ r.cb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ag(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?kl(this).map(function(f){var g=fg(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
393
+ r.He=function(){return this.i?this.i.imageStreams.map(function(a){return bg(a)}):[]};
394
+ r.We=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B;return L(function(A){if(1==A.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?A.A(3):u(A,d.createSegmentIndex(),3):A["return"](null):A.A(2);if(2!=A.g){e=d.segmentIndex.find(b);if(null==e)return A["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return A["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;q=l*m;v=f.j-f.startTime;
395
+ x=v/q;w=f.startTime;D=y=0;1<q&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,y=B%l*n,D=Math.floor(B/l)*p);return A["return"]({height:p,positionX:y,positionY:D,startTime:w,duration:x,uris:f.ma(),width:n})}return A["return"](null)})};
396
+ r.ee=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(bk(this.s.g,b,!1),dj(this.j,b),ul(this),this.Ka=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,cg(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";ul(this)}};
397
+ r.fe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&gg(d)&&(al(this,d,!1,b,c),this.Ca=new sg(d),$k(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
398
+ cg(c)==a.id){vl(this,c);break}};r.Ee=function(){return wl(this.xc())};r.Ve=function(){return wl(this.cb())};r.De=function(){return Array.from(xl(this.xc()))};r.Ue=function(){return Array.from(xl(this.cb()))};
399
+ r.xd=function(a,b){if(this.i&&this.B){this.Ca=new tg(a,b||"",0,"");if(!this.h.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.j,e=this.Ca.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=$f(f);this.fe(c,!0);return}}tl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
400
+ c=xf(a);f=d=null;e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=eg(g);xf(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?vl(this,f):d&&vl(this,d)}};
401
+ r.yd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.Ka=a,this.Kb=b||"",this.Jb=c,(a=ig(this.i.textStreams,this.Ka,this.Kb,this.Jb)[0]||null)&&a!=this.j.o&&(bk(this.s.g,a,!1),this.h.streaming.alwaysStreamText||this.dd()))dj(this.j,a),ul(this)}else{var d=xf(a);(a=this.cb().find(function(e){return xf(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ee(a)}};
402
+ r.rf=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ca=new tg(b.language,"",0,a),tl(this))}};r.dd=function(){var a=this.ia;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?kl(this).some(function(b){return"showing"==b.mode}):a};
403
+ function kl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function ml(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
404
+ r.xf=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.m==Yk)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ig(this.i.textStreams,this.Ka,this.Kb,this.Jb),0<a.length&&(dj(this.j,a[0]),ul(this))):$i(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}dl(this)}};
405
+ r.Re=function(){if(!this.U())return null;var a=this.ja.l,b=0;if(this.B)b=this.B.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
406
+ r.Sd=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.sc=function(){if(this.m==Yk)return this.M.sc();var a={total:[],audio:[],video:[],text:[]};this.m==il&&(a.total=Vd(this.g.buffered));return a};
407
+ r.getStats=function(){if(this.m!=Yk&&this.m!=il)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Qk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
408
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.I=b,this.s.G=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.I?a.I:NaN):a=NaN;this.s.m=a;if(this.m==Yk){if(a=this.j.j)this.s.s=(this.C?this.C.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.M=a.video.width||NaN,c.u=b);this.U()&&(a=this.Sd().valueOf()+1E3*this.wd().end,this.s.B=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
409
+ (this.s.F=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.I,f=d.K,g=d.G,h=d.o,k=d.i,l=d.l,m=d.C,n=d.j,p=Xj(d.h,"playing"),q=Xj(d.h,"paused"),v=Xj(d.h,"buffering"),x=d.m,w=d.B,y=d.F,D=Yj(d.h),B=[];d=t(d.g.g);for(var A=d.next();!A.done;A=d.next())A=A.value,B.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
410
+ estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:D,switchHistory:B}};
411
+ r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Rb("addTextTrack","Please use an addTextTrackAsync.");if(this.m!=Yk&&this.m!=il)throw new O(1,7,7004);if(!d){var h=ci(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new O(1,2,2011,h);}if(this.m==il){if("text/vtt"!=d)throw new O(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
412
+ f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.cb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return gl(this),a;throw new O(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new O(1,4,4033);a={id:this.ed++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
413
+ keyIds:new Set,language:b,label:f||null,type:qe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!Ie(Be(a.mimeType,a.codecs)))throw new O(2,2,2014,d);this.i.textStreams.push(a);gl(this);return ag(a)};
414
+ r.re=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,x,w,y,D,B;return L(function(A){switch(A.g){case 1:if(h.m!=Yk&&h.m!=il)throw new O(1,7,7004);if(d){A.A(2);break}k=ci(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){A.A(3);break}C(A,4);return u(A,ei(a,h.F,h.h.streaming.retryParameters),6);case 6:d=A.h;ua(A,3);break;case 4:F(A);case 3:if(!d)throw new O(1,
415
+ 2,2011,k);case 2:if(h.m!=il){A.A(7);break}if("text/vtt"==d){A.A(8);break}return u(A,yl(a,h.F,h.h.streaming.retryParameters),9);case 9:l=A.h,m=zl(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=bf(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);q=h.cb();if(v=q.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return gl(h),
416
+ A["return"](v);throw new O(1,2,2012);case 7:x=re;w=h.i.presentationTimeline.getDuration();if(Infinity==w)throw new O(1,4,4033);y={id:h.ed++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fi(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.Z,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};D=Be(y.mimeType,
417
+ y.codecs);B=Ie(D);if(!B)throw new O(2,2,2014,d);h.i.textStreams.push(y);gl(h);return A["return"](ag(y))}})};function yl(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=ah,e=Vg([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function zl(a,b,c){var d=Je[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=gb(b),b=c.parseMedia(b,a),Nj(b);throw new O(2,2,2014,c);}r.Cd=function(a,b){this.bd.width=a;this.bd.height=b};
418
+ r.ud=function(){if(this.m==Yk){var a=this.j;if(a.i.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Tb&&(c.Tb=!1,Zi(a,c,.1));a=!0}}else a=!1;return a};r.Ke=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Le=function(){return this.nc};
419
+ function ek(a){var b=Sj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.ud())};b.textDisplayFactory=function(){return a.jc?new Gj(a.g,a.jc):new Bj(a.g)};return b}r.je=function(a){this.jc=a};
420
+ function Jk(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gi;h={id:a.ed++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
421
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:qe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Ik(a,b){return L(function(c){if(1==c.g)return u(c,Al(a,b),2);sl(a,b);z(c)})}
422
+ function Al(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.j:null,u(d,Mf(a.o,c,b,a.h.useMediaCapabilities),2);fl(b);z(d)})}
423
+ function sl(a,b){if(a.m!=uk){for(var c=a.h.restrictions,d=a.bd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Lf(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&gl(a);if((c=a.o?a.o.g:null)&&a.o.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
424
+ f.next())g=g.value,Ah(a.o,g.initDataType,g.initData);Bl(a,b)}}
425
+ function bl(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return L(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
426
+ function Dk(a){var b=a.cd();if(a.s&&a.K&&a.B){var c=a.C;c.j=b;Ii(c);Qk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(rk(Cl,b))}function Rk(a){var b=a.g.playbackRate;0!=b&&(a.C&&a.C.set(b),b=rk(Dl),a.dispatchEvent(b))}function Qk(a){if(a.s&&a.K){var b=a.s.h;a.K.g==zg?Wj(b,"buffering"):a.g.paused?Wj(b,"paused"):a.g.ended?Wj(b,"ended"):Wj(b,"playing")}}
427
+ function $k(a){try{Bl(a,a.i)}catch(c){return Bk(a,c),!1}var b=a.i.variants.filter(function(c){return gg(c)});b=a.Ca.create(b);a.u.setVariants(Array.from(b.values()));return!0}function tl(a){var b;if(b=$k(a)?a.u.chooseVariant():null)al(a,b,!0,!0,0),Tk(a)}function al(a,b,c,d,e){var f=a.j.j;b==f?d&&cj(a.j,b,d,e,!0):(ak(a.s.g,b,c),cj(a.j,b,d,e),c=null,f&&(c=$f(f)),b=$f(b),El(a,c,b))}
428
+ function vl(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=eg(c);var d=eg(b);El(a,c,d)}function cl(a,b,c){a=xf(a.h.preferredTextLanguage);b=xf(b.language);c=xf(c.language);return wf(c,a)&&!wf(b,c)}function Tk(a){var b=rk(Fl);Gl(a,b)}function gl(a){var b=rk(Hl);Gl(a,b)}function El(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=rk(Il,b);Gl(a,b)}function ul(a){var b=rk(Jl);Gl(a,b)}function dl(a){var b=rk(Kl);Gl(a,b)}
429
+ function el(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Gl(a,rk(Ll,b))}function Bk(a,b){if(a.m!=uk){var c=rk(Ml,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Gk(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(rk(b,c))}
430
+ function Ak(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
431
+ function Nk(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Nl.includes(l)}h!=f.allowedByKeySystem&&
432
+ (e=!0)}}}e&&$k(a);(d=a.j.j)&&!d.allowedByKeySystem&&tl(a);e&&gl(a)}}function Ok(a,b,c){if(a.G&&a.G.onExpirationUpdated)a.G.onExpirationUpdated(b,c);b=rk(Ol);a.dispatchEvent(b)}function Sk(a,b,c){0<b&&(a.U()||a.ie(b));b=a.getDuration();c<b&&(a.U()||a.Ha(c))}
433
+ function Bl(a,b){var c=a.o?a.o.uc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Nl.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
434
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function fl(a){if(!a.variants.some(gg))throw new O(2,4,4032);}function Gl(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.m!=uk&&a.dispatchEvent(b);z(c)})}function xl(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(xf(c.language)):b.add("und");return b}
435
+ function wl(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=xf(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
436
+ h.push({language:l,role:n,label:p})}});return h}function vk(){return new O(2,7,7E3)}function qk(a,b,c,d,e,f){return d==a&&e.D==f.D&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function vj(){return{D:null,mimeType:null,startTime:null,Fd:NaN,uri:null}}function wk(a){return new Promise(function(b,c){a.hb=function(){return c(vk())};a.Ac=function(){return b()};a.onError=function(d){return c(d)};a.Cc=function(){return c(vk())}})}N("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.je;
437
+ U.prototype.getManifestParserFactory=U.prototype.Le;U.prototype.getManifest=U.prototype.Ke;U.prototype.retryStreaming=U.prototype.ud;U.prototype.setMaxHardwareResolution=U.prototype.Cd;U.prototype.addTextTrackAsync=U.prototype.re;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.sc;U.prototype.getPresentationStartTimeAsDate=U.prototype.Sd;U.prototype.getPlayheadTimeAsDate=U.prototype.Re;
438
+ U.prototype.setTextTrackVisibility=U.prototype.xf;U.prototype.isTextTrackVisible=U.prototype.dd;U.prototype.selectVariantsByLabel=U.prototype.rf;U.prototype.selectTextLanguage=U.prototype.yd;U.prototype.selectAudioLanguage=U.prototype.xd;U.prototype.getTextLanguages=U.prototype.Ue;U.prototype.getAudioLanguages=U.prototype.De;U.prototype.getTextLanguagesAndRoles=U.prototype.Ve;U.prototype.getAudioLanguagesAndRoles=U.prototype.Ee;U.prototype.selectVariantTrack=U.prototype.fe;
439
+ U.prototype.selectTextTrack=U.prototype.ee;U.prototype.getThumbnails=U.prototype.We;U.prototype.getImageTracks=U.prototype.He;U.prototype.getTextTracks=U.prototype.cb;U.prototype.getVariantTracks=U.prototype.xc;U.prototype.cancelTrickPlay=U.prototype.ve;U.prototype.trickPlay=U.prototype.zf;U.prototype.getPlaybackRate=U.prototype.Pe;U.prototype.isBuffering=U.prototype.cd;U.prototype.getKeyStatuses=U.prototype.uc;U.prototype.getExpiration=U.prototype.Pb;U.prototype.drmInfo=U.prototype.drmInfo;
440
+ U.prototype.keySystem=U.prototype.keySystem;U.prototype.seekRange=U.prototype.wd;U.prototype.isAudioOnly=U.prototype.Ze;U.prototype.isInProgress=U.prototype.gb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.Rd;U.prototype.getAssetUri=U.prototype.$c;U.prototype.getNetworkingEngine=U.prototype.Qb;U.prototype.getMediaElement=U.prototype.Ne;U.prototype.getLoadMode=U.prototype.Je;U.prototype.resetConfiguration=U.prototype.qf;U.prototype.getConfiguration=U.prototype.getConfiguration;
441
+ U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.unload=U.prototype.Hd;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Lb;
442
+ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,Vh(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(Fb()){for(var l in bi)k[l]=!0;for(var m in di)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Fb()?!!bi[n]:Gb(n);for(var p in l)k[p]=
443
+ Fb()?!!di[p]:Gb(l[p]);c=k;k={};p=t('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",video/mp4; codecs="av01.0.01M.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="vp09.00.10.08",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(","));
444
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Fb()?Ie(l)?!0:MediaSource.isTypeSupported(l)||xe(l):Gb(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Pl;for(g in f)e[g]=f[g]();return h["return"](e)})};
445
+ U.isBrowserSupported=function(){window.Promise||Sa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Sa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Jb("Trident/"))return!1;var a=Nb();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
446
+ !1:Fb()?!0:Gb("application/x-mpegurl")};U.setAdManagerFactory=function(a){gk=a};U.registerSupportPlugin=function(a,b){Pl[a]=b};U.prototype.destroy=U.prototype.destroy;
447
+ var Ll="abrstatuschanged",Fl="adaptation",Cl="buffering",Pk="drmsessionupdate",sj="emsg",Ml="error",Ol="expirationupdated",zk="loaded",xk="loading",Kk="manifestparsed",nl="metadata",sk="onstatechange",tk="onstateidle",Dl="ratechange",Zk="streaming",Jl="textchanged",Kl="texttrackvisibility",Hk="timelineregionadded",pl="timelineregionenter",ql="timelineregionexit",Hl="trackschanged",Ck="unloading",Il="variantchanged",Ql={Ff:Ll,Gf:Fl,Hf:Cl,If:Pk,Kf:sj,Error:Ml,Lf:Ol,Mf:"largegap",Nf:zk,Of:xk,Pf:Kk,Metadata:nl,
448
+ Qf:sk,Rf:tk,Sf:Dl,Tf:"sessiondata",Uf:Zk,Vf:Jl,Wf:Kl,Xf:Hk,Yf:pl,Zf:ql,$f:Hl,ag:Ck,bg:Il},uk=0,dk=1,Yk=2,il=3;U.LoadMode={DESTROYED:uk,NOT_LOADED:dk,MEDIA_SOURCE:Yk,SRC_EQUALS:il};U.version="v3.1.7";var Rl=["3","1"];Sb=new function(a){this.g=a;this.i=Tb;this.h=Ub}(new Qb(Number(Rl[0]),Number(Rl[1])));var Nl=["output-restricted","internal-error"],Pl={},gk=null;function Sl(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new Ue;this.j.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.v(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
449
+ r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
450
+ r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};N("shaka.ads.ClientSideAd",V);
451
+ V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;
452
+ V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function Tl(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new Ue;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.7");this.g=null;this.h.ra(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Ul(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
453
+ function(f){Vl(e,f)});this.i.onended=function(){e.l.contentComplete()}}Tl.prototype.stop=function(){this.g&&this.g.stop();this.m&&Fj(this.m)};Tl.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Vl(a,b){b.getError();Wl(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
454
+ function Ul(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push(new Xl(e.value));a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Yl(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
455
+ a.h.v(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Wl(a,null)}}
456
+ function Yl(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new Q(d,e))}a.h.v(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Vl(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Zl(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.STARTED,function(c){Zl(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.v(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
457
+ function(c){b(c,"ad-third-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Wl(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Wl(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
458
+ a.h.v(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.o.i=!0;b(c,"ad-paused")});a.h.v(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.o.i=!1;b(c,"ad-resumed")});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.v(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.v(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.v(a.g,
459
+ google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.v(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.v(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.v(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.v(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.v(a.g,google.ima.AdEvent.Type.AD_METADATA,
460
+ function(c){b(c,"ad-metadata")});a.h.v(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Zl(a,b){var c=b.getAd();a.o=new V(c,a.g);c=(new Map).set("ad",a.o).set("sdkAdObject",c).set("originalEvent",b);a.j(new Q("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
461
+ function Wl(a,b){a.j(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
462
+ r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
463
+ r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};N("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
466
464
  X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;
467
- X.prototype.getDuration=X.prototype.getDuration;function fm(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.I=NaN;this.j=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.h=new ef;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){gm(e,f)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?e.l.resolve(e.F):
468
- e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.C&&(e.m.h=e.C);e.j(new R("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
469
- var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
470
- this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new R("ad-complete"));e.j(new R("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new cm(h.start,h.end));e.j(new R("ad-cue-points-changed",
471
- (new Map).set("cuepoints",f)))})}fm.prototype.stop=function(){this.F="";this.s=null};fm.prototype.release=function(){this.stop();this.h&&this.h.release()};fm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
472
- function gm(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.H||a.h.B(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.s=d,a.g.currentTime=e.start)}})};function Y(){Vg.call(this);this.g=this.h=null;this.j=new Yl;this.i=navigator.language}ra(Y,Vg);q=Y.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new Zl(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
473
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.j=new Yl};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.C=Date.now()/1E3;b.l.requestAds(a)};
474
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new fm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
475
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.1.4";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
476
- (c.H=!0),c.l=new De,c.i.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.1.4";this.g.i.replaceAdTagParameters(a)};
477
- q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
465
+ X.prototype.getDuration=X.prototype.getDuration;function $l(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.C=!1;this.u=this.m=this.o=null;this.B="";this.h=new Ue;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){am(e,f)});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?e.j.resolve(e.B):
466
+ e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new Q("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
467
+ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new Q("ad-first-quartile"))});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))});
468
+ this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new Xl(h.start,h.end));e.i(new Q("ad-cue-points-changed",
469
+ (new Map).set("cuepoints",f)))})}$l.prototype.stop=function(){this.B="";this.o=null};$l.prototype.release=function(){this.stop();this.h&&this.h.release()};$l.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
470
+ function am(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.C||a.h.v(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function Y(){Mg.call(this);this.g=this.i=null;this.h=new Sl;this.j=navigator.language}pa(Y,Mg);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new Tl(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
471
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Mg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Sl};r.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
472
+ r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new $l(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
473
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.1.7";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
474
+ (c.C=!0),c.j=new se,c.g.requestStream(a),c.B=d||"",c.F=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.1.7";this.g.g.replaceAdTagParameters(a)};
475
+ r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};N("shaka.ads.AdManager",Y);
478
476
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;
479
- Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function cm(a,b){this.start=a;this.end=void 0===b?null:b}Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
477
+ Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function Xl(a,b){this.start=a;this.end=void 0===b?null:b}Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
480
478
  Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
481
- Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";nk=function(){return new Y};function hm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof R){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
482
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(ge(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
483
- function im(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=jm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
484
- function jm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
485
- var km="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),lm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),mm=["loop","playbackRate"],nm=["pause","play"],om={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
486
- getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},pm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qm=[["getConfiguration","configure"]],rm=[["isTextTrackVisible","setTextTrackVisibility"]],sm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
487
- tm=["attach","detach","load","unload"];function um(a,b,c,d,e,f){var g=this;this.L=a;this.j=new P(b);this.ea=c;this.C=!1;this.u=d;this.I=e;this.T=f;this.h=this.m=!1;this.Y="";this.s=null;this.F=function(){return vm(g)};this.H=function(h,k){var l=im(k);switch(l.type){case "event":var m=l.targetName;l=Ug(l.event);g.u(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.ea(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,
488
- l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;wm.add(this)}q=um.prototype;q.destroy=function(){wm["delete"](this);xm(this);ym&&zm(this);this.j&&(this.j.stop(),this.j=null);this.I=this.u=null;this.h=this.m=!1;this.H=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.ua=function(){return this.h};q.Dd=function(){return this.Y};
489
- q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.fc();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(wm),d=c.next();!d.done;d=c.next())Am(d.value,b)},function(b){for(var c=t(wm),d=c.next();!d.done;d=c.next())d=d.value,Bm="available"==b,d.j.fc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bm&&this.j.V(Cm);(a=ym)&&a.status!=chrome.cast.SessionStatus.STOPPED?Am(this,
490
- a):ym=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Dm),window.__onGCastApiAvailable!=Dm&&Wa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Kd=function(a){this.s=a;this.h&&Em(this,{type:"appData",appData:this.s})};
491
- q.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!Bm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new De;chrome.cast.requestSession(function(d){return Fm(b,a,d)},function(d){return Gm(b,d)});return v(c,b.l,0)})};function Hm(a){if(a.h){var b=a.T();chrome.cast.requestSession(function(c){return Fm(a,b,c)},function(c){return Gm(a,c)})}}q.wb=function(){if(this.h){xm(this);if(ym){zm(this);try{ym.stop(function(){},function(){})}catch(a){}ym=null}vm(this)}};
492
- q.get=function(a,b){var c=this;if("video"==a){if(nm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.le.apply(c,[a,b].concat(ka(e)))}}else if("player"==a){if(pm[b]&&!this.get("player","isLive")())return function(){};if(sm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.le.apply(c,[a,b].concat(ka(e)))};if(tm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Af.apply(c,
493
- [a,b].concat(ka(e)))};if(om[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Em(this,{type:"set",targetName:a,property:b,value:c})};function Fm(a,b,c){ym=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.H);vm(a);Em(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
494
- function Gm(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}q.le=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Em(this,{type:"call",targetName:a,methodName:b,args:d})};q.Af=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new De;var f=this.O.toString();this.O++;this.i[f]=e;try{Em(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
495
- function Am(a,b){var c=a.T();a.l=new De;a.C=!0;Fm(a,c,b)}function zm(a){var b=ym;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.H)}function vm(a){var b=ym?"connected"==ym.status:!1;if(a.h&&!b){a.I();for(var c in a.g)a.g[c]={};xm(a)}a.h=b;a.Y=b?ym.receiver.friendlyName:"";a.j.fc()}function xm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
496
- function Em(a,b){var c=hm(b),d=ym;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new N(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.u("player",d),a.wb(),c;}}var Cm=.02,Bm=!1,ym=null,wm=new Set;function Dm(a){if(a){a=t(wm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Im(a,b,c){Vg.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.C=new Map;this.g=new um(c,function(){return Jm(d)},function(){return Km(d)},function(e,f){return Lm(d,e,f)},function(){return Mm(d)},function(){return Nm(d)});Om(this)}ra(Im,Vg);q=Im.prototype;
497
- q.destroy=function(a){a&&this.g.wb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.m=this.j=null;return Promise.all(a)};q.jf=function(){return this.m};q.af=function(){return this.u};q.Ee=function(){return this.g.m&&Bm};q.ua=function(){return this.g.ua()};q.Dd=function(){return this.g.Dd()};
498
- q.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=Nm(a),v(c,a.g.cast(b),2)):a.i?v(c,a.i.Rd(),0):c["return"]()})};q.Kd=function(a){this.g.Kd(a)};q.Lf=function(){Hm(this.g)};q.wb=function(){this.g.wb()};
499
- q.He=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.wb();return v(c,b.g.destroy(),2)}b.g=null;b.g=new um(a,function(){return Jm(b)},function(){return Km(b)},function(d,e){return Lm(b,d,e)},function(){return Mm(b)},function(){return Nm(b)});b.g.init();z(c)})};
500
- function Om(a){a.g.init();a.h=new ef;for(var b=t(km),c=b.next();!c.done;c=b.next())a.h.B(a.j,c.value,function(f){a.g.ua()||(f=Ug(f),a.l.dispatchEvent(f))});for(var d in Wl)a.h.B(a.i,Wl[d],function(f){a.g.ua()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Jb=e,Object.defineProperty(a.m,b.Jb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Pm(a,f.Jb)}}(b),set:function(f){return function(g){var h=f.Jb;a.g.ua()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Jb:b.Jb};a.u={};Qm(a,
501
- function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Rm(a,f)}})});Sm(a);a.l=new Vg;a.l.rc=a.m;a.s=new Vg;a.s.rc=a.u}function Sm(a){var b=new Map;Qm(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
502
- function Qm(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
503
- function Nm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.md(),startTime:null};a.j.pause();for(var c=t(mm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=t(qm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=t(rm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Jm(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
504
- function Km(a){var b=new R(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
505
- function Mm(a){for(var b=t(qm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=t(mm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=t(mm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=t(rm);for(k=
506
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new R(Sl,h);a.i.dispatchEvent(h)})}
507
- function Pm(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.ua()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
508
- function Rm(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Ub()};if("getAdManager"==b)return function(){return a.i.ae()};if("setVideoContainer"==b)return function(c){return a.i.ue(c)};
509
- if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&om[b]||!a.g.ua()?a.i[b].bind(a.i):a.g.get("player",b)}function Lm(a,b,c){a.g.ua()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}M("shaka.cast.CastProxy",Im);Im.prototype.changeReceiverId=Im.prototype.He;
510
- Im.prototype.forceDisconnect=Im.prototype.wb;Im.prototype.suggestDisconnect=Im.prototype.Lf;Im.prototype.setAppData=Im.prototype.Kd;Im.prototype.cast=Im.prototype.cast;Im.prototype.receiverName=Im.prototype.Dd;Im.prototype.isCasting=Im.prototype.ua;Im.prototype.canCast=Im.prototype.Ee;Im.prototype.getPlayer=Im.prototype.af;Im.prototype.getVideo=Im.prototype.jf;Im.prototype.destroy=Im.prototype.destroy;function Tm(a,b,c,d){Vg.call(this);var e=this;this.g=a;this.i=b;this.h=new ef;this.O={video:a,player:b};this.H=c||function(){};this.T=d||function(f){return f};this.j=null;this.I=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.u=this.l=null;this.L=new P(function(){Um(e)});cn(this)}ra(Tm,Vg);q=Tm.prototype;q.isConnected=function(){return this.I};q.mf=function(){return this.s};q.Hf=function(a){this.j=a};q.Ke=function(){this.j=null};
511
- q.If=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Gf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Ff=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
512
- q.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,v(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
513
- function cn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return dn(a)};b.onSenderDisconnected=function(){return dn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&en(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);en(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return fn(a,
514
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return gn(a,e)};b.start();b=t(km);for(var c=b.next();!c.done;c=b.next())a.h.B(a.g,c.value,function(e){return hn(a,"video",e)});for(var d in Wl)a.h.B(a.i,Wl[d],function(e){return hn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Md(3840,2160):a.i.Md(1920,1080);a.h.B(a.g,"loadeddata",function(){a.F=!0});a.h.B(a.i,"loading",function(){a.s=
515
- !1;jn(a)});a.h.B(a.g,"playing",function(){a.s=!1;jn(a)});a.h.B(a.g,"pause",function(){jn(a)});a.h.B(a.i,"unloading",function(){a.s=!0;jn(a)});a.h.B(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.s=!0,jn(a))})).V(kn)})}function dn(a){a.m=0;a.C=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;jn(a)}
516
- function jn(a){var b;L(function(c){if(1==c.g)return v(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);ln(a)||mn(a);z(c)})}
517
- function nn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;L(function(u){switch(u.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(u,5),v(u,a.i.load(b.manifest,b.startTime),7)):v(u,Promise.resolve(),3);case 7:wa(u,3);break;case 5:return g=F(u),h=Sl,k=(new Map).set("detail",g),l=new R(h,k),a.i&&a.i.dispatchEvent(l),u["return"]();case 3:if(!a.i)return u["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)r=b.playerAfterLoad[p],
518
- a.i[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),mn(a));z(u)}})}function hn(a,b,c){a.i&&(Um(a),en(a,{type:"event",targetName:b,event:c},a.l))}
519
- function Um(a){a.L.V(on);for(var b={video:{},player:{}},c=t(lm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in pm)0==a.m%pm[e]&&(b.player[e]=a.i[e]());for(var f in om)0==a.m%om[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);en(a,{type:"update",update:b},a.l);ln(a)}function ln(a){return a.C&&(a.g.duration||a.i.Z())?(pn(a),a.C=!1,!0):!1}
520
- function pn(a,b){var c={contentId:a.i.md(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);mn(a,void 0===b?0:b,c)}
521
- function gn(a,b){var c=im(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;nn(a,c.initState,c.appData);Um(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
522
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return qn(a,h,g,null)},function(k){return qn(a,h,g,k)})}}
523
- function fn(a,b){var c=im(b.data);switch(c.type){case "PLAY":a.g.play();mn(a);break;case "PAUSE":a.g.pause();mn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),mn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),mn(a));break;case "STOP":a.i.Rd().then(function(){a.i&&mn(a)});break;case "GET_STATUS":pn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
524
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||mn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.T(d.contentId);g=c.autoplay||!0;a.H(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&pn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");en(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:en(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
525
- function qn(a,b,c,d){a.i&&en(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function en(a,b,c,d){a.I&&(a=hm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function mn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?rn:a.i.pd()?sn:a.g.paused?tn:un,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);en(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
526
- M("shaka.cast.CastReceiver",Tm);Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.setContentArtist=Tm.prototype.Ff;Tm.prototype.setContentImage=Tm.prototype.Gf;Tm.prototype.setContentTitle=Tm.prototype.If;Tm.prototype.clearContentMetadata=Tm.prototype.Ke;Tm.prototype.setContentMetadata=Tm.prototype.Hf;Tm.prototype.isIdle=Tm.prototype.mf;Tm.prototype.isConnected=Tm.prototype.isConnected;var on=.5,kn=5,rn="IDLE",un="PLAYING",sn="BUFFERING",tn="PAUSED";function vn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ob).box("moov",Sb).U("pssh",function(c){if(!(1<c.version)){var d=qb(c.reader.R,-12,c.size);b.data.push(d);b.g.push(nc(c.reader.bb(16)));if(0<c.version){d=c.reader.N();d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=nc(c.reader.bb(16)),b.h.push(e)}}}).parse(a)}
527
- function wn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=tb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function xn(a){if(!a)return a;var b=new vn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={jc:c.jc},d=b.next())c.jc=d.value,a.some(function(e){return function(f){return ob(f,e.jc)}}(c))||a.push(c.jc);return oc.apply(ic,ka(a))};function yn(a,b){var c=zn(a,b);return 1!=c.length?null:c[0]}function An(a,b,c){a=Bn(a,b,c);return 1!=a.length?null:a[0]}function zn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Cn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Bn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
528
- function Dn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function En(a){return Array.from(a.childNodes).every(Fn)?a.textContent.trim():null}function Fn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Gn(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Hn(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)}
529
- function In(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}function Jn(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}
530
- function Kn(a){a=Number(a);return 0===a%1?a:null}function Ln(a){a=Number(a);return 0===a%1&&0<a?a:null}function Mn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Nn(a){a=Number(a);return isNaN(a)?null:a}function On(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
531
- function Pn(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Qn(a,b){try{var c=wb(a);return Pn(c,b)}catch(d){return null}};function Rn(a,b,c){var d=Sn(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.oe?(e=h.init||e,!1):!0}),f.length&&(a=Tn(e,f,c),0==a.length&&(a=[xe("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(xe(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
532
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Wd:g,qg:e,drmInfos:a,$d:!0}}function Un(a,b,c,d){var e=Rn(a,c,d);if(b.$d){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.$d=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.Wd||b.Wd}
533
- function Vn(a){var b=0,c=tb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=qb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
534
- function Wn(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Xn(a){a=An(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=lc(a.textContent);a=Vn(a).filter(function(b){return b.type===Yn})[0];if(!a)return"";a=xb(a.value,!0);return(a=Pn(a,"WRMHEADER"))?Wn(a):""}
535
- function Tn(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.oe];if(f){var g;if(g=An(e.node,"urn:microsoft:playready","pro")){g=lc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:wn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=xe(f,e.init||a||g);if(f=Zn.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
536
- function Sn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=$n(c.value))&&b.push(c);return b}
537
- function $n(a){var b=a.getAttribute("schemeIdUri"),c=Dn(a,"urn:mpeg:cenc:2013","default_KID"),d=Bn(a,"urn:mpeg:cenc:2013","pssh").map(En);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:lc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,oe:b,keyId:c,init:0<e.length?e:null}}
538
- var Yn=1,Zn=(new Map).set("com.widevine.alpha",function(a){return(a=An(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Xn).set("com.microsoft.playready.recommendation",Xn).set("com.microsoft.playready.software",Xn).set("com.microsoft.playready.hardware",Xn);function ao(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
479
+ Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";gk=function(){return new Y};function bm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
480
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Vd(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
481
+ function cm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=dm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
482
+ function dm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
483
+ var em="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),fm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),gm=["loop","playbackRate"],hm=["pause","play"],im={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
484
+ getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},jm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},km=[["getConfiguration","configure"]],lm=[["isTextTrackVisible","setTextTrackVisibility"]],mm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
485
+ nm=["attach","detach","load","unload"];function om(a,b,c,d,e,f){var g=this;this.G=a;this.j=new P(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.K=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return pm(g)};this.C=function(h,k){var l=cm(k);switch(l.type){case "event":var m=l.targetName;l=Lg(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.T(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new O(l.severity,l.category,l.code);
486
+ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;qm.add(this)}r=om.prototype;r.destroy=function(){qm["delete"](this);rm(this);sm&&tm(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.pa=function(){return this.h};r.sd=function(){return this.M};
487
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.$b();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(qm),d=c.next();!d.done;d=c.next())um(d.value,b)},function(b){for(var c=t(qm),d=c.next();!d.done;d=c.next())d=d.value,vm="available"==b,d.j.$b()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vm&&this.j.R(wm);(a=sm)&&a.status!=chrome.cast.SessionStatus.STOPPED?um(this,
488
+ a):sm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=xm),window.__onGCastApiAvailable!=xm&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.zd=function(a){this.o=a;this.h&&ym(this,{type:"appData",appData:this.o})};
489
+ r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new O(1,8,8E3);if(!vm)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new se;chrome.cast.requestSession(function(d){return zm(b,a,d)},function(d){return Am(b,d)});return u(c,b.l,0)})};function Bm(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return zm(a,b,c)},function(c){return Am(a,c)})}}r.rb=function(){if(this.h){rm(this);if(sm){tm(this);try{sm.stop(function(){},function(){})}catch(a){}sm=null}pm(this)}};
490
+ r.get=function(a,b){var c=this;if("video"==a){if(hm.includes(b))return function(){return c.ae.apply(c,[a,b].concat(ia(Ea.apply(0,arguments))))}}else if("player"==a){if(jm[b]&&!this.get("player","isLive")())return function(){};if(mm.includes(b))return function(){return c.ae.apply(c,[a,b].concat(ia(Ea.apply(0,arguments))))};if(nm.includes(b))return function(){return c.mf.apply(c,[a,b].concat(ia(Ea.apply(0,arguments))))};if(im[b])return function(){return c.g[a][b]}}return this.g[a][b]};
491
+ r.set=function(a,b,c){this.g[a][b]=c;ym(this,{type:"set",targetName:a,property:b,value:c})};function zm(a,b,c){sm=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);pm(a);ym(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Am(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new O(2,8,c,b))}
492
+ r.ae=function(a,b){ym(this,{type:"call",targetName:a,methodName:b,args:Ea.apply(2,arguments)})};r.mf=function(a,b){var c=Ea.apply(2,arguments),d=new se,e=this.I.toString();this.I++;this.i[e]=d;try{ym(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function um(a,b){var c=a.K();a.l=new se;a.u=!0;zm(a,c,b)}function tm(a){var b=sm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
493
+ function pm(a){var b=sm?"connected"==sm.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};rm(a)}a.h=b;a.M=b?sm.receiver.friendlyName:"";a.j.$b()}function rm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function ym(a,b){var c=bm(b),d=sm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Wa)}catch(e){throw c=new O(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.s("player",d),a.rb(),c;}}var wm=.02,vm=!1,sm=null,qm=new Set;
494
+ function xm(a){if(a){a=t(qm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Cm(a,b,c){Mg.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.B=c;this.u=new Map;this.g=new om(c,function(){return Dm(d)},function(){return Em(d)},function(e,f){return Fm(d,e,f)},function(){return Gm(d)},function(){return Hm(d)});Im(this)}pa(Cm,Mg);r=Cm.prototype;
495
+ r.destroy=function(a){a&&this.g.rb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Mg.prototype.release.call(this);return Promise.all(a)};r.Xe=function(){return this.l};r.Qe=function(){return this.s};r.te=function(){return this.g.m&&vm};r.pa=function(){return this.g.pa()};r.sd=function(){return this.g.sd()};
496
+ r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=Hm(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Hd(),0):c["return"]()})};r.zd=function(a){this.g.zd(a)};r.yf=function(){Bm(this.g)};r.rb=function(){this.g.rb()};
497
+ r.we=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.B)return c["return"]();b.B=a;b.g.rb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new om(a,function(){return Dm(b)},function(){return Em(b)},function(d,e){return Fm(b,d,e)},function(){return Gm(b)},function(){return Hm(b)});b.g.init();z(c)})};
498
+ function Im(a){a.g.init();a.m=new Ue;for(var b=t(em),c=b.next();!c.done;c=b.next())a.m.v(a.i,c.value,function(f){a.g.pa()||(f=Lg(f),a.j.dispatchEvent(f))});for(var d in Ql)a.m.v(a.h,Ql[d],function(f){a.g.pa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Eb=e,Object.defineProperty(a.l,b.Eb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jm(a,f.Eb)}}(b),set:function(f){return function(g){var h=f.Eb;a.g.pa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Eb:b.Eb};a.s={};Km(a,
499
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Lm(a,f)}})});Mm(a);a.j=new Mg;a.j.mc=a.l;a.o=new Mg;a.o.mc=a.s}function Mm(a){var b=new Map;Km(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
500
+ function Km(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
501
+ function Hm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.$c(),startTime:null};a.i.pause();for(var c=t(gm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(km);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(lm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Dm(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
502
+ function Em(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
503
+ function Gm(a){for(var b=t(km),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(gm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(gm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(lm);for(k=
504
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new Q(Ml,h);a.h.dispatchEvent(h)})}
505
+ function Jm(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.pa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.pa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
506
+ function Lm(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Qb()};if("getAdManager"==b)return function(){return a.h.Rd()};if("setVideoContainer"==b)return function(c){return a.h.je(c)};
507
+ if(a.g.pa()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.pa()&&0==Object.keys(a.g.g.video).length&&im[b]||!a.g.pa()?a.h[b].bind(a.h):a.g.get("player",b)}function Fm(a,b,c){a.g.pa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}N("shaka.cast.CastProxy",Cm);Cm.prototype.changeReceiverId=Cm.prototype.we;
508
+ Cm.prototype.forceDisconnect=Cm.prototype.rb;Cm.prototype.suggestDisconnect=Cm.prototype.yf;Cm.prototype.setAppData=Cm.prototype.zd;Cm.prototype.cast=Cm.prototype.cast;Cm.prototype.receiverName=Cm.prototype.sd;Cm.prototype.isCasting=Cm.prototype.pa;Cm.prototype.canCast=Cm.prototype.te;Cm.prototype.getPlayer=Cm.prototype.Qe;Cm.prototype.getVideo=Cm.prototype.Xe;Cm.prototype.destroy=Cm.prototype.destroy;function Nm(a,b,c,d){Mg.call(this);var e=this;this.g=a;this.h=b;this.j=new Ue;this.I={video:a,player:b};this.C=c||function(){};this.K=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new P(function(){Om(e)});Pm(this)}pa(Nm,Mg);r=Nm.prototype;r.isConnected=function(){return this.F};r.$e=function(){return this.o};r.uf=function(a){this.i=a};r.ze=function(){this.i=null};
509
+ r.vf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.tf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.sf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
510
+ r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Mg.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
511
+ function Pm(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Qm(a)};b.onSenderDisconnected=function(){return Qm(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Rm(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Rm(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Sm(a,
512
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Tm(a,e)};b.start();b=t(em);for(var c=b.next();!c.done;c=b.next())a.j.v(a.g,c.value,function(e){return Um(a,"video",e)});for(var d in Ql)a.j.v(a.h,Ql[d],function(e){return Um(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Cd(3840,2160):a.h.Cd(1920,1080);a.j.v(a.g,"loadeddata",function(){a.B=!0});a.j.v(a.h,"loading",function(){a.o=
513
+ !1;Vm(a)});a.j.v(a.g,"playing",function(){a.o=!1;Vm(a)});a.j.v(a.g,"pause",function(){Vm(a)});a.j.v(a.h,"unloading",function(){a.o=!0;Vm(a)});a.j.v(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.o=!0,Vm(a))})).R(Wm)})}function Qm(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Vm(a)}
514
+ function Vm(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);en(a)||fn(a);z(c)})}
515
+ function gn(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:ua(v,3);break;case 5:return g=F(v),h=Ml,k=(new Map).set("detail",g),l=new Q(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)q=b.playerAfterLoad[p],
516
+ a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),fn(a));z(v)}})}function Um(a,b,c){a.h&&(Om(a),Rm(a,{type:"event",targetName:b,event:c},a.l))}
517
+ function Om(a){a.G.R(hn);for(var b={video:{},player:{}},c=t(fm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in jm)0==a.m%jm[e]&&(b.player[e]=a.h[e]());for(var f in im)0==a.m%im[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.B&&(a.m+=1);Rm(a,{type:"update",update:b},a.l);en(a)}function en(a){return a.u&&(a.g.duration||a.h.U())?(jn(a),a.u=!1,!0):!1}
518
+ function jn(a,b){var c={contentId:a.h.$c(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);fn(a,void 0===b?0:b,c)}
519
+ function Tm(a,b){var c=cm(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;gn(a,c.initState,c.appData);Om(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
520
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return kn(a,h,g,null)},function(k){return kn(a,h,g,k)})}}
521
+ function Sm(a,b){var c=cm(b.data);switch(c.type){case "PLAY":a.g.play();fn(a);break;case "PAUSE":a.g.pause();fn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),fn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),fn(a));break;case "STOP":a.h.Hd().then(function(){a.h&&fn(a)});break;case "GET_STATUS":jn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
522
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||fn(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.C(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&jn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Rm(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Rm(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
523
+ function kn(a,b,c,d){a.h&&Rm(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Rm(a,b,c,d){a.F&&(a=bm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function fn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?ln:a.h.cd()?mn:a.g.paused?nn:on,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Rm(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
524
+ N("shaka.cast.CastReceiver",Nm);Nm.prototype.destroy=Nm.prototype.destroy;Nm.prototype.setContentArtist=Nm.prototype.sf;Nm.prototype.setContentImage=Nm.prototype.tf;Nm.prototype.setContentTitle=Nm.prototype.vf;Nm.prototype.clearContentMetadata=Nm.prototype.ze;Nm.prototype.setContentMetadata=Nm.prototype.uf;Nm.prototype.isIdle=Nm.prototype.$e;Nm.prototype.isConnected=Nm.prototype.isConnected;var hn=.5,Wm=5,ln="IDLE",on="PLAYING",mn="BUFFERING",nn="PAUSED";function pn(a){var b=this;this.g=[];this.h=[];this.data=[];(new vb).box("moov",zb).P("pssh",function(c){if(!(1<c.version)){var d=gb(c.reader.N,-12,c.size);b.data.push(d);b.g.push($b(c.reader.Wa(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=$b(c.reader.Wa(16));b.h.push(f)}}}}).parse(a)}
525
+ function qn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=jb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function rn(a){if(!a)return a;var b=new pn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={cc:c.cc},d=b.next())c.cc=d.value,a.some(function(e){return function(f){return db(f,e.cc)}}(c))||a.push(c.cc);return ac.apply(Vb,ia(a))};function sn(a,b){var c=tn(a,b);return 1!=c.length?null:c[0]}function un(a,b,c){a=vn(a,b,c);return 1!=a.length?null:a[0]}function tn(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function wn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
526
+ function vn(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function xn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function yn(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function zn(a){return Array.from(a.childNodes).every(An)?a.textContent.trim():null}
527
+ function An(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Bn(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Cn(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)}
528
+ function Dn(a){if(!a)return null;a=RegExp("^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}
529
+ function En(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 Fn(a){a=Number(a);return 0===a%1?a:null}function Gn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Hn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function In(a){a=Number(a);return isNaN(a)?null:a}function Jn(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
530
+ function Kn(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Ln(a,b){try{var c=mb(a);return Kn(c,b)}catch(d){return null}};function Mn(a,b,c){var d=Nn(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.de?(e=h.init||e,!1):!0}),f.length&&(a=On(e,f,c),0==a.length&&(a=[me("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(me(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
531
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Md:g,cg:e,drmInfos:a,Qd:!0}}function Pn(a,b,c,d){var e=Mn(a,c,d);if(b.Qd){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Qd=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return e.Md||b.Md}
532
+ function Qn(a){var b=0,c=jb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
533
+ function Rn(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Sn(a){a=un(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Yb(a.textContent);a=Qn(a).filter(function(b){return b.type===Tn})[0];if(!a)return"";a=nb(a.value,!0);return(a=Kn(a,"WRMHEADER"))?Rn(a):""}
534
+ function On(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.de];if(f){var g;if(g=un(e.node,"urn:microsoft:playready","pro")){g=Yb(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:qn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=me(f,e.init||a||g);if(f=Un.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
535
+ function Nn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Vn(c.value))&&b.push(c);return b}
536
+ function Vn(a){var b=a.getAttribute("schemeIdUri"),c=xn(a,"urn:mpeg:cenc:2013","default_KID"),d=vn(a,"urn:mpeg:cenc:2013","pssh").map(zn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Yb(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,de:b,keyId:c,init:0<e.length?e:null}}
537
+ var Tn=1,Un=(new Map).set("com.widevine.alpha",function(a){return(a=un(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Sn).set("com.microsoft.playready.recommendation",Sn).set("com.microsoft.playready.software",Sn).set("com.microsoft.playready.hardware",Sn);function Wn(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
539
538
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
540
- function bo(a,b){var c=co(a,b,"timescale"),d=1;c&&(d=Ln(c)||1);var e=co(a,b,"duration");c=Ln(e||"");"image"==a.K.contentType&&(c=Nn(e||""));c&&(c/=d);var f=co(a,b,"startNumber");e=Number(co(a,b,"presentationTimeOffset"))||0;var g=Mn(f||"");if(null==f||null==g)g=1;var h=eo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.W.duration||Infinity,l=zn(h,"S");h=[];var m=-e;l=t(mb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,r=n.next,u=Gn(p,"t",Mn);n=Gn(p,"d",Mn);var x=Gn(p,"r",Kn);null!=
541
- u&&(u-=e);if(!n)break;p=null!=u?u:m;u=x||0;if(0>u)if(r){r=Gn(r,"t",Mn);if(null==r)break;else if(p>=r)break;u=Math.ceil((r-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;u=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);r=t(jb(u+1));for(u=r.next();!u.done;u=r.next())m=p+n,h.push({start:p/f,end:m/f,Qf:p}),p=m}f=h}return{timescale:d,ja:c,Ib:g,Va:e/d||0,Sd:e,timeline:f}}
542
- function co(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Mb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function eo(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Mb).map(function(d){return yn(d,c)}).reduce(function(d,e){return d||e})}
543
- function fo(a,b,c,d,e,f){for(var g=Dn(a,"http://www.w3.org/1999/xlink","href"),h=Dn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Og(new N(2,4,4028));if("onLoad"!=h)return Og(new N(2,4,4027));var m=we([d],[g]);return e.request(0,dh(m,b)).ca(function(n){n=Qn(n.data,a.tagName);if(!n)return Og(new N(2,4,4001,g));
544
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return go(a,b,c,m[0],e,f+1)})}
545
- function go(a,b,c,d,e,f){f=void 0===f?0:f;if(Dn(a,"http://www.w3.org/1999/xlink","href")){var g=fo(a,b,c,d,e,f);c&&(g=g.ca(void 0,function(){return go(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Dn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(go(k,b,c,d,e,f)));return Sg(g).ca(function(){return a})};function ho(a,b,c,d,e,f,g){var h,k=(new Ob).U("sidx",function(l){h=io(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
546
- function io(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var n=g.reader.Gb();a=a+g.size+m;n=t(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.N();m=(p&2147483648)>>>31;p&=2147483647;var r=g.reader.N();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new oi(l/k+c,(l+r)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=r;a+=p}g.parser.stop();
547
- return h};function jo(a){this.h=tb(a);this.g=new Cb(this.h,0)}jo.prototype.oa=function(){return this.g.oa()};
548
- function ko(a){var b=lo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=lo(a);a:{d=t(mo);for(var e=d.next();!e.done;e=d.next())if(ob(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=t(mb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ga?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=tb(a.h,
549
- a.g.$(),b);a.g.skip(b);return new no(c,d)}function lo(a){var b=a.g.$(),c=a.g.aa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return qb(a.h,b,c)}var mo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function no(a,b){this.id=a;this.g=b}
550
- function oo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=t(jb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function po(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new jo(a.g);for(var n=null,p=null;a.oa();){var r=ko(a);if(187==r.id){var u=qo(r);u&&(r=c*u.Rf,u=b+u.zf,null!=n&&m.push(new oi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
551
- function qo(a){var b=new jo(a.g);a=ko(b);if(179!=a.id)throw new N(2,3,3013);a=oo(a);b=ko(b);if(183!=b.id)throw new N(2,3,3012);b=new jo(b.g);for(var c=0;b.oa();){var d=ko(b);if(241==d.id){c=oo(d);break}}return{Rf:a,zf:c}};function ro(a,b){var c=eo(a,b,"Initialization");if(!c)return null;var d=a.K.Aa,e=c.getAttribute("sourceURL");e&&(d=we(a.K.Aa,[e]));e=0;var f=null;if(c=Gn(c,"range",Jn))e=c.start,f=c.end;return new mi(function(){return d},e,f)}
552
- function so(a,b){var c=Number(co(a,to,"presentationTimeOffset"))||0,d=co(a,to,"timescale"),e=1;d&&(e=Ln(d)||1);var f=c/e||0,g=ro(a,to);uo(a,g);var h=Xg(a);return{xb:function(){var k=eo(h,to,"RepresentationIndex"),l=h.K.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=we(h.K.Aa,[k]));k=vo(h);return wo(h,b,g,l,k.start,k.end,f)}}}
553
- function wo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,w,y,C,D,A,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.fb||!a.W.ee,l=a.W.start,m=a.W.duration,n=a.K.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f),"webm"==n?p(c.na(),c.ka,c.fa):null],p=null,v(G,Promise.all(u),2);x=G.h;w=x[0];y=x[1]||null;C=null;D=l-g;A=l;E=m?l+m:Infinity;if("mp4"==n)var H=ho(w,e,d,c,D,A,E);else{H=new jo(y);if(440786851!=ko(H).id)throw new N(2,3,3008);var J=ko(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
554
- J=new jo(J.g);for(var I=null;J.oa();){var K=ko(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new jo(I.g);K=1E6;for(J=null;I.oa();){var O=ko(I);if(2807729==O.id)K=oo(O);else if(17545==O.id)if(4==O.g.byteLength)J=O.g.getFloat32(0);else if(8==O.g.byteLength)J=O.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=ko(new jo(w));if(475249515!=K.id)throw new N(2,3,3007);H=po(K,H,I,J,d,c,D,A,E)}C=H;h.Db(C);r=new U(C);k&&r.$a(A,E,!0);return G["return"](r)})}
555
- function to(a){return a.cc}function vo(a){var b=eo(a,to,"RepresentationIndex");a=co(a,to,"indexRange");a=Jn(a||"");b&&(a=Gn(b,"range",Jn,a));return a}function uo(a,b){xo(a,b);if(!vo(a))throw new N(2,4,4002);}function xo(a,b){var c=a.K.mimeType.split("/")[1];if(a.K.contentType!=Be&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function yo(a,b){var c=ro(a,zo),d=Ao(a);if(!d.ja&&!d.timeline&&1<d.Ab.length)throw new N(2,4,4002);if(!d.ja&&!a.W.duration&&!d.timeline&&1==d.Ab.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ha.id&&a.K.id&&(f=a.ha.id+","+a.K.id,e=b[f]);c=Bo(a.W.start,a.W.duration,a.K.Aa,d,c);d=!e;e?e.Bb(c,a.presentationTimeline.ab()):(e=new U(c),f&&a.fb&&(b[f]=e));a.presentationTimeline.Db(c);a.fb&&a.W.ee||e.$a(a.W.start,a.W.duration?a.W.start+a.W.duration:
556
- Infinity,d);return{xb:function(){return Promise.resolve(e)}}}function zo(a){return a.cb}function Ao(a){var b=Co(a);a=bo(a,zo);var c=a.Ib;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Ib:c,Va:a.Va,timeline:a.timeline,Ab:b}}
557
- function Bo(a,b,c,d,e){var f=d.Ab.length;d.timeline&&d.timeline.length!=d.Ab.length&&(f=Math.min(d.timeline.length,d.Ab.length));var g=a-d.Va,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=t(jb(f));for(var n=f.next();!n.done;m={Wc:m.Wc},n=f.next()){n=n.value;var p=d.Ab[n];m.Wc=we(c,[p.qf]);var r=void 0;r=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+r,function(u){return function(){return u.Wc}}(m),p.start,p.end,e,g,a,h));l=r}return k}
558
- function Co(a){return[a.K.cb,a.la.cb,a.ha.cb].filter(Mb).map(function(b){return zn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ce&&(a.ce=!0);var c=b.getAttribute("media");b=Gn(b,"mediaRange",Jn,{start:0,end:null});return{qf:c,start:b.start,end:b.end}})};function Do(a,b,c,d,e,f){var g=Eo(a),h=Fo(a);Go(h);var k=Xg(a);if(h.Yb)return xo(a,g),{xb:function(){var u=ao(h.Yb,k.K.id,null,k.bandwidth||null,null);u=we(k.K.Aa,[u]);return wo(k,b,g,u,0,null,h.Va)}};if(h.ja)return d||(a.presentationTimeline.wd(h.ja),a.presentationTimeline.xd(a.W.start)),{xb:function(){return Ho(k,h,e,g,f)}};var l=null;d=null;a.ha.id&&a.K.id&&(d=a.ha.id+","+a.K.id,l=c[d]);var m=Io(k,h,g),n=a.W.start,p=a.W.duration?a.W.start+a.W.duration:Infinity,r=Infinity!=p;l?(r&&(new U(m)).$a(n,
559
- p,!0),l.Bb(m,a.presentationTimeline.ab())):(l=new U(m),d&&a.fb&&(c[d]=l));a.presentationTimeline.Db(m);r&&l.$a(n,p);return{xb:function(){return Promise.resolve(l)}}}function Jo(a){return a.dc}function Fo(a){var b=bo(a,Jo),c=co(a,Jo,"media");a=co(a,Jo,"index");return{ja:b.ja,timescale:b.timescale,Ib:b.Ib,Va:b.Va,Sd:b.Sd,timeline:b.timeline,vd:c,Yb:a}}
560
- function Go(a){var b=a.Yb?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Yb&&(a.timeline=null),a.ja=null);if(!a.Yb&&!a.vd)throw new N(2,4,4002);}
561
- function Ho(a,b,c,d,e){function f(I){var K=(I-r)*p,O=K+b.Va,Q=K+l;K=Q+p;var S=Math.min(K,h());Q=new oi(Q,S,function(){var ba=ao(x,y,I,w,O*u);return we(C,[ba])},0,null,d,D,l,h());Q.j=K;return Q}function g(){var I=[Math.max(k.ab(),l),Math.min(k.ib(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.ha.id,n=a.W.duration,p=b.ja,r=b.Ib,u=b.timescale,
562
- x=b.vd,w=a.bandwidth||null,y=a.K.id,C=a.K.Aa,D=l-b.Va,A=g();a=a.fb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.ib()<h();E=k.Z();if(c||E){var J=Math.max(a,A+1);H.Oc(p,function(){var I=k.ab();H.gb(I);var K=t(g());K.next();K=K.next().value;for(var O=[];J<=K;){var Q=f(J);O.push(Q);J++}return I>h()&&!O.length?null:O})}return Promise.resolve(H)}
563
- function Io(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Va;e=e?d+e:Infinity;for(var g=[],h={},k=t(mb(b.timeline)),l=k.next();!l.done;h={Vc:h.Vc,Yc:h.Yc,ad:h.ad,Sc:h.Sc,cd:h.cd,Tc:h.Tc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Qf;m=m.end;h.ad=l.ga+b.Ib;h.cd=p+b.Sd;h.Yc=a.K.id;h.Sc=a.bandwidth||null;h.Vc=b.vd;h.Tc=a.K.Aa;g.push(new oi(d+n,d+m,function(r){return function(){var u=ao(r.Vc,r.Yc,r.ad,r.Sc||null,r.cd);return we(r.Tc,[u]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
564
- function Eo(a){var b=co(a,Jo,"initialization");if(!b)return null;var c=a.K.id,d=a.bandwidth||null,e=a.K.Aa;return new mi(function(){var f=ao(b,c,null,d,null);return we(e,[f])},0,null)};function Ko(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Ko.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
565
- function Lo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba,da,ea,Ia,Ba,lb,Qa;return L(function(Ya){switch(Ya.g){case 1:d=Ce;Mo(b);No(b);Oo(b);Po(b);if(!c&&1==b.length){e=b[0];a.g=e.uc;a.h=e.Qc;a.j=e.textStreams;a.i=e.imageStreams;Ya.v(2);break}f=-1;g=t(mb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ga,n=l.item,a.m.has(n.id)||(a.m.add(n.id),-1==f&&(f=m));if(-1==f)return Ya["return"]();p=b.map(function(Ra){return Ra.uc});r=b.map(function(Ra){return Ra.Qc});u=b.map(function(Ra){return Ra.textStreams});
566
- x=b.map(function(Ra){return Ra.imageStreams});w=t(u);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(Qo(d.ba));D=t(x);for(A=D.next();!A.done;A=D.next())E=A.value,E.push(Qo(d.oc));return v(Ya,Ro(a.g,p,f,So,To),3);case 3:return v(Ya,Ro(a.h,r,f,So,To),4);case 4:return v(Ya,Ro(a.j,u,f,So,To),5);case 5:return v(Ya,Ro(a.i,x,f,So,To),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(S=t(a.g),ba=S.next();!ba.done;ba=S.next())for(da=ba.value,ea=t(a.h),Ia=ea.next();!Ia.done;Ia=ea.next())Ba=Ia.value,lb=ei(da.drmInfos,
567
- Ba.drmInfos),da.drmInfos.length&&Ba.drmInfos.length&&!lb.length||(Qa=G++,H.push({id:Qa,language:da.language,primary:da.primary,audio:da,video:Ba,bandwidth:(da.bandwidth||0)+(Ba.bandwidth||0),drmInfos:lb,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(J=a.h.concat(a.g),I=t(J),K=I.next();!K.done;K=I.next())O=K.value,Q=G++,H.push({id:Q,language:O.language,primary:O.primary,audio:O.type==d.eb?O:null,video:O.type==d.Pa?O:null,bandwidth:O.bandwidth||0,drmInfos:O.drmInfos,allowedByApplication:!0,
568
- allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Ya)}})}
569
- function Mo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.uc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&vc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.uc=c}}
570
- function Oo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&vc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
571
- function No(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Qc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&vc(e.roles,h.roles)&&ph(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qc=c}}
572
- function Po(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
573
- function Uo(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O;return L(function(Q){switch(Q.g){case 1:b=Ce;if(1==a.length)return Q["return"](a[0]);c=a.map(function(S){return S.filter(function(ba){return ba.type==b.eb})});d=a.map(function(S){return S.filter(function(ba){return ba.type==b.Pa})});e=a.map(function(S){return S.filter(function(ba){return ba.type==b.ba})});f=a.map(function(S){return S.filter(function(ba){return ba.type==b.oc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
574
- k.push(Vo(b.ba));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Vo(b.oc));return v(Q,Ro([],c,0,Wo,Xo),2);case 2:return p=Q.h,v(Q,Ro([],d,0,Wo,Xo),3);case 3:return r=Q.h,v(Q,Ro([],e,0,Wo,Xo),4);case 4:return u=Q.h,v(Q,Ro([],f,0,Wo,Xo),5);case 5:x=Q.h;w=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,J=t(r),I=J.next();!I.done;I=J.next())K=I.value,O=w++,K.variantIds.push(O),H.variantIds.push(O);else for(y=r.concat(p),C=t(y),D=C.next();!D.done;D=C.next())A=D.value,
575
- A.variantIds=[w++];return Q["return"](r.concat(p).concat(u).concat(x))}})}
576
- function Ro(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba;return L(function(da){switch(da.g){case 1:f=Ce;g=[];h=t(mb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ga,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);r=t(a);u=r.next();case 2:if(u.done){da.v(4);break}x=u.value;return v(da,Yo(x,b,c,e,g),5);case 5:w=da.h;if(!w)throw new N(2,4,4037);u=r.next();da.v(2);break;case 4:y=t(g),C=y.next();case 6:if(C.done){da.v(8);break}D=C.value;A=t(D);E=A.next();case 9:if(E.done){C=
577
- y.next();da.v(6);break}G=E.value;return v(da,Zo(G,b,d,e,g),12);case 12:(H=da.h)&&a.push(H);E=A.next();da.v(9);break;case 8:J=t(g);for(C=J.next();!C.done;C=J.next())for(I=C.value,K={},O=t(I),E=O.next();!E.done;K={Xa:K.Xa},E=O.next())if(K.Xa=E.value,Q=K.Xa.type==f.ba&&!K.Xa.language,S=K.Xa.type==f.oc&&!K.Xa.tilesLayout,!Q&&!S&&(ba=a.some(function(ea){return function(Ia){return Ia.mimeType==ea.Xa.mimeType&&Qe(Ia.codecs)==Qe(ea.Xa.codecs)}}(K))))throw new N(2,4,4037);return da["return"](a)}})}
578
- function Yo(a,b,c,d,e){var f;return L(function(g){if(1==g.g)return(f=$o(b,a))?v(g,ap(f),2):g["return"](!1);bp(a,f,c,d,e);return g["return"](!0)})}function ap(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
579
- function Zo(a,b,c,d,e){var f,g;return L(function(h){if(1==h.g)return f=c(a),(g=$o(b,f))?f.createSegmentIndex?v(h,ap(g),2):h.v(2):h["return"](null);bp(f,g,0,d,e);return h["return"](f)})}function bp(a,b,c,d,e){b=t(mb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ga;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Mf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
580
- function So(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ni;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Wo(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
581
- function To(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ka(a.keyIds),ka(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ei(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
582
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=So(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),To(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&To(a.trickModeVideo,b)}
583
- function Xo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ka(a.keyIds),ka(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ka(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
584
- function $o(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:cp,video:cp,text:dp,image:ep}[f.type],h={audio:fp,video:gp,text:hp,image:ip}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function cp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Qe(b.codecs)!=Qe(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ei(c,d).length:1)}return c?!1:!0}
585
- function dp(a,b){return a.language?b.language?0==Mf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function ep(a){return a.tilesLayout?!0:!1}
586
- function fp(a,b,c){if(a.id==c.id)return!0;var d=Mf(a.language,b.language),e=Mf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
587
- d=jp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==kp)return!0;if(d==lp)return!1;d=jp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==kp?!0:d==lp?!1:a.bandwidth&&mp(a.bandwidth,b.bandwidth,c.bandwidth)==kp?!0:!1}
588
- function gp(a,b,c){if(a.id==c.id)return!0;var d=jp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==kp)return!0;if(d==lp)return!1;if(a.frameRate){d=jp(a.frameRate,b.frameRate,c.frameRate);if(d==kp)return!0;if(d==lp)return!1}return a.bandwidth&&mp(a.bandwidth,b.bandwidth,c.bandwidth)==kp?!0:!1}
589
- function hp(a,b,c){if(a.id==c.id)return!0;var d=Mf(a.language,b.language),e=Mf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
590
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function ip(a,b,c){return a.id==c.id?!0:jp(a.width*a.height,b.width*b.height,c.width*c.height)==kp?!0:!1}function Vo(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
591
- function Qo(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
592
- function jp(a,b,c){if(b==a&&a!=c)return lp;if(c==a&&a!=b)return kp;if(b>a){if(c<=a||c-a<b-a)return kp;if(c-a>b-a)return lp}else{if(c>a)return lp;if(a-c<a-b)return kp;if(a-c>a-b)return lp}return np}function mp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?kp:b<a?lp:np}var kp=1,np=0,lp=-1;function op(){var a=this;this.D=this.o=null;this.h=[];this.A=null;this.F=1;this.m={};this.L={};this.g=new Ko;this.C=0;this.H=new Oa(5);this.u=new P(function(){a.$b()});this.i=new Yg;this.j=null;this.I=[];this.l=Infinity;this.s=!1}q=op.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.h=[a],c.D=b,v(e,pp(c),2);d=e.h;c.D&&qp(c,d);if(!c.D)throw new N(2,7,7001);return e["return"](c.A)})};
593
- q.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.D=null;this.h=[];this.A=null;this.m={};this.g=null;null!=this.u&&(this.u.stop(),this.u=null);return this.i.destroy()};q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return B(c,2),v(c,pp(a),4);if(2!=c.g)return wa(c,0);b=F(c);if(!a.D||!b)return c["return"]();a.D.onError(b);z(c)})};q.onExpirationUpdated=function(){};
594
- function pp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=dh(a.h,a.o.retryParameters),c=a.D.networkingEngine,d=Date.now(),e=c.request(0,b),Zg(a.i,e),v(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.D)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return v(k,rp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Pa(a.H,1,h);return k["return"](h)})}
595
- function rp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Qn(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.o.dash.disableXlinkProcessing)return k["return"](sp(a,d,c));f=a.o.dash.xlinkFailGracefully;g=go(d,a.o.retryParameters,f,c,a.D.networkingEngine);Zg(a.i,g);return v(k,g.promise,2)}h=k.h;return k["return"](sp(a,h,c))})}
596
- function sp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba,da,ea,Ia;return L(function(Ba){switch(Ba.g){case 1:d=[c];e=zn(b,"Location").map(En).filter(Mb);0<e.length&&(f=we(d,e),d=a.h=f);g=zn(b,"BaseURL");h=g.map(En);k=we(d,h);l=0;g&&g.length&&(l=Gn(g[0],"availabilityTimeOffset",Nn)||0);m=a.o.dash.ignoreMinBufferTime;n=0;m||(n=Gn(b,"minBufferTime",In)||0);a.C=Gn(b,"minimumUpdatePeriod",In,-1);p=Gn(b,"availabilityStartTime",Hn);r=Gn(b,"timeShiftBufferDepth",In);u=a.o.dash.ignoreSuggestedPresentationDelay;
597
- x=null;u||(x=Gn(b,"suggestedPresentationDelay",In));w=a.o.dash.ignoreMaxSegmentDuration;y=null;w||(y=Gn(b,"maxSegmentDuration",In));C=b.getAttribute("type")||"static";if(a.A)for(D=a.A.presentationTimeline,A=t(Object.values(a.m)),E=A.next();!E.done;E=A.next())G=E.value,G.gb(D.ab());else H=a.o.defaultPresentationDelay||1.5*n,J=null!=x?x:H,D=new T(p,J,a.o.dash.autoCorrectDrift);I=b.getAttribute("profiles")||"";K={fb:"static"!=C,presentationTimeline:D,ha:null,W:null,la:null,K:null,bandwidth:0,ce:!1,vb:l,
598
- profiles:I.split(",")};O=tp(a,K,k,b);Q=O.duration;S=O.periods;D.ec("static"==C);"static"!=C&&O.Yd||D.La(Q||Infinity);a.l&&!a.s&&(ba=a.D.isAutoLowLatencyMode())&&(a.D.enableLowLatencyMode(),a.s=a.D.isLowLatencyMode());a.s?D.re(a.l):a.l&&Wa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");(da=D.Z())&&!isNaN(a.o.availabilityWindowOverride)&&(r=a.o.availabilityWindowOverride);
599
- null==r&&(r=Infinity);D.Od(r);D.wd(y||1);return v(Ba,Lo(a.g,S,K.fb),2);case 2:if(a.A){a.A.variants=a.g.l;a.A.textStreams=a.g.j.slice();a.A.imageStreams=a.g.i;a.D.filter(a.A);Ba.v(3);break}a.A={presentationTimeline:D,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:n||0};if(!D.we()){Ba.v(3);break}ea=zn(b,"UTCTiming");return v(Ba,up(a,k,ea),5);case 5:Ia=Ba.h;if(!a.D)return Ba["return"]();D.se(Ia);case 3:a.D.makeTextStreamsForClosedCaptions(a.A),z(Ba)}})}
600
- function tp(a,b,c,d){var e=Gn(d,"mediaPresentationDuration",In),f=[],g=0;d=zn(d,"Period");for(var h=t(mb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.ga;var m=l.item,n=l.next;l=Gn(m,"start",In,g);var p=m.id,r=Gn(m,"duration",In),u=null;if(n){var x=Gn(n,"start",In);null!=x&&(u=x-l)}else null!=e&&(u=e-l);null==u&&(u=r);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.I.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=vp(a,b,c,{start:l,duration:u,node:m,ee:null==u||!n});f.push(g);
601
- b.ha.id&&u&&(a.L[b.ha.id]=u);if(null==u){g=null;break}g=l+u}}a.I=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Yd:!1}:{periods:f,duration:g,Yd:!0}}
602
- function vp(a,b,c,d){b.ha=wp(d.node,null,c);b.W=d;b.ha.vb=b.vb;b.ha.id||(b.ha.id="__shaka_period_"+d.start);c=zn(d.node,"EventStream");c=t(c);for(var e=c.next();!e.done;e=c.next())xp(a,d.start,d.duration,e.value);c=zn(d.node,"AdaptationSet").map(function(m){return yp(a,b,m)}).filter(Mb);if(b.fb){d=[];e=t(c);for(var f=e.next();!f.done;f=e.next()){f=t(f.value.Cf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);}d=c.filter(function(m){return!m.Qd});
603
- c=c.filter(function(m){return m.Qd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Qd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={nc:h.nc},l=k.next())h.nc=l.value,h.nc.trickModeVideo=e.streams.find(function(m){return function(n){return Qe(m.nc.codecs)==Qe(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:zp(d,"audio");g=a.o.disableVideo?[]:zp(d,"video");f=a.o.disableText?[]:zp(d,Be);c=a.o.disableThumbnails?
604
- []:zp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ka(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ka(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ka(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ka(h.value.streams));return{id:b.ha.id,uc:d,Qc:e,textStreams:g,imageStreams:f}}
605
- function zp(a,b){return a.filter(function(c){return c.contentType==b})}
606
- function yp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.la=wp(c,b.ha,null);var e=!1,f=zn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Mb),h=void 0,k=b.la.contentType==Be;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
607
- l}}var n;m=zn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=zn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
608
- 10)));m=zn(c,"Accessibility");var u=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var x=t(r),w=x.next();!w.done;w=x.next()){var y=w.value,C=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,C=y);u.set(w,If(C))}}else u.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
609
- 1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),u.set(x,If(y));else u.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=zn(c,"ContentProtection");var D=Rn(l,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI),A=If(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=zn(c,"Label"))&&l.length&&
610
- (l=l[0],l.textContent&&(E=l.textContent));l=zn(c,"Representation");c=l.map(function(G){if(G=Ap(a,b,D,h,A,E,e,g,u,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.la.contentType;if(a.o.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=Bp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.la.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
611
- m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ka(r.keyIds),ka(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Mb);return{id:b.la.id||"__fake__"+a.F++,contentType:b.la.contentType,language:A,rg:e,streams:c,drmInfos:D.drmInfos,Qd:f,Cf:k}}
612
- function Ap(a,b,c,d,e,f,g,h,k,l){b.K=wp(l,b.la,null);a.l=Math.min(a.l,b.K.vb);if(!Cp(b.K))return null;var m=b.W.start;b.bandwidth=Gn(l,"bandwidth",Ln)||0;var n=b.K.contentType,p=n==Be||"application"==n;n="image"==n;try{var r=function(G,H,J){return Dp(a,G,H,J)};if(b.K.cc)var u=so(b,r);else if(b.K.cb)u=yo(b,a.m);else if(b.K.dc)u=Do(b,r,a.m,!!a.A,a.o.dash.initialSegmentLimit,a.L);else{var x=b.K.Aa,w=b.W.duration||0;u={xb:function(){return Promise.resolve(Mi(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
613
- throw G;}r=zn(l,"ContentProtection");r=Un(r,c,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI);r=new Set(r?[r]:[]);var y=!1;zn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.K.mimeType="audio/eac3-joc",y=!0);var C=!1;p&&(C=h.includes("forced_subtitle"));var D;if(n&&((l=zn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
614
- (D=l.getAttribute("value")),!D))return null;var A;l=b.K.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var E={id:a.F++,originalId:b.K.id,createSegmentIndex:function(){var G;return L(function(H){if(1==H.g){if(E.segmentIndex)return H.v(0);G=E;return v(H,u.xb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.K.mimeType,codecs:b.K.codecs,frameRate:b.K.frameRate,pixelAspectRatio:b.K.pixelAspectRatio,
615
- bandwidth:b.bandwidth,width:b.K.width,height:b.K.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.K.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.K.yd,audioSamplingRate:b.K.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:A,tilesLayout:D};return E}
616
- q.$b=function(){var a=this,b,c;return L(function(d){switch(d.g){case 1:return b=0,B(d,2),v(d,pp(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=F(d),a.D&&(c.severity=1,a.D.onError(c));case 3:if(!a.D)return d["return"]();qp(a,b);z(d)}})};function qp(a,b){0>a.C||a.u.V(Math.max(3,a.C-b,Sa(a.H)))}
617
- function wp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,yd:null,audioSamplingRate:null,vb:0};c=c||b.Aa;var d=zn(a,"BaseURL"),e=d.map(En),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Gn(a,"frameRate",On)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=zn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
618
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=zn(a,"AudioChannelConfiguration");m=Ep(m)||b.yd;p=Gn(a,"audioSamplingRate",Mn)||b.audioSamplingRate;f||(f=Bp(g,h));var r=yn(a,"SegmentBase"),u=yn(a,"SegmentTemplate"),x=r?Gn(r,"availabilityTimeOffset",Nn)||0:0,w=u?Gn(u,"availabilityTimeOffset",Nn)||0:0;d=d&&d.length?Gn(d[0],"availabilityTimeOffset",Nn)||0:0;d=b.vb+d+x+w;return{Aa:we(c,e),cc:r||b.cc,cb:yn(a,"SegmentList")||b.cb,dc:u||b.dc,width:Gn(a,"width",Mn)||b.width,height:Gn(a,
619
- "height",Mn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),yd:m,audioSamplingRate:p,vb:d}}
620
- function Ep(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){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":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
621
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Cp(a){var b=a.cc?1:0;b+=a.cb?1:0;b+=a.dc?1:0;if(0==b)return a.contentType==Be||"application"==a.contentType?!0:!1;1!=b&&(a.cc&&(a.cb=null),a.dc=null);return!0}
622
- function Fp(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=we(b,[c]),f=dh(e,a.o.retryParameters),f.method=d,g=a.D.networkingEngine.request(4,f),Zg(a.i,g),v(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=wb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
623
- function up(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.o.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.v(4);break}h=g.value;B(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.v(7);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 n.v(8);
624
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.v(9);break;case 7:return v(n,Fp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return v(n,Fp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
625
- case 9:wa(n,3);break;case 5:F(n);case 3:g=f.next();n.v(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
626
- function xp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Gn(d,"timescale",Mn)||1;d=t(zn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Gn(h,"presentationTime",Mn)||0,l=Gn(h,"duration",Mn)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.D.onTimelineRegionAdded(h)}}
627
- function Dp(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=jh,f=Zi(b,c,d,a.o.retryParameters),g=a.D.networkingEngine,h=g.request(e,f),Zg(a.i,h),v(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Bp(a,b){return Te(Me(a,b))?Be:a.split("/")[0]}M("shaka.dash.DashParser",op);ki.mpd=function(){return new op};ii["application/dash+xml"]=function(){return new op};ii["video/vnd.mpeg.dash.mpd"]=function(){return new op};function Gp(a,b,c,d){this.g=a;this.type=b;this.X=c;this.segments=d||null}function Hp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Hp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
628
- Hp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Ip(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Jp(a,b,c){c=void 0===c?[]:c;this.X=b;this.g=a;this.h=c}function Kp(a,b){this.name=a;this.value=b};function Lp(a,b){return a.filter(function(c){return c.name==b})}function Mp(a,b){return a.filter(function(c){return Ip(c,"TYPE")==b})}function Np(a,b){var c=Lp(a,b);return c.length?c[0]:null}function Op(a,b,c){c=void 0===c?0:c;return(a=Np(a,b))?Number(a.value):c};function Pp(a){this.h=a;this.g=0}function Qp(a){Rp(a,/[ \t]+/gm)}function Rp(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Sp(a){return a.g==a.h.length?null:(a=Rp(a,/[^ \t\n]*/gm))?a[0]:null};function Tp(){this.g=0}
629
- function Up(a,b,c){b=wb(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 N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Vp(a.g++,g),--a.g,Wp.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=t(mb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ga;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Vp(a.g++,
630
- l);if(Xp.includes(l.name)){if(1!=b)throw new N(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=t(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=Vp(a.g++,m),Wp.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?h.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=we([d],[m.trim()])[0],l&&g.push(l),e.push(new Jp(m,g,h)),g=[],h=[]);h.length&&(l&&
631
- g.push(l),e.push(new Jp("",g,h)));return new Gp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Kp("URI",k)),e=!0)}}return new Gp(c,b,f)}function Vp(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Pp(e);var g;(g=Rp(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Rp(e,h);)c.push(new Kp(g[1],g[2]||g[3]))}return new Hp(a,d,c,f)}
632
- var Wp="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Xp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Yp(){}function Zp(a){try{var b=$p(a);return Qg({uri:a,je:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Og(c)}}function $p(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=lc(a):e=Ab(a);return{data:e,contentType:c}}
633
- M("shaka.net.DataUriPlugin",Yp);Yp.parse=Zp;ah("data",Zp);function aq(){var a=this;this.o=this.D=null;this.Oa=1;this.u=new Map;this.m=new Map;this.Ha=new Set;this.h=new Map;this.g=null;this.L="";this.ea=new Tp;this.ra=0;this.s=new P(function(){a.$b()});this.j=bq;this.A=null;this.qa=0;this.F=Infinity;this.Y=this.Za=0;this.C=new Yg;this.T=[];this.I=new Map;this.Ya=!1;this.l=new Map;this.O=null;this.pa=new Map;this.H=new Map;this.i=!1}q=aq.prototype;q.configure=function(a){this.o=a};
634
- q.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.D=b,c.i=b.isLowLatencyMode(),v(f,cq(c,dh([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,v(f,dq(c,d.data),3);e=c.ra;0<e&&c.s.V(e);return f["return"](c.A)})};q.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.C&&(a.push(this.C.destroy()),this.C=null);this.o=this.D=null;this.Ha.clear();this.A=null;this.h.clear();this.m.clear();this.l.clear();this.u.clear();return Promise.all(a)};
635
- q.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.j==bq)return e["return"]();b=[];a.O=null;c=Array.from(a.h.values());return c.length?v(e,eq(a,c[0]),2):e.v(2)}for(d=1;d<c.length;d++)b.push(eq(a,c[d]));return v(e,Promise.all(b),0)})};
636
- function eq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;return L(function(x){if(1==x.g)return c=fq,d=b.Be,e=new je(d),a.i&&b.Fe&&me(e,new oe("_HLS_skip=YES")),v(x,cq(a,dh([e.toString()],a.o.retryParameters),0),2);if(3!=x.g){f=x.h;g=Up(a.ea,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Lp(g.X,"EXT-X-DEFINE");k=gq(a,h);l=b.stream;return v(x,hq(a,b.Pc,g,l.mimeType,b.ud,k,b.Me),3)}m=x.h;l.segmentIndex.Bb(m,a.g.ab());m.length&&(n=Op(g.X,"EXT-X-MEDIA-SEQUENCE",0),p=b.ud.get(n),l.segmentIndex.gb(p));r=m[m.length-
637
- 1];if(u=Np(g.X,"EXT-X-ENDLIST"))iq(a,c.Ae),a.g.La(r.endTime);z(x)})}q.onExpirationUpdated=function(){};
638
- function dq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba,da,ea,Ia,Ba,lb;return L(function(Qa){switch(Qa.g){case 1:c=Up(a.ea,b,a.L);if(0!=c.type)throw new N(2,4,4022);d=Lp(c.X,"EXT-X-DEFINE");jq(a,d);e=Lp(c.X,"EXT-X-MEDIA");f=Lp(c.X,"EXT-X-STREAM-INF");kq(a,f);g=Lp(c.X,"EXT-X-SESSION-DATA");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Z(l,"DATA-ID"),n=Z(l,"URI"),p=Z(l,"LANGUAGE"),r=Z(l,"VALUE"),u=(new Map).set("id",m),n&&u.set("uri",we([a.L],[n])[0]),p&&u.set("language",
639
- p),r&&u.set("value",r),x=new R("sessiondata",u),a.D)a.D.onEvent(x);return v(Qa,lq(a,e),2);case 2:return mq(a,e),v(Qa,nq(a,f),3);case 3:return w=Qa.h,v(Qa,oq(a,e),4);case 4:y=Qa.h;if(!a.D)throw new N(2,7,7001);if(a.Ya&&0==w.length)throw new N(2,4,4034);D=C=Infinity;A=t(a.h.values());for(E=A.next();!E.done;E=A.next())G=E.value,C=Math.min(C,G.he),"text"!=G.stream.type&&(D=Math.min(D,G.pf-G.he));a.j!=bq?(a.g=new T(0,a.o.defaultPresentationDelay?a.o.defaultPresentationDelay:a.Y?a.Y:3*a.qa),a.g.ec(!1)):
640
- (a.g=new T(null,0),a.g.ec(!0));pq(a);if(a.j!=bq)a.ra=a.F,H=fq,a.j==H.ze&&(J=a.g.Lc,isNaN(a.o.availabilityWindowOverride)||(J=a.o.availabilityWindowOverride),a.g.Od(J));else for(a.g.La(D),a.g.offset(-C),I=t(a.h.values()),E=I.next();!E.done;E=I.next())K=E.value,K.stream.segmentIndex.offset(-C),K.stream.segmentIndex.$a(0,D);a.T=[];O=[];Q=t(w);for(S=Q.next();!S.done;S=Q.next())for(ba=S.value,da=t([ba.video,ba.audio]),ea=da.next();!ea.done;ea=da.next())(Ia=ea.value)&&O.push(Ia);return v(Qa,Promise.all(O.map(function(Ya){return L(function(Ra){return v(Ra,
641
- Ya.createSegmentIndex(),0)})})),5);case 5:Ba=t(O);for(ea=Ba.next();!ea.done;ea=Ba.next())lb=ea.value,a.T.push(lb.segmentIndex.M);pq(a);a.A={presentationTimeline:a.g,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.D.makeTextStreamsForClosedCaptions(a.A);z(Qa)}})}function jq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.u.has(d)||a.u.set(d,e))}}
642
- function gq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.u.get(f))&&c.set(f,e)}return c}function kq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=qq(a,e);if(g){var h=ze(Be,e);a.l.set(g,h);uc(e,h)}f&&(g=ye("audio",e),a.l.set(f,g));d&&(f=ye("video",e),a.l.set(d,f))}}
643
- function oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return L(function(u){if(1==u.g)return c=Mp(b,"SUBTITLES"),d=c.map(function(x){var w,y,C;return L(function(D){if(1==D.g){if(w=a.o.disableText)return D["return"](null);B(D,2);return v(D,rq(a,x),4)}if(2!=D.g)return y=D.h,D["return"](y.stream);C=F(D);if(a.o.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),v(u,Promise.all(d),2);e=u.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Ip(h,"GROUP-ID"),l=a.l.get(k))if(m=a.m.get(k))for(n=
644
- t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return u["return"](e.filter(function(x){return x}))})}function lq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?v(d,rq(a,b[0]),2):d.v(2);c=b.slice(1).map(function(e){return rq(a,e)});return v(d,Promise.all(c),0)})}
645
- function nq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,u;return L(function(x){if(1==x.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Ip(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Z(g,"VIDEO-RANGE"),v(x,sq(a,g),2);if(u=x.h){for(var w=x["return"],y=u.audio,C=u.video,D=t(C),A=D.next();!A.done;A=D.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
646
- void 0,A.frameRate=Number(h)||void 0,A.hdr=r||void 0;D=a.o.disableAudio;if(!y.length||D)y=[null];D=a.o.disableVideo;if(!C.length||D)C=[null];D=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Pc:"")+" - "+(A?A.Pc:"");G&&J&&I.length&&K.length&&!(0<ei(I,K).length)||a.Ha.has(H)||(G={id:a.Oa++,language:G?G.language:"und",primary:!!G&&G.primary||
647
- !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.Ha.add(H))}}x=w.call(x,D)}else x=x["return"]([]);return x})}),v(f,Promise.all(c),2);d=f.h;e=d.reduce(Kb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
648
- function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;return L(function(w){if(1==w.g)return c=Ce,d=qq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.m.has(g)?a.m.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Ip(b,"URI"),p=k.audio.find(function(y){return y&&y.Pc==n}),r=ze(c.Pa,d),(u=ze(c.eb,d))&&!r?l=c.eb:!h.length&&u&&r?(l=c.Pa,d=[[r,u].join()]):k.audio.length&&p?(l=c.eb,m=!0):l=k.video.length?c.eb:c.Pa,m?w.v(2):v(w,tq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
649
- uq(k);return w["return"](k)})}function qq(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Qe(f);c.has(g)||(e.push(f),c.add(g))}return e}function vq(a){a=Z(a,"LANGUAGE")||"und";return If(a)}
650
- function uq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function mq(a,b){var c=Mp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=vq(e);var f=Ip(e,"GROUP-ID");e=Ip(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
651
- function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;return L(function(w){if(1==w.g){c=Ip(b,"GROUP-ID");d="";var y=Ip(b,"TYPE").toLowerCase();"subtitles"==y&&(y=Be);e=y;e!=Be&&c&&a.l.has(c)&&(d=a.l.get(c));f=wq(Ip(b,"URI"),a.u);if(a.h.has(f))return w["return"](a.h.get(f));g=vq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Z(b,"CHARACTERISTICS");r=Z(b,"FORCED");
652
- u="YES"==r;return v(w,xq(a,f,d,e,g,l,h,m,null,p,u,n),2)}x=w.h;a.m.has(c)?a.m.get(c).push(x):a.m.set(c,[x]);if(null==x)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,x);return w["return"](x)})}
653
- function tq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=wq(Ip(b,"URI"),a.u);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=ye(d,c);return v(k,xq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
654
- function xq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba,da,ea,Ia,Ba,lb,Qa,Ya,Ra,Hh,Vm,Wm,Xm,Ym,Ih,Jh,of,Zm,$m,an,bn;return L(function(cb){switch(cb.g){case 1:return p=we([a.L],[b])[0],v(cb,cq(a,dh([p],a.o.retryParameters),0),2);case 2:r=cb.h;p=r.uri;u=Up(a.ea,r.data,p);if(1!=u.type)throw new N(2,4,4017);x=[];if(u.segments)for(w=t(u.segments),y=w.next();!y.done;y=w.next())C=y.value,D=Lp(C.X,"EXT-X-KEY"),x.push.apply(x,ka(D));A=!1;E=[];G=new Set;H=t(x);for(J=H.next();!J.done;J=
655
- H.next())if(I=J.value,K=Ip(I,"METHOD"),"NONE"!=K){A=!0;if("AES-128"==K)return a.Ya=!0,cb["return"](null);O=Ip(I,"KEYFORMAT");if(S=(Q=yq[O])?Q(I):null){if(S.keyIds)for(ba=t(S.keyIds),da=ba.next();!da.done;da=ba.next())ea=da.value,G.add(ea);E.push(S)}}if(A&&!E.length)throw new N(2,4,4026);Ia=Lp(u.X,"EXT-X-DEFINE");Ba=gq(a,Ia);zq(a,u);return v(cb,Aq(a,d,c,u,Ba),3);case 3:return lb=cb.h,Bq.includes(lb)&&(c=""),Qa=new Map,Ya=new Map,B(cb,4),v(cb,hq(a,b,u,lb,Qa,Ba,Ya),6);case 6:Ra=cb.h;wa(cb,5);break;case 4:Hh=
656
- F(cb);if(4035==Hh.code)return Wa("Skipping unsupported HLS stream",lb,b),cb["return"](null);throw Hh;case 5:Vm=Ra[0].startTime;Wm=Ra[Ra.length-1].endTime;Xm=new U(Ra);Ym=d==Be?"subtitle":void 0;Ih=[];if(l)for(Jh=t(l.split(",")),of=Jh.next();!of.done;of=Jh.next())Zm=of.value,Ih.push(Zm);an=($m=Np(u.X,"EXT-X-SERVER-CONTROL"))?null!=$m.getAttribute("CAN-SKIP-UNTIL"):!1;bn={id:a.Oa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xm,mimeType:lb,codecs:c,kind:Ym,encrypted:A,
657
- drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Ih,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:bn,Pc:b,Be:p,he:Vm,pf:Wm,ud:Qa,Me:Ya,Fe:an})}})}
658
- function zq(a,b){var c=Np(b.X,"EXT-X-PLAYLIST-TYPE"),d=Np(b.X,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)iq(a,bq);else{c?iq(a,Cq):iq(a,Dq);d=Np(b.X,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Np(b.X,"EXT-X-PART-INF");a.i&&c?(a.Za=Number(Ip(c,"PART-TARGET")),a.F=Math.min(a.Za,a.F),c=Np(b.X,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Ip(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.qa=Math.max(d,a.qa)}}
659
- function Eq(a,b,c,d){c=Np(c,"EXT-X-MAP");if(!c)return null;var e=Ip(c,"URI");d=wq(we([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.pa.has(b)||(c=Fq(d,c),a.pa.set(b,c));return a.pa.get(b)}function Fq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new mi(function(){return[a]},c,d)}
660
- function Gq(a,b,c,d,e,f,g,h){var k=d.X,l=wq(d.g,g),m=Np(k,"EXTINF"),n=g=0,p=null,r=[];if(a.i&&d.h.length){a={};d=t(mb(d.h));for(var u=d.next();!u.done;a={Xc:a.Xc},u=d.next()){u=u.value;var x=u.ga;u=u.item;var w=0==x?c:r[r.length-1];x=0==x?e:w.endTime;var y=Number(Z(u,"DURATION"));y=x+y;var C=0,D=null;"EXT-X-PRELOAD-HINT"==u.name?C=(w=Z(u,"BYTERANGE-START"))?Number(w):0:(C=Z(u,"BYTERANGE"),w=t(Hq(w,C)),C=w.next().value,D=w.next().value);u=Z(u,"URI");a.Xc=we([h],[u])[0];r.push(new oi(x,y,function(A){return function(){return[A.Xc]}}(a),
661
- C,D,b,f,0,Infinity))}}else if(!m)throw new N(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=r[r.length-1].endTime;(h=Np(k,"EXT-X-BYTERANGE"))?(c=t(Hq(c,h.value)),n=c.next().value,p=c.next().value):r.length&&(n=r[0].ka,p=r[r.length-1].fa);return new oi(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,r)}function Hq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.fa+1,d=c+d-1);return[c,d]}
662
- function pq(a){if(a.g){for(var b=t(a.T),c=b.next();!c.done;c=b.next())a.g.Db(c.value);a.T=[]}}
663
- function hq(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q,S,ba,da;return L(function(ea){switch(ea.g){case 1:h=c.segments;l=Op(c.X,"EXT-X-MEDIA-SEQUENCE",0);n=(m=Np(c.X,"EXT-X-SKIP"))?Number(Z(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.j!=bq&&e.has(p)){r=e.get(p);ea.v(2);break}if(null!=a.O){ea.v(3);break}k=Eq(a,c.g,h[0].X,f);u=a;return v(ea,Iq(a,b,k,d,p,!1,h[0],f),4);case 4:u.O=ea.h;case 3:r=a.O;case 2:x=h[0].g;ab(x.split("/").pop());w=Op(c.X,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&(g.has(w)||
664
- g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.H.get(w)||0;C=[];D=function(Ia){return mb(Ia)};A=t(D(h));E=A.next();case 5:if(E.done){ea.v(7);break}H=G=E.value;J=H.ga;I=H.item;K=C[C.length-1];O=0==J?r:K.endTime;p=l+n+J;e.set(p,O);k=Eq(a,c.g,I.X,f);Q=Np(I.X,"EXT-X-DISCONTINUITY");if(!Q){ea.v(8);break}w++;g.set(w,p);return v(ea,Jq(a,w,b,k,d,p,I,f,O),9);case 9:y=ea.h;case 8:!a.i&&(S=a.D.isAutoLowLatencyMode())&&(a.D.enableLowLatencyMode(),a.i=a.D.isLowLatencyMode());ba=Np(I.X,"EXTINF");a.i||ba?
665
- (da=Gq(a,k,K,I,O,y,f,c.g),C.push(da)):a.i||Wa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");E=A.next();ea.v(5);break;case 7:return ea["return"](C)}})}
666
- function Jq(a,b,c,d,e,f,g,h,k){var l,m;return L(function(n){if(1==n.g)return l=0,a.H.has(b)?(l=a.H.get(b),n.v(2)):v(n,Iq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.H.set(b,l));return n["return"](l)})}
667
- function Kq(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:c=jh;d=Zi(b.na(),b.ka,b.fa,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](cq(a,d,c));e=Zi(b.na(),b.ka,b.ka+2048-1,a.o.retryParameters);B(k,2);return v(k,cq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Wa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
668
- e.uris[0]);return v(k,cq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
669
- function Iq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,x;return L(function(w){switch(w.g){case 1:k=Gq(a,c,null,g,0,0,h,"");if(a.A&&!f&&(l=a.h.get(b),m=l.ud.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(Bq.includes(d))throw Wa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Wa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.v(2);break}n=[Kq(a,k)];c&&n.push(Kq(a,c));return v(w,Promise.all(n),3);case 3:return p=
670
- w.h,r=p[0],u=p[1]||p[0],w["return"](Lq(b,r.uri,r.data,u.data));case 2:if("video/mp2t"!=d){w.v(4);break}return v(w,Kq(a,k),5);case 5:return x=w.h,w["return"](Mq(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
671
- function Lq(a,b,c,d){var e=0;(new Ob).box("moov",Sb).box("trak",Sb).box("mdia",Sb).U("mdhd",function(h){e=Zd(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new Ob).box("moof",Sb).box("traf",Sb).U("tfdt",function(h){f=Yd(h.reader,h.version).fd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
672
- function Mq(a,b,c){function d(){f.seek(g+188);h=f.aa();71!=h&&(f.seek(g+192),h=f.aa());71!=h&&(f.seek(g+204),h=f.aa());71!=h&&e();f.me(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Cb(c,0),g=0,h=0;for(c=Math.min(f.R.byteLength-188,940);;){g=f.$();h=f.aa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Gb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.aa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.aa(),f.skip(k)),1!=f.N()>>8)d();else{f.skip(3);c=f.aa()>>6;0!=c&&1!=c||e();0==f.aa()&&e();c=f.aa();k=
673
- f.Gb();var l=f.Gb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function wq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
674
- function Aq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,x;return L(function(w){if(1==w.g){f=Ce;g=jh;h=wq(d.segments[0].g,e);k=new je(h);l=k.ya.split(".").pop();m=Nq[b];if(n=m[l])return w["return"](n);if(b==f.ba)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=dh([h],a.o.retryParameters);p.method="HEAD";return v(w,cq(a,p,g),2)}r=w.h;u=r.headers["content-type"];return u?w["return"](u.split(";")[0]):(x=m.mp4,w["return"](x))})}
675
- q.$b=function(){var a=this,b,c;return L(function(d){if(1==d.g){if(!a.D)return d["return"]();B(d,2);return v(d,a.update(),4)}if(2!=d.g)return b=a.ra,a.s.V(b),wa(d,0);c=F(d);if(!a.D)return d["return"]();c.severity=1;a.D.onError(c);a.s.V(.1);z(d)})};function iq(a,b){a.j=b;a.g&&a.g.ec(a.j==bq);a.j!=bq||a.s.stop()}function cq(a,b,c){if(!a.C)throw new N(2,7,7001);b=a.D.networkingEngine.request(c,b);Zg(a.C,b);return b.promise}M("shaka.hls.HlsParser",aq);
676
- var Bq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Nq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
677
- vtt:"text/vtt",ttml:"application/ttml+xml"}},yq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Ip(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Ip(a,"URI");b=$p(b);b=qb(b.data);b=xe("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Ip(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Ip(a,"URI");a=$p(a);
678
- a=qb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=wn(a,b);return xe("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},bq="VOD",Dq="EVENT",Cq="LIVE",fq={Ae:bq,Xf:Dq,ze:Cq};ki.m3u8=function(){return new aq};ii["application/x-mpegurl"]=function(){return new aq};ii["application/vnd.apple.mpegurl"]=function(){return new aq};function Oq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,je:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=zb(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Pq(){}function Qq(a,b,c,d){var e=new Rq;nh(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Sq,g={Td:!1,ve:!1};a=Tq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Ng(a,function(){g.Td=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.ve=!0;f.abort()});h.V(b/1E3);a["finally"](function(){h.stop()})}return a}
679
- function Tq(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,w,y,C,D;return L(function(A){switch(A.g){case 1:return g=Uq,h=Vq,n=m=0,p=Date.now(),B(A,2),v(A,g(a,c),4);case 4:return k=A.h,r=k.clone().body.getReader(),x=(u=k.headers.get("Content-Length"))?parseInt(u,10):0,w=function(E){function G(){var H,J;return L(function(I){switch(I.g){case 1:return B(I,2),v(I,r.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.v(5);break}m+=H.value.byteLength;if(!f){I.v(5);break}return v(I,
680
- f(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,m-n,x-m),n=m,p=J;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:w}),v(A,k.arrayBuffer(),5);case 5:l=A.h;wa(A,3);break;case 2:y=F(A);if(d.Td)throw new N(1,1,7001,a,b);if(d.ve)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,y,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),A["return"](Oq(C,l,k.status,a,k.url,b))}})}
681
- function Wq(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Pq);Pq.isSupported=Wq;Pq.parse=Qq;var Uq=window.fetch,Sq=window.AbortController,Vq=window.ReadableStream,Rq=window.Headers;Wq()&&(ah("http",Qq,2,!0),ah("https",Qq,2,!0));function Xq(){}
682
- function Yq(a,b,c,d){var e=new Zq,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var u=p.next();!u.done;u=p.next())u=u.value.split(": "),r[u[0].toLowerCase()]=u.slice(1).join(": ");try{var x=Oq(r,n.response,n.status,a,n.responseURL,
683
- c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Ng(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",Xq);Xq.parse=Yq;var Zq=window.XMLHttpRequest;
684
- ah("http",Yq,1,!0);ah("https",Yq,1,!0);function $q(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ar(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}$q.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function br(a){var b=this;this.P=a;this.g=new Map;this.J=new af(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.h=[];this.ge=function(){};this.fe=function(){};this.Ob=new $q}br.prototype.destroy=function(){return this.J.destroy()};function cr(a,b,c){a.ge=b;a.fe=c}function dr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
685
- function er(a,b,c,d,e,f){bf(a.J);var g=ar(a.Ob,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return L(function(u){if(1==u.g)return v(u,fr(a,c),2);h=u.h;if(a.J.g)throw new N(2,9,7001);if(e)for(m in k=qb(h),l=new vn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.fe(p,r);a.Ob.close(g,h.byteLength);var x=a.Ob;a.ge(0==x.i?0:x.j/x.i,a.Ob.h);return u["return"](f(h))})});a.g.set(b,d);return d}
686
- function gr(a,b,c){bf(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return L(function(e){return v(e,c(),0)})});a.g.set(b,d)}function hr(a){return L(function(b){return 1==b.g?v(b,Promise.all(a.g.values()),2):b["return"](a.Ob.h)})}function fr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=jh,d=a.P.request(c,b),e=function(){return d.abort()},a.h.push(e),v(g,d.promise,2);f=g.h;uc(a.h,e);return g["return"](f.data)})};function ir(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new De;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ir.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return v(b,a.g,4)}if(2!=b.g)return wa(b,0);F(b);z(b)})};
687
- function jr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return v(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}ir.prototype.store=function(){return this.h};ir.prototype.promise=function(){return this.g};function kr(a){this.h=a;this.g=[]}kr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function lr(a,b){return mr(a,b,"readwrite")}function mr(a,b,c){c=a.h.transaction([b],c);var d=new ir(c,b);a.g.push(d);d.promise().then(function(){uc(a.g,d)},function(){uc(a.g,d)});return d};function nr(a,b,c){this.g=new kr(a);this.i=b;this.h=c}q=nr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return or(this.i)};q.removeSegments=function(a,b){return pr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return v(d,qr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Ud(e)}))})};q.addManifests=function(){return or(this.h)};
688
- q.updateManifestExpiration=function(a,b){var c=lr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return pr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return v(d,qr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Rb(e)})))})};
689
- q.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=mr(a.g,a.h,"readonly"),c=new Map,v(d,jr(b,function(e,f){var g;return L(function(h){if(1==h.g)return v(h,a.Rb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};q.Ud=function(a){return a};q.Rb=function(a){return Promise.resolve(a)};function or(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
690
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=lr(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={mc:g.mc},k=h.next())l=k.value,g.mc=e.add(l),g.mc.onsuccess=function(n){return function(){f.push(n.mc.result)}}(g);return v(m,d.promise(),2)}return m["return"](f)})};
691
- function pr(a,b,c,d){a=lr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={lc:e.lc},f=c.next())e.lc=f.value,b["delete"](e.lc).onsuccess=function(g){return function(){return d(g.lc)}}(e);return a.promise()}
692
- function qr(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=mr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Mb:h.Mb,Kb:h.Kb},l=k.next())h.Kb=l.value,h.Mb=e.get(h.Kb),h.Mb.onsuccess=function(n){return function(){void 0==n.Mb.result&&g.push(n.Kb);f[n.Kb]=n.Mb.result}}(h);return v(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function rr(a){this.g=new kr(a)}rr.prototype.destroy=function(){return this.g.destroy()};rr.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=mr(a.g,"session-ids","readonly"),c=[],v(d,jr(b,function(e,f){c.push(f)}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};rr.prototype.add=function(a){var b=lr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
693
- rr.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=lr(b.g,"session-ids"),v(d,jr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):v(d,c.promise(),0)})};function sr(){this.g=new Map}sr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};sr.prototype.init=function(){var a=this;tr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
694
- function ur(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ka:d,ma:f},ma:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function vr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ka:d,ma:f},e)})})}
695
- function wr(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function xr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function yr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
696
- function zr(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=tr,d.forEach(function(f){(f=f())&&b.push(f)})),v(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.v(0):v(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ar(a,b){tr.set(a,b)}M("shaka.offline.StorageMuxer",sr);sr.unregister=function(a){tr["delete"](a)};sr.register=Ar;sr.prototype.destroy=sr.prototype.destroy;var tr=new Map;function Br(){nr.apply(this,arguments)}ra(Br,nr);Br.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=lr(c.g,c.h);e=d.store();f=new De;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return v(g,Promise.all([d.promise(),f]),0)})};
697
- Br.prototype.Rb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Cr(a.periods[c],e),b.push(f);return v(h,Uo(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
698
- function Cr(a,b){Dr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Er(e,a.startTime,b)})}
699
- function Er(a,b,c){var d=a.initSegmentUri?Fr(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Fr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
700
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Br.prototype.Ud=function(a){return{data:a.data}};function Fr(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
701
- function Dr(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
702
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Gr(){nr.apply(this,arguments)}ra(Gr,nr);
703
- Gr.prototype.Rb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Hr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return v(h,Uo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
539
+ function Xn(a,b){var c=Yn(a,b,"timescale"),d=1;c&&(d=Gn(c)||1);var e=Yn(a,b,"duration");c=Gn(e||"");"image"==a.H.contentType&&(c=In(e||""));c&&(c/=d);var f=Yn(a,b,"startNumber");e=Number(Yn(a,b,"presentationTimeOffset"))||0;var g=Hn(f||"");if(null==f||null==g)g=1;var h=Zn(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.S.duration||Infinity;h=tn(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Bn(p,"t",Hn),x=Bn(p,"d",Hn);p=Bn(p,"r",Fn);null!=v&&(v-=e);if(!x)break;v=null!=v?v:m;p=
540
+ p||0;if(0>p)if(q){q=Bn(q,"t",Hn);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/x)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/x)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+x,l.push({start:v/f,end:m/f,Cf:v}),v=m}f=l}return{timescale:d,ga:c,Db:g,Sa:e/d||0,Id:e,timeline:f}}function Yn(a,b,c){return[b(a.H),b(a.ka),b(a.ca)].filter(Lc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
541
+ function Zn(a,b,c){return[b(a.H),b(a.ka),b(a.ca)].filter(Lc).map(function(d){return sn(d,c)}).reduce(function(d,e){return d||e})}
542
+ function $n(a,b,c,d,e,f){for(var g=xn(a,"http://www.w3.org/1999/xlink","href"),h=xn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Fg(new O(2,4,4028));if("onLoad"!=h)return Fg(new O(2,4,4027));var m=le([d],[g]);return e.request(0,Vg(m,b)).$(function(n){n=Ln(n.data,a.tagName);if(!n)return Fg(new O(2,4,4001,g));
543
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return ao(a,b,c,m[0],e,f+1)})}
544
+ function ao(a,b,c,d,e,f){f=void 0===f?0:f;if(xn(a,"http://www.w3.org/1999/xlink","href")){var g=$n(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return ao(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==xn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ao(k,b,c,d,e,f)));return Jg(g).$(function(){return a})};function bo(a,b,c,d,e,f,g){var h,k=(new vb).P("sidx",function(l){h=co(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
545
+ function co(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var n=g.reader.Bb();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.L(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.L();g.reader.skip(4);if(1==q)throw new O(2,3,3006);h.push(new hi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function eo(a){this.h=jb(a);this.g=new sb(this.h,0)}eo.prototype.na=function(){return this.g.na()};
546
+ function fo(a){var b=go(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=go(a);a:{d=t(ho);for(var e=d.next();!e.done;e=d.next())if(db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.W();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.W()+b<=a.h.byteLength?b:a.h.byteLength-a.g.W();d=jb(a.h,a.g.W(),b);a.g.skip(b);return new io(c,d)}
547
+ function go(a){var b=a.g.W(),c=a.g.X();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return gb(a.h,b,c)}var ho=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function io(a,b){this.id=a;this.g=b}
548
+ function jo(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ko(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new eo(a.g);for(var n=null,p=null;a.na();){var q=fo(a);if(187==q.id){var v=lo(q);v&&(q=c*v.Df,v=b+v.lf,null!=n&&m.push(new hi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new hi(n+g,d+g,l,p,null,f,g,h,k));return m}
549
+ function lo(a){var b=new eo(a.g);a=fo(b);if(179!=a.id)throw new O(2,3,3013);a=jo(a);b=fo(b);if(183!=b.id)throw new O(2,3,3012);b=new eo(b.g);for(var c=0;b.na();){var d=fo(b);if(241==d.id){c=jo(d);break}}return{Df:a,lf:c}};function mo(a,b){var c=Zn(a,b,"Initialization");if(!c)return null;var d=a.H.va,e=c.getAttribute("sourceURL");e&&(d=le(a.H.va,[e]));e=0;var f=null;if(c=Bn(c,"range",En))e=c.start,f=c.end;return new fi(function(){return d},e,f)}
550
+ function no(a,b){var c=Number(Yn(a,oo,"presentationTimeOffset"))||0,d=Yn(a,oo,"timescale"),e=1;d&&(e=Gn(d)||1);var f=c/e||0,g=mo(a,oo);po(a,g);var h=Og(a);return{sb:function(){var k=Zn(h,oo,"RepresentationIndex"),l=h.H.va;k&&(k=k.getAttribute("sourceURL"))&&(l=le(h.H.va,[k]));k=qo(h);return ro(h,b,g,l,k.start,k.end,f)}}}
551
+ function ro(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,x,w,y,D,B,A,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Za||!a.S.Wd,l=a.S.start,m=a.S.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ma(),c.ha,c.ba):null],p=null,u(G,Promise.all(v),2);x=G.h;w=x[0];y=x[1]||null;D=null;B=l-g;A=l;E=m?l+m:Infinity;if("mp4"==n)var H=bo(w,e,d,c,B,A,E);else{H=new eo(y);if(440786851!=fo(H).id)throw new O(2,3,3008);var K=fo(H);if(408125543!=K.id)throw new O(2,3,3009);H=K.g.byteOffset;
552
+ K=new eo(K.g);for(var I=null;K.na();){var J=fo(K);if(357149030==J.id){I=J;break}}if(!I)throw new O(2,3,3010);I=new eo(I.g);J=1E6;for(K=null;I.na();){var R=fo(I);if(2807729==R.id)J=jo(R);else if(17545==R.id)if(4==R.g.byteLength)K=R.g.getFloat32(0);else if(8==R.g.byteLength)K=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==K)throw new O(2,3,3011);I=J/1E9;K*=I;J=fo(new eo(w));if(475249515!=J.id)throw new O(2,3,3007);H=ko(J,H,I,K,d,c,B,A,E)}D=H;h.yb(D);q=new T(D);k&&q.Va(A,E,!0);return G["return"](q)})}
553
+ function oo(a){return a.Xb}function qo(a){var b=Zn(a,oo,"RepresentationIndex");a=Yn(a,oo,"indexRange");a=En(a||"");b&&(a=Bn(b,"range",En,a));return a}function po(a,b){so(a,b);if(!qo(a))throw new O(2,4,4002);}function so(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=qe&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function to(a,b){var c=mo(a,uo),d=vo(a);if(!d.ga&&!d.timeline&&1<d.vb.length)throw new O(2,4,4002);if(!d.ga&&!a.S.duration&&!d.timeline&&1==d.vb.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.ca.id&&a.H.id&&(f=a.ca.id+","+a.H.id,e=b[f]);c=wo(a.S.start,a.S.duration,a.H.va,d,c);d=!e;e?e.wb(c,a.presentationTimeline.Qa()):(e=new T(c),f&&a.Za&&(b[f]=e));a.presentationTimeline.yb(c);a.Za&&a.S.Wd||e.Va(a.S.start,a.S.duration?a.S.start+a.S.duration:
554
+ Infinity,d);return{sb:function(){return Promise.resolve(e)}}}function uo(a){return a.Xa}function vo(a){var b=xo(a);a=Xn(a,uo);var c=a.Db;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Db:c,Sa:a.Sa,timeline:a.timeline,vb:b}}
555
+ function wo(a,b,c,d,e){var f=d.vb.length;d.timeline&&d.timeline.length!=d.vb.length&&(f=Math.min(d.timeline.length,d.vb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Oc:m.Oc},n++){var p=d.vb[n];m.Oc=le(c,[p.cf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new hi(a+l,a+q,function(v){return function(){return v.Oc}}(m),p.start,p.end,e,g,a,h));l=q}return k}
556
+ function xo(a){return[a.H.Xa,a.ka.Xa,a.ca.Xa].filter(Lc).map(function(b){return tn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ud&&(a.Ud=!0);var c=b.getAttribute("media");b=Bn(b,"mediaRange",En,{start:0,end:null});return{cf:c,start:b.start,end:b.end}})};function yo(a,b,c,d,e,f){var g=zo(a),h=Ao(a);Bo(h);var k=Og(a);if(h.Ub)return so(a,g),{sb:function(){var v=Wn(h.Ub,k.H.id,null,k.bandwidth||null,null);v=le(k.H.va,[v]);return ro(k,b,g,v,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.nd(h.ga),a.presentationTimeline.od(a.S.start)),{sb:function(){return Co(k,h,e,g,f)}};var l=null;d=null;a.ca.id&&a.H.id&&(d=a.ca.id+","+a.H.id,l=c[d]);var m=Do(k,h,g),n=a.S.start,p=a.S.duration?a.S.start+a.S.duration:Infinity,q=Infinity!=p;l?(q&&(new T(m)).Va(n,
557
+ p,!0),l.wb(m,a.presentationTimeline.Qa())):(l=new T(m),d&&a.Za&&(c[d]=l));a.presentationTimeline.yb(m);q&&l.Va(n,p);return{sb:function(){return Promise.resolve(l)}}}function Eo(a){return a.Yb}function Ao(a){var b=Xn(a,Eo),c=Yn(a,Eo,"media");a=Yn(a,Eo,"index");return{ga:b.ga,timescale:b.timescale,Db:b.Db,Sa:b.Sa,Id:b.Id,timeline:b.timeline,md:c,Ub:a}}
558
+ function Bo(a){var b=a.Ub?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Ub&&(a.timeline=null),a.ga=null);if(!a.Ub&&!a.md)throw new O(2,4,4002);}
559
+ function Co(a,b,c,d,e){function f(I){var J=(I-q)*p,R=J+b.Sa,M=J+l;J=M+p;var W=Math.min(J,h());M=new hi(M,W,function(){var ea=Wn(x,y,I,w,R*v);return le(D,[ea])},0,null,d,B,l,h());M.j=J;return M}function g(){var I=[Math.max(k.Qa(),l),Math.min(k.bb(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(J){return J+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.S.start,m=a.ca.id,n=a.S.duration,p=b.ga,q=b.Db,v=b.timescale,
560
+ x=b.md,w=a.bandwidth||null,y=a.H.id,D=a.H.va,B=l-b.Sa,A=g();a=a.Za?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new T(c);c=k.bb()<h();E=k.U();if(c||E){var K=Math.max(a,A+1);H.Gc(p,function(){var I=k.Qa();H.$a(I);var J=t(g());J.next();J=J.next().value;for(var R=[];K<=J;){var M=f(K);R.push(M);K++}return I>h()&&!R.length?null:R})}return Promise.resolve(H)}
561
+ function Do(a,b,c){var d=a.S.start,e=a.S.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Nc:h.Nc,Qc:h.Qc,Tc:h.Tc,Kc:h.Kc,Vc:h.Vc,Lc:h.Lc},k++){var l=b.timeline[k],m=l.start,n=l.Cf;l=l.end;h.Tc=k+b.Db;h.Vc=n+b.Id;h.Qc=a.H.id;h.Kc=a.bandwidth||null;h.Nc=b.md;h.Lc=a.H.va;g.push(new hi(d+m,d+l,function(p){return function(){var q=Wn(p.Nc,p.Qc,p.Tc,p.Kc||null,p.Vc);return le(p.Lc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
562
+ function zo(a){var b=Yn(a,Eo,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.va;return new fi(function(){var f=Wn(b,c,null,d,null);return le(e,[f])},0,null)};function Fo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Fo.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
563
+ function Go(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R,M,W,ea,Ta,Ja;return L(function(Ka){switch(Ka.g){case 1:d=re;Ho(b);Io(b);Jo(b);Ko(b);if(!c&&1==b.length){e=b[0];a.g=e.lc;a.h=e.Ic;a.j=e.textStreams;a.i=e.imageStreams;Ka.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ka["return"]();k=b.map(function(wa){return wa.lc});l=b.map(function(wa){return wa.Ic});m=b.map(function(wa){return wa.textStreams});n=b.map(function(wa){return wa.imageStreams});
564
+ p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Lo(d.Z));x=t(n);for(w=x.next();!w.done;w=x.next())y=w.value,y.push(Lo(d.ic));return u(Ka,Mo(a.g,k,f,No,Oo),3);case 3:return u(Ka,Mo(a.h,l,f,No,Oo),4);case 4:return u(Ka,Mo(a.j,m,f,No,Oo),5);case 5:return u(Ka,Mo(a.i,n,f,No,Oo),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),J=I.next();!J.done;J=I.next())for(R=J.value,M=t(a.h),W=M.next();!W.done;W=M.next())ea=W.value,Ta=Yh(R.drmInfos,ea.drmInfos),R.drmInfos.length&&ea.drmInfos.length&&
565
+ !Ta.length||(Ja=D++,B.push({id:Ja,language:R.language,primary:R.primary,audio:R,video:ea,bandwidth:(R.bandwidth||0)+(ea.bandwidth||0),drmInfos:Ta,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=t(A),G=E.next();!G.done;G=E.next())H=G.value,K=D++,B.push({id:K,language:H.language,primary:H.primary,audio:H.type==d.Ya?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
566
+ a.l=B;z(Ka)}})}function Ho(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.lc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ic(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.lc=c}}
567
+ function Jo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&ic(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
568
+ function Io(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Ic),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&ic(e.roles,h.roles)&&ih(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ic=c}}
569
+ function Ko(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
570
+ function Po(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R;return L(function(M){switch(M.g){case 1:b=re;if(1==a.length)return M["return"](a[0]);c=a.map(function(W){return W.filter(function(ea){return ea.type==b.Ya})});d=a.map(function(W){return W.filter(function(ea){return ea.type==b.Na})});e=a.map(function(W){return W.filter(function(ea){return ea.type==b.Z})});f=a.map(function(W){return W.filter(function(ea){return ea.type==b.ic})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
571
+ k.push(Qo(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Qo(b.ic));return u(M,Mo([],c,0,Ro,So),2);case 2:return p=M.h,u(M,Mo([],d,0,Ro,So),3);case 3:return q=M.h,u(M,Mo([],e,0,Ro,So),4);case 4:return v=M.h,u(M,Mo([],f,0,Ro,So),5);case 5:x=M.h;w=0;if(q.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,K=t(q),I=K.next();!I.done;I=K.next())J=I.value,R=w++,J.variantIds.push(R),H.variantIds.push(R);else for(y=q.concat(p),D=t(y),B=D.next();!B.done;B=D.next())A=B.value,
572
+ A.variantIds=[w++];return M["return"](q.concat(p).concat(v).concat(x))}})}
573
+ function Mo(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I;return L(function(J){switch(J.g){case 1:f=re;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){J.A(4);break}m=l.value;return u(J,To(m,b,c,e,g),5);case 5:n=J.h;if(!n)throw new O(2,4,4037);l=k.next();J.A(2);break;case 4:p=t(g),q=p.next();case 6:if(q.done){J.A(8);break}v=q.value;x=t(v);w=x.next();case 9:if(w.done){q=p.next();J.A(6);break}y=w.value;return u(J,Uo(y,b,d,e,g),12);
574
+ case 12:(D=J.h)&&a.push(D);w=x.next();J.A(9);break;case 8:B=t(g);for(q=B.next();!q.done;q=B.next())for(A=q.value,E={},G=t(A),w=G.next();!w.done;E={Ua:E.Ua},w=G.next())if(E.Ua=w.value,H=E.Ua.type==f.Z&&!E.Ua.language,K=E.Ua.type==f.ic&&!E.Ua.tilesLayout,!H&&!K&&(I=a.some(function(R){return function(M){return M.mimeType==R.Ua.mimeType&&Fe(M.codecs)==Fe(R.Ua.codecs)}}(E))))throw new O(2,4,4037);return J["return"](a)}})}
575
+ function To(a,b,c,d,e){var f;return L(function(g){if(1==g.g)return(f=Vo(b,a))?u(g,Wo(f),2):g["return"](!1);Xo(a,f,c,d,e);return g["return"](!0)})}function Wo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
576
+ function Uo(a,b,c,d,e){var f,g;return L(function(h){if(1==h.g)return f=c(a),(g=Vo(b,f))?f.createSegmentIndex?u(h,Wo(g),2):h.A(2):h["return"](null);Xo(f,g,0,d,e);return h["return"](f)})}function Xo(a,b,c,d,e){for(var f=0;f<b.length;f++)if(f>=c){var g=b[f];d(a,g);var h=!0;"audio"==a.type&&0==Bf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}
577
+ function No(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Gi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Ro(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
578
+ function Oo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=Yh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
579
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=No(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Oo(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Oo(a.trickModeVideo,b)}
580
+ function So(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
581
+ function Vo(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Yo,video:Yo,text:Zo,image:$o}[f.type],h={audio:ap,video:bp,text:cp,image:dp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function Yo(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Fe(b.codecs)!=Fe(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Yh(c,d).length:1)}return c?!1:!0}
582
+ function Zo(a,b){return a.language?b.language?0==Bf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function $o(a){return a.tilesLayout?!0:!1}
583
+ function ap(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
584
+ d=ep(a.channelsCount,b.channelsCount,c.channelsCount);if(d==fp)return!0;if(d==gp)return!1;d=ep(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==fp?!0:d==gp?!1:a.bandwidth&&hp(a.bandwidth,b.bandwidth,c.bandwidth)==fp?!0:!1}
585
+ function bp(a,b,c){if(a.id==c.id)return!0;var d=ep(a.width*a.height,b.width*b.height,c.width*c.height);if(d==fp)return!0;if(d==gp)return!1;if(a.frameRate){d=ep(a.frameRate,b.frameRate,c.frameRate);if(d==fp)return!0;if(d==gp)return!1}return a.bandwidth&&hp(a.bandwidth,b.bandwidth,c.bandwidth)==fp?!0:!1}
586
+ function cp(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
587
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function dp(a,b,c){return a.id==c.id?!0:ep(a.width*a.height,b.width*b.height,c.width*c.height)==fp?!0:!1}function Qo(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
588
+ function Lo(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
589
+ function ep(a,b,c){if(b==a&&a!=c)return gp;if(c==a&&a!=b)return fp;if(b>a){if(c<=a||c-a<b-a)return fp;if(c-a>b-a)return gp}else{if(c>a)return gp;if(a-c<a-b)return fp;if(a-c>a-b)return gp}return ip}function hp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?fp:b<a?gp:ip}var fp=1,ip=0,gp=-1;function jp(){var a=this;this.h=this.g=null;this.l=[];this.i=null;this.G=1;this.u={};this.M={};this.j=new Fo;this.F=0;this.I=new Na(5);this.C=new P(function(){kp(a)});this.m=new Pg;this.o=null;this.K=[];this.s=Infinity;this.B=!1}r=jp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.l=[a],c.h=b,u(e,lp(c),2);d=e.h;c.h&&mp(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
590
+ r.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.u={};this.j=null;null!=this.C&&(this.C.stop(),this.C=null);return this.m.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,lp(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
591
+ function lp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Vg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),Qg(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,np(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
592
+ function np(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Ln(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](op(a,d,c));f=a.g.dash.xlinkFailGracefully;g=ao(d,a.g.retryParameters,f,c,a.h.networkingEngine);Qg(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](op(a,h,c))})}
593
+ function op(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R,M,W,ea,Ta,Ja,Ka;return L(function(wa){switch(wa.g){case 1:d=[c];e=tn(b,"Location").map(zn).filter(Lc);0<e.length&&(f=le(d,e),d=a.l=f);g=tn(b,"BaseURL");h=g.map(zn);k=le(d,h);l=0;g&&g.length&&(l=Bn(g[0],"availabilityTimeOffset",In)||0);m=a.g.dash.ignoreMinBufferTime;n=0;m||(n=Bn(b,"minBufferTime",Dn)||0);a.F=Bn(b,"minimumUpdatePeriod",Dn,-1);p=Bn(b,"availabilityStartTime",Cn);q=Bn(b,"timeShiftBufferDepth",Dn);v=a.g.dash.ignoreSuggestedPresentationDelay;
594
+ x=null;v||(x=Bn(b,"suggestedPresentationDelay",Dn));w=a.g.dash.ignoreMaxSegmentDuration;y=null;w||(y=Bn(b,"maxSegmentDuration",Dn));D=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,A=t(Object.values(a.u)),E=A.next();!E.done;E=A.next())G=E.value,G.$a(B.Qa());else H=a.g.defaultPresentationDelay||1.5*n,K=null!=x?x:H,B=new S(p,K,a.g.dash.autoCorrectDrift);B.Zb("static"==D);(I=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);
595
+ B.Ed(q);J=b.getAttribute("profiles")||"";R={Za:"static"!=D,presentationTimeline:B,ca:null,S:null,ka:null,H:null,bandwidth:0,Ud:!1,qb:l,profiles:J.split(",")};M=pp(a,R,k,b);W=M.duration;ea=M.periods;"static"!=D&&M.Od||B.Ha(W||Infinity);a.s&&!a.B&&(Ta=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.ge(a.s):a.s&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
596
+ B.nd(y||1);return u(wa,Go(a.j,ea,R.Za),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);wa.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0};if(!B.le()){wa.A(3);break}Ja=tn(b,"UTCTiming");return u(wa,qp(a,k,Ja),5);case 5:Ka=wa.h;if(!a.h)return wa["return"]();B.he(Ka);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(wa)}})}
597
+ function pp(a,b,c,d){var e=Bn(d,"mediaPresentationDuration",Dn),f=[],g=0;d=tn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Bn(k,"start",Dn,g),n=k.id,p=Bn(k,"duration",Dn),q=null;if(l){var v=Bn(l,"start",Dn);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.o&&null!==n&&null!==m&&m<a.o)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.o||m>a.o)&&(a.o=m);g=rp(a,b,c,{start:m,duration:q,node:k,Wd:null==q||!l});f.push(g);b.ca.id&&q&&(a.M[b.ca.id]=q);if(null==q){g=
598
+ null;break}g=m+q}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Od:!1}:{periods:f,duration:g,Od:!0}}
599
+ function rp(a,b,c,d){b.ca=sp(d.node,null,c);b.S=d;b.ca.qb=b.qb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=tn(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())tp(a,d.start,d.duration,f.value,c);c=tn(d.node,"AdaptationSet").map(function(m){return up(a,b,m)}).filter(Lc);if(b.Za){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.pf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
600
+ }d=c.filter(function(m){return!m.Gd});c=c.filter(function(m){return m.Gd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Gd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={hc:h.hc},l=k.next())h.hc=l.value,h.hc.trickModeVideo=e.streams.find(function(m){return function(n){return Fe(m.hc.codecs)==Fe(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:vp(d,"audio");g=a.g.disableVideo?[]:vp(d,"video");f=a.g.disableText?
601
+ []:vp(d,qe);c=a.g.disableThumbnails?[]:vp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,lc:d,Ic:e,textStreams:g,imageStreams:f}}
602
+ function vp(a,b){return a.filter(function(c){return c.contentType==b})}
603
+ function up(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=sp(c,b.ca,null);var e=!1,f=tn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Lc),h=void 0,k=b.ka.contentType==qe;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
604
+ l}}var n;m=tn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=tn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
605
+ 10)));m=tn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var x=t(q),w=x.next();!w.done;w=x.next()){var y=w.value,D=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],D=y[1]||"und"):(w="CC"+p,2==q.length?p+=2:p++,D=y);v.set(w,xf(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
606
+ 1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),v.set(x,xf(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=tn(c,"ContentProtection");var B=Mn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=xf(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=tn(c,"Label"))&&l.length&&
607
+ (l=l[0],l.textContent&&(E=l.textContent));l=tn(c,"Representation");c=l.map(function(G){if(G=wp(a,b,B,h,A,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=xp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ka.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
608
+ m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Lc);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,dg:e,streams:c,drmInfos:B.drmInfos,Gd:f,pf:k}}
609
+ function wp(a,b,c,d,e,f,g,h,k,l){b.H=sp(l,b.ka,null);a.s=Math.min(a.s,b.H.qb);if(!yp(b.H))return null;var m=b.S.start;b.bandwidth=Bn(l,"bandwidth",Gn)||0;var n=b.H.contentType,p=n==qe||"application"==n;n="image"==n;try{var q=function(G,H,K){return zp(a,G,H,K)};if(b.H.Xb)var v=no(b,q);else if(b.H.Xa)v=to(b,a.u);else if(b.H.Yb)v=yo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.H.va,w=b.S.duration||0;v={sb:function(){return Promise.resolve(Fi(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
610
+ throw G;}q=tn(l,"ContentProtection");q=Pn(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;tn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.H.mimeType="audio/eac3-joc",y=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=tn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
611
+ "http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(B=l.getAttribute("value")),!B))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var G;return L(function(H){if(1==H.g){if(E.segmentIndex)return H.A(0);G=E;return u(H,v.sb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,
612
+ mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.pd,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:A,tilesLayout:B};return E}
613
+ function kp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,lp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();mp(a,b);z(d)}})}function mp(a,b){0>a.F||a.C.R(Math.max(3,a.F-b,Oa(a.I)))}
614
+ function sp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,pd:null,audioSamplingRate:null,qb:0};c=c||b.va;var d=tn(a,"BaseURL"),e=d.map(zn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Bn(a,"frameRate",Jn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=tn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
615
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=tn(a,"AudioChannelConfiguration");m=Ap(m)||b.pd;p=Bn(a,"audioSamplingRate",Hn)||b.audioSamplingRate;f||(f=xp(g,h));var q=sn(a,"SegmentBase"),v=sn(a,"SegmentTemplate"),x=q?Bn(q,"availabilityTimeOffset",In)||0:0,w=v?Bn(v,"availabilityTimeOffset",In)||0:0;d=d&&d.length?Bn(d[0],"availabilityTimeOffset",In)||0:0;d=b.qb+d+x+w;return{va:le(c,e),Xb:q||b.Xb,Xa:sn(a,"SegmentList")||b.Xa,Yb:v||b.Yb,width:Bn(a,"width",Hn)||b.width,height:Bn(a,
616
+ "height",Hn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),pd:m,audioSamplingRate:p,qb:d}}
617
+ function Ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){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":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
618
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function yp(a){var b=a.Xb?1:0;b+=a.Xa?1:0;b+=a.Yb?1:0;if(0==b)return a.contentType==qe||"application"==a.contentType?!0:!1;1!=b&&(a.Xb&&(a.Xa=null),a.Yb=null);return!0}
619
+ function Bp(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=le(b,[c]),f=Vg(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Qg(a.m,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=mb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
620
+ function qp(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);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 n.A(8);
621
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,Bp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Bp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
622
+ case 9:ua(n,3);break;case 5:F(n);case 3:g=f.next();n.A(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
623
+ function tp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Bn(d,"timescale",Hn)||1;d=t(tn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Bn(k,"presentationTime",Hn)||0,m=Bn(k,"duration",Hn)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
624
+ function zp(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=ah,f=Ri(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Qg(a.m,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function xp(a,b){return Ie(Be(a,b))?qe:a.split("/")[0]}N("shaka.dash.DashParser",jp);di.mpd=function(){return new jp};bi["application/dash+xml"]=function(){return new jp};bi["video/vnd.mpeg.dash.mpd"]=function(){return new jp};function Cp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Dp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Dp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
625
+ Dp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Ep(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function Fp(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Gp(a,b){this.name=a;this.value=b};function Hp(a,b){return a.filter(function(c){return c.name==b})}function Ip(a,b){return a.filter(function(c){return Ep(c,"TYPE")==b})}function Jp(a,b){var c=Hp(a,b);return c.length?c[0]:null}function Kp(a,b,c){c=void 0===c?0:c;return(a=Jp(a,b))?Number(a.value):c};function Lp(a){this.h=a;this.g=0}function Mp(a){Np(a,/[ \t]+/gm)}function Np(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Op(a){return a.g==a.h.length?null:(a=Np(a,/[^ \t\n]*/gm))?a[0]:null};function Pp(){this.g=0}
626
+ function Qp(a,b,c){b=mb(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 O(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Rp(a,g),--a.g,Sp.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Rp(a,h);if(Tp.includes(h.name)){if(1!=b)throw new O(2,4,4017);
627
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Rp(a,m),Sp.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=le([d],[m.trim()])[0],h&&g.push(h),e.push(new Fp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Fp("",g,k)));return new Cp(c,b,f,e)}f.push(h);
628
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Gp("URI",k)),e=!0)}}return new Cp(c,b,f)}function Rp(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Lp(f);var h;(h=Np(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Np(f,k);)d.push(new Gp(h[1],h[2]||h[3])),Mp(f)}return new Dp(c,e,d,g)}
629
+ var Sp="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Tp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Up(){}function Vp(a){try{var b=Wp(a);return Hg({uri:a,Zd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Fg(c)}}function Wp(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Yb(a):e=qb(a);return{data:e,contentType:c}}
630
+ N("shaka.net.DataUriPlugin",Up);Up.parse=Vp;Sg("data",Vp);function Xp(){var a=this;this.g=this.j=null;this.Ka=1;this.B=new Map;this.s=new Map;this.Ca=new Set;this.i=new Map;this.h=null;this.M="";this.da=new Pp;this.ja=0;this.u=new P(function(){Yp(a)});this.m=Zp;this.C=null;this.ia=0;this.G=Infinity;this.Y=this.Ma=0;this.F=new Pg;this.V=[];this.K=new Map;this.La=!1;this.o=new Map;this.T=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Xp.prototype;r.configure=function(a){this.g=a};
631
+ r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,$p(c,Vg([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,aq(c,d.data),3);e=c.ja;0<e&&c.u.R(e);return f["return"](c.C)})};r.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.j=null;this.Ca.clear();this.C=null;this.i.clear();this.s.clear();this.o.clear();this.B.clear();return Promise.all(a)};
632
+ r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Zp)return e["return"]();b=[];a.T=null;c=Array.from(a.i.values());return c.length?u(e,bq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(bq(a,c[d]));return u(e,Promise.all(b),0)})};
633
+ function bq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(x){if(1==x.g)return c=cq,d=b.qe,e=new Yd(d),a.l&&b.ue&&ae(e,new de("_HLS_skip=YES")),u(x,$p(a,Vg([e.toString()],a.g.retryParameters),0),2);if(3!=x.g){f=x.h;g=Qp(a.da,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=Hp(g.g,"EXT-X-DEFINE");k=dq(a,h);l=b.stream;return u(x,eq(a,b.Hc,g,l.mimeType,b.ld,k,b.Be),3)}m=x.h;l.segmentIndex.wb(m,a.h.Qa());m.length&&(n=Kp(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ld.get(n),l.segmentIndex.$a(p));q=m[m.length-
634
+ 1];if(v=Jp(g.g,"EXT-X-ENDLIST"))fq(a,c.pe),a.h.Ha(q.endTime);z(x)})}r.onExpirationUpdated=function(){};
635
+ function aq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R,M,W,ea,Ta,Ja,Ka,wa,cc;return L(function(fb){switch(fb.g){case 1:c=Qp(a.da,b,a.M);if(0!=c.type)throw new O(2,4,4022);d=Hp(c.g,"EXT-X-DEFINE");gq(a,d);e=Hp(c.g,"EXT-X-MEDIA");f=Hp(c.g,"EXT-X-STREAM-INF");hq(a,f);g=Hp(c.g,"EXT-X-SESSION-DATA");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Z(l,"DATA-ID"),n=Z(l,"URI"),p=Z(l,"LANGUAGE"),q=Z(l,"VALUE"),v=(new Map).set("id",m),n&&v.set("uri",le([a.M],[n])[0]),p&&v.set("language",
636
+ p),q&&v.set("value",q),x=new Q("sessiondata",v),a.j)a.j.onEvent(x);return u(fb,iq(a,e),2);case 2:return jq(a,e),u(fb,kq(a,f),3);case 3:return w=fb.h,u(fb,lq(a,e),4);case 4:y=fb.h;if(!a.j)throw new O(2,7,7001);if(a.La&&0==w.length)throw new O(2,4,4034);B=D=Infinity;A=t(a.i.values());for(E=A.next();!E.done;E=A.next())G=E.value,D=Math.min(D,G.Xd),"text"!=G.stream.type&&(B=Math.min(B,G.bf-G.Xd));a.m!=Zp?(a.h=new S(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ia),a.h.Zb(!1)):
637
+ (a.h=new S(null,0),a.h.Zb(!0));mq(a);if(a.m!=Zp)a.ja=a.G,H=cq,a.m==H.oe&&(K=a.h.Ec,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.h.Ed(K));else for(a.h.Ha(B),a.h.offset(-D),I=t(a.i.values()),E=I.next();!E.done;E=I.next())J=E.value,J.stream.segmentIndex.offset(-D),J.stream.segmentIndex.Va(0,B);a.V=[];R=[];M=t(w);for(W=M.next();!W.done;W=M.next())for(ea=W.value,Ta=t([ea.video,ea.audio]),Ja=Ta.next();!Ja.done;Ja=Ta.next())(Ka=Ja.value)&&R.push(Ka);return u(fb,Promise.all(R.map(function(be){return L(function(Dc){return u(Dc,
638
+ be.createSegmentIndex(),0)})})),5);case 5:wa=t(R);for(Ja=wa.next();!Ja.done;Ja=wa.next())cc=Ja.value,a.V.push(cc.segmentIndex.J);mq(a);a.C={presentationTimeline:a.h,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.C);z(fb)}})}function gq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.B.has(d)||a.B.set(d,e))}}
639
+ function dq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.B.get(f))&&c.set(f,e)}return c}function hq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=nq(a,e);if(g){var h=oe(qe,e);a.o.set(g,h);hc(e,h)}f&&(g=ne("audio",e),a.o.set(f,g));d&&(f=ne("video",e),a.o.set(d,f))}}
640
+ function lq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=Ip(b,"SUBTITLES"),d=c.map(function(x){var w,y,D;return L(function(B){if(1==B.g){if(w=a.g.disableText)return B["return"](null);C(B,2);return u(B,oq(a,x),4)}if(2!=B.g)return y=B.h,B["return"](y.stream);D=F(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Ep(h,"GROUP-ID"),l=a.o.get(k))if(m=a.s.get(k))for(n=
641
+ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}function iq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,oq(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return oq(a,e)});return u(d,Promise.all(c),0)})}
642
+ function kq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(x){if(1==x.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Ep(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(x,pq(a,g),2);if(v=x.h){for(var w=x["return"],y=v.audio,D=v.video,B=t(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
643
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!y.length||B)y=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,I=A?A.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Hc:"")+" - "+(A?A.Hc:"");G&&K&&I.length&&J.length&&!(0<Yh(I,J).length)||a.Ca.has(H)||(G={id:a.Ka++,language:G?G.language:"und",primary:!!G&&G.primary||
644
+ !!K&&K.primary,audio:G,video:K,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.Ca.add(H))}}x=w.call(x,B)}else x=x["return"]([]);return x})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Jc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
645
+ function pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,x;return L(function(w){if(1==w.g)return c=re,d=nq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.s.has(g)?a.s.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Ep(b,"URI"),p=k.audio.find(function(y){return y&&y.Hc==n}),q=oe(c.Na,d),(v=oe(c.Ya,d))&&!q?l=c.Ya:!h.length&&v&&q?(l=c.Na,d=[[q,v].join()]):k.audio.length&&p?(l=c.Ya,m=!0):l=k.video.length?c.Ya:c.Na,m?w.A(2):u(w,qq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
646
+ rq(k);return w["return"](k)})}function nq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Fe(f);c.has(g)||(e.push(f),c.add(g))}return e}function sq(a){a=Z(a,"LANGUAGE")||"und";return xf(a)}
647
+ function rq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function jq(a,b){var c=Ip(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=sq(e);var f=Ep(e,"GROUP-ID");e=Ep(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
648
+ function oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,x;return L(function(w){if(1==w.g){c=Ep(b,"GROUP-ID");d="";var y=Ep(b,"TYPE").toLowerCase();"subtitles"==y&&(y=qe);e=y;e!=qe&&c&&a.o.has(c)&&(d=a.o.get(c));f=tq(Ep(b,"URI"),a.B);if(a.i.has(f))return w["return"](a.i.get(f));g=sq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
649
+ v="YES"==q;return u(w,uq(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=w.h;a.s.has(c)?a.s.get(c).push(x):a.s.set(c,[x]);if(null==x)return w["return"](null);if(a.i.has(f))return w["return"](a.i.get(f));a.i.set(f,x);return w["return"](x)})}
650
+ function qq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=tq(Ep(b,"URI"),a.B);if(a.i.has(e))return k["return"](a.i.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=ne(d,c);return u(k,uq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.i.has(e))return k["return"](a.i.get(e));a.i.set(e,h);return k["return"](h)})}
651
+ function uq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R,M,W,ea,Ta,Ja,Ka,wa,cc,fb,be,Dc,Kh,Xm,Ym,Zm,$m,Lh,Mh,sf,an,bn,cn,dn;return L(function(Ya){switch(Ya.g){case 1:return p=le([a.M],[b])[0],u(Ya,$p(a,Vg([p],a.g.retryParameters),0),2);case 2:q=Ya.h;p=q.uri;v=Qp(a.da,q.data,p);if(1!=v.type)throw new O(2,4,4017);x=[];if(v.segments)for(w=t(v.segments),y=w.next();!y.done;y=w.next())D=y.value,B=Hp(D.g,"EXT-X-KEY"),x.push.apply(x,ia(B));A=!1;E=[];G=new Set;H=t(x);for(K=H.next();!K.done;K=
652
+ H.next())if(I=K.value,J=Ep(I,"METHOD"),"NONE"!=J){A=!0;if("AES-128"==J)return a.La=!0,Ya["return"](null);R=Ep(I,"KEYFORMAT");if(W=(M=vq[R])?M(I):null){if(W.keyIds)for(ea=t(W.keyIds),Ta=ea.next();!Ta.done;Ta=ea.next())Ja=Ta.value,G.add(Ja);E.push(W)}}if(A&&!E.length)throw new O(2,4,4026);Ka=Hp(v.g,"EXT-X-DEFINE");wa=dq(a,Ka);wq(a,v);return u(Ya,xq(a,d,c,v,wa),3);case 3:return cc=Ya.h,yq.includes(cc)&&(c=""),fb=new Map,be=new Map,C(Ya,4),u(Ya,eq(a,b,v,cc,fb,wa,be),6);case 6:Dc=Ya.h;ua(Ya,5);break;case 4:Kh=
653
+ F(Ya);if(4035==Kh.code)return Sa("Skipping unsupported HLS stream",cc,b),Ya["return"](null);throw Kh;case 5:Xm=Dc[0].startTime;Ym=Dc[Dc.length-1].endTime;Zm=new T(Dc);$m=d==qe?"subtitle":void 0;Lh=[];if(l)for(Mh=t(l.split(",")),sf=Mh.next();!sf.done;sf=Mh.next())an=sf.value,Lh.push(an);cn=(bn=Jp(v.g,"EXT-X-SERVER-CONTROL"))?null!=bn.getAttribute("CAN-SKIP-UNTIL"):!1;dn={id:a.Ka++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Zm,mimeType:cc,codecs:c,kind:$m,encrypted:A,
654
+ drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Lh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return Ya["return"]({stream:dn,Hc:b,qe:p,Xd:Xm,bf:Ym,ld:fb,Be:be,ue:cn})}})}
655
+ function wq(a,b){var c=Jp(b.g,"EXT-X-PLAYLIST-TYPE"),d=Jp(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)fq(a,Zp);else{c?fq(a,zq):fq(a,Aq);d=Jp(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Jp(b.g,"EXT-X-PART-INF");a.l&&c?(a.Ma=Number(Ep(c,"PART-TARGET")),a.G=Math.min(a.Ma,a.G),c=Jp(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Ep(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.ia=Math.max(d,a.ia)}}
656
+ function Bq(a,b,c,d){c=Jp(c,"EXT-X-MAP");if(!c)return null;var e=Ep(c,"URI");d=tq(le([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Cq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Cq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new fi(function(){return[a]},c,d)}
657
+ function Dq(a,b,c,d,e,f,g,h){var k=d.g,l=tq(d.h,g),m=Jp(k,"EXTINF"),n=g=0,p=null,q=[];if(a.l&&d.i.length){a={};for(var v=0;v<d.i.length;a={Pc:a.Pc},v++){var x=d.i[v],w=0==v?c:q[q.length-1],y=0==v?e:w.endTime,D=Number(Z(x,"DURATION"));D=y+D;var B=0,A=null;"EXT-X-PRELOAD-HINT"==x.name?B=(w=Z(x,"BYTERANGE-START"))?Number(w):0:(B=Z(x,"BYTERANGE"),w=t(Eq(w,B)),B=w.next().value,A=w.next().value);if(x=Z(x,"URI"))a.Pc=le([h],[x])[0],q.push(new hi(y,D,function(E){return function(){return[E.Pc]}}(a),B,A,b,
658
+ f,0,Infinity))}}else if(!m)throw new O(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=q[q.length-1].endTime;(d=Jp(k,"EXT-X-BYTERANGE"))?(c=t(Eq(c,d.value)),n=c.next().value,p=c.next().value):q.length&&(n=q[0].ha,p=q[q.length-1].ba);return new hi(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,q)}function Eq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ba+1,d=c+d-1);return[c,d]}
659
+ function mq(a){if(a.h){for(var b=t(a.V),c=b.next();!c.done;c=b.next())a.h.yb(c.value);a.V=[]}}
660
+ function eq(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R;return L(function(M){switch(M.g){case 1:h=c.segments;l=Kp(c.g,"EXT-X-MEDIA-SEQUENCE",0);n=(m=Jp(c.g,"EXT-X-SKIP"))?Number(Z(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.m!=Zp&&e.has(p)){q=e.get(p);M.A(2);break}if(null!=a.T){M.A(3);break}k=Bq(a,c.h,h[0].g,f);v=a;return u(M,Fq(a,b,k,d,p,!1,h[0],f),4);case 4:v.T=M.h;case 3:q=a.T;case 2:x=h[0].h;x.split("/").pop();w=Kp(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(g.has(w)||g.set(w,p),n))for(y=
661
+ g;y.has(w+1)&&y.get(w+1)<p;)w++;D=a.I.get(w)||0;B=[];A=0;case 5:if(!(A<h.length)){M.A(7);break}E=h[A];G=B[B.length-1];H=0==A?q:G.endTime;p=l+n+A;e.set(p,H);k=Bq(a,c.h,E.g,f);K=Jp(E.g,"EXT-X-DISCONTINUITY");if(!K){M.A(8);break}w++;g.set(w,p);return u(M,Gq(a,w,b,k,d,p,E,f,H),9);case 9:D=M.h;case 8:!a.l&&(I=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());J=Jp(E.g,"EXTINF");a.l||J?(R=Dq(a,k,G,E,H,D,f,c.h),B.push(R)):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
662
+ A++;M.A(5);break;case 7:return M["return"](B)}})}function Gq(a,b,c,d,e,f,g,h,k){var l,m;return L(function(n){if(1==n.g)return l=0,a.I.has(b)?(l=a.I.get(b),n.A(2)):u(n,Fq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.I.set(b,l));return n["return"](l)})}
663
+ function Hq(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:c=ah;d=Ri(b.ma(),b.ha,b.ba,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"]($p(a,d,c));e=Ri(b.ma(),b.ha,b.ha+2048-1,a.g.retryParameters);C(k,2);return u(k,$p(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
664
+ e.uris[0]);return u(k,$p(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
665
+ function Fq(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,x;return L(function(w){switch(w.g){case 1:k=Dq(a,c,null,g,0,0,h,"");if(a.C&&!f&&(l=a.i.get(b),m=l.ld.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(yq.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.A(2);break}n=[Hq(a,k)];c&&n.push(Hq(a,c));return u(w,Promise.all(n),3);case 3:return p=
666
+ w.h,q=p[0],v=p[1]||p[0],w["return"](Iq(b,q.uri,q.data,v.data));case 2:if("video/mp2t"!=d){w.A(4);break}return u(w,Hq(a,k),5);case 5:return x=w.h,w["return"](Jq(b,x.uri,x.data));case 4:throw new O(2,4,4030,b);}})}
667
+ function Iq(a,b,c,d){var e=0;(new vb).box("moov",zb).box("trak",zb).box("mdia",zb).P("mdhd",function(h){e=Nd(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new vb).box("moof",zb).box("traf",zb).P("tfdt",function(h){f=Md(h.reader,h.version).Wc/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
668
+ function Jq(a,b,c){function d(){f.seek(g+188);h=f.X();71!=h&&(f.seek(g+192),h=f.X());71!=h&&(f.seek(g+204),h=f.X());71!=h&&e();f.be(1)}function e(){throw new O(2,4,4030,a,b);}var f=new sb(c,0),g=0,h=0;for(c=Math.min(f.N.byteLength-188,940);;){g=f.W();h=f.X();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Bb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.X()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.X(),f.skip(k)),1!=f.L()>>8)d();else{f.skip(3);c=f.X()>>6;0!=c&&1!=c||e();0==f.X()&&e();c=f.X();k=f.Bb();var l=
669
+ f.Bb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function tq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
670
+ function xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,x;return L(function(w){if(1==w.g){f=re;g=ah;h=tq(d.segments[0].h,e);k=new Yd(h);l=k.ta.split(".").pop();m=Kq[b];if(n=m[l])return w["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=Vg([h],a.g.retryParameters);p.method="HEAD";return u(w,$p(a,p,g),2)}q=w.h;v=q.headers["content-type"];return v?w["return"](v.split(";")[0]):(x=m.mp4,w["return"](x))})}
671
+ function Yp(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ja,a.u.R(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.u.R(.1);z(d)})}function fq(a,b){a.m=b;a.h&&a.h.Zb(a.m==Zp);a.m!=Zp||a.u.stop()}function $p(a,b,c){if(!a.F)throw new O(2,7,7001);b=a.j.networkingEngine.request(c,b);Qg(a.F,b);return b.promise}N("shaka.hls.HlsParser",Xp);
672
+ var yq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Kq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
673
+ vtt:"text/vtt",ttml:"application/ttml+xml"}},vq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Ep(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Ep(a,"URI");b=Wp(b);b=gb(b.data);b=me("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Ep(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Ep(a,"URI");a=Wp(a);
674
+ a=gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=qn(a,b);return me("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Zp="VOD",Aq="EVENT",zq="LIVE",cq={pe:Zp,Jf:Aq,oe:zq};di.m3u8=function(){return new Xp};bi["application/x-mpegurl"]=function(){return new Xp};bi["application/vnd.apple.mpegurl"]=function(){return new Xp};function Lq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Zd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=pb(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Mq(){}function Nq(a,b,c,d){var e=new Oq;gh(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Pq,g={Jd:!1,ke:!1};a=Qq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Eg(a,function(){g.Jd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.ke=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
675
+ function Qq(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,x,w,y,D,B;return L(function(A){switch(A.g){case 1:return g=Rq,h=Sq,n=m=0,p=Date.now(),C(A,2),u(A,g(a,c),4);case 4:return k=A.h,q=k.clone().body.getReader(),x=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,w=function(E){function G(){var H,K;return L(function(I){switch(I.g){case 1:return C(I,2),u(I,q.read(),4);case 4:H=I.h;ua(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}m+=H.value.byteLength;if(!f){I.A(5);break}return u(I,
676
+ f(H.value),5);case 5:K=Date.now();if(100<K-p||H.done)e(K-p,m-n,x-m),n=m,p=K;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:w}),u(A,k.arrayBuffer(),5);case 5:l=A.h;ua(A,3);break;case 2:y=F(A);if(d.Jd)throw new O(1,1,7001,a,b);if(d.ke)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,y,b);case 3:return D={},B=k.headers,B.forEach(function(E,G){D[G.trim()]=E}),A["return"](Lq(D,l,k.status,a,k.url,b))}})}
677
+ function Tq(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Mq);Mq.isSupported=Tq;Mq.parse=Nq;var Rq=window.fetch,Pq=window.AbortController,Sq=window.ReadableStream,Oq=window.Headers;Tq()&&(Sg("http",Nq,2,!0),Sg("https",Nq,2,!0));function Uq(){}
678
+ function Vq(a,b,c,d){var e=new Wq,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),q={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),q[v[0].toLowerCase()]=v.slice(1).join(": ");try{var x=Lq(q,n.response,n.status,a,n.responseURL,
679
+ c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Eg(h,function(){e.abort();return Promise.resolve()})}N("shaka.net.HttpXHRPlugin",Uq);Uq.parse=Vq;var Wq=window.XMLHttpRequest;
680
+ Sg("http",Vq,1,!0);Sg("https",Vq,1,!0);function Xq(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Yq(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Xq.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Zq(a){var b=this;this.o=a;this.g=new Map;this.i=new Qe(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.j=[];this.m=function(){};this.l=function(){};this.h=new Xq}Zq.prototype.destroy=function(){return this.i.destroy()};function $q(a,b,c){a.m=b;a.l=c}function ar(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
681
+ function br(a,b,c,d,e,f){Re(a.i);var g=Yq(a.h,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return u(v,cr(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=gb(h),l=new pn(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.h.close(g,h.byteLength);var x=a.h;a.m(0==x.i?0:x.j/x.i,a.h.h);return v["return"](f(h))})});a.g.set(b,d);return d}
682
+ function dr(a,b,c){Re(a.i);var d=(a.g.get(b)||Promise.resolve()).then(function(){return L(function(e){return u(e,c(),0)})});a.g.set(b,d)}function er(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.h.h)})}function cr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=ah,d=a.o.request(c,b),e=function(){return d.abort()},a.j.push(e),u(g,d.promise,2);f=g.h;hc(a.j,e);return g["return"](f.data)})};function fr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new se;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}fr.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);F(b);z(b)})};
683
+ function gr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}fr.prototype.store=function(){return this.h};fr.prototype.promise=function(){return this.g};function hr(a){this.h=a;this.g=[]}hr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ir(a,b){return jr(a,b,"readwrite")}function jr(a,b,c){c=a.h.transaction([b],c);var d=new fr(c,b);a.g.push(d);d.promise().then(function(){hc(a.g,d)},function(){hc(a.g,d)});return d};function kr(a,b,c){this.g=new hr(a);this.i=b;this.h=c}r=kr.prototype;r.destroy=function(){return this.g.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return lr(this.i)};r.removeSegments=function(a,b){return mr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,nr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Kd(e)}))})};r.addManifests=function(){return lr(this.h)};
684
+ r.updateManifestExpiration=function(a,b){var c=ir(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return mr(this,this.h,a,b)};r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,nr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Nb(e)})))})};
685
+ r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=jr(a.g,a.h,"readonly"),c=new Map,u(d,gr(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Nb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.Kd=function(a){return a};r.Nb=function(a){return Promise.resolve(a)};function lr(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
686
+ r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=ir(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={fc:g.fc},k=h.next())l=k.value,g.fc=e.add(l),g.fc.onsuccess=function(n){return function(){f.push(n.fc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
687
+ function mr(a,b,c,d){a=ir(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={ec:e.ec},f=c.next())e.ec=f.value,b["delete"](e.ec).onsuccess=function(g){return function(){return d(g.ec)}}(e);return a.promise()}
688
+ function nr(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=jr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Hb:h.Hb,Fb:h.Fb},l=k.next())h.Fb=l.value,h.Hb=e.get(h.Fb),h.Hb.onsuccess=function(n){return function(){void 0==n.Hb.result&&g.push(n.Fb);f[n.Fb]=n.Hb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function or(a){this.g=new hr(a)}or.prototype.destroy=function(){return this.g.destroy()};or.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=jr(a.g,"session-ids","readonly"),c=[],u(d,gr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};or.prototype.add=function(a){var b=ir(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
689
+ or.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=ir(b.g,"session-ids"),u(d,gr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function pr(){this.g=new Map}pr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};pr.prototype.init=function(){var a=this;qr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
690
+ function rr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Fa:d,la:f},la:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function sr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Fa:d,la:f},e)})})}
691
+ function tr(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function ur(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vr(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
692
+ function wr(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=qr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function xr(a,b){qr.set(a,b)}N("shaka.offline.StorageMuxer",pr);pr.unregister=function(a){qr["delete"](a)};pr.register=xr;pr.prototype.destroy=pr.prototype.destroy;var qr=new Map;function yr(){kr.apply(this,arguments)}pa(yr,kr);yr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=ir(c.g,c.h);e=d.store();f=new se;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
693
+ yr.prototype.Nb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=zr(a.periods[c],e),b.push(f);return u(h,Po(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
694
+ function zr(a,b){Ar(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Br(e,a.startTime,b)})}
695
+ function Br(a,b,c){var d=a.initSegmentUri?Cr(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Cr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
696
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}yr.prototype.Kd=function(a){return{data:a.data}};function Cr(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
697
+ function Ar(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
698
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Dr(){kr.apply(this,arguments)}pa(Dr,kr);
699
+ Dr.prototype.Nb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Er(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Po(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
704
700
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
705
- function Hr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
706
- dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Ir(){nr.apply(this,arguments)}ra(Ir,nr);Ir.prototype.hasFixedKeySpace=function(){return!1};Ir.prototype.addSegments=function(a){return this.add(this.i,a)};Ir.prototype.addManifests=function(a){return this.add(this.h,a)};Ir.prototype.Rb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Jr(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Jr.prototype;
707
- q.init=function(){var a=this,b=new De,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Br(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Gr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Gr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
708
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ir(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new rr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
709
- q.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:if(!a.m){b.v(10);break}return v(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
710
- q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
711
- q.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),v(b,Kr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,v(b,a.init(),0)}})};
712
- function Kr(){var a=new De,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Ar("idb",function(){return dc()||!window.indexedDB?null:new Jr});function Lr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Lr.prototype.Ka=function(){return this.i};Lr.prototype.ma=function(){return this.h};Lr.prototype.key=function(){return this.l};Lr.prototype.toString=function(){return this.j};
713
- function Mr(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Lr(b,c,d,Number(a[4])):null};function Nr(a,b){this.h=a;this.g=b}
714
- function Or(a,b){var c=new T(null,0);c.La(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Pr(a,d,e,c);e=b.streams.filter(function(l){return l.type==Be}).map(function(l){return Qr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Qr(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
701
+ function Er(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
702
+ dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Fr(){kr.apply(this,arguments)}pa(Fr,kr);Fr.prototype.hasFixedKeySpace=function(){return!1};Fr.prototype.addSegments=function(a){return this.add(this.i,a)};Fr.prototype.addManifests=function(a){return this.add(this.h,a)};Fr.prototype.Nb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Gr(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Gr.prototype;
703
+ r.init=function(){var a=this,b=new se,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new yr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Dr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Dr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
704
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Fr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new or(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
705
+ r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
706
+ r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
707
+ r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Hr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
708
+ function Hr(){var a=new se,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}xr("idb",function(){return Lb()||!window.indexedDB?null:new Gr});function Ir(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ir.prototype.Fa=function(){return this.i};Ir.prototype.la=function(){return this.h};Ir.prototype.key=function(){return this.l};Ir.prototype.toString=function(){return this.j};
709
+ function Jr(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ir(b,c,d,Number(a[4])):null};function Kr(a,b){this.h=a;this.g=b}
710
+ function Lr(a,b){var c=new S(null,0);c.Ha(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Mr(a,d,e,c);e=b.streams.filter(function(l){return l.type==qe}).map(function(l){return Nr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Nr(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
715
711
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
716
- function Pr(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
717
- e.value,g=Qr(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Qr(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
718
- function Qr(a,b,c){var d=b.segments.map(function(e){return Rr(a,e)});c.Db(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
719
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Rr(a,b){var c=new Lr("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Sr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
720
- function Sr(a,b){var c=new Lr("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function Tr(){this.g=null}q=Tr.prototype;q.configure=function(){};
721
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Mr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new sr;va(m);return v(m,e.init(),4);case 4:return v(m,wr(e,d.Ka(),d.ma()),5);case 5:return f=m.h,v(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Nr(d.Ka(),d.ma()),l=Or(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),v(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
722
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new sr,B(m,2,3),v(m,e.init(),5);case 5:return v(m,wr(e,d.Ka(),d.ma()),6);case 6:return f=m.h,v(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.v(3);break}return v(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),v(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.v(3)}})};
723
- ii["application/x-offline-manifest"]=function(){return new Tr};function Ur(){}function Vr(a){var b=Mr(a);b&&"manifest"==b.g?(a={uri:a,je:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Qg(a)):a=b&&"segment"==b.g?Wr(b.key(),b):Og(new N(2,1,9004,a));return a}
724
- function Wr(a,b){var c=new sr;return Qg(void 0).ca(function(){return c.init()}).ca(function(){return wr(c,b.Ka(),b.ma())}).ca(function(d){return d.getSegments([b.key()])}).ca(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Ur);Ur.plugin=Vr;ah("offline",Vr);function Xr(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),x=u.next();!x.done;x=u.next())if(x=x.value,Yr(x.info,p)){x.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.v(4);break}g=f.value;h=Zr(a,b,g);return v(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.v(2);break;case 4:return l["return"](d)}})}
725
- function Zr(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new qh({Cb:b,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),v(f,yh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return F(f),v(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),v(f,Lh(d),8);case 8:wa(f,7);break;case 6:return F(f),v(f,d.destroy(),
726
- 9);case 9:return f["return"]([]);case 7:return e=[],v(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return B(h,2),v(h,Mh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);F(h);z(h)})})),10);case 10:return v(f,d.destroy(),11);case 11:return f["return"](e)}})}
727
- function Yr(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&vc(a.audioCapabilities,b.audioCapabilities,c)&&vc(a.videoCapabilities,b.videoCapabilities,c)};function $r(a,b,c){var d=b.presentationTimeline.getDuration();b=as(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function bs(a,b){var c=Or(new Nr(a.Ka(),a.ma()),b),d=b.appMetadata||{};c=as(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
728
- function as(a){var b=[],c=qg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ig(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(jg(c.value));return b};function cs(){this.g={}}function ds(a,b,c){c=c.endTime-c.startTime;return es(a,b)*c}function es(a,b){var c=a.g[b];null==c&&(c=0);return c};function fs(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.P=this.o=null;a?(this.o=a.o,this.P=a.Ub()):(this.o=Zj(),this.P=new $g);this.Nc=[];this.ac=[];this.Cd=[];var c=!a;this.J=new af(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return v(k,Promise.all(b.Cd.map(function(l){return dr(l)})),2);case 2:d=function(){};e=[];f=t(b.ac);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return v(k,Promise.all(e),3);case 3:if(!c){k.v(4);break}return v(k,b.P.destroy(),
729
- 4);case 4:b.o=null,b.P=null,z(k)}})})}function gs(){if(Yb())a:{var a=t(tr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=fs.prototype;q.destroy=function(){return this.J.destroy()};
730
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Gb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return bk(this.o,a)};q.getConfiguration=function(){var a=Zj();bk(a,this.o,Zj());return a};q.Ub=function(){return this.P};
731
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new br(this.P);this.Cd.push(f);b=hs(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return v(k,hi(a,d.P,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Nb(h))})},e,f);var g=new Ng(b,function(){return dr(f)});g["finally"](function(){uc(d.Cd,f)});g.then=function(h){Gb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
732
- return g.promise.then(h)};return is(this,g)};q.ef=function(){Gb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
733
- function hs(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,w;return L(function(y){switch(y.g){case 1:return js(),h=g=null,k=new sr,m=l=null,B(y,2,3),v(y,d(),5);case 5:return g=y.h,v(y,ks(a,b,g,e),6);case 6:n=y.h;ls(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.mb();if(!p)throw new N(2,9,9005,b);return v(y,ms(a,n,function(C){m=m||C},e),7);case 7:h=y.h;ls(a);if(m)throw m;return v(y,a.yc(n,h,e),8);case 8:return v(y,k.init(),9);case 9:return ls(a),v(y,ur(k),10);case 10:return l=y.h,ls(a),v(y,ns(a,l.ma,
734
- h,n,b,c,e,f),11);case 11:r=y.h;ls(a);if(m)throw m;return v(y,l.ma.addManifests([r]),12);case 12:return u=y.h,ls(a),x=new Lr("manifest",l.path.Ka,l.path.ma,u[0]),y["return"](bs(x,r));case 3:return xa(y),a.Nc=[],v(y,k.destroy(),13);case 13:if(!g){y.v(14);break}return v(y,g.stop(),14);case 14:if(!h){y.v(16);break}return v(y,h.destroy(),16);case 16:ya(y,0);break;case 2:w=F(y);if(!l){y.v(18);break}return v(y,l.ma.removeSegments(a.Nc,function(){}),18);case 18:throw m||w;}})}
735
- q.yc=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,J,I,K,O,Q;return L(function(S){switch(S.g){case 1:d={width:Infinity,height:Infinity};Vf(a,c.restrictions,d);c.useMediaCapabilities?$f(a,c.offline.usePersistentLicense):(Zf(a),Yf(a,b));e=[];f=c.preferredAudioChannelCount;Pf(a,f);g=t(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(ig(k));l=t(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(jg(n));p=t(a.imageStreams);for(r=p.next();!r.done;r=p.next())u=
736
- r.value,e.push(kg(u));return v(S,c.offline.trackSelectionCallback(e),2);case 2:x=S.h;w=a.presentationTimeline.getDuration();y=0;C=t(x);for(D=C.next();!D.done;D=C.next())A=D.value,E=A.bandwidth*w/8,y+=E;B(S,3);return v(S,c.offline.downloadSizeCallback(y),5);case 5:G=S.h;if(!G)throw new N(2,9,9014);wa(S,4);break;case 3:H=F(S);if(H instanceof N)throw H;throw new N(2,9,9015);case 4:J=new Set;I=new Set;K=new Set;O=t(x);for(D=O.next();!D.done;D=O.next())Q=D.value,"variant"==Q.type&&J.add(Q.id),"text"==
737
- Q.type&&I.add(Q.id),"image"==Q.type&&K.add(Q.id);a.variants=a.variants.filter(function(ba){return J.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return I.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return K.has(ba.id)});os(a);z(S)}})};
738
- function ns(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,x,w,y,C,D;return L(function(A){switch(A.g){case 1:return k=$r(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){u&&g.offline.usePersistentLicense&&x==G&&Kh(c,"cenc",E)},cr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),r=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
739
- G.initData.length})}),u=p&&!r,x=null,u&&(w=c.i,x=ps.get(w.keySystem)),va(A),C=y=qs(a,h,b,c,d,e,f,g),v(A,hr(h),4);case 4:C.size=A.h;y.expiration=c.Tb();D=Sh(c);y.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new N(2,9,9007);return A["return"](y);case 2:return xa(A),v(A,h.destroy(),5);case 5:ya(A,0)}})}q.remove=function(a){return rs(this,ss(this,a))};
740
- function ss(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:js();c=Mr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new sr;va(k);return v(k,e.init(),4);case 4:return v(k,wr(e,d.Ka(),d.ma()),5);case 5:return f=k.h,v(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],v(k,Promise.all([ts(a,h,e),us(f,d,h)]),2);case 2:return xa(k),v(k,e.destroy(),8);case 8:ya(k,0)}})}
741
- function vs(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Me(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Me(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function ts(a,b,c){return L(function(d){return v(d,ws(a.P,a.o.drm,c,b),0)})}
742
- function us(a,b,c){function d(){}var e=xs(c);bs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Bf=function(){return rs(this,ys(this))};
743
- function ys(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return js(),b=a.P,c=a.o.drm,d=new sr,e=!1,va(n),v(n,d.init(),4);case 4:f=[],xr(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.v(2);break}k=h.value;return v(n,k.getAll(),8);case 8:return l=n.h,v(n,Xr(c,b,l),9);case 9:return m=n.h,v(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.v(5);break;case 2:return xa(n),v(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
744
- q.list=function(){return rs(this,zs())};function zs(){var a,b,c;return L(function(d){switch(d.g){case 1:return js(),a=[],b=new sr,va(d),v(d,b.init(),4);case 4:return c=Promise.resolve(),vr(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return v(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=bs(new Lr("manifest",e.Ka,e.ma,l),k);a.push(m)});z(h)})})}),v(d,c,2);case 2:return xa(d),v(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
745
- function ks(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.P,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),ls(a),v(l,c.start(b,g),2);if(3!=l.g)return h=l.h,ls(a),k=As(h),v(l,Promise.all(gb(k,
746
- function(m){return m.createSegmentIndex()})),3);ls(a);if(e)throw e;return l["return"](h)})}function ms(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new qh({Cb:a.P,onError:c,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),v(f,vh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return v(f,Lh(e),3);case 3:return v(f,Gh(e),4);case 4:return f["return"](e)}})}
747
- function qs(a,b,c,d,e,f,g,h){for(var k=new cs,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var u=p.bandwidth||393216,x=r.bandwidth||m.bandwidth-u;0>=x&&(x=m.bandwidth);n.g[p.id]=u;n.g[r.id]=x}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
748
- n.set(null,Promise.resolve(null));m=new Map;p=As(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,u=Bs(a,b,c,k,e,r,h,n,m),l.set(r.id,u);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
749
- expiration:d.Tb(),streams:a,sessionIds:h?Sh(d):[],drmInfo:b,appMetadata:g}}
750
- function Bs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
751
- tilesLayout:f.tilesLayout},m=f.id;Cs(f,e.presentationTimeline.ab(),function(n){var p=Ds(a,b,m,f.id,c,d,n.h,g,h),r=Es(a,b,m,f.id,c,d,n,g,k);gr(b,m,function(){var u,x;return L(function(w){if(1==w.g)return v(w,p,2);if(3!=w.g)return u=w.h,v(w,r,3);x=w.h;l.segments.push({initSegmentKey:u,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});z(w)})})});return l}
752
- function Ds(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Zi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=er(b,c,h,.5*es(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return v(n,e.addSegments([{data:l}]),2);m=n.h;a.Nc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
753
- function Es(a,b,c,d,e,f,g,h,k){var l=[g.na()[0],g.ka,g.fa].join("-");if(k.has(l))return k.get(l);h=Zi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=er(b,c,h,ds(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return v(p,e.addSegments([{data:m}]),2);n=p.h;a.Nc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Cs(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function ls(a){if(a.J.g)throw new N(2,9,7001);}
754
- function js(){if(!gs())throw new N(2,9,9E3);}function rs(a,b){return L(function(c){if(1==c.g)return a.ac.push(b),va(c),v(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);uc(a.ac,b);return ya(c,0)})}function is(a,b){var c=b.promise;a.ac.push(c);return b["finally"](function(){uc(a.ac,c)})}
755
- function xs(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
756
- function ws(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=yr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:vs(d,!1),videoCapabilities:vs(d,!0)}});return v(h,Xr(b,a,f),2)}return 3!=h.g?(g=h.h,v(h,e.remove(g),3)):v(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
757
- function As(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
758
- function os(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",fs);fs.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new sr,va(b),v(b,zr(a),2)):5!=b.g?(xa(b),v(b,a.destroy(),5)):ya(b,0)})};fs.prototype.list=fs.prototype.list;
759
- fs.prototype.removeEmeSessions=fs.prototype.Bf;fs.prototype.remove=fs.prototype.remove;fs.prototype.getStoreInProgress=fs.prototype.ef;fs.prototype.store=fs.prototype.store;fs.prototype.getNetworkingEngine=fs.prototype.Ub;fs.prototype.getConfiguration=fs.prototype.getConfiguration;fs.prototype.configure=fs.prototype.configure;fs.prototype.destroy=fs.prototype.destroy;fs.support=gs;
760
- var ps=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
761
- Vl.offline=gs;function Fs(){}function Gs(a,b){for(var c={priority:b||0,De:a},d=t(mb(Hs)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ga;if(e.item.priority<c.priority){Hs.splice(f,0,c);return}}Hs.push(c)}M("shaka.polyfill",Fs);Fs.register=Gs;Fs.installAll=function(){for(var a=t(Hs),b=a.next();!b.done;b=a.next()){b=b.value;try{b.De()}catch(c){Wa("Error installing polyfill!",c)}}};var Hs=[];function Is(){}function Js(){Ks()}Fs.EncryptionScheme=Is;Is.install=Js;Gs(Js,-2);function Ls(){}
762
- function Ms(){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.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
763
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ns);document.addEventListener("webkitfullscreenerror",Ns);document.addEventListener("mozfullscreenchange",Ns);document.addEventListener("mozfullscreenerror",Ns);document.addEventListener("MSFullscreenChange",Ns);document.addEventListener("MSFullscreenError",Ns)}}
764
- function Ns(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Fs.Fullscreen=Ls;Ls.install=Ms;Gs(Ms);function Os(){}function Ps(){}Fs.MathRound=Os;Os.install=Ps;Gs(Ps);function Qs(){}function Rs(){if(dc()||ec()||bc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities.decodingInfo=Ss;window.shakaMediaCapabilities=navigator.mediaCapabilities}
765
- function Ss(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,w;return L(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!Yb()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Zb(g),!h)||a.audio&&(k=a.audio.contentType,
766
- l=Zb(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(u={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(u));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
767
- n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);B(y,3);return v(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;wa(y,4);break;case 3:F(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}Fs.MediaCapabilities=Qs;Qs.install=Rs;Gs(Rs,-1);function Ts(){}function Us(){var a=fc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Vs():a?(Ws(),12>=a?(Xs(),Ys()):Xs()):(bc("Tizen 2")||bc("Tizen 3")||bc("Tizen 4"))&&Zs());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&$s()}
768
- function Xs(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function Ys(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Ws(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
769
- function Zs(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Qe(b)&&a(b)}}function Vs(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
770
- function $s(){var a=MediaSource.isTypeSupported;bc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Fs.MediaSource=Ts;Ts.install=Us;Gs(Us);function at(){}function bt(){screen.orientation||void 0!=window.orientation&&ct()}function ct(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new dt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}Fs.Orientation=at;
771
- at.install=bt;function dt(){Vg.call(this);this.type="";this.angle=0}ra(dt,Vg);
772
- dt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
773
- dt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Gs(bt);function et(){}function ft(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gt,window.MediaKeys=ht,window.MediaKeySystemAccess=it,navigator.requestMediaKeySystemAccess=jt)}function jt(a,b){try{var c=new it(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
774
- function gt(a){var b=this.mediaKeys;b&&b!=a&&kt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?kt(a,this):Promise.resolve()}function lt(a){a=qb(a.initData);if(tb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xb(a.subarray(4),!0);a=Ab(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=rb(a);this.dispatchEvent(b)}Fs.PatchedMediaKeysApple=et;et.install=ft;
775
- function it(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
712
+ function Mr(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
713
+ e.value,g=Nr(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Nr(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
714
+ function Nr(a,b,c){var d=b.segments.map(function(e){return Or(a,e)});c.yb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
715
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Or(a,b){var c=new Ir("segment",a.h,a.g,b.dataKey);return new hi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Pr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
716
+ function Pr(a,b){var c=new Ir("segment",a.h,a.g,b);return new fi(function(){return[c.toString()]},0,null)};function Qr(){this.g=null}r=Qr.prototype;r.configure=function(){};
717
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Jr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new pr;ta(m);return u(m,e.init(),4);case 4:return u(m,tr(e,d.Fa(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Kr(d.Fa(),d.la()),l=Lr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return va(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
718
+ r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new pr,C(m,2,3),u(m,e.init(),5);case 5:return u(m,tr(e,d.Fa(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
719
+ bi["application/x-offline-manifest"]=function(){return new Qr};function Rr(){}function Sr(a){var b=Jr(a);b&&"manifest"==b.g?(a={uri:a,Zd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Hg(a)):a=b&&"segment"==b.g?Tr(b.key(),b):Fg(new O(2,1,9004,a));return a}
720
+ function Tr(a,b){var c=new pr;return Hg(void 0).$(function(){return c.init()}).$(function(){return tr(c,b.Fa(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",Rr);Rr.plugin=Sr;Sg("offline",Sr);function Ur(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),x=v.next();!x.done;x=v.next())if(x=x.value,Vr(x.info,p)){x.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Wr(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
721
+ function Wr(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new jh({xb:b,onError:function(){},Bc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,rh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Bh(d),8);case 8:ua(f,7);break;case 6:return F(f),u(f,d.destroy(),
722
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,Ch(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
723
+ function Vr(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ic(a.audioCapabilities,b.audioCapabilities,c)&&ic(a.videoCapabilities,b.videoCapabilities,c)};function Xr(a,b,c){var d=b.presentationTimeline.getDuration();b=Yr(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Zr(a,b){var c=Lr(new Kr(a.Fa(),a.la()),b),d=b.appMetadata||{};c=Yr(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
724
+ function Yr(a){var b=[],c=hg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($f(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ag(c.value));return b};function $r(){this.g={}}function as(a,b,c){c=c.endTime-c.startTime;return bs(a,b)*c}function bs(a,b){var c=a.g[b];null==c&&(c=0);return c};function cs(a){var b=this;if(a&&a.constructor!=U)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Qb()):(this.h=Sj(),this.g=new Rg);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new Qe(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.l.map(function(l){return ar(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),
725
+ 4);case 4:b.h=null,b.g=null,z(k)}})})}function ds(){if(Fb())a:{var a=t(qr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=cs.prototype;r.destroy=function(){return this.m.destroy()};
726
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Qj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Rb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Uj(this.h,a)};r.getConfiguration=function(){var a=Sj();Uj(a,this.h,Sj());return a};r.Qb=function(){return this.g};
727
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zq(this.g);this.l.push(f);b=es(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,ai(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Mc(h))})},e,f);var g=new Eg(b,function(){return ar(f)});g["finally"](function(){hc(d.l,f)});g.then=function(h){Rb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
728
+ return g.promise.then(h)};return fs(this,g)};r.Te=function(){Rb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
729
+ function es(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,x,w;return L(function(y){switch(y.g){case 1:return gs(),h=g=null,k=new pr,m=l=null,C(y,2,3),u(y,d(),5);case 5:return g=y.h,u(y,hs(a,b,g,e),6);case 6:n=y.h;is(a);p=!n.presentationTimeline.U()&&!n.presentationTimeline.gb();if(!p)throw new O(2,9,9005,b);return u(y,js(a,n,function(D){m=m||D},e),7);case 7:h=y.h;is(a);if(m)throw m;return u(y,ks(n,h,e),8);case 8:return u(y,k.init(),9);case 9:return is(a),u(y,rr(k),10);case 10:return l=y.h,is(a),u(y,ls(a,l.la,
730
+ h,n,b,c,e,f),11);case 11:q=y.h;is(a);if(m)throw m;return u(y,l.la.addManifests([q]),12);case 12:return v=y.h,is(a),x=new Ir("manifest",l.path.Fa,l.path.la,v[0]),y["return"](Zr(x,q));case 3:return va(y),a.j=[],u(y,k.destroy(),13);case 13:if(!g){y.A(14);break}return u(y,g.stop(),14);case 14:if(!h){y.A(16);break}return u(y,h.destroy(),16);case 16:xa(y,0);break;case 2:w=F(y);if(!l){y.A(18);break}return u(y,l.la.removeSegments(a.j,function(){}),18);case 18:throw m||w;}})}
731
+ function ks(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,x,w,y,D,B,A,E,G,H,K,I,J,R,M;return L(function(W){switch(W.g){case 1:d={width:Infinity,height:Infinity};Kf(a,c.restrictions,d);if(!c.useMediaCapabilities){Of(a);Nf(a,b);W.A(2);break}return u(W,Pf(a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredAudioChannelCount;Ef(a,f);g=t(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push($f(k));l=t(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(ag(n));p=t(a.imageStreams);
732
+ for(q=p.next();!q.done;q=p.next())v=q.value,e.push(bg(v));return u(W,c.offline.trackSelectionCallback(e),4);case 4:x=W.h;w=a.presentationTimeline.getDuration();y=0;D=t(x);for(B=D.next();!B.done;B=D.next())A=B.value,E=A.bandwidth*w/8,y+=E;C(W,5);return u(W,c.offline.downloadSizeCallback(y),7);case 7:G=W.h;if(!G)throw new O(2,9,9014);ua(W,6);break;case 5:H=F(W);if(H instanceof O)throw H;throw new O(2,9,9015);case 6:K=new Set;I=new Set;J=new Set;R=t(x);for(B=R.next();!B.done;B=R.next())M=B.value,"variant"==
733
+ M.type&&K.add(M.id),"text"==M.type&&I.add(M.id),"image"==M.type&&J.add(M.id);a.variants=a.variants.filter(function(ea){return K.has(ea.id)});a.textStreams=a.textStreams.filter(function(ea){return I.has(ea.id)});a.imageStreams=a.imageStreams.filter(function(ea){return J.has(ea.id)});ms(a);z(W)}})}
734
+ function ls(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,x,w,y,D,B;return L(function(A){switch(A.g){case 1:return k=Xr(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&x==G&&Ah(c,"cenc",E)},$q(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),q=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
735
+ G.initData.length})}),v=p&&!q,x=null,v&&(w=c.g,x=ns.get(w.keySystem)),ta(A),D=y=os(a,h,b,c,d,e,f,g),u(A,er(h),4);case 4:D.size=A.h;y.expiration=c.Pb();B=Ih(c);y.sessionIds=g.offline.usePersistentLicense?B:[];if(p&&g.offline.usePersistentLicense&&!B.length)throw new O(2,9,9007);return A["return"](y);case 2:return va(A),u(A,h.destroy(),5);case 5:xa(A,0)}})}r.remove=function(a){return ps(this,qs(this,a))};
736
+ function qs(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:gs();c=Jr(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new pr;ta(k);return u(k,e.init(),4);case 4:return u(k,tr(e,d.Fa(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([rs(a,h,e),ss(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
737
+ function ts(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Be(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Be(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function rs(a,b,c){return L(function(d){return u(d,us(a.g,a.h.drm,c,b),0)})}
738
+ function ss(a,b,c){function d(){}var e=vs(c);Zr(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.nf=function(){return ps(this,ws(this))};
739
+ function ws(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return gs(),b=a.g,c=a.h.drm,d=new pr,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],ur(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ur(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return va(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
740
+ r.list=function(){return ps(this,xs())};function xs(){var a,b,c;return L(function(d){switch(d.g){case 1:return gs(),a=[],b=new pr,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),sr(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Zr(new Ir("manifest",e.Fa,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return va(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
741
+ function hs(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),is(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,is(a),k=ys(h),u(l,Promise.all(eh(k,
742
+ function(m){return m.createSegmentIndex()})),3);is(a);if(e)throw e;return l["return"](h)})}function js(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new jh({xb:a.g,onError:c,Bc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,oh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return u(f,Bh(e),3);case 3:return u(f,zh(e),4);case 4:return f["return"](e)}})}
743
+ function os(a,b,c,d,e,f,g,h){for(var k=new $r,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,q=m.video;p&&!q&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&q&&(n.g[q.id]=q.bandwidth||m.bandwidth);if(p&&q){var v=p.bandwidth||393216,x=q.bandwidth||m.bandwidth-v;0>=x&&(x=m.bandwidth);n.g[p.id]=v;n.g[q.id]=x}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
744
+ n.set(null,Promise.resolve(null));m=new Map;p=ys(e);l=new Map;p=t(p);for(q=p.next();!q.done;q=p.next())q=q.value,v=zs(a,b,c,k,e,q,h,n,m),l.set(q.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
745
+ expiration:d.Pb(),streams:a,sessionIds:h?Ih(d):[],drmInfo:b,appMetadata:g}}
746
+ function zs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
747
+ tilesLayout:f.tilesLayout},m=f.id;As(f,e.presentationTimeline.Qa(),function(n){var p=Bs(a,b,m,f.id,c,d,n.h,g,h),q=Cs(a,b,m,f.id,c,d,n,g,k);dr(b,m,function(){var v,x;return L(function(w){if(1==w.g)return u(w,p,2);if(3!=w.g)return v=w.h,u(w,q,3);x=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});z(w)})})});return l}
748
+ function Bs(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Ri(g.ma(),g.ha,g.ba,h.streaming.retryParameters);b=br(b,c,h,.5*bs(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
749
+ function Cs(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ha,g.ba].join("-");if(k.has(l))return k.get(l);h=Ri(g.ma(),g.ha,g.ba,h.streaming.retryParameters);b=br(b,c,h,as(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function As(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function is(a){if(a.m.g)throw new O(2,9,7001);}
750
+ function gs(){if(!ds())throw new O(2,9,9E3);}function ps(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);va(c);hc(a.i,b);return xa(c,0)})}function fs(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){hc(a.i,c)})}
751
+ function vs(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
752
+ function us(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=vr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ts(d,!1),videoCapabilities:ts(d,!0)}});return u(h,Ur(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
753
+ function ys(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
754
+ function ms(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",cs);cs.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new pr,ta(b),u(b,wr(a),2)):5!=b.g?(va(b),u(b,a.destroy(),5)):xa(b,0)})};cs.prototype.list=cs.prototype.list;
755
+ cs.prototype.removeEmeSessions=cs.prototype.nf;cs.prototype.remove=cs.prototype.remove;cs.prototype.getStoreInProgress=cs.prototype.Te;cs.prototype.store=cs.prototype.store;cs.prototype.getNetworkingEngine=cs.prototype.Qb;cs.prototype.getConfiguration=cs.prototype.getConfiguration;cs.prototype.configure=cs.prototype.configure;cs.prototype.destroy=cs.prototype.destroy;cs.support=ds;
756
+ var ns=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
757
+ Pl.offline=ds;function Ds(){}function Es(a,b){for(var c={priority:b||0,se:a},d=0;d<Fs.length;d++)if(Fs[d].priority<c.priority){Fs.splice(d,0,c);return}Fs.push(c)}N("shaka.polyfill",Ds);Ds.register=Es;Ds.installAll=function(){for(var a=t(Fs),b=a.next();!b.done;b=a.next()){b=b.value;try{b.se()}catch(c){Sa("Error installing polyfill!",c)}}};var Fs=[];function Gs(){}function Hs(){Is()}Ds.EncryptionScheme=Gs;Gs.install=Hs;Es(Hs,-2);function Js(){}
758
+ function Ks(){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.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
759
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ls);document.addEventListener("webkitfullscreenerror",Ls);document.addEventListener("mozfullscreenchange",Ls);document.addEventListener("mozfullscreenerror",Ls);document.addEventListener("MSFullscreenChange",Ls);document.addEventListener("MSFullscreenError",Ls)}}
760
+ function Ls(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Ds.Fullscreen=Js;Js.install=Ks;Es(Ks);function Ms(){}function Ns(){}Ds.MathRound=Ms;Ms.install=Ns;Es(Ns);function Os(){}function Ps(){if(Lb()||Mb()||Jb("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Qs=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Rs}
761
+ function Rs(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,x,w;return L(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!Fb()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Gb(g),!h)||a.audio&&(k=a.audio.contentType,
762
+ l=Gb(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
763
+ n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);C(y,3);return u(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;ua(y,4);break;case 3:F(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}Ds.MediaCapabilities=Os;Os.install=Ps;var Qs=null;Os.originalMcap=Qs;Es(Ps,-1);function Ss(){}function Ts(){var a=Nb();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Us():a?(Vs(),12>=a?(Ws(),Xs()):Ws()):(Jb("Tizen 2")||Jb("Tizen 3")||Jb("Tizen 4"))&&Ys());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Zs()}
764
+ function Ws(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ea.apply(0,arguments));b.abort=function(){};return b}}function Xs(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Vs(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
765
+ function Ys(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Fe(b)&&a(b)}}function Us(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
766
+ function Zs(){var a=MediaSource.isTypeSupported;Jb("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Ds.MediaSource=Ss;Ss.install=Ts;Es(Ts);function $s(){}function at(){screen.orientation||void 0!=window.orientation&&bt()}function bt(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new ct;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Ds.Orientation=$s;
767
+ $s.install=at;function ct(){Mg.call(this);this.type="";this.angle=0}pa(ct,Mg);
768
+ ct.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
769
+ ct.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Es(at);function dt(){}function et(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ft,window.MediaKeys=gt,window.MediaKeySystemAccess=ht,navigator.requestMediaKeySystemAccess=it)}function it(a,b){try{var c=new ht(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
770
+ function ft(a){var b=this.mediaKeys;b&&b!=a&&jt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?jt(a,this):Promise.resolve()}function kt(a){a=gb(a.initData);if(jb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=nb(a.subarray(4),!0);a=qb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=hb(a);this.dispatchEvent(b)}Ds.PatchedMediaKeysApple=dt;dt.install=et;
771
+ function ht(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
776
772
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
777
- it.prototype.createMediaKeys=function(){var a=new ht(this.keySystem);return Promise.resolve(a)};it.prototype.getConfiguration=function(){return this.g};function ht(a){this.g=new WebKitMediaKeys(a);this.h=new ef}ht.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new mt(this.g,a)};ht.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
778
- function kt(a,b){a.h.ob();if(!b)return Promise.resolve();a.h.B(b,"webkitneedkey",lt);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function mt(a){Vg.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new De;this.keyStatuses=new nt}ra(mt,Vg);q=mt.prototype;
779
- q.generateRequest=function(a,b){var c=this;this.g=new De;try{var d=this.l.createSession("video/mp4",qb(b));this.j=d;this.sessionId=d.sessionId||"";this.h.B(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",rb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.h.B(d,"webkitkeyadded",function(){c.i&&(ot(c,"usable"),c.i.resolve(),c.i=null)});this.h.B(d,"webkitkeyerror",function(){var e=
780
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ot(c,"output-not-allowed");break;default:ot(c,"internal-error")}});ot(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
781
- q.update=function(a){this.i=new De;try{this.j.update(qb(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ot(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
782
- function nt(){this.size=0;this.g=void 0}q=nt.prototype;q.forEach=function(a){this.g&&a(this.g,fi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=fi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Gs(ft);function pt(){}function qt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=rt,window.MediaKeySystemAccess=st,navigator.requestMediaKeySystemAccess=tt,HTMLMediaElement.prototype.setMediaKeys=ut)}function tt(a,b){try{var c=new st(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
783
- function vt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=rb(xn(a.initData));this.dispatchEvent(b)}}Fs.PatchedMediaKeysMs=pt;pt.install=qt;
784
- function st(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
773
+ ht.prototype.createMediaKeys=function(){var a=new gt(this.keySystem);return Promise.resolve(a)};ht.prototype.getConfiguration=function(){return this.g};function gt(a){this.h=new WebKitMediaKeys(a);this.g=new Ue}gt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new lt(this.h,a)};gt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
774
+ function jt(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.v(b,"webkitneedkey",kt);try{return oi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function lt(a){Mg.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new Ue;this.sessionId="";this.expiration=NaN;this.closed=new se;this.keyStatuses=new mt}pa(lt,Mg);r=lt.prototype;
775
+ r.generateRequest=function(a,b){var c=this;this.g=new se;try{var d=this.l.createSession("video/mp4",gb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.v(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",hb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.v(d,"webkitkeyadded",function(){c.h&&(nt(c,"usable"),c.h.resolve(),c.h=null)});this.j.v(d,"webkitkeyerror",function(){var e=
776
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:nt(c,"output-not-allowed");break;default:nt(c,"internal-error")}});nt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
777
+ r.update=function(a){this.h=new se;try{this.i.update(gb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function nt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
778
+ function mt(){this.size=0;this.g=void 0}r=mt.prototype;r.forEach=function(a){this.g&&a(this.g,Zh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Zh.value();return this.g&&db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Es(et);function ot(){}function pt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=qt,window.MediaKeySystemAccess=rt,navigator.requestMediaKeySystemAccess=st,HTMLMediaElement.prototype.setMediaKeys=tt)}function st(a,b){try{var c=new rt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
779
+ function ut(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=hb(rn(a.initData));this.dispatchEvent(b)}}Ds.PatchedMediaKeysMs=ot;ot.install=pt;
780
+ function rt(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
785
781
  !0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
786
- st.prototype.createMediaKeys=function(){var a=new rt(this.keySystem);return Promise.resolve(a)};st.prototype.getConfiguration=function(){return this.g};function ut(a){var b=this.mediaKeys;b&&b!=a&&wt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?wt(a,this):Promise.resolve()}function rt(a){this.g=new MSMediaKeys(a);this.h=new ef}
787
- rt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new xt(this.g,a)};rt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function wt(a,b){a.h.ob();if(!b)return Promise.resolve();a.h.B(b,"msneedkey",vt);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
788
- function xt(a){Vg.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new De;this.keyStatuses=new yt}ra(xt,Vg);q=xt.prototype;
789
- q.generateRequest=function(a,b){var c=this;this.g=new De;try{this.j=this.l.createSession("video/mp4",qb(b),null),this.h.B(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",rb(d.message));d=new R("message",d);c.dispatchEvent(d)}),this.h.B(this.j,"mskeyadded",function(){c.g?(zt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(zt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.B(this.j,"mskeyerror",
790
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:zt(c,"output-not-allowed");break;default:zt(c,"internal-error")}}),zt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
791
- q.update=function(a){this.i=new De;try{this.j.update(qb(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function zt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
792
- function yt(){this.size=0;this.g=void 0}q=yt.prototype;q.forEach=function(a){this.g&&a(this.g,fi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=fi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Gs(qt);function At(){}function Bt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ct,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Dt,window.MediaKeys=Et,window.MediaKeySystemAccess=Ft)}function Ct(){return Promise.reject(Error("The key system specified is not supported."))}
793
- function Dt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Fs.PatchedMediaKeysNop=At;At.install=Bt;function Et(){throw new TypeError("Illegal constructor.");}Et.prototype.createSession=function(){};Et.prototype.setServerCertificate=function(){};function Ft(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ft.prototype.getConfiguration=function(){};Ft.prototype.createMediaKeys=function(){};Gs(Bt,-10);function Gt(){}function Ht(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)It="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Jt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Kt;window.MediaKeys=Lt;window.MediaKeySystemAccess=Mt}}
794
- function Nt(a){var b=It;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Jt(a,b){try{var c=new Mt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Kt(a){var b=this.mediaKeys;b&&b!=a&&Ot(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ot(a,this);return Promise.resolve()}Fs.PatchedMediaKeysWebkit=Gt;Gt.install=Ht;
795
- function Mt(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="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=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
782
+ rt.prototype.createMediaKeys=function(){var a=new qt(this.keySystem);return Promise.resolve(a)};rt.prototype.getConfiguration=function(){return this.g};function tt(a){var b=this.mediaKeys;b&&b!=a&&vt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?vt(a,this):Promise.resolve()}function qt(a){this.h=new MSMediaKeys(a);this.g=new Ue}
783
+ qt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new wt(this.h,a)};qt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function vt(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.v(b,"msneedkey",ut);try{return oi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
784
+ function wt(a){Mg.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new Ue;this.sessionId="";this.expiration=NaN;this.closed=new se;this.keyStatuses=new xt}pa(wt,Mg);r=wt.prototype;
785
+ r.generateRequest=function(a,b){var c=this;this.g=new se;try{this.i=this.l.createSession("video/mp4",gb(b),null),this.j.v(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",hb(d.message));d=new Q("message",d);c.dispatchEvent(d)}),this.j.v(this.i,"mskeyadded",function(){c.g?(yt(c,"usable"),c.g.resolve(),c.g=null):c.h&&(yt(c,"usable"),c.h.resolve(),c.h=null)}),this.j.v(this.i,"mskeyerror",
786
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:yt(c,"output-not-allowed");break;default:yt(c,"internal-error")}}),yt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
787
+ r.update=function(a){this.h=new se;try{this.i.update(gb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function yt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
788
+ function xt(){this.size=0;this.g=void 0}r=xt.prototype;r.forEach=function(a){this.g&&a(this.g,Zh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Zh.value();return this.g&&db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Es(pt);function zt(){}function At(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Bt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ct,window.MediaKeys=Dt,window.MediaKeySystemAccess=Et)}function Bt(){return Promise.reject(Error("The key system specified is not supported."))}
789
+ function Ct(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ds.PatchedMediaKeysNop=zt;zt.install=At;function Dt(){throw new TypeError("Illegal constructor.");}Dt.prototype.createSession=function(){};Dt.prototype.setServerCertificate=function(){};function Et(){this.keySystem="";throw new TypeError("Illegal constructor.");}Et.prototype.getConfiguration=function(){};Et.prototype.createMediaKeys=function(){};Es(At,-10);function Ft(){}function Gt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ht="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=It;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Jt;window.MediaKeys=Kt;window.MediaKeySystemAccess=Lt}}
790
+ function Mt(a){var b=Ht;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function It(a,b){try{var c=new Lt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Jt(a){var b=this.mediaKeys;b&&b!=a&&Nt(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Nt(a,this);return Promise.resolve()}Ds.PatchedMediaKeysWebkit=Ft;Ft.install=Gt;
791
+ function Lt(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="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=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
796
792
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
797
- d=!1);if(d){this.h=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;}Mt.prototype.createMediaKeys=function(){var a=new Lt(this.g);return Promise.resolve(a)};Mt.prototype.getConfiguration=function(){return this.h};function Lt(a){this.l=a;this.g=null;this.h=new ef;this.i=[];this.j=new Map}
798
- function Ot(a,b){a.g=b;a.h.ob();var c=It;b&&(a.h.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=rb(d.initData);a.g.dispatchEvent(e)}),a.h.B(b,c+"keymessage",function(d){var e=Pt(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.B(b,c+"keyadded",function(d){if(d=Pt(a,d.sessionId))Qt(d,"usable"),
799
- d.g&&d.g.resolve(),d.g=null}),a.h.B(b,c+"keyerror",function(d){var e=Pt(a,d.sessionId);e&&e.handleError(d)}))}Lt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.g||document.createElement("video");b.src||(b.src="about:blank");a=new Rt(b,this.l,a);this.i.push(a);return a};Lt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
800
- function Pt(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Rt(a,b,c){Vg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new De;this.keyStatuses=new St}ra(Rt,Vg);q=Rt.prototype;
801
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Qt(this,"output-restricted"):1==b?Qt(this,"expired"):Qt(this,"internal-error"))};
802
- function Tt(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=qb(Ab("LOAD_SESSION|"+c));else{var e=Ab("PERSISTENT|");d=oc(e,b)}else d=qb(b)}catch(g){return Promise.reject(g)}a.h=new De;var f=Nt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
803
- function Ut(a,b,c){if(a.g)a.g.then(function(){return Ut(a,b,c)})["catch"](function(){return Ut(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=lc(e.keys[0].k);e=lc(e.keys[0].kid)}else d=qb(c),e=null;var f=Nt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
804
- function Qt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Tt(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Tt(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new De;Ut(this,b,a);return b};
805
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Nt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function St(){this.size=0;this.g=void 0}q=St.prototype;q.forEach=function(a){this.g&&a(this.g,fi.value())};q.get=function(a){if(this.has(a))return this.g};
806
- q.has=function(a){var b=fi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var It="";Gs(Ht);function Vt(){}function Wt(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Xt,Object.defineProperty(a,"disablePictureInPicture",{get:Yt,set:Zt,enumerable:!0,configurable:!0}),document.exitPictureInPicture=$t,document.addEventListener("webkitpresentationmodechanged",au,!0))}}
807
- function au(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
808
- function Xt(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function $t(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
809
- function Yt(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Zt(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Fs.PiPWebkit=Vt;Vt.install=Wt;Gs(Wt);function bu(){}function cu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=du)}function du(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Fs.StorageEstimate=bu;bu.install=cu;Gs(cu);function eu(){}function fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Fs.VideoPlayPromise=eu;eu.install=fu;Gs(fu);function gu(){}function hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=iu)}}function iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Fs.VideoPlaybackQuality=gu;gu.install=hu;Gs(hu);function ju(){}function ku(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=lu;else if(6==b)a=mu;else{try{var c=!!lu(1,2,"")}catch(d){c=!1}c&&(a=lu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function lu(a,b,c){return new window.TextTrackCue(a,b,c)}function mu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Fs.VTTCue=ju;ju.install=ku;Gs(ku);function nu(){}nu.prototype.parseInit=function(){};nu.prototype.parseMedia=function(a,b){var c=null,d=[],e=wb(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=ou.exec(f))){var g=pu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new xc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",nu);nu.prototype.parseMedia=nu.prototype.parseMedia;
810
- nu.prototype.parseInit=nu.prototype.parseInit;var ou=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,pu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Ue["application/x-subtitle-lrc"]=function(){return new nu};function qu(){}qu.prototype.parseInit=function(){};
811
- qu.prototype.parseMedia=function(a,b){var c=wb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");e=g.getElementsByTagName("body")[0];if(!e)return[];c=Dn(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=Dn(g,"http://www.w3.org/ns/ttml#parameter",
812
- "subFrameRate"),k=Dn(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=Dn(g,"http://www.w3.org/ns/ttml#parameter","tickRate"),m=Dn(g,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=g.getAttribute("xml:space")||"default";var n=Dn(g,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=f&&"preserve"!=f)throw new N(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;c=new ru(c,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:
813
- null:null;h=(h=g.getElementsByTagName("metadata")[0])?Cn(h):[];k=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));l=[];for(var p=t(g),r=p.next();!r.done;r=p.next()){var u=r.value;r=new zc;var x=u.getAttribute("xml:id");if(x){r.id=x;var w=null;n&&(w=su.exec(n)||tu.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,C;if(y=uu(u,k,"extent"))y=(C=su.exec(y))||tu.exec(y),null!=y&&(r.width=Number(y[1]),r.height=Number(y[2]),C||(null!=x&&(r.width=100*r.width/
814
- x),null!=w&&(r.height=100*r.height/w)),r.widthUnits=C||null!=x?Pc:0,r.heightUnits=C||null!=w?Pc:0);if(u=uu(u,k,"origin"))y=(C=su.exec(u))||tu.exec(u),null!=y&&(r.viewportAnchorX=Number(y[1]),r.viewportAnchorY=Number(y[2]),C||(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=x&&(r.viewportAnchorX=100*r.viewportAnchorX/x)),r.viewportAnchorUnits=C||null!=x?Pc:0)}else r=null;r&&l.push(r)}if(zn(e,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(zn(e,"div"));for(n=
815
- e.next();!n.done;n=e.next()){n=n.value;if(zn(n,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if((p=zn(n,"p"))&&p.length)for(n=t(p),p=n.next();!p.done;p=n.next())(p=vu(p.value,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(p);else(n=vu(n,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(n)}}return d};
816
- function vu(a,b,c,d,e,f,g,h,k,l){var m=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){var n=document.createElement("span");n.textContent=a.textContent;a=n}n="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));var p=Array.from(a.childNodes).every(function(y){return y.nodeType==Node.TEXT_NODE});h=[];if(!p)for(var r=t(a.childNodes),u=r.next();!u.done;u=r.next())(u=vu(u.value,b,c,d,e,f,g,n,!0,l))&&h.push(u);r=/\S/.test(a.textContent);var x=a.hasAttribute("begin")||
817
- a.hasAttribute("end")||a.hasAttribute("dur");if(!(x||r||"br"==a.tagName||0!=h.length||k&&!n))return null;u=wu(a,c);r=u.start;for(u=u.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)u=xu(m,c,r,u),r=u.start,u=u.end,m=m.parentNode;null==r&&(r=0);r+=b;u=null==u?Infinity:u+b;if(!x&&0<h.length)for(r=Infinity,u=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,r=Math.min(r,c.startTime),u=Math.max(u,c.endTime);if("br"==a.tagName)return d=new xc(r,u,""),d.lineBreak=!0,d;b="";p&&(b=a.textContent,n&&(b=
818
- b.trim(),b=b.replace(/\s+/g," ")));n=new xc(r,u,b);n.nestedCues=h;l&&(n.cellResolution=l);if((f=yu(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var w=f.getAttribute("xml:id");n.region=g.filter(function(y){return y.id==w})[0]}g=null;l=t(zu);for(p=l.next();!p.done&&!(g=yu(a,"backgroundImage",d,"#",p.value)[0]);p=l.next());Au(n,a,f,g,e,k,0==h.length);return n}
819
- function Au(a,b,c,d,e,f,g){f=f||g;"rtl"==Bu(b,c,e,"direction",f)&&(a.direction="rtl");g=Bu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=yc);(g=Bu(b,c,e,"textAlign",f))?(a.positionAlign=Cu[g],a.lineAlign=Du[g],a.textAlign=Jc[g.toUpperCase()]):a.textAlign="start";if(g=Bu(b,c,e,"displayAlign",f))a.displayAlign=Kc[g.toUpperCase()];if(g=Bu(b,c,e,"color",f))a.color=g;if(g=Bu(b,c,e,"backgroundColor",
820
- f))a.backgroundColor=g;if(g=Bu(b,c,e,"border",f))a.border=g;if(g=Bu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Bu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Bu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Bu(b,c,e,"lineHeight",f))&&g.match(Eu)&&(a.lineHeight=g);(g=Bu(b,c,e,"fontSize",f))&&(g.match(Eu)||g.match(Fu))&&(a.fontSize=g);if(g=Bu(b,c,e,"fontStyle",f))a.fontStyle=Oc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
821
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Bu(b,c,e,"letterSpacing",f))&&d.match(Eu)&&(a.letterSpacing=d);(d=Bu(b,c,e,"linePadding",f))&&d.match(Eu)&&(a.linePadding=d);if(f=Bu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=uu(c,e,"textDecoration"))&&Gu(a,c);(b=Hu(b,e,"textDecoration"))&&Gu(a,b)}
822
- function Gu(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&uc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&uc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
823
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&uc(a.textDecoration,"overline")}}function Bu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Hu(a,c,d))?a:e?uu(b,c,d):null}function uu(a,b,c){if(!a)return null;var d=Dn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Iu(a,b,c)}function Hu(a,b,c){var d=Dn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Iu(a,b,c)}
824
- function Iu(a,b,c){a=yu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Dn(a[e],"urn:ebu:tt:style",c);f||(f=Dn(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Hu(a[e],b,c));f&&(d=f)}return d}
825
- function yu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Dn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function xu(a,b,c,d){a=wu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
826
- function wu(a,b){var c=Ju(a.getAttribute("begin"),b),d=Ju(a.getAttribute("end"),b),e=Ju(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
827
- function Ju(a,b){var c=null;if(Ku.test(a)){c=Ku.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.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Lu.test(a))c=Mu(Lu,a);else if(Nu.test(a))c=Mu(Nu,a);else if(Ou.test(a))c=Ou.exec(a),c=Number(c[1])/b.frameRate;else if(Pu.test(a))c=Pu.exec(a),c=Number(c[1])/b.g;else if(Qu.test(a))c=Mu(Qu,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
828
- function Mu(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)}M("shaka.text.TtmlTextParser",qu);qu.prototype.parseMedia=qu.prototype.parseMedia;qu.prototype.parseInit=qu.prototype.parseInit;function ru(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
829
- var su=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Fu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Eu=/^(\d+px|\d+em|\d*\.?\d+c)$/,tu=/^(\d+)px (\d+)px$/,Ku=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Lu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Nu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ou=/^(\d*(?:\.\d*)?)f$/,Pu=/^(\d*(?:\.\d*)?)t$/,Qu=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Du={left:Ec,center:"center",right:"end",start:Ec,end:"end"},Cu=
830
- {left:"line-left",center:"center",right:"line-right"},zu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ue["application/ttml+xml"]=function(){return new qu};function Ru(){this.s=new qu}Ru.prototype.parseInit=function(a){var b=!1;(new Ob).box("moov",Sb).box("trak",Sb).box("mdia",Sb).box("minf",Sb).box("stbl",Sb).U("stsd",Ub).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Ru.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Ob).box("mdat",Vb(function(f){d=!0;e=e.concat(c.s.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",Ru);Ru.prototype.parseMedia=Ru.prototype.parseMedia;
831
- Ru.prototype.parseInit=Ru.prototype.parseInit;Ue['application/mp4; codecs="stpp"']=function(){return new Ru};Ue['application/mp4; codecs="stpp.ttml"']=function(){return new Ru};Ue['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Ru};Ue['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Ru};function Su(){}Su.prototype.parseInit=function(){};
832
- Su.prototype.parseMedia=function(a,b){var c=wb(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Tu(new Pp(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
833
- [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Pp(g);var h=new zc;Sp(g);Qp(g);for(var k=Sp(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
834
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Qp(g);k=Sp(g)}f.push(h)}e=new Map;Uu(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new xc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
835
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var u=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=u;break;case "color":n=!0;m.color=u;break;case "font-family":n=!0;m.fontFamily=u;break;case "font-size":n=!0;m.fontSize=u;break;case "font-weight":700<=parseInt(u,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(u){case "normal":n=!0;m.fontStyle=Hc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
836
- !0;m.opacity=parseFloat(u);break;case "white-space":n=!0,m.wrapLine="noWrap"!=u}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Pp(h[0]);m=Tu(k);r=Rp(k,/[ \t]+--\x3e[ \t]+/g);n=Tu(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
837
- ""):h=new xc(m,n,"");Vu(p,h,e);Qp(k);for(m=Sp(k);m;)Wu(h,m,f),Qp(k),m=Sp(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Uu(a){for(var b=t(Object.entries(Mc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new xc(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Nc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new xc(0,0,""),e.backgroundColor=d,a.set(c,e)}
838
- function Vu(a,b,c){0===c.size&&Uu(c);a=Xu(a);var d=Pn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Yu(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
839
- function Xu(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Zu(a,b){return a&&0<a.length?a:b}
840
- function Yu(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Zu(h.backgroundColor,e.backgroundColor),e.color=Zu(h.color,e.color),e.fontFamily=Zu(h.fontFamily,e.fontFamily),e.fontSize=Zu(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
841
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Fn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Yu(a.value,e,c,d)}
842
- function Wu(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Bc:a.textAlign=Jc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
843
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=$u(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Lc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Dc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Lc[c[2].toUpperCase()])}function $u(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
844
- function Tu(a){a=Rp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,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)}M("shaka.text.VttTextParser",Su);Su.prototype.parseMedia=Su.prototype.parseMedia;Su.prototype.parseInit=Su.prototype.parseInit;Ue["text/vtt"]=function(){return new Su};Ue['text/vtt; codecs="vtt"']=function(){return new Su};Ue['text/vtt; codecs="wvtt"']=function(){return new Su};function av(){this.g=null}av.prototype.parseInit=function(a){var b=this,c=!1;(new Ob).box("moov",Sb).box("trak",Sb).box("mdia",Sb).U("mdhd",function(d){d=Zd(d.reader,d.version);b.g=d.timescale}).box("minf",Sb).box("stbl",Sb).U("stsd",Ub).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
845
- av.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ob).box("moof",Sb).box("traf",Sb).U("tfdt",function(A){g=!0;c=Yd(A.reader,A.version).fd}).U("tfhd",function(A){l=Xd(A.reader,A.flags).Xd}).U("trun",function(A){h=!0;d=$d(A.reader,A.version,A.flags).ne}).box("mdat",Vb(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Cb(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var u=r.Gd||l,x=r.Mc?
846
- c+r.Mc:m;m=x+(u||0);var w=0;do{var y=n.N();w+=y;var C=n.N(),D=null;"vttc"==Wb(C)?8<y&&(D=n.bb(y-8)):n.skip(y-8);u&&D&&(y=bv(D,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(r.sampleSize&&w<r.sampleSize)}return f.filter(Mb)};function bv(a,b,c){var d,e,f;(new Ob).box("payl",Vb(function(g){d=wb(g)})).box("iden",Vb(function(g){e=wb(g)})).box("sttg",Vb(function(g){f=wb(g)})).parse(a);return d?cv(d,e,f,b,c):null}
847
- function cv(a,b,c,d,e){d=new xc(d,e,"");Vu(a,d,new Map);b&&(d.id=b);if(c)for(a=new Pp(c),b=Sp(a);b;)Wu(d,b,[]),Qp(a),b=Sp(a);return d}M("shaka.text.Mp4VttParser",av);av.prototype.parseMedia=av.prototype.parseMedia;av.prototype.parseInit=av.prototype.parseInit;Ue['application/mp4; codecs="wvtt"']=function(){return new av};function dv(){}dv.prototype.parseInit=function(){};dv.prototype.parseMedia=function(a){var b=wb(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Pp(c[0]),e=ev(d),f=Rp(d,/,/g);d=ev(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new xc(e,d,c.slice(1).join("\n").trim()))}return a};
848
- function ev(a){a=Rp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,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)}M("shaka.text.SbvTextParser",dv);dv.prototype.parseMedia=dv.prototype.parseMedia;dv.prototype.parseInit=dv.prototype.parseInit;Ue["text/x-subviewer"]=function(){return new dv};function fv(){this.s=new Su}fv.prototype.parseInit=function(){};fv.prototype.parseMedia=function(a,b){var c=wb(a);c=gv(c);c=qb(Ab(c));return this.s.parseMedia(c,b)};function gv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",fv);fv.srt2webvtt=gv;fv.prototype.parseMedia=fv.prototype.parseMedia;
849
- fv.prototype.parseInit=fv.prototype.parseInit;Ue["text/srt"]=function(){return new fv};function hv(){}hv.prototype.parseInit=function(){};
850
- hv.prototype.parseMedia=function(a){var b="",c="";a=wb(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=iv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=jv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(kv);else if("Style"==e){e=f.split(kv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
851
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={bd:e.bd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=jv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(kv);else if("Dialogue"==f){g=g.split(kv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=lv(f.Start);var k=lv(f.End);g=new xc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.bd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.bd}}(e)))&&mv(g,f);d.push(g)}return d};
852
- function mv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=nv(c))a.color=c;if(c=b.BackColour)if(c=nv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Fc;a.textAlign="start";break;case 2:a.displayAlign=Fc;a.textAlign=Bc;break;case 3:a.displayAlign=Fc;a.textAlign="end";
853
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Bc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Bc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
854
- function nv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function lv(a){a=ov.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",hv);hv.prototype.parseMedia=hv.prototype.parseMedia;hv.prototype.parseInit=hv.prototype.parseInit;var iv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,jv=/^\s*([^:]+):\s*(.*)/,kv=/\s*,\s*/,ov=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
855
- Ue["text/x-ssa"]=function(){return new hv};/*
793
+ d=!1);if(d){this.h=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;}Lt.prototype.createMediaKeys=function(){var a=new Kt(this.g);return Promise.resolve(a)};Lt.prototype.getConfiguration=function(){return this.h};function Kt(a){this.l=a;this.h=null;this.g=new Ue;this.i=[];this.j=new Map}
794
+ function Nt(a,b){a.h=b;a.g.ib();var c=Ht;b&&(a.g.v(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=hb(d.initData);a.h.dispatchEvent(e)}),a.g.v(b,c+"keymessage",function(d){var e=Ot(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.v(b,c+"keyadded",function(d){if(d=Ot(a,d.sessionId))Pt(d,"usable"),
795
+ d.g&&d.g.resolve(),d.g=null}),a.g.v(b,c+"keyerror",function(d){var e=Ot(a,d.sessionId);e&&e.handleError(d)}))}Kt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Qt(b,this.l,a);this.i.push(a);return a};Kt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
796
+ function Ot(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Qt(a,b,c){Mg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new se;this.keyStatuses=new Rt}pa(Qt,Mg);r=Qt.prototype;
797
+ r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Pt(this,"output-restricted"):1==b?Pt(this,"expired"):Pt(this,"internal-error"))};
798
+ function St(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=gb(qb("LOAD_SESSION|"+c));else{var e=qb("PERSISTENT|");d=ac(e,b)}else d=gb(b)}catch(g){return Promise.reject(g)}a.h=new se;var f=Mt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
799
+ function Tt(a,b,c){if(a.g)a.g.then(function(){return Tt(a,b,c)})["catch"](function(){return Tt(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=mb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Yb(e.keys[0].k);e=Yb(e.keys[0].kid)}else d=gb(c),e=null;var f=Mt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
800
+ function Pt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return St(this,b,null)};r.load=function(a){return"persistent-license"==this.l?St(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new se;Tt(this,b,a);return b};
801
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Mt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Rt(){this.size=0;this.g=void 0}r=Rt.prototype;r.forEach=function(a){this.g&&a(this.g,Zh.value())};r.get=function(a){if(this.has(a))return this.g};
802
+ r.has=function(a){var b=Zh.value();return this.g&&db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Ht="";Es(Gt);function Ut(){}function Vt(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Wt,Object.defineProperty(a,"disablePictureInPicture",{get:Xt,set:Yt,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Zt,document.addEventListener("webkitpresentationmodechanged",$t,!0))}}
803
+ function $t(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
804
+ function Wt(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Zt(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
805
+ function Xt(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Yt(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ds.PiPWebkit=Ut;Ut.install=Vt;Es(Vt);function au(){}function bu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=cu)}function cu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ds.StorageEstimate=au;au.install=bu;Es(bu);function du(){}function eu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ds.VideoPlayPromise=du;du.install=eu;Es(eu);function fu(){}function gu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=hu)}}function hu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ds.VideoPlaybackQuality=fu;fu.install=gu;Es(gu);function iu(){}function ju(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ku;else if(6==b)a=lu;else{try{var c=!!ku(1,2,"")}catch(d){c=!1}c&&(a=ku)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ku(a,b,c){return new window.TextTrackCue(a,b,c)}function lu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ds.VTTCue=iu;iu.install=ju;Es(ju);function mu(){}mu.prototype.parseInit=function(){};mu.prototype.parseMedia=function(a,b){var c=null,d=[],e=mb(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=nu.exec(f))){var g=ou.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new kc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",mu);mu.prototype.parseMedia=mu.prototype.parseMedia;
806
+ mu.prototype.parseInit=mu.prototype.parseInit;var nu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ou=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Je["application/x-subtitle-lrc"]=function(){return new mu};function pu(){}pu.prototype.parseInit=function(){};
807
+ pu.prototype.parseMedia=function(a,b){var c=mb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new O(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=yn(g,qu,"frameRate"),k=yn(g,qu,"subFrameRate"),l=yn(g,qu,"frameRateMultiplier"),
808
+ m=yn(g,qu,"tickRate"),n=yn(g,qu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=yn(g,ru,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new su(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?wn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),q=p.next();!q.done;q=
809
+ p.next()){var v=q.value;q=new mc;var x=v.getAttribute("xml:id");if(x){q.id=x;var w=null;e&&(w=tu.exec(e)||uu.exec(e));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,D;if(y=vu(v,l,"extent"))y=(D=tu.exec(y))||uu.exec(y),null!=y&&(q.width=Number(y[1]),q.height=Number(y[2]),D||(null!=x&&(q.width=100*q.width/x),null!=w&&(q.height=100*q.height/w)),q.widthUnits=D||null!=x?Cc:0,q.heightUnits=D||null!=w?Cc:0);if(v=vu(v,l,"origin"))y=(D=tu.exec(v))||uu.exec(v),null!=y&&(q.viewportAnchorX=Number(y[1]),q.viewportAnchorY=
810
+ Number(y[2]),D||(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=x&&(q.viewportAnchorX=100*q.viewportAnchorX/x)),q.viewportAnchorUnits=D||null!=x?Cc:0)}else q=null;q&&m.push(q)}if(tn(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=t(tn(f,"div"));for(p=e.next();!p.done;p=e.next())if(tn(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=wu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
811
+ function wu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(xu),x=v.next();!x.done&&!(q=yu(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
812
+ a=[];if(!x)for(var w=t(p.childNodes),y=w.next();!y.done;y=w.next())(y=wu(y.value,b,c,d,e,f,g,h,k,p,m))&&a.push(y);d=null!=l;w=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||w||"br"==p.tagName||0!=a.length||d&&!h))return null;y=zu(p,c);w=y.start;for(y=y.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)y=Au(n,c,w,y),w=y.start,y=y.end,n=n.parentNode;null==w&&(w=0);w+=b;y=null==y?Infinity:y+b;if(!D&&0<a.length)for(w=Infinity,y=0,b=t(a),
813
+ c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new kc(w,y,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new kc(w,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=yu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
814
+ (g=yu(l,"region",f,"")[0]);Bu(b,p,g,q,e,v,0==a.length);return b}
815
+ function Bu(a,b,c,d,e,f,g){f=f||g;"rtl"==Cu(b,c,e,"direction",f)&&(a.direction="rtl");g=Cu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=lc);(g=Cu(b,c,e,"textAlign",!0))?(a.positionAlign=Du[g],a.lineAlign=Eu[g],a.textAlign=wc[g.toUpperCase()]):a.textAlign=oc;if(g=Cu(b,c,e,"displayAlign",!0))a.displayAlign=xc[g.toUpperCase()];if(g=Cu(b,c,e,"color",f))a.color=g;if(g=Cu(b,c,e,"backgroundColor",
816
+ f))a.backgroundColor=g;if(g=Cu(b,c,e,"border",f))a.border=g;if(g=Cu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Cu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Cu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Cu(b,c,e,"lineHeight",f))&&g.match(Fu)&&(a.lineHeight=g);(g=Cu(b,c,e,"fontSize",f))&&(g.match(Fu)||g.match(Gu))&&(a.fontSize=g);if(g=Cu(b,c,e,"fontStyle",f))a.fontStyle=Bc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
817
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Cu(b,c,e,"letterSpacing",f))&&d.match(Fu)&&(a.letterSpacing=d);(d=Cu(b,c,e,"linePadding",f))&&d.match(Fu)&&(a.linePadding=d);if(f=Cu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=vu(c,e,"textDecoration"))&&Hu(a,c);(b=Iu(b,e,"textDecoration"))&&Hu(a,b)}
818
+ function Hu(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&hc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&hc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
819
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&hc(a.textDecoration,"overline")}}function Cu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Iu(a,c,d))?a:e?vu(b,c,d):null}function vu(a,b,c){if(!a)return null;var d=yn(a,ru,c);return d?d:Ju(a,b,c)}function Iu(a,b,c){var d=yn(a,ru,c);return d?d:Ju(a,b,c)}
820
+ function Ju(a,b,c){a=yu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=xn(a[e],"urn:ebu:tt:style",c);f||(f=yn(a[e],ru,c));f||(f=Iu(a[e],b,c));f&&(d=f)}return d}
821
+ function yu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?xn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Au(a,b,c,d){a=zu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
822
+ function zu(a,b){var c=Ku(a.getAttribute("begin"),b),d=Ku(a.getAttribute("end"),b),e=Ku(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
823
+ function Ku(a,b){var c=null;if(Lu.test(a)){c=Lu.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.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Mu.test(a))c=Nu(Mu,a);else if(Ou.test(a))c=Nu(Ou,a);else if(Pu.test(a))c=Pu.exec(a),c=Number(c[1])/b.frameRate;else if(Qu.test(a))c=Qu.exec(a),c=Number(c[1])/b.g;else if(Ru.test(a))c=Nu(Ru,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
824
+ function Nu(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)}N("shaka.text.TtmlTextParser",pu);pu.prototype.parseMedia=pu.prototype.parseMedia;pu.prototype.parseInit=pu.prototype.parseInit;function su(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
825
+ var tu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Gu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Fu=/^(\d+px|\d+em|\d*\.?\d+c)$/,uu=/^(\d+)px (\d+)px$/,Lu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Mu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Ou=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Pu=/^(\d*(?:\.\d*)?)f$/,Qu=/^(\d*(?:\.\d*)?)t$/,Ru=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Eu={left:rc,center:"center",right:"end",start:rc,
826
+ end:"end"},Du={left:"line-left",center:"center",right:"line-right"},qu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ru=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],xu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Je["application/ttml+xml"]=function(){return new pu};function Su(){this.g=new pu}Su.prototype.parseInit=function(a){var b=!1;(new vb).box("moov",zb).box("trak",zb).box("mdia",zb).box("minf",zb).box("stbl",zb).P("stsd",Bb).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Su.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vb).box("mdat",Cb(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",Su);Su.prototype.parseMedia=Su.prototype.parseMedia;
827
+ Su.prototype.parseInit=Su.prototype.parseInit;Je['application/mp4; codecs="stpp"']=function(){return new Su};Je['application/mp4; codecs="stpp.ttml"']=function(){return new Su};Je['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Su};Je['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Su};function Tu(){}Tu.prototype.parseInit=function(){};
828
+ Tu.prototype.parseMedia=function(a,b){var c=mb(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Uu(new Lp(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
829
+ [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Lp(g);var h=new mc;Op(g);Mp(g);for(var k=Op(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
830
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Mp(g);k=Op(g)}f.push(h)}e=new Map;Vu(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new kc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
831
+ /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=uc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
832
+ !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Lp(h[0]);m=Uu(k);q=Np(k,/[ \t]+--\x3e[ \t]+/g);n=Uu(k);if(null==m||null==q||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
833
+ ""):h=new kc(m,n,"");Wu(p,h,e);Mp(k);for(m=Op(k);m;)Xu(h,m,f),Mp(k),m=Op(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Vu(a){for(var b=t(Object.entries(zc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new kc(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Ac));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new kc(0,0,""),e.backgroundColor=d,a.set(c,e)}
834
+ function Wu(a,b,c){0===c.size&&Vu(c);a=Yu(a);var d=Kn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Zu(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
835
+ function Yu(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function $u(a,b){return a&&0<a.length?a:b}
836
+ function Zu(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=$u(h.backgroundColor,e.backgroundColor),e.color=$u(h.color,e.color),e.fontFamily=$u(h.fontFamily,e.fontFamily),e.fontSize=$u(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
837
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(An(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Zu(a.value,e,c,d)}
838
+ function Xu(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=oc:a.textAlign=wc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
839
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=av(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=qc,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()])}function av(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
840
+ function Uu(a){a=Np(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,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)}N("shaka.text.VttTextParser",Tu);Tu.prototype.parseMedia=Tu.prototype.parseMedia;Tu.prototype.parseInit=Tu.prototype.parseInit;Je["text/vtt"]=function(){return new Tu};Je['text/vtt; codecs="vtt"']=function(){return new Tu};Je['text/vtt; codecs="wvtt"']=function(){return new Tu};function bv(){this.g=null}bv.prototype.parseInit=function(a){var b=this,c=!1;(new vb).box("moov",zb).box("trak",zb).box("mdia",zb).P("mdhd",function(d){d=Nd(d.reader,d.version);b.g=d.timescale}).box("minf",zb).box("stbl",zb).P("stsd",Bb).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
841
+ bv.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vb).box("moof",zb).box("traf",zb).P("tfdt",function(A){g=!0;c=Md(A.reader,A.version).Wc}).P("tfhd",function(A){l=Ld(A.reader,A.flags).Nd}).P("trun",function(A){h=!0;d=Od(A.reader,A.version,A.flags).ce}).box("mdat",Cb(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new sb(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.vd||l,x=q.Fc?
842
+ c+q.Fc:m;m=x+(v||0);var w=0;do{var y=n.L();w+=y;var D=n.L(),B=null;"vttc"==Db(D)?8<y&&(B=n.Wa(y-8)):n.skip(y-8);v&&B&&(y=cv(B,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Lc)};function cv(a,b,c){var d,e,f;(new vb).box("payl",Cb(function(g){d=mb(g)})).box("iden",Cb(function(g){e=mb(g)})).box("sttg",Cb(function(g){f=mb(g)})).parse(a);return d?dv(d,e,f,b,c):null}
843
+ function dv(a,b,c,d,e){d=new kc(d,e,"");Wu(a,d,new Map);b&&(d.id=b);if(c)for(a=new Lp(c),b=Op(a);b;)Xu(d,b,[]),Mp(a),b=Op(a);return d}N("shaka.text.Mp4VttParser",bv);bv.prototype.parseMedia=bv.prototype.parseMedia;bv.prototype.parseInit=bv.prototype.parseInit;Je['application/mp4; codecs="wvtt"']=function(){return new bv};function ev(){}ev.prototype.parseInit=function(){};ev.prototype.parseMedia=function(a){var b=mb(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Lp(c[0]),e=fv(d),f=Np(d,/,/g);d=fv(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new kc(e,d,c.slice(1).join("\n").trim()))}return a};
844
+ function fv(a){a=Np(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,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)}N("shaka.text.SbvTextParser",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;ev.prototype.parseInit=ev.prototype.parseInit;Je["text/x-subviewer"]=function(){return new ev};function gv(){this.g=new Tu}gv.prototype.parseInit=function(){};gv.prototype.parseMedia=function(a,b){var c=mb(a);c=hv(c);c=gb(qb(c));return this.g.parseMedia(c,b)};function hv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}N("shaka.text.SrtTextParser",gv);gv.srt2webvtt=hv;gv.prototype.parseMedia=gv.prototype.parseMedia;
845
+ gv.prototype.parseInit=gv.prototype.parseInit;Je["text/srt"]=function(){return new gv};function iv(){}iv.prototype.parseInit=function(){};
846
+ iv.prototype.parseMedia=function(a){var b="",c="";a=mb(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=jv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=kv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(lv);else if("Style"==e){e=f.split(lv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
847
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Uc:e.Uc},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=kv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(lv);else if("Dialogue"==f){g=g.split(lv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=mv(f.Start);var k=mv(f.End);g=new kc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Uc=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Uc}}(e)))&&nv(g,f);d.push(g)}return d};
848
+ function nv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ov(c))a.color=c;if(c=b.BackColour)if(c=ov(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=sc;a.textAlign="start";break;case 2:a.displayAlign=sc;a.textAlign=oc;break;case 3:a.displayAlign=sc;a.textAlign="end";
849
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=oc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=oc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
850
+ function ov(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function mv(a){a=pv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",iv);iv.prototype.parseMedia=iv.prototype.parseMedia;iv.prototype.parseInit=iv.prototype.parseInit;var jv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,kv=/^\s*([^:]+):\s*(.*)/,lv=/\s*,\s*/,pv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
851
+ Je["text/x-ssa"]=function(){return new iv};/*
856
852
  @license
857
853
  EME Encryption Scheme Polyfill
858
854
  Copyright 2019 Google LLC
859
855
  SPDX-License-Identifier: Apache-2.0
860
856
  */
861
- function pv(){}var qv;function rv(){qv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(qv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=sv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
862
- function sv(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),v(e,qv.call(c,a,b),2);d=e.h;if(tv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=qv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=uv;return e["return"](uv.call(c,
857
+ function qv(){}var rv;function sv(){rv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(rv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=tv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
858
+ function tv(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,rv.call(c,a,b),2);d=e.h;if(uv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=rv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=vv;return e["return"](vv.call(c,
863
859
  a,b))})}
864
- function uv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=vv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=wv(h.videoCapabilities,d),l=wv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
865
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return v(r,qv.call(c,a,e),2)}p=r.h;return r["return"](new xv(p,d))})}function wv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",pv);pv.install=rv;function yv(){}var zv;
866
- function Av(){zv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(zv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Bv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
867
- function Bv(a){var b=this,c,d;return L(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),v(e,zv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&tv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=zv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
868
- navigator.mediaCapabilities.decodingInfo=Cv;return e["return"](Cv.call(b,a))})}
869
- function Cv(a){var b=this,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=vv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):v(n,zv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
870
- new xv(k.keySystemAccess,c);n.v(3);break}if(!a.keySystemConfiguration){n.v(3);break}var p=a.keySystemConfiguration,r=[],u=[];p.audio&&r.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&u.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(p.audioCapabilities=r);u.length&&(p.videoCapabilities=
871
- u);l=p;m=k;return v(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",yv);yv.install=Av;function xv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
872
- xv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};xv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
873
- function vv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function tv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Dv(){}
874
- function Ks(){rv();Av()}M("EncryptionSchemePolyfills",Dv);Dv.install=Ks;"undefined"!==typeof module&&module.exports&&(module.exports=Dv);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
860
+ function vv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=wv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=xv(h.videoCapabilities,d),l=xv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
861
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,rv.call(c,a,e),2)}p=q.h;return q["return"](new yv(p,d))})}function xv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",qv);qv.install=sv;function zv(){}var Av;
862
+ function Bv(){Av?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Av=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Cv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
863
+ function Cv(a){var b=this,c,d;return L(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Av.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&uv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Av,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
864
+ navigator.mediaCapabilities.decodingInfo=Dv;return e["return"](Dv.call(b,a))})}
865
+ function Dv(a){var b=this,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=wv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Av.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
866
+ new yv(k.keySystemAccess,c);n.A(3);break}if(!a.keySystemConfiguration){n.A(3);break}var p=a.keySystemConfiguration,q=[],v=[];p.audio&&q.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(p.audioCapabilities=q);v.length&&(p.videoCapabilities=
867
+ v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}N("McEncryptionSchemePolyfill",zv);zv.install=Bv;function yv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
868
+ yv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};yv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
869
+ function wv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function uv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Ev(){}
870
+ function Is(){sv();Bv()}N("EncryptionSchemePolyfills",Ev);Ev.install=Is;"undefined"!==typeof module&&module.exports&&(module.exports=Ev);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
875
871
 
876
872
  //# sourceMappingURL=shaka-player.compiled.map