shaka-player 3.3.2 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/.csslintrc +11 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  3. package/.github/pull_request_template.md +6 -34
  4. package/.github/workflows/build-and-test.yaml +129 -0
  5. package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
  6. package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
  7. package/.github/workflows/demo-version-index.yaml +29 -0
  8. package/.github/workflows/nightly-demo.yaml +42 -0
  9. package/.github/workflows/release-please.yaml +147 -0
  10. package/.github/workflows/safari-homedir-launcher.sh +18 -0
  11. package/.github/workflows/selenium-lab-tests.yaml +92 -0
  12. package/AUTHORS +2 -0
  13. package/CHANGELOG.md +1718 -1675
  14. package/CONTRIBUTING.md +2 -2
  15. package/CONTRIBUTORS +2 -0
  16. package/README.md +7 -7
  17. package/app-engine/README.md +9 -0
  18. package/app-engine/demo-version-index/README.md +14 -0
  19. package/app-engine/demo-version-index/app.yaml +2 -0
  20. package/app-engine/demo-version-index/main.py +162 -0
  21. package/app-engine/demo-version-index/requirements.txt +6 -0
  22. package/app-engine/demo-version-index/templates/index.html +114 -0
  23. package/app-engine/shaka-player-demo/README.md +18 -0
  24. package/app-engine/shaka-player-demo/app.yaml +61 -0
  25. package/app-engine/shaka-player-demo/main.py +95 -0
  26. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  27. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  28. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  29. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  30. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  31. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  32. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  33. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  34. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  35. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  36. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  37. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  38. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  39. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  40. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  41. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  42. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  43. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  44. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  45. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  46. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  47. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  48. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  49. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  50. package/app-engine/shaka-player-demo/posters/sources.txt +46 -0
  51. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  52. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  53. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  54. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  55. package/app-engine/shaka-player-demo/posters.py +110 -0
  56. package/app-engine/shaka-player-demo/requirements.txt +5 -0
  57. package/app-engine/shaka-player-demo/time.txt +1 -0
  58. package/build/README.md +3 -3
  59. package/build/checkversion.py +2 -2
  60. package/build/conformance.textproto +13 -0
  61. package/build/docker/Dockerfile +20 -0
  62. package/build/docker/docker-compose.yml +10 -0
  63. package/build/gendeps.py +18 -15
  64. package/build/shaka-lab.yaml +163 -0
  65. package/build/shakaBuildHelpers.py +4 -29
  66. package/build/test.py +94 -29
  67. package/build/types/core +0 -1
  68. package/build/types/polyfill +1 -0
  69. package/build/wrapper.template.js +2 -2
  70. package/demo/TengwarTelcontar.woff2 +0 -0
  71. package/demo/asset_card.js +1 -2
  72. package/demo/cast_receiver/index.html +1 -1
  73. package/demo/cast_receiver/receiver_app.css +14 -14
  74. package/demo/common/assets.js +2 -0
  75. package/demo/config.js +0 -1
  76. package/demo/custom.js +0 -1
  77. package/demo/customWarning.txt +2 -2
  78. package/demo/demo.less +29 -18
  79. package/demo/demo_uncompiled.js +1 -13
  80. package/demo/index.html +1 -1
  81. package/demo/main.js +3 -3
  82. package/dist/controls.css +3 -3
  83. package/dist/controls.css.map +1 -1
  84. package/dist/demo.compiled.debug.js +191 -194
  85. package/dist/demo.compiled.debug.map +4 -4
  86. package/dist/demo.compiled.js +191 -194
  87. package/dist/demo.compiled.map +4 -4
  88. package/dist/demo.css +1 -1
  89. package/dist/demo.css.map +1 -1
  90. package/dist/deps.js +232 -226
  91. package/dist/locales.js +30 -30
  92. package/dist/receiver.compiled.debug.js +43 -45
  93. package/dist/receiver.compiled.debug.map +4 -4
  94. package/dist/receiver.compiled.js +43 -45
  95. package/dist/receiver.compiled.map +4 -4
  96. package/dist/shaka-player.compiled.d.ts +247 -236
  97. package/dist/shaka-player.compiled.debug.d.ts +247 -236
  98. package/dist/shaka-player.compiled.debug.externs.js +15 -3
  99. package/dist/shaka-player.compiled.debug.js +284 -290
  100. package/dist/shaka-player.compiled.debug.map +4 -4
  101. package/dist/shaka-player.compiled.externs.js +15 -3
  102. package/dist/shaka-player.compiled.js +855 -859
  103. package/dist/shaka-player.compiled.map +4 -4
  104. package/dist/shaka-player.ui.d.ts +291 -280
  105. package/dist/shaka-player.ui.debug.d.ts +291 -280
  106. package/dist/shaka-player.ui.debug.externs.js +15 -3
  107. package/dist/shaka-player.ui.debug.js +296 -302
  108. package/dist/shaka-player.ui.debug.map +4 -4
  109. package/dist/shaka-player.ui.externs.js +15 -3
  110. package/dist/shaka-player.ui.js +1005 -1009
  111. package/dist/shaka-player.ui.map +4 -4
  112. package/docs/design/REDESIGN.md +33 -33
  113. package/docs/design/bg-fetch.md +2 -2
  114. package/docs/design/codec_preferences.md +1 -1
  115. package/docs/design/dash-audio-channels.md +3 -3
  116. package/docs/design/dash-manifests.md +1 -1
  117. package/docs/design/gap-jumping.md +3 -3
  118. package/docs/design/preload.md +2 -2
  119. package/docs/tutorials/faq.md +8 -8
  120. package/docs/tutorials/index.json +1 -0
  121. package/docs/tutorials/plugins.md +3 -3
  122. package/docs/tutorials/selenium-grid-config.md +122 -0
  123. package/docs/tutorials/welcome.md +10 -2
  124. package/externs/cmcd.js +1 -1
  125. package/karma.conf.js +141 -30
  126. package/lib/abr/simple_abr_manager.js +12 -6
  127. package/lib/cast/cast_proxy.js +3 -4
  128. package/lib/cea/cea608_data_channel.js +2 -2
  129. package/lib/cea/cea708_service.js +5 -4
  130. package/lib/cea/mp4_cea_parser.js +11 -5
  131. package/lib/cea/sei_processor.js +6 -3
  132. package/lib/dash/dash_parser.js +11 -14
  133. package/lib/dash/mpd_utils.js +4 -5
  134. package/lib/dash/segment_list.js +1 -2
  135. package/lib/dash/segment_template.js +3 -3
  136. package/lib/hls/hls_parser.js +34 -20
  137. package/lib/hls/manifest_text_parser.js +3 -3
  138. package/lib/media/adaptation_set.js +1 -2
  139. package/lib/media/content_workarounds.js +2 -2
  140. package/lib/media/drm_engine.js +3 -2
  141. package/lib/media/media_source_engine.js +10 -3
  142. package/lib/media/mp4_segment_index_parser.js +1 -4
  143. package/lib/media/playhead.js +2 -2
  144. package/lib/media/presentation_timeline.js +18 -8
  145. package/lib/media/streaming_engine.js +6 -6
  146. package/lib/media/time_ranges_utils.js +1 -3
  147. package/lib/media/video_wrapper.js +1 -1
  148. package/lib/net/networking_engine.js +1 -1
  149. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  150. package/lib/offline/storage.js +96 -95
  151. package/lib/player.js +190 -114
  152. package/lib/polyfill/all.js +2 -3
  153. package/lib/polyfill/encryption_scheme.js +1 -1
  154. package/lib/polyfill/media_capabilities.js +3 -3
  155. package/lib/polyfill/mediasource.js +1 -1
  156. package/lib/polyfill/symbol.js +46 -0
  157. package/lib/text/cue.js +1 -1
  158. package/lib/text/simple_text_displayer.js +2 -1
  159. package/lib/text/ttml_text_parser.js +8 -5
  160. package/lib/text/ui_text_displayer.js +1 -1
  161. package/lib/util/buffer_utils.js +1 -3
  162. package/lib/util/config_utils.js +25 -0
  163. package/lib/util/ebml_parser.js +3 -3
  164. package/lib/util/error.js +8 -1
  165. package/lib/util/iterables.js +0 -46
  166. package/lib/util/manifest_parser_utils.js +1 -1
  167. package/lib/util/mime_utils.js +48 -1
  168. package/lib/util/mp4_box_parsers.js +1 -4
  169. package/lib/util/mp4_parser.js +5 -7
  170. package/lib/util/periods.js +15 -15
  171. package/lib/util/platform.js +3 -3
  172. package/lib/util/player_configuration.js +9 -14
  173. package/lib/util/pssh.js +1 -4
  174. package/lib/util/stream_utils.js +8 -5
  175. package/lib/util/string_utils.js +3 -5
  176. package/lib/util/uint8array_utils.js +3 -5
  177. package/lib/util/xml_utils.js +15 -7
  178. package/package.json +61 -36
  179. package/roadmap.md +17 -17
  180. package/shaka-player.uncompiled.js +1 -0
  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 +1 -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 +2 -15
  197. package/test/dash/dash_parser_manifest_unit.js +2 -40
  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 +28 -14
  206. package/test/hls/hls_parser_unit.js +2 -15
  207. package/test/hls/manifest_text_parser_unit.js +19 -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 +2 -15
  213. package/test/media/drm_engine_unit.js +4 -24
  214. package/test/media/manifest_parser_unit.js +0 -4
  215. package/test/media/media_source_engine_integration.js +1 -7
  216. package/test/media/media_source_engine_unit.js +5 -18
  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/quality_observer_unit.js +0 -4
  222. package/test/media/region_observer_unit.js +1 -6
  223. package/test/media/region_timeline_unit.js +0 -3
  224. package/test/media/segment_index_unit.js +0 -6
  225. package/test/media/segment_reference_unit.js +0 -3
  226. package/test/media/stall_detector_unit.js +0 -5
  227. package/test/media/streaming_engine_integration.js +11 -36
  228. package/test/media/streaming_engine_unit.js +11 -35
  229. package/test/media/time_ranges_utils_unit.js +0 -2
  230. package/test/media/transmuxer_integration.js +0 -6
  231. package/test/media/webm_segment_index_parser_unit.js +0 -4
  232. package/test/net/data_uri_plugin_unit.js +0 -7
  233. package/test/net/http_plugin_unit.js +0 -9
  234. package/test/net/networking_engine_unit.js +0 -11
  235. package/test/offline/download_progress_estimator_unit.js +0 -2
  236. package/test/offline/indexeddb_storage_unit.js +1 -7
  237. package/test/offline/manifest_convert_unit.js +0 -8
  238. package/test/offline/offline_integration.js +1 -10
  239. package/test/offline/offline_manifest_parser_unit.js +0 -6
  240. package/test/offline/offline_scheme_unit.js +0 -8
  241. package/test/offline/offline_uri_unit.js +0 -2
  242. package/test/offline/storage_compatibility_unit.js +2 -15
  243. package/test/offline/storage_integration.js +1 -27
  244. package/test/player_external.js +9 -11
  245. package/test/player_integration.js +28 -38
  246. package/test/player_load_graph_integration.js +1 -6
  247. package/test/player_src_equals_external.js +3 -9
  248. package/test/player_src_equals_integration.js +81 -90
  249. package/test/player_unit.js +150 -38
  250. package/test/routing/walker_unit.js +0 -8
  251. package/test/test/assets/large_file.mpd +1 -1
  252. package/test/test/boot.js +84 -22
  253. package/test/test/externs/filters.js +4 -0
  254. package/test/test/externs/jasmine.js +2 -2
  255. package/test/test/externs/karma.js +4 -0
  256. package/test/test/namespace.js +10 -0
  257. package/test/test/util/canned_idb.js +0 -8
  258. package/test/test/util/cea_utils.js +0 -6
  259. package/test/test/util/dash_parser_util.js +0 -13
  260. package/test/test/util/fake_ad.js +0 -3
  261. package/test/test/util/fake_ad_manager.js +0 -9
  262. package/test/test/util/fake_demo_main.js +0 -5
  263. package/test/test/util/fake_drm_engine.js +0 -6
  264. package/test/test/util/fake_media_source_engine.js +0 -7
  265. package/test/test/util/fake_networking_engine.js +0 -5
  266. package/test/test/util/fake_text_displayer.js +0 -5
  267. package/test/test/util/indexeddb_utils.js +1 -10
  268. package/test/test/util/jasmine_fetch.js +0 -1
  269. package/test/test/util/loader.js +0 -18
  270. package/test/test/util/manifest_generator.js +9 -14
  271. package/test/test/util/manifest_parser_util.js +0 -6
  272. package/test/test/util/offline_utils.js +0 -5
  273. package/test/test/util/simple_fakes.js +40 -28
  274. package/test/test/util/stream_generator.js +0 -14
  275. package/test/test/util/streaming_engine_util.js +0 -15
  276. package/test/test/util/test_scheme.js +1 -19
  277. package/test/test/util/ttml_utils.js +0 -2
  278. package/test/test/util/ui_utils.js +0 -9
  279. package/test/test/util/util.js +5 -19
  280. package/test/test/util/waiter.js +84 -43
  281. package/test/text/cue_integration.js +0 -4
  282. package/test/text/lrc_text_parser_unit.js +0 -4
  283. package/test/text/mp4_ttml_parser_unit.js +0 -6
  284. package/test/text/mp4_vtt_parser_unit.js +1 -7
  285. package/test/text/sbv_text_parser_unit.js +0 -4
  286. package/test/text/simple_text_displayer_unit.js +1 -8
  287. package/test/text/srt_text_parser_unit.js +0 -4
  288. package/test/text/ssa_text_parser_unit.js +0 -5
  289. package/test/text/text_engine_unit.js +2 -7
  290. package/test/text/text_track_integration.js +0 -2
  291. package/test/text/ttml_text_parser_unit.js +2 -11
  292. package/test/text/ui_text_displayer_unit.js +44 -41
  293. package/test/text/vtt_text_parser_unit.js +0 -9
  294. package/test/text/web_vtt_generator_unit.js +0 -3
  295. package/test/ui/ad_ui_unit.js +0 -11
  296. package/test/ui/localization_unit.js +0 -3
  297. package/test/ui/text_displayer_layout_unit.js +1 -12
  298. package/test/ui/ui_customization_unit.js +0 -6
  299. package/test/ui/ui_integration.js +0 -16
  300. package/test/ui/ui_unit.js +1 -17
  301. package/test/util/abortable_operation_unit.js +4 -9
  302. package/test/util/array_utils_unit.js +0 -2
  303. package/test/util/buffer_utils_unit.js +0 -2
  304. package/test/util/cmcd_manager_unit.js +0 -3
  305. package/test/util/data_view_reader_unit.js +0 -4
  306. package/test/util/ebml_parser_unit.js +0 -4
  307. package/test/util/event_manager_unit.js +0 -3
  308. package/test/util/fake_event_target_unit.js +0 -5
  309. package/test/util/functional_unit.js +1 -1
  310. package/test/util/iterables_unit.js +0 -64
  311. package/test/util/language_utils_unit.js +0 -3
  312. package/test/util/manifest_parser_utils_unit.js +0 -2
  313. package/test/util/mime_utils_unit.js +54 -0
  314. package/test/util/mp4_box_parsers_unit.js +0 -5
  315. package/test/util/mp4_parser_unit.js +0 -4
  316. package/test/util/multi_map_unit.js +0 -3
  317. package/test/util/object_utils_unit.js +0 -2
  318. package/test/util/periods_unit.js +93 -7
  319. package/test/util/pssh_unit.js +0 -5
  320. package/test/util/state_history_unit.js +0 -2
  321. package/test/util/stream_utils_unit.js +3 -8
  322. package/test/util/string_utils_unit.js +0 -6
  323. package/test/util/text_parser_unit.js +0 -2
  324. package/test/util/xml_utils_unit.js +0 -4
  325. package/ui/less/ad_controls.less +6 -6
  326. package/ui/less/buttons.less +6 -6
  327. package/ui/less/containers.less +13 -15
  328. package/ui/less/overflow_menu.less +4 -4
  329. package/ui/less/range_elements.less +7 -2
  330. package/ui/less/tooltip.less +4 -4
  331. package/ui/locales/sjn-translations.yaml +257 -0
  332. package/ui/locales/sjn.json +42 -0
  333. package/ui/seek_bar.js +2 -1
  334. package/.github/workflows/build_and_test.yaml +0 -73
  335. package/.github/workflows/release.yaml +0 -53
  336. package/docs/tutorials/gsoc-ideas-list.md +0 -3
  337. package/externs/svgelement.js +0 -18
  338. package/externs/webcrypto.js +0 -18
  339. package/lib/util/mutex.js +0 -52
@@ -9,904 +9,900 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- var q;function ba(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 ea(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 fa=ea(this);function ha(a,b){if(b)a:{for(var c=fa,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
- ha("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
- ha("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=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ja(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="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=ka(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.Zg=b.prototype}function sa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.o=0;this.F=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={me:b,se:!0};a.g=a.o||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}sa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function va(a){a.o=0;a.j=2}function wa(a,b){a.g=b;a.o=0}function E(a){a.o=0;var b=a.i.me;a.i=null;return b}function xa(a){a.F=[a.i];a.o=0;a.j=0}
20
- function ya(a,b){var c=a.F.splice(0)[0];(c=a.i=a.i||c)?c.se?a.g=a.o||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 Aa(a){this.g=new sa;this.h=a}function Ba(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 Ea(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),Ea(a)}a.g.l=null;d.call(a.g,f);return Ea(a)}
22
- function Ea(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.se)throw b.me;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ga(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=Ea(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=Ea(a));return b};this["return"]=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ha(a,b){var c=new Ga(new Aa(b));qa&&a.prototype&&qa(c,a.prototype);return c}
24
- function Ja(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 Ja(new Ga(new Aa(a)))}
25
- ha("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=fa.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.J),reject:g(this.l)}};b.prototype.J=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.P(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.I(g):this.o(g)}};
27
- b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.S(h,g):this.o(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.o=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.M();this.F()};b.prototype.M=function(){var g=this;e(function(){if(g.G()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.G=
28
- function(){if(this.s)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.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=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.F=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.P=function(g){var h=this.j();g.Ic(h.resolve,h.reject)};b.prototype.S=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,t){return"function"==typeof p?function(v){try{l(p(v))}catch(w){m(w)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Ic(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Ic=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=r(g),m=l.next();!m.done;m=l.next())d(m.value).Ic(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(w){p[v]=w;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Ic(n(p.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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(!Ka(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(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
- Ka(k,g)&&Ka(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ha("Map",function(a){function b(){var h={};return h.Ya=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Ya;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&&Ka(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,ka:p}}return{id:l,
36
- list:m,index:-1,ka:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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.ka?l.ka.value=k:(l.ka={next:this.g,Ya:this.g.Ya,head:this.g,key:h,value:k},l.list.push(l.ka),this.g.Ya.next=l.ka,this.g.Ya=l.ka,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ka&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ka.Ya.next=h.ka.next,h.ka.next.Ya=h.ka.Ya,
38
- h.ka.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ya=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ka};e.prototype.get=function(h){return(h=d(this,h).ka)&&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 ca(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var da="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 ea(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 fa=ea(this);function ha(a,b){if(b)a:{for(var c=fa,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&&da(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ ha("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;da(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
+ ha("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=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(this))}})}return a});function ia(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:ca(a)}}function ja(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 ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
+ if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
18
+ function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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.Mg=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
+ function ta(a,b){a.i={ee:b,le:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=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 ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.ee;a.i=null;return b}function wa(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.le?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
+ function Ba(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,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
+ function Ca(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,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.le)throw b.ee;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
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)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
+ ha("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=fa.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.D(g):this.m(g)}};
27
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(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.C()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
28
+ function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.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=fa.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.wc(h.resolve,h.reject)};b.prototype.L=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(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.wc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.wc=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).wc(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(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).wc(n(p.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ ha("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(!Ja(k,g)){var l=new c;da(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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Ja(k,g)&&Ja(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ ha("Map",function(a){function b(){var h={};return h.Ra=h.next=h.head=h}function c(h,k){var l=h.g;return ia(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&&Ja(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,ha:p}}return{id:l,
36
+ list:m,index:-1,ha: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.ha?l.ha.value=k:(l.ha={next:this.g,Ra:this.g.Ra,head:this.g,key:h,value:k},l.list.push(l.ha),this.g.Ra.next=l.ha,this.g.Ra=l.ha,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ha&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ha.Ra.next=h.ha.next,h.ha.next.Ra=h.ha.Ra,
38
+ h.ha.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).ha};e.prototype.get=function(h){return(h=d(this,h).ha)&&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
- ha("Set",function(a){function b(c){this.g=new Map;if(c){c=r(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(r([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
+ ha("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});function La(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,v:f}}return{ga:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).ga}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
- ha("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}});function Ma(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+""}
44
- ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(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}});
45
- function Na(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Na(this,function(b){return b})}});var Oa="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)Ka(d,e)&&(a[e]=d[e])}return a};
46
- ha("Object.assign",function(a){return a||Oa});ha("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}});ha("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
47
- ha("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;})})}});ha("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});
48
- ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(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}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
- ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;function M(a,b){var c=a.split("."),d=Pa;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});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{je:e,v:f}}return{je:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).je}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ ha("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}});function La(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+""}
44
+ ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(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}});
45
+ function Ma(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="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)Ja(d,e)&&(a[e]=d[e])}return a};
46
+ ha("Object.assign",function(a){return a||Na});ha("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}});ha("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
47
+ ha("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;})})}});ha("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
48
+ ha("String.prototype.repeat",function(a){return a?a:function(b){var c=La(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}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
+ ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;function M(a,b){var c=a.split("."),d=Oa;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};/*
50
50
  @license
51
51
  Shaka Player
52
52
  Copyright 2016 Google LLC
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
- function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}function Ra(a,b,c){var d=Math.pow(a.g,b);c=c*(1-d)+d*a.h;isNaN(c)||(a.h=c,a.i+=b)}function Sa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ta(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Ta.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ta.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Sa(this.h),Sa(this.j))};function Ua(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Xa.apply(Ua,ja(c)))}function ab(){}function bb(){}function cb(){}function db(){}var Za=new Set;
56
- if(window.console&&window.console.log.bind){var eb={},gb=(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);Xa=gb[2];Wa=gb[1]};function hb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function ib(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
57
- var kb=function jb(a){var c;return Ha(jb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?u(d,c,3):d.A(0);c++;return d.A(2)})},mb=function lb(a){var c,d,e,f,g,h;return Ha(lb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.A(0):u(k,{ga:c,Sf:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{ga:c,item:e,Sf:d,next:h},5):k.A(5)}c++;d=e;e=h;g=f.next();return k.A(2)})};function nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ob(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function pb(a,b,c){c||(c=nb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={ed:d.ed},e=a.next()){d.ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
58
- function qb(a,b,c){c||(c=nb);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 rb(a,b,c){this.startTime=a;this.direction=sb;this.endTime=b;this.payload=c;this.region=new tb;this.position=null;this.positionAlign=ub;this.size=0;this.textAlign=vb;this.writingMode=wb;this.lineInterpretation=xb;this.line=null;this.lineHeight="";this.lineAlign=yb;this.displayAlign=zb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ab;this.fontStyle=Bb;this.linePadding=this.letterSpacing=this.fontFamily=
59
- "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}rb.prototype.clone=function(){var a=new rb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
60
- function Cb(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(!qb(a.nestedCues,b.nestedCues,Cb))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(!qb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",rb);var ub="auto";
61
- rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ub};var vb="center",Db={LEFT:"left",RIGHT:"right",CENTER:vb,START:"start",END:"end"};rb.textAlign=Db;var zb="after",Eb={BEFORE:"before",CENTER:"center",AFTER:zb};rb.displayAlign=Eb;var sb="ltr";rb.direction={HORIZONTAL_LEFT_TO_RIGHT:sb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var wb="horizontal-tb";rb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:wb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var xb=0;
62
- rb.lineInterpretation={LINE_NUMBER:xb,PERCENTAGE:1};var yb="start",Fb={CENTER:"center",START:yb,END:"end"};rb.lineAlign=Fb;var Gb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};rb.defaultTextColor=Gb;var Hb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};rb.defaultTextBackgroundColor=Hb;var Ab=400;rb.fontWeight={NORMAL:Ab,BOLD:700};
63
- var Bb="normal",Ib={NORMAL:Bb,ITALIC:"italic",OBLIQUE:"oblique"};rb.fontStyle=Ib;rb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function tb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Jb;this.scroll=Kb}M("shaka.text.CueRegion",tb);var Jb=1;tb.units={PX:0,PERCENTAGE:Jb,LINES:2};var Kb="";tb.scrollMode={NONE:Kb,UP:"up"};function Lb(){}function Mb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Nb(a)==Nb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ob(a),d=Ob(b),e=r(kb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function Nb(a){return a instanceof ArrayBuffer?a:a.buffer}function Pb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
64
- function Ob(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,Uint8Array)}function Rb(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,DataView)}function Qb(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(Nb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Lb);Lb.toDataView=Rb;Lb.toUint8=Ob;Lb.toArrayBuffer=Pb;Lb.equal=Mb;function Sb(a,b){this.g=a;this.h=b}Sb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Tb(a,b){var c=new Sb(4,0),d=Ub,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Vb(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Wb(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ub=null;function Xb(a,b){return a.concat(b)}function Yb(){}function Zb(a){return null!=a}function $b(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Tb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Tb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function ac(){}M("shaka.dependencies",ac);ac.has=function(a){return bc.has(a)};ac.add=function(a,b){if(!cc[a])throw Error(a+" is not supported");bc.set(a,function(){return b})};var cc={muxjs:"muxjs"};ac.Allowed=cc;var bc=new Map([["muxjs",function(){return window.muxjs}]]);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};
55
+ function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ra(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Ra.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ra.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Ra.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Sa(){}function Ta(){}function Ua(){}function Va(a){var b=Ha.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Sa,ja(b)))}function Xa(){}function Za(){}function $a(){}function ab(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},db=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=db[2];Ta=db[1]};function eb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function fb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function gb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Zc:d.Zc},e=a.next()){d.Zc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Zc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
+ function hb(a,b,c){c||(c=eb);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 ib(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=this.fontFamily=
57
+ "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ib.prototype.clone=function(){var a=new ib(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
+ function tb(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(!hb(a.nestedCues,b.nestedCues,tb))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(!hb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",ib);var lb="auto";
59
+ ib.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lb};var mb="center",ub={LEFT:"left",RIGHT:"right",CENTER:mb,START:"start",END:"end"};ib.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};ib.displayAlign=vb;var jb="ltr";ib.direction={HORIZONTAL_LEFT_TO_RIGHT:jb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nb="horizontal-tb";ib.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
60
+ ib.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};ib.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ib.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ib.defaultTextBackgroundColor=yb;var rb=400;ib.fontWeight={NORMAL:rb,BOLD:700};
61
+ var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};ib.fontStyle=zb;ib.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}M("shaka.text.CueRegion",kb);var Ab=1;kb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";kb.scrollMode={NONE:Bb,UP:"up"};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=Fb(a),d=Fb(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 Gb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
+ function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(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)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(a,b){this.g=a;this.h=b}Jb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Kb(a,b){var c=new Jb(4,0),d=Lb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Mb(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Nb(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Lb=null;function Ob(a,b){return a.concat(b)}function Qb(){}function Rb(a){return null!=a}function Sb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Kb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Kb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Tb(){}M("shaka.dependencies",Tb);Tb.has=function(a){return Ub.has(a)};Tb.add=function(a,b){if(!Vb[a])throw Error(a+" is not supported");Ub.set(a,function(){return b})};var Vb={muxjs:"muxjs"};Tb.Allowed=Vb;var Ub=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;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};
65
63
  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,
66
- 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,
67
- 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,
68
- 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,
69
- 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,
70
- 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,SERVER_CERTIFICATE_REQUEST_FAILED:6017,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,
71
- STORAGE_NOT_SUPPORTED:9E3,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,MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,
72
- CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
64
+ TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,
65
+ WEBM_CUE_TIME_ELEMENT_MISSING:3013,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,
66
+ DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,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,
67
+ CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,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,
68
+ FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,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,
69
+ CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,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,MODIFY_OPERATION_NOT_SUPPORTED:9016,
70
+ 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};/*
73
71
  @license
74
72
  Copyright 2008 The Closure Library Authors
75
73
  SPDX-License-Identifier: Apache-2.0
76
74
  */
77
- var dc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
75
+ var Wb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
78
76
  @license
79
77
  Copyright 2006 The Closure Library Authors
80
78
  SPDX-License-Identifier: Apache-2.0
81
79
  */
82
- function ec(a){var b;a instanceof ec?(fc(this,a.Ia),this.xb=a.xb,this.Ka=a.Ka,gc(this,a.Ob),this.Aa=a.Aa,hc(this,a.g.clone()),this.lb=a.lb):a&&(b=String(a).match(dc))?(fc(this,b[1]||"",!0),this.xb=ic(b[2]||""),this.Ka=ic(b[3]||"",!0),gc(this,b[4]),this.Aa=ic(b[5]||"",!0),hc(this,b[6]||"",!0),this.lb=ic(b[7]||"")):this.g=new jc(null)}q=ec.prototype;q.Ia="";q.xb="";q.Ka="";q.Ob=null;q.Aa="";q.lb="";
83
- q.toString=function(){var a=[],b=this.Ia;b&&a.push(kc(b,lc,!0),":");if(b=this.Ka){a.push("//");var c=this.xb;c&&a.push(kc(c,lc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ob;null!=b&&a.push(":",String(b))}if(b=this.Aa)this.Ka&&"/"!=b.charAt(0)&&a.push("/"),a.push(kc(b,"/"==b.charAt(0)?mc:nc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lb)&&a.push("#",kc(b,oc));return a.join("")};
84
- q.resolve=function(a){var b=this.clone();"data"===b.Ia&&(b=new ec);var c=!!a.Ia;c?fc(b,a.Ia):c=!!a.xb;c?b.xb=a.xb:c=!!a.Ka;c?b.Ka=a.Ka:c=null!=a.Ob;var d=a.Aa;if(c)gc(b,a.Ob);else if(c=!!a.Aa){if("/"!=d.charAt(0))if(this.Ka&&!this.Aa)d="/"+d;else{var e=b.Aa.lastIndexOf("/");-1!=e&&(d=b.Aa.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(""):".."==
85
- 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.Aa=d:c=""!==a.g.toString();c?hc(b,a.g.clone()):c=!!a.lb;c&&(b.lb=a.lb);return b};q.clone=function(){return new ec(this)};function fc(a,b,c){a.Ia=c?ic(b,!0):b;a.Ia&&(a.Ia=a.Ia.replace(/:$/,""))}function gc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ob=b}else a.Ob=null}function hc(a,b,c){b instanceof jc?a.g=b:(c||(b=kc(b,pc)),a.g=new jc(b))}
86
- function ic(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function kc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,qc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function qc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var lc=/[#\/\?@]/g,nc=/[#\?:]/g,mc=/[#\?]/g,pc=/[#\?@]/g,oc=/#/g;function jc(a){this.g=a||null}
87
- function rc(a){if(!a.ra&&(a.ra={},a.Kc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=jc.prototype;q.ra=null;q.Kc=null;q.add=function(a,b){rc(this);this.g=null;var c=this.ra.hasOwnProperty(a)&&this.ra[a];c||(this.ra[a]=c=[]);c.push(b);this.Kc++;return this};
88
- q.set=function(a,b){rc(this);this.g=null;this.ra.hasOwnProperty(a)?this.ra[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.ra)return"";var a=[],b;for(b in this.ra)for(var c=encodeURIComponent(b),d=this.ra[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 jc;a.g=this.g;if(this.ra){var b={},c;for(c in this.ra)b[c]=this.ra[c].concat();a.ra=b;a.Kc=this.Kc}return a};function sc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ec(d)});return a.map(function(d){return new ec(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Xb,[]).map(function(d){return d.toString()})}function tc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
89
- function uc(a,b){if(1==b.length)return b[0];var c=vc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function vc(a,b){for(var c=r(wc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==xc?"":null}var xc="text",yc={Ta:"video",jb:"audio",ea:xc,Xb:"image",pg:"application"},wc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function zc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}zc.prototype.resolve=function(){};zc.prototype.reject=function(){};function Ac(a){this.h=a;this.g=void 0}Ac.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Bc(){}function Cc(a){if(!a)return"";a=Ob(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Wa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
90
- function Dc(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=Rb(a);d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Ec.value()(c)}
91
- function Fc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ob(a);if(239==c[0]&&187==c[1]&&191==c[2])return Cc(c);if(254==c[0]&&255==c[1])return Dc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Dc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Dc(a,!1);if(0==c[1]&&0==c[3])return Dc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Cc(a);throw new N(2,2,2003);}function Gc(a){var b=new TextEncoder;return Pb(b.encode(a))}
92
- function Ic(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(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",Bc);Bc.resetFromCharCode=function(){Ec.g=void 0};Bc.toUTF16=Ic;Bc.toUTF8=Gc;Bc.fromBytesAutoDetect=Fc;Bc.fromUTF16=Dc;Bc.fromUTF8=Cc;
93
- var Ec=new Ac(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={bb:65536};0<b.bb;b={bb:b.bb},b.bb/=2)if(a(b.bb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.bb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.bb));return e}}(b);return null});function Jc(){}function Kc(a){a=Ob(a);a=Ec.value()(a);return btoa(a)}function Lc(a,b){b=void 0==b?!0:b;var c=Kc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Mc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(mb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ga]=c.item.charCodeAt(0);return a}
94
- function Nc(a){var b=a.length/2,c=new Uint8Array(b);b=r(kb(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 Oc(a){var b=Ob(a);a="";b=r(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}
95
- function Pc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(Ob(c),e),e+=c.byteLength;return d}M("shaka.util.Uint8ArrayUtils",Jc);Jc.concat=Pc;Jc.toHex=Oc;Jc.fromHex=Nc;Jc.fromBase64=Mc;Jc.toBase64=Lc;Jc.toStandardBase64=Kc;
96
- Jc.equal=function(a,b){Tb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Mb(a,b)};function Qc(){var a=this;this.s=bc.get("muxjs")();this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(Pc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Pc.apply(Jc,ja(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Qc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
97
- function Rc(a,b){if(!bc.get("muxjs")()||!Sc(a))return!1;if(b)return MediaSource.isTypeSupported(Tc(b,a));var c=Tc("audio",a),d=Tc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Sc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
98
- function Tc(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 Uc(a,b){a.l=!0;a.h=new zc;a.o=[];a.j=[];a.i=[];var c=Ob(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Vc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Wc(a,b,c){a=Vc(a,b);return bc.get("muxjs")()&&Sc(a)?Tc(c,a):a}function Xc(a){a=a.split(".");var b=a[0];a.pop();return b}function Yc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Zc(a){this.u=null;this.i=a;this.j=this.F=0;this.l=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function $c(a){return ad[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Zc.prototype.destroy=function(){this.i=this.u=null;this.o.clear();return Promise.resolve()};
99
- function bd(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.u||!a.i)return h["return"]();if(null==c||null==d)return a.u.parseInit(Ob(b)),h["return"]();e={periodStart:a.F,segmentStart:c,segmentEnd:d};f=a.u.parseMedia(Ob(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)})}
100
- Zc.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 cd(a,b,c){a.j=b;a.l=c}function dd(a,b,c){a.s=b;if(b=a.o.get(b))for(var d=r(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)}
101
- function ed(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new rb(c.startTime,c.endTime,c.text)});return b}function fd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())fd(a,d.value,c)}
102
- function gd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(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,[]);fd(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.s&&a.i.append([k]))}e=r(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=r(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,
103
- 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",Zc);Zc.prototype.destroy=Zc.prototype.destroy;Zc.findParser=function(a){return ad[a]};Zc.unregisterParser=function(a){delete ad[a]};Zc.registerParser=function(a,b){ad[a]=b};var ad={};function hd(){}function id(a,b){a=jd(a);b=jd(b);return a.split("-")[0]==b.split("-")[0]}function kd(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ld(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function jd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=md.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
104
- function nd(a,b){a=jd(a);b=jd(b);return b==a?4:kd(b,a)?3:ld(b,a)?2:kd(a,b)?1:0}function od(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=md.get(a)||a}function pd(a){return a.language?jd(a.language):a.audio&&a.audio.language?jd(a.audio.language):a.video&&a.video.language?jd(a.video.language):"und"}
105
- function qd(a,b){for(var c=jd(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(jd(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,kd(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ld(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,kd(c,f))return f;return null}M("shaka.util.LanguageUtils",hd);hd.findClosestLocale=qd;hd.getLocaleForVariant=pd;
106
- hd.getLocaleForText=function(a){return jd(a.language||"und")};hd.getBase=od;hd.relatedness=nd;hd.areSiblings=function(a,b){var c=od(a),d=od(b);return a!=c&&b!=d&&c==d};hd.normalize=jd;hd.isSiblingOf=ld;hd.isParentOf=kd;hd.areLanguageCompatible=id;hd.areLocaleCompatible=function(a,b){a=jd(a);b=jd(b);return a==b};
107
- var md=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",
80
+ function Xb(a){var b;a instanceof Xb?(Yb(this,a.Da),this.pb=a.pb,this.Fa=a.Fa,Zb(this,a.Hb),this.va=a.va,$b(this,a.g.clone()),this.eb=a.eb):a&&(b=String(a).match(Wb))?(Yb(this,b[1]||"",!0),this.pb=ac(b[2]||""),this.Fa=ac(b[3]||"",!0),Zb(this,b[4]),this.va=ac(b[5]||"",!0),$b(this,b[6]||"",!0),this.eb=ac(b[7]||"")):this.g=new bc(null)}r=Xb.prototype;r.Da="";r.pb="";r.Fa="";r.Hb=null;r.va="";r.eb="";
81
+ r.toString=function(){var a=[],b=this.Da;b&&a.push(cc(b,dc,!0),":");if(b=this.Fa){a.push("//");var c=this.pb;c&&a.push(cc(c,dc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Hb;null!=b&&a.push(":",String(b))}if(b=this.va)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(cc(b,"/"==b.charAt(0)?ec:fc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.eb)&&a.push("#",cc(b,gc));return a.join("")};
82
+ r.resolve=function(a){var b=this.clone();"data"===b.Da&&(b=new Xb);var c=!!a.Da;c?Yb(b,a.Da):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Hb;var d=a.va;if(c)Zb(b,a.Hb);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Fa&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.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(""):".."==
83
+ 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.va=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Da=c?ac(b,!0):b;a.Da&&(a.Da=a.Da.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Hb=b}else a.Hb=null}function $b(a,b,c){b instanceof bc?a.g=b:(c||(b=cc(b,hc)),a.g=new bc(b))}
84
+ function ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var dc=/[#\/\?@]/g,fc=/[#\?:]/g,ec=/[#\?]/g,hc=/[#\?@]/g,gc=/#/g;function bc(a){this.g=a||null}
85
+ function jc(a){if(!a.na&&(a.na={},a.yc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=bc.prototype;r.na=null;r.yc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.yc++;return this};
86
+ r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[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 bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.yc=this.yc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
+ function mc(a,b){if(1==b.length)return b[0];var c=nc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function nc(a,b){for(var c=t(oc[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==pc?"":null}var pc="text",qc={Na:"video",bb:"audio",Z:pc,Rb:"image",cg:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(){}function uc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function vc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return wc.value()(d)}
88
+ function xc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return uc(c);if(254==c[0]&&255==c[1])return vc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return vc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return vc(a,!1);if(0==c[1]&&0==c[3])return vc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return uc(a);throw new N(2,2,2003);}function yc(a){var b=new TextEncoder;return Gb(b.encode(a))}
89
+ function zc(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}M("shaka.util.StringUtils",tc);tc.resetFromCharCode=function(){wc.g=void 0};tc.toUTF16=zc;tc.toUTF8=yc;tc.fromBytesAutoDetect=xc;tc.fromUTF16=vc;tc.fromUTF8=uc;
90
+ var wc=new sc(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={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Ac(){}function Bc(a){a=Fb(a);a=wc.value()(a);return btoa(a)}function Cc(a,b){b=void 0==b?!0:b;var c=Bc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Dc(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 Ec(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}
91
+ function Gc(a){var b=Fb(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 Hc(){for(var a=Ha.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(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Ac);Ac.concat=Hc;Ac.toHex=Gc;Ac.fromHex=Ec;Ac.fromBase64=Dc;Ac.toBase64=Cc;Ac.toStandardBase64=Bc;
92
+ Ac.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Ic(){var a=this;this.o=Ub.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(Hc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Hc.apply(Ac,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Ic.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
93
+ function Jc(a,b){if(!Ub.get("muxjs")()||!Kc(a))return!1;if(b)return MediaSource.isTypeSupported(Lc(b,a));var c=Lc("audio",a),d=Lc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Kc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
94
+ function Lc(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 Mc(a,b){a.l=!0;a.h=new rc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Nc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Oc(a,b,c){a=Nc(a,b);return Ub.get("muxjs")()&&Kc(a)?Lc(c,a):a}
95
+ function Pc(a){var b=Qc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
96
+ case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Rc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Qc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
97
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Sc(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 Tc(a){return Uc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Sc.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
98
+ function Vc(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(Fb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Fb(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)})}
99
+ Sc.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 Wc(a,b,c){a.j=b;a.m=c}function Xc(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)}
100
+ function Yc(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 ib(c.startTime,c.endTime,c.text)});return b}function Zc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Zc(a,d.value,c)}
101
+ function $c(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,[]);Zc(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,
102
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",Sc);Sc.prototype.destroy=Sc.prototype.destroy;Sc.findParser=function(a){return Uc[a]};Sc.unregisterParser=function(a){delete Uc[a]};Sc.registerParser=function(a,b){Uc[a]=b};var Uc={};function ad(){}function bd(a,b){a=cd(a);b=cd(b);return a.split("-")[0]==b.split("-")[0]}function dd(a,b){a=cd(a);b=cd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ed(a,b){a=cd(a);b=cd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function cd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=fd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
103
+ function gd(a,b){a=cd(a);b=cd(b);return b==a?4:dd(b,a)?3:ed(b,a)?2:dd(a,b)?1:0}function hd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=fd.get(a)||a}function id(a){return a.language?cd(a.language):a.audio&&a.audio.language?cd(a.audio.language):a.video&&a.video.language?cd(a.video.language):"und"}
104
+ function jd(a,b){for(var c=cd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(cd(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,dd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ed(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,dd(c,f))return f;return null}M("shaka.util.LanguageUtils",ad);ad.findClosestLocale=jd;ad.getLocaleForVariant=id;
105
+ ad.getLocaleForText=function(a){return cd(a.language||"und")};ad.getBase=hd;ad.relatedness=gd;ad.areSiblings=function(a,b){var c=hd(a),d=hd(b);return a!=c&&b!=d&&c==d};ad.normalize=cd;ad.isSiblingOf=ed;ad.isParentOf=dd;ad.areLanguageCompatible=bd;ad.areLocaleCompatible=function(a,b){a=cd(a);b=cd(b);return a==b};
106
+ var fd=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",
108
107
  "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",
109
108
  "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",
110
109
  "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",
111
110
  "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",
112
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function rd(){this.g={}}q=rd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.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 sd(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function td(a){this.h=a;this.g=null}td.prototype.W=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};td.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Sb=function(){this.stop();this.h();return this};O.prototype.W=function(a){var b=this;this.stop();this.g=(new td(function(){b.h()})).W(a);return this};O.prototype.Fa=function(a){var b=this;this.stop();this.g=(new td(function(){b.g.W(a);b.h()})).W(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Fa;O.prototype.tickAfter=O.prototype.W;
113
- O.prototype.tickNow=O.prototype.Sb;function ud(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function vd(a){return""!=wd().canPlayType(a)}function xd(){return yd("Tizen")}function zd(){return yd("CrKey")}function Ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!xd()}function Bd(){if(!Ad())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}
114
- function yd(a){return(navigator.userAgent||"").includes(a)}function wd(){if(Cd)return Cd;Dd||(Dd=new O(function(){Cd=null}));(Cd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Cd=document.createElement("video"));Dd.W(1);return Cd}var Dd=null,Cd=null;function Ed(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Fd(f,b,c);f=Gd(f,d);b=Hd(f);b=Id(b);var g=Jd(b,e);a.variants=a.variants.filter(function(h){return Kd(h)==g?!0:!1})}function Hd(a){var b=new rd;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Kd(c);b.push(d,c)}return b}
115
- function Id(a){var b=0,c=new Map,d=a.size();sd(a,function(e,f){for(var g=r(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 rd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
116
- function Fd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={qd:d.qd},e=b.next())if(d.qd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.qd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={bd:d.bd},b=c.next())if(d.bd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.bd)}}(d)),b.length){a=b;break}return a}
117
- function Jd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ld||d==Md){if(a=Nd(a,d),1==a.size())return a.keys()[0]}else if(d==Od)break;return Pd(a)}function Nd(a,b){var c=0,d=new rd;sd(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
118
- function Pd(a){var b="",c=Infinity;sd(a,function(d,e){for(var f=0,g=0,h=r(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}function Kd(a){var b="";a.video&&(b=Xc(a.video.codecs));var c="";a.audio&&(c=Xc(a.audio.codecs));return b+"-"+c}function Qd(a,b,c){a.variants=a.variants.filter(function(d){return Rd(d,b,c)})}
119
- function Rd(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}
120
- function Sd(a,b){return L(function(c){if(1==c.g)return u(c,Td(b,0<b.offlineSessionIds.length),2);Ud(a,b);Vd(b);Wd(b);z(c)})}
121
- function Td(a,b){return L(function(c){if(1==c.g)return u(c,Xd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Yd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=uc("video",g);g=uc("audio",g);g=Wc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Wc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Zd(f.codecs),f=Wc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(yd("Xbox One")&&
122
- e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return bb($d(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||bb($d(d));return e});z(c)})}
123
- function Xd(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return L(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(w,y){var x;return L(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(y),4);if(2!=D.g)return x=D.h,w.decodingInfos.push(x),wa(D,0);E(D);JSON.stringify(y);z(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ae(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return u(v,Promise.all(f),
111
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function kd(){this.g={}}r=kd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.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 md(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(a){this.h=a;this.g=null}nd.prototype.S=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};nd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new nd(function(){b.h()})).S(a);return this};O.prototype.Ba=function(a){var b=this;this.stop();this.g=(new nd(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ba;O.prototype.tickAfter=O.prototype.S;
112
+ O.prototype.tickNow=O.prototype.Lb;function od(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pd(a){return""!=qd().canPlayType(a)}function rd(){return sd("Xbox One")}function td(){return sd("Tizen")}function ud(){return sd("CrKey")}function vd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!td()}function wd(){if(!vd())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}
113
+ function sd(a){return(navigator.userAgent||"").includes(a)}function qd(){if(xd)return xd;yd||(yd=new O(function(){xd=null}));(xd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(xd=document.createElement("video"));yd.S(1);return xd}var yd=null,xd=null;function zd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ad(f,b,c);f=Bd(f,d);b=Cd(f);b=Dd(b);var g=Ed(b,e);a.variants=a.variants.filter(function(h){return Fd(h)==g?!0:!1})}function Cd(a){var b=new kd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Fd(c);b.push(d,c)}return b}
114
+ function Dd(a){var b=0,c=new Map,d=a.size();md(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 kd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
115
+ function Ad(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={kd:d.kd},e=b.next())if(d.kd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.kd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Wc:d.Wc},b=c.next())if(d.Wc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Wc)}}(d)),b.length){a=b;break}return a}
116
+ function Ed(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Gd||d==Hd){if(a=Id(a,d),1==a.size())return a.keys()[0]}else if(d==Jd)break;return Kd(a)}function Id(a,b){var c=0,d=new kd;md(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
117
+ function Kd(a){var b="",c=Infinity;md(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}function Fd(a){var b="";a.video&&(b=Pc(a.video.codecs));var c="";a.audio&&(c=Pc(a.audio.codecs));return b+"-"+c}function Ld(a,b,c){a.variants=a.variants.filter(function(d){return Md(d,b,c)})}
118
+ function Md(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}
119
+ function Nd(a,b){return L(function(c){if(1==c.g)return u(c,Od(b,0<b.offlineSessionIds.length),2);Pd(a,b);Qd(b);Rd(b);z(c)})}
120
+ function Od(a,b){return L(function(c){if(1==c.g)return u(c,Sd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Td(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);g=mc("audio",g);g=Oc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Oc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Ud(f.codecs),f=Oc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(rd()&&e&&(e.width&&
121
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Vd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Vd(d));return e});z(c)})}
122
+ function Sd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);E(D);JSON.stringify(w);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Wd(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),
124
123
  0)})}
125
- function ae(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=uc("video",g);f=Yd(f);g=uc("audio",g);g=Wc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Yd(f);f=Wc(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";
126
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Zd(d.codecs),f=Wc(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=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
127
- f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(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=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
128
- (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 Zd(a){return xd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
129
- function Yd(a){return"vp9"==a?"vp09.00.10.08":a}function Ud(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!be(d,a.audio)||c&&a&&a.video&&!be(c,a.video)?!1:!0})}function Vd(a){a.textStreams=a.textStreams.filter(function(b){return $c(Vc(b.mimeType,b.codecs))})}function Wd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(yd("Web0S")||xd()||zd())&&c.push("image/webp");return c.includes(b.mimeType)})}
130
- function be(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
131
- function ce(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=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(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,
124
+ function Wd(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=mc("video",g);f=Td(f);g=mc("audio",g);g=Oc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Td(f);f=Oc(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";
125
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Ud(d.codecs),f=Oc(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,[]);
126
+ 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&&
127
+ (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 Ud(a){return td()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
128
+ function Td(a){return"vp9"==a?"vp09.00.10.08":a}function Pd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Xd(d,a.audio)||c&&a&&a.video&&!Xd(c,a.video)?!1:!0})}function Qd(a){a.textStreams=a.textStreams.filter(function(b){return Tc(Nc(b.mimeType,b.codecs))})}function Rd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(sd("Web0S")||td()||ud())&&c.push("image/webp");return c.includes(b.mimeType)})}
129
+ function Xd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
130
+ function Yd(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,
132
131
  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||
133
132
  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}
134
- function de(a){return{id:a.id,active:!1,type:xc,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,
133
+ function Zd(a){return{id:a.id,active:!1,type:pc,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,
135
134
  originalTextId:a.originalId,originalImageId:null}}
136
- function ee(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
137
- audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function fe(a){a.__shaka_id||(a.__shaka_id=ge++);return a.__shaka_id}
138
- function he(a){var b=je(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ke(a){var b=je(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}
139
- function je(a){return{id:fe(a),active:!1,type:"",bandwidth:0,language:jd(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}}
140
- function le(a){return a.allowedByApplication&&a.allowedByKeySystem}function me(a){return a.filter(function(b){return le(b)})}
141
- function Gd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(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,ja(e))):d.get(Math.min.apply(Math,ja(c)))}
142
- function ne(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=qd(jd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return jd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=oe(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(Xb,[]);return a.length?
143
- oe(e,a[0]):e}function oe(a,b){return a.filter(function(c){return c.roles.includes(b)})}function $d(a){var b=[];a.audio&&b.push(pe(a.audio));a.video&&b.push(pe(a.video));return b.join(", ")}
144
- function pe(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 ge=0,Ld="smooth",Md="powerEfficient",Od="bandwidth";function qe(){var a=this;this.j=null;this.i=!1;this.g=new Ta;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.m.useNetworkInformation&&a.i){a.g=new Ta;a.m&&a.g.configure(a.m.advanced);var b=a.chooseVariant();b&&a.j(b)}});this.h=[];this.o=1;this.s=!1;this.m=this.l=null}q=qe.prototype;q.stop=function(){this.j=null;this.i=!1;this.h=[];this.o=1;this.l=null};q.init=function(a){this.j=a};
145
- q.chooseVariant=function(){var a=re(this.m.restrictions,this.h),b=this.g.getBandwidthEstimate(se(this));this.h.length&&!a.length&&(a=re(null,this.h),a=[a[0]]);var c=a[0]||null;a=r(mb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.o)?1:Math.abs(this.o);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.m.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.m.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.i=!0};
146
- q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(b<c.l)){var d=8E3*b/a,e=a/1E3;c.g+=b;Ra(c.h,e,d);Ra(c.j,e,d)}if(null!=this.l&&this.i)a:{if(!this.s){c=this.g;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.l<1E3*this.m.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(se(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.m.defaultBandwidthEstimate)};q.setVariants=function(a){this.h=a};
147
- q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.m=a;this.g&&this.m&&this.g.configure(this.m.advanced)};function se(a){var b=a.m.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.m.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function re(a,b){a&&(b=b.filter(function(c){return Rd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",qe);
148
- qe.prototype.configure=qe.prototype.configure;qe.prototype.playbackRateChanged=qe.prototype.playbackRateChanged;qe.prototype.setVariants=qe.prototype.setVariants;qe.prototype.getBandwidthEstimate=qe.prototype.getBandwidthEstimate;qe.prototype.segmentDownloaded=qe.prototype.segmentDownloaded;qe.prototype.disable=qe.prototype.disable;qe.prototype.enable=qe.prototype.enable;qe.prototype.chooseVariant=qe.prototype.chooseVariant;qe.prototype.init=qe.prototype.init;qe.prototype.stop=qe.prototype.stop;function te(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}te.prototype.add=function(a){return ue(this.h,a)?(this.g.add(a),!0):!1};
149
- function ue(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)&&ve(c,d)&&we(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ve(c,d)&&we(c.roles,d.roles)));return c?!1:!0}te.prototype.values=function(){return this.g.values()};
150
- function ve(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return Xc(g)}),d=b.codecs.split(",").map(function(g){return Xc(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(kb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
151
- function we(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=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function xe(a){this.g=a;this.h=new ye(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}xe.prototype.create=function(a){var b=this,c=a.filter(function(d){return ue(b.g,d)});return c.length?new te(c[0],c):this.h.create(a)};function ye(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
152
- ye.prototype.create=function(a){var b=[];b=ze(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ae(b,this.j);a.length&&(b=a);this.g&&(a=Gd(b,this.g),a.length&&(b=a));this.h&&(a=Be(b,this.h),a.length&&(b=a));a=new te(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,ue(a.h,c)&&a.add(c);return a};function ze(a,b){var c=jd(b),d=qd(c,a.map(function(e){return pd(e)}));return d?a.filter(function(e){return d==pd(e)}):[]}
153
- function Ae(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Be(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ce(){this.g=De;this.h=(new Map).set(De,2).set(Ee,1)}function Fe(a,b,c){a.h.set(De,c).set(Ee,b)}var Ee=0,De=1;function Ge(a,b){var c=He();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.o=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}
154
- function Ie(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 u(d,new Promise(function(e){(new O(e)).W(c/1E3)}),2)}a.h*=a.o;z(d)})}function He(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Je(a,b){this.promise=a;this.i=b;this.g=!1}function Ke(a){return new Je(Promise.reject(a),function(){return Promise.resolve()})}function Le(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Je(a,function(){return Promise.resolve()})}function Me(a){return new Je(Promise.resolve(a),function(){return Promise.resolve()})}function Ne(a){return new Je(a,function(){return a["catch"](function(){})})}Je.prototype.abort=function(){this.g=!0;return this.i()};
155
- function Oe(a){return new Je(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Je.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
156
- Je.prototype.fa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Pe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new zc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Je(f,function(){return d()})};
157
- function Pe(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",Je);Je.prototype.chain=Je.prototype.fa;Je.prototype["finally"]=Je.prototype["finally"];Je.all=Oe;Je.prototype.abort=Je.prototype.abort;Je.notAbortable=Ne;Je.completed=Me;Je.aborted=Le;Je.failed=Ke;function Q(a,b){if(b)if(b instanceof Map)for(var c=r(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}
158
- function Qe(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(){};M("shaka.util.FakeEvent",Q);function Re(){this.$=new rd;this.Ec=this}Re.prototype.addEventListener=function(a,b){this.$&&this.$.push(a,b)};Re.prototype.removeEventListener=function(a,b){this.$&&this.$.remove(a,b)};Re.prototype.dispatchEvent=function(a){if(!this.$)return!0;var b=this.$.get(a.type)||[],c=this.$.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ec;a.currentTarget=this.Ec;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
159
- Re.prototype.release=function(){this.$=null};function Se(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 Te(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ue(){this.g=[]}function Ve(a,b){a.g.push(b["finally"](function(){ob(a.g,b)}))}Ue.prototype.destroy=function(){for(var a=[],b=r(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 We(a,b,c){Re.call(this);this.i=!1;this.o=new Ue;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.s=!1}ra(We,Re);q=We.prototype;q.Xd=function(a){this.s=a};function Xe(a,b,c,d){c=c||Ye;var e=Ze[a];if(!e||c>=e.priority)Ze[a]={priority:c,Rf:b,Tf:void 0===d?!1:d}}q.Uf=function(a){this.g.add(a)};q.kg=function(a){this.g["delete"](a)};q.Xe=function(){this.g.clear()};q.Vf=function(a){this.h.add(a)};q.lg=function(a){this.h["delete"](a)};q.Ye=function(){this.h.clear()};
160
- function $e(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();Re.prototype.release.call(this);return this.o.destroy()};
161
- q.request=function(a,b){var c=this,d=new af;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new bf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Se(b.retryParameters):He();b.uris=Se(b.uris);e=cf(this,a,b);var f=e.fa(function(){return df(c,a,b,new Ge(b.retryParameters,!1),0,null,d)}),g=f.fa(function(n){return ef(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
162
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.fa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Gf||!c.l||t.fromCache||a!=ff||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new bf(m.promise,function(){return m.abort()},d);Ve(this.o,e);return e};
163
- function cf(a,b,c){var d=Me(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={ld:e.ld},f=a.next())e.ld=f.value,d=d.fa(function(g){return function(){c.body&&(c.body=Pb(c.body));return g.ld(b,c)}}(e));return d.fa(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
164
- function df(a,b,c,d,e,f,g){a.s&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ec(c.uris[e]),k=h.Ia,l=!1;k||(k=location.protocol,k=k.slice(0,-1),fc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ze[k])?k.Rf:null;if(!m)return Ke(new N(2,1,1E3,h));var n=k.Tf,p=null,t=null,v=!1,w=!1,y;return Ne(Ie(d)).fa(function(){if(a.i)return Le();y=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();t&&t.W(C/1E3);a.l&&b==ff&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);w=!0});
165
- if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.W(D/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new O(function(){v=!0;x.abort()}));return x}).fa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);var D={response:x,Gf:l};!w&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();t&&t.stop();if(a.u){var D=null,C=0;x instanceof N&&(D=x,1001==x.code&&(C=x.data[1]));a.u(c,D,C,v)}if(a.i)return Le();v&&(x=new N(1,1,1003,
166
- c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,df(a,b,c,d,e,x,g)}throw x;})}
167
- function ef(a,b,c){var d=Me(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={md:e.md},f=a.next())e.md=f.value,d=d.fa(function(g){return function(){var h=c.response;h.data&&(h.data=Pb(h.data));return g.md(b,h)}}(e));return d.fa(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",We);We.prototype.request=We.prototype.request;We.prototype.destroy=We.prototype.destroy;We.makeRequest=$e;
168
- We.defaultRetryParameters=function(){return He()};We.prototype.clearAllResponseFilters=We.prototype.Ye;We.prototype.unregisterResponseFilter=We.prototype.lg;We.prototype.registerResponseFilter=We.prototype.Vf;We.prototype.clearAllRequestFilters=We.prototype.Xe;We.prototype.unregisterRequestFilter=We.prototype.kg;We.prototype.registerRequestFilter=We.prototype.Uf;We.unregisterScheme=function(a){delete Ze[a]};We.registerScheme=Xe;We.prototype.setForceHTTPS=We.prototype.Xd;function af(){this.g=0}
169
- We.NumBytesRemainingClass=af;function bf(a,b,c){Je.call(this,a,b);this.h=c}ra(bf,Je);We.PendingRequest=bf;var ff=1;We.RequestType={MANIFEST:0,SEGMENT:ff,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ye=3;We.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ye};var Ze={};function gf(a){this.g=!1;this.h=new zc;this.i=a}gf.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 hf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function jf(){this.g=new rd}q=jf.prototype;q.release=function(){this.vb();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new kf(a,b,c,d),this.g.push(b,a))};q.ya=function(a,b,c,d){function e(g){f.Ga(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.Ga=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ga(),this.g.remove(b,e))}};
170
- q.vb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Ga();this.g.g={}}};M("shaka.util.EventManager",jf);jf.prototype.removeAll=jf.prototype.vb;jf.prototype.unlisten=jf.prototype.Ga;jf.prototype.listenOnce=jf.prototype.ya;jf.prototype.listen=jf.prototype.C;jf.prototype.release=jf.prototype.release;function kf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=lf(a,d);this.target.addEventListener(b,c,this.g)}
171
- kf.prototype.Ga=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function lf(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 mf(a)?b:b.capture||!1}
172
- function mf(a){var b=nf;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}nf=b}return b||!1}var nf=void 0;function of(){}function pf(a){a=Fc(a);return(new ec(a)).Ka}function qf(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ob(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Ic(b,!0):e=b;a=Fc(a);a=Ic(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",of);of.initDataTransform=qf;of.defaultGetContentId=pf;function rf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function sf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function tf(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=r(a),d=c.next();!d.done;d=c.next()){var e=r(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 uf(a,b){var c=this;b=void 0===b?1:b;this.B=a;this.F=new Set;this.g=this.o=null;this.na=this.$=!1;this.G=0;this.i=null;this.h=new jf;this.j=new Map;this.u=[];this.s=new zc;this.m=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.oa=new Map;this.da=new Map;this.P=new O(function(){return vf(c)});this.J=!1;this.I=[];this.M=!1;this.ma=(new O(function(){wf(c)})).Fa(b);this.s["catch"](function(){});this.K=new gf(function(){return xf(c)});this.S=!1}q=uf.prototype;q.destroy=function(){return this.K.destroy()};
173
- function xf(a){return L(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.ma.stop(),a.ma=null,a.P.stop(),a.P=null,u(b,yf(a),2);case 2:if(!a.g){b.A(3);break}B(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.F.clear(),a.o=null,a.u=[],a.m=null,a.l=function(){},a.B=null,a.S=!1,z(b)}})}q.configure=function(a){this.m=a};function zf(a,b,c){a.na=!0;a.u=[];a.J=c;return Af(a,b)}
174
- function Bf(a,b,c){a.u=c;a.J=0<c.length;return Af(a,b)}function Df(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,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Ef(a,g,[])}
175
- function Af(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;return L(function(y){if(1==y.g){if(c=Ff(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=rf(a.m.servers),Gf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Hf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,If(t,rf(a.m.servers),rf(a.m.advanced||{}));return u(y,
176
- Xd(b,a.J,a.S),2)}v=g||Object.keys(a.m.servers).length;if(!v)return a.$=!0,y["return"](Promise.resolve());w=Ef(a,void 0,b);return y["return"](g?w:w["catch"](function(){}))})}
177
- q.bc=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.o)return b.h.ya(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.ya(b.g,"play",function(){for(var f=r(b.I),g=f.next();!g.done;g=f.next())Jf(b,g.value);b.M=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.C(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return yf(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
178
- c,2)}hf(b.K);Kf(b);b.i.initData.length||b.u.length||(d=function(f){return Lf(b,f.initDataType,Ob(f.initData))},b.h.C(b.g,"encrypted",d));z(e)})};
179
- function Mf(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.o||!a.i)return g["return"]();if(!a.i.serverCertificateUri||a.i.serverCertificate&&a.i.serverCertificate.length){g.A(2);break}b=$e([a.i.serverCertificateUri],a.m.retryParameters);B(g,3);c=a.B.sb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.i.serverCertificate=Ob(d.data);wa(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.K.g)return g["return"]();case 2:if(!a.i.serverCertificate||!a.i.serverCertificate.length)return g["return"]();
180
- B(g,6);return u(g,a.o.setServerCertificate(a.i.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Nf(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Of(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Oa=new zc,d.push(e.Oa);d.push(c.remove());return u(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}
181
- function Kf(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Lf(a,d.initDataType,d.initData);c=r(a.u);for(d=c.next();!d.done;d=c.next())Of(a,d.value);b.length||a.u.length||a.s.resolve();return a.s}function Lf(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Mb(c,e.value.initData)&&!yd("Tizen 2"))return;Pf(a,b,c,a.i.sessionType)}function Qf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
182
- function Rf(a){a=a.j.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}q.fc=function(){var a=Infinity,b=this.j.keys();b=r(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.Mc=function(){return sf(this.da)};
183
- function Ef(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w;return L(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=Sf(a,c,d);y.A(2);break}return u(y,Tf(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new N(2,6,6001);hf(a.K);B(y,4);a.F.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.F.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.F.add(t.contentType.toLowerCase());if(c.length){var x=
184
- f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],F=[],G=[],H=new Set;Uf(D,C,F,A,G,H);var J=a.J?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=r(D);for(C=D.next();!C.done;C=
185
- D.next())C=C.value,C.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(x.persistentStateRequired=C.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),C=[],A=[],F=[],G=[],H=new Set,Uf(x.drmInfos,C,F,A,G,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
186
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.i=D;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return u(y,f.createMediaKeys(),6);case 6:return v=y.h,hf(a.K),a.o=v,a.$=!0,u(y,Mf(a),7);case 7:hf(a.K);wa(y,0);break;case 4:w=E(y);hf(a.K,w);a.i=null;a.F.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
187
- function Sf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Hf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=r(a.m.preferredKeySystems);for(e=a.next();!e.done;d={jd:d.jd},e=a.next())for(d.jd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
188
- l.jd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
189
- function Tf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y;return L(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=r(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=r(a.m.preferredKeySystems);h=g.next();case 2:if(h.done){x.A(4);break}k=h.value;if(!b.has(k)){x.A(3);break}l=b.get(k);B(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
190
- x.h,x["return"](c);case 6:E(x);case 7:hf(a.K);case 3:h=g.next();x.A(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.A(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.A(9);break}v=h.value;w=b.get(v);y=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(y!=p){x.A(13);break}B(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=x.h,x["return"](c);case 15:E(x);case 16:hf(a.K);case 13:h=t.next();x.A(12);break;case 11:return x["return"](c)}})}
191
- function Ff(a){a=rf(a.m.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Nc(f),h=Nc(e);g={kty:"oct",kid:Lc(g,!1),k:Lc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ob(Gc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
135
+ function $d(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
136
+ audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ae(a){a.__shaka_id||(a.__shaka_id=be++);return a.__shaka_id}
137
+ function ce(a){var b=de(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ee(a){var b=de(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}
138
+ function de(a){return{id:ae(a),active:!1,type:"",bandwidth:0,language:cd(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}}
139
+ function fe(a){return a.allowedByApplication&&a.allowedByKeySystem}function ge(a){return a.filter(function(b){return fe(b)})}
140
+ function Bd(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,ja(e))):d.get(Math.min.apply(Math,ja(c)))}
141
+ function he(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=jd(cd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return cd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=je(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(Ob,[]);return a.length?
142
+ je(e,a[0]):e}function je(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(ke(a.audio));a.video&&b.push(ke(a.video));return b.join(", ")}
143
+ function ke(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 be=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth";function le(){var a=this;this.l=null;this.j=!1;this.h=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Ra;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=le.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};
144
+ r.chooseVariant=function(){var a=me(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(ne(this));this.i.length&&!a.length&&(a=me(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};
145
+ 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){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ne(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)};r.setVariants=function(a){this.i=a};
146
+ r.playbackRateChanged=function(a){this.o=a};r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function ne(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function me(a,b){a&&(b=b.filter(function(c){return Md(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",le);
147
+ le.prototype.configure=le.prototype.configure;le.prototype.playbackRateChanged=le.prototype.playbackRateChanged;le.prototype.setVariants=le.prototype.setVariants;le.prototype.getBandwidthEstimate=le.prototype.getBandwidthEstimate;le.prototype.segmentDownloaded=le.prototype.segmentDownloaded;le.prototype.disable=le.prototype.disable;le.prototype.enable=le.prototype.enable;le.prototype.chooseVariant=le.prototype.chooseVariant;le.prototype.init=le.prototype.init;le.prototype.stop=le.prototype.stop;function oe(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)}oe.prototype.add=function(a){return pe(this.h,a)?(this.g.add(a),!0):!1};
148
+ function pe(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)&&qe(c,d)&&re(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(qe(c,d)&&re(c.roles,d.roles)));return c?!1:!0}oe.prototype.values=function(){return this.g.values()};
149
+ function qe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Qc(f)[0]}),d=b.codecs.split(",").map(function(f){return Qc(f)[0]});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 re(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 se(a){this.g=a;this.h=new te(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}se.prototype.create=function(a){var b=this,c=a.filter(function(d){return pe(b.g,d)});return c.length?new oe(c[0],c):this.h.create(a)};function te(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
150
+ te.prototype.create=function(a){var b=[];b=ue(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ve(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=we(b,this.h),a.length&&(b=a));a=new oe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,pe(a.h,c)&&a.add(c);return a};function ue(a,b){var c=cd(b),d=jd(c,a.map(function(e){return id(e)}));return d?a.filter(function(e){return d==id(e)}):[]}
151
+ function ve(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function we(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function xe(){this.g=ye;this.h=(new Map).set(ye,2).set(ze,1)}function Ae(a,b,c){a.h.set(ye,c).set(ze,b)}var ze=0,ye=1;function Be(a,b){var c=Ce();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}
152
+ function De(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.o);return u(d,new Promise(function(e){(new O(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ce(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ee(a,b){this.promise=a;this.i=b;this.g=!1}function Fe(a){return new Ee(Promise.reject(a),function(){return Promise.resolve()})}function Ge(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ee(a,function(){return Promise.resolve()})}function He(a){return new Ee(Promise.resolve(a),function(){return Promise.resolve()})}function Ie(a){return new Ee(a,function(){return a["catch"](function(){})})}Ee.prototype.abort=function(){this.g=!0;return this.i()};
153
+ function Je(a){return new Ee(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ee.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
154
+ Ee.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=Ke(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new rc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ee(f,function(){return d()})};
155
+ function Ke(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",Ee);Ee.prototype.chain=Ee.prototype.$;Ee.prototype["finally"]=Ee.prototype["finally"];Ee.all=Je;Ee.prototype.abort=Ee.prototype.abort;Ee.notAbortable=Ie;Ee.completed=He;Ee.aborted=Ge;Ee.failed=Fe;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}
156
+ function Le(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(){};M("shaka.util.FakeEvent",Q);function Me(){this.ea=new kd;this.Bc=this}Me.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Me.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Me.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.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.Bc;a.currentTarget=this.Bc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
157
+ Me.prototype.release=function(){this.ea=null};function Ne(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 Oe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Pe(){this.g=[]}function Qe(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Pe.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 Re(a,b,c){Me.call(this);this.i=!1;this.m=new Pe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Re,Me);r=Re.prototype;r.Pd=function(a){this.o=a};function Se(a,b,c,d){c=c||Te;var e=Ue[a];if(!e||c>=e.priority)Ue[a]={priority:c,Gf:b,Hf:void 0===d?!1:d}}r.If=function(a){this.g.add(a)};r.Yf=function(a){this.g["delete"](a)};r.Oe=function(){this.g.clear()};r.Jf=function(a){this.h.add(a)};r.Zf=function(a){this.h["delete"](a)};r.Pe=function(){this.h.clear()};
158
+ function Ve(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();Me.prototype.release.call(this);return this.m.destroy()};
159
+ r.request=function(a,b){var c=this,d=new We;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Xe(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ne(b.retryParameters):Ce();b.uris=Ne(b.uris);e=Ye(this,a,b);var f=e.$(function(){return Ze(c,a,b,new Be(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return $e(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
160
+ 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.vf||!c.l||q.fromCache||a!=af||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Xe(m.promise,function(){return m.abort()},d);Qe(this.m,e);return e};
161
+ function Ye(a,b,c){var d=He(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ed:e.ed},f=a.next())e.ed=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.ed(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
162
+ function Ze(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Da,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ue[k])?k.Gf:null;if(!m)return Fe(new N(2,1,1E3,h));var n=k.Hf,p=null,q=null,v=!1,y=!1,w;return Ie(De(d)).$(function(){if(a.i)return Ge();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();q&&q.S(B/1E3);a.l&&b==af&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
163
+ if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(q=new O(function(){v=!0;x.abort()}));return x}).$(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,vf:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();q&&q.stop();if(a.s){var D=null,B=0;x instanceof N&&(D=x,1001==x.code&&(B=x.data[1]));a.s(c,D,B,v)}if(a.i)return Ge();v&&(x=new N(1,1,1003,
164
+ c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,Ze(a,b,c,d,e,x,g)}throw x;})}
165
+ function $e(a,b,c){var d=He(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={fd:e.fd},f=a.next())e.fd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.fd(b,h)}}(e));return d.$(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",Re);Re.prototype.request=Re.prototype.request;Re.prototype.destroy=Re.prototype.destroy;Re.makeRequest=Ve;
166
+ Re.defaultRetryParameters=function(){return Ce()};Re.prototype.clearAllResponseFilters=Re.prototype.Pe;Re.prototype.unregisterResponseFilter=Re.prototype.Zf;Re.prototype.registerResponseFilter=Re.prototype.Jf;Re.prototype.clearAllRequestFilters=Re.prototype.Oe;Re.prototype.unregisterRequestFilter=Re.prototype.Yf;Re.prototype.registerRequestFilter=Re.prototype.If;Re.unregisterScheme=function(a){delete Ue[a]};Re.registerScheme=Se;Re.prototype.setForceHTTPS=Re.prototype.Pd;function We(){this.g=0}
167
+ Re.NumBytesRemainingClass=We;function Xe(a,b,c){Ee.call(this,a,b);this.h=c}qa(Xe,Ee);Re.PendingRequest=Xe;var af=1;Re.RequestType={MANIFEST:0,SEGMENT:af,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Te=3;Re.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Te};var Ue={};function bf(a){this.g=!1;this.h=new rc;this.i=a}bf.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 cf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function df(){this.g=new kd}r=df.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ef(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.oc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.oc=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.oc(),this.g.remove(b,e))}};
168
+ r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.oc();this.g.g={}}};M("shaka.util.EventManager",df);df.prototype.removeAll=df.prototype.Sa;df.prototype.unlisten=df.prototype.oc;df.prototype.listenOnce=df.prototype.oa;df.prototype.listen=df.prototype.A;df.prototype.release=df.prototype.release;function ef(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ff(a,d);this.target.addEventListener(b,c,this.g)}
169
+ ef.prototype.oc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ff(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 gf(a)?b:b.capture||!1}
170
+ function gf(a){var b=hf;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}hf=b}return b||!1}var hf=void 0;function jf(){}function kf(a){a=xc(a);return(new Xb(a)).Fa}function lf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=zc(b,!0):e=b;a=xc(a);a=zc(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",jf);jf.initDataTransform=lf;jf.defaultGetContentId=kf;function mf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function nf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function of(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 pf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function qf(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 rf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new df;this.i=new Map;this.C=[];this.u=new rc;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 O(function(){return sf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){tf(c)})).Ba(b);this.u["catch"](function(){});this.j=new bf(function(){return uf(c)});this.W=!1}r=rf.prototype;r.destroy=function(){return this.j.destroy()};
171
+ function uf(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,vf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.l=null;case 3:a.g=null,a.F.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,z(b)}})}r.configure=function(a){this.h=a};function wf(a,b,c){a.fa=!0;a.C=[];a.L=c;return xf(a,b)}
172
+ function yf(a,b,c){a.C=c;a.L=0<c.length;return xf(a,b)}function zf(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,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Af(a,g,[])}
173
+ function xf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){if(c=Bf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=of(a.h.servers),Df(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ef(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Ff(q,of(a.h.servers),of(a.h.advanced||{}));return u(w,
174
+ Sd(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,w["return"](Promise.resolve());y=Af(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
175
+ r.Vb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())Gf(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
176
+ c,2)}cf(b.j);Hf(b);b.g.initData.length||b.C.length||(d=function(f){return If(b,f.initDataType,Fb(f.initData))},b.o.A(b.l,"encrypted",d));z(e)})};
177
+ function Jf(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Ve([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.mb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
178
+ C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Kf(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Lf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new rc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
179
+ function Hf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,If(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Lf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function If(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)&&!sd("Tizen 2"))return;Mf(a,b,c,a.g.sessionType)}function Nf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
180
+ function Of(a){a=a.i.keys();a=mf(a,function(b){return b.sessionId});return Array.from(a)}r.ac=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.Ec=function(){return pf(this.da)};
181
+ function Af(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Pf(a,c,d);w.B(2);break}return u(w,Qf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new N(2,6,6001);cf(a.j);C(w,4);a.F.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.F.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.F.add(q.contentType.toLowerCase());if(c.length){var x=
182
+ f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],F=[],G=[],H=new Set;Rf(D,B,F,A,G,H);var J=a.L?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=t(D);for(B=D.next();!B.done;B=
183
+ D.next())B=B.value,B.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(x.persistentStateRequired=B.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),B=[],A=[],F=[],G=[],H=new Set,Rf(x.drmInfos,B,F,A,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
184
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,cf(a.j),a.s=v,a.ca=!0,u(w,Jf(a),7);case 7:cf(a.j);va(w,0);break;case 4:y=E(w);cf(a.j,y);a.g=null;a.F.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
185
+ function Pf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ef(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={cd:d.cd},e=a.next())for(d.cd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
186
+ l.cd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
187
+ function Qf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.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(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);C(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
188
+ x.h,x["return"](c);case 6:E(x);case 7:cf(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();x.B(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.B(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:E(x);case 16:cf(a.j);case 13:h=q.next();x.B(12);break;case 11:return x["return"](c)}})}
189
+ function Bf(a){a=of(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Ec(f),h=Ec(e);g={kty:"oct",kid:Cc(g,!1),k:Cc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(yc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
192
190
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
193
- function Of(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.C(c,"message",function(k){a.g&&a.m.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.M?a.I.push(k):Jf(a,k)});a.h.C(c,"keystatuseschange",function(k){return Vf(a,k)});e={initData:null,loaded:!1,Nd:Infinity,Oa:null,type:"persistent-license"};a.j.set(c,e);B(h,2);return u(h,c.load(b),4);case 4:f=h.h;hf(a.K);
194
- if(!f)return a.j["delete"](c),a.l(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Wf(a)&&a.s.resolve();return h["return"](c);case 2:g=E(h),hf(a.K,g),a.j["delete"](c),a.l(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
195
- function Pf(a,b,c,d){try{var e=a.o.createSession(d)}catch(f){a.l(new N(2,6,6005,f.message));return}a.h.C(e,"message",function(f){a.g&&a.m.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.M?a.I.push(f):Jf(a,f)});a.h.C(e,"keystatuseschange",function(f){return Vf(a,f)});a.j.set(e,{initData:c,loaded:!1,Nd:Infinity,Oa:null,type:d});try{c=a.m.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.l(b);return}a.m.logLicenseExchange&&Lc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.K.g){a.j["delete"](e);
196
- 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 Xf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=pf(a),a=qf(a,c,b));return a}
197
- function Jf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;L(function(y){switch(y.g){case 1:return c=b.target,a.m.logLicenseExchange&&Lc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.m.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=$e([e],a.m.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Qf(a.i.keySystem)&&Yf(g),h=Date.now(),B(y,2),l=a.B.sb.request(2,g),u(y,
198
- l.promise,4);case 4:k=y.h;wa(y,3);break;case 2:return m=E(y),n=new N(2,6,6007,m),a.l(n),d&&d.Oa&&d.Oa.reject(n),y["return"]();case 3:if(a.K.g)return y["return"]();a.G+=(Date.now()-h)/1E3;a.m.logLicenseExchange&&Lc(k.data);B(y,5);return u(y,c.update(k.data),7);case 7:wa(y,6);break;case 5:return p=E(y),t=new N(2,6,6008,p.message),a.l(t),d&&d.Oa&&d.Oa.reject(t),y["return"]();case 6:v=new Q("drmsessionupdate"),a.B.onEvent(v),d&&(d.Oa&&d.Oa.resolve(),w=new O(function(){d.loaded=!0;Wf(a)&&a.s.resolve()}),
199
- w.W(Zf)),z(y)}})}function Yf(a){var b=Dc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(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=Mc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
200
- function Vf(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(Qf(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Rb(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=Oc(h);a.oa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Oa&&(a.j["delete"](c),c.close()["catch"](function(){}));
201
- Wf(a)&&(a.s.resolve(),a.P.W($f))}function vf(a){var b=a.oa,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.l(new N(2,6,6014));a.B.Tc(sf(c))}
202
- function ag(){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,
203
- c],f=new Map,g=function(l){var m,n,p;return L(function(t){switch(t.g){case 1:return B(t,2),u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:wa(t,0);break;case 2:E(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](sf(f))})}
204
- function bg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).W(cg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);E(c);z(c)})}
205
- function yf(a){var b;return L(function(c){b=Array.from(a.j.entries());a.j.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return B(g,2),a.na||a.u.includes(e.sessionId)||"persistent-license"!==f.type?u(g,bg(e),5):u(g,e.remove(),5);if(2!=g.g)return wa(g,0);E(g);z(g)})})),0)})}
206
- function dg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ha:f.Ha},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ha=[];f.Ha=f.Ha.concat(e.initData||[]);f.Ha=f.Ha.concat(h.initData||[]);f.Ha=f.Ha.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ha.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
191
+ function Lf(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 N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):Gf(a,k)});a.o.A(c,"keystatuseschange",function(k){return Sf(a,k)});e={initData:null,loaded:!1,Ed:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;cf(a.j);
192
+ if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Tf(a)&&a.u.resolve();return h["return"](c);case 2:g=E(h),cf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
193
+ function Mf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):Gf(a,f)});a.o.A(e,"keystatuseschange",function(f){return Sf(a,f)});a.i.set(e,{initData:c,loaded:!1,Ed:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Cc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
194
+ 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 N(2,6,6006,f.message,f,h))}})}function Uf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=kf(a),a=lf(a,c,b));return a}
195
+ function Gf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;L(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Cc(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=Ve([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Nf(a.g.keySystem)&&Vf(g),h=Date.now(),C(w,2),l=a.D.mb.request(2,g),u(w,
196
+ l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Cc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=E(w),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),w["return"]();case 6:v=new Q("drmsessionupdate"),a.D.onEvent(v),d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;Tf(a)&&a.u.resolve()}),
197
+ y.S(Wf)),z(w)}})}function Vf(a){var b=vc(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=Dc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
198
+ function Sf(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(Nf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ib(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=Gc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
199
+ Tf(a)&&(a.u.resolve(),a.V.S(Xf))}function sf(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 N(2,6,6014));a.D.Nc(pf(c))}
200
+ function Yf(){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,
201
+ 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,sd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](pf(f))})}
202
+ function Zf(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S($f)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);z(c)})}
203
+ function vf(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.fa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Zf(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);z(g)})})),0)})}
204
+ function ag(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={Ca:f.Ca},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ca=[];f.Ca=f.Ca.concat(e.initData||[]);f.Ca=f.Ca.concat(h.initData||[]);f.Ca=f.Ca.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ca.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
207
205
  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,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
208
- initData:f.Ha,keyIds:g});break}}return c}function Hf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function wf(a){a.j.forEach(function(b,c){var d=b.Nd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.B.onExpirationUpdated(c.sessionId,e),b.Nd=e)})}function Wf(a){a=a.j.values();return ib(a,function(b){return b.loaded})}
209
- function Gf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
210
- function Uf(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={ta:g.ta},h=a.next()){g.ta=h.value;b.includes(g.ta.licenseServerUri)||b.push(g.ta.licenseServerUri);d.includes(g.ta.serverCertificateUri)||d.push(g.ta.serverCertificateUri);g.ta.serverCertificate&&(c.some(function(m){return function(n){return Mb(n,m.ta.serverCertificate)}}(g))||c.push(g.ta.serverCertificate));if(g.ta.initData){h={};for(var k=r(g.ta.initData),l=k.next();!l.done;h={zc:h.zc},l=k.next())h.zc=l.value,e.some(function(m){return function(n){var p=
211
- m.zc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Mb(n.initData,p.initData)}}(h))||e.push(h.zc)}if(g.ta.keyIds)for(h=r(g.ta.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
212
- function If(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||
213
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var cg=1,Zf=5,$f=.5,eg=new Ac(function(){return Pb(new Uint8Array([0]))});function fg(){}function gg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=hg[d.toLowerCase()]))return k["return"](e);if(f=ig(a))if(g=jg[f])return k["return"](g);return d?k.A(2):u(k,kg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=hg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
214
- function kg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=$e([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 ig(a){a=(new ec(a)).Aa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",fg);fg.unregisterParserByMime=function(a){delete hg[a]};fg.registerParserByMime=function(a,b){hg[a]=b};
215
- fg.registerParserByExtension=function(a,b){jg[a]=b};var hg={},jg={};function lg(a,b){this.T=Rb(a);this.h=b==mg;this.g=0}q=lg.prototype;q.qa=function(){return this.g<this.T.byteLength};q.ba=function(){return this.g};q.lf=function(){return this.T.byteLength};q.ca=function(){try{var a=this.T.getUint8(this.g);this.g+=1;return a}catch(b){throw ng();}};q.Pb=function(){try{var a=this.T.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ng();}};q.O=function(){try{var a=this.T.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};
216
- q.ze=function(){try{var a=this.T.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};q.Qb=function(){try{if(this.h){var a=this.T.getUint32(this.g,!0);var b=this.T.getUint32(this.g+4,!0)}else b=this.T.getUint32(this.g,!1),a=this.T.getUint32(this.g+4,!1)}catch(c){throw ng();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.hb=function(a){if(this.g+a>this.T.byteLength)throw ng();var b=Ob(this.T,this.g,a);this.g+=a;return b};
217
- q.skip=function(a){if(this.g+a>this.T.byteLength)throw ng();this.g+=a};q.Be=function(a){if(this.g<a)throw ng();this.g-=a};q.seek=function(a){if(0>a||a>this.T.byteLength)throw ng();this.g=a};q.qc=function(){for(var a=this.g;this.qa()&&0!=this.T.getUint8(this.g);)this.g+=1;a=Ob(this.T,a,this.g-a);this.g+=1;return Cc(a)};function ng(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",lg);lg.prototype.readTerminatedString=lg.prototype.qc;lg.prototype.seek=lg.prototype.seek;lg.prototype.rewind=lg.prototype.Be;
218
- lg.prototype.skip=lg.prototype.skip;lg.prototype.readBytes=lg.prototype.hb;lg.prototype.readUint64=lg.prototype.Qb;lg.prototype.readInt32=lg.prototype.ze;lg.prototype.readUint32=lg.prototype.O;lg.prototype.readUint16=lg.prototype.Pb;lg.prototype.readUint8=lg.prototype.ca;lg.prototype.getLength=lg.prototype.lf;lg.prototype.getPosition=lg.prototype.ba;lg.prototype.hasMoreData=lg.prototype.qa;var mg=1;lg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:mg};function og(){this.i=[];this.h=[];this.g=!1}q=og.prototype;q.box=function(a,b){var c=pg(a);this.i[c]=qg;this.h[c]=b;return this};q.V=function(a,b){var c=pg(a);this.i[c]=rg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new lg(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Vc(0,a,b,c)};
219
- q.Vc=function(a,b,c,d){var e=b.ba();if(d&&e+8>b.T.byteLength)this.g=!0;else{var f=b.O(),g=b.O(),h=!1;switch(f){case 0:f=b.T.byteLength-e;break;case 1:if(d&&b.ba()+8>b.T.byteLength){this.g=!0;return}f=b.Qb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==rg){if(d&&b.ba()+4>b.T.byteLength){this.g=!0;return}m=b.O();l=m>>>24;m&=16777215}g=e+f;c&&g>b.T.byteLength&&(g=b.T.byteLength);d&&g>b.T.byteLength?this.g=!0:(d=g-b.ba(),b=0<d?b.hb(d):new Uint8Array(0),b=new lg(b,0),k({parser:this,partialOkay:c||
220
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ba(),b.T.byteLength-b.ba()))}};function sg(a){for(var b=tg(a);a.reader.qa()&&!a.parser.g;)a.parser.Vc(a.start+b,a.reader,a.partialOkay)}function ug(a){var b=tg(a),c=a.reader.O();c=r(kb(c));for(var d=c.next();!d.done&&(a.parser.Vc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function vg(a){return function(b){a(b.reader.hb(b.reader.T.byteLength-b.reader.ba()))}}
221
- function pg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function wg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function tg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",og);og.headerSize=tg;og.typeToString=wg;og.allData=vg;og.sampleDescription=ug;og.children=sg;og.prototype.parseNext=og.prototype.Vc;og.prototype.parse=og.prototype.parse;og.prototype.stop=og.prototype.stop;
222
- og.prototype.fullBox=og.prototype.V;og.prototype.box=og.prototype.box;var qg=0,rg=1;function xg(a){function b(){d=!0}function c(l){f.push(l);sg(l)}a=Ob(a);var d=!1,e,f=[],g=[];(new og).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).V("stsd",function(l){e=l;f.push(l);ug(l)}).V("encv",b).V("enca",b).V("avc1",function(l){g.push({box:l,mc:1701733238})}).V("avc3",function(l){g.push({box:l,mc:1701733238})}).V("ac-3",function(l){g.push({box:l,mc:1701733217})}).V("ec-3",function(l){g.push({box:l,mc:1701733217})}).V("mp4a",function(l){g.push({box:l,mc:1701733217})}).parse(a);
223
- if(d)return a;if(0==g.length||!e)throw db(Oc(a)),new N(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=yg(a,e,k.box,f,k.mc);return a}
224
- function yg(a,b,c,d,e){var f=zg.value(),g=a.subarray(c.start,c.start+c.size),h=Rb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Rb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ag(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=yd("Xbox One")?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=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ag(e,d.start,d.size+k.byteLength);k=Rb(e,b.start);b=tg(b);
225
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ag(a,b,c){a=Rb(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 zg=new Ac(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 Bg(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=Cg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){t=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
226
- t||-1===v)p=Dg(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(w=p[t]){var y=w.l,x=w.i,D=w.j,C=w.h;if(y!=h||x!=k||D!=l||C!=m)n.payload&&a.nestedCues.push(n),n=Cg(d,e,y,x,D,C),h=y,k=x,l=D,m=C;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Dg(d,e),a.nestedCues.push(n));n=Cg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
227
- function Cg(a,b,c,d,e,f){a=new rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Dg(a,b){var c=new rb(a,b,"");c.lineBreak=!0;return c}function Eg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Fg(a,b){this.i=[];this.g=1;this.h=0;this.F=a;this.u=b;this.j=this.o=!1;this.l="white";this.s="black";Gg(this)}function Hg(a,b,c){return Bg(new rb(b,c,""),"CC"+(a.F<<1|a.u+1),a.i,b,c)}function Gg(a){Ig(a,0,15);a.g=1}function Jg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Kg:d=Lg.has(c)?Lg.get(c):String.fromCharCode(c);break;case Mg:d=Ng.get(c);break;case Og:a.i[a.g].pop();d=Pg.get(c);break;case Qg:a.i[a.g].pop(),d=Rg.get(c)}d&&a.i[a.g].push(new Eg(d,a.o,a.j,a.s,a.l))}}
228
- function Sg(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 Ig(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
229
- var Kg=0,Mg=1,Og=2,Qg=3,Lg=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"]]),Ng=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"]]),Pg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
230
- [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"]]),Rg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
231
- [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 Tg(a,b){this.h=Ug;this.s=new Fg(a,b);this.i=new Fg(a,b);this.l=new Fg(a,b);this.g=this.i;this.j=0;this.o=null}function Vg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Wg&&a.h!==Xg&&(e=Hg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ig(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ig(c,0,15),d.g=15);a.h=Wg;d.h=b;return e}function Yg(a){a.h=Zg;a.g=a.l;a.g.h=0}function $g(a){Ya("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Xg}
232
- var Ug=0,Zg=1,Wg=3,Xg=4,ah="black green blue cyan red yellow magenta black".split(" "),bh="white green blue cyan red yellow magenta white_italics".split(" ");function ch(){this.l=!1;this.G=this.J=0;this.I=dh;this.i=[];this.g=this.h=this.j=0;this.F=this.s=!1;this.u="white";this.o="black";eh(this)}function eh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(fh())}function fh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function gh(a,b){hh(a)&&(a.i[a.h][a.g]=new Eg(b,a.F,a.s,a.o,a.u),a.g++)}function hh(a){var b=a.g<a.G&&0<=a.g;return a.h<a.J&&0<=a.h&&b}ch.prototype.isVisible=function(){return this.l};
233
- function ih(a,b,c){var d=new rb(a.j,b,"");d.textAlign=a.I===jh?"left":a.I===kh?"right":vb;if(c=Bg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var jh=0,kh=1,dh=2;function lh(){this.i=[];this.h=null;this.g=0}function mh(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 nh(a.h)),a.h=null,a.g=0))}function nh(a){this.g=0;this.h=a}nh.prototype.qa=function(){return this.g<this.h.length};nh.prototype.ba=function(){return this.g};function oh(a){if(!a.qa())throw new N(2,2,3E3);return a.h[a.g++]}nh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function ph(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
234
- function qh(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=oh(b).value;b=null;c=r(rh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),eh(e);return b}if(137===c)for(b=oh(b).value,b=r(rh(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=oh(b).value;b=null;c=r(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),e.l=!1;return b}if(139===c){c=oh(b).value;
235
- b=null;c=r(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ih(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=oh(b).value,sh(a,b,d);if(143===c)return d=sh(a,255,d),th(a),d;if(144===c)b.skip(1),d=oh(b).value,a.g&&(a.g.s=0<(d&128),a.g.F=0<(d&64));else if(145===c)d=oh(b).value,c=oh(b).value,b.skip(1),a.g&&(b=uh((c&48)>>4,(c&12)>>2,c&3),a.g.u=uh((d&48)>>4,(d&12)>>2,d&3),a.g.o=b);else if(146===c)d=oh(b).value,b=oh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
236
- b.skip(1),d=oh(b).value,b.skip(1),a.g&&(a.g.I=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ch;f.j=d;a.h[c]=f}d=oh(b).value;oh(b);oh(b);f=oh(b).value;var g=oh(b).value;b=oh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.F=!1,b.s=!1,b.u="white",b.o="black");b=a.h[c];b.l=0<(d&32);b.J=(f&15)+1;b.G=(g&63)+1;a.g=a.h[c]}}}return null}
237
- var rh=function vh(a,b){var d,e;return Ha(vh,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?u(f,d,5):f.A(5):f.A(0);b>>=1;d++;return f.A(2)})};function sh(a,b,c){var d=null;b=r(rh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ih(f,c,a.i));a.h[e]=null}return d}function th(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function uh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return wh[a<<2|b<<1|c]}
238
- var xh=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"]]),wh="black blue green cyan red magenta yellow white".split(" ");function yh(){this.h=[];this.g=[];this.i=new lh;this.l=0;this.u=new Map([["CC1",new Tg(0,0)],["CC2",new Tg(0,1)],["CC3",new Tg(1,0)],["CC4",new Tg(1,1)]]);this.s=this.o=0;this.j=new Map;zh(this)}function zh(a){a.o=0;a.s=0;a=r(a.u.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.o=null,Gg(b.i),Gg(b.l),Gg(b.s)}
239
- function Ah(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=r(a.h),e=d.next();!e.done;e=d.next())(e=Bh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())mh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ch(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
240
- function Bh(a,b){var c=b.type;if(16===(b.Ca&112)){var d=b.Ca>>3&1;0===c?a.o=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.o)+1));if(255===b.Ca&&255===b.Va||!b.Ca&&!b.Va||!Dh(b.Ca)||!Dh(b.Va))return 45<=++a.l&&zh(a),null;a.l=0;b.Ca&=127;b.Va&=127;if(!b.Ca&&!b.Va)return null;d=null;if(16===(b.Ca&112))a:{var e=b.Ca;d=b.Va;if(c.o===(e<<8|d))c.o=null;else if(c.o=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=bh[f]:7===f&&(h=!0);
241
- d=1===(d&1);if(c.h!==Xg){f=c.g;if(c.h===Wg&&e!==f.g){var k=1+e-f.h;Sg(f,k,1+f.g-f.h,f.h);Ig(f,0,k-1);Ig(f,e+1,15-e)}f.g=e;c.g.o=d;c.g.j=h;c.g.l=g;c.g.s="black"}}else if(17===(e&247)&&32===(d&240))c.g.o=!1,c.g.j=!1,c.g.l="white",Jg(c.g,Kg,32),g=!1,e=bh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.o=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=ah[(d&14)>>1]),c.g.s=g;else if(17===(e&247)&&48===(d&240))Jg(c.g,Mg,d);else if(18===
242
- (e&246)&&32===(d&224))Jg(c.g,e&1?Qg:Og,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Va){case 32:Yg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Vg(c,2,d);break;case 38:e=Vg(c,3,d);break;case 39:e=Vg(c,4,d);break;case 40:Jg(c.g,Kg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Gg(c.s);$g(c);break;case 43:$g(c);break;case 44:e=c.i;g=null;c.h!==Xg&&(g=Hg(e,c.j,d));Ig(e,0,15);e=g;break;case 45:e=c.g;c.h!==Wg?e=null:(g=Hg(e,c.j,d),h=e.g-e.h+1,Sg(e,h-1,h,e.h),Ig(e,
243
- 0,h-1),Ig(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ig(c.l,0,15);break;case 47:e=null,c.h!==Xg&&(e=Hg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Yg(c),c.j=d}d=e;break a}d=null}else e=b.Va,Jg(c.g,Kg,b.Ca),Jg(c.g,Kg,e);return d}
244
- function Ch(a,b){var c=[];try{for(;b.qa();){var d=oh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=oh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new ph(e));for(var g=a.j.get(e),h=b.ba();b.ba()-h<f;){e=b;var k=oh(e),l=k.value,m=k.pts;if(16===l){var n=oh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!hh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.G-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=ih(t,p,g.i));if(t.h+1>=t.J){p=t;for(var v=0,w=1;15>w;w++,
245
- v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=fh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=ih(t,p,g.i));t.i[t.h]=fh();t.g=0;break;case 12:t.isVisible()&&(e=ih(t,p,g.i)),eh(t),p=t,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=qh(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?gh(g.g,"\u266a"):gh(g.g,
246
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&gh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(xh.has(e)){var x=xh.get(e);gh(g.g,x)}else gh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?gh(g.g,"_"):gh(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Ya("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Dh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Eh(){}var Gh=function Fh(a,b){var d,e,f,g;return Ha(Fh,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(ja(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.A(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.A(4):u(h,d.subarray(e,e+g),4)}e+=g;return h.A(2)})};function Hh(a,b){var c=null,d=null,e=a.O();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:e,ke:c,$e:d}}function Ih(a,b){return{rd:1==b?a.Qb():a.O()}}function Jh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
247
- function Kh(a,b,c){var d=a.O(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(kb(d)),g=f.next();!g.done;g=f.next())g={Td:null,sampleSize:null,Xc:null},c&256&&(g.Td=a.O()),c&512&&(g.sampleSize=a.O()),c&1024&&a.skip(4),c&2048&&(g.Xc=0==b?a.O():a.ze()),e.push(g);return{Yg:d,Ce:e}};function Lh(){this.j=new Eh;this.i=new Map;this.h=this.g=0}
248
- Lh.prototype.init=function(a){var b=this,c=[],d=[];(new og).box("moov",sg).box("mvex",sg).V("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.O();f=f.O();b.g=e;b.h=f}).box("trak",sg).V("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.O();c.push(e)}).box("mdia",sg).V("mdhd",function(e){e=Jh(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])})};
249
- Lh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new og).box("moof",sg).box("traf",sg).V("trun",function(k){f=Kh(k.reader,k.version,k.flags).Ce}).V("tfhd",function(k){k=Hh(k.reader,k.flags);d=k.ke||b.g;e=k.$e||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).V("tfdt",function(k){g=Ih(k.reader,k.version).rd}).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,t=f,v=0,w=p;for(t.length&&(w=t[0].sampleSize||p);k.qa();){var y=k.O();if(6==
250
- (k.ca()&31)){var x=0;t.length>v&&(x=t[v].Xc||0);x=(l+x)/m;for(var D=r(Gh(b.j,k.hb(y-1))),C=D.next();!C.done;C=D.next())c.push({Qf:C.value,pts:x})}else k.skip(y-1);w-=y+4;0==w&&(l=t.length>v?l+(t[v].Td||n):l+n,v++,w=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Mh(){this.h=new Lh;this.g=new yh}Mh.prototype.init=function(a){this.h.init(a)};
251
- function Nh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ob(e.Qf);if(0<f.length&&(d=a.g,e=e.pts,f=new lg(f,0),181===f.ca()&&49===f.Pb()&&1195456820===f.O()&&3===f.ca())){var g=f.ca();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ca(),l=(k&4)>>2,m=f.ca(),n=f.ca();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ca:m,Va: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 Ah(a.g)}
252
- ;function Oh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ph(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 Qh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Rh(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}
253
- function Sh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Rh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Rh(a){if(!a)return[];for(var b=[],c=r(kb(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};function Th(a,b,c,d){var e=this;this.g=a;this.o=c;this.j={};this.J={};this.i=null;this.M=d||function(){};this.l={};this.h=new jf;this.u={};this.F=b;this.G=new zc;this.s=Uh(this,this.G);this.K=new gf(function(){return Vh(e)});this.I=""}function Uh(a,b){var c=new MediaSource;a.h.ya(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Wh(c);a.g.src=a.I;return c}q=Th.prototype;q.destroy=function(){return this.K.destroy()};
254
- function Vh(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"](Yb)),f=r(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.o&&b.push(a.o.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(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.o=null;a.j={};a.u={};a.F=null;a.l=
206
+ initData:f.Ca,keyIds:g});break}}return c}function Ef(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function tf(a){a.i.forEach(function(b,c){var d=b.Ed,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ed=e)})}function Tf(a){a=a.i.values();return nf(a,function(b){return b.loaded})}
207
+ function Df(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",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)}
208
+ function Rf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,e.some(function(m){return function(n){var p=
209
+ m.rc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.rc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
210
+ function Ff(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||
211
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var $f=1,Wf=5,Xf=.5,bg=new sc(function(){return Gb(new Uint8Array([0]))});function cg(){}function dg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=eg[d.toLowerCase()]))return k["return"](e);if(f=fg(a))if(g=gg[f])return k["return"](g);return d?k.B(2):u(k,hg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=eg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
212
+ function hg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Ve([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 fg(a){a=(new Xb(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",cg);cg.unregisterParserByMime=function(a){delete eg[a]};cg.registerParserByMime=function(a,b){eg[a]=b};
213
+ cg.registerParserByExtension=function(a,b){gg[a]=b};var eg={},gg={};function ig(a,b){this.O=Ib(a);this.h=b==jg;this.g=0}r=ig.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.af=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw kg();}};r.Ib=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw kg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw kg();}};
214
+ r.qe=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw kg();}};r.Jb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw kg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw kg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
215
+ r.skip=function(a){if(this.g+a>this.O.byteLength)throw kg();this.g+=a};r.se=function(a){if(this.g<a)throw kg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw kg();this.g=a};r.jc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return uc(a)};function kg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",ig);ig.prototype.readTerminatedString=ig.prototype.jc;ig.prototype.seek=ig.prototype.seek;ig.prototype.rewind=ig.prototype.se;
216
+ ig.prototype.skip=ig.prototype.skip;ig.prototype.readBytes=ig.prototype.Za;ig.prototype.readUint64=ig.prototype.Jb;ig.prototype.readInt32=ig.prototype.qe;ig.prototype.readUint32=ig.prototype.M;ig.prototype.readUint16=ig.prototype.Ib;ig.prototype.readUint8=ig.prototype.Y;ig.prototype.getLength=ig.prototype.af;ig.prototype.getPosition=ig.prototype.X;ig.prototype.hasMoreData=ig.prototype.ma;var jg=1;ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jg};function lg(){this.i=[];this.h=[];this.g=!1}r=lg.prototype;r.box=function(a,b){var c=mg(a);this.i[c]=ng;this.h[c]=b;return this};r.R=function(a,b){var c=mg(a);this.i[c]=og;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new ig(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Pc(0,a,b,c)};
217
+ r.Pc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==og){if(d&&b.X()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.X(),b=0<d?b.Za(d):new Uint8Array(0),b=new ig(b,0),k({parser:this,partialOkay:c||
218
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function pg(a){for(var b=qg(a);a.reader.ma()&&!a.parser.g;)a.parser.Pc(a.start+b,a.reader,a.partialOkay)}function rg(a){for(var b=qg(a),c=a.reader.M(),d=0;d<c&&(a.parser.Pc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function sg(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
219
+ function mg(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 tg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function qg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",lg);lg.headerSize=qg;lg.typeToString=tg;lg.allData=sg;lg.sampleDescription=rg;lg.children=pg;lg.prototype.parseNext=lg.prototype.Pc;lg.prototype.parse=lg.prototype.parse;lg.prototype.stop=lg.prototype.stop;
220
+ lg.prototype.fullBox=lg.prototype.R;lg.prototype.box=lg.prototype.box;var ng=0,og=1;function ug(a){function b(){d=!0}function c(l){f.push(l);pg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new lg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(l){e=l;f.push(l);rg(l)}).R("encv",b).R("enca",b).R("avc1",function(l){g.push({box:l,hc:1701733238})}).R("avc3",function(l){g.push({box:l,hc:1701733238})}).R("ac-3",function(l){g.push({box:l,hc:1701733217})}).R("ec-3",function(l){g.push({box:l,hc:1701733217})}).R("mp4a",function(l){g.push({box:l,hc:1701733217})}).parse(a);
221
+ if(d)return a;if(0==g.length||!e)throw ab(Gc(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=vg(a,e,k.box,f,k.hc);return a}
222
+ function vg(a,b,c,d,e){var f=wg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);xg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=rd()?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,xg(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=qg(b);a=k.getUint32(b);
223
+ k.setUint32(b,a+1);return e}function xg(a,b,c){a=Ib(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 wg=new sc(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 yg(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=zg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){q=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
224
+ q||-1===v)p=Ag(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var w=y.l,x=y.i,D=y.j,B=y.h;if(w!=h||x!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=zg(d,e,w,x,D,B),h=w,k=x,l=D,m=B;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ag(d,e),a.nestedCues.push(n));n=zg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
225
+ function zg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Ag(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Bg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Cg(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";Dg(this)}function Eg(a,b,c){return yg(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Dg(a){Fg(a,0,15);a.g=1}function Gg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Hg:d=Ig.has(c)?Ig.get(c):String.fromCharCode(c);break;case Jg:d=Kg.get(c);break;case Lg:a.i[a.g].pop();d=Mg.get(c);break;case Ng:a.i[a.g].pop(),d=Og.get(c)}d&&a.i[a.g].push(new Bg(d,a.m,a.j,a.o,a.l))}}
226
+ function Pg(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 Fg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
227
+ var Hg=0,Jg=1,Lg=2,Ng=3,Ig=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"]]),Kg=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"]]),Mg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
228
+ [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"]]),Og=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
229
+ [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 Qg(a,b){this.h=Rg;this.o=new Cg(a,b);this.i=new Cg(a,b);this.l=new Cg(a,b);this.g=this.i;this.j=0;this.m=null}function Sg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Tg&&a.h!==Ug&&(e=Eg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Fg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Fg(c,0,15),d.g=15);a.h=Tg;d.h=b;return e}function Vg(a){a.h=Wg;a.g=a.l;a.g.h=0}function Xg(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Ug}
230
+ var Rg=0,Wg=1,Tg=3,Ug=4,Yg="black green blue cyan red yellow magenta black".split(" "),Zg="white green blue cyan red yellow magenta white_italics".split(" ");function $g(){this.l=!1;this.C=this.F=0;this.D=ah;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";bh(this)}function bh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ch())}function ch(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function dh(a,b){eh(a)&&(a.i[a.h][a.g]=new Bg(b,a.u,a.o,a.m,a.s),a.g++)}function eh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}$g.prototype.isVisible=function(){return this.l};
231
+ function fh(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===gh?"left":a.D===hh?"right":mb;if(c=yg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var gh=0,hh=1,ah=2;function ih(){this.i=[];this.h=null;this.g=0}function jh(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 kh(a.h)),a.h=null,a.g=0))}function kh(a){this.g=0;this.h=a}kh.prototype.ma=function(){return this.g<this.h.length};kh.prototype.X=function(){return this.g};function lh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}kh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function mh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
232
+ function nh(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=lh(b).value;b=null;c=t(oh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fh(e,d,a.i)),bh(e);return b}if(137===c)for(b=lh(b).value,b=t(oh(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=lh(b).value;b=null;c=t(oh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fh(e,d,a.i)),e.l=!1;return b}if(139===c){c=lh(b).value;
233
+ b=null;c=t(oh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=fh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=lh(b).value,ph(a,b,d);if(143===c)return d=ph(a,255,d),qh(a),d;if(144===c)b.skip(1),d=lh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=lh(b).value,c=lh(b).value,b.skip(1),a.g&&(b=rh((c&48)>>4,(c&12)>>2,c&3),a.g.s=rh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=lh(b).value,b=lh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
234
+ b.skip(1),d=lh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new $g;f.j=d;a.h[c]=f}d=lh(b).value;lh(b);lh(b);f=lh(b).value;var g=lh(b).value;b=lh(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.C=(g&63)+1;a.g=a.h[c]}}}return null}function oh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
235
+ function ph(a,b,c){var d=null;b=t(oh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=fh(f,c,a.i));a.h[e]=null}return d}function qh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function rh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return sh[a<<2|b<<1|c]}
236
+ var th=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"]]),sh="black blue green cyan red magenta yellow white".split(" ");function uh(){this.h=[];this.g=[];this.i=new ih;this.l=0;this.s=new Map([["CC1",new Qg(0,0)],["CC2",new Qg(0,1)],["CC3",new Qg(1,0)],["CC4",new Qg(1,1)]]);this.o=this.m=0;this.j=new Map;vh(this)}function vh(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,Dg(b.i),Dg(b.l),Dg(b.o)}
237
+ function wh(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=xh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())jh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=yh(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
238
+ function xh(a,b){var c=b.type;if(16===(b.ya&112)){var d=b.ya>>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.ya&&255===b.Oa||!b.ya&&!b.Oa||!zh(b.ya)||!zh(b.Oa))return 45<=++a.l&&vh(a),null;a.l=0;b.ya&=127;b.Oa&=127;if(!b.ya&&!b.Oa)return null;d=null;if(16===(b.ya&112))a:{var e=b.ya;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=Zg[f]:7===f&&(h=!0);
239
+ d=1===(d&1);if(c.h!==Ug){f=c.g;if(c.h===Tg&&e!==f.g){var k=1+e-f.h;Pg(f,k,1+f.g-f.h,f.h);Fg(f,0,k-1);Fg(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",Gg(c.g,Hg,32),g=!1,e=Zg[(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=Yg[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Gg(c.g,Jg,d);else if(18===
240
+ (e&246)&&32===(d&224))Gg(c.g,e&1?Ng:Lg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Oa){case 32:Vg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Sg(c,2,d);break;case 38:e=Sg(c,3,d);break;case 39:e=Sg(c,4,d);break;case 40:Gg(c.g,Hg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Dg(c.o);Xg(c);break;case 43:Xg(c);break;case 44:e=c.i;g=null;c.h!==Ug&&(g=Eg(e,c.j,d));Fg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Tg?e=null:(g=Eg(e,c.j,d),h=e.g-e.h+1,Pg(e,h-1,h,e.h),Fg(e,
241
+ 0,h-1),Fg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Fg(c.l,0,15);break;case 47:e=null,c.h!==Ug&&(e=Eg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Vg(c),c.j=d}d=e;break a}d=null}else e=b.Oa,Gg(c.g,Hg,b.ya),Gg(c.g,Hg,e);return d}
242
+ function yh(a,b){var c=[];try{for(;b.ma();){var d=lh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=lh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new mh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=lh(e),l=k.value,m=k.pts;if(16===l){var n=lh(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:!eh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=fh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
243
+ v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=ch()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=fh(q,p,g.i));q.i[q.h]=ch();q.g=0;break;case 12:q.isVisible()&&(e=fh(q,p,g.i)),bh(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=nh(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?dh(g.g,"\u266a"):dh(g.g,
244
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&dh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(th.has(e)){var x=th.get(e);dh(g.g,x)}else dh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?dh(g.g,"_"):dh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function zh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ah(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,ce:c,Re:d}}function Bh(a,b){return{ld:1==b?a.Jb():a.M()}}function Ch(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
245
+ function Dh(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Ld:null,sampleSize:null,Rc:null};c&256&&(g.Ld=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Rc=0==b?a.M():a.qe());e.push(g)}return{Lg:d,te:e}};function Eh(){this.i=new Map;this.h=this.g=0}
246
+ Eh.prototype.init=function(a){var b=this,c=[],d=[];(new lg).box("moov",pg).box("mvex",pg).R("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",pg).R("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",pg).R("mdhd",function(e){e=Ch(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])})};
247
+ Eh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new lg).box("moof",pg).box("traf",pg).R("trun",function(k){f=Dh(k.reader,k.version,k.flags).te}).R("tfhd",function(k){k=Ah(k.reader,k.flags);d=k.ce||b.g;e=k.Re||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).R("tfdt",function(k){g=Bh(k.reader,k.version).ld}).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,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var w=k.M();if(6==
248
+ (k.Y()&31)){var x=0;q.length>v&&(x=q[v].Rc||0);x=(l+x)/m;for(var D=[],B,A=k.Za(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ja(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Ff:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=q.length>v?l+(q[v].Ld||n):l+n,v++,y=q.length>
249
+ v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Fh(){this.h=new Eh;this.g=new uh}Fh.prototype.init=function(a){this.h.init(a)};
250
+ function Gh(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=Fb(e.Ff);if(0<f.length&&(d=a.g,e=e.pts,f=new ig(f,0),181===f.Y()&&49===f.Ib()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,ya: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 wh(a.g)}
251
+ ;function Hh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ih(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 Jh(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(Kh(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}
252
+ function Lh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Kh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Kh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Mh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new df;this.s={};this.u=b;this.D=new rc;this.m=Nh(this,this.D);this.C=new bf(function(){return Oh(e)});this.F=""}function Nh(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=Ph(c);a.j.src=a.F;return c}r=Mh.prototype;r.destroy=function(){return this.C.destroy()};
253
+ function Oh(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"](Qb)),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.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=
255
254
  {};z(l)})}
256
- 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=yc,u(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={va:e.va},g=f.next())e.va=g.value,h=a.get(e.va),k=Vc(h.mimeType,h.codecs),e.va==d.ea?Xh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Rc(k,e.va)||(c.u[e.va]=new Qc,k=Tc(e.va,k)),l=c.s.addSourceBuffer(k),c.h.C(l,"error",function(n){return function(){c.l[n.va][0].p.reject(new N(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.C(l,"updateend",function(n){return function(){return Yh(c,n.va)}}(e)),
257
- c.j[e.va]=l,c.J[e.va]=k,c.l[e.va]=[]);z(m)})};function Xh(a,b){a.i||(a.i=new Zc(a.o));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.u=$b(ad[b]))}function Zh(a){return a.s?"ended"==a.s.readyState:!0}function $h(a,b){if(b==xc)var c=a.i.g;else c=ai(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 bi(a,b){return b==xc?a.i.h:Oh(ai(a,b))}
258
- function ci(a,b,c){if(b==xc)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ai(a,b);return Qh(a,c)}q.gb=function(){var a={total:Rh(this.g.buffered),audio:Rh(ai(this,"audio")),video:Rh(ai(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 ai(a,b){try{return a.j[b].buffered}catch(c){return null}}
259
- function di(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return L(function(v){if(1==v.g){g=yc;if(b==g.ea)return u(v,bd(a.i,c,d,e),0);if(a.u[b])return u(v,Uc(a.u[b],c),10);if(f)return a.i||Xh(a,"text/vtt"),null==d&&null==e?a.F.init(c):(h=Nh(a.F,c),h.length&&(k=a.j[g.Ta].timestampOffset,gd(a.i,h,d,e,k))),c=ei(a,c,d,b),u(v,fi(a,b,function(){a.j[b].appendBuffer(c)}),0);c=ei(a,c,d,b);return u(v,fi(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||Xh(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.M(l.metadata,
260
- m,e));l.captions&&l.captions.length&&(n=a.j[g.Ta].timestampOffset,p=ed(l.captions),gd(a.i,p,d,e,n));t=l.data;t=ei(a,t,d,b);return u(v,fi(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function gi(a,b){var c=bi(a,"video")||0;dd(a.i,b,c)}function ji(a){a.i&&dd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return L(function(f){e=yc;return a==e.ea?u(f,d.i.remove(b,c),0):u(f,fi(d,a,function(){c<=b?Yh(d,a):d.j[a].remove(b,c)}),0)})};
261
- function ki(a,b){var c;return L(function(d){c=yc;return b==c.ea?a.i?u(d,a.i.remove(0,Infinity),0):d["return"]():u(d,fi(a,b,function(){var e=a.s.duration;0>=e?Yh(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return L(function(d){c=yc;return a==c.ea?d["return"]():u(d,fi(b,a,function(){b.g.currentTime-=.001;Yh(b,a)}),0)})};
262
- function li(a,b,c,d,e){var f;return L(function(g){f=yc;return b==f.ea?(a.i.F=c,cd(a.i,d,e),g["return"]()):u(g,Promise.all([fi(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;Yh(a,b)}),fi(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;Yh(a,b)}),fi(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;Yh(a,b)})]),0)})}
263
- q.endOfStream=function(a){var b=this;return L(function(c){return u(c,mi(b,function(){Zh(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.Na=function(a){var b=this;return L(function(c){return u(c,mi(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function Yh(a,b){var c=a.l[b][0];c&&(c.p.resolve(),ni(a,b))}function fi(a,b,c){hf(a.K);c={start:c,p:new zc};a.l[b].push(c);1==a.l[b].length&&oi(a,b);return c.p}
264
- function mi(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:hf(a.K);c=[];d={};for(e in a.j)d.Vb=new zc,f={start:function(l){return function(){return l.Vb.resolve()}}(d),p:d.Vb},a.l[e].push(f),c.push(d.Vb),1==a.l[e].length&&f.start(),d={Vb:d.Vb};B(k,2);return u(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.j)ni(a,h)}z(k)}})}function ni(a,b){a.l[b].shift();oi(a,b)}
265
- function oi(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)),ni(a,b)}}function ei(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(xd()||yd("Xbox One"))&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=xg(b));return b}var Wh=window.URL.createObjectURL;function pi(a,b,c,d){this.ua=a;this.sa=b;this.ja=c;this.Id=void 0===d?null:d}pi.prototype.jc=function(){return this.sa};pi.prototype.ec=function(){return this.ja};function qi(a,b){return a&&b?a.jc()==b.jc()&&a.ec()==b.ec()&&qb(a.ua(),b.ua()):a==b}M("shaka.media.InitSegmentReference",pi);pi.prototype.getEndByte=pi.prototype.ec;pi.prototype.getStartByte=pi.prototype.jc;
266
- function ri(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.sa=d;this.ja=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=ri.prototype;q.ua=function(){return this.j()};q.xf=function(){return this.startTime};q.jf=function(){return this.endTime};q.jc=function(){return this.sa};q.ec=function(){return this.ja};q.Df=function(){return this.tilesLayout};
267
- q.Cf=function(){return this.i};M("shaka.media.SegmentReference",ri);ri.prototype.getTileDuration=ri.prototype.Cf;ri.prototype.getTilesLayout=ri.prototype.Df;ri.prototype.getEndByte=ri.prototype.ec;ri.prototype.getStartByte=ri.prototype.jc;ri.prototype.getEndTime=ri.prototype.jf;ri.prototype.getStartTime=ri.prototype.xf;ri.prototype.getUris=ri.prototype.ua;function S(a,b,c){this.j=a;this.Wc=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.F=0;this.G=void 0===c?!0:c;this.I=0}q=S.prototype;q.getDuration=function(){return this.l};q.qf=function(){return this.g};q.Na=function(a){this.l=a};q.wf=function(){return this.j};q.He=function(a){this.s=a};q.uc=function(a){this.u=a};q.$d=function(a){this.o=a};q.fg=function(a){this.Wc=a};q.hf=function(){return this.Wc};
268
- q.Mb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Md(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.G&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.Md=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.Ld=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.Y=function(){return Infinity==this.l&&!this.u};
269
- q.rb=function(){return Infinity!=this.l&&!this.u};q.Xa=function(){return Math.max(this.F,this.mb()-this.o)};q.Ie=function(a){this.F=a};q.mb=function(){return this.Y()||this.rb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.ic=function(a){var b=Math.max(this.i,this.F);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.mb()-this.o+a,this.Wa()))};q.Ib=function(){return this.ic(0)};
270
- q.Wa=function(){return Math.max(0,this.mb()-(this.Y()||this.rb()?this.Wc:0))};q.Le=function(){return null==this.j||null!=this.h&&this.G?!1:!0};q.Ge=function(a){this.I=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.Ge;S.prototype.usingPresentationStartTime=S.prototype.Le;S.prototype.getSeekRangeEnd=S.prototype.Wa;S.prototype.getSeekRangeStart=S.prototype.Ib;S.prototype.getSafeSeekRangeStart=S.prototype.ic;S.prototype.getSegmentAvailabilityEnd=S.prototype.mb;
271
- S.prototype.setUserSeekStart=S.prototype.Ie;S.prototype.getSegmentAvailabilityStart=S.prototype.Xa;S.prototype.isInProgress=S.prototype.rb;S.prototype.isLive=S.prototype.Y;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Ld;S.prototype.notifyMinSegmentStartTime=S.prototype.Md;S.prototype.notifySegments=S.prototype.Mb;S.prototype.getDelay=S.prototype.hf;S.prototype.setDelay=S.prototype.fg;S.prototype.setSegmentAvailabilityDuration=S.prototype.$d;
272
- S.prototype.setStatic=S.prototype.uc;S.prototype.setClockOffset=S.prototype.He;S.prototype.getPresentationStartTime=S.prototype.wf;S.prototype.setDuration=S.prototype.Na;S.prototype.getMaxSegmentDuration=S.prototype.qf;S.prototype.getDuration=S.prototype.getDuration;function si(a,b){this.j=a;this.o=ti(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}si.prototype.release=function(){this.j=null;this.i=function(){}};function ui(a,b){a.i=b}function vi(a){this.g=a}function ti(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Rh(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 wi(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.m=c;this.u=e;this.h=new jf;this.s=!1;this.G=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.C(a,"waiting",function(){return xi(f)});this.l=(new O(function(){xi(f)})).Fa(.25)}wi.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.F=this.u=null};wi.prototype.Od=function(){this.o=!0;xi(this)};
273
- function xi(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.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=ti(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=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.m.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Sh(b,g,a.m.gapDetectionThreshold);if(!(null==
274
- c||0==c&&!a.o||(d=b.start(c),d>=a.F.Wa()))){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.m.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function yi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zi.value().get(b),c.ya(a,b,d))}var zi=new Ac(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ai(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new jf;this.i=new Bi(a);yi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ci(d,d.j)})}Ai.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 Di(a){return a.o?a.g.currentTime:a.j}function Ei(a,b){0<a.g.readyState?Fi(a.i,b):yi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ci(a,a.j)})}
275
- function Ci(a,b){.001>Math.abs(a.g.currentTime-b)?Gi(a):(a.h.ya(a.g,"seeking",function(){Gi(a)}),Fi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Gi(a){a.o=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function Bi(a){var b=this;this.h=a;this.o=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Bi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
276
- function Fi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.o;a.h.currentTime=b;a.g.Fa(.1)};function Hi(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.ya(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 jf;yi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Hi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Hi.prototype.o=function(a){this.i=this.j?this.i:a};Hi.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Hi.prototype.G=function(){};
277
- function Ii(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.m=c;this.F=e;this.u=null;this.j=new wi(a,b.presentationTimeline,c,Ji(a,c),f);this.h=new Ai(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Di(g.h);h=Ki(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Ei(g.h,h);h=void 0;break a}g.F();h=void 0}return h},Li(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Di(g.h),k=g.g.Ib(),l=g.g.Wa();3>l-k&&(k=
278
- l-3);h<k&&(h=Ki(g,h),g.i.currentTime=h)}})).Fa(.25)}Ii.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.m=null;this.F=function(){}};Ii.prototype.o=function(a){Ei(this.h,a)};Ii.prototype.l=function(){var a=Di(this.h);return 0<this.i.readyState&&!this.i.paused?Mi(this,a):a};
279
- function Li(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ib():a.g.Wa():0>b&&(b=a.g.Wa()+b);return Ni(a,Mi(a,b))}Ii.prototype.G=function(){this.j.Od()};function Ni(a,b){var c=a.g.getDuration();return b>=c?c-a.m.durationBackoff:b}function Ki(a,b){var c=Math.max(a.I,a.m.rebufferingGoal),d=a.m.safeSeekOffset,e=a.g.Ib(),f=a.g.Wa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ic(c),k=a.g.ic(d);c=a.g.ic(c+d);return b>=g?Ni(a,b):b>f?f:b<e?Ph(a.i.buffered,k)?k:c:b>=h||Ph(a.i.buffered,b)?b:c}
280
- function Mi(a,b){var c=a.g.Ib();if(b<c)return c;c=a.g.Wa();return b>c?c:b}function Ji(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new si(new vi(a),b.stallThreshold);ui(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.N=a;this.g=null;this.h=0;this.i=!1}q=T.prototype;q.destroy=function(){Tb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.N=[],this.g&&this.g.stop(),this.g=null)};q.Kf=function(){this.i=!0};
281
- q.find=function(a){for(var b=this.N.length-1,c=b;0<=c;--c){var d=this.N[c],e=c<b?this.N[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.N.length&&a<this.N[0].startTime?this.h:null};q.get=function(a){if(0==this.N.length)return null;a-=this.h;return 0>a||a>=this.N.length?null:this.N[a]};q.offset=function(a){if(!this.i)for(var b=r(this.N),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
282
- q.Kb=function(a){!this.i&&a.length&&(this.N=this.N.filter(function(b){return b.startTime<a[0].startTime}),this.N.push.apply(this.N,ja(a)))};q.Lb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.N.length||d.endTime>c.N[0].startTime)});this.Kb(a);this.kb(b)};q.kb=function(a){if(!this.i){var b=this.N.length;this.N=this.N.filter(function(c){return c.endTime>a});this.h+=b-this.N.length}};
283
- q.fb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.N.length;)if(this.N[this.N.length-1].startTime>=b)this.N.pop();else break;for(;this.N.length;)if(this.N[0].endTime<=a)this.N.shift(),c||this.h++;else break;0!=this.N.length&&(a=this.N[this.N.length-1],this.N[this.N.length-1]=new ri(a.startTime,b,a.j,a.sa,a.ja,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
284
- q.Yc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.N.push.apply(c.N,ja(d)):(c.g.stop(),c.g=null)}),this.g.Fa(a))};T.prototype[Symbol.iterator]=function(){return this.Hb(0)};T.prototype.Hb=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.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Oi(this,b,d)};
285
- function Pi(a,b,c){return new T([new ri(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=Pi;T.prototype.getIteratorForTime=T.prototype.Hb;T.prototype.updateEvery=T.prototype.Yc;T.prototype.fit=T.prototype.fb;T.prototype.evict=T.prototype.kb;T.prototype.mergeAndEvict=T.prototype.Lb;T.prototype.merge=T.prototype.Kb;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Kf;
286
- T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function Oi(a,b,c){this.i=a;this.h=b;this.g=c}Oi.prototype.seek=function(a){Tb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Hb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
287
- Oi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.ua().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Oi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.ua().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Oi);Oi.prototype.next=Oi.prototype.next;Oi.prototype.current=Oi.prototype.current;
288
- Oi.prototype.seek=Oi.prototype.seek;function Qi(){T.call(this,[]);this.j=[]}ra(Qi,T);q=Qi.prototype;q.clone=function(){var a=new Qi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(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.N.length}return null};
289
- q.get=function(a){for(var b=0,c=r(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.N.length}return null};q.offset=function(){};q.Kb=function(){};q.kb=function(){};q.Lb=function(){};q.fb=function(){};q.Yc=function(){};M("shaka.media.MetaSegmentIndex",Qi);Qi.prototype.updateEvery=Qi.prototype.Yc;Qi.prototype.fit=Qi.prototype.fb;Qi.prototype.mergeAndEvict=Qi.prototype.Lb;Qi.prototype.evict=Qi.prototype.kb;Qi.prototype.merge=Qi.prototype.Kb;
290
- Qi.prototype.offset=Qi.prototype.offset;Qi.prototype.get=Qi.prototype.get;Qi.prototype.find=Qi.prototype.find;Qi.prototype.release=Qi.prototype.release;function Ri(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Pc();this.h=new O(function(){b.g.we(.25*b.i)})}Ri.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ri.prototype.set=function(a){this.i=a;Si(this)};Ri.prototype.Lc=function(){return this.g.Lc()};function Si(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Pc()!=b&&a.g.Zd(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Pc()&&a.g.Zd(0)};function Ti(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Ui(b,!1)})).Fa(.25)}Ti.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ui(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vi(a){Re.call(this);this.g=new Map;this.h=a}ra(Vi,Re);Vi.prototype.release=function(){this.g.clear();Re.prototype.release.call(this)};function Wi(a,b){var c=a.g.get(b);c||(c={pc:[],ie:null,contentType:b},a.g.set(b,c));return c}function Xi(a,b,c){var d=Wi(a,b.contentType);Yi(a,d);a={Id:b,position:c};d=d.pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
291
- Vi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Id;break a}}d=null}if(e=d)e=c.ie,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
292
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.ie=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Yi(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.pc;b.pc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.pc=[]};function Zi(a){Re.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=r(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))})).Fa(2)}ra(Zi,Re);Zi.prototype.release=function(){this.g.clear();this.h.stop();Re.prototype.release.call(this)};function $i(a){Re.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Ab:null,zb:aj,qb:function(c,d){return bj(b,"enter",c,d)}},{Ab:cj,zb:aj,qb:function(c,d){return bj(b,"enter",c,d)}},{Ab:dj,zb:aj,qb:function(c,d){return bj(b,"enter",c,d)}},{Ab:aj,zb:cj,qb:function(c,d){return bj(b,"exit",c,d)}},{Ab:aj,zb:dj,qb:function(c,d){return bj(b,"exit",c,d)}},{Ab:cj,zb:dj,qb:function(c,d){return bj(b,"skip",c,d)}},{Ab:dj,zb:cj,qb:function(c,d){return bj(b,"skip",c,d)}}];this.h=new jf;this.h.C(this.i,"regionremove",
293
- function(c){b.g["delete"](c.region)})}ra($i,Re);$i.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Re.prototype.release.call(this)};$i.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?cj:a>d.endTime?dj:aj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Ab==e&&h.zb==f&&h.qb(d,b)}};
294
- function bj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var cj=1,aj=2,dj=3;function ej(a,b,c,d,e){a=$e(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function fj(a,b){var c=this;this.B=b;this.D=a;this.m=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.s=null;this.j=!1;this.K=new gf(function(){return gj(c)})}fj.prototype.destroy=function(){return this.K.destroy()};function gj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,hj(e),b.push(ij(e));return u(f,Promise.all(b),2)}a.g.clear();a.B=null;a.D=null;a.m=null;z(f)})}
295
- fj.prototype.configure=function(a){this.m=a;this.s=new Ge({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)};fj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,jj(a),2);hf(a.K);a.o=!0;z(b)})};
296
- function kj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=yc,B(k,2),u(k,ki(a.B.U,c.ea),4);case 4:wa(k,3);break;case 2:if(d=E(k),a.B)a.B.onError(d);case 3:e=Vc(b.mimeType,b.codecs);Xh(a.B.U,e);f=a.B.U.o;if(g=f.isTextVisible()||a.m.alwaysStreamText)h=lj(b),a.g.set(c.ea,h),mj(a,h,0);z(k)}})}function nj(a){var b=a.g.get(xc);b&&(hj(b),ij(b)["catch"](function(){}),a.g["delete"](xc));a.i=null}
297
- function oj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.wb&&(pj(a,e,!1,0,!1),c.wb=d)}else if(d=c.wb)c.wb=null,pj(a,d,!0,0,!1)}}function qj(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.o&&(b.video&&pj(a,b.video,c,d,e),b.audio&&pj(a,b.audio,c,d,e))}function rj(a,b){a.i=b;a.o&&pj(a,b,!0,0,!1)}
298
- function pj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=xc?f&&(f.wb&&(b.trickModeVideo?(f.wb=b,b=b.trickModeVideo):f.wb=null),f.stream!=b||e)&&(b.type==xc&&Xh(a.B.U,Vc(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ia=null,c&&(f.cc?f.ad=!0:f.Ma?(f.yb=!0,f.Jc=d,f.ad=!0):(hj(f),sj(a,f,!0,d)["catch"](function(g){if(a.B)a.B.onError(g)}))),tj(a,f)["catch"](function(g){if(a.B)a.B.onError(g)})):kj(a,b)}
299
- function tj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.za)return e["return"]();c=b.stream;d=b.za;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.za!=d||b.stream!=c)return e["return"]();var f=a.B.Oc();var g=bi(a.B.U,b.type),h=b.stream.segmentIndex.find(b.Da?b.Da.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.sa:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ja?k.ja-k.sa:null)||0),k=a.B.getBandwidthEstimate(),
300
- f=8*h/k<(g||0)-f-Math.max(a.D.minBufferTime||0,a.m.rebufferingGoal)||b.za.h.g>h?!0:!1):f=!1;f&&b.za.abort();z(e)})}function uj(a,b){b.cc||b.yb||(b.Ma?(b.yb=!0,b.Jc=0):null==$h(a.B.U,b.type)?null==b.Pa&&mj(a,b,0):(hj(b),sj(a,b,!1,0)["catch"](function(c){if(a.B)a.B.onError(c)})))}
301
- function jj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=yc;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.jb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Ta,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ea,a.i),d.add(a.i));e=a.B.U;f=a.m.forceTransmuxTS;return u(n,e.init(c,f),2)}hf(a.K);var p=a.D.presentationTimeline.getDuration();Infinity>p?a.B.U.Na(p):a.B.U.Na(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
302
- (m=lj(l),a.g.set(k,m),mj(a,m,0));z(n)})}function lj(a){return{stream:a,type:a.type,ia:null,Da:null,Qc:null,Hd:null,Gd:null,Fd:null,wb:null,endOfStream:!1,Ma:!1,Pa:null,yb:!1,Jc:0,ad:!1,cc:!1,Rd:!1,kc:!1,za:null}}
303
- fj.prototype.nc=function(a){var b=this,c,d,e,f,g;return L(function(h){switch(h.g){case 1:hf(b.K);if(a.Ma||null==a.Pa||a.cc)return h["return"]();a.Pa=null;if(!a.yb){h.A(2);break}return u(h,sj(b,a,a.ad,a.Jc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.A(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==a.Pa&&mj(b,a,0),h["return"]();case 4:B(h,6);d=vj(b,a);null!=d&&(mj(b,a,d),a.kc=!1);wa(h,
304
- 7);break;case 6:return e=E(h),u(h,wj(b,e),8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,b.B.U.endOfStream(),10);case 10:hf(b.K),g=b.B.U.getDuration(),0!=g&&g<b.D.presentationTimeline.getDuration()&&b.D.presentationTimeline.Na(g),z(h)}})};
305
- function vj(a,b){if(xj(b))return gi(a.B.U,b.stream.originalId||""),null;b.type==xc&&ji(a.B.U);var c=a.B.Oc(),d=b.Da?b.Da.endTime:c,e=ci(a.B.U,b.type,c),f=Math.max(a.D.minBufferTime||0,a.m.rebufferingGoal,a.m.bufferingGoal)*a.l;if(1E-6>a.D.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(xc))&&xj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.m.updateIntervalSeconds/2;e=bi(a.B.U,b.type);e=yj(a,b,c,e);if(!e)return a.m.updateIntervalSeconds;f=Infinity;
306
- var g=Array.from(a.g.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,xj(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Da?h.Da.endTime:c));if(d>=f+a.D.presentationTimeline.g)return a.m.updateIntervalSeconds;zj(a,b,c,e)["catch"](function(){});return null}
307
- function yj(a,b,c,d){if(b.ia)return b.ia.current();if(b.Da||d)return b.ia=b.stream.segmentIndex.Hb(b.Da?b.Da.endTime:d),b.ia&&b.ia.next().value;a=a.m.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ia=b.stream.segmentIndex.Hb(d),e=b.ia&&b.ia.next().value);e||(b.ia=b.stream.segmentIndex.Hb(c),e=b.ia&&b.ia.next().value);return e}
308
- function zj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w;return L(function(y){switch(y.g){case 1:return e=yc,f=b.stream,g=b.ia,b.Ma=!0,B(y,2),u(y,Aj(a,b,d),4);case 4:hf(a.K);if(a.j)return y["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.m.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,C,A;return L(function(F){hf(a.K);if(a.j)return F["return"]();n=Bj(n,x);D=!1;C=0;(new og).box("mdat",function(G){C=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.A(0);
309
- A=n.subarray(0,C);n=n.subarray(C);return u(F,Cj(a,b,c,f,d,A),0)})},u(y,Dj(a,b,d,p),6);l=Dj(a,b,d);return u(y,l,7);case 7:return m=y.h,hf(a.K),a.j?y["return"]():b.yb?(b.Ma=!1,mj(a,b,0),y["return"]()):u(y,Cj(a,b,c,f,d,m),6);case 6:hf(a.K);if(a.j)return y["return"]();b.Da=d;g.next();b.Ma=!1;b.Rd=!1;t=a.B.U.gb();v=t[b.type];cb(JSON.stringify(v));b.yb||a.B.Od();mj(a,b,0);wa(y,0);break;case 2:w=E(y);hf(a.K,w);if(a.j)return y["return"]();b.Ma=!1;if(7001==w.code)b.Ma=!1,b.Pa=null,mj(a,b,0),y.A(0);else if(b.type==
310
- e.ea&&a.m.ignoreTextStreamFailures)a.g["delete"](e.ea),y.A(0);else if(3017==w.code)Ej(a,b,w),y.A(0);else if(1001==w.code&&w.data&&404==w.data[1])b.Ma=!1,b.Pa=null,mj(a,b,1),y.A(0);else return b.kc=!0,w.severity=2,u(y,wj(a,w),0)}})}function Bj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
311
- function Ej(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Rd})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.kc=!0;a.j=!0;a.B.onError(c);return}b.Rd=!0}mj(a,b,4)}
312
- function Aj(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.Hd||e!=b.Gd||f!=b.Fd)h=function(){var n;return L(function(p){if(1==p.g)return B(p,2),b.Gd=e,b.Fd=f,b.Hd=g,u(p,li(a.B.U,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=E(p);b.Gd=null;b.Fd=null;b.Hd=null;throw n;})},d.push(h());!qi(c.g,b.Qc)&&(b.Qc=c.g)&&(k=Dj(a,b,c.g),l=function(){var n,p,t;return L(function(v){switch(v.g){case 1:return B(v,2),u(v,k,4);
313
- case 4:return n=v.h,hf(a.K),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,di(a.B.U,b.type,n,null,null,p),5);case 5:wa(v,0);break;case 2:throw t=E(v),b.Qc=null,t;}})},a.B.Of(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
314
- function Cj(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||a.m.dispatchAllEmsgBoxes)&&(new og).V("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.qc();var n=k.reader.qc();var p=k.reader.O();var t=k.reader.O();var v=k.reader.O();var w=k.reader.O();var y=e.startTime+t/p}else p=k.reader.O(),y=k.reader.Qb()/p+e.timestampOffset,t=y-e.startTime,v=k.reader.O(),w=k.reader.O(),
315
- m=k.reader.qc(),n=k.reader.qc();k=k.reader.hb(k.reader.T.byteLength-k.reader.ba());if(l&&l.includes(m)||a.m.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.B.Pf():(l=(new Map).set("detail",{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:w,messageData:k}),l=new Q(Fj,l),a.B.onEvent(l))}).parse(f),u(h,Gj(a,b,c),2);if(3!=h.g)return hf(a.K),u(h,di(a.B.U,b.type,f,e.startTime,e.endTime,g),3);hf(a.K);z(h)})}
316
- function Gj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.m.bufferBehind,a.D.presentationTimeline.g);e=$h(a.B.U,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.B.U.remove(b.type,e,e+g),2)}hf(a.K);z(h)})}function xj(a){return a&&a.type==xc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
317
- function Dj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=ff,f=ej(c.ua(),c.sa,c.ja,a.m.retryParameters,d),g=b.stream,a.B.modifySegmentRequest(f,{type:g.type,init:c instanceof pi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.B.sb.request(e,f),b.za=h,u(l,h.promise,2);k=l.h;b.za=null;return l["return"](k.data)})}
318
- function sj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.yb=!1,b.ad=!1,b.Jc=0,b.cc=!0,b.Da=null,b.Qc=null,b.ia=null,d?(e=a.B.Oc(),f=a.B.U.getDuration(),u(g,a.B.U.remove(b.type,e+d,f),3)):u(g,ki(a.B.U,b.type),4);if(3!=g.g)return hf(a.K),c?u(g,a.B.U.flush(b.type),3):g.A(3);hf(a.K);b.cc=!1;b.endOfStream=!1;mj(a,b,0);z(g)})}
319
- function mj(a,b,c){var d=b.type;if(d!=xc||a.g.has(d))b.Pa=(new td(function(){var e;return L(function(f){if(1==f.g)return B(f,2),u(f,a.nc(b),4);if(2!=f.g)return wa(f,0);e=E(f);if(a.B)a.B.onError(e);z(f)})})).W(c)}function hj(a){null!=a.Pa&&(a.Pa.stop(),a.Pa=null)}function ij(a){return L(function(b){return a.za?u(b,a.za.abort(),0):b.A(0)})}function wj(a,b){return L(function(c){if(1==c.g)return u(c,Ie(a.s),2);hf(a.K);a.B.onError(b);b.handled||a.m.failureCallback(b);z(c)})};function Hj(a,b){var c=Ij(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.o=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Jj(d)});this.K=new gf(function(){return Kj(d)})}Hj.prototype.destroy=function(){return this.K.destroy()};function Kj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Lj(a),u(e,a.u,2);a.g&&a.g.La.ub();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.La.ub();a.g=null;a.o=[];a.j=null;z(e)})}
320
- function Mj(a,b){var c={Nb:function(){},Sc:function(){},ub:function(){},onError:function(){},Uc:function(){},Xg:function(){}};a.o.push({create:b,La:c});a.h&&a.h.abort();Lj(a);return c}
321
- function Jj(a){return L(function(b){if(a.K.g)b=b.A(0);else{if(0==a.o.length||a.g&&!a.g.pb)var c=!1;else{a.g&&(a.g.La.ub(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.La.Nb(),a.g={node:d.node,payload:d.payload,pb:d.pb,La:c.La}):c.La.Uc();c=!0}c?c=Promise.resolve():a.g?c=Nj(a):(a.j.Nf(a.i),a.s=new zc,c=a.s);b=u(b,c,1)}return b})}
322
- function Nj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.tf(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.bf(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.La.Sc(),a.g=null);wa(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.La.ub();else a.g.La.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 Lj(a){a.s&&(a.s.resolve(),a.s=null)};function Oj(a){this.g=null;for(var b=r(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=Oj.prototype;q.remove=function(a,b){if(!this.g)return!1;Pj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
323
- 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&&Tb("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=
324
- 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=r(c);for(var f=c.next();!f.done;e={Bb:e.Bb},f=c.next())e.Bb=f.value,a.some(function(g){return function(h){return h.startTime==g.Bb.startTime&&h.endTime==g.Bb.endTime&&h.text==g.Bb.payload?!0:!1}}(e))||(f=Qj(e.Bb))&&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)-
325
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Pj(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"};
326
- function Qj(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}
327
- function Pj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(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",Oj);Oj.prototype.setTextVisibility=Oj.prototype.setTextVisibility;Oj.prototype.isTextVisible=Oj.prototype.isTextVisible;Oj.prototype.destroy=Oj.prototype.destroy;Oj.prototype.append=Oj.prototype.append;Oj.prototype.remove=Oj.prototype.remove;function Rj(){}function Sj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Rj);Rj.removeAllChildren=Sj;function Tj(a,b){var c=this;this.o=!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.F=(new O(function(){Uj(c)})).Fa(.25);this.j=new Map;this.h=new jf;this.h.C(document,"fullscreenchange",function(){Uj(c,!0)});this.s=null;"ResizeObserver"in
328
- window&&(this.s=new ResizeObserver(function(){Uj(c,!0)}),this.s.observe(this.i))}q=Tj.prototype;q.append=function(a){var b=[].concat(ja(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={wc:c.wc},d=a.next())c.wc=d.value,b.some(function(e){return function(f){return Cb(f,e.wc)}}(c))||this.l.push(c.wc);Uj(this)};
329
- q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.F&&this.F.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});Uj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
330
- function Vj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(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.Me:null;l&&(g.push(l.he),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Wj(a,k,e),l=a.j.get(k),n=l.Me,f=!0));0<k.nestedCues.length&&n&&Vj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
331
- h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.he)}}function Uj(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Sj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Vj(a,a.l,a.i,c,[])}}}
332
- function Wj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Tb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Xj(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.j.set(b,{he:f,Me:c})}
333
- function Xj(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.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Yj(c.linePadding,c,a.u);f.paddingRight=Yj(c.linePadding,c,a.u);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
334
- "contain",f.backgroundPosition="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=Zj(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?
335
- "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Yj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==wb?(f.width="100%",c.lineAlign==yb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==yb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
336
- "100%",c.lineAlign==yb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Jb?"%":"px",d=c.region.viewportAnchorUnits==Jb?"%":"px",f.height=c.region.height+(c.region.heightUnits==Jb?"%":"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==wb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
337
- "left":"line-right"==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==wb?f.width=c.size+"%":f.height=c.size+"%")}
338
- function Yj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),jg:d[2]}:null;if(!d)return a;var e=d.value;switch(d.jg){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Zj(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",Tj);Tj.prototype.setTextVisibility=Tj.prototype.setTextVisibility;
339
- Tj.prototype.isTextVisible=Tj.prototype.isTextVisible;Tj.prototype.remove=Tj.prototype.remove;Tj.prototype.destroy=Tj.prototype.destroy;Tj.prototype.append=Tj.prototype.append;function ak(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
340
- "");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Tb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
341
- break;case "right":k.push("align:right");break;case vb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function bk(a,b){this.B=a;this.m=b;this.h="";this.l=void 0;this.g=!1;this.j=!0;this.i=!1}function ck(a,b,c){try{if(a.m.enabled){var d={d:1E3*c.duration,st:a.B.Y()?dk:ek};d.ot=fk(c);var e=d.ot===gk||d.ot===hk||d.ot===ik||d.ot===jk;e&&(d.bl=kk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==jk&&(d.tb=lk(a,d.ot)/1E3);mk(a,b,d)}}catch(f){Ya("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
342
- function nk(a,b,c){try{if(!a.m.enabled)return b;var d=ok(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ik;break a;case "application/x-mpegurl":e=pk;break a}e=void 0}d.ot=e;d.su=!0;var f=qk(d);return rk(b,f)}catch(g){return Ya("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function sk(a,b){try{if(!a.m.enabled)return b;var c=ok(a);c.ot=tk;c.su=!0;var d=qk(c);return rk(b,d)}catch(e){return Ya("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
343
- function ok(a){a.h||(a.h=a.m.sessionId||window.crypto.randomUUID());return{v:1,sf:a.l,sid:a.h,cid:a.m.contentId,mtp:a.B.getBandwidthEstimate()/1E3}}function mk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.m.useHeaders:d;if(a.m.enabled){Object.assign(c,ok(a));c.pr=a.B.Nc();var e=c.ot===gk||c.ot===ik;a.i&&e&&(c.bs=!0,c.su=!0,a.i=!1);null==c.su&&(c.su=a.j);if(d)a=uk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=qk(c);f&&(b.uris=b.uris.map(function(g){return rk(g,f)}))}}}
344
- function fk(a){var b=a.type;if(a.init)return vk;if("video"==b)return a.codecs.includes(",")?ik:gk;if("audio"==b)return hk;if("text"==b)return"application/mp4"===a.mimeType?jk:tk}function kk(a,b){var c=a.B.gb()[b];if(!c.length)return NaN;var d=a.B.gf();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
345
- function lk(a,b){var c=a.B.ob();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case gk:return d.videoBandwidth||NaN;case hk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
346
- function qk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
347
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function uk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=qk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
348
- function rk(a,b){if(!b||a.includes("offline:"))return a;var c=new ec(a);c.g.set("CMCD",b);return c.toString()}var pk="m",hk="a",gk="v",ik="av",vk="i",tk="c",jk="tt",ek="v",dk="l";M("shaka.util.CmcdManager.StreamingFormat",{tg:"d",Ag:"h",Kg:"s",Gg:"o"});function wk(){}
349
- function xk(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]=Se(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Se(l)),k=xk(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
350
- k),g=!1)}return g}function yk(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",wk);wk.convertToConfigObject=yk;wk.mergeConfigObjects=xk;function zk(){}
351
- function Ak(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:He(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Xf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:He(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
255
+ 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=qc,u(m,c.D,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={qa:e.qa},g=f.next())e.qa=g.value,h=a.get(e.qa),k=Nc(h.mimeType,h.codecs),e.qa==d.Z?Qh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Jc(k,e.qa)||(c.s[e.qa]=new Ic,k=Lc(e.qa,k)),l=c.m.addSourceBuffer(k),c.o.A(l,"error",function(n){return function(){c.i[n.qa][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.A(l,"updateend",function(n){return function(){return Rh(c,n.qa)}}(e)),
256
+ c.h[e.qa]=l,c.I[e.qa]=k,c.i[e.qa]=[],c.G[e.qa]=!!h.drmInfos.length);z(m)})};function Qh(a,b){a.g||(a.g=new Sc(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Sb(Uc[b]))}function Sh(a){return a.m?"ended"==a.m.readyState:!0}function Th(a,b){if(b==pc)var c=a.g.g;else c=Uh(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 Vh(a,b){return b==pc?a.g.h:Hh(Uh(a,b))}
257
+ function Wh(a,b,c){if(b==pc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uh(a,b);return Jh(a,c)}r.Ya=function(){var a={total:Kh(this.j.buffered),audio:Kh(Uh(this,"audio")),video:Kh(Uh(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 Uh(a,b){try{return a.h[b].buffered}catch(c){return null}}
258
+ function Xh(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=qc;if(b==g.Z)return u(v,Vc(a.g,c,d,e),0);if(a.s[b])return u(v,Mc(a.s[b],c),10);if(f)return a.g||Qh(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=Gh(a.u,c),h.length&&(k=a.h[g.Na].timestampOffset,$c(a.g,h,d,e,k))),c=Yh(a,c,d,b),u(v,Zh(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Yh(a,c,d,b);return u(v,Zh(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Qh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.L(l.metadata,
259
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=Yc(l.captions),$c(a.g,p,d,e,n));q=l.data;q=Yh(a,q,d,b);return u(v,Zh(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function $h(a,b){var c=Vh(a,"video")||0;Xc(a.g,b,c)}function ai(a){a.g&&Xc(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,Zh(d,a,function(){c<=b?Rh(d,a):d.h[a].remove(b,c)}),0)})};
260
+ function bi(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Zh(a,b,function(){var e=a.m.duration;0>=e?Rh(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,Zh(b,a,function(){b.j.currentTime-=.001;Rh(b,a)}),0)})};
261
+ function ci(a,b,c,d,e){var f;return L(function(g){f=qc;return b==f.Z?(a.g.u=c,Wc(a.g,d,e),g["return"]()):u(g,Promise.all([Zh(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;Rh(a,b)}),Zh(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Rh(a,b)}),Zh(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Rh(a,b)})]),0)})}
262
+ r.endOfStream=function(a){var b=this;return L(function(c){return u(c,di(b,function(){Sh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ia=function(a){var b=this;return L(function(c){return u(c,di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Rh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),gi(a,b))}function Zh(a,b,c){cf(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&hi(a,b);return c.p}
263
+ function di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:cf(a.C);c=[];d={};for(e in a.h)d.Pb=new rc,f={start:function(l){return function(){return l.Pb.resolve()}}(d),p:d.Pb},a.i[e].push(f),c.push(d.Pb),1==a.i[e].length&&f.start(),d={Pb:d.Pb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)gi(a,h)}z(k)}})}function gi(a,b){a.i[b].shift();hi(a,b)}
264
+ function hi(a,b){var c=a.i[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)),gi(a,b)}}function Yh(a,b,c,d){var e=a.G[d];null==c&&e&&(td()||rd())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=ug(b));return b}var Ph=window.URL.createObjectURL;function ii(a,b,c,d){this.sa=a;this.pa=b;this.ga=c;this.wd=void 0===d?null:d}ii.prototype.dc=function(){return this.pa};ii.prototype.$b=function(){return this.ga};function ji(a,b){return a&&b?a.dc()==b.dc()&&a.$b()==b.$b()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",ii);ii.prototype.getEndByte=ii.prototype.$b;ii.prototype.getStartByte=ii.prototype.dc;
265
+ function ki(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ga=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=ki.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Ze=function(){return this.endTime};r.dc=function(){return this.pa};r.$b=function(){return this.ga};r.rf=function(){return this.tilesLayout};
266
+ r.qf=function(){return this.i};M("shaka.media.SegmentReference",ki);ki.prototype.getTileDuration=ki.prototype.qf;ki.prototype.getTilesLayout=ki.prototype.rf;ki.prototype.getEndByte=ki.prototype.$b;ki.prototype.getStartByte=ki.prototype.dc;ki.prototype.getEndTime=ki.prototype.Ze;ki.prototype.getStartTime=ki.prototype.getStartTime;ki.prototype.getUris=ki.prototype.sa;function S(a,b,c){this.l=a;this.Qc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0}r=S.prototype;r.getDuration=function(){return this.i};r.ef=function(){return this.g};r.Ia=function(a){this.i=a};r.kf=function(){return this.l};r.ye=function(a){this.o=a};r.nc=function(a){this.s=a};r.Sd=function(a){this.m=a};r.Uf=function(a){this.Qc=a};r.Ye=function(){return this.Qc};
267
+ r.Fb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Cd(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.C&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Cd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Bd=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.T=function(){return Infinity==this.i&&!this.s};
268
+ r.lb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.gb()-this.m)};r.ze=function(a){this.u=a};r.gb=function(){return this.T()||this.lb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.cc=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.gb()-this.m+a,this.Pa()))};r.Bb=function(){return this.cc(0)};
269
+ r.Pa=function(){return Math.max(0,this.gb()-(this.T()||this.lb()?this.Qc:0))};r.Ce=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.xe=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.xe;S.prototype.usingPresentationStartTime=S.prototype.Ce;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Bb;S.prototype.getSafeSeekRangeStart=S.prototype.cc;S.prototype.getSegmentAvailabilityEnd=S.prototype.gb;
270
+ S.prototype.setUserSeekStart=S.prototype.ze;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.lb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Bd;S.prototype.notifyMinSegmentStartTime=S.prototype.Cd;S.prototype.notifySegments=S.prototype.Fb;S.prototype.getDelay=S.prototype.Ye;S.prototype.setDelay=S.prototype.Uf;S.prototype.setSegmentAvailabilityDuration=S.prototype.Sd;
271
+ S.prototype.setStatic=S.prototype.nc;S.prototype.setClockOffset=S.prototype.ye;S.prototype.getPresentationStartTime=S.prototype.kf;S.prototype.setDuration=S.prototype.Ia;S.prototype.getMaxSegmentDuration=S.prototype.ef;S.prototype.getDuration=S.prototype.getDuration;function li(a,b){this.j=a;this.m=mi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}li.prototype.release=function(){this.j=null;this.i=function(){}};function ni(a,b){a.i=b}function oi(a){this.g=a}function mi(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(Kh(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 pi(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new df;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return qi(f)});this.m=(new O(function(){qi(f)})).Ba(.25)}pi.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.C=this.u=null};pi.prototype.Fd=function(){this.o=!0;qi(this)};
272
+ function qi(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.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=mi(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=Lh(b,g,a.l.gapDetectionThreshold);if(!(null==
273
+ c||0==c&&!a.o||(d=b.start(c),d>=a.C.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 ri(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=si.value().get(b),c.oa(a,b,d))}var si=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ti(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new df;this.i=new ui(a);ri(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){vi(d,d.j)})}ti.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 wi(a){return a.m?a.g.currentTime:a.j}function xi(a,b){0<a.g.readyState?yi(a.i,b):ri(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){vi(a,a.j)})}
274
+ function vi(a,b){.001>Math.abs(a.g.currentTime-b)?zi(a):(a.h.oa(a.g,"seeking",function(){zi(a)}),yi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function zi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function ui(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ui.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
275
+ function yi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ba(.1)};function Ai(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(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 df;ri(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ai.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ai.prototype.o=function(a){this.h=this.j?this.h:a};Ai.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ai.prototype.D=function(){};
276
+ function Bi(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.C=e;this.u=null;this.j=new pi(a,b.presentationTimeline,c,Ci(a,c),f);this.h=new ti(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=wi(g.h);h=Di(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;xi(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Ei(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=wi(g.h),k=g.g.Bb(),l=g.g.Pa();3>l-k&&(k=
277
+ l-3);h<k&&(h=Di(g,h),g.i.currentTime=h)}})).Ba(.25)}Bi.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.C=function(){}};Bi.prototype.o=function(a){xi(this.h,a)};Bi.prototype.m=function(){var a=wi(this.h);return 0<this.i.readyState&&!this.i.paused?Fi(this,a):a};
278
+ function Ei(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Pa():0>b&&(b=a.g.Pa()+b);return Gi(a,Fi(a,b))}Bi.prototype.D=function(){this.j.Fd()};function Gi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Di(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cc(c),k=a.g.cc(d);c=a.g.cc(c+d);return b>=g?Gi(a,b):b>f?f:b<e?Ih(a.i.buffered,k)?k:c:b>=h||Ih(a.i.buffered,b)?b:c}
279
+ function Fi(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function Ci(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new li(new oi(a),b.stallThreshold);ni(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.zf=function(){this.i=!0};
280
+ r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
281
+ r.Db=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ja(a)))};r.Eb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Db(a);this.cb(b)};r.cb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
282
+ r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new ki(a.startTime,b,a.j,a.pa,a.ga,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
283
+ r.Sc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Ba(a))};T.prototype[Symbol.iterator]=function(){return this.fb(0)};T.prototype.fb=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.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Hi(this,b,d)};
284
+ function Ii(a,b,c){return new T([new ki(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=Ii;T.prototype.getIteratorForTime=T.prototype.fb;T.prototype.updateEvery=T.prototype.Sc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.cb;T.prototype.mergeAndEvict=T.prototype.Eb;T.prototype.merge=T.prototype.Db;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.zf;
285
+ T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function Hi(a,b,c){this.i=a;this.h=b;this.g=c}Hi.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.fb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
286
+ Hi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.sa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Hi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.sa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Hi);Hi.prototype.next=Hi.prototype.next;Hi.prototype.current=Hi.prototype.current;
287
+ Hi.prototype.seek=Hi.prototype.seek;function Ji(){T.call(this,[]);this.j=[]}qa(Ji,T);r=Ji.prototype;r.clone=function(){var a=new Ji;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.K.length}return null};
288
+ 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.K.length}return null};r.offset=function(){};r.Db=function(){};r.cb=function(){};r.Eb=function(){};r.Xa=function(){};r.Sc=function(){};M("shaka.media.MetaSegmentIndex",Ji);Ji.prototype.updateEvery=Ji.prototype.Sc;Ji.prototype.fit=Ji.prototype.Xa;Ji.prototype.mergeAndEvict=Ji.prototype.Eb;Ji.prototype.evict=Ji.prototype.cb;Ji.prototype.merge=Ji.prototype.Db;
289
+ Ji.prototype.offset=Ji.prototype.offset;Ji.prototype.get=Ji.prototype.get;Ji.prototype.find=Ji.prototype.find;Ji.prototype.release=Ji.prototype.release;function Ki(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Hc();this.h=new O(function(){b.g.oe(.25*b.i)})}Ki.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ki.prototype.set=function(a){this.i=a;Li(this)};Ki.prototype.Dc=function(){return this.g.Dc()};function Li(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Hc()!=b&&a.g.Rd(b);return}catch(c){}a.h.Ba(.25);0!=a.g.Hc()&&a.g.Rd(0)};function Mi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Ni(b,!1)})).Ba(.25)}Mi.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()};function Ni(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Oi(a){Me.call(this);this.g=new Map;this.h=a}qa(Oi,Me);Oi.prototype.release=function(){this.g.clear();Me.prototype.release.call(this)};function Pi(a,b){var c=a.g.get(b);c||(c={ic:[],ae:null,contentType:b},a.g.set(b,c));return c}function Qi(a,b,c){var d=Pi(a,b.contentType);Ri(a,d);a={wd:b,position:c};d=d.ic;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
290
+ Oi.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.ic;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.wd;break a}}d=null}if(e=d)e=c.ae,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
291
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.ae=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ri(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Si(a){Me.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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))})).Ba(2)}qa(Si,Me);Si.prototype.release=function(){this.g.clear();this.h.stop();Me.prototype.release.call(this)};function Ti(a){Me.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Wi,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Xi,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Ui,rb:Wi,kb:function(c,d){return Vi(b,"exit",c,d)}},{sb:Ui,rb:Xi,kb:function(c,d){return Vi(b,"exit",c,d)}},{sb:Wi,rb:Xi,kb:function(c,d){return Vi(b,"skip",c,d)}},{sb:Xi,rb:Wi,kb:function(c,d){return Vi(b,"skip",c,d)}}];this.h=new df;this.h.A(this.i,"regionremove",
292
+ function(c){b.g["delete"](c.region)})}qa(Ti,Me);Ti.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Me.prototype.release.call(this)};Ti.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Wi:a>d.endTime?Xi:Ui;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.kb(d,b)}};
293
+ function Vi(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Wi=1,Ui=2,Xi=3;function Yi(a,b,c,d,e){a=Ve(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Zi(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.i=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new bf(function(){return $i(c)})}Zi.prototype.destroy=function(){return this.j.destroy()};function $i(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,aj(e),b.push(bj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;z(f)})}
294
+ Zi.prototype.configure=function(a){this.h=a;this.D=new Be({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)};Zi.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,cj(a),2);cf(a.j);a.C=!0;z(b)})};
295
+ function dj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=qc,C(k,2),u(k,bi(a.g.P,c.Z),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=Nc(b.mimeType,b.codecs);Qh(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=ej(b),a.i.set(c.Z,h),fj(a,h,0);z(k)}})}function gj(a){var b=a.i.get(pc);b&&(aj(b),bj(b)["catch"](function(){}),a.i["delete"](pc));a.o=null}
296
+ function hj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(ij(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,ij(a,d,!0,0,!1)}}function jj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&ij(a,b.video,c,d,e),b.audio&&ij(a,b.audio,c,d,e))}function kj(a,b){a.o=b;a.C&&ij(a,b,!0,0,!1)}
297
+ function ij(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=pc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==pc&&Qh(a.g.P,Nc(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Yb?f.Vc=!0:f.Ha?(f.qb=!0,f.xc=d,f.Vc=!0):(aj(f),lj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),mj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):dj(a,b)}
298
+ function mj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Gc();var g=Vh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ga?k.ga-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ga?k.ga-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
299
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function nj(a,b){b.Yb||b.qb||(b.Ha?(b.qb=!0,b.xc=0):null==Th(a.g.P,b.type)?null==b.Ka&&fj(a,b,0):(aj(b),lj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
300
+ function cj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.P;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}cf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ia(p):a.g.P.Ia(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.i.has(k)||
301
+ (m=ej(l),a.i.set(k,m),fj(a,m,0));z(n)})}function ej(a){return{stream:a,type:a.type,ba:null,za:null,Kc:null,ud:null,td:null,sd:null,ob:null,endOfStream:!1,Ha:!1,Ka:null,qb:!1,xc:0,Vc:!1,Yb:!1,Jd:!1,ec:!1,ua:null}}
302
+ function oj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:cf(a.j);if(b.Ha||null==b.Ka||b.Yb)return h["return"]();b.Ka=null;if(!b.qb){h.B(2);break}return u(h,lj(a,b,b.Vc,b.xc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&fj(a,b,0),h["return"]();case 4:C(h,6);d=pj(a,b);null!=d&&(fj(a,b,d),b.ec=!1);va(h,7);break;case 6:return e=
303
+ E(h),u(h,qj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.P.endOfStream(),10);case 10:cf(a.j),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
304
+ function pj(a,b){if(rj(b))return $h(a.g.P,b.stream.originalId||""),null;b.type==pc&&ai(a.g.P);var c=a.g.Gc(),d=b.za?b.za.endTime:c,e=Wh(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(pc))&&rj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Vh(a.g.P,b.type);e=sj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
305
+ var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,rj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;tj(a,b,c,e)["catch"](function(){});return null}
306
+ function sj(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.fb(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.fb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.fb(c),e=b.ba&&b.ba.next().value);return e}
307
+ function tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:return e=qc,f=b.stream,g=b.ba,b.Ha=!0,C(w,2),u(w,uj(a,b,d),4);case 4:cf(a.j);if(a.s)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return L(function(F){cf(a.j);if(a.s)return F["return"]();n=vj(n,x);D=!1;B=0;(new lg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.B(0);
308
+ A=n.subarray(0,B);n=n.subarray(B);return u(F,wj(a,b,c,f,d,A),0)})},u(w,xj(a,b,d,p),6);l=xj(a,b,d);return u(w,l,7);case 7:return m=w.h,cf(a.j),a.s?w["return"]():b.qb?(b.Ha=!1,fj(a,b,0),w["return"]()):u(w,wj(a,b,c,f,d,m),6);case 6:cf(a.j);if(a.s)return w["return"]();b.za=d;g.next();b.Ha=!1;b.Jd=!1;q=a.g.P.Ya();v=q[b.type];$a(JSON.stringify(v));b.qb||a.g.Fd();fj(a,b,0);va(w,0);break;case 2:y=E(w);cf(a.j,y);if(a.s)return w["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,fj(a,b,0),w.B(0);else if(b.type==
309
+ e.Z&&a.h.ignoreTextStreamFailures)a.i["delete"](e.Z),w.B(0);else if(3017==y.code)yj(a,b,y),w.B(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,fj(a,b,1),w.B(0);else return b.ec=!0,y.severity=2,u(w,qj(a,y),0)}})}function vj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
310
+ function yj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Jd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ec=!0;a.s=!0;a.g.onError(c);return}b.Jd=!0}fj(a,b,4)}
311
+ 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.ud||e!=b.td||f!=b.sd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.td=e,b.sd=f,b.ud=g,u(p,ci(a.g.P,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.td=null;b.sd=null;b.ud=null;throw n;})},d.push(h());!ji(c.g,b.Kc)&&(b.Kc=c.g)&&(k=xj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
312
+ case 4:return n=v.h,cf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Xh(a.g.P,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Kc=null,q;}})},a.g.Df(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
313
+ 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||a.h.dispatchAllEmsgBoxes)&&(new lg).R("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.jc();var n=k.reader.jc();var p=k.reader.M();var q=k.reader.M();var v=k.reader.M();var y=k.reader.M();var w=e.startTime+q/p}else p=k.reader.M(),w=k.reader.Jb()/p+e.timestampOffset,q=w-e.startTime,v=k.reader.M(),y=k.reader.M(),
314
+ m=k.reader.jc(),n=k.reader.jc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"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:y,messageData:k}),l=new Q(zj,l),a.g.onEvent(l))}).parse(f),u(h,Aj(a,b,c),2);if(3!=h.g)return cf(a.j),u(h,Xh(a.g.P,b.type,f,e.startTime,e.endTime,g),3);cf(a.j);z(h)})}
315
+ function Aj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Th(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}cf(a.j);z(h)})}function rj(a){return a&&a.type==pc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
316
+ function xj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=af,f=Yi(c.sa(),c.pa,c.ga,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ii,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.mb.request(e,f),b.ua=h,u(l,h.promise,2);k=l.h;b.ua=null;return l["return"](k.data)})}
317
+ function lj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Vc=!1,b.xc=0,b.Yb=!0,b.za=null,b.Kc=null,b.ba=null,d?(e=a.g.Gc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,bi(a.g.P,b.type),4);if(3!=g.g)return cf(a.j),c?u(g,a.g.P.flush(b.type),3):g.B(3);cf(a.j);b.Yb=!1;b.endOfStream=!1;fj(a,b,0);z(g)})}
318
+ function fj(a,b,c){var d=b.type;if(d!=pc||a.i.has(d))b.Ka=(new nd(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,oj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function aj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function bj(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.B(0)})}function qj(a,b){return L(function(c){if(1==c.g)return u(c,De(a.D),2);cf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);z(c)})};function Bj(a,b){var c=Cj(),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 Dj(d)});this.s=new bf(function(){return Ej(d)})}Bj.prototype.destroy=function(){return this.s.destroy()};function Ej(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Fj(a),u(e,a.u,2);a.g&&a.g.Ga.nb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.nb();a.g=null;a.m=[];a.j=null;z(e)})}
319
+ function Gj(a,b){var c={Gb:function(){},Mc:function(){},nb:function(){},onError:function(){},Oc:function(){},Kg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Fj(a);return c}
320
+ function Dj(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.jb)var c=!1;else{a.g&&(a.g.Ga.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Gb(),a.g={node:d.node,payload:d.payload,jb:d.jb,Ga:c.Ga}):c.Ga.Oc();c=!0}c?c=Promise.resolve():a.g?c=Hj(a):(a.j.Cf(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
321
+ function Hj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.gf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Te(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.Ga.Mc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ga.nb();else a.g.Ga.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 Fj(a){a.o&&(a.o.resolve(),a.o=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"}r=Ij.prototype;r.remove=function(a,b){if(!this.g)return!1;Jj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
322
+ 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&&Kb("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=
323
+ 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)-
324
+ 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&&(Jj(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"};
325
+ 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}
326
+ 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.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 O(function(){Oj(c)})).Ba(.25);this.h=new Map;this.o=new df;this.o.A(document,"fullscreenchange",function(){Oj(c,!0)});this.l=null;"ResizeObserver"in
327
+ window&&(this.l=new ResizeObserver(function(){Oj(c,!0)}),this.l.observe(this.g))}r=Nj.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={pc:c.pc},d=a.next())c.pc=d.value,b.some(function(e){return function(f){return tb(f,e.pc)}}(c))||this.i.push(c.pc);Oj(this)};
328
+ 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});Oj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
329
+ 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.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.De:null;l&&(g.push(l.$d),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Qj(a,k,e),l=a.h.get(k),n=l.De,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,q){return p.startTime!=q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});
330
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.$d)}}function Oj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Mj(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));Pj(a,a.i,a.g,c,[])}}}
331
+ function Qj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Rj(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,{$d:f,De:c})}
332
+ function Rj(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.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Sj(c.linePadding,c,a.m);f.paddingRight=Sj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
333
+ "contain",f.backgroundPosition="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=Tj(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?
334
+ "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Sj(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
335
+ "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ab?"%":"px",d=c.region.viewportAnchorUnits==Ab?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ab?"%":"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==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
336
+ "left":"line-right"==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==nb?f.width=c.size+"%":f.height=c.size+"%")}
337
+ function Sj(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 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;
338
+ 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,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
339
+ "");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
340
+ break;case "right":k.push("align:right");break;case mb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Vj(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Wj(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?Xj:Yj};d.ot=Zj(c);var e=d.ot===ak||d.ot===bk||d.ot===ck||d.ot===dk;e&&(d.bl=ek(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==dk&&(d.tb=fk(a,d.ot)/1E3);gk(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
341
+ function hk(a,b,c){try{if(!a.g.enabled)return b;var d=ik(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ck;break a;case "application/x-mpegurl":e=jk;break a}e=void 0}d.ot=e;d.su=!0;var f=kk(d);return lk(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function mk(a,b){try{if(!a.g.enabled)return b;var c=ik(a);c.ot=nk;c.su=!0;var d=kk(c);return lk(b,d)}catch(e){return Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
342
+ function ik(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function gk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,ik(a));c.pr=a.h.Fc();var e=c.ot===ak||c.ot===ck;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=ok(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=kk(c);f&&(b.uris=b.uris.map(function(g){return lk(g,f)}))}}}
343
+ function Zj(a){var b=a.type;if(a.init)return pk;if("video"==b)return a.codecs.includes(",")?ck:ak;if("audio"==b)return bk;if("text"==b)return"application/mp4"===a.mimeType?dk:nk}function ek(a,b){var c=a.h.Ya()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
344
+ function fk(a,b){var c=a.h.ib();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case ak:return d.videoBandwidth||NaN;case bk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
345
+ function kk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
346
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ok(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=kk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
347
+ function lk(a,b){if(!b||a.includes("offline:"))return a;var c=new Xb(a);c.g.set("CMCD",b);return c.toString()}var jk="m",bk="a",ak="v",ck="av",pk="i",nk="c",dk="tt",Yj="v",Xj="l";M("shaka.util.CmcdManager.StreamingFormat",{gg:"d",ng:"h",xg:"s",tg:"o"});function qk(){}
348
+ function rk(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]=Ne(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ne(l)),k=rk(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?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
349
+ k),g=!1)}return g}function sk(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}function tk(a,b){return a&&b}M("shaka.util.ConfigUtils",qk);qk.convertToConfigObject=sk;qk.mergeConfigObjects=rk;function uk(){}
350
+ function vk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ce(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Uf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ce(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
352
351
  ignoreMinBufferTime:!1,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"},
353
- manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:He(),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,
354
- stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||xd()||zd())d.gapDetectionThreshold=.5;if(yd("Web0S")||xd()||zd())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==
355
- 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,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new qe},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
356
- maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,
357
- maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](Bk(g,f.preferredAudioLanguage))})};return f}
358
- function Ck(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return xk(a,b,c||Ak(),d,"")}
359
- function Bk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=qd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return jd(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/
360
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=xc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",zk);zk.mergeConfigObjects=Ck;function Dk(){this.g=null;this.h=[]}function Ek(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 Fk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
361
- function Gk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Hk(){this.i=this.h=null;this.g=[]}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.J=this.G=this.o=this.j=this.I=this.l=this.i=this.M=this.P=this.S=this.F=this.$=NaN;this.g=new Dk;this.h=new Hk};function U(a,b){Re.call(this);var c=this;this.l=Kk;this.Dc=this.g=null;this.ma=!1;this.h=new jf;this.sd=this.s=this.Yb=this.D=this.Gc=this.u=this.i=this.na=this.P=this.Hc=this.J=this.vc=this.I=this.Sa=this.G=this.M=this.o=this.R=null;this.Cd=1E9;this.m=Lk(this);this.yd={width:Infinity,height:Infinity};this.j=null;this.Ja=new ye(this.m.preferredAudioLanguage,this.m.preferredVariantRole,this.m.preferredAudioChannelCount);this.Qa=this.m.preferredTextLanguage;this.$b=this.m.preferredTextRole;this.Zb=
362
- this.m.preferForcedSubs;this.td=[];this.ac=null;b&&b(this);this.R=Mk(this);this.R.Xd(this.m.streaming.forceHTTPS);this.F=null;Nk&&(this.F=$b(Nk));this.h.C(window,"online",function(){c.Sd()});this.wa={name:"detach"};this.Ua={name:"attach"};this.da={name:"unload"};this.Dd={name:"manifest-parser"};this.xd={name:"manifest"};this.Ra={name:"media-source"};this.ud={name:"drm-engine"};this.S={name:"load"};this.Ed={name:"src-equals-drm-engine"};this.Db={name:"src-equals"};var d=new Map;d.set(this.Ua,function(e,
363
- f){return Ne(Ok(c,e,f))});d.set(this.wa,function(e){e.H&&(c.h.Ga(e.H,"error"),e.H=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Ne(e)});d.set(this.da,function(e){return Ne(Pk(c,e))});d.set(this.Ra,function(e){e=Qk(c,e);return Ne(e)});d.set(this.Dd,function(e,f){var g=Rk(c,e,f);return Ne(g)});d.set(this.xd,function(e){return Sk(c,e)});d.set(this.ud,function(e){e=Tk(c,e);return Ne(e)});d.set(this.S,function(e,f){return Ne(Uk(c,e,f))});d.set(this.Ed,function(e,f){var g=Vk(c,e,f);return Ne(g)});
364
- d.set(this.Db,function(e,f){return Wk(c,e,f)});this.oa=new Hj(this.wa,{tf:function(e,f,g,h){var k=null;e==c.wa&&(k=g==c.wa?c.wa:c.Ua);e==c.Ua&&(k=g==c.wa||f.H!=h.H?c.wa:g==c.Ua?c.Ua:g==c.Ra||g==c.S?c.Ra:g==c.Db?c.Ed:null);e==c.Ra&&(k=g==c.S&&f.H==h.H?c.Dd:c.da);e==c.Dd&&(k=Xk(c.S,c.xd,c.da,g,f,h));e==c.xd&&(k=Xk(c.S,c.ud,c.da,g,f,h));e==c.ud&&(k=Xk(c.S,c.S,c.da,g,f,h));e==c.Ed&&(k=g==c.Db&&f.H==h.H?c.Db:c.da);if(e==c.S||e==c.Db)k=c.da;e==c.da&&(k=h.H&&f.H==h.H?c.Ua:c.wa);return k},bf:function(e,f,
365
- g){c.dispatchEvent(Yk(Zk,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Pk(c,e),2):f["return"](e.H?c.Ua:c.wa)})},Nf:function(e){c.dispatchEvent(Yk($k,(new Map).set("state",e.name)))}});a&&this.bc(a,!0)}ra(U,Re);function Yk(a,b){return new Q(a,b)}q=U.prototype;
366
- q.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==al)return c["return"]();a.l=al;b=Mj(a.oa,function(){return{node:a.wa,payload:Ij(),pb:!1}});return u(c,new Promise(function(d){b.Nb=function(){};b.Sc=function(){d()};b.ub=function(){d()};b.onError=function(){d()};b.Uc=function(){d()}}),2);case 2:return u(c,a.oa.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.sd=null;a.s=null;a.m=null;a.j=null;a.Dc=null;a.P=null;if(!a.R){c.A(4);break}return u(c,a.R.destroy(),5);case 5:a.R=
367
- null;case 4:Re.prototype.release.call(a),z(c)}})};q.bc=function(a,b){b=void 0===b?!0:b;if(this.l==al)return Promise.reject(bl());var c=Ij();c.H=a;ud()||(b=!1);var d=b?this.Ra:this.Ua,e=Mj(this.oa,function(){return{node:d,payload:c,pb:!1}});e.Nb=function(){};return cl(e)};q.detach=function(){var a=this;if(this.l==al)return Promise.reject(bl());var b=Mj(this.oa,function(){return{node:a.wa,payload:Ij(),pb:!1}});b.Nb=function(){};return cl(b)};
368
- q.de=function(a){var b=this;a=void 0===a?!0:a;if(this.l==al)return Promise.reject(bl());ud()||(a=!1);var c=Ij(),d=Mj(this.oa,function(e){var f=e.H&&a?b.Ra:e.H?b.Ua:b.wa;c.H=e.H;return{node:f,payload:c,pb:!1}});d.Nb=function(){};return cl(d)};q.og=function(a){this.ac=a};
369
- q.load=function(a,b,c){var d=this;this.ac=null;if(this.l==al)return Promise.reject(bl());this.dispatchEvent(Yk(dl));var e=Ij();e.uri=a;e.ae=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=el(this,e)?this.Db:this.S,g=Mj(this.oa,function(h){if(null==h.H)return null;e.H=h.H;return{node:f,payload:e,pb:!0}});this.j=new Jk;this.P=fl(this);g.Nb=function(){};return new Promise(function(h,k){g.Uc=function(){return k(new N(2,7,7002))};g.Sc=function(){h();d.dispatchEvent(Yk(gl))};g.ub=function(){return k(bl())};
370
- g.onError=function(l){return k(l)}})};function el(a,b){if(!ud())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ig(d),c=hl[c]);if(c){if(""==(b.H||wd()).canPlayType(c))return!1;if(!ud()||!(c in hg||ig(d)in jg)||a.m.streaming.preferNativeHls)return!0;if(Ad())return a.m.streaming.useNativeHlsOnSafari}return!1}function Ok(a,b,c){null==b.H&&(b.H=c.H,a.h.C(b.H,"error",function(){var d=il(a);d&&jl(a,d)}));a.g=b.H;return Promise.resolve()}
371
- 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!=al&&(a.l=Kk),c=a.td.map(function(p){return p()}),a.td=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Yk(kl));b.mimeType=null;b.startTime=null;b.uri=null;b.H&&(a.h.Ga(b.H,"loadedmetadata"),a.h.Ga(b.H,"playing"),a.h.Ga(b.H,"pause"),a.h.Ga(b.H,"ended"),a.h.Ga(b.H,"ratechange"));a.Sa&&(a.Sa.release(),a.Sa=null);a.vc&&(a.vc.stop(),a.vc=null);if(!a.u){n.A(3);break}return u(n,a.u.stop(),4);case 4:a.u=null,a.Gc=null;
372
- case 3:if(!a.s){n.A(5);break}return u(n,a.s.stop(),5);case 5:if(!a.i){n.A(7);break}return u(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.M){n.A(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.H||!b.H.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).W(.1)}),12);case 12:for(b.H.removeAttribute("src"),b.H.load();b.H.lastChild;)b.H.removeChild(b.H.firstChild);case 11:if(!a.o){n.A(13);
373
- break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Yb=null;a.J=null;if(a.D){d=r(a.D.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.D.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.D=null;a.j=new Jk;a.vd=null;ll(a);z(n)}})}
374
- function Qk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Mh,d=a.m.textDisplayFactory,e=$b(d),a.vd=d,f=ml(b.H,c,e,function(h,k,l){h=r(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,t=r(m.frames),v=t.next();!v.done;v=t.next())nl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),u(g,f.G,2);a.M=f;z(g)})}
375
- 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.R,a.Yb=d,f=a,u(h,gg(d,e,a.m.manifest.retryParameters,b.mimeType),2);f.Gc=h.h;a.u=$b(a.Gc);g=Se(a.m.manifest);c.H&&"AUDIO"===c.H.nodeName&&(g.disableVideo=!0);a.u.configure(g);z(h)})}
376
- function Sk(a,b){var c=b.uri,d=a.R;a.Hc=new Zi(function(){return a.rc()});a.Hc.addEventListener("regionadd",function(g){g=g.region;ol(a,pl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.na=null;a.m.streaming.observeQualityChanges&&(a.na=new Vi(function(){return a.gb()}),a.na.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
377
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Yk(ql,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.P;try{k.m.enabled&&(k.l=h.format,mk(k,g,{ot:pk,su:!k.g}))}catch(l){Ya("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ck(a.P,g,h)},filter:function(g){return rl(a,g)},makeTextStreamsForClosedCaptions:function(g){return sl(a,g)},
378
- onTimelineRegionAdded:function(g){var h=a.Hc;a:{var k=r(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=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 jl(a,g)},isLowLatencyMode:function(){return a.m.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.m.streaming.autoLowLatencyMode},
379
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Je(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.u.start(c,e),2);g.D=m.h;h=Yk(tl);a.dispatchEvent(h);if(0==a.D.variants.length)throw new N(2,4,4036);ul(a.D);k=Date.now()/1E3;l=k-f;a.j.I=l;z(m)})}(),function(){return a.u.stop()})}
380
- function Tk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=vl(a,{sb:a.R,onError:function(f){jl(a,f)},Tc:function(f){wl(a,f)},onExpirationUpdated:function(f,g){xl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==yl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.o.configure(a.m.drm),u(e,Bf(a.o,a.D.variants,a.D.offlineSessionIds),2)):3!=e.g?u(e,a.o.bc(b.H),3):u(e,rl(a,a.D),0)})}
381
- function Uk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return L(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.ac&&(b.startTime=a.ac,a.ac=null);d=b.H;e=b.uri;a.Yb=e;a.I=new Ri({Pc:function(){return b.H.playbackRate},Lc:function(){return b.H.defaultPlaybackRate},Zd:function(y){b.H.playbackRate=y},we:function(y){b.H.currentTime+=y}});f=function(){return zl(a)};g=function(){return Al(a)};a.h.C(d,"playing",f);a.h.C(d,"pause",f);a.h.C(d,"ended",f);a.h.C(d,"ratechange",g);h=a.m.abrFactory;a.s&&
382
- a.sd==h||(a.sd=h,a.s=$b(h),"function"!=typeof a.s.playbackRateChanged&&(Tb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.m.abr));a.Ja=new ye(a.m.preferredAudioLanguage,a.m.preferredVariantRole,a.m.preferredAudioChannelCount);a.Qa=a.m.preferredTextLanguage;a.$b=a.m.preferredTextRole;a.Zb=a.m.preferForcedSubs;Bl(a.D.presentationTimeline,a.m.playRangeStart,a.m.playRangeEnd);a.s.init(function(y,x,D){a.i&&y!=a.i.h&&Cl(a,
383
- y,!0,void 0===x?!1:x,void 0===D?0:D)});a.G=Dl(a,b.startTime);a.Sa=El(a);k=Math.max(a.D.minBufferTime,a.m.streaming.rebufferingGoal);Fl(a,k);Ed(a.D,a.m.preferredVideoCodecs,a.m.preferredAudioCodecs,a.m.preferredAudioChannelCount,a.m.preferredDecodingAttributes);a.i=Gl(a);a.i.configure(a.m.streaming);a.l=Hl;a.dispatchEvent(Yk(Il));l=null;if(m=a.ob().find(function(y){return y.active})){w.A(2);break}l=Jl(a)?a.s.chooseVariant():null;Cl(a,l,!0,!1,0);if(!a.m.streaming.startAtSegmentBoundary){w.A(3);break}n=
384
- a.G.l();return u(w,Kl(l,n),4);case 4:p=w.h,a.G.o(p);case 3:Ll(a,null,ce(l));case 2:return t=a.nb().find(function(y){return y.active}),t||((v=ne(a.D.textStreams,a.Qa,a.$b,a.Zb)[0]||null)&&Ik(a.j.h,v,!0),l&&(v?(l.audio&&Ml(a,l.audio,v)&&(a.ma=!0),a.ma&&a.M.o.setTextVisibility(!0),Nl(a)):a.ma=!1),v&&(a.m.streaming.alwaysStreamText||a.Bd())&&rj(a.i,v)),u(w,a.i.start(),5);case 5:a.m.abr.enabled&&(a.s.enable(),Ol(a)),Ud(a.i?a.i.h:null,a.D),Pl(a.D),Ql(a),Jl(a),a.D.variants.some(function(y){return y.primary}),
385
- a.h.ya(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.ae}),z(w)}})}
386
- function Vk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=yc,e=Date.now()/1E3,f=!0,a.o=vl(a,{sb:a.R,onError:function(n){jl(a,n)},Tc:function(n){wl(a,n)},onExpirationUpdated:function(n,p){xl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==yl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.m.drm),g=c.uri||"",h=ig(g),k=hl[h],"application/x-mpegurl"==k&&Ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
387
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Yc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ta,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.S=!0,u(m,Bf(a.o,[l],[]),2)):u(m,a.o.bc(b.H),
352
+ manifestPreprocessor:function(g){return tk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Ce(),failureCallback:function(g){return tk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
353
+ safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||td()||ud())d.gapDetectionThreshold=.5;if(sd("Web0S")||td()||ud())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
354
+ 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 tk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new le},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
355
+ maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
356
+ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](wk(g,f.preferredAudioLanguage))})};return f}
357
+ function xk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return rk(a,b,c||vk(),d,"")}
358
+ function wk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=jd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return cd(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/
359
+ 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!=pc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",uk);uk.mergeConfigObjects=xk;function yk(){this.g=null;this.h=[]}function zk(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 Ak(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}
360
+ function Bk(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 Ck(){this.i=this.h=null;this.g=[]}function Dk(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 Ek(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.N=NaN;this.g=new yk;this.h=new Ck};function U(a,b){Me.call(this);var c=this;this.l=Fk;this.zc=this.g=null;this.ja=!1;this.Cc=new df;this.Tb=new df;this.o=new df;this.pd=this.s=this.Sb=this.i=this.Ic=this.I=this.j=this.wa=this.W=this.Jc=this.L=this.Ac=this.G=this.wb=this.D=this.N=this.m=this.F=null;this.Dd=1E9;this.h=Gk(this);this.zd={width:Infinity,height:Infinity};this.u=null;this.La=new te(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Wb=this.h.preferredTextRole;
361
+ this.Ub=this.h.preferForcedSubs;this.Mb=[];this.Xb=null;b&&b(this);this.F=Hk(this);this.F.Pd(this.h.streaming.forceHTTPS);this.C=null;Ik&&(this.C=Sb(Ik));this.Cc.A(window,"online",function(){c.Kd()});this.V={name:"detach"};this.ca={name:"attach"};this.fa={name:"unload"};this.Gd={name:"manifest-parser"};this.vd={name:"manifest"};this.vb={name:"media-source"};this.qd={name:"drm-engine"};this.da={name:"load"};this.Hd={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.ca,
362
+ function(e,f){return Ie(Jk(c,e,f))});d.set(this.V,function(e){e.J&&(c.Tb.Sa(),e.J=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Ie(e)});d.set(this.fa,function(e){return Ie(Kk(c,e))});d.set(this.vb,function(e){e=Lk(c,e);return Ie(e)});d.set(this.Gd,function(e,f){var g=Mk(c,e,f);return Ie(g)});d.set(this.vd,function(e){return Nk(c,e)});d.set(this.qd,function(e){e=Ok(c,e);return Ie(e)});d.set(this.da,function(e,f){return Ie(Pk(c,e,f))});d.set(this.Hd,function(e,f){var g=Qk(c,e,f);return Ie(g)});
363
+ d.set(this.xb,function(e,f){return Rk(c,e,f)});this.Ea=new Bj(this.V,{gf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.vb||g==c.da?c.vb:g==c.xb?c.Hd:null);e==c.vb&&(k=g==c.da&&f.J==h.J?c.Gd:c.fa);e==c.Gd&&(k=Sk(c.da,c.vd,c.fa,g,f,h));e==c.vd&&(k=Sk(c.da,c.qd,c.fa,g,f,h));e==c.qd&&(k=Sk(c.da,c.da,c.fa,g,f,h));e==c.Hd&&(k=g==c.xb&&f.J==h.J?c.xb:c.fa);if(e==c.da||e==c.xb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Te:function(e,f,
364
+ g){c.dispatchEvent(Tk(Uk,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Kk(c,e),2):f["return"](e.J?c.ca:c.V)})},Cf:function(e){c.dispatchEvent(Tk(Vk,(new Map).set("state",e.name)))}});a&&this.Vb(a,!0)}qa(U,Me);function Tk(a,b){return new Q(a,b)}r=U.prototype;
365
+ r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Wk)return c["return"]();a.l=Wk;b=Gj(a.Ea,function(){return{node:a.V,payload:Cj(),jb:!1}});return u(c,new Promise(function(d){b.Gb=function(){};b.Mc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Oc=function(){d()}}),2);case 2:return u(c,a.Ea.destroy(),3);case 3:a.Cc&&(a.Cc.release(),a.Cc=null);a.Tb&&(a.Tb.release(),a.Tb=null);a.o&&(a.o.release(),a.o=null);a.pd=null;a.s=null;a.h=null;a.u=null;a.zc=null;
366
+ a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Me.prototype.release.call(a),z(c)}})};r.Vb=function(a,b){b=void 0===b?!0:b;if(this.l==Wk)return Promise.reject(Xk());var c=Cj();c.J=a;od()||(b=!1);var d=b?this.vb:this.ca,e=Gj(this.Ea,function(){return{node:d,payload:c,jb:!1}});e.Gb=function(){};return Yk(e)};r.detach=function(){var a=this;if(this.l==Wk)return Promise.reject(Xk());var b=Gj(this.Ea,function(){return{node:a.V,payload:Cj(),jb:!1}});b.Gb=function(){};return Yk(b)};
367
+ r.Wd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Wk)return Promise.reject(Xk());od()||(a=!1);var c=Cj(),d=Gj(this.Ea,function(e){var f=e.J&&a?b.vb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,jb:!1}});d.Gb=function(){};return Yk(d)};r.bg=function(a){this.Xb=a};
368
+ r.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Wk)return Promise.reject(Xk());this.dispatchEvent(Tk(Zk));var e=Cj();e.uri=a;e.Td=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=$k(this,e)?this.xb:this.da,g=Gj(this.Ea,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,jb:!0}});this.u=new Ek;this.W=al(this);g.Gb=function(){};return new Promise(function(h,k){g.Oc=function(){return k(new N(2,7,7002))};g.Mc=function(){h();d.dispatchEvent(Tk(bl))};g.nb=function(){return k(Xk())};
369
+ g.onError=function(l){return k(l)}})};function $k(a,b){if(!od())return!0;var c=b.mimeType,d=b.uri||"";c||(c=fg(d),c=cl[c]);if(c){if(""==(b.J||qd()).canPlayType(c))return!1;if(!od()||!(c in eg||fg(d)in gg)||a.h.streaming.preferNativeHls)return!0;if(vd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Jk(a,b,c){null==b.J&&(b.J=c.J,a.Tb.A(b.J,"error",function(){var d=dl(a);d&&el(a,d)}));a.g=b.J;return Promise.resolve()}
370
+ function Kk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Wk&&(a.l=Fk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Tk(fl));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.o.Sa();a.wb&&(a.wb.release(),a.wb=null);a.Ac&&(a.Ac.stop(),a.Ac=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Ic=null;case 3:if(!a.s){n.B(5);break}return u(n,a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),
371
+ 8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.D&&(a.D.release(),a.D=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Sb=null;a.L=null;if(a.i){d=t(a.i.variants);
372
+ 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.u=new Ek;a.rd=null;gl(a);z(n)}})}
373
+ function Lk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Fh,d=a.h.textDisplayFactory,e=Sb(d),a.rd=d,f=hl(b.J,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())il(a,n,p,"ID3",v.value);if(a.C)a.C.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;z(g)})}
374
+ function Mk(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.Sb=d,f=a,u(h,dg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Ic=h.h;a.I=Sb(a.Ic);g=Ne(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
375
+ function Nk(a,b){var c=b.uri,d=a.F;a.Jc=new Si(function(){return a.kc()});a.Jc.addEventListener("regionadd",function(g){g=g.region;jl(a,kl,g);if(a.C)a.C.onDashTimedMetadata(g)});a.wa=null;a.h.streaming.observeQualityChanges&&(a.wa=new Oi(function(){return a.Ya()}),a.wa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
376
+ mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Tk(ll,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,gk(k,g,{ot:jk,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Wj(a.W,g,h)},filter:function(g){return ml(a,g)},makeTextStreamsForClosedCaptions:function(g){return nl(a,g)},
377
+ onTimelineRegionAdded:function(g){var h=a.Jc;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=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 el(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
378
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ee(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=Tk(ol);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);pl(a.i);k=Date.now()/1E3;l=k-f;a.u.D=l;z(m)})}(),function(){return a.I.stop()})}
379
+ function Ok(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=ql(a,{mb:a.F,onError:function(f){el(a,f)},Nc:function(f){rl(a,f)},onExpirationUpdated:function(f,g){sl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==tl&&d&&(d=!1,a.u.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,yf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Vb(b.J),3):u(e,ml(a,a.i),0)})}
380
+ function Pk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Xb&&(b.startTime=a.Xb,a.Xb=null);d=b.J;e=b.uri;a.Sb=e;a.G=new Ki({Hc:function(){return d.playbackRate},Dc:function(){return d.defaultPlaybackRate},Rd:function(w){d.playbackRate=w},oe:function(w){d.currentTime+=w}});f=function(){return ul(a)};g=function(){return vl(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.s&&a.pd==h||
381
+ (a.pd=h,a.s=Sb(h),"function"!=typeof a.s.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.h.abr));a.La=new te(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ma=a.h.preferredTextLanguage;a.Wb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;wl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(w,x,D){a.j&&w!=a.j.l&&xl(a,w,!0,void 0===
382
+ x?!1:x,void 0===D?0:D)});a.D=yl(a,b.startTime);a.wb=zl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Al(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Bl(a);a.j.configure(a.h.streaming);a.l=Cl;d.textTracks&&a.o.A(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Dl(a,w)}});a.dispatchEvent(Tk(El));l=null;if(m=a.ib().find(function(w){return w.active})){y.B(2);break}l=
383
+ Fl(a)?a.s.chooseVariant():null;xl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.B(3);break}n=a.D.m();return u(y,Gl(l,n),4);case 4:p=y.h,a.D.o(p);case 3:Hl(a,null,Yd(l));case 2:return q=a.hb().find(function(w){return w.active}),q||((v=he(a.i.textStreams,a.Ma,a.Wb,a.Ub)[0]||null)&&Dk(a.u.h,v,!0),l&&(v?(l.audio&&Il(a,l.audio,v)&&(a.ja=!0),a.ja&&a.N.l.setTextVisibility(!0),Jl(a)):a.ja=!1),v&&(a.h.streaming.alwaysStreamText||a.od())&&kj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),
384
+ Kl(a)),Pd(a.j?a.j.l:null,a.i),Ll(a.i),Ml(a),Fl(a),a.i.variants.some(function(w){return w.primary}),a.o.oa(d,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Td}),z(y)}})}
385
+ function Qk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=qc,e=Date.now()/1E3,f=!0,a.m=ql(a,{mb:a.F,onError:function(n){el(a,n)},Nc:function(n){rl(a,n)},onExpirationUpdated:function(n,p){sl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==tl&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=fg(g),k=cl[h],"application/x-mpegurl"==k&&vd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
386
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Rc(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.m.W=!0,u(m,yf(a.m,[l],[]),2)):u(m,a.m.Vb(b.J),
388
387
  0)})}
389
- function Wk(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Yb=b.uri;a.G=new Hi(b.H);null!=b.startTime&&a.G.o(b.startTime);a.I=new Ri({Pc:function(){return b.H.playbackRate},Lc:function(){return b.H.defaultPlaybackRate},Zd:function(h){b.H.playbackRate=h},we:function(h){b.H.currentTime+=h}});Fl(a,a.m.streaming.rebufferingGoal);a.h.C(b.H,"playing",d);a.h.C(b.H,"pause",d);a.h.C(b.H,"ended",d);a.h.C(b.H,"ratechange",function(){return Al(a)});"none"!=a.g.preload&&a.h.ya(a.g,"loadedmetadata",
390
- function(){a.j.l=Date.now()/1E3-c.ae});a.g.audioTracks&&(a.h.C(a.g.audioTracks,"addtrack",function(){return Ql(a)}),a.h.C(a.g.audioTracks,"removetrack",function(){return Ql(a)}),a.h.C(a.g.audioTracks,"change",function(){return Ql(a)}));a.g.textTracks&&(a.h.C(a.g.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Rl(a,h);break;case "chapters":Sl(a,h);break;default:Ql(a)}}),a.h.C(a.g.textTracks,"removetrack",function(){return Ql(a)}),a.h.C(a.g.textTracks,"change",
391
- function(){return Ql(a)}));var e=ig(b.uri);b.H.src=nk(a.P,b.uri,hl[e]);(xd()||yd("Web0S"))&&b.H.load();a.l=Tl;a.dispatchEvent(Yk(Il));var f=new zc;yi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){f.resolve()});var g=!1;a.td.push(function(){g=!0});yi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var h;return L(function(k){if(1==k.g){if(g)return k["return"]();Ul(a);h=Vl(a);return h.find(function(l){return"disabled"!=l.mode})?k.A(2):u(k,new Promise(function(l){a.h.ya(a.g.textTracks,"change",
392
- l);(new O(l)).W(1)}),2)}if(g)return k["return"]();Wl(a);z(k)})});a.g.error?f.reject(il(a)):"none"==a.g.preload&&(Xa('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.h.ya(a.g,"error",function(){f.reject(il(a))});return new Je(f,function(){f.reject(new N(2,7,7001));return Promise.resolve()})}
393
- function Ul(a){var b=a.m.preferredAudioLanguage;if(""!=b){a.Ud(b);var c=a.m.preferredVariantRole;""!=c&&a.Ud(b,c)}}function Wl(a){var b=a.m.preferredTextLanguage,c=a.m.preferForcedSubs;if(""!=b){a.Vd(b,"",c);var d=a.m.preferredTextRole;""!=d&&a.Vd(b,d,c)}}
394
- function Rl(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.C(b,"cuechange",function(){if(b.activeCues)for(var c=r(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,nl(a,d.startTime,d.endTime,d.type,d.value),a.F)a.F.onCueMetadataChange(d.value)}),(new O(function(){var c=Xl(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Sb().W(.5))}function nl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Yk(Yl,b))}
395
- function Sl(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new O(function(){var c=Zl(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Sb().W(.5))}function ul(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 vl(a,b){return new uf(b,a.m.drm.updateExpirationTime)}
396
- function Mk(a){return new We(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Yk($l,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Yk(am,b))})}
397
- function Dl(a,b){return new Ii(a.g,a.D,a.m.streaming,b,function(){a.Sa&&Ui(a.Sa,!0);if(a.i)for(var c=a.i,d=c.B.Oc(),e=c.m.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.ia=null;var k=c.B.U;g==xc?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=ai(k,g),k=Ph(k,d,e));if(!k&&((null!=bi(c.B.U,g)||h.Ma)&&uj(c,h),h.za&&(h.za.abort(),h.za=null),g===xc))for(g=c.B.U.F.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,zh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())th(h.value)}a.J&&
398
- bm(a)},function(c){return a.dispatchEvent(c)})}function El(a){var b=new $i(a.Hc);b.addEventListener("enter",function(d){ol(a,cm,d.region)});b.addEventListener("exit",function(d){ol(a,dm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ol(a,cm,e),ol(a,dm,e))});var c=new Ti(a.g);c.g.add(b);a.na&&c.g.add(a.na);return c}function Fl(a,b){a.J=new Ce;a.J.g=Ee;Fe(a.J,b,Math.min(.5,b/2));ll(a);a.vc=(new O(function(){bm(a)})).Fa(.25)}
399
- function bm(a){switch(a.l){case Tl:if(a.g.ended)var b=!0;else{var c=Oh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Hl:a:if(a.g.ended||Zh(a.M))b=!0;else{if(a.D.presentationTimeline.Y()){c=a.D.presentationTimeline.mb();var d=Oh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Qh(a.g.buffered,a.g.currentTime);c=a.J;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?De:Ee;c.g=d;b!=d&&ll(a)}function ml(a,b,c,d){return new Th(a,b,c,d)}
400
- function fl(a){return new bk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},gb:function(){return a.gb()},gf:function(){return a.g?a.g.currentTime:0},ob:function(){return a.ob()},Nc:function(){return a.Nc()},Y:function(){return a.Y()}},a.m.cmcd)}
401
- function Gl(a){return new fj(a.D,{Oc:function(){return a.G.l()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ck(a.P,b,c)},U:a.M,sb:a.R,onError:function(b){return jl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Pf:function(){a.u&&a.u.update&&a.u.update()},Od:function(){a.G&&a.G.G();bm(a)},Of:function(b,c){var d=c.Id;d&&a.na&&Xi(a.na,d,b)}})}
402
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("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=
403
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Ck(this.m,a,Lk(this));em(this);return c};
404
- function em(a){if(a.u){var b=Se(a.m.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.u.configure(b)}a.o&&a.o.configure(a.m.drm);if(a.i){a.i.configure(a.m.streaming);try{fm(a,a.D)}catch(f){jl(a,f)}a.s&&Jl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||gm(a)}a.R&&a.R.Xd(a.m.streaming.forceHTTPS);if(a.M&&(b=a.m.textDisplayFactory,a.vd!=b)){var c=$b(b),d=a.M,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.vd=b;a.i&&(b=a.i,(c=b.g.get(xc))&&
405
- pj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.m.abr),a.m.abr.enabled?a.s.enable():a.s.disable(),Ol(a));a.J&&(b=a.m.streaming.rebufferingGoal,a.D&&(b=Math.max(b,a.D.minBufferTime)),Fe(a.J,b,Math.min(.5,b/2)));a.D&&Bl(a.D.presentationTimeline,a.m.playRangeStart,a.m.playRangeEnd)}q.getConfiguration=function(){var a=Lk(this);Ck(a,this.m,Lk(this));return a};
406
- q.ef=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.rc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.$f=function(){for(var a in this.m)delete this.m[a];Ck(this.m,Lk(this),Lk(this));em(this)};q.mf=function(){return this.l};q.rf=function(){return this.g};q.hc=function(){return this.R};q.wd=function(){return this.Yb};
407
- q.oe=function(){return this.F?this.F:null};q.Y=function(){return this.D?this.D.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.rb=function(){return this.D?this.D.presentationTimeline.rb():!1};q.Hf=function(){if(this.D){var a=this.D.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};
408
- q.rc=function(){if(this.D){var a=this.D.presentationTimeline;return{start:a.Ib(),end:a.Wa()}}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.Ff=function(){this.Y()&&(this.g.currentTime=this.rc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.i:null};q.fc=function(){return this.o?this.o.fc():Infinity};q.Mc=function(){return this.o?this.o.Mc():{}};
409
- q.zd=function(){return this.J?this.J.g==Ee:!1};q.Nc=function(){return this.g?this.I?this.I.i:1:0};q.ig=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Hl&&(this.s.playbackRateChanged(a),oj(this.i,1<Math.abs(a))))};q.Ve=function(){var a=this.I.Lc();this.l==Tl&&this.I.set(a);this.l==Hl&&(this.I.set(a),this.s.playbackRateChanged(a),oj(this.i,!1))};
410
- q.ob=function(){if(this.D){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.D.variants),e=d.next();!e.done;e=d.next())if(e=e.value,le(e)){var f=ce(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 ke(g)}):[]};
411
- q.nb=function(){if(this.D){for(var a=this.i?this.i.i:null,b=[],c=r(this.D.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=de(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Vl(this).map(function(f){return he(f)}):[]};q.kf=function(){return this.D?this.D.imageStreams.map(function(a){return ee(a)}):[]};
412
- q.Bf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A;return L(function(F){if(1==F.g)return c.D?(d=c.D.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.A(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.A(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
413
- v=m*n;w=f.l-f.startTime;y=f.i||w/v;x=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/y),x=f.startTime+A*y,D=A%m*p,C=Math.floor(A/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:C,startTime:x,duration:y,uris:f.ua(),width:p})}return F["return"](null)})};
414
- q.Ee=function(a){if(this.D&&this.i){var b=this.D.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(Ik(this.j.h,b,!1),rj(this.i,b),hm(this),this.Qa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Vl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,fe(c)==a.id?c.mode=this.ma?"showing":"hidden":c.mode="disabled";hm(this)}};
415
- q.Fe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.D&&this.i){this.m.abr.enabled&&Xa("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.D.variants.find(function(e){return e.id==a.id});d&&le(d)&&(Cl(this,d,!1,b,c),this.Ja=new xe(d),Jl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
416
- fe(c)==a.id){im(this,c);break}};q.df=function(){return jm(this.ob())};q.Af=function(){return jm(this.nb())};q.cf=function(){return Array.from(km(this.ob()))};q.zf=function(){return Array.from(km(this.nb()))};
417
- q.Ud=function(a,b){if(this.D&&this.G){this.Ja=new ye(a,b||"",0,"");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.Ja.create(this.D.variants),f=null;e=r(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;f?(c=ce(f),this.Fe(c,!0)):gm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=jd(a);f=d=null;e=
418
- r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ke(g);jd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?im(this,f):d&&im(this,d)}};
419
- q.Vd=function(a,b,c){c=void 0===c?!1:c;if(this.D&&this.G){if(this.Qa=a,this.$b=b||"",this.Zb=c,(a=ne(this.D.textStreams,this.Qa,this.$b,this.Zb)[0]||null)&&a!=this.i.i&&(Ik(this.j.h,a,!1),this.m.streaming.alwaysStreamText||this.Bd()))rj(this.i,a),hm(this)}else{var d=jd(a);(a=this.nb().find(function(e){return jd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ee(a)}};
420
- q.ag=function(a){if(this.D&&this.G){for(var b=null,c=r(this.D.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ja=new ye(b.language,"",0,a),gm(this))}};q.Bd=function(){var a=this.ma;return this.M?this.M.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Vl(this).some(function(b){return"showing"==b.mode}):a};q.pe=function(){return this.g&&this.g.src&&this.g.textTracks?Zl(this).map(function(a){return he(a)}):[]};
421
- q.ff=function(a){var b=jd(a),c=Zl(this).filter(function(f){return jd(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Vl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
422
- function Xl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Zl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
423
- q.gg=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==Hl)this.M.o.setTextVisibility(a),this.m.streaming.alwaysStreamText||(a?this.i.i||(a=ne(this.D.textStreams,this.Qa,this.$b,this.Zb),0<a.length&&(rj(this.i,a[0]),hm(this))):nj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Vl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Nl(this)}};
424
- q.vf=function(){if(!this.Y())return null;var a=this.oa.l,b=0;if(this.G)b=this.G.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.D?new Date(1E3*(this.D.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
425
- q.qe=function(){if(!this.Y())return null;if(this.D)return new Date(1E3*this.D.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gb=function(){if(this.l==Hl)return this.M.gb();var a={total:[],audio:[],video:[],text:[]};this.l==Tl&&(a.total=Rh(this.g.buffered));return a};
426
- q.getStats=function(){if(this.l!=Hl&&this.l!=Tl)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:[]};zl(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)?
427
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.S=Number(a.droppedVideoFrames),c.P=b,this.j.M=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.G?a.G:NaN):a=NaN;this.j.o=a;if(this.l==Hl){if(a=this.i.h)this.j.u=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.$=a.video.width||NaN,c.F=b);this.Y()&&(a=this.qe().valueOf()+1E3*this.rc().end,this.j.G=(Date.now()-a)/1E3);this.D&&this.D.presentationTimeline&&
428
- (this.j.J=this.D.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.$;c=d.F;b=d.u;var e=d.P,f=d.S,g=d.M,h=d.s,k=d.i,l=d.l,m=d.I,n=d.j,p=Fk(d.g,"playing"),t=Fk(d.g,"paused"),v=Fk(d.g,"buffering"),w=d.o,y=d.G,x=d.J,D=Gk(d.g),C=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.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,
429
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:w,liveLatency:y,maxSegmentDuration:x,stateHistory:D,switchHistory:C}};
430
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Tb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Hl&&this.l!=Tl)throw new N(1,7,7004);if(!d){var h=ig(a);d=lm[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Tl){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=sk(this.P,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.nb().find(function(k){return k.language==
431
- b&&k.label==(f||"")&&k.kind==c}))return Ql(this),a;throw new N(1,2,2012);}h=this.D.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Cd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:xc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
432
- closedCaptions:null};if(!$c(Vc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.D.textStreams.push(a);Ql(this);return de(a)};
433
- q.Re=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,w,y,x,D;return L(function(C){switch(C.g){case 1:if(h.l!=Hl&&h.l!=Tl)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,mm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=Tl){C.A(4);break}g&&(c="forced");return u(C,nm(h,a,b,c,d,f||"",k),5);case 5:l=h.nb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ql(h),C["return"](m);throw new N(1,2,2012);case 4:n=
434
- yc;p=h.D.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,om(h,a,h.R,h.m.streaming.retryParameters),7);case 7:t=C.h,v=pm(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=Wh(w),d="text/vtt";case 6:y={id:h.Cd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ea,primary:!1,trickModeVideo:null,
435
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=Vc(y.mimeType,y.codecs);D=$c(x);if(!D)throw new N(2,2,2014,d);h.D.textStreams.push(y);Ql(h);return C["return"](de(y))}})};
436
- q.Qe=function(a,b,c){var d=this,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:if(d.l!=Hl&&d.l!=Tl)throw new N(1,7,7004);if(c){n.A(2);break}return u(n,mm(d,a),3);case 3:c=n.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(p){}return u(n,nm(d,a,b,"chapters",c,"",e),4);case 4:f=d.pe();if(g=f.find(function(p){return p.language==b})){h=Zl(d);k=r(h);for(l=k.next();!l.done;l=k.next())m=l.value,Sl(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
437
- function mm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=ig(b);if(d=lm[c])return e["return"](d);B(e,2);return u(e,kg(b,a.R,a.m.streaming.retryParameters),4);case 4:d=e.h;wa(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
438
- function nm(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,om(a,b,a.R,a.m.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=pm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Wh(l),e="text/vtt");m=document.createElement("track");m.src=sk(a.P,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
439
- function om(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=ff;f=$e([b],d);f.method="GET";var k=a.P;try{k.m.enabled&&mk(k,f,{ot:tk,su:!0})}catch(l){Ya("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function pm(a,b,c,d){var e=ad[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ob(b),b=c.parseMedia(b,a),ak(b,d);throw new N(2,2,2014,c);}
440
- q.Yd=function(a,b){this.yd.width=a;this.yd.height=b};q.Sd=function(){if(this.l==Hl){var a=this.i;if(a.K.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.kc&&(c.kc=!1,mj(a,c,.1));a=!0}}else a=!1;return a};q.nf=function(){Xa("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.D};
441
- q.pf=function(){return this.Gc};function Lk(a){var b=Ak();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.Sd())};b.textDisplayFactory=function(){return a.Dc?new Tj(a.g,a.Dc):new Oj(a.g)};return b}q.Je=function(a){this.Dc=a};
442
- function sl(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Qi;h={id:a.Cd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
443
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:xc,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 rl(a,b){return L(function(c){if(1==c.g)return u(c,qm(a,b),2);fm(a,b);z(c)})}
444
- function qm(a,b){var c;return L(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,Sd(c,b),2);Pl(b);z(d)})}
445
- function fm(a,b){if(a.l!=al){for(var c=a.m.restrictions,d=a.yd,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Rd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&Ql(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((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=r(f.initData||[]),g=f.next();!g.done;g=
446
- f.next())g=g.value,Lf(a.o,g.initDataType,g.initData);rm(a,b)}}
447
- function Kl(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)})}
448
- function ll(a){var b=a.zd();if(a.j&&a.J&&a.G){var c=a.I;c.j=b;Si(c);a.P&&(c=a.P,b||c.g||(c.g=!0),c.g&&b&&(c.i=!0),c.j=b);zl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Yk(sm,b))}function Al(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Yk(tm),a.dispatchEvent(b))}function zl(a){if(a.j&&a.J){var b=a.j.g;a.J.g==Ee?Ek(b,"buffering"):a.g.paused?Ek(b,"paused"):a.g.ended?Ek(b,"ended"):Ek(b,"playing")}}
449
- function Jl(a){try{rm(a,a.D)}catch(c){return jl(a,c),!1}var b=a.D.variants.filter(function(c){return le(c)});b=a.Ja.create(b);a.s.setVariants(Array.from(b.values()));return!0}function gm(a){var b;(b=Jl(a)?a.s.chooseVariant():null)&&Cl(a,b,!0,!0,0)}
450
- function Cl(a,b,c,d,e){var f=a.i.h;if(b==f)d&&qj(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));qj(a.i,b,d,e);d=null;f&&(d=ce(f));b=ce(b);c?Ll(a,d,b):um(a,d,b)}}function im(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=ke(c);var d=ke(b);um(a,c,d)}
451
- function Ml(a,b,c){a=jd(a.m.preferredTextLanguage);b=jd(b.language);c=jd(c.language);return id(c,a)&&!id(b,c)}function Ll(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Yk(vm,b);wm(a,b)}function Ql(a){var b=Yk(xm);wm(a,b)}function um(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Yk(ym,b);wm(a,b)}function hm(a){var b=Yk(zm);wm(a,b)}function Nl(a){var b=Yk(Am);wm(a,b)}function Ol(a){var b=(new Map).set("newStatus",a.m.abr.enabled);wm(a,Yk(Bm,b))}
452
- function jl(a,b){if(a.l!=al){var c=Yk(Cm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ol(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))}
453
- function il(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)}
454
- function wl(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.D.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=r(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=r(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&&!Dm.includes(l)}h!=f.allowedByKeySystem&&
455
- (e=!0)}}}e&&Jl(a);(d=a.i.h)&&!d.allowedByKeySystem&&gm(a);e&&Ql(a)}}function xl(a,b,c){if(a.u&&a.u.onExpirationUpdated)a.u.onExpirationUpdated(b,c);b=Yk(Em);a.dispatchEvent(b)}function Bl(a,b,c){0<b&&(a.Y()||a.Ie(b));b=a.getDuration();c<b&&(a.Y()||a.Na(c))}
456
- function rm(a,b){var c=a.o?a.o.Mc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(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=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Dm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
457
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Pl(a){if(!a.variants.some(le))throw new N(2,4,4032);}function wm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=al&&a.dispatchEvent(b);z(c)})}function km(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(jd(c.language)):b.add("und");return b}
458
- function jm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=jd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(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));
459
- h.push({language:l,role:n,label:p})}});return h}function bl(){return new N(2,7,7E3)}function Xk(a,b,c,d,e,f){return d==a&&e.H==f.H&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ij(){return{H:null,mimeType:null,startTime:null,ae:NaN,uri:null}}function cl(a){return new Promise(function(b,c){a.ub=function(){return c(bl())};a.Sc=function(){return b()};a.onError=function(d){return c(d)};a.Uc=function(){return c(bl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Je;
460
- U.prototype.getManifestParserFactory=U.prototype.pf;U.prototype.getManifest=U.prototype.nf;U.prototype.retryStreaming=U.prototype.Sd;U.prototype.setMaxHardwareResolution=U.prototype.Yd;U.prototype.addChaptersTrack=U.prototype.Qe;U.prototype.addTextTrackAsync=U.prototype.Re;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.gb;U.prototype.getPresentationStartTimeAsDate=U.prototype.qe;
461
- U.prototype.getPlayheadTimeAsDate=U.prototype.vf;U.prototype.setTextTrackVisibility=U.prototype.gg;U.prototype.getChapters=U.prototype.ff;U.prototype.getChaptersTracks=U.prototype.pe;U.prototype.isTextTrackVisible=U.prototype.Bd;U.prototype.selectVariantsByLabel=U.prototype.ag;U.prototype.selectTextLanguage=U.prototype.Vd;U.prototype.selectAudioLanguage=U.prototype.Ud;U.prototype.getTextLanguages=U.prototype.zf;U.prototype.getAudioLanguages=U.prototype.cf;U.prototype.getTextLanguagesAndRoles=U.prototype.Af;
462
- U.prototype.getAudioLanguagesAndRoles=U.prototype.df;U.prototype.selectVariantTrack=U.prototype.Fe;U.prototype.selectTextTrack=U.prototype.Ee;U.prototype.getThumbnails=U.prototype.Bf;U.prototype.getImageTracks=U.prototype.kf;U.prototype.getTextTracks=U.prototype.nb;U.prototype.getVariantTracks=U.prototype.ob;U.prototype.cancelTrickPlay=U.prototype.Ve;U.prototype.trickPlay=U.prototype.ig;U.prototype.getPlaybackRate=U.prototype.Nc;U.prototype.isBuffering=U.prototype.zd;U.prototype.getKeyStatuses=U.prototype.Mc;
463
- U.prototype.getExpiration=U.prototype.fc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Ff;U.prototype.seekRange=U.prototype.rc;U.prototype.isAudioOnly=U.prototype.Hf;U.prototype.isInProgress=U.prototype.rb;U.prototype.isLive=U.prototype.Y;U.prototype.getAdManager=U.prototype.oe;U.prototype.getAssetUri=U.prototype.wd;U.prototype.getNetworkingEngine=U.prototype.hc;U.prototype.getMediaElement=U.prototype.rf;
464
- U.prototype.getLoadMode=U.prototype.mf;U.prototype.resetConfiguration=U.prototype.$f;U.prototype.getBufferFullness=U.prototype.ef;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.og;U.prototype.unload=U.prototype.de;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.bc;
465
- 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,ag(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(ud()){for(var l in hg)k[l]=!0;for(var m in jg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["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]=ud()?!!hg[n]:vd(n);for(var p in l)k[p]=
466
- ud()?!!jg[p]:vd(l[p]);c=k;k={};p=r('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(","));
467
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=ud()?$c(l)?!0:MediaSource.isTypeSupported(l)||Rc(l):vd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Fm;for(g in f)e[g]=f[g]();return h["return"](e)})};
468
- U.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Xa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||yd("Trident/"))return!1;var a=Bd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
469
- !1:ud()?!0:vd("application/x-mpegurl")};U.setAdManagerFactory=function(a){Nk=a};U.registerSupportPlugin=function(a,b){Fm[a]=b};U.prototype.destroy=U.prototype.destroy;
470
- var Bm="abrstatuschanged",vm="adaptation",sm="buffering",am="downloadfailed",$l="downloadheadersreceived",yl="drmsessionupdate",Fj="emsg",Cm="error",Em="expirationupdated",gl="loaded",dl="loading",tl="manifestparsed",ql="mediaqualitychanged",Yl="metadata",Zk="onstatechange",$k="onstateidle",tm="ratechange",Il="streaming",zm="textchanged",Am="texttrackvisibility",pl="timelineregionadded",cm="timelineregionenter",dm="timelineregionexit",xm="trackschanged",kl="unloading",ym="variantchanged",Gm={qg:Bm,
471
- rg:vm,sg:sm,ug:am,vg:$l,wg:yl,yg:Fj,Error:Cm,zg:Em,Bg:"largegap",Cg:gl,Dg:dl,Eg:tl,Fg:ql,Metadata:Yl,Hg:Zk,Ig:$k,Jg:tm,Lg:"sessiondata",Mg:Il,Ng:zm,Og:Am,Pg:pl,Qg:cm,Rg:dm,Sg:xm,Tg:kl,Ug:ym},al=0,Kk=1,Hl=2,Tl=3;U.LoadMode={DESTROYED:al,NOT_LOADED:Kk,MEDIA_SOURCE:Hl,SRC_EQUALS:Tl};U.version="v3.3.2";var Hm=["3","3"];Ub=new function(a){this.g=a;this.i=Vb;this.h=Wb}(new Sb(Number(Hm[0]),Number(Hm[1])));
472
- var Dm=["output-restricted","internal-error"],Fm={},Nk=null,hl={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"},lm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
473
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Im(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new jf;this.h.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=V.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};
474
- 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()};
475
- q.isLinear=function(){return this.i.isLinear()};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};
388
+ function Rk(a,b,c){function d(){return ul(a)}b.uri=c.uri;b.startTime=c.startTime;a.Sb=b.uri;var e=b.J;a.D=new Ai(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.D.o(b.startTime);a.G=new Ki({Hc:function(){return e.playbackRate},Dc:function(){return e.defaultPlaybackRate},Rd:function(k){e.playbackRate=k},oe:function(k){e.currentTime+=k}});Al(a,a.h.streaming.rebufferingGoal);a.o.A(e,"playing",d);a.o.A(e,"pause",d);a.o.A(e,"ended",d);a.o.A(e,"ratechange",function(){return vl(a)});"none"!=e.preload&&
389
+ a.o.oa(e,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Td});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return Ml(a)}),a.o.A(e.audioTracks,"removetrack",function(){return Ml(a)}),a.o.A(e.audioTracks,"change",function(){return Ml(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Nl(a,k);break;case "chapters":Dl(a,k);break;default:Ml(a)}}),a.o.A(e.textTracks,"removetrack",function(){return Ml(a)}),a.o.A(e.textTracks,
390
+ "change",function(){return Ml(a)}));var g=fg(b.uri);e.src=hk(a.W,b.uri,cl[g]);(td()||sd("Web0S"))&&e.load();a.l=Ol;a.dispatchEvent(Tk(El));var h=new rc;ri(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});ri(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return Pl(a),k=Ql(a),k.find(function(m){return"disabled"!=m.mode})?l.B(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();Rl(a);z(l)})});
391
+ e.error?h.reject(dl(a)):"none"==e.preload&&(Ua('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.'),h.resolve());a.o.oa(e,"error",function(){h.reject(dl(a))});return new Ee(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
392
+ function Pl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Md(b);var c=a.h.preferredVariantRole;""!=c&&a.Md(b,c)}}function Rl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Nd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Nd(b,d,c)}}
393
+ function Nl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,il(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Sl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}
394
+ function il(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Tk(Tl,b))}function Dl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}function pl(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 ql(a,b){return new rf(b,a.h.drm.updateExpirationTime)}
395
+ function Hk(a){return new Re(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Tk(Ul,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Tk(Vl,b))})}
396
+ function yl(a,b){return new Bi(a.g,a.i,a.h.streaming,b,function(){a.wb&&Ni(a.wb,!0);if(a.j)for(var c=a.j,d=c.g.Gc(),e=c.h.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ba=null;var k=c.g.P;g==pc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Uh(k,g),k=Ih(k,d,e));if(!k&&((null!=Vh(c.g.P,g)||h.Ha)&&nj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===pc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,vh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())qh(h.value)}a.L&&
397
+ Wl(a)},function(c){return a.dispatchEvent(c)})}function zl(a){var b=new Ti(a.Jc);b.addEventListener("enter",function(d){jl(a,Xl,d.region)});b.addEventListener("exit",function(d){jl(a,Yl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jl(a,Xl,e),jl(a,Yl,e))});var c=new Mi(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function Al(a,b){a.L=new xe;a.L.g=ze;Ae(a.L,b,Math.min(.5,b/2));gl(a);a.Ac=(new O(function(){Wl(a)})).Ba(.25)}
398
+ function Wl(a){switch(a.l){case Ol:if(a.g.ended)var b=!0;else{var c=Hh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Cl:a:if(a.g.ended||Sh(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.gb();var d=Hh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Jh(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ye:ze;c.g=d;b!=d&&gl(a)}function hl(a,b,c,d){return new Mh(a,b,c,d)}
399
+ function al(a){return new Vj({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ib:function(){return a.ib()},Fc:function(){return a.Fc()},T:function(){return a.T()}},a.h.cmcd)}
400
+ function Bl(a){return new Zi(a.i,{Gc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Wj(a.W,b,c)},P:a.N,mb:a.F,onError:function(b){return el(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ef:function(){a.I&&a.I.update&&a.I.update()},Fd:function(){a.D&&a.D.D();Wl(a)},Df:function(b,c){var d=c.wd;d&&a.wa&&Qi(a.wa,d,b)}})}
401
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("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=
402
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=xk(this.h,a,Gk(this));Zl(this);return c};
403
+ function Zl(a){if(a.I){var b=Ne(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{$l(a,a.i)}catch(f){el(a,f)}a.s&&Fl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||am(a)}a.F&&a.F.Pd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.rd!=b)){var c=Sb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.rd=b;a.j&&(b=a.j,(c=b.i.get(pc))&&
404
+ ij(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Kl(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ae(a.L,b,Math.min(.5,b/2)));a.i&&wl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Gk(this);xk(a,this.h,Gk(this));return a};
405
+ r.We=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.kc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Of=function(){for(var a in this.h)delete this.h[a];xk(this.h,Gk(this),Gk(this));Zl(this)};r.bf=function(){return this.l};r.ff=function(){return this.g};r.bc=function(){return this.F};r.md=function(){return this.Sb};
406
+ r.ge=function(){return this.C?this.C:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.lb=function(){return this.i?this.i.presentationTimeline.lb():!1};r.wf=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};
407
+ r.kc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),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.uf=function(){this.T()&&(this.g.currentTime=this.kc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ac=function(){return this.m?this.m.ac():Infinity};r.Ec=function(){return this.m?this.m.Ec():{}};
408
+ r.nd=function(){return this.L?this.L.g==ze:!1};r.Fc=function(){return this.g?this.G?this.G.i:1:0};r.Xf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==Cl&&(this.s.playbackRateChanged(a),hj(this.j,1<Math.abs(a))))};r.Me=function(){var a=this.G.Dc();this.l==Ol&&this.G.set(a);this.l==Cl&&(this.G.set(a),this.s.playbackRateChanged(a),hj(this.j,!1))};
409
+ r.ib=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,fe(e)){var f=Yd(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 ee(g)}):[]};
410
+ r.hb=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=Zd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ql(this).map(function(f){return ce(f)}):[]};r.$e=function(){return this.i?this.i.imageStreams.map(function(a){return $d(a)}):[]};
411
+ r.pf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A;return L(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.B(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
412
+ v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;B=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*p,B=Math.floor(A/m)*q);return F["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:B,startTime:x,duration:w,uris:f.sa(),width:p})}return F["return"](null)})};
413
+ r.ve=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&&(Dk(this.u.h,b,!1),kj(this.j,b),bm(this),this.Ma=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,ae(c)==a.id?c.mode=this.ja?"showing":"hidden":c.mode="disabled";bm(this)}};
414
+ r.we=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&&Ua("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&&fe(d)&&(xl(this,d,!1,b,c),this.La=new se(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,
415
+ ae(c)==a.id){cm(this,c);break}};r.Ve=function(){return dm(this.ib())};r.nf=function(){return dm(this.hb())};r.Ue=function(){return Array.from(em(this.ib()))};r.mf=function(){return Array.from(em(this.hb()))};
416
+ r.Md=function(a,b){if(this.i&&this.D){this.La=new te(a,b||"",0,"");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.l,e=this.La.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;f?(c=Yd(f),this.we(c,!0)):am(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=cd(a);f=d=null;e=
417
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ee(g);cd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?cm(this,f):d&&cm(this,d)}};
418
+ r.Nd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ma=a,this.Wb=b||"",this.Ub=c,(a=he(this.i.textStreams,this.Ma,this.Wb,this.Ub)[0]||null)&&a!=this.j.o&&(Dk(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.od()))kj(this.j,a),bm(this)}else{var d=cd(a);(a=this.hb().find(function(e){return cd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ve(a)}};
419
+ r.Pf=function(a){if(this.i&&this.D){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.La=new te(b.language,"",0,a),am(this))}};r.od=function(){var a=this.ja;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ql(this).some(function(b){return"showing"==b.mode}):a};r.he=function(){return this.g&&this.g.src&&this.g.textTracks?fm(this).map(function(a){return ce(a)}):[]};
420
+ r.Xe=function(a){var b=cd(a),c=fm(this).filter(function(f){return cd(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
421
+ function Sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function fm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
422
+ r.Vf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==Cl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=he(this.i.textStreams,this.Ma,this.Wb,this.Ub),0<a.length&&(kj(this.j,a[0]),bm(this))):gj(this.j));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)}};
423
+ r.jf=function(){if(!this.T())return null;var a=this.Ea.l,b=0;if(this.D)b=this.D.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};
424
+ r.ie=function(){if(!this.T())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.Ya=function(){if(this.l==Cl)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Ol&&(a.total=Kh(this.g.buffered));return a};
425
+ r.getStats=function(){if(this.l!=Cl&&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:[]};ul(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?
426
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.u,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.u.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.G?a.G:NaN):a=NaN;this.u.m=a;if(this.l==Cl){if(a=this.j.l)this.u.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.u,b=a.video.height||NaN,c.N=a.video.width||NaN,c.u=b);this.T()&&(a=this.ie().valueOf()+1E3*this.kc().end,this.u.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
427
+ (this.u.F=this.i.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.u.o=a}var d=this.u;a=d.N;c=d.u;b=d.s;var e=d.I,f=d.L,g=d.G,h=d.o,k=d.i,l=d.l,m=d.D,n=d.j,p=Ak(d.g,"playing"),q=Ak(d.g,"paused"),v=Ak(d.g,"buffering"),y=d.m,w=d.C,x=d.F,D=Bk(d.g),B=[];d=t(d.h.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,
428
+ estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:B}};
429
+ r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Cl&&this.l!=Ol)throw new N(1,7,7004);if(!d){var h=fg(a);d=gm[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=mk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.hb().find(function(k){return k.language==
430
+ b&&k.label==(f||"")&&k.kind==c}))return Ml(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Dd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ii(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
431
+ closedCaptions:null};if(!Tc(Nc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);Ml(this);return Zd(a)};
432
+ r.Ie=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:if(h.l!=Cl&&h.l!=Ol)throw new N(1,7,7004);if(d){B.B(2);break}return u(B,hm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Ol){B.B(4);break}g&&(c="forced");return u(B,im(h,a,b,c,d,f||"",k),5);case 5:l=h.hb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ml(h),B["return"](m);throw new N(1,2,2012);case 4:n=
433
+ qc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.B(6);break}return u(B,jm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=B.h,v=km(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ph(y),d="text/vtt";case 6:w={id:h.Dd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ii(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
434
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=Nc(w.mimeType,w.codecs);D=Tc(x);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(w);Ml(h);return B["return"](Zd(w))}})};
435
+ r.He=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=Cl&&d.l!=Ol)throw new N(1,7,7004);if(c){k.B(2);break}return u(k,hm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return u(k,im(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.he();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
436
+ case 5:throw new N(1,2,2012);}})};function hm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=fg(b);if(d=gm[c])return e["return"](d);C(e,2);return u(e,hg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
437
+ function im(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,jm(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=km(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ph(l),e="text/vtt");m=document.createElement("track");m.src=mk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
438
+ function jm(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=af;f=Ve([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&gk(k,f,{ot:nk,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function km(a,b,c,d){var e=Uc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),Uj(b,d);throw new N(2,2,2014,c);}
439
+ r.Qd=function(a,b){this.zd.width=a;this.zd.height=b};r.Kd=function(){if(this.l==Cl){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.ec&&(c.ec=!1,fj(a,c,.1));a=!0}}else a=!1;return a};r.cf=function(){Ua("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};
440
+ r.df=function(){return this.Ic};function Gk(a){var b=vk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.Kd())};b.textDisplayFactory=function(){return a.zc?new Nj(a.g,a.zc):new Ij(a.g)};return b}r.Ae=function(a){this.zc=a};
441
+ function nl(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 Ji;h={id:a.Dd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
442
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:pc,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 ml(a,b){return L(function(c){if(1==c.g)return u(c,lm(a,b),2);$l(a,b);z(c)})}
443
+ function lm(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Nd(c,b),2);Ll(b);z(d)})}
444
+ function $l(a,b){if(a.l!=Wk){for(var c=a.h.restrictions,d=a.zd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Md(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Ml(a);if((c=a.m?a.m.g:null)&&a.m.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=
445
+ f.next())g=g.value,If(a.m,g.initDataType,g.initData);mm(a,b)}}
446
+ function Gl(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,p;return L(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.fb(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["return"](p)})},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)})}
447
+ function gl(a){var b=a.nd();if(a.u&&a.L&&a.D){var c=a.G;c.j=b;Li(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);ul(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Tk(nm,b))}function vl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Tk(om),a.dispatchEvent(b))}function ul(a){if(a.u&&a.L){var b=a.u.g;a.L.g==ze?zk(b,"buffering"):a.g.paused?zk(b,"paused"):a.g.ended?zk(b,"ended"):zk(b,"playing")}}
448
+ function Fl(a){try{mm(a,a.i)}catch(c){return el(a,c),!1}var b=a.i.variants.filter(function(c){return fe(c)});b=a.La.create(b);a.s.setVariants(Array.from(b.values()));return!0}function am(a){var b;(b=Fl(a)?a.s.chooseVariant():null)&&xl(a,b,!0,!0,0)}
449
+ function xl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&jj(a.j,b,d,e,!0);else{var g=a.u.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));jj(a.j,b,d,e);d=null;f&&(d=Yd(f));b=Yd(b);c?Hl(a,d,b):pm(a,d,b)}}function cm(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=ee(c);var d=ee(b);pm(a,c,d)}
450
+ function Il(a,b,c){a=cd(a.h.preferredTextLanguage);b=cd(b.language);c=cd(c.language);return bd(c,a)&&!bd(b,c)}function Hl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Tk(qm,b);rm(a,b)}function Ml(a){var b=Tk(sm);rm(a,b)}function pm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Tk(tm,b);rm(a,b)}function bm(a){var b=Tk(um);rm(a,b)}function Jl(a){var b=Tk(vm);rm(a,b)}function Kl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);rm(a,Tk(wm,b))}
451
+ function el(a,b){if(a.l!=Wk){var c=Tk(xm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jl(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(Tk(b,c))}
452
+ function dl(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)}
453
+ function rl(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&&!ym.includes(l)}h!=f.allowedByKeySystem&&
454
+ (e=!0)}}}if(!e||Fl(a))(d=a.j.l)&&!d.allowedByKeySystem&&am(a),e&&Ml(a)}}function sl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Tk(zm);a.dispatchEvent(b)}function wl(a,b,c){0<b&&(a.T()||a.ze(b));b=a.getDuration();c<b&&(a.T()||a.Ia(c))}
455
+ function mm(a,b){var c=a.m?a.m.Ec():{},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?ym.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
456
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Ll(a){if(!a.variants.some(fe))throw new N(2,4,4032);}function rm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Wk&&a.dispatchEvent(b);z(c)})}function em(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(cd(c.language)):b.add("und");return b}
457
+ function dm(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=cd(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));
458
+ h.push({language:l,role:n,label:p})}});return h}function Xk(){return new N(2,7,7E3)}function Sk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Cj(){return{J:null,mimeType:null,startTime:null,Td:NaN,uri:null}}function Yk(a){return new Promise(function(b,c){a.nb=function(){return c(Xk())};a.Mc=function(){return b()};a.onError=function(d){return c(d)};a.Oc=function(){return c(Xk())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ae;
459
+ U.prototype.getManifestParserFactory=U.prototype.df;U.prototype.getManifest=U.prototype.cf;U.prototype.retryStreaming=U.prototype.Kd;U.prototype.setMaxHardwareResolution=U.prototype.Qd;U.prototype.addChaptersTrack=U.prototype.He;U.prototype.addTextTrackAsync=U.prototype.Ie;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.ie;
460
+ U.prototype.getPlayheadTimeAsDate=U.prototype.jf;U.prototype.setTextTrackVisibility=U.prototype.Vf;U.prototype.getChapters=U.prototype.Xe;U.prototype.getChaptersTracks=U.prototype.he;U.prototype.isTextTrackVisible=U.prototype.od;U.prototype.selectVariantsByLabel=U.prototype.Pf;U.prototype.selectTextLanguage=U.prototype.Nd;U.prototype.selectAudioLanguage=U.prototype.Md;U.prototype.getTextLanguages=U.prototype.mf;U.prototype.getAudioLanguages=U.prototype.Ue;U.prototype.getTextLanguagesAndRoles=U.prototype.nf;
461
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.Ve;U.prototype.selectVariantTrack=U.prototype.we;U.prototype.selectTextTrack=U.prototype.ve;U.prototype.getThumbnails=U.prototype.pf;U.prototype.getImageTracks=U.prototype.$e;U.prototype.getTextTracks=U.prototype.hb;U.prototype.getVariantTracks=U.prototype.ib;U.prototype.cancelTrickPlay=U.prototype.Me;U.prototype.trickPlay=U.prototype.Xf;U.prototype.getPlaybackRate=U.prototype.Fc;U.prototype.isBuffering=U.prototype.nd;U.prototype.getKeyStatuses=U.prototype.Ec;
462
+ U.prototype.getExpiration=U.prototype.ac;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.uf;U.prototype.seekRange=U.prototype.kc;U.prototype.isAudioOnly=U.prototype.wf;U.prototype.isInProgress=U.prototype.lb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.ge;U.prototype.getAssetUri=U.prototype.md;U.prototype.getNetworkingEngine=U.prototype.bc;U.prototype.getMediaElement=U.prototype.ff;
463
+ U.prototype.getLoadMode=U.prototype.bf;U.prototype.resetConfiguration=U.prototype.Of;U.prototype.getBufferFullness=U.prototype.We;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.bg;U.prototype.unload=U.prototype.Wd;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Vb;
464
+ 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,Yf(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(od()){for(var l in eg)k[l]=!0;for(var m in gg)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]=od()?!!eg[n]:pd(n);for(var p in l)k[p]=
465
+ od()?!!gg[p]:pd(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(","));
466
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=od()?Tc(l)?!0:MediaSource.isTypeSupported(l)||Jc(l):pd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Am;for(g in f)e[g]=f[g]();return h["return"](e)})};
467
+ U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ua("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||sd("Trident/"))return!1;var a=wd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
468
+ !1:od()?!0:pd("application/x-mpegurl")};U.setAdManagerFactory=function(a){Ik=a};U.registerSupportPlugin=function(a,b){Am[a]=b};U.prototype.destroy=U.prototype.destroy;
469
+ var wm="abrstatuschanged",qm="adaptation",nm="buffering",Vl="downloadfailed",Ul="downloadheadersreceived",tl="drmsessionupdate",zj="emsg",xm="error",zm="expirationupdated",bl="loaded",Zk="loading",ol="manifestparsed",ll="mediaqualitychanged",Tl="metadata",Uk="onstatechange",Vk="onstateidle",om="ratechange",El="streaming",um="textchanged",vm="texttrackvisibility",kl="timelineregionadded",Xl="timelineregionenter",Yl="timelineregionexit",sm="trackschanged",fl="unloading",tm="variantchanged",Bm={dg:wm,
470
+ eg:qm,fg:nm,hg:Vl,ig:Ul,jg:tl,lg:zj,Error:xm,mg:zm,og:"largegap",pg:bl,qg:Zk,rg:ol,sg:ll,Metadata:Tl,ug:Uk,vg:Vk,wg:om,yg:"sessiondata",zg:El,Ag:um,Bg:vm,Cg:kl,Dg:Xl,Eg:Yl,Fg:sm,Gg:fl,Hg:tm},Wk=0,Fk=1,Cl=2,Ol=3;U.LoadMode={DESTROYED:Wk,NOT_LOADED:Fk,MEDIA_SOURCE:Cl,SRC_EQUALS:Ol};U.version="v3.3.5-1";var Cm=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(Cm[0]),Number(Cm[1])));
471
+ var ym=["output-restricted","internal-error"],Am={},Ik=null,cl={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"},gm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
472
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Dm(){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 df;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(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};
473
+ 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()};
474
+ r.isLinear=function(){return this.h.isLinear()};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};
476
475
  M("shaka.ads.ClientSideAd",V);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.isLinear=V.prototype.isLinear;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;
477
- V.prototype.skip=V.prototype.skip;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 Jm(a,b,c,d){var e=this;this.s=a;this.g=b;this.u=null;this.F=NaN;this.j=d;this.o=null;this.h=new jf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.2");this.i=null;this.h.ya(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Km(e,f)});this.h.C(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
478
- function(f){Lm(e,f)});this.g.onended=function(){e.l.contentComplete()}}Jm.prototype.stop=function(){this.i&&this.i.stop();this.s&&Sj(this.s)};Jm.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function Lm(a,b){b.getError();Mm(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
479
- function Km(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));a.i=b.getAdsManager(a.g);a.j(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Nm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
480
- a.h.C(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){Mm(a,null)}}
481
- function Nm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new Q(d,e))}a.h.C(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Lm(a,c)});a.h.C(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Om(a,c)});a.h.C(a.i,google.ima.AdEvent.Type.STARTED,function(c){Om(a,c)});a.h.C(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
482
- function(c){b(c,"ad-third-quartile")});a.h.C(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Mm(a,c)});a.h.C(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Mm(a,c)});a.h.C(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
483
- a.h.C(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.o.j=!0;b(c,"ad-paused")});a.h.C(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.o.j=!1;b(c,"ad-resumed")});a.h.C(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.i,
484
- google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.i,google.ima.AdEvent.Type.AD_METADATA,
485
- function(c){b(c,"ad-metadata")});a.h.C(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Om(a,b){var c=b.getAd();a.o=new V(c,a.i);c=(new Map).set("ad",a.o).set("sdkAdObject",c).set("originalEvent",b);a.j(new Q("ad-started",c));a.o.isLinear()&&(a.s.setAttribute("ad-active","true"),a.g.pause())}
486
- function Mm(a,b){a.j(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.o.isLinear()&&(a.s.removeAttribute("ad-active"),a.g.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.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)};
487
- 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.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
488
- 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.h=this.i=null};M("shaka.ads.ServerSideAd",W);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;
476
+ V.prototype.skip=V.prototype.skip;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 Em(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new df;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.5-1");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Fm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
477
+ function(f){Gm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Em.prototype.stop=function(){this.g&&this.g.stop();this.o&&Mj(this.o)};Em.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Gm(a,b){b.getError();Hm(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
478
+ function Fm(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({start:e.value,end:null});a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Im(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
479
+ a.h.A(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){Hm(a,null)}}
480
+ function Im(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new Q(d,e))}a.h.A(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Gm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Jm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.STARTED,function(c){Jm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
481
+ function(c){b(c,"ad-third-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Hm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Hm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
482
+ a.h.A(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.A(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.g,
483
+ google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.g,google.ima.AdEvent.Type.AD_METADATA,
484
+ function(c){b(c,"ad-metadata")});a.h.A(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Jm(a,b){var c=b.getAd();a.m=new V(c,a.g);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new Q("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
485
+ function Hm(a,b){a.j(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.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)};
486
+ 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.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
487
+ r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);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;
489
488
  W.prototype.isLinear=W.prototype.isLinear;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;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
490
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Pm(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.M=NaN;this.j=d;this.J=!1;this.F=this.o=this.s=null;this.G="";this.I=[];this.h=new jf;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 Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Qm(e,f)});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.G.length?
491
- e.l.resolve(e.G):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new W(f,e.g);e.F&&(e.o.h=e.F);e.j(new Q("ad-started",(new Map).set("ad",e.o)));e.u.setAttribute("ad-active","true")});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
492
- var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.F=f.getStreamData().adProgressData;e.o&&(e.o.h=e.F)});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new Q("ad-first-quartile"))});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new Q("ad-midpoint"))});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new Q("ad-third-quartile"))});
493
- this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new Q("ad-complete"));e.j(new Q("ad-stopped"));e.u.removeAttribute("ad-active");e.o=null});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new Q("ad-skipped"));e.j(new Q("ad-stopped"))});this.h.C(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.I=
494
- f;e.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Pm.prototype.stop=function(){this.G="";this.s=null;this.I=[]};Pm.prototype.release=function(){this.stop();this.h&&this.h.release()};Pm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
495
- function Qm(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.M)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.J||a.h.C(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 X(){Re.call(this);this.g=this.h=null;this.j=new Im;this.i=navigator.language}ra(X,Re);q=X.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 Jm(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)})};
496
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);Re.prototype.release.call(this)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new Im};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.F=Date.now()/1E3;b.l.requestAds(a)};
497
- 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 Pm(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)})};
498
- 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)&&Xa('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.3.2";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
499
- (c.J=!0),c.l=new zc,c.i.requestStream(a),c.G=d||"",c.M=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)&&Xa('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.3.2";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.I};
500
- 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",X);
501
- X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
502
- X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
503
- X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
504
- X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Nk=function(){return new X};function Rm(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=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(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
505
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Rh(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}})}
506
- function Sm(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=Tm(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})}
507
- function Tm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
508
- var Um="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Vm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wm=["loop","playbackRate"],Xm=["pause","play"],Ym={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
509
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Zm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},$m=[["getConfiguration","configure"]],an=[["isTextTrackVisible","setTextTrackVisibility"]],bn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
510
- cn=["attach","detach","load","unload"];function dn(a,b,c,d,e,f){var g=this;this.M=a;this.j=new O(b);this.da=c;this.F=!1;this.u=d;this.J=e;this.S=f;this.h=this.o=!1;this.$="";this.s=null;this.G=function(){return en(g)};this.I=function(h,k){var l=Sm(k);switch(l.type){case "event":var m=l.targetName;l=Qe(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.F&&(g.da(),g.F=!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,
511
- l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.P=0;this.i={};this.l=null;fn.add(this)}q=dn.prototype;q.destroy=function(){fn["delete"](this);gn(this);hn&&jn(this);this.j&&(this.j.stop(),this.j=null);this.J=this.u=null;this.h=this.o=!1;this.I=this.G=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.xa=function(){return this.h};q.Qd=function(){return this.$};
512
- q.init=function(){if(this.M.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Sb();var a=new chrome.cast.SessionRequest(this.M);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(fn),d=c.next();!d.done;d=c.next())kn(d.value,b)},function(b){for(var c=r(fn),d=c.next();!d.done;d=c.next())d=d.value,ln="available"==b,d.j.Sb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ln&&this.j.W(mn);(a=hn)&&a.status!=chrome.cast.SessionStatus.STOPPED?kn(this,
513
- a):hn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=nn),window.__onGCastApiAvailable!=nn&&Xa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Wd=function(a){this.s=a;this.h&&on(this,{type:"appData",appData:this.s})};
514
- q.cast=function(a){var b=this;return L(function(c){if(!b.o)throw new N(1,8,8E3);if(!ln)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new zc;chrome.cast.requestSession(function(d){return pn(b,a,d)},function(d){return qn(b,d)});return u(c,b.l,0)})};function rn(a){if(a.h){var b=a.S();chrome.cast.requestSession(function(c){return pn(a,b,c)},function(c){return qn(a,c)})}}q.Fb=function(){if(this.h){gn(this);if(hn){jn(this);try{hn.stop(function(){},function(){})}catch(a){}hn=null}en(this)}};
515
- q.get=function(a,b){var c=this;if("video"==a){if(Xm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Ae.apply(c,[a,b].concat(ja(e)))}}else if("player"==a){if(Zm[b]&&!this.get("player","isLive")())return function(){};if(bn.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Ae.apply(c,[a,b].concat(ja(e)))};if(cn.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Xf.apply(c,
516
- [a,b].concat(ja(e)))};if(Ym[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;on(this,{type:"set",targetName:a,property:b,value:c})};function pn(a,b,c){hn=c;c.addUpdateListener(a.G);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);en(a);on(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
517
- function qn(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.Ae=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];on(this,{type:"call",targetName:a,methodName:b,args:d})};q.Xf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new zc;var f=this.P.toString();this.P++;this.i[f]=e;try{on(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
518
- function kn(a,b){var c=a.S();a.l=new zc;a.F=!0;pn(a,c,b)}function jn(a){var b=hn;b.removeUpdateListener(a.G);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function en(a){var b=hn?"connected"==hn.status:!1;if(a.h&&!b){a.J();for(var c in a.g)a.g[c]={};gn(a)}a.h=b;a.$=b?hn.receiver.friendlyName:"";a.j.Sb()}function gn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
519
- function on(a,b){var c=Rm(b),d=hn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},ab)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.u("player",d),a.Fb(),c;}}var mn=.02,ln=!1,hn=null,fn=new Set;function nn(a){if(a){a=r(fn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function sn(a,b,c){Re.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.o=null;this.G=c;this.F=new Map;this.g=new dn(c,function(){return tn(d)},function(){return un(d)},function(e,f){return vn(d,e,f)},function(){return wn(d)},function(){return xn(d)});yn(this)}ra(sn,Re);q=sn.prototype;
520
- q.destroy=function(a){a&&this.g.Fb();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.o=this.j=null;Re.prototype.release.call(this);return Promise.all(a)};q.Ef=function(){return this.o};q.uf=function(){return this.u};q.Te=function(){return this.g.o&&ln};q.xa=function(){return this.g.xa()};q.Qd=function(){return this.g.Qd()};
521
- q.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=xn(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.de(),0):c["return"]()})};q.Wd=function(a){this.g.Wd(a)};q.hg=function(){rn(this.g)};q.Fb=function(){this.g.Fb()};
522
- q.We=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.G)return c["return"]();b.G=a;b.g.Fb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new dn(a,function(){return tn(b)},function(){return un(b)},function(d,e){return vn(b,d,e)},function(){return wn(b)},function(){return xn(b)});b.g.init();z(c)})};
523
- function yn(a){a.g.init();a.h=new jf;for(var b=r(Um),c=b.next();!c.done;c=b.next())a.h.C(a.j,c.value,function(f){a.g.xa()||(f=Qe(f),a.l.dispatchEvent(f))});for(var d in Gm)a.h.C(a.i,Gm[d],function(f){a.g.xa()||a.s.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.Tb=e,Object.defineProperty(a.o,b.Tb,{configurable:!1,enumerable:!0,get:function(f){return function(){return zn(a,f.Tb)}}(b),set:function(f){return function(g){var h=f.Tb;a.g.xa()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Tb:b.Tb};a.u={};An(a,
524
- function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Bn(a,f)}})});Kn(a);a.l=new Re;a.l.Ec=a.o;a.s=new Re;a.s.Ec=a.u}function Kn(a){var b=new Map;An(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.F.set(c,e):a.F.set(e,c)}else b.set(d,c)})}
525
- function An(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=r(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)}}
526
- function xn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.wd(),startTime:null};a.j.pause();for(var c=r(Wm),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=r($m);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=r(an);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 tn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
527
- function un(a){var b=new Q(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
528
- function wn(a){for(var b=r($m),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=r(Wm);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=r(Wm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(an);for(k=
529
- 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 Q(Cm,h);a.i.dispatchEvent(h)})}
530
- function zn(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.xa()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.xa()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
531
- function Bn(a,b){a.F.has(b)&&(b=a.F.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.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.hc()};if("getDrmEngine"==b)return function(){return a.i.o};if("getAdManager"==b)return function(){return a.i.oe()};
532
- if("setVideoContainer"==b)return function(c){return a.i.Je(c)};if(a.g.xa()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.xa()&&0==Object.keys(a.g.g.video).length&&Ym[b]||!a.g.xa()?a.i[b].bind(a.i):a.g.get("player",b)}function vn(a,b,c){a.g.xa()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}
533
- M("shaka.cast.CastProxy",sn);sn.prototype.changeReceiverId=sn.prototype.We;sn.prototype.forceDisconnect=sn.prototype.Fb;sn.prototype.suggestDisconnect=sn.prototype.hg;sn.prototype.setAppData=sn.prototype.Wd;sn.prototype.cast=sn.prototype.cast;sn.prototype.receiverName=sn.prototype.Qd;sn.prototype.isCasting=sn.prototype.xa;sn.prototype.canCast=sn.prototype.Te;sn.prototype.getPlayer=sn.prototype.uf;sn.prototype.getVideo=sn.prototype.Ef;sn.prototype.destroy=sn.prototype.destroy;function Ln(a,b,c,d){Re.call(this);var e=this;this.g=a;this.i=b;this.h=new jf;this.P={video:a,player:b};this.I=c||function(){};this.S=d||function(f){return f};this.j=null;this.J=!1;this.s=!0;this.o=0;this.G=!1;this.F=!0;this.u=this.l=null;this.M=new O(function(){Mn(e)});Nn(this)}ra(Ln,Re);q=Ln.prototype;q.isConnected=function(){return this.J};q.If=function(){return this.s};q.dg=function(a){this.j=a};q.Ze=function(){this.j=null};
534
- q.eg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.cg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.bg=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
535
- 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.M&&(a.M.stop(),a.M=null),a.g=null,a.P=null,a.I=null,a.J=!1,a.s=!0,a.l=null,a.u=null,Re.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
536
- function Nn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return On(a)};b.onSenderDisconnected=function(){return On(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Pn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Pn(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 Qn(a,
537
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Rn(a,e)};b.start();b=r(Um);for(var c=b.next();!c.done;c=b.next())a.h.C(a.g,c.value,function(e){return Sn(a,"video",e)});for(var d in Gm)a.h.C(a.i,Gm[d],function(e){return Sn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Yd(3840,2160):a.i.Yd(1920,1080);a.h.C(a.g,"loadeddata",function(){a.G=!0});a.h.C(a.i,"loading",function(){a.s=
538
- !1;Tn(a)});a.h.C(a.g,"playing",function(){a.s=!1;Tn(a)});a.h.C(a.g,"pause",function(){Tn(a)});a.h.C(a.i,"unloading",function(){a.s=!0;Tn(a)});a.h.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,Tn(a))})).W(Un)})}function On(a){a.o=0;a.F=!0;a.J=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Tn(a)}
539
- function Tn(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);Vn(a)||Wn(a);z(c)})}
540
- function Xn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:wa(v,3);break;case 5:return g=E(v),h=Cm,k=(new Map).set("detail",g),l=new Q(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
541
- a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Wn(a));z(v)}})}function Sn(a,b,c){a.i&&(Mn(a),Pn(a,{type:"event",targetName:b,event:c},a.l))}
542
- function Mn(a){a.M.W(Yn);for(var b={video:{},player:{}},c=r(Vm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in Zm)0==a.o%Zm[e]&&(b.player[e]=a.i[e]());for(var f in Ym)0==a.o%Ym[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.G&&(a.o+=1);Pn(a,{type:"update",update:b},a.l);Vn(a)}function Vn(a){return a.F&&(a.g.duration||a.i.Y())?(Zn(a),a.F=!1,!0):!1}
543
- function Zn(a,b){var c={contentId:a.i.wd(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);Wn(a,void 0===b?0:b,c)}
544
- function Rn(a,b){var c=Sm(b.data);switch(c.type){case "init":a.o=0;a.G=!1;a.F=!0;Xn(a,c.initState,c.appData);Mn(a);break;case "appData":a.I(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.P[d][e]=c;break;case "call":d=a.P[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
545
- c.methodName;"player"==d&&"load"==e&&(a.o=0,a.G=!1);var g=c.id,h=b.senderId;f=a.P[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.F=!0}));c.then(function(){return $n(a,h,g,null)},function(k){return $n(a,h,g,k)})}}
546
- function Qn(a,b){var c=Sm(b.data);switch(c.type){case "PLAY":a.g.play();Wn(a);break;case "PAUSE":a.g.pause();Wn(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(),Wn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Wn(a));break;case "STOP":a.i.de().then(function(){a.i&&Wn(a)});break;case "GET_STATUS":Zn(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));
547
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Wn(a);break;case "LOAD":a.o=0;a.G=!1;a.F=!1;d=c.media;e=c.currentTime;f=a.S(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&Zn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Pn(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:Pn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
548
- function $n(a,b,c,d){a.i&&Pn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Pn(a,b,c,d){a.J&&(a=Rm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Wn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?ao:a.i.zd()?bo:a.g.paused?co:eo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Pn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
549
- M("shaka.cast.CastReceiver",Ln);Ln.prototype.destroy=Ln.prototype.destroy;Ln.prototype.setContentArtist=Ln.prototype.bg;Ln.prototype.setContentImage=Ln.prototype.cg;Ln.prototype.setContentTitle=Ln.prototype.eg;Ln.prototype.clearContentMetadata=Ln.prototype.Ze;Ln.prototype.setContentMetadata=Ln.prototype.dg;Ln.prototype.isIdle=Ln.prototype.If;Ln.prototype.isConnected=Ln.prototype.isConnected;var Yn=.5,Un=5,ao="IDLE",eo="PLAYING",bo="BUFFERING",co="PAUSED";function fo(a){var b=this;this.g=[];this.h=[];this.data=[];(new og).box("moov",sg).V("pssh",function(c){if(!(1<c.version)){var d=Ob(c.reader.T,-12,c.size);b.data.push(d);b.g.push(Oc(c.reader.hb(16)));if(0<c.version){d=c.reader.O();d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=Oc(c.reader.hb(16)),b.h.push(e)}}}).parse(a)}
550
- function go(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Rb(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 ho(a){if(!a)return a;var b=new fo(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={yc:c.yc},d=b.next())c.yc=d.value,a.some(function(e){return function(f){return Mb(f,e.yc)}}(c))||a.push(c.yc);return Pc.apply(Jc,ja(a))};function io(a,b){var c=jo(a,b);return 1!=c.length?null:c[0]}function ko(a,b,c){a=lo(a,b,c);return 1!=a.length?null:a[0]}function jo(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function mo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function lo(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
551
- function no(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function oo(a,b,c){b=r(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 po(a){return Array.from(a.childNodes).every(qo)?a.textContent.trim():null}function qo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function ro(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}
552
- function so(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function to(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}
553
- function uo(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 vo(a){a=Number(a);return 0===a%1?a:null}function wo(a){a=Number(a);return 0===a%1&&0<a?a:null}function xo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function yo(a){a=Number(a);return isNaN(a)?null:a}function zo(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
554
- function Ao(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Bo(a,b){try{var c=Cc(a);return Ao(c,b)}catch(d){return null}};function Co(a,b,c){var d=Do(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.De?(e=h.init||e,!1):!0}),f.length&&(a=Eo(e,f,c),0==a.length&&(a=[tc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(tc(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
555
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{je:g,Vg:e,drmInfos:a,ne:!0}}function Fo(a,b,c,d){var e=Co(a,c,d);if(b.ne){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.ne=!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.je||b.je}
556
- function Go(a){var b=0,c=Rb(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=Ob(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
557
- function Ho(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(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 Io(a){a=ko(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Mc(a.textContent);a=Go(a).filter(function(b){return b.type===Jo})[0];if(!a)return"";a=Dc(a.value,!0);return(a=Ao(a,"WRMHEADER"))?Ho(a):""}
558
- function Eo(a,b,c){var d=[];b=r(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=ko(e.node,"urn:microsoft:playready","pro")){g=Mc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:go(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=tc(f,e.init||a||g);if(f=Ko.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
559
- function Do(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Lo(c.value))&&b.push(c);return b}
560
- function Lo(a){var b=a.getAttribute("schemeIdUri"),c=no(a,"urn:mpeg:cenc:2013","default_KID"),d=lo(a,"urn:mpeg:cenc:2013","pssh").map(po);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:Mc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,De:b,keyId:c,init:0<e.length?e:null}}
561
- var Jo=1,Ko=(new Map).set("com.widevine.alpha",function(a){return(a=ko(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Io).set("com.microsoft.playready.recommendation",Io).set("com.microsoft.playready.software",Io).set("com.microsoft.playready.hardware",Io);function Mo(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=
489
+ W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Km(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new df;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.A(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Lm(e,f)});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
490
+ e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(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.A(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
491
+ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.A(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.A(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new Q("ad-first-quartile"))});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))});
492
+ this.h.A(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.A(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.A(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({start:h.start,end:h.end});e.D=
493
+ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Km.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Km.prototype.release=function(){this.stop();this.h&&this.h.release()};Km.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
494
+ function Lm(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.A(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 X(){Me.call(this);this.g=this.i=null;this.h=new Dm;this.j=navigator.language}qa(X,Me);r=X.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 N(2,10,1E4);this.i&&this.i.release();this.i=new Em(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)})};
495
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Me.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 Dm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
496
+ r.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 Km(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)})};
497
+ r.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)&&Ua('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.3.5-1";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
498
+ (c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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.3.5-1";this.g.g.replaceAdTagParameters(a)};
499
+ r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};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)};
500
+ r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;
501
+ X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";
502
+ X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";
503
+ X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Ik=function(){return new X};function Mm(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
504
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Kh(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}})}
505
+ function Nm(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=Om(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})}
506
+ function Om(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
507
+ var Pm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Rm=["loop","playbackRate"],Sm=["pause","play"],Tm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
508
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Um={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Vm=[["getConfiguration","configure"]],Wm=[["isTextTrackVisible","setTextTrackVisibility"]],Xm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
509
+ Ym=["attach","detach","load","unload"];function Zm(a,b,c,d,e,f){var g=this;this.G=a;this.j=new O(b);this.V=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.N="";this.o=null;this.C=function(){return $m(g)};this.D=function(h,k){var l=Nm(k);switch(l.type){case "event":var m=l.targetName;l=Le(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.V(),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 N(l.severity,l.category,l.code);
510
+ 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;an.add(this)}r=Zm.prototype;r.destroy=function(){an["delete"](this);bn(this);cn&&dn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ta=function(){return this.h};r.Id=function(){return this.N};
511
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(an),d=c.next();!d.done;d=c.next())en(d.value,b)},function(b){for(var c=t(an),d=c.next();!d.done;d=c.next())d=d.value,fn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});fn&&this.j.S(gn);(a=cn)&&a.status!=chrome.cast.SessionStatus.STOPPED?en(this,
512
+ a):cn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=hn),window.__onGCastApiAvailable!=hn&&Ua("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Od=function(a){this.o=a;this.h&&jn(this,{type:"appData",appData:this.o})};
513
+ r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!fn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new rc;chrome.cast.requestSession(function(d){return kn(b,a,d)},function(d){return ln(b,d)});return u(c,b.l,0)})};function mn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return kn(a,b,c)},function(c){return ln(a,c)})}}r.zb=function(){if(this.h){bn(this);if(cn){dn(this);try{cn.stop(function(){},function(){})}catch(a){}cn=null}$m(this)}};
514
+ r.get=function(a,b){var c=this;if("video"==a){if(Sm.includes(b))return function(){return c.re.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(Um[b]&&!this.get("player","isLive")())return function(){};if(Xm.includes(b))return function(){return c.re.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(Ym.includes(b))return function(){return c.Lf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(Tm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
515
+ r.set=function(a,b,c){this.g[a][b]=c;jn(this,{type:"set",targetName:a,property:b,value:c})};function kn(a,b,c){cn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);$m(a);jn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function ln(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))}
516
+ r.re=function(a,b){jn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Lf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{jn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function en(a,b){var c=a.L();a.l=new rc;a.u=!0;kn(a,c,b)}function dn(a){var b=cn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
517
+ function $m(a){var b=cn?"connected"==cn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};bn(a)}a.h=b;a.N=b?cn.receiver.friendlyName:"";a.j.Lb()}function bn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function jn(a,b){var c=Mm(b),d=cn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var gn=.02,fn=!1,cn=null,an=new Set;
518
+ function hn(a){if(a){a=t(an);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function nn(a,b,c){Me.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new Zm(c,function(){return on(d)},function(){return pn(d)},function(e,f){return qn(d,e,f)},function(){return rn(d)},function(){return sn(d)});tn(this)}qa(nn,Me);r=nn.prototype;
519
+ r.destroy=function(a){a&&this.g.zb();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;Me.prototype.release.call(this);return Promise.all(a)};r.tf=function(){return this.l};r.hf=function(){return this.s};r.Ke=function(){return this.g.m&&fn};r.ta=function(){return this.g.ta()};r.Id=function(){return this.g.Id()};
520
+ r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=sn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Wd(),0):c["return"]()})};r.Od=function(a){this.g.Od(a)};r.Wf=function(){mn(this.g)};r.zb=function(){this.g.zb()};
521
+ r.Ne=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Zm(a,function(){return on(b)},function(){return pn(b)},function(d,e){return qn(b,d,e)},function(){return rn(b)},function(){return sn(b)});b.g.init();z(c)})};
522
+ function tn(a){a.g.init();a.m=new df;for(var b=t(Pm),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.ta()||(f=Le(f),a.j.dispatchEvent(f))});for(var d in Bm)a.m.A(a.h,Bm[d],function(f){a.g.ta()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Nb=e,Object.defineProperty(a.l,b.Nb,{configurable:!1,enumerable:!0,get:function(f){return function(){return un(a,f.Nb)}}(b),set:function(f){return function(g){var h=f.Nb;a.g.ta()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Nb:b.Nb};a.s={};vn(a,
523
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return wn(a,f)}})});xn(a);a.j=new Me;a.j.Bc=a.l;a.o=new Me;a.o.Bc=a.s}function xn(a){var b=new Map;vn(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)})}
524
+ function vn(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)}}
525
+ function sn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.md(),startTime:null};a.i.pause();for(var c=t(Rm),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(Vm);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(Wm);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 on(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
526
+ function pn(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
527
+ function rn(a){for(var b=t(Vm),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(Rm);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(Rm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Wm);for(k=
528
+ 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(xm,h);a.h.dispatchEvent(h)})}
529
+ function un(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.ta()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ta()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
530
+ function wn(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.bc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ge()};
531
+ if("setVideoContainer"==b)return function(c){return a.h.Ae(c)};if(a.g.ta()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ta()&&0==Object.keys(a.g.g.video).length&&Tm[b]||!a.g.ta()?a.h[b].bind(a.h):a.g.get("player",b)}function qn(a,b,c){a.g.ta()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
532
+ M("shaka.cast.CastProxy",nn);nn.prototype.changeReceiverId=nn.prototype.Ne;nn.prototype.forceDisconnect=nn.prototype.zb;nn.prototype.suggestDisconnect=nn.prototype.Wf;nn.prototype.setAppData=nn.prototype.Od;nn.prototype.cast=nn.prototype.cast;nn.prototype.receiverName=nn.prototype.Id;nn.prototype.isCasting=nn.prototype.ta;nn.prototype.canCast=nn.prototype.Ke;nn.prototype.getPlayer=nn.prototype.hf;nn.prototype.getVideo=nn.prototype.tf;nn.prototype.destroy=nn.prototype.destroy;function yn(a,b,c,d){Me.call(this);var e=this;this.g=a;this.h=b;this.j=new df;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Hn(e)});In(this)}qa(yn,Me);r=yn.prototype;r.isConnected=function(){return this.F};r.xf=function(){return this.o};r.Sf=function(a){this.i=a};r.Qe=function(){this.i=null};
533
+ r.Tf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Rf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Qf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
534
+ 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.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Me.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
535
+ function In(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Jn(a)};b.onSenderDisconnected=function(){return Jn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Kn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Kn(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 Ln(a,
536
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Mn(a,e)};b.start();b=t(Pm);for(var c=b.next();!c.done;c=b.next())a.j.A(a.g,c.value,function(e){return Nn(a,"video",e)});for(var d in Bm)a.j.A(a.h,Bm[d],function(e){return Nn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Qd(3840,2160):a.h.Qd(1920,1080);a.j.A(a.g,"loadeddata",function(){a.C=!0});a.j.A(a.h,"loading",function(){a.o=
537
+ !1;On(a)});a.j.A(a.g,"playing",function(){a.o=!1;On(a)});a.j.A(a.g,"pause",function(){On(a)});a.j.A(a.h,"unloading",function(){a.o=!0;On(a)});a.j.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,On(a))})).S(Pn)})}function Jn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;On(a)}
538
+ function On(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);Qn(a)||Rn(a);z(c)})}
539
+ function Sn(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.D(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:va(v,3);break;case 5:return g=E(v),h=xm,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],
540
+ a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),Rn(a));z(v)}})}function Nn(a,b,c){a.h&&(Hn(a),Kn(a,{type:"event",targetName:b,event:c},a.l))}
541
+ function Hn(a){a.G.S(Tn);for(var b={video:{},player:{}},c=t(Qm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Um)0==a.m%Um[e]&&(b.player[e]=a.h[e]());for(var f in Tm)0==a.m%Tm[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.C&&(a.m+=1);Kn(a,{type:"update",update:b},a.l);Qn(a)}function Qn(a){return a.u&&(a.g.duration||a.h.T())?(Un(a),a.u=!1,!0):!1}
542
+ function Un(a,b){var c={contentId:a.h.md(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rn(a,void 0===b?0:b,c)}
543
+ function Mn(a,b){var c=Nm(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Sn(a,c.initState,c.appData);Hn(a);break;case "appData":a.D(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=
544
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!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 Vn(a,h,g,null)},function(k){return Vn(a,h,g,k)})}}
545
+ function Ln(a,b){var c=Nm(b.data);switch(c.type){case "PLAY":a.g.play();Rn(a);break;case "PAUSE":a.g.pause();Rn(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(),Rn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Rn(a));break;case "STOP":a.h.Wd().then(function(){a.h&&Rn(a)});break;case "GET_STATUS":Un(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));
546
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Rn(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Un(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Kn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Kn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
547
+ function Vn(a,b,c,d){a.h&&Kn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Kn(a,b,c,d){a.F&&(a=Mm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Rn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Wn:a.h.nd()?Xn:a.g.paused?Yn:Zn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Kn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
548
+ M("shaka.cast.CastReceiver",yn);yn.prototype.destroy=yn.prototype.destroy;yn.prototype.setContentArtist=yn.prototype.Qf;yn.prototype.setContentImage=yn.prototype.Rf;yn.prototype.setContentTitle=yn.prototype.Tf;yn.prototype.clearContentMetadata=yn.prototype.Qe;yn.prototype.setContentMetadata=yn.prototype.Sf;yn.prototype.isIdle=yn.prototype.xf;yn.prototype.isConnected=yn.prototype.isConnected;var Tn=.5,Pn=5,Wn="IDLE",Zn="PLAYING",Xn="BUFFERING",Yn="PAUSED";function $n(a){var b=this;this.g=[];this.h=[];this.data=[];(new lg).box("moov",pg).R("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Gc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Gc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
549
+ function ao(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(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 bo(a){if(!a)return a;var b=new $n(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={qc:c.qc},d=b.next())c.qc=d.value,a.some(function(e){return function(f){return Db(f,e.qc)}}(c))||a.push(c.qc);return Hc.apply(Ac,ja(a))};function co(a,b){var c=eo(a,b);return 1!=c.length?null:c[0]}function fo(a,b,c){a=go(a,b,c);return 1!=a.length?null:a[0]}function eo(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 ho(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
550
+ function go(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 io(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function jo(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 ko(a){return Array.from(a.childNodes).every(lo)?a.textContent.trim():null}
551
+ function lo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function mo(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 no(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)}
552
+ function oo(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}
553
+ function po(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 qo(a){a=Number(a);return 0===a%1?a:null}function ro(a){a=Number(a);return 0===a%1&&0<a?a:null}function so(a){a=Number(a);return 0===a%1&&0<=a?a:null}function to(a){a=Number(a);return isNaN(a)?null:a}function uo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
554
+ function vo(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function wo(a,b){try{var c=uc(a);return vo(c,b)}catch(d){return null}};function xo(a,b,c){var d=yo(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.ue?(e=h.init||e,!1):!0}),f.length&&(a=zo(e,f,c),0==a.length&&(a=[lc("",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(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
555
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{be:g,Ig:e,drmInfos:a,fe:!0}}function Ao(a,b,c,d){var e=xo(a,c,d);if(b.fe){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.fe=!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.be||b.be}
556
+ function Bo(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
557
+ function Co(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 Do(a){a=fo(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Dc(a.textContent);a=Bo(a).filter(function(b){return b.type===Eo})[0];if(!a)return"";a=vc(a.value,!0);return(a=vo(a,"WRMHEADER"))?Co(a):""}
558
+ function zo(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.ue];if(f){var g;if(g=fo(e.node,"urn:microsoft:playready","pro")){g=Dc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:ao(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=lc(f,e.init||a||g);if(f=Fo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
559
+ function yo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Go(c.value))&&b.push(c);return b}
560
+ function Go(a){var b=a.getAttribute("schemeIdUri"),c=io(a,"urn:mpeg:cenc:2013","default_KID"),d=go(a,"urn:mpeg:cenc:2013","pssh").map(ko);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:Dc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,ue:b,keyId:c,init:0<e.length?e:null}}
561
+ var Eo=1,Fo=(new Map).set("com.widevine.alpha",function(a){return(a=fo(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Do).set("com.microsoft.playready.recommendation",Do).set("com.microsoft.playready.software",Do).set("com.microsoft.playready.hardware",Do);function Ho(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=
562
562
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
563
- function No(a,b){var c=Oo(a,b,"timescale"),d=1;c&&(d=wo(c)||1);var e=Oo(a,b,"duration");c=wo(e||"");"image"==a.L.contentType&&(c=yo(e||""));c&&(c/=d);var f=Oo(a,b,"startNumber");e=Number(Oo(a,b,"presentationTimeOffset"))||0;var g=xo(f||"");if(null==f||null==g)g=1;var h=Po(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Z.duration||Infinity,l=jo(h,"S");h=[];var m=-e;l=r(mb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=ro(p,"t",xo);n=ro(p,"d",xo);var w=ro(p,"r",vo);null!=
564
- v&&(v-=e);if(!n)break;p=null!=v?v:m;v=w||0;if(0>v)if(t){t=ro(t,"t",xo);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(kb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/f,end:m/f,mg:p}),p=m}f=h}return{timescale:d,la:c,Rb:g,Za:e/d||0,ee:e,timeline:f}}
565
- function Oo(a,b,c){return[b(a.L),b(a.pa),b(a.ha)].filter(Zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function Po(a,b,c){return[b(a.L),b(a.pa),b(a.ha)].filter(Zb).map(function(d){return io(d,c)}).reduce(function(d,e){return d||e})}
566
- function Qo(a,b,c,d,e,f){for(var g=no(a,"http://www.w3.org/1999/xlink","href"),h=no(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Ke(new N(2,4,4028));if("onLoad"!=h)return Ke(new N(2,4,4027));var m=sc([d],[g]);return e.request(0,$e(m,b)).fa(function(n){n=Bo(n.data,a.tagName);if(!n)return Ke(new N(2,4,4001,g));
567
- 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=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Ro(a,b,c,m[0],e,f+1)})}
568
- function Ro(a,b,c,d,e,f){f=void 0===f?0:f;if(no(a,"http://www.w3.org/1999/xlink","href")){var g=Qo(a,b,c,d,e,f);c&&(g=g.fa(void 0,function(){return Ro(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==no(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ro(k,b,c,d,e,f)));return Oe(g).fa(function(){return a})};function So(a,b,c,d,e,f,g){var h,k=(new og).V("sidx",function(l){h=To(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
569
- function To(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Qb(),m=g.reader.Qb();g.reader.skip(2);var n=g.reader.Pb();a=a+g.size+m;n=r(kb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.O();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.O();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new ri(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
570
- return h};function Uo(a){this.h=Rb(a);this.g=new lg(this.h,0)}Uo.prototype.qa=function(){return this.g.qa()};
571
- function Vo(a){var b=Wo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Wo(a);a:{d=r(Xo);for(var e=d.next();!e.done;e=d.next())if(Mb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ba();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=r(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.ba()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ba();d=Rb(a.h,
572
- a.g.ba(),b);a.g.skip(b);return new Yo(c,d)}function Wo(a){var b=a.g.ba(),c=a.g.ca();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ob(a.h,b,c)}var Xo=[[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 Yo(a,b){this.id=a;this.g=b}
573
- function Zo(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=r(kb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function $o(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Uo(a.g);for(var n=null,p=null;a.qa();){var t=Vo(a);if(187==t.id){var v=ap(t);v&&(t=c*v.ng,v=b+v.Wf,null!=n&&m.push(new ri(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new ri(n+g,d+g,l,p,null,f,g,h,k));return m}
574
- function ap(a){var b=new Uo(a.g);a=Vo(b);if(179!=a.id)throw new N(2,3,3013);a=Zo(a);b=Vo(b);if(183!=b.id)throw new N(2,3,3012);b=new Uo(b.g);for(var c=0;b.qa();){var d=Vo(b);if(241==d.id){c=Zo(d);break}}return{ng:a,Wf:c}};function bp(a,b){var c=Po(a,b,"Initialization");if(!c)return null;var d=a.L.Ba,e=c.getAttribute("sourceURL");e&&(d=sc(a.L.Ba,[e]));e=0;var f=null;if(c=ro(c,"range",uo))e=c.start,f=c.end;return new pi(function(){return d},e,f,cp(a))}
575
- function dp(a,b){var c=Number(Oo(a,ep,"presentationTimeOffset"))||0,d=Oo(a,ep,"timescale"),e=1;d&&(e=wo(d)||1);var f=c/e||0,g=bp(a,ep);fp(a,g);var h=Te(a);return{Gb:function(){var k=Po(h,ep,"RepresentationIndex"),l=h.L.Ba;k&&(k=k.getAttribute("sourceURL"))&&(l=sc(h.L.Ba,[k]));k=gp(h);return hp(h,b,g,l,k.start,k.end,f)}}}
576
- function hp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,D,C,A,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.eb||!a.Z.te,l=a.Z.start,m=a.Z.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.ua(),c.sa,c.ja):null],p=null,u(G,Promise.all(v),2);w=G.h;y=w[0];x=w[1]||null;D=null;C=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=So(y,e,d,c,C,A,F);else{H=new Uo(x);if(440786851!=Vo(H).id)throw new N(2,3,3008);var J=Vo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
577
- J=new Uo(J.g);for(var I=null;J.qa();){var K=Vo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new Uo(I.g);K=1E6;for(J=null;I.qa();){var P=Vo(I);if(2807729==P.id)K=Zo(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.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=Vo(new Uo(y));if(475249515!=K.id)throw new N(2,3,3007);H=$o(K,H,I,J,d,c,C,A,F)}D=H;h.Mb(D);t=new T(D);k&&t.fb(A,F,!0);return G["return"](t)})}
578
- function ep(a){return a.sc}function gp(a){var b=Po(a,ep,"RepresentationIndex");a=Oo(a,ep,"indexRange");a=uo(a||"");b&&(a=ro(b,"range",uo,a));return a}function fp(a,b){ip(a,b);if(!gp(a))throw new N(2,4,4002);}function ip(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=xc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
579
- function cp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Rc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function jp(a,b){var c=bp(a,kp),d=lp(a);if(!d.la&&!d.timeline&&1<d.Jb.length)throw new N(2,4,4002);if(!d.la&&!a.Z.duration&&!d.timeline&&1==d.Jb.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.L.id&&(f=b[a.ha.id+","+a.L.id])&&(e=f.segmentIndex);var g=mp(a.Z.start,a.Z.duration,a.L.Ba,d,c);c=!e;e?e.Lb(g,a.presentationTimeline.Xa()):e=new T(g);a.presentationTimeline.Mb(g);a.eb&&a.Z.te||e.fb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
580
- Infinity,c);f&&(f.segmentIndex=e);return{Gb:function(){e&&0!=e.N.length||e.Kb(g);return Promise.resolve(e)}}}function kp(a){return a.ib}function lp(a){var b=np(a);a=No(a,kp);var c=a.Rb;0==c&&(c=1);var d=0;a.la?d=a.la*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{la:a.la,startTime:d,Rb:c,Za:a.Za,timeline:a.timeline,Jb:b}}
581
- function mp(a,b,c,d,e){var f=d.Jb.length;d.timeline&&d.timeline.length!=d.Jb.length&&(f=Math.min(d.timeline.length,d.Jb.length));var g=a-d.Za,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(kb(f));for(var n=f.next();!n.done;m={gd:m.gd},n=f.next()){n=n.value;var p=d.Jb[n];m.gd=sc(c,[p.Mf]);var t=void 0;t=null!=d.la?l+d.la:d.timeline?d.timeline[n].end:l+b;k.push(new ri(a+l,a+t,function(v){return function(){return v.gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
582
- function np(a){return[a.L.ib,a.pa.ib,a.ha.ib].filter(Zb).map(function(b){return jo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.re&&(a.re=!0);var c=b.getAttribute("media");b=ro(b,"mediaRange",uo,{start:0,end:null});return{Mf:c,start:b.start,end:b.end}})};function op(a,b,c,d,e,f){var g=pp(a),h=qp(a);rp(h);var k=Te(a);if(h.lc)return ip(a,g),{Gb:function(){var t=Mo(h.lc,k.L.id,null,k.bandwidth||null,null);t=sc(k.L.Ba,[t]);return hp(k,b,g,t,0,null,h.Za)}};if(h.la)return d||(a.presentationTimeline.Ld(h.la),a.presentationTimeline.Md(a.Z.start)),{Gb:function(){return sp(k,h,e,g,f)}};var l=null;d=d=null;a.ha.id&&a.L.id&&(d=a.ha.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=tp(k,h,g);c=a.Z.start;var n=a.Z.duration?a.Z.start+a.Z.duration:Infinity,p=Infinity!=
583
- n;l?(p&&(new T(m)).fb(c,n,!0),l.Lb(m,a.presentationTimeline.Xa())):l=new T(m);a.presentationTimeline.Mb(m);p&&l.fb(c,n);d&&a.eb&&(d.segmentIndex=l);return{Gb:function(){l&&0!=l.N.length||l.Kb(m);return Promise.resolve(l)}}}function up(a){return a.tc}function qp(a){var b=No(a,up),c=Oo(a,up,"media");a=Oo(a,up,"index");return{la:b.la,timescale:b.timescale,Rb:b.Rb,Za:b.Za,ee:b.ee,timeline:b.timeline,Kd:c,lc:a}}
584
- function rp(a){var b=a.lc?1:0;b+=a.timeline?1:0;b+=a.la?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.lc&&(a.timeline=null),a.la=null);if(!a.lc&&!a.Kd)throw new N(2,4,4002);}
585
- function sp(a,b,c,d,e){function f(I){var K=(I-t)*p,P=K+b.Za,R=K+l;K=R+p;var da=Math.min(K,h());R=new ri(R,da,function(){var Y=Mo(w,x,I,y,P*v);return sc(D,[Y])},0,null,d,C,l,h());R.l=K;return R}function g(){var I=[Math.max(k.Xa(),l),Math.min(k.mb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+t})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ha.id,n=a.Z.duration,p=b.la,t=b.Rb,v=b.timescale,
586
- w=b.Kd,y=a.bandwidth||null,x=a.L.id,D=a.L.Ba,C=l-b.Za,A=g();a=a.eb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.mb()<h();F=k.Y();if(c||F){var J=Math.max(a,A+1);H.Yc(p,function(){var I=k.Xa();H.kb(I);var K=r(g());K.next();K=K.next().value;for(var P=[];J<=K;){var R=f(J);P.push(R);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
587
- function tp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.Za;e=e?d+e:Infinity;for(var g=[],h={},k=r(mb(b.timeline)),l=k.next();!l.done;h={fd:h.fd,kd:h.kd,nd:h.nd,cd:h.cd,pd:h.pd,dd:h.dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.mg;m=m.end;h.nd=l.ga+b.Rb;h.pd=p+b.ee;h.kd=a.L.id;h.cd=a.bandwidth||null;h.fd=b.Kd;h.dd=a.L.Ba;g.push(new ri(d+n,d+m,function(t){return function(){var v=Mo(t.fd,t.kd,t.nd,t.cd||null,t.pd);return sc(t.dd,[v]).map(function(w){return w.toString()})}}(h),0,null,c,f,d,e))}return g}
588
- function pp(a){var b=Oo(a,up,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Ba;return new pi(function(){var f=Mo(b,c,null,d,null);return sc(e,[f])},0,null,cp(a))};function vp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}vp.prototype.release=function(){for(var a=r(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=[]};
589
- function wp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y,aa,za,Ia,Da,la,$a;return L(function(Va){switch(Va.g){case 1:d=yc;xp(b);yp(b);zp(b);Ap(b);if(!c&&1==b.length){e=b[0];a.g=e.Fc;a.h=e.$c;a.j=e.textStreams;a.i=e.imageStreams;Va.A(2);break}f=-1;g=r(mb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ga,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return Va["return"]();p=b.map(function(Fa){return Fa.Fc});t=b.map(function(Fa){return Fa.$c});v=b.map(function(Fa){return Fa.textStreams});
590
- w=b.map(function(Fa){return Fa.imageStreams});y=r(v);for(x=y.next();!x.done;x=y.next())D=x.value,D.push(Bp(d.ea));C=r(w);for(A=C.next();!A.done;A=C.next())F=A.value,F.push(Bp(d.Xb));return u(Va,Cp(a.g,p,f,Dp,Ep),3);case 3:return u(Va,Cp(a.h,t,f,Dp,Ep),4);case 4:return u(Va,Cp(a.j,v,f,Dp,Ep),5);case 5:return u(Va,Cp(a.i,w,f,Dp,Ep),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(da=r(a.g),Y=da.next();!Y.done;Y=da.next())for(aa=Y.value,za=r(a.h),Ia=za.next();!Ia.done;Ia=za.next())Da=Ia.value,la=dg(aa.drmInfos,
591
- Da.drmInfos),aa.drmInfos.length&&Da.drmInfos.length&&!la.length||($a=G++,H.push({id:$a,language:aa.language,primary:aa.primary,audio:aa,video:Da,bandwidth:(aa.bandwidth||0)+(Da.bandwidth||0),drmInfos:la,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(J=a.h.concat(a.g),I=r(J),K=I.next();!K.done;K=I.next())P=K.value,R=G++,H.push({id:R,language:P.language,primary:P.primary,audio:P.type==d.jb?P:null,video:P.type==d.Ta?P:null,bandwidth:P.bandwidth||0,drmInfos:P.drmInfos,allowedByApplication:!0,
592
- allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Va)}})}
593
- function xp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Fc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&pb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Fc=c}}
594
- function zp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&pb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
595
- function yp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&pb(e.roles,h.roles)&&tf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.$c=c}}
596
- function Ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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}}
597
- function Fp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P;return L(function(R){switch(R.g){case 1:b=yc;if(1==a.length)return R["return"](a[0]);c=a.map(function(da){return da.filter(function(Y){return Y.type==b.jb})});d=a.map(function(da){return da.filter(function(Y){return Y.type==b.Ta})});e=a.map(function(da){return da.filter(function(Y){return Y.type==b.ea})});f=a.map(function(da){return da.filter(function(Y){return Y.type==b.Xb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
598
- k.push(Gp(b.ea));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Gp(b.Xb));return u(R,Cp([],c,0,Hp,Ip),2);case 2:return p=R.h,u(R,Cp([],d,0,Hp,Ip),3);case 3:return t=R.h,u(R,Cp([],e,0,Hp,Ip),4);case 4:return v=R.h,u(R,Cp([],f,0,Hp,Ip),5);case 5:w=R.h;y=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),I=J.next();!I.done;I=J.next())K=I.value,P=y++,K.variantIds.push(P),H.variantIds.push(P);else for(x=t.concat(p),D=r(x),C=D.next();!C.done;C=D.next())A=C.value,
599
- A.variantIds=[y++];return R["return"](t.concat(p).concat(v).concat(w))}})}
600
- function Cp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y;return L(function(aa){switch(aa.g){case 1:f=yc;g=[];h=r(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);t=r(a);v=t.next();case 2:if(v.done){aa.A(4);break}w=v.value;return u(aa,Jp(w,b,c,e,g),5);case 5:y=aa.h;if(!y)throw new N(2,4,4037);v=t.next();aa.A(2);break;case 4:x=r(g);for(D=x.next();!D.done;D=x.next())for(C=D.value,A=r(C),F=A.next();!F.done;F=A.next())G=
601
- F.value,(H=Kp(G,b,d,e,g))&&a.push(H);J=r(g);for(D=J.next();!D.done;D=J.next())for(I=D.value,K={},P=r(I),F=P.next();!F.done;K={cb:K.cb},F=P.next())if(K.cb=F.value,R=K.cb.type==f.ea&&!K.cb.language,da=K.cb.type==f.Xb&&!K.cb.tilesLayout,!R&&!da&&(Y=a.some(function(za){return function(Ia){return Ia.mimeType==za.cb.mimeType&&Xc(Ia.codecs)==Xc(za.cb.codecs)}}(K))))throw new N(2,4,4037);return aa["return"](a)}})}
602
- function Jp(a,b,c,d,e){return L(function(f){if(1==f.g)return Lp(b,a),a.matchedStreams?a.segmentIndex?u(f,Mp(a,c),2):f.A(2):f["return"](!1);Np(a,c,d,e);return f["return"](!0)})}
603
- function Mp(a,b){var c,d,e,f,g,h,k,l,m,n,p;return L(function(t){if(1==t.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(t,Promise.all(c),2)}if(a.segmentIndex instanceof Qi)for(h=r(mb(d)),k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ga,p=m.item,p.segmentIndex&&n>=b&&a.segmentIndex.j.push(p.segmentIndex);z(t)})}
604
- function Kp(a,b,c,d,e){var f=c(a);Lp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Qi;return u(g,Mp(f,0),0)})});if(!f.matchedStreams)return null;Np(f,0,d,e);return f}function Np(a,b,c,d){for(var e=r(mb(a.matchedStreams)),f=e.next();!f.done;f=e.next()){var g=f.value;f=g.ga;g=g.item;if(f>=b){c(a,g);var h=!0;"audio"==a.type&&0==nd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}}
605
- function Dp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
606
- function Hp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
607
- function Ep(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))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=dg(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||
608
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Dp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Ep(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Ep(a.trickModeVideo,b)}
609
- function Ip(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
610
- function Lp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Op,video:Op,text:Pp,image:Qp}[f.type],h={audio:Rp,video:Sp,text:Tp,image:Up}[f.type],k=null;e=r(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;c.push(f)}b.matchedStreams=c}function Op(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Xc(b.codecs)!=Xc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<dg(c,d).length:1)}return c?!1:!0}
611
- function Pp(a,b){return a.language?b.language?0==nd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Qp(a){return a.tilesLayout?!0:!1}
612
- function Rp(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(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;
613
- d=Vp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Wp)return!0;if(d==Xp)return!1;d=Vp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Wp?!0:d==Xp?!1:a.bandwidth&&Yp(a.bandwidth,b.bandwidth,c.bandwidth)==Wp?!0:!1}
614
- function Sp(a,b,c){if(a.id==c.id)return!0;var d=Vp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Wp)return!0;if(d==Xp)return!1;if(a.frameRate){d=Vp(a.frameRate,b.frameRate,c.frameRate);if(d==Wp)return!0;if(d==Xp)return!1}return a.bandwidth&&Yp(a.bandwidth,b.bandwidth,c.bandwidth)==Wp?!0:!1}
615
- function Tp(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(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!=
616
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Up(a,b,c){return a.id==c.id?!0:Vp(a.width*a.height,b.width*b.height,c.width*c.height)==Wp?!0:!1}function Gp(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}}
617
- function Bp(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}}
618
- function Vp(a,b,c){if(b==a&&a!=c)return Xp;if(c==a&&a!=b)return Wp;if(b>a){if(c<=a||c-a<b-a)return Wp;if(c-a>b-a)return Xp}else{if(c>a)return Xp;if(a-c<a-b)return Wp;if(a-c>a-b)return Xp}return Zp}function Yp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Wp:b<a?Xp:Zp}var Wp=1,Zp=0,Xp=-1;function $p(){var a=this;this.B=this.m=null;this.h=[];this.D=null;this.F=1;this.$a={};this.J={};this.g=new vp;this.u=0;this.G=new Qa(5);this.s=new O(function(){a.nc()});this.i=new Ue;this.j=null;this.I=[];this.l=Infinity;this.o=!1}q=$p.prototype;q.configure=function(a){this.m=a};q.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.h=[a],c.B=b,u(e,aq(c),2);d=e.h;c.B&&bq(c,d);if(!c.B)throw new N(2,7,7001);return e["return"](c.D)})};
619
- q.stop=function(){for(var a=r(Object.values(this.$a)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g&&this.g.release();this.m=this.B=null;this.h=[];this.D=null;this.$a={};this.g=null;null!=this.s&&(this.s.stop(),this.s=null);return this.i.destroy()};q.update=function(){var a=this,b;return L(function(c){if(1==c.g)return B(c,2),u(c,aq(a),4);if(2!=c.g)return wa(c,0);b=E(c);if(!a.B||!b)return c["return"]();a.B.onError(b);z(c)})};q.onExpirationUpdated=function(){};
620
- function aq(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=$e(a.h,a.m.retryParameters),c=a.B.networkingEngine,a.B.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ve(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.B)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,cq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Ra(a.G,1,h);return k["return"](h)})}
621
- function cq(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Bo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.m.dash.disableXlinkProcessing)return k["return"](dq(a,d,c));f=a.m.dash.xlinkFailGracefully;g=Ro(d,a.m.retryParameters,f,c,a.B.networkingEngine);Ve(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](dq(a,h,c))})}
622
- function dq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y,aa,za,Ia,Da;return L(function(la){switch(la.g){case 1:(d=a.m.dash.manifestPreprocessor)&&d(b);e=[c];f=jo(b,"Location").map(po).filter(Zb);0<f.length&&(g=sc(e,f),e=a.h=g);h=jo(b,"BaseURL");k=h.map(po);l=sc(e,k);m=0;h&&h.length&&(m=ro(h[0],"availabilityTimeOffset",yo)||0);n=a.m.dash.ignoreMinBufferTime;p=0;n||(p=ro(b,"minBufferTime",to)||0);a.u=ro(b,"minimumUpdatePeriod",to,-1);t=ro(b,"availabilityStartTime",so);v=ro(b,
623
- "timeShiftBufferDepth",to);w=a.m.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=ro(b,"suggestedPresentationDelay",to));x=a.m.dash.ignoreMaxSegmentDuration;D=null;x||(D=ro(b,"maxSegmentDuration",to));C=b.getAttribute("type")||"static";if(a.D)for(A=a.D.presentationTimeline,F=r(Object.values(a.$a)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.kb(A.Xa());else J=a.m.defaultPresentationDelay||1.5*p,I=null!=y?y:J,A=new S(t,I,a.m.dash.autoCorrectDrift);A.uc("static"==C);(K=A.Y())&&
624
- !isNaN(a.m.availabilityWindowOverride)&&(v=a.m.availabilityWindowOverride);null==v&&(v=Infinity);A.$d(v);P=b.getAttribute("profiles")||"";R={eb:"static"!=C,presentationTimeline:A,ha:null,Z:null,pa:null,L:null,bandwidth:0,re:!1,Eb:m,profiles:P.split(",")};da=eq(a,R,l,b);Y=da.duration;aa=da.periods;"static"!=C&&da.le||A.Na(Y||Infinity);a.l&&!a.o&&(za=a.B.isAutoLowLatencyMode())&&(a.B.enableLowLatencyMode(),a.o=a.B.isLowLatencyMode());a.o?A.Ge(a.l):a.l&&Xa("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.");
625
- A.Ld(D||1);return u(la,wp(a.g,aa,R.eb),2);case 2:if(a.D){a.D.variants=a.g.l;a.D.textStreams=a.g.j.slice();a.D.imageStreams=a.g.i;a.B.filter(a.D);la.A(3);break}a.D={presentationTimeline:A,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Le()){la.A(3);break}Ia=jo(b,"UTCTiming");return u(la,fq(a,l,Ia),5);case 5:Da=la.h;if(!a.B)return la["return"]();A.He(Da);case 3:a.B.makeTextStreamsForClosedCaptions(a.D),z(la)}})}
626
- function eq(a,b,c,d){var e=ro(d,"mediaPresentationDuration",to),f=[],g=0;d=jo(d,"Period");for(var h=r(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=ro(m,"start",to,g);var p=m.id,t=ro(m,"duration",to),v=null;if(n){var w=ro(n,"start",to);null!=w&&(v=w-l)}else null!=e&&(v=e-l);null==v&&(v=t);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=gq(a,b,c,{start:l,duration:v,node:m,te:null==v||!n});f.push(g);
627
- b.ha.id&&v&&(a.J[b.ha.id]=v);if(null==v){g=null;break}g=l+v}}a.I=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,le:!1}:{periods:f,duration:g,le:!0}}
628
- function gq(a,b,c,d){b.ha=hq(d.node,null,c);b.Z=d;b.ha.Eb=b.Eb;b.ha.id||(b.ha.id="__shaka_period_"+d.start);var e=jo(d.node,"EventStream");c=b.presentationTimeline.Xa();e=r(e);for(var f=e.next();!f.done;f=e.next())iq(a,d.start,d.duration,f.value,c);c=jo(d.node,"AdaptationSet").map(function(m){return jq(a,b,m)}).filter(Zb);if(b.eb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Zf);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);
629
- }d=c.filter(function(m){return!m.ce});c=c.filter(function(m){return m.ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Cc:h.Cc},l=k.next())h.Cc=l.value,h.Cc.trickModeVideo=e.streams.find(function(m){return function(n){return Xc(m.Cc.codecs)==Xc(n.codecs)}}(h))}}}e=a.m.disableAudio?[]:kq(d,"audio");g=a.m.disableVideo?[]:kq(d,"video");f=a.m.disableText?
630
- []:kq(d,xc);c=a.m.disableThumbnails?[]:kq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.ha.id,Fc:d,$c:e,textStreams:g,imageStreams:f}}
631
- function kq(a,b){return a.filter(function(c){return c.contentType==b})}
632
- function jq(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.pa=hq(c,b.ha,null);var e=!1,f=jo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Zb),h=void 0,k=b.pa.contentType==xc;k&&(h="subtitle");f=r(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=
633
- l}}var n;m=jo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=jo(c,"SupplementalProperty");m=r(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"),
634
- 10)));m=jo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var w=r(t),y=w.next();!y.done;y=w.next()){var x=y.value,D=y=void 0;x.includes("=")?(x=x.split("="),y=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(y="CC"+p,2==t.length?p+=2:p++,D=x);v.set(y,jd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
635
- 1,null!=t)for(t=r(t.split(";")),y=t.next();!y.done;y=t.next())y=y.value,x=w=void 0,y.includes("=")?(y=y.split("="),w="svc"+y[0],x=y[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,x=y),v.set(w,jd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=jo(c,"ContentProtection");var C=Co(l,a.m.dash.ignoreDrmInfo,a.m.dash.keySystemsByURI),A=jd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=jo(c,"Label"))&&l.length&&
636
- (l=l[0],l.textContent&&(F=l.textContent));l=jo(c,"Representation");c=l.map(function(G){if(G=lq(a,b,C,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.pa.contentType;if(a.m.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.pa.contentType||"application"==b.pa.contentType)for(b.pa.contentType=mq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.pa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
637
- m.value,p=r(C.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Zb);return{id:b.pa.id||"__fake__"+a.F++,contentType:b.pa.contentType,language:A,Wg:e,streams:c,drmInfos:C.drmInfos,ce:f,Zf:k}}
638
- function lq(a,b,c,d,e,f,g,h,k,l){b.L=hq(l,b.pa,null);a.l=Math.min(a.l,b.L.Eb);if(!nq(b.L))return null;var m=b.Z.start;b.bandwidth=ro(l,"bandwidth",wo)||0;var n=b.L.contentType,p=n==xc||"application"==n;n="image"==n;try{var t=function(H,J,I){return oq(a,H,J,I)};if(b.L.sc)var v=dp(b,t);else if(b.L.ib)v=jp(b,a.$a);else if(b.L.tc)v=op(b,t,a.$a,!!a.D,a.m.dash.initialSegmentLimit,a.J);else{var w=b.L.Ba,y=b.Z.duration||0;v={Gb:function(){return Promise.resolve(Pi(m,y,w))}}}}catch(H){if((p||n)&&4002==H.code)return null;
639
- throw H;}t=jo(l,"ContentProtection");t=Fo(t,c,a.m.dash.ignoreDrmInfo,a.m.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;jo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(b.L.mimeType="audio/eac3-joc",x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=jo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile",
640
- "http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&(C=l.getAttribute("value")),!C))return null;var A;l=b.L.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 F=b.L.id?b.ha.id+","+b.L.id:"",G={id:a.F++,originalId:b.L.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=F&&b.eb&&a.$a[F])?a.$a[F]:G;if(J.segmentIndex)return K.A(0);
641
- I=J;return u(K,v.Gb(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.pa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,
642
- forced:D,channelsCount:b.L.Rc,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:C,matchedStreams:[]};F&&b.eb&&!a.$a[F]&&(a.$a[F]=G);return G}q.nc=function(){var a=this,b,c;return L(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,aq(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=E(d),a.B&&(c.severity=1,a.B.onError(c));case 3:if(!a.B)return d["return"]();bq(a,b);z(d)}})};function bq(a,b){0>a.u||a.s.W(Math.max(3,a.u-b,Sa(a.G)))}
643
- function hq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Rc:null,audioSamplingRate:null,Eb:0};c=c||b.Ba;var d=jo(a,"BaseURL"),e=d.map(po),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ro(a,"frameRate",zo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=jo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
644
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=jo(a,"AudioChannelConfiguration");m=pq(m)||b.Rc;p=ro(a,"audioSamplingRate",xo)||b.audioSamplingRate;f||(f=mq(g,h));var t=io(a,"SegmentBase"),v=io(a,"SegmentTemplate"),w=t?ro(t,"availabilityTimeOffset",yo)||0:0,y=v?ro(v,"availabilityTimeOffset",yo)||0:0;d=d&&d.length?ro(d[0],"availabilityTimeOffset",yo)||0:0;d=b.Eb+d+w+y;return{Ba:sc(c,e),sc:t||b.sc,ib:io(a,"SegmentList")||b.ib,tc:v||b.tc,width:ro(a,"width",xo)||b.width,height:ro(a,
645
- "height",xo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Rc:m,audioSamplingRate:p,Eb:d}}
646
- function pq(a){a=r(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=
647
- 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 nq(a){var b=a.sc?1:0;b+=a.ib?1:0;b+=a.tc?1:0;if(0==b)return a.contentType==xc||"application"==a.contentType?!0:!1;1!=b&&(a.sc&&(a.ib=null),a.tc=null);return!0}
648
- function qq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=sc(b,[c]),f=$e(e,a.m.retryParameters),f.method=d,g=a.B.networkingEngine.request(4,f),Ve(a.i,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=Cc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
649
- function fq(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.m.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.A(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.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);
650
- 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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,qq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,qq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
651
- case 9:wa(n,3);break;case 5:E(n);case 3:g=f.next();n.A(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
652
- function iq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=ro(d,"timescale",xo)||1;d=r(jo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=ro(k,"presentationTime",xo)||0,m=ro(k,"duration",xo)||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.B.onTimelineRegionAdded(k))}}
653
- function oq(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=ff,f=ej(b,c,d,a.m.retryParameters),g=a.B.networkingEngine,h=g.request(e,f),Ve(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function mq(a,b){return $c(Vc(a,b))?xc:a.split("/")[0]}M("shaka.dash.DashParser",$p);jg.mpd=function(){return new $p};hg["application/dash+xml"]=function(){return new $p};hg["video/vnd.mpeg.dash.mpd"]=function(){return new $p};function rq(a,b,c,d){this.g=a;this.type=b;this.X=c;this.segments=d||null}function sq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}sq.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};
654
- sq.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 tq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function uq(a,b,c){c=void 0===c?[]:c;this.X=b;this.g=a;this.h=c}function vq(a,b){this.name=a;this.value=b};function wq(a,b){return a.filter(function(c){return c.name==b})}function xq(a,b){return a.filter(function(c){return tq(c,"TYPE")==b})}function yq(a,b){var c=wq(a,b);return c.length?c[0]:null}function zq(a,b,c){c=void 0===c?0:c;return(a=yq(a,b))?Number(a.value):c};function Aq(a){this.h=a;this.g=0}function Bq(a){Cq(a,/[ \t]+/gm)}function Cq(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 Dq(a){return a.g==a.h.length?null:(a=Cq(a,/[^ \t\n]*/gm))?a[0]:null};function Eq(){this.g=0}
655
- function Fq(a,b,c){b=Cc(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=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Gq(a.g++,g),--a.g,Hq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(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=Gq(a.g++,
656
- l);if(Iq.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=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=Gq(a.g++,m),Hq.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=sc([d],[m.trim()])[0],l&&g.push(l),e.push(new uq(m,g,h)),g=[],h=[]);h.length&&(l&&
657
- g.push(l),e.push(new uq("",g,h)));return new rq(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new vq("URI",k)),e=!0)}}return new rq(c,b,f)}function Gq(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 Aq(e);var g;(g=Cq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Cq(e,h);)c.push(new vq(g[1],g[2]||g[3])),Bq(e)}return new sq(a,d,c,f)}
658
- var Hq="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(" "),Iq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Jq(){}function Kq(a){try{var b=Lq(a);return Me({uri:a,ye:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ke(c)}}function Lq(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=Mc(a):e=Gc(a);return{data:e,contentType:c}}
659
- M("shaka.net.DataUriPlugin",Jq);Jq.parse=Kq;Xe("data",Kq);function Mq(){var a=this;this.m=this.B=null;this.Qa=1;this.l=new Map;this.s=new Map;this.Ja=new Set;this.g=new Map;this.h=null;this.M="";this.da=new Eq;this.oa=0;this.u=new O(function(){a.nc()});this.j=Nq;this.D=null;this.na=0;this.G=Infinity;this.$=this.Sa=0;this.F=new Ue;this.S=[];this.J=new Map;this.Ra=!1;this.o=new Map;this.P=null;this.ma=new Map;this.I=new Map;this.i=!1}q=Mq.prototype;q.configure=function(a){this.m=a};
660
- q.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.B=b,c.i=b.isLowLatencyMode(),u(f,Oq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Pq(c,d.data),3);e=c.oa;0<e&&c.u.W(e);return f["return"](c.D)})};q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.m=this.B=null;this.Ja.clear();this.D=null;this.g.clear();this.s.clear();this.o.clear();this.l.clear();return Promise.all(a)};
661
- q.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.j==Nq)return e["return"]();b=[];a.P=null;c=Array.from(a.g.values());return c.length?u(e,Qq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(Qq(a,c[d]));return u(e,Promise.all(b),0)})};
662
- function Qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return L(function(w){if(1==w.g)return c=Rq,d=b.Pe,e=new ec(d),a.i&&b.Ue&&hc(e,new jc("_HLS_skip=YES")),u(w,Oq(a,e.toString()),2);if(3!=w.g){f=w.h;g=Fq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=wq(g.X,"EXT-X-DEFINE");k=Sq(a,h);l=b.stream;return u(w,Tq(a,b.Zc,g,l.type,l.mimeType,b.Jd,k,b.af,l.codecs,l.bandwidth),3)}m=w.h;l.segmentIndex.Lb(m,a.h.Xa());m.length&&(n=zq(g.X,"EXT-X-MEDIA-SEQUENCE",0),p=b.Jd.get(n),l.segmentIndex.kb(p));t=m[m.length-
663
- 1];if(v=yq(g.X,"EXT-X-ENDLIST"))Uq(a,c.Oe),a.h.Na(t.endTime);z(w)})}q.onExpirationUpdated=function(){};
664
- function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y,aa,za,Ia,Da,la,$a,Va;return L(function(Fa){switch(Fa.g){case 1:c=Fq(a.da,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=wq(c.X,"EXT-X-DEFINE");Vq(a,d);e=wq(c.X,"EXT-X-MEDIA");f=wq(c.X,"EXT-X-STREAM-INF");g=wq(c.X,"EXT-X-IMAGE-STREAM-INF");Wq(a,f);h=wq(c.X,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),t=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),w=(new Map).set("id",n),p&&w.set("uri",
665
- sc([a.M],[p])[0]),t&&w.set("language",t),v&&w.set("value",v),y=new Q("sessiondata",w),a.B)a.B.onEvent(y);return u(Fa,Xq(a,e),2);case 2:return Yq(a,e),u(Fa,Zq(a,f),3);case 3:return x=Fa.h,u(Fa,$q(a,e),4);case 4:return D=Fa.h,u(Fa,ar(a,g),5);case 5:C=Fa.h;if(!a.B)throw new N(2,7,7001);if(a.Ra&&0==x.length)throw new N(2,4,4034);F=A=Infinity;G=r(a.g.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.ve),"text"!=J.stream.type&&(F=Math.min(F,J.Lf-J.ve));a.j!=Nq?(a.h=new S(0,a.m.defaultPresentationDelay?
666
- a.m.defaultPresentationDelay:a.$?a.$:3*a.na),a.h.uc(!1)):(a.h=new S(null,0),a.h.uc(!0));br(a);if(a.j!=Nq)a.oa=a.G,I=Rq,a.j==I.Ne&&(K=a.h.Wc,isNaN(a.m.availabilityWindowOverride)||(K=a.m.availabilityWindowOverride),a.h.$d(K));else for(a.h.Na(F),a.h.offset(-A),P=r(a.g.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-A),R.stream.segmentIndex.fb(0,F);a.S=[];da=[];Y=r(x);for(aa=Y.next();!aa.done;aa=Y.next())for(za=aa.value,Ia=r([za.video,za.audio]),Da=Ia.next();!Da.done;Da=
667
- Ia.next())(la=Da.value)&&da.push(la);return u(Fa,Promise.all(da.map(function(Hc){return L(function(ie){return u(ie,Hc.createSegmentIndex(),0)})})),6);case 6:$a=r(da);for(Da=$a.next();!Da.done;Da=$a.next())Va=Da.value,a.S.push(Va.segmentIndex.N);br(a);a.D={presentationTimeline:a.h,variants:x,textStreams:D,imageStreams:C,offlineSessionIds:[],minBufferTime:0};a.B.makeTextStreamsForClosedCaptions(a.D);z(Fa)}})}
668
- function Vq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.l.has(d)||a.l.set(d,e))}}function Sq(a,b){for(var c=new Map,d=r(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.l.get(f))&&c.set(f,e)}return c}
669
- function Wq(a,b){for(var c=r(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=cr(a,e);if(g){var h=vc(xc,e);a.o.set(g,h);ob(e,h)}f&&(g=uc("audio",e),a.o.set(f,g));d&&(f=uc("video",e),a.o.set(d,f))}}
670
- function $q(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return L(function(v){if(1==v.g)return c=xq(b,"SUBTITLES"),d=c.map(function(w){var y,x,D;return L(function(C){if(1==C.g){if(y=a.m.disableText)return C["return"](null);B(C,2);return u(C,dr(a,w),4)}if(2!=C.g)return x=C.h,C["return"](x.stream);D=E(C);if(a.m.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=tq(h,"GROUP-ID"),l=a.o.get(k))if(m=a.s.get(k))for(n=
671
- r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(w){return w}))})}
672
- function ar(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.m.disableThumbnails)return l["return"](null);B(l,2);return u(l,er(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.m.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
673
- function Xq(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,dr(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return dr(a,e)});return u(d,Promise.all(c),0)})}
674
- function Zq(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,t,v;return L(function(w){if(1==w.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(tq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Z(g,"VIDEO-RANGE"),u(w,fr(a,g,k),2);if(v=w.h){for(var y=w["return"],x=v.audio,D=v.video,C=r(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
675
- void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;C=a.m.disableAudio;if(!x.length||C)x=[null];C=a.m.disableVideo;if(!D.length||C)D=[null];C=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.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.Zc:"")+" - "+(A?A.Zc:"");G&&J&&I.length&&K.length&&!(0<dg(I,K).length)||a.Ja.has(H)||(G={id:a.Qa++,language:G?G.language:"und",primary:!!G&&G.primary||
676
- !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.Ja.add(H))}}w=y.call(w,C)}else w=w["return"]([]);return w})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Xb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
677
- function fr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y;return L(function(x){if(1==x.g)return d=yc,e=cr(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.s.has(h)?a.s.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=tq(b,"URI"),t=l.audio.find(function(D){return D&&D.Zc==p}),v=vc(d.Ta,e),(w=vc(d.jb,e))&&!v?m=d.jb:!k.length&&w&&v?(m=d.Ta,e=[[v,w].join()]):l.audio.length&&t?(m=d.jb,n=!0):m=l.video.length?d.jb:d.Ta,n?x.A(2):u(x,gr(a,b,e,m,c),3);2!=x.g&&(y=x.h);if(y)l[y.stream.type]=[y];else if(null===y)return x["return"](null);
678
- hr(l);return x["return"](l)})}function cr(a,b){var c=[];a.m.disableVideo||c.push(a.m.hls.defaultVideoCodec);a.m.disableAudio||c.push(a.m.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Xc(f);c.has(g)||(e.push(f),c.add(g))}return e}function ir(a){a=Z(a,"LANGUAGE")||"und";return jd(a)}
679
- function hr(a){a=r(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 Yq(a,b){var c=xq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=ir(e);var f=tq(e,"GROUP-ID");e=tq(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
680
- function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;return L(function(y){if(1==y.g){c=tq(b,"GROUP-ID");d="";var x=tq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=xc);e=x;e!=xc&&c&&a.o.has(c)&&(d=a.o.get(c));f=jr(tq(b,"URI"),a.l);if(a.g.has(f))return y["return"](a.g.get(f));g=ir(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Z(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Z(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Z(b,"CHARACTERISTICS");t=Z(b,"FORCED");
681
- v="YES"==t;return u(y,kr(a,f,d,e,g,l,h,m,null,p,v,n),2)}w=y.h;a.s.has(c)?a.s.get(c).push(w):a.s.set(c,[w]);if(null==w)return y["return"](null);if(a.g.has(f))return y["return"](a.g.get(f));a.g.set(f,w);return y["return"](w)})}
682
- function er(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=jr(tq(b,"URI"),a.l);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=ir(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,kr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.g.has(c))return p["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
683
- Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}
684
- function gr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=jr(tq(b,"URI"),a.l);if(a.g.has(f))return l["return"](a.g.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.J.get(m):null;h=uc(d,c);return u(l,kr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.g.has(f))return l["return"](a.g.get(f));a.g.set(f,k);return l["return"](k)})}
685
- function kr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y,aa,za,Ia,Da,la,$a,Va,Fa,Hc,ie,Cn,Dn,En,Fn,hi,ii,Cf,Gn,Hn,In,Jn;return L(function(fb){switch(fb.g){case 1:return t=sc([a.M],[b])[0],u(fb,Oq(a,t),2);case 2:v=fb.h;t=v.uri;w=Fq(a.da,v.data,t);if(1!=w.type)throw new N(2,4,4017);y=[];if(w.segments)for(x=r(w.segments),D=x.next();!D.done;D=x.next())C=D.value,A=wq(C.X,"EXT-X-KEY"),y.push.apply(y,ja(A));F=!1;G=[];H=new Set;J=r(y);for(I=J.next();!I.done;I=J.next())if(K=I.value,
686
- P=tq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ra=!0,fb["return"](null);R=tq(K,"KEYFORMAT");if(Y=(da=lr[R])?da(K):null){if(Y.keyIds)for(aa=r(Y.keyIds),za=aa.next();!za.done;za=aa.next())Ia=za.value,H.add(Ia);G.push(Y)}}if(F&&!G.length)throw new N(2,4,4026);Da=wq(w.X,"EXT-X-DEFINE");la=Sq(a,Da);mr(a,w);return u(fb,nr(a,d,c,w,la),3);case 3:return $a=fb.h,or.includes($a)&&(c=""),Va=new Map,Fa=new Map,B(fb,4),u(fb,Tq(a,b,w,d,$a,Va,la,Fa,c,p),6);case 6:Hc=fb.h;wa(fb,5);break;case 4:ie=E(fb);
687
- if(4035==ie.code)return Xa("Skipping unsupported HLS stream",$a,b),fb["return"](null);throw ie;case 5:Cn=Hc[0].startTime;Dn=Hc[Hc.length-1].endTime;En=new T(Hc);Fn=d==xc?"subtitle":void 0;hi=[];if(l)for(ii=r(l.split(",")),Cf=ii.next();!Cf.done;Cf=ii.next())Gn=Cf.value,hi.push(Gn);In=(Hn=yq(w.X,"EXT-X-SERVER-CONTROL"))?null!=Hn.getAttribute("CAN-SKIP-UNTIL"):!1;Jn={id:a.Qa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:En,mimeType:$a,codecs:c,kind:Fn,encrypted:F,
688
- drmInfos:G,keyIds:H,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:hi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return fb["return"]({stream:Jn,Zc:b,Pe:t,ve:Cn,Lf:Dn,Jd:Va,af:Fa,Ue:In})}})}
689
- function mr(a,b){var c=yq(b.X,"EXT-X-PLAYLIST-TYPE"),d=yq(b.X,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Uq(a,Nq);else{c?Uq(a,pr):Uq(a,qr);d=yq(b.X,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=yq(b.X,"EXT-X-PART-INF");a.i&&c?(a.Sa=Number(tq(c,"PART-TARGET")),a.G=Math.min(a.Sa,a.G),c=yq(b.X,"EXT-X-SERVER-CONTROL"),a.$=c?Number(tq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.na=Math.max(d,a.na)}}
690
- function rr(a,b,c,d){c=yq(c,"EXT-X-MAP");if(!c)return null;var e=tq(c,"URI");d=jr(sc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ma.has(b)||(c=sr(d,c),a.ma.set(b,c));return a.ma.get(b)}function sr(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 pi(function(){return[a]},c,d)}
691
- function tr(a,b,c,d,e,f,g,h,k){var l=d.X,m=jr(d.g,g),n=yq(l,"EXTINF"),p=g=0,t=null,v=[];if(a.i&&d.h.length){a={};d=r(mb(d.h));for(var w=d.next();!w.done;a={hd:a.hd},w=d.next()){w=w.value;var y=w.ga;w=w.item;var x=0==y?c:v[v.length-1];y=0==y?e:x.endTime;var D=Number(Z(w,"DURATION"));D=y+D;var C=0,A=null;"EXT-X-PRELOAD-HINT"==w.name?C=(x=Z(w,"BYTERANGE-START"))?Number(x):0:(C=Z(w,"BYTERANGE"),x=r(ur(x,C)),C=x.next().value,A=x.next().value);w=Z(w,"URI");a.hd=sc([h],[w])[0];v.push(new ri(y,D,function(F){return function(){return[F.hd]}}(a),
692
- C,A,b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(h=yq(l,"EXT-X-BYTERANGE"))?(t=r(ur(c,h.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].sa,t=v[v.length-1].ja);c="";h=null;"image"==k&&(c="1x1",k=yq(l,"EXT-X-TILES"))&&(c=tq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(h=Number(k)));return new ri(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,h)}
693
- function ur(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+d-1);return[c,d]}function br(a){if(a.h){for(var b=r(a.S),c=b.next();!c.done;c=b.next())a.h.Mb(c.value);a.S=[]}}
694
- function Tq(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y,aa,za,Ia,Da;return L(function(la){switch(la.g){case 1:m=c.segments;p=zq(c.X,"EXT-X-MEDIA-SEQUENCE",0);v=(t=yq(c.X,"EXT-X-SKIP"))?Number(Z(t,"SKIPPED-SEGMENTS")):0;w=p+v;if(a.j!=Nq&&f.has(w)){y=f.get(w);la.A(2);break}if(null!=a.P){la.A(3);break}n=rr(a,c.g,m[0].X,g);x=a;return u(la,vr(a,b,n,e,w,!1,m[0],g,d,k,l),4);case 4:x.P=la.h;case 3:y=a.P;case 2:D=m[0].g;bb(D.split("/").pop());C=zq(c.X,"EXT-X-DISCONTINUITY-SEQUENCE");
695
- if(a.i&&(h.has(C)||h.set(C,w),v))for(;h.has(C+1)&&h.get(C+1)<w;)C++;A=a.I.get(C)||0;F=[];G=function($a){return mb($a)};H=r(G(m));J=H.next();case 5:if(J.done){la.A(7);break}K=I=J.value;P=K.ga;R=K.item;da=F[F.length-1];Y=0==P?y:da.endTime;w=p+v+P;f.set(w,Y);n=rr(a,c.g,R.X,g);aa=yq(R.X,"EXT-X-DISCONTINUITY");if(!aa){la.A(8);break}C++;h.set(C,w);return u(la,wr(a,C,b,n,e,w,R,g,Y,d,k,l),9);case 9:A=la.h;case 8:!a.i&&(za=a.B.isAutoLowLatencyMode())&&(a.B.enableLowLatencyMode(),a.i=a.B.isLowLatencyMode());
696
- Ia=yq(R.X,"EXTINF");a.i||Ia?(Da=tr(a,n,da,R,Y,A,g,c.g,d),F.push(Da)):a.i||Xa("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.");J=H.next();la.A(5);break;case 7:return la["return"](F)}})}
697
- function wr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return L(function(v){if(1==v.g)return p=0,a.I.has(b)?(p=a.I.get(b),v.A(2)):u(v,vr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.I.set(b,p));return v["return"](p)})}
698
- function xr(a,b,c,d,e,f){var g,h,k,l,m,n;return L(function(p){switch(p.g){case 1:g=ff;h=ej(b.ua(),b.sa,b.ja,a.m.retryParameters);a.B.modifySegmentRequest(h,{type:c,init:b instanceof pi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.m.hls.useFullSegmentsForStartTime)return p["return"](yr(a,h,g));k=ej(b.ua(),b.sa,b.sa+2048-1,a.m.retryParameters);a.B.modifySegmentRequest(k,{type:c,init:b instanceof pi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});B(p,2);return u(p,
699
- yr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=E(p);if(7001==m.code)throw m;Xa("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.",k.uris[0]);return u(p,yr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
700
- function vr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,w,y,x,D;return L(function(C){switch(C.g){case 1:n=tr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.g.get(b),t=p.Jd.get(e),void 0!=t))return C["return"](t);d=d.toLowerCase();if(or.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){C.A(2);break}v=[xr(a,n,k,d,l,m)];c&&v.push(xr(a,c,k,d,l,m));return u(C,
701
- Promise.all(v),3);case 3:return w=C.h,y=w[0],x=w[1]||w[0],C["return"](zr(b,y.uri,y.data,x.data));case 2:if("video/mp2t"!=d){C.A(4);break}return u(C,xr(a,n,k,d,l,m),5);case 5:return D=C.h,C["return"](Ar(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
702
- function zr(a,b,c,d){var e=0;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).V("mdhd",function(h){e=Jh(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 og).box("moof",sg).box("traf",sg).V("tfdt",function(h){f=Ih(h.reader,h.version).rd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
703
- function Ar(a,b,c){function d(){f.seek(g+188);h=f.ca();71!=h&&(f.seek(g+192),h=f.ca());71!=h&&(f.seek(g+204),h=f.ca());71!=h&&e();f.Be(1)}function e(){throw new N(2,4,4030,a,b);}var f=new lg(c,0),g=0,h=0;for(c=Math.min(f.T.byteLength-188,940);;){g=f.ba();h=f.ca();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Pb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ca()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ca(),f.skip(k)),1!=f.O()>>8)d();else{f.skip(3);c=f.ca()>>6;0!=c&&1!=c||e();0==f.ca()&&e();c=f.ca();k=
704
- f.Pb();var l=f.Pb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function jr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(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}
705
- function nr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w;return L(function(y){if(1==y.g){f=yc;g=ff;h=jr(d.segments[0].g,e);k=new ec(h);l=k.Aa.split(".").pop();m=Br[b];if(n=m[l])return y["return"](n);if(b==f.ea)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.Xb&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=$e([h],a.m.retryParameters);p.method="HEAD";return u(y,yr(a,p,g),2)}t=y.h;v=t.headers["content-type"];return v?y["return"](v.split(";")[0]):(w=m.mp4,y["return"](w))})}
706
- function Oq(a,b){var c=$e([b],a.m.retryParameters);a.B.modifyManifestRequest(c,{format:"h"});return yr(a,c,0)}q.nc=function(){var a=this,b,c;return L(function(d){if(1==d.g){if(!a.B)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.oa,a.u.W(b),wa(d,0);c=E(d);if(!a.B)return d["return"]();c.severity=1;a.B.onError(c);a.u.W(.1);z(d)})};function Uq(a,b){a.j=b;a.h&&a.h.uc(a.j==Nq);a.j!=Nq||a.u.stop()}
707
- function yr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.B.networkingEngine.request(c,b);Ve(a.F,b);return b.promise}M("shaka.hls.HlsParser",Mq);
708
- var or=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Br={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",
709
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},lr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=tq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=tq(a,"URI");b=Lq(b);b=Ob(b.data);b=tc("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=
710
- tq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=tq(a,"URI");a=Lq(a);a=Ob(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=go(a,b);return tc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Nq="VOD",qr="EVENT",pr="LIVE",Rq={Oe:Nq,xg:qr,Ne:pr};jg.m3u8=function(){return new Mq};hg["application/x-mpegurl"]=function(){return new Mq};hg["application/vnd.apple.mpegurl"]=function(){return new Mq};function Cr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ye:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Fc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Dr(){}function Er(a,b,c,d,e){var f=new Fr;rf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Gr,h={fe:!1,Ke:!1};a=Hr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Je(a,function(){h.fe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ke=!0;g.abort()});k.W(b/1E3);a["finally"](function(){k.stop()})}return a}
711
- function Hr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,D,C;return L(function(A){switch(A.g){case 1:return h=Ir,k=Jr,p=n=0,t=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Kr(l.headers)),v=l.clone().body.getReader(),y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0,x=function(F){function G(){var H,J;return L(function(I){switch(I.g){case 1:return B(I,2),u(I,v.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.A(5);break}n+=H.value.byteLength;if(!g){I.A(5);
712
- break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,y-n),p=n,t=J;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new k({start:x}),u(A,l.arrayBuffer(),5);case 5:m=A.h;wa(A,3);break;case 2:D=E(A);if(d.fe)throw new N(1,1,7001,a,b);if(d.Ke)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return C=Kr(l.headers),A["return"](Cr(C,m,l.status,a,l.url,b))}})}function Kr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
713
- function Lr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Dr);Dr.isSupported=Lr;Dr.parse=Er;var Ir=window.fetch,Gr=window.AbortController,Jr=window.ReadableStream,Fr=window.Headers;Lr()&&(Xe("http",Er,2,!0),Xe("https",Er,2,!0),Xe("blob",Er,2,!0));function Mr(){}
714
- function Nr(a,b,c,d,e){var f=new Or,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=Pr(f);e(t);n=!0}};f.onload=function(){var t=Pr(f),v=f.response;try{var w=Cr(t,v,f.status,a,f.responseURL,c);l(w)}catch(y){m(y)}};f.onerror=function(t){m(new N(1,1,1002,a,t,
715
- c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Je(k,function(){f.abort();return Promise.resolve()})}
716
- function Pr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Mr);Mr.parse=Nr;var Or=window.XMLHttpRequest;Xe("http",Nr,1,!0);Xe("https",Nr,1,!0);Xe("blob",Nr,1,!0);function Qr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Rr(a){return a.ua().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.sa+":"+a.ja}function Sr(a,b){return ej(a.g.ua(),a.g.sa,a.g.ja,b.streaming.retryParameters)};function Tr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ur(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Tr.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 Vr(a){var b=this;this.R=a;this.g=new Map;this.K=new gf(function(){return Wr(b)["catch"](function(){})});this.h=[];this.xe=function(){};this.ue=function(){};this.Cb=new Tr}Vr.prototype.destroy=function(){return this.K.destroy()};function Xr(a,b,c){a.xe=b;a.ue=c}function Wr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
717
- function Yr(a,b,c,d,e,f){hf(a.K);var g=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return L(function(v){if(1==v.g)return u(v,Zr(a,c),2);h=v.h;if(a.K.g)throw new N(2,9,7001);if(e)for(m in k=Ob(h),l=new fo(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.ue(p,t);a.Cb.close(d,h.byteLength);var w=a.Cb;a.xe(0==w.i?0:w.j/w.i,a.Cb.h);return v["return"](f(h))})});a.g.set(b,g)}
718
- function $r(a,b,c){hf(a.K);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 as(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.Cb.h)})}function Zr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=ff,d=a.R.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;ob(a.h,e);return g["return"](f.data)})};function bs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new zc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}bs.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return wa(b,0);E(b);z(b)})};
719
- function cs(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)})}})}bs.prototype.store=function(){return this.h};bs.prototype.promise=function(){return this.g};function ds(a){this.h=a;this.g=[]}ds.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function es(a,b){return fs(a,b,"readwrite")}function fs(a,b,c){c=a.h.transaction([b],c);var d=new bs(c,b);a.g.push(d);d.promise().then(function(){ob(a.g,d)},function(){ob(a.g,d)});return d};function gs(a,b,c){this.h=new ds(a);this.i=b;this.g=c}q=gs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return hs(this.i)};q.removeSegments=function(a,b){return is(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,js(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.ge(e)}))})};q.addManifests=function(){return hs(this.g)};
720
- q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function ks(a,b,c){a=es(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=es(this.h,this.g),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 is(this,this.g,a,b)};
721
- q.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,js(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.dc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=fs(a.h,a.g,"readonly"),c=new Map,u(d,cs(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.dc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.ge=function(a){return a};q.dc=function(a){return Promise.resolve(a)};
722
- function hs(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=es(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Bc:g.Bc},k=h.next())l=k.value,g.Bc=e.add(l),g.Bc.onsuccess=function(n){return function(){f.push(n.Bc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
723
- function is(a,b,c,d){a=es(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Ac:e.Ac},f=c.next())e.Ac=f.value,b["delete"](e.Ac).onsuccess=function(g){return function(){return d(g.Ac)}}(e);return a.promise()}
724
- function js(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=fs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Wb:h.Wb,Ub:h.Ub},l=k.next())h.Ub=l.value,h.Wb=e.get(h.Ub),h.Wb.onsuccess=function(n){return function(){void 0==n.Wb.result&&g.push(n.Ub);f[n.Ub]=n.Wb.result}}(h);return u(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 ls(a){this.g=new ds(a)}ls.prototype.destroy=function(){return this.g.destroy()};ls.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=fs(a.g,"session-ids","readonly"),c=[],u(d,cs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};ls.prototype.add=function(a){var b=es(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
725
- ls.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=es(b.g,"session-ids"),u(d,cs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ms(){this.g=new Map}ms.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ms.prototype.init=function(){var a=this;ns.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
726
- function os(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ea:d,aa:f},aa:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ps(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ea:d,aa:f},e)})})}
727
- function qs(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 rs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ss(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()}
728
- function ts(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=ns,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 us(a,b){ns.set(a,b)}M("shaka.offline.StorageMuxer",ms);ms.unregister=function(a){ns["delete"](a)};ms.register=us;ms.prototype.destroy=ms.prototype.destroy;var ns=new Map;function vs(){gs.apply(this,arguments)}ra(vs,gs);vs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=es(c.h,c.g);e=d.store();f=new zc;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 u(g,Promise.all([d.promise(),f]),0)})};
729
- vs.prototype.dc=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=ws(a.periods[c],e),b.push(f);return u(h,Fp(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})})};
730
- function ws(a,b){xs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ys(e,a.startTime,b)})}
731
- function ys(a,b,c){var d=a.initSegmentUri?zs(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=zs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
732
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}vs.prototype.ge=function(a){return{data:a.data}};function zs(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);}
733
- function xs(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
734
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function As(){gs.apply(this,arguments)}ra(As,gs);
735
- As.prototype.dc=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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Bs(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Fp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
563
+ function Io(a,b){var c=Jo(a,b,"timescale"),d=1;c&&(d=ro(c)||1);var e=Jo(a,b,"duration");c=ro(e||"");"image"==a.H.contentType&&(c=to(e||""));c&&(c/=d);var f=Jo(a,b,"startNumber");e=Number(Jo(a,b,"presentationTimeOffset"))||0;var g=so(f||"");if(null==f||null==g)g=1;var h=Ko(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.U.duration||Infinity;h=eo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=mo(p,"t",so),y=mo(p,"d",so);p=mo(p,"r",qo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
564
+ p||0;if(0>p)if(q){q=mo(q,"t",so);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,$f:v}),v=m}f=l}return{timescale:d,ia:c,Kb:g,Ta:e/d||0,Xd:e,timeline:f}}function Jo(a,b,c){return[b(a.H),b(a.ka),b(a.aa)].filter(Rb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
565
+ function Ko(a,b,c){return[b(a.H),b(a.ka),b(a.aa)].filter(Rb).map(function(d){return co(d,c)}).reduce(function(d,e){return d||e})}
566
+ function Lo(a,b,c,d,e,f){for(var g=io(a,"http://www.w3.org/1999/xlink","href"),h=io(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 Fe(new N(2,4,4028));if("onLoad"!=h)return Fe(new N(2,4,4027));var m=kc([d],[g]);return e.request(0,Ve(m,b)).$(function(n){n=wo(n.data,a.tagName);if(!n)return Fe(new N(2,4,4001,g));
567
+ 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 Mo(a,b,c,m[0],e,f+1)})}
568
+ function Mo(a,b,c,d,e,f){f=void 0===f?0:f;if(io(a,"http://www.w3.org/1999/xlink","href")){var g=Lo(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return Mo(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"==io(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Mo(k,b,c,d,e,f)));return Je(g).$(function(){return a})};function No(a,b,c,d,e,f,g){var h,k=(new lg).R("sidx",function(l){h=Oo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
569
+ function Oo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Ib();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new ki(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 Po(a){this.h=Ib(a);this.g=new ig(this.h,0)}Po.prototype.ma=function(){return this.g.ma()};
570
+ function Qo(a){var b=Ro(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=Ro(a);a:{d=t(So);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.X();else{if(8==b.length&&b[1]&224)throw new N(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.X()+b<=a.h.byteLength?b:a.h.byteLength-a.g.X();d=Ib(a.h,a.g.X(),b);a.g.skip(b);return new To(c,d)}
571
+ function Ro(a){var b=a.g.X(),c=a.g.Y();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var So=[[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 To(a,b){this.id=a;this.g=b}
572
+ function Uo(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=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Vo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Po(a.g);for(var n=null,p=null;a.ma();){var q=Qo(a);if(187==q.id){var v=Wo(q);v&&(q=c*v.ag,v=b+v.Kf,null!=n&&m.push(new ki(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new ki(n+g,d+g,l,p,null,f,g,h,k));return m}
573
+ function Wo(a){var b=new Po(a.g);a=Qo(b);if(179!=a.id)throw new N(2,3,3013);a=Uo(a);b=Qo(b);if(183!=b.id)throw new N(2,3,3012);b=new Po(b.g);for(var c=0;b.ma();){var d=Qo(b);if(241==d.id){c=Uo(d);break}}return{ag:a,Kf:c}};function Xo(a,b){var c=Ko(a,b,"Initialization");if(!c)return null;var d=a.H.xa,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.xa,[e]));e=0;var f=null;if(c=mo(c,"range",po))e=c.start,f=c.end;return new ii(function(){return d},e,f,Yo(a))}
574
+ function Zo(a,b){var c=Number(Jo(a,$o,"presentationTimeOffset"))||0,d=Jo(a,$o,"timescale"),e=1;d&&(e=ro(d)||1);var f=c/e||0,g=Xo(a,$o);ap(a,g);var h=Oe(a);return{Ab:function(){var k=Ko(h,$o,"RepresentationIndex"),l=h.H.xa;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.xa,[k]));k=bp(h);return cp(h,b,g,l,k.start,k.end,f)}}}
575
+ function cp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B,A,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.me,l=a.U.start,m=a.U.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ga):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=No(w,e,d,c,B,A,F);else{H=new Po(x);if(440786851!=Qo(H).id)throw new N(2,3,3008);var J=Qo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
576
+ J=new Po(J.g);for(var I=null;J.ma();){var K=Qo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new Po(I.g);K=1E6;for(J=null;I.ma();){var P=Qo(I);if(2807729==P.id)K=Uo(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.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=Qo(new Po(w));if(475249515!=K.id)throw new N(2,3,3007);H=Vo(K,H,I,J,d,c,B,A,F)}D=H;h.Fb(D);q=new T(D);k&&q.Xa(A,F,!0);return G["return"](q)})}
577
+ function $o(a){return a.lc}function bp(a){var b=Ko(a,$o,"RepresentationIndex");a=Jo(a,$o,"indexRange");a=po(a||"");b&&(a=mo(b,"range",po,a));return a}function ap(a,b){dp(a,b);if(!bp(a))throw new N(2,4,4002);}function dp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
578
+ function Yo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Lc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ep(a,b){var c=Xo(a,fp),d=gp(a);if(!d.ia&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ia&&!a.U.duration&&!d.timeline&&1==d.Cb.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.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=hp(a.U.start,a.U.duration,a.H.xa,d,c);c=!e;e?e.Eb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Fb(g);a.Wa&&a.U.me||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
579
+ Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.K.length||e.Db(g);return Promise.resolve(e)}}}function fp(a){return a.$a}function gp(a){var b=ip(a);a=Io(a,fp);var c=a.Kb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Kb:c,Ta:a.Ta,timeline:a.timeline,Cb:b}}
580
+ function hp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ad:m.ad},n++){var p=d.Cb[n];m.ad=kc(c,[p.Bf]);var q=void 0;q=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new ki(a+l,a+q,function(v){return function(){return v.ad}}(m),p.start,p.end,e,g,a,h));l=q}return k}
581
+ function ip(a){return[a.H.$a,a.ka.$a,a.aa.$a].filter(Rb).map(function(b){return eo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ke&&(a.ke=!0);var c=b.getAttribute("media");b=mo(b,"mediaRange",po,{start:0,end:null});return{Bf:c,start:b.start,end:b.end}})};function jp(a,b,c,d,e,f){var g=kp(a),h=lp(a);mp(h);var k=Oe(a);if(h.fc)return dp(a,g),{Ab:function(){var q=Ho(h.fc,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.xa,[q]);return cp(k,b,g,q,0,null,h.Ta)}};if(h.ia)return d||(a.presentationTimeline.Bd(h.ia),a.presentationTimeline.Cd(a.U.start)),{Ab:function(){return np(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=op(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:Infinity,p=Infinity!=
582
+ n;l?(p&&(new T(m)).Xa(c,n,!0),l.Eb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Fb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.K.length||l.Db(m);return Promise.resolve(l)}}}function pp(a){return a.mc}function lp(a){var b=Io(a,pp),c=Jo(a,pp,"media");a=Jo(a,pp,"index");return{ia:b.ia,timescale:b.timescale,Kb:b.Kb,Ta:b.Ta,Xd:b.Xd,timeline:b.timeline,yd:c,fc:a}}
583
+ function mp(a){var b=a.fc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.fc&&(a.timeline=null),a.ia=null);if(!a.fc&&!a.yd)throw new N(2,4,4002);}
584
+ function np(a,b,c,d,e){function f(I){var K=(I-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new ki(R,ba,function(){var aa=Ho(y,x,I,w,P*v);return kc(D,[aa])},0,null,d,B,l,h());R.l=K;return R}function g(){var I=[Math.max(k.Qa(),l),Math.min(k.gb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,n=a.U.duration,p=b.ia,q=b.Kb,v=b.timescale,
585
+ y=b.yd,w=a.bandwidth||null,x=a.H.id,D=a.H.xa,B=l-b.Ta,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.gb()<h();F=k.T();if(c||F){var J=Math.max(a,A+1);H.Sc(p,function(){var I=k.Qa();H.cb(I);var K=t(g());K.next();K=K.next().value;for(var P=[];J<=K;){var R=f(J);P.push(R);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
586
+ function op(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={$c:h.$c,dd:h.dd,gd:h.gd,Xc:h.Xc,jd:h.jd,Yc:h.Yc},k++){var l=b.timeline[k],m=l.start,n=l.$f;l=l.end;h.gd=k+b.Kb;h.jd=n+b.Xd;h.dd=a.H.id;h.Xc=a.bandwidth||null;h.$c=b.yd;h.Yc=a.H.xa;g.push(new ki(d+m,d+l,function(p){return function(){var q=Ho(p.$c,p.dd,p.gd,p.Xc||null,p.jd);return kc(p.Yc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
587
+ function kp(a){var b=Jo(a,pp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.xa;return new ii(function(){var f=Ho(b,c,null,d,null);return kc(e,[f])},0,null,Yo(a))};function qp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}qp.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=[]};
588
+ function rp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;sp(b);tp(b);up(b);vp(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Uc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(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 Fa["return"]();k=b.map(function(ya){return ya.vc});l=b.map(function(ya){return ya.Uc});m=b.map(function(ya){return ya.textStreams});n=b.map(function(ya){return ya.imageStreams});
589
+ p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(wp(d.Z));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(wp(d.Rb));return u(Fa,xp(a.g,k,f,yp,zp),3);case 3:return u(Fa,xp(a.h,l,f,yp,zp),4);case 4:return u(Fa,xp(a.j,m,f,yp,zp),5);case 5:return u(Fa,xp(a.i,n,f,yp,zp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=ag(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
590
+ !Y.length||(Da=D++,B.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=t(A),G=F.next();!G.done;G=F.next())H=G.value,J=D++,B.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
591
+ a.l=B;z(Fa)}})}function sp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.vc),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&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
592
+ function up(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&&gb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
593
+ function tp(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.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&gb(e.roles,h.roles)&&qf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Uc=c}}
594
+ function vp(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}}
595
+ function Ap(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.bb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Rb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
596
+ h.value,k.push(Bp(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Bp(b.Rb));return u(R,xp([],c,0,Cp,Dp),2);case 2:return p=R.h,u(R,xp([],d,0,Cp,Dp),3);case 3:return q=R.h,u(R,xp([],e,0,Cp,Dp),4);case 4:return v=R.h,u(R,xp([],f,0,Cp,Dp),5);case 5:y=R.h;w=0;if(q.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=t(q),I=J.next();!I.done;I=J.next())K=I.value,P=w++,K.variantIds.push(P),H.variantIds.push(P);else for(x=q.concat(p),D=t(x),B=D.next();!B.done;B=D.next())A=
597
+ B.value,A.variantIds=[w++];return R["return"](q.concat(p).concat(v).concat(y))}})}
598
+ function xp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I;return L(function(K){switch(K.g){case 1:f=qc;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){K.B(4);break}m=l.value;return u(K,Ep(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Fp(x,b,d,e,g))&&a.push(D);B=t(g);for(q=B.next();!q.done;q=
599
+ B.next())for(A=q.value,F={},G=t(A),w=G.next();!w.done;F={Va:F.Va},w=G.next())if(F.Va=w.value,H=F.Va.type==f.Z&&!F.Va.language,J=F.Va.type==f.Rb&&!F.Va.tilesLayout,!H&&!J&&(I=a.some(function(P){return function(R){return R.mimeType==P.Va.mimeType&&Pc(R.codecs)==Pc(P.Va.codecs)}}(F))))throw new N(2,4,4037);return K["return"](a)}})}
600
+ function Ep(a,b,c,d,e){return L(function(f){if(1==f.g)return Gp(b,a),a.matchedStreams?a.segmentIndex?u(f,Hp(a,c),2):f.B(2):f["return"](!1);Ip(a,c,d,e);return f["return"](!0)})}
601
+ function Hp(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ji)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
602
+ function Fp(a,b,c,d,e){var f=c(a);Gp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Ji;return u(g,Hp(f,0),0)})});if(!f.matchedStreams)return null;Ip(f,0,d,e);return f}function Ip(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==gd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
603
+ function yp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
604
+ function Cp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
605
+ function zp(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))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=ag(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||
606
+ (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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=yp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),zp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&zp(a.trickModeVideo,b)}
607
+ function Dp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(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)}}}
608
+ function Gp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Jp,video:Jp,text:Kp,image:Lp}[f.type],h={audio:Mp,video:Np,text:Op,image:Pp}[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;c.push(f)}b.matchedStreams=c}function Jp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Pc(b.codecs)!=Pc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ag(c,d).length:1)}return c?!1:!0}
609
+ function Kp(a,b){return a.language?b.language?0==gd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Lp(a){return a.tilesLayout?!0:!1}
610
+ function Mp(a,b,c){if(a.id==c.id)return!0;var d=gd(a.language,b.language),e=gd(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;
611
+ d=Qp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Rp)return!0;if(d==Sp)return!1;d=Qp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Rp?!0:d==Sp?!1:a.bandwidth&&Tp(a.bandwidth,b.bandwidth,c.bandwidth)==Rp?!0:!1}
612
+ function Np(a,b,c){if(a.id==c.id)return!0;var d=Qp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Rp)return!0;if(d==Sp)return!1;if(a.frameRate){d=Qp(a.frameRate,b.frameRate,c.frameRate);if(d==Rp)return!0;if(d==Sp)return!1}return a.bandwidth&&Tp(a.bandwidth,b.bandwidth,c.bandwidth)==Rp?!0:!1}
613
+ function Op(a,b,c){if(a.id==c.id)return!0;var d=gd(a.language,b.language),e=gd(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!=
614
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Pp(a,b,c){return a.id==c.id?!0:Qp(a.width*a.height,b.width*b.height,c.width*c.height)==Rp?!0:!1}function Bp(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}}
615
+ function wp(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}}
616
+ function Qp(a,b,c){if(b==a&&a!=c)return Sp;if(c==a&&a!=b)return Rp;if(b>a){if(c<=a||c-a<b-a)return Rp;if(c-a>b-a)return Sp}else{if(c>a)return Sp;if(a-c<a-b)return Rp;if(a-c>a-b)return Sp}return Up}function Tp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Rp:b<a?Sp:Up}var Rp=1,Up=0,Sp=-1;function Vp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.N={};this.j=new qp;this.F=0;this.I=new Pa(5);this.D=new O(function(){Wp(a)});this.o=new Pe;this.s=null;this.L=[];this.u=Infinity;this.C=!1}r=Vp.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.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Xp(c),2);d=e.h;c.h&&Yp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
617
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,Xp(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
618
+ function Xp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Ve(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Qe(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Zp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
619
+ function Zp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=wo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"]($p(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Mo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Qe(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"]($p(a,h,c))})}
620
+ function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya;return L(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=eo(b,"Location").map(ko).filter(Rb);0<f.length&&(g=kc(e,f),e=a.m=g);h=eo(b,"BaseURL");k=h.map(ko);l=kc(e,k);m=0;h&&h.length&&(m=mo(h[0],"availabilityTimeOffset",to)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=mo(b,"minBufferTime",oo)||0);a.F=mo(b,"minimumUpdatePeriod",oo,-1);q=mo(b,"availabilityStartTime",no);v=mo(b,
621
+ "timeShiftBufferDepth",oo);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=mo(b,"suggestedPresentationDelay",oo));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=mo(b,"maxSegmentDuration",oo));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.cb(A.Qa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=w?w:J,A=new S(q,I,a.g.dash.autoCorrectDrift);A.nc("static"==B);(K=A.T())&&
622
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Sd(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=B,presentationTimeline:A,aa:null,U:null,ka:null,H:null,bandwidth:0,ke:!1,yb:m,profiles:P.split(",")};ba=aq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=B&&ba.de||A.Ia(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.xe(a.u):a.u&&Ua("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.");
623
+ A.Bd(D||1);return u(Ia,rp(a.j,Y,R.Wa),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);Ia.B(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Ce()){Ia.B(3);break}Fa=eo(b,"UTCTiming");return u(Ia,bq(a,l,Fa),5);case 5:ya=Ia.h;if(!a.h)return Ia["return"]();A.ye(ya);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ia)}})}
624
+ function aq(a,b,c,d){var e=mo(d,"mediaPresentationDuration",oo),f=[],g=0;d=eo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=mo(k,"start",oo,g),n=k.id,p=mo(k,"duration",oo),q=null;if(l){var v=mo(l,"start",oo);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=cq(a,b,c,{start:m,duration:q,node:k,me:null==q||!l});f.push(g);b.aa.id&&q&&(a.N[b.aa.id]=q);if(null==q){g=
625
+ null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,de:!1}:{periods:f,duration:g,de:!0}}
626
+ function cq(a,b,c,d){b.aa=dq(d.node,null,c);b.U=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=eo(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())eq(a,d.start,d.duration,f.value,c);c=eo(d.node,"AdaptationSet").map(function(m){return fq(a,b,m)}).filter(Rb);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Nf);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);
627
+ }d=c.filter(function(m){return!m.Vd});c=c.filter(function(m){return m.Vd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Vd.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={uc:h.uc},l=k.next())h.uc=l.value,h.uc.trickModeVideo=e.streams.find(function(m){return function(n){return Pc(m.uc.codecs)==Pc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:gq(d,"audio");g=a.g.disableVideo?[]:gq(d,"video");f=a.g.disableText?
628
+ []:gq(d,pc);c=a.g.disableThumbnails?[]:gq(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,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,vc:d,Uc:e,textStreams:g,imageStreams:f}}
629
+ function gq(a,b){return a.filter(function(c){return c.contentType==b})}
630
+ function fq(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=dq(c,b.aa,null);var e=!1,f=eo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Rb),h=void 0,k=b.ka.contentType==pc;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=
631
+ l}}var n;m=eo(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=eo(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"),
632
+ 10)));m=eo(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 y=t(q),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==q.length?p+=2:p++,D=x);v.set(w,cd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
633
+ 1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,cd(x));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=eo(c,"ContentProtection");var B=xo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=cd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=eo(c,"Label"))&&l.length&&
634
+ (l=l[0],l.textContent&&(F=l.textContent));l=eo(c,"Representation");c=l.map(function(G){if(G=hq(a,b,B,h,A,F,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 N(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=iq(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=
635
+ 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(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Rb);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,Jg:e,streams:c,drmInfos:B.drmInfos,Vd:f,Nf:k}}
636
+ function hq(a,b,c,d,e,f,g,h,k,l){b.H=dq(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!jq(b.H))return null;var m=b.U.start;b.bandwidth=mo(l,"bandwidth",ro)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,J,I){return kq(a,H,J,I)};if(b.H.lc)var v=Zo(b,q);else if(b.H.$a)v=ep(b,a.l);else if(b.H.mc)v=jp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.xa,w=b.U.duration||0;v={Ab:function(){return Promise.resolve(Ii(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
637
+ throw H;}q=eo(l,"ContentProtection");q=Ao(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;eo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=eo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
638
+ (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 F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=F&&b.Wa&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return K.B(0);I=J;return u(K,v.Ab(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){G.segmentIndex&&
639
+ (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,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.Lc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,
640
+ hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.Wa&&!a.l[F]&&(a.l[F]=G);return G}function Wp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Xp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Yp(a,b);z(d)}})}function Yp(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
641
+ function dq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Lc:null,audioSamplingRate:null,yb:0};c=c||b.xa;var d=eo(a,"BaseURL"),e=d.map(ko),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=mo(a,"frameRate",uo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=eo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
642
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=eo(a,"AudioChannelConfiguration");m=lq(m)||b.Lc;p=mo(a,"audioSamplingRate",so)||b.audioSamplingRate;f||(f=iq(g,h));var q=co(a,"SegmentBase"),v=co(a,"SegmentTemplate"),y=q?mo(q,"availabilityTimeOffset",to)||0:0,w=v?mo(v,"availabilityTimeOffset",to)||0:0;d=d&&d.length?mo(d[0],"availabilityTimeOffset",to)||0:0;d=b.yb+d+y+w;return{xa:kc(c,e),lc:q||b.lc,$a:co(a,"SegmentList")||b.$a,mc:v||b.mc,width:mo(a,"width",so)||b.width,height:mo(a,
643
+ "height",so)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Lc:m,audioSamplingRate:p,yb:d}}
644
+ function lq(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=
645
+ 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 jq(a){var b=a.lc?1:0;b+=a.$a?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.lc&&(a.$a=null),a.mc=null);return!0}
646
+ function mq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=kc(b,[c]),f=Ve(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Qe(a.o,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=uc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
647
+ function bq(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.B(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.B(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.B(8);
648
+ 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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,mq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,mq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
649
+ case 9:va(n,3);break;case 5:E(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
650
+ function eq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=mo(d,"timescale",so)||1;d=t(eo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=mo(k,"presentationTime",so)||0,m=mo(k,"duration",so)||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))}}
651
+ function kq(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=af,f=Yi(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Qe(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function iq(a,b){return Tc(Nc(a,b))?pc:a.split("/")[0]}M("shaka.dash.DashParser",Vp);gg.mpd=function(){return new Vp};eg["application/dash+xml"]=function(){return new Vp};eg["video/vnd.mpeg.dash.mpd"]=function(){return new Vp};function nq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function oq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}oq.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};
652
+ oq.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 pq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function qq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function rq(a,b){this.name=a;this.value=b};function sq(a,b){return a.filter(function(c){return c.name==b})}function tq(a,b){return a.filter(function(c){return pq(c,"TYPE")==b})}function uq(a,b){var c=sq(a,b);return c.length?c[0]:null}function vq(a,b,c){c=void 0===c?0:c;return(a=uq(a,b))?Number(a.value):c};function wq(a){this.h=a;this.g=0}function xq(a){yq(a,/[ \t]+/gm)}function yq(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 zq(a){return a.g==a.h.length?null:(a=yq(a,/[^ \t\n]*/gm))?a[0]:null};function Aq(){this.g=0}
653
+ function Bq(a,b,c){b=uc(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=Cq(a,g),--a.g,Dq.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=Cq(a,h);if(Eq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
654
+ 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=Cq(a,m),Dq.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=kc([d],[m.trim()])[0],h&&g.push(h),e.push(new qq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new qq("",g,k)));return new nq(c,b,f,e)}f.push(h);
655
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new rq("URI",k)),e=!0)}}return new nq(c,b,f)}function Cq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new wq(f);var h;(h=yq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=yq(f,k);)d.push(new rq(h[1],h[2]||h[3])),xq(f)}return new oq(c,e,d,g)}
656
+ var Dq="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(" "),Eq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Fq(){}function Gq(a){try{var b=Hq(a);return He({uri:a,pe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Fe(c)}}function Hq(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=Dc(a):e=yc(a);return{data:e,contentType:c}}
657
+ M("shaka.net.DataUriPlugin",Fq);Fq.parse=Gq;Se("data",Gq);function Iq(){var a=this;this.g=this.i=null;this.Ea=1;this.o=new Map;this.u=new Map;this.wa=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Aq;this.ja=0;this.C=new O(function(){Jq(a)});this.m=Kq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.Ma=0;this.F=new Pe;this.W=[];this.L=new Map;this.La=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Iq.prototype;r.configure=function(a){this.g=a};
658
+ r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Lq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Mq(c,d.data),3);e=c.ja;0<e&&c.C.S(e);return f["return"](c.D)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.i=null;this.wa.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
659
+ r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Kq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Nq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Nq(a,c[d]));return u(e,Promise.all(b),0)})};
660
+ function Nq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Oq,d=b.Ge,e=new Xb(d),a.l&&b.Le&&$b(e,new bc("_HLS_skip=YES")),u(y,Lq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Bq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=sq(g.g,"EXT-X-DEFINE");k=Pq(a,h);l=b.stream;return u(y,Qq(a,b.Tc,g,l.type,l.mimeType,b.xd,k,b.Se,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.Eb(m,a.j.Qa());m.length&&(n=vq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.cb(p));q=m[m.length-
661
+ 1];if(v=uq(g.g,"EXT-X-ENDLIST"))Rq(a,c.Fe),a.j.Ia(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
662
+ function Mq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld;return L(function(Ya){switch(Ya.g){case 1:c=Bq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=sq(c.g,"EXT-X-DEFINE");Sq(a,d);e=sq(c.g,"EXT-X-MEDIA");f=sq(c.g,"EXT-X-STREAM-INF");g=sq(c.g,"EXT-X-IMAGE-STREAM-INF");Tq(a,f);h=sq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
663
+ kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,Uq(a,e),2);case 2:return Vq(a,e),u(Ya,Wq(a,f),3);case 3:return x=Ya.h,u(Ya,Xq(a,e),4);case 4:return D=Ya.h,u(Ya,Yq(a,g),5);case 5:B=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.La&&0==x.length)throw new N(2,4,4034);F=A=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.ne),"text"!=J.stream.type&&(F=Math.min(F,J.Af-J.ne));a.m!=Kq?(a.j=new S(0,a.g.defaultPresentationDelay?
664
+ a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.nc(!1)):(a.j=new S(null,0),a.j.nc(!0));Zq(a);if(a.m!=Kq)a.ja=a.G,I=Oq,a.m==I.Ee&&(K=a.j.Qc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Sd(K));else for(a.j.Ia(F),a.j.offset(-A),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-A),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),ya=Fa.next();!ya.done;ya=
665
+ Fa.next())(Ia=ya.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Fc){return L(function(ie){return u(ie,Fc.createSegmentIndex(),0)})})),6);case 6:Pb=t(ba);for(ya=Pb.next();!ya.done;ya=Pb.next())ld=ya.value,a.W.push(ld.segmentIndex.K);Zq(a);a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);z(Ya)}})}
666
+ function Sq(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.o.has(d)||a.o.set(d,e))}}function Pq(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.o.get(f))&&c.set(f,e)}return c}
667
+ function Tq(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=$q(a,e);if(g){var h=nc(pc,e);a.s.set(g,h);fb(e,h)}f&&(g=mc("audio",e),a.s.set(f,g));d&&(f=mc("video",e),a.s.set(d,f))}}
668
+ function Xq(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=tq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return L(function(B){if(1==B.g){if(w=a.g.disableText)return B["return"](null);C(B,2);return u(B,ar(a,y),4)}if(2!=B.g)return x=B.h,B["return"](x.stream);D=E(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=pq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
669
+ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
670
+ function Yq(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,br(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
671
+ function Uq(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,ar(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return ar(a,e)});return u(d,Promise.all(c),0)})}
672
+ function Wq(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(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(pq(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(y,cr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=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)||
673
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=t(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.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.Tc:"")+" - "+(A?A.Tc:"");G&&J&&I.length&&K.length&&!(0<ag(I,K).length)||a.wa.has(H)||(G={id:a.Ea++,language:G?G.language:"und",primary:!!G&&G.primary||
674
+ !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.wa.add(H))}}y=w.call(y,B)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
675
+ function cr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){if(1==x.g)return d=qc,e=$q(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=pq(b,"URI"),q=l.audio.find(function(D){return D&&D.Tc==p}),v=nc(d.Na,e),(y=nc(d.bb,e))&&!v?m=d.bb:!k.length&&y&&v?(m=d.Na,e=[[v,y].join()]):l.audio.length&&q?(m=d.bb,n=!0):m=l.video.length?d.bb:d.Na,n?x.B(2):u(x,dr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
676
+ er(l);return x["return"](l)})}function $q(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);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=Qc(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function fr(a){a=Z(a,"LANGUAGE")||"und";return cd(a)}
677
+ function er(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 Vq(a,b){var c=tq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=fr(e);var f=pq(e,"GROUP-ID");e=pq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
678
+ function ar(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){c=pq(b,"GROUP-ID");d="";var x=pq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=pc);e=x;e!=pc&&c&&a.s.has(c)&&(d=a.s.get(c));f=gr(pq(b,"URI"),a.o);if(a.h.has(f))return w["return"](a.h.get(f));g=fr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Z(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Z(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
679
+ v="YES"==q;return u(w,hr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(null==y)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,y);return w["return"](y)})}
680
+ function br(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=gr(pq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=fr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,hr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
681
+ Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
682
+ function dr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=gr(pq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=mc(d,c);return u(l,hr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
683
+ function hr(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld,Ya,Fc,ie,zn,An,Bn,Cn,ei,fi,Cf,Dn,En,Fn,Gn;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Lq(a,q),2);case 2:v=cb.h;q=v.uri;y=Bq(a.da,v.data,q);if(1!=y.type)throw new N(2,4,4017);w=[];if(y.segments)for(x=t(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=sq(B.g,"EXT-X-KEY"),w.push.apply(w,ja(A));F=!1;G=[];H=new Set;J=t(w);for(I=J.next();!I.done;I=J.next())if(K=I.value,
684
+ P=pq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.La=!0,cb["return"](null);R=pq(K,"KEYFORMAT");if(aa=(ba=ir[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);ya=sq(y.g,"EXT-X-DEFINE");Ia=Pq(a,ya);jr(a,y);return u(cb,kr(a,d,c,y,Ia),3);case 3:return Pb=cb.h,lr.includes(Pb)&&(c=""),ld=new Map,Ya=new Map,C(cb,4),u(cb,Qq(a,b,y,d,Pb,ld,Ia,Ya,c,p),6);case 6:Fc=cb.h;va(cb,5);break;case 4:ie=E(cb);
685
+ if(4035==ie.code)return Ua("Skipping unsupported HLS stream",Pb,b),cb["return"](null);throw ie;case 5:zn=Fc[0].startTime;An=Fc[Fc.length-1].endTime;Bn=new T(Fc);Cn=d==pc?"subtitle":void 0;ei=[];if(l)for(fi=t(l.split(",")),Cf=fi.next();!Cf.done;Cf=fi.next())Dn=Cf.value,ei.push(Dn);Fn=(En=uq(y.g,"EXT-X-SERVER-CONTROL"))?null!=En.getAttribute("CAN-SKIP-UNTIL"):!1;Gn={id:a.Ea++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Bn,mimeType:Pb,codecs:c,kind:Cn,encrypted:F,
686
+ drmInfos:G,keyIds:H,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:ei,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Gn,Tc:b,Ge:q,ne:zn,Af:An,xd:ld,Se:Ya,Le:Fn})}})}
687
+ function jr(a,b){var c=uq(b.g,"EXT-X-PLAYLIST-TYPE"),d=uq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Rq(a,Kq);else{c?Rq(a,mr):Rq(a,nr);d=uq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=uq(b.g,"EXT-X-PART-INF");a.l&&c?(a.Ma=Number(pq(c,"PART-TARGET")),a.G=Math.min(a.Ma,a.G),c=uq(b.g,"EXT-X-SERVER-CONTROL"),a.ca=c?Number(pq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.fa=Math.max(d,a.fa)}}
688
+ function or(a,b,c,d){c=uq(c,"EXT-X-MAP");if(!c)return null;var e=pq(c,"URI");d=gr(kc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=pr(d,c),a.ea.set(b,c));return a.ea.get(b)}function pr(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 ii(function(){return[a]},c,d)}
689
+ function qr(a,b,c,d,e,f,g,h,k){var l=d.g,m=gr(d.h,g),n=uq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l){a={};for(var y=0;y<d.i.length;a={bd:a.bd},y++){var w=d.i[y],x=0==y?c:v[v.length-1],D=0==y?e:x.endTime,B=Number(Z(w,"DURATION"));B=D+B;var A=0,F=null;"EXT-X-PRELOAD-HINT"==w.name?A=(x=Z(w,"BYTERANGE-START"))?Number(x):0:(A=Z(w,"BYTERANGE"),x=t(rr(x,A)),A=x.next().value,F=x.next().value);if(w=Z(w,"URI"))a.bd=kc([h],[w])[0],v.push(new ki(D,
690
+ B,function(G){return function(){return[G.bd]}}(a),A,F,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(d=uq(l,"EXT-X-BYTERANGE"))?(q=t(rr(c,d.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ga);c="";d=null;"image"==k&&(c="1x1",k=uq(l,"EXT-X-TILES"))&&(c=pq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(d=Number(k)));return new ki(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,d)}
691
+ function rr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ga+1,d=c+d-1);return[c,d]}function Zq(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Fb(c.value);a.W=[]}}
692
+ function Qq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=vq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=uq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Kq&&f.has(y)){w=f.get(y);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=or(a,c.h,m[0].g,g);x=a;return u(Y,sr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.V=Y.h;case 3:w=a.V;case 2:D=m[0].h;D.split("/").pop();B=vq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
693
+ h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.I.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}J=m[H];I=G[G.length-1];K=0==H?w:I.endTime;y=p+v+H;f.set(y,K);n=or(a,c.h,J.g,g);P=uq(J.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}B++;h.set(B,y);return u(Y,tr(a,B,b,n,e,y,J,g,K,d,k,l),9);case 9:F=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=uq(J.g,"EXTINF");a.l||ba?(aa=qr(a,n,I,J,K,F,g,c.h,d))&&G.push(aa):a.l||Ua("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.");
694
+ H++;Y.B(5);break;case 7:return Y["return"](G)}})}function tr(a,b,c,d,e,f,g,h,k,l,m,n){var p,q;return L(function(v){if(1==v.g)return p=0,a.I.has(b)?(p=a.I.get(b),v.B(2)):u(v,sr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(q=v.h,p=k-q,a.I.set(b,p));return v["return"](p)})}
695
+ function ur(a,b,c,d,e,f){var g,h,k,l,m,n;return L(function(p){switch(p.g){case 1:g=af;h=Yi(b.sa(),b.pa,b.ga,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof ii,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](vr(a,h,g));k=Yi(b.sa(),b.pa,b.pa+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof ii,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});C(p,2);return u(p,
696
+ vr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=E(p);if(7001==m.code)throw m;Ua("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.",k.uris[0]);return u(p,vr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
697
+ function sr(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:n=qr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.xd.get(e),void 0!=q))return B["return"](q);d=d.toLowerCase();if(lr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.B(2);break}v=[ur(a,n,k,d,l,m)];c&&v.push(ur(a,c,k,d,l,m));return u(B,
698
+ Promise.all(v),3);case 3:return y=B.h,w=y[0],x=y[1]||y[0],B["return"](wr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){B.B(4);break}return u(B,ur(a,n,k,d,l,m),5);case 5:return D=B.h,B["return"](xr(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
699
+ function wr(a,b,c,d){var e=0;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).R("mdhd",function(h){e=Ch(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 lg).box("moof",pg).box("traf",pg).R("tfdt",function(h){f=Bh(h.reader,h.version).ld/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
700
+ function xr(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.se(1)}function e(){throw new N(2,4,4030,a,b);}var f=new ig(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Ib();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Ib();var l=
701
+ f.Ib();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function gr(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}
702
+ function kr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){f=qc;g=af;h=gr(d.segments[0].h,e);k=new Xb(h);l=k.va.split(".").pop();m=yr[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");if(b==f.Rb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=Ve([h],a.g.retryParameters);p.method="HEAD";return u(w,vr(a,p,g),2)}q=w.h;v=q.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
703
+ function Lq(a,b){var c=Ve([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return vr(a,c,0)}function Jq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ja,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);z(d)})}function Rq(a,b){a.m=b;a.j&&a.j.nc(a.m==Kq);a.m!=Kq||a.C.stop()}
704
+ function vr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Qe(a.F,b);return b.promise}M("shaka.hls.HlsParser",Iq);
705
+ var lr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],yr={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",
706
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ir={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=pq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=pq(a,"URI");b=Hq(b);b=Fb(b.data);b=lc("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=
707
+ pq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=pq(a,"URI");a=Hq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=ao(a,b);return lc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Kq="VOD",nr="EVENT",mr="LIVE",Oq={Fe:Kq,kg:nr,Ee:mr};gg.m3u8=function(){return new Iq};eg["application/x-mpegurl"]=function(){return new Iq};eg["application/vnd.apple.mpegurl"]=function(){return new Iq};function zr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,pe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=xc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ar(){}function Br(a,b,c,d,e){var f=new Cr;of(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Dr,h={Yd:!1,Be:!1};a=Er(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ee(a,function(){h.Yd=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Be=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
708
+ function Er(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B;return L(function(A){switch(A.g){case 1:return h=Fr,k=Gr,p=n=0,q=Date.now(),C(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Hr(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(F){function G(){var H,J;return L(function(I){switch(I.g){case 1:return C(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.B(5);break}n+=H.value.byteLength;if(!g){I.B(5);
709
+ break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-q||H.done)e(J-q,n-p,w-n),p=n,q=J;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new k({start:x}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=E(A);if(d.Yd)throw new N(1,1,7001,a,b);if(d.Be)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return B=Hr(l.headers),A["return"](zr(B,m,l.status,a,l.url,b))}})}function Hr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
710
+ function Ir(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Ar);Ar.isSupported=Ir;Ar.parse=Br;var Fr=window.fetch,Dr=window.AbortController,Gr=window.ReadableStream,Cr=window.Headers;Ir()&&(Se("http",Br,2,!0),Se("https",Br,2,!0),Se("blob",Br,2,!0));function Jr(){}
711
+ function Kr(a,b,c,d,e){var f=new Lr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Mr(f);e(q);n=!0}};f.onload=function(){var q=Mr(f),v=f.response;try{var y=zr(q,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
712
+ c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ee(k,function(){f.abort();return Promise.resolve()})}
713
+ function Mr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Jr);Jr.parse=Kr;var Lr=window.XMLHttpRequest;Se("http",Kr,1,!0);Se("https",Kr,1,!0);Se("blob",Kr,1,!0);function Nr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Or(a){return a.sa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.pa+":"+a.ga}function Pr(a,b){return Yi(a.g.sa(),a.g.pa,a.g.ga,b.streaming.retryParameters)};function Qr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Rr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Qr.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 Sr(a){var b=this;this.o=a;this.j=new Map;this.i=new bf(function(){return Tr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Qr}Sr.prototype.destroy=function(){return this.i.destroy()};function Ur(a,b,c){a.m=b;a.l=c}function Tr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
714
+ function Vr(a,b,c,d,e,f){cf(a.i);var g=(a.j.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,Wr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new $n(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Xr(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
715
+ function Wr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=af,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;fb(a.h,e);return g["return"](f.data)})};function Yr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new rc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Yr.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 va(b,0);E(b);z(b)})};
716
+ function Zr(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)})}})}Yr.prototype.store=function(){return this.h};Yr.prototype.promise=function(){return this.g};function $r(a){this.h=a;this.g=[]}$r.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function as(a,b){return bs(a,b,"readwrite")}function bs(a,b,c){c=a.h.transaction([b],c);var d=new Yr(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function cs(a,b,c){this.h=new $r(a);this.i=b;this.g=c}r=cs.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return ds(this.i)};r.removeSegments=function(a,b){return es(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,fs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Zd(e)}))})};r.addManifests=function(){return ds(this.g)};
717
+ r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function gs(a,b,c){a=as(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=as(this.h,this.g),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 es(this,this.g,a,b)};
718
+ r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,fs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Zb(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=bs(a.h,a.g,"readonly"),c=new Map,u(d,Zr(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Zb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.Zd=function(a){return a};r.Zb=function(a){return Promise.resolve(a)};
719
+ function ds(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=as(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={tc:g.tc},k=h.next())l=k.value,g.tc=e.add(l),g.tc.onsuccess=function(n){return function(){f.push(n.tc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
720
+ function es(a,b,c,d){a=as(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={sc:e.sc},f=c.next())e.sc=f.value,b["delete"](e.sc).onsuccess=function(g){return function(){return d(g.sc)}}(e);return a.promise()}
721
+ function fs(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=bs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Qb:h.Qb,Ob:h.Ob},l=k.next())h.Ob=l.value,h.Qb=e.get(h.Ob),h.Qb.onsuccess=function(n){return function(){void 0==n.Qb.result&&g.push(n.Ob);f[n.Ob]=n.Qb.result}}(h);return u(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 hs(a){this.g=new $r(a)}hs.prototype.destroy=function(){return this.g.destroy()};hs.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=bs(a.g,"session-ids","readonly"),c=[],u(d,Zr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};hs.prototype.add=function(a){var b=as(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()};
722
+ hs.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=as(b.g,"session-ids"),u(d,Zr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function is(){this.g=new Map}is.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)};is.prototype.init=function(){var a=this;js.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)};
723
+ function ks(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ls(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,la:f},e)})})}
724
+ function ms(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 ns(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function os(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()}
725
+ function ps(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=js,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function qs(a,b){js.set(a,b)}M("shaka.offline.StorageMuxer",is);is.unregister=function(a){js["delete"](a)};is.register=qs;is.prototype.destroy=is.prototype.destroy;var js=new Map;function rs(){cs.apply(this,arguments)}qa(rs,cs);rs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=as(c.h,c.g);e=d.store();f=new rc;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 u(g,Promise.all([d.promise(),f]),0)})};
726
+ rs.prototype.Zb=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=ss(a.periods[c],e),b.push(f);return u(h,Ap(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})})};
727
+ function ss(a,b){ts(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return us(e,a.startTime,b)})}
728
+ function us(a,b,c){var d=a.initSegmentUri?vs(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=vs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
729
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}rs.prototype.Zd=function(a){return{data:a.data}};function vs(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);}
730
+ function ts(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++,
731
+ 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 ws(){cs.apply(this,arguments)}qa(ws,cs);
732
+ ws.prototype.Zb=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(xs(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Ap(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
736
733
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
737
- function Bs(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,
738
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Cs(){gs.apply(this,arguments)}ra(Cs,gs);q=Cs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ks(this,a,b)};q.dc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ds(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=Ds.prototype;
739
- q.init=function(){var a=this,b=new zc,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 vs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new As(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new As(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
740
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Cs(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ls(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["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};
741
- q.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.o){b.A(10);break}return u(b,a.o.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
742
- 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.o};
743
- q.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,Es(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
744
- function Es(){var a=new zc,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}us("idb",function(){return zd()||!window.indexedDB?null:new Ds});function Fs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Fs.prototype.Ea=function(){return this.i};Fs.prototype.aa=function(){return this.h};Fs.prototype.key=function(){return this.l};Fs.prototype.toString=function(){return this.j};
745
- function Gs(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 Fs(b,c,d,Number(a[4])):null};function Hs(a,b){this.h=a;this.g=b}
746
- function Is(a,b){var c=new S(null,0);c.Na(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Js(a,d,e,c);e=b.streams.filter(function(l){return l.type==xc}).map(function(l){return Ks(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ks(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
734
+ function xs(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,
735
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ys(){cs.apply(this,arguments)}qa(ys,cs);r=ys.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return gs(this,a,b)};r.Zb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function zs(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=zs.prototype;
736
+ r.init=function(){var a=this,b=new rc,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 rs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ws(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ws(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
737
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new ys(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new hs(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};
738
+ r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
739
+ 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};
740
+ r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,As(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
741
+ function As(){var a=new rc,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}qs("idb",function(){return ud()||rd()||!window.indexedDB?null:new zs});function Bs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Bs.prototype.Aa=function(){return this.i};Bs.prototype.la=function(){return this.h};Bs.prototype.key=function(){return this.l};Bs.prototype.toString=function(){return this.j};
742
+ function Cs(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 Bs(b,c,d,Number(a[4])):null};function Ds(a,b){this.h=a;this.g=b}
743
+ function Es(a,b){var c=new S(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Fs(a,d,e,c);e=b.streams.filter(function(l){return l.type==pc}).map(function(l){return Gs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Gs(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=
747
744
  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}}
748
- function Js(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(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=r(b);for(e=b.next();!e.done;e=b.next())for(e=
749
- e.value,g=Ks(a,e,d),h=r(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=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ks(a,e,d),g=r(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}
750
- function Ks(a,b,c){var d=b.segments.map(function(e){return Ls(a,e)});c.Mb(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,
751
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ls(a,b){var c=new Fs("segment",a.h,a.g,b.dataKey);return new ri(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ms(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
752
- function Ms(a,b){var c=new Fs("segment",a.h,a.g,b);return new pi(function(){return[c.toString()]},0,null)};function Ns(){this.g=null}q=Ns.prototype;q.configure=function(){};
753
- 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=Gs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ms;va(m);return u(m,e.init(),4);case 4:return u(m,qs(e,d.Ea(),d.aa()),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 Hs(d.Ea(),d.aa()),l=Is(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
754
- 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 ms,B(m,2,3),u(m,e.init(),5);case 5:return u(m,qs(e,d.Ea(),d.aa()),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 xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.A(3)}})};
755
- hg["application/x-offline-manifest"]=function(){return new Ns};function Os(){}function Ps(a){var b=Gs(a);b&&"manifest"==b.g?(a={uri:a,ye:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Me(a)):a=b&&"segment"==b.g?Qs(b.key(),b):Ke(new N(2,1,9004,a));return a}
756
- function Qs(a,b){var c=new ms;return Me(void 0).fa(function(){return c.init()}).fa(function(){return qs(c,b.Ea(),b.aa())}).fa(function(d){return d.getSegments([b.key()])}).fa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Os);Os.plugin=Ps;Xe("offline",Ps);function Rs(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),w=v.next();!w.done;w=v.next())if(w=w.value,Ss(w.info,p)){w.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ts(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)}})}
757
- function Ts(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new uf({sb:b,onError:function(){},Tc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,Df(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 E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Mf(d),8);case 8:wa(f,7);break;case 6:return E(f),u(f,d.destroy(),
758
- 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 B(h,2),u(h,Nf(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
759
- function Ss(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&pb(a.audioCapabilities,b.audioCapabilities,c)&&pb(a.videoCapabilities,b.videoCapabilities,c)};function Us(a,b,c){var d=b.presentationTimeline.getDuration();b=Vs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ws(a,b){var c=Is(new Hs(a.Ea(),a.aa()),b),d=b.appMetadata||{};c=Vs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
760
- function Vs(a){var b=[],c=me(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ce(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(de(c.value));return b};function Xs(){this.g={}}function Ys(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Zs(a,b){a.g[b.id]=b.bandwidth||2048}function $s(a,b){var c=a.g[b];null==c&&(c=0);return c};function at(){this.h=[];this.g=this.i=0}function bt(){var a=ct,b;return L(function(c){return 1==c.g?(b=++a.i,a.g?u(c,new Promise(function(d){a.h.push(function(){a.g=b;d()})}),2):(a.g=b,c.A(2))):c["return"](b)})}at.prototype.release=function(a){a==this.g&&(this.g=0,0<this.h.length&&this.h.shift()())};function dt(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.R=this.m=null;a?(this.m=a.m,this.R=a.hc()):(this.m=Ak(),this.R=new We);this.oc=[];this.Pd=[];var c=!a;this.K=new gf(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.Pd.map(function(l){return Wr(l)})),2);case 2:d=function(){};e=[];f=r(b.oc);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.R.destroy(),
761
- 4);case 4:b.m=null,b.R=null,z(k)}})})}function et(){if(ud())a:{var a=r(ns.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=dt.prototype;q.destroy=function(){return this.K.destroy()};
762
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Ck(this.m,a)};q.getConfiguration=function(){var a=Ak();Ck(a,this.m,Ak());return a};q.hc=function(){return this.R};
763
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Vr(this.R);this.Pd.push(f);b=ft(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,gg(a,d.R,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"]($b(h))})},e,f);var g=new Je(b,function(){return Wr(f)});g["finally"](function(){ob(d.Pd,f)});g.then=function(h){Tb("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.");
764
- return g.promise.then(h)};return gt(this,g)};q.yf=function(){Tb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
765
- function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y,x,D,C;return L(function(A){switch(A.g){case 1:return ht(),h=g=null,k=new ms,n=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,it(a,b,g,e),6);case 6:p=A.h;jt(a);t=!p.presentationTimeline.Y()&&!p.presentationTimeline.rb();if(!t)throw new N(2,9,9005,b);return u(A,kt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;jt(a);if(n)throw n;return u(A,lt(p,e),8);case 8:return u(A,k.init(),9);case 9:return jt(a),u(A,os(k),10);case 10:return l=A.h,jt(a),v=mt(h,
766
- p,b,c,e,f),w=v.Jf,y=v.be,u(A,l.aa.addManifests([w]),11);case 11:x=A.h;jt(a);m=x[0];jt(a);if(n)throw n;return u(A,nt(a,y,m,w,f,e,l.aa,p,h),12);case 12:return jt(a),D=new Fs("manifest",l.path.Ea,l.path.aa,m),A["return"](Ws(D,w));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:C=E(A);if(null==m){A.A(18);break}return u(A,ot(m),18);case 18:throw n||C;}})}
767
- function nt(a,b,c,d,e,f,g,h,k){var l,m;return L(function(n){switch(n.g){case 1:l=function(p,t){var v,w,y,x,D,C,A,F;return L(function(G){if(1==G.g){v=function(){jt(a)};w={};y=r(p);for(x=y.next();!x.done;w={xc:w.xc,ab:w.ab},x=y.next())w.ab=x.value,w.xc=void 0,D=Sr(w.ab,f),C=w.ab.i,A=w.ab.h,F=function(H){return function(J){H.xc=J;return Promise.resolve()}}(w),Yr(e,w.ab.groupId,D,C,A,F),$r(e,w.ab.groupId,function(H){return function(){var J;return L(function(I){if(1==I.g)return J=H.ab.g,u(I,pt(c,J,{data:H.xc},
768
- v),2);d=I.h||d;z(I)})}}(w));return u(G,as(e),2)}if(!t)return G.A(0);jt(a);qt(h,d,k,f);return u(G,g.updateManifest(c,d),0)})};m=!1;if(!rt(h)||!m||st(h)){n.A(2);break}return u(n,l(b.filter(function(p){return p.h}),!0),3);case 3:jt(a),b=b.filter(function(p){return!p.h});case 2:if(m){n.A(0);break}return u(n,l(b,!1),5);case 5:jt(a),z(n)}})}
769
- function ot(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new ms,u(f,b.init(),2);case 2:return u(f,os(b),3);case 3:return c=f.h,d=new Fs("manifest",c.path.Ea,c.path.aa,a),u(f,b.destroy(),4);case 4:return e=new dt,u(f,e.remove(d.toString()),0)}})}
770
- function pt(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A;return L(function(F){switch(F.g){case 1:return e=new ms,f=Rr(b),g=!1,m=0,B(F,2,3),u(F,e.init(),5);case 5:return u(F,os(e),6);case 6:return k=F.h,u(F,k.aa.addSegments([c]),7);case 7:return n=F.h,h=n[0],d(),u(F,bt(),8);case 8:return m=F.h,d(),u(F,k.aa.getManifests([a]),9);case 9:p=F.h;d();l=p[0];t=!0;v=r(l.streams);for(w=v.next();!w.done;w=v.next())for(y=w.value,x=r(y.segments),D=x.next();!D.done;D=x.next())C=D.value,C.pendingSegmentRefId==
771
- f&&(C.dataKey=h,C.pendingSegmentRefId=void 0),C.pendingInitSegmentRefId==f&&(C.initSegmentKey=h,C.pendingInitSegmentRefId=void 0),C.pendingSegmentRefId&&(t=!1),C.pendingInitSegmentRefId&&(t=!1);l.size+=c.data.byteLength;t&&(l.isIncomplete=!1);return u(F,k.aa.updateManifest(a,l),10);case 10:g=!0,d();case 3:return xa(F),u(F,e.destroy(),11);case 11:ct.release(m);ya(F,4);break;case 2:return A=E(F),u(F,ot(a),12);case 12:if(!k||g||!h){F.A(13);break}return u(F,k.aa.removeSegments([h],function(){}),13);case 13:throw A;
772
- case 4:return F["return"](l)}})}
773
- function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,D,C,A,F,G,H,J,I,K,P,R,da,Y;return L(function(aa){switch(aa.g){case 1:return c={width:Infinity,height:Infinity},Qd(a,b.restrictions,c),u(aa,Td(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ed(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ce(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=p.value,
774
- d.push(de(t));v=r(a.imageStreams);for(w=v.next();!w.done;w=v.next())y=w.value,d.push(ee(y));return u(aa,b.offline.trackSelectionCallback(d),3);case 3:x=aa.h;D=a.presentationTimeline.getDuration();C=0;A=r(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,C+=H;B(aa,4);return u(aa,b.offline.downloadSizeCallback(C),6);case 6:J=aa.h;if(!J)throw new N(2,9,9014);wa(aa,5);break;case 4:I=E(aa);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;da=r(x);for(F=
775
- da.next();!F.done;F=da.next())Y=F.value,"variant"==Y.type&&K.add(Y.id),"text"==Y.type&&P.add(Y.id),"image"==Y.type&&R.add(Y.id);a.variants=a.variants.filter(function(za){return K.has(za.id)});a.textStreams=a.textStreams.filter(function(za){return P.has(za.id)});a.imageStreams=a.imageStreams.filter(function(za){return R.has(za.id)});tt(a);z(aa)}})}
776
- function mt(a,b,c,d,e,f){var g=Us(c,b,d),h=e.offline.progressCallback;Xr(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Lf(a,"cenc",t)});var k=rt(b)&&!st(b),l=null;k&&(l=ut.get(a.i.keySystem));for(var m=new Xs,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())Zs(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())Ys(m,n.value);m=vt(f,m,b);f=m.streams;m=m.be;p=a.i;n=e.offline.usePersistentLicense;
777
- p&&n&&(p.initData=[]);return{Jf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.fc(),streams:f,sessionIds:n?Rf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},be:m}}function rt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
778
- function st(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function qt(a,b,c,d){b.expiration=c.fc();c=Rf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(rt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return wt(this,xt(this,a))};
779
- function xt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ht();c=Gs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ms;va(k);return u(k,e.init(),4);case 4:return u(k,qs(e,d.Ea(),d.aa()),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([yt(a,h,e),zt(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
780
- function At(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Vc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Vc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function yt(a,b,c){return L(function(d){return u(d,Bt(a.R,a.m.drm,c,b),0)})}
781
- function zt(a,b,c){function d(){}var e=Ct(c);Ws(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Yf=function(){return wt(this,Dt(this))};
782
- function Dt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return ht(),b=a.R,c=a.m.drm,d=new ms,e=!1,va(n),u(n,d.init(),4);case 4:f=[],rs(d,function(p){return f.push(p)}),g=r(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,Rs(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 xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
783
- q.list=function(){return wt(this,Et())};function Et(){var a,b,c;return L(function(d){switch(d.g){case 1:return ht(),a=[],b=new ms,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ps(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=Ws(new Fs("manifest",e.Ea,e.aa,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
784
- function it(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.R,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},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),jt(a),u(l,c.start(b,
785
- g),2);if(3!=l.g)return h=l.h,jt(a),k=Ft(h),u(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);jt(a);if(e)throw e;return l["return"](h)})}function kt(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new uf({sb:a.R,onError:c,Tc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,zf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Mf(e),3);case 3:return u(f,Kf(e),4);case 4:return f["return"](e)}})}
786
- function vt(a,b,c){var d=new Map,e=Ft(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Gt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),be:Array.from(d.values())}}
787
- function Gt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
788
- tilesLayout:d.tilesLayout};Ht(d,c.presentationTimeline.Xa(),function(g){var h=Rr(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=$s(b,d.id)*l;l=Ur(a.Cb,l);e.set(h,new Qr(g,l,d.id,!1))}g.g&&(k=Rr(g.g),e.has(k)||(l=.5*$s(b,d.id),l=Ur(a.Cb,l),e.set(k,new Qr(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
789
- pendingSegmentRefId:h,dataKey:0})});return f}function Ht(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 jt(a){if(a.K.g)throw new N(2,9,7001);}function ht(){if(!et())throw new N(2,9,9E3);}function wt(a,b){return L(function(c){if(1==c.g)return a.oc.push(b),va(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);ob(a.oc,b);return ya(c,0)})}function gt(a,b){var c=b.promise;a.oc.push(c);return b["finally"](function(){ob(a.oc,c)})}
790
- function Ct(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
791
- function Bt(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=ss(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:At(d,!1),videoCapabilities:At(d,!0)}});return u(h,Rs(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)})}
792
- function Ft(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
793
- function tt(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",dt);dt.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new ms,va(b),u(b,ts(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};dt.prototype.list=dt.prototype.list;
794
- dt.prototype.removeEmeSessions=dt.prototype.Yf;dt.prototype.remove=dt.prototype.remove;dt.prototype.getStoreInProgress=dt.prototype.yf;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.hc;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
795
- var ct=new at,ut=(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");
796
- Fm.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,Se:a},d=r(mb(Kt)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ga;if(e.item.priority<c.priority){Kt.splice(f,0,c);return}}Kt.push(c)}M("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=r(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Se()}catch(c){Xa("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
797
- function St(){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}}),
798
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Tt);document.addEventListener("webkitfullscreenerror",Tt);document.addEventListener("mozfullscreenchange",Tt);document.addEventListener("mozfullscreenerror",Tt);document.addEventListener("MSFullscreenChange",Tt);document.addEventListener("MSFullscreenError",Tt)}}
799
- function Tt(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)}It.Fullscreen=Rt;Rt.install=St;Jt(St);function Ut(){}function Vt(){}It.MathRound=Ut;Ut.install=Vt;Jt(Vt);function Wt(){}function Xt(){if(zd()||Ad()||yd("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Yt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Zt}
800
- function Zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y;return L(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!ud()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=vd(g),!h)||a.audio&&(k=a.audio.contentType,
801
- l=vd(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));w={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
802
- n.length&&(w.audioCapabilities=n);p.length&&(w.videoCapabilities=p);B(x,3);return u(x,navigator.requestMediaKeySystemAccess(m.keySystem,[w]),5);case 5:y=x.h;wa(x,4);break;case 3:E(x);case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return x["return"](b)}})}It.MediaCapabilities=Wt;Wt.install=Xt;var Yt=null;Wt.originalMcap=Yt;Jt(Xt,-1);function $t(){}function au(){var a=Bd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?bu():a?(cu(),12>=a?(du(),eu()):du()):(yd("Tizen 2")||yd("Tizen 3")||yd("Tizen 4"))&&fu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&gu()}
803
- function du(){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 eu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
804
- function fu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Xc(b)&&a(b)}}function bu(){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)}}
805
- function gu(){var a=MediaSource.isTypeSupported;yd("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)})}It.MediaSource=$t;$t.install=au;Jt(au);function hu(){}function iu(){screen.orientation||void 0!=window.orientation&&ju()}function ju(){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 ku;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}It.Orientation=hu;
806
- hu.install=iu;function ku(){Re.call(this);this.type="";this.angle=0}ra(ku,Re);
807
- ku.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)};
808
- ku.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Jt(iu);function lu(){}function mu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=nu,window.MediaKeys=ou,window.MediaKeySystemAccess=pu,navigator.requestMediaKeySystemAccess=qu)}function qu(a,b){try{var c=new pu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
809
- function nu(a){var b=this.mediaKeys;b&&b!=a&&ru(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ru(a,this):Promise.resolve()}function su(a){a=Ob(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Dc(a.subarray(4),!0);a=Gc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Pb(a);this.dispatchEvent(b)}It.PatchedMediaKeysApple=lu;lu.install=mu;
810
- function pu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(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=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
811
- k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(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;}
812
- pu.prototype.createMediaKeys=function(){var a=new ou(this.keySystem);return Promise.resolve(a)};pu.prototype.getConfiguration=function(){return this.g};function ou(a){this.g=new WebKitMediaKeys(a);this.h=new jf}ou.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new tu(this.g,a)};ou.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
813
- function ru(a,b){a.h.vb();if(!b)return Promise.resolve();a.h.C(b,"webkitneedkey",su);try{return yi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function tu(a){Re.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new jf;this.sessionId="";this.expiration=NaN;this.closed=new zc;this.keyStatuses=new uu}ra(tu,Re);q=tu.prototype;
814
- q.generateRequest=function(a,b){var c=this;this.g=new zc;try{var d=this.l.createSession("video/mp4",Ob(b));this.j=d;this.sessionId=d.sessionId||"";this.h.C(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",Pb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.h.C(d,"webkitkeyadded",function(){c.i&&(vu(c,"usable"),c.i.resolve(),c.i=null)});this.h.C(d,"webkitkeyerror",function(){var e=
815
- 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:vu(c,"output-not-allowed");break;default:vu(c,"internal-error")}});vu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
816
- q.update=function(a){this.i=new zc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.vb()}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 vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
817
- function uu(){this.size=0;this.g=void 0}q=uu.prototype;q.forEach=function(a){this.g&&a(this.g,eg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=eg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Jt(mu);function wu(){}function xu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=yu,window.MediaKeySystemAccess=zu,navigator.requestMediaKeySystemAccess=Au,HTMLMediaElement.prototype.setMediaKeys=Bu)}function Au(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
818
- function Cu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Pb(ho(a.initData));this.dispatchEvent(b)}}It.PatchedMediaKeysMs=wu;wu.install=xu;
819
- function zu(a,b){this.keySystem=a;for(var c=!1,d=r(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=r(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=
820
- !0));if(e.videoCapabilities)for(h=r(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;}
821
- zu.prototype.createMediaKeys=function(){var a=new yu(this.keySystem);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.g};function Bu(a){var b=this.mediaKeys;b&&b!=a&&Du(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Du(a,this):Promise.resolve()}function yu(a){this.g=new MSMediaKeys(a);this.h=new jf}
822
- yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Eu(this.g,a)};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Du(a,b){a.h.vb();if(!b)return Promise.resolve();a.h.C(b,"msneedkey",Cu);try{return yi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
823
- function Eu(a){Re.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new jf;this.sessionId="";this.expiration=NaN;this.closed=new zc;this.keyStatuses=new Fu}ra(Eu,Re);q=Eu.prototype;
824
- q.generateRequest=function(a,b){var c=this;this.g=new zc;try{this.j=this.l.createSession("video/mp4",Ob(b),null),this.h.C(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",Pb(d.message));d=new Q("message",d);c.dispatchEvent(d)}),this.h.C(this.j,"mskeyadded",function(){c.g?(Gu(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Gu(c,"usable"),c.i.resolve(),c.i=null)}),this.h.C(this.j,"mskeyerror",
825
- 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:Gu(c,"output-not-allowed");break;default:Gu(c,"internal-error")}}),Gu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
826
- q.update=function(a){this.i=new zc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.vb()}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 Gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
827
- function Fu(){this.size=0;this.g=void 0}q=Fu.prototype;q.forEach=function(a){this.g&&a(this.g,eg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=eg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Jt(xu);function Hu(){}function Iu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ju,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ku,window.MediaKeys=Lu,window.MediaKeySystemAccess=Mu)}function Ju(){return Promise.reject(Error("The key system specified is not supported."))}
828
- function Ku(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}It.PatchedMediaKeysNop=Hu;Hu.install=Iu;function Lu(){throw new TypeError("Illegal constructor.");}Lu.prototype.createSession=function(){};Lu.prototype.setServerCertificate=function(){};function Mu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Mu.prototype.getConfiguration=function(){};Mu.prototype.createMediaKeys=function(){};Jt(Iu,-10);function Nu(){}function Ou(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Pu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Qu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ru;window.MediaKeys=Su;window.MediaKeySystemAccess=Tu}}
829
- function Uu(a){var b=Pu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Qu(a,b){try{var c=new Tu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ru(a){var b=this.mediaKeys;b&&b!=a&&Vu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Vu(a,this);return Promise.resolve()}It.PatchedMediaKeysWebkit=Nu;Nu.install=Ou;
830
- function Tu(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=r(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=r(g.audioCapabilities),
831
- 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=r(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"]):
832
- 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;}Tu.prototype.createMediaKeys=function(){var a=new Su(this.g);return Promise.resolve(a)};Tu.prototype.getConfiguration=function(){return this.h};function Su(a){this.l=a;this.g=null;this.h=new jf;this.i=[];this.j=new Map}
833
- function Vu(a,b){a.g=b;a.h.vb();var c=Pu;b&&(a.h.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Pb(d.initData);a.g.dispatchEvent(e)}),a.h.C(b,c+"keymessage",function(d){var e=Wu(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.h.C(b,c+"keyadded",function(d){if(d=Wu(a,d.sessionId))Xu(d,"usable"),
834
- d.g&&d.g.resolve(),d.g=null}),a.h.C(b,c+"keyerror",function(d){var e=Wu(a,d.sessionId);e&&e.handleError(d)}))}Su.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 Yu(b,this.l,a);this.i.push(a);return a};Su.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
835
- function Wu(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 Yu(a,b,c){Re.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new zc;this.keyStatuses=new Zu}ra(Yu,Re);q=Yu.prototype;
836
- 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?Xu(this,"output-restricted"):1==b?Xu(this,"expired"):Xu(this,"internal-error"))};
837
- function $u(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=Ob(Gc("LOAD_SESSION|"+c));else{var e=Gc("PERSISTENT|");d=Pc(e,b)}else d=Ob(b)}catch(g){return Promise.reject(g)}a.h=new zc;var f=Uu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).W(.01)}return a.h}
838
- function av(a,b,c){if(a.g)a.g.then(function(){return av(a,b,c)})["catch"](function(){return av(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Cc(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=Mc(e.keys[0].k);e=Mc(e.keys[0].kid)}else d=Ob(c),e=null;var f=Uu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
839
- function Xu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return $u(this,b,null)};q.load=function(a){return"persistent-license"==this.l?$u(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new zc;av(this,b,a);return b};
840
- 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=Uu("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 Zu(){this.size=0;this.g=void 0}q=Zu.prototype;q.forEach=function(a){this.g&&a(this.g,eg.value())};q.get=function(a){if(this.has(a))return this.g};
841
- q.has=function(a){var b=eg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Pu="";Jt(Ou);function bv(){}function cv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dv,Object.defineProperty(a,"disablePictureInPicture",{get:ev,set:fv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=gv,document.addEventListener("webkitpresentationmodechanged",hv,!0))}}
842
- function hv(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)}
843
- function dv(){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 gv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
844
- function ev(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function fv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}It.PiPWebkit=bv;bv.install=cv;Jt(cv);function iv(){}function jv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=kv))}function kv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}It.RandomUUID=iv;iv.install=jv;Jt(jv);function lv(){}function mv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=nv)}function nv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}It.StorageEstimate=lv;lv.install=mv;Jt(mv);function ov(){}function pv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}It.VideoPlayPromise=ov;ov.install=pv;Jt(pv);function qv(){}function rv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=sv)}}function sv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}It.VideoPlaybackQuality=qv;qv.install=rv;Jt(rv);function tv(){}function uv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vv;else if(6==b)a=wv;else{try{var c=!!vv(1,2,"")}catch(d){c=!1}c&&(a=vv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vv(a,b,c){return new window.TextTrackCue(a,b,c)}function wv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}It.VTTCue=tv;tv.install=uv;Jt(uv);function xv(){}xv.prototype.parseInit=function(){};xv.prototype.parseMedia=function(a,b){var c=null,d=[],e=Cc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=yv.exec(f))){var g=zv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new rb(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",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;
845
- xv.prototype.parseInit=xv.prototype.parseInit;var yv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ad["application/x-subtitle-lrc"]=function(){return new xv};function Av(){}Av.prototype.parseInit=function(){};
846
- Av.prototype.parseMedia=function(a,b){var c=Cc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){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.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=oo(g,Bv,"frameRate"),k=oo(g,Bv,"subFrameRate"),l=oo(g,Bv,"frameRateMultiplier"),
847
- m=oo(g,Bv,"tickRate"),n=oo(g,Bv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=oo(g,Cv,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Dv(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])?mo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
848
- p.next()){var v=t.value;t=new tb;var w=v.getAttribute("xml:id");if(w){t.id=w;var y=null;e&&(y=Ev.exec(e)||Fv.exec(e));w=y?Number(y[1]):null;y=y?Number(y[2]):null;var x,D;if(x=Gv(v,l,"extent"))x=(D=Ev.exec(x))||Fv.exec(x),null!=x&&(t.width=Number(x[1]),t.height=Number(x[2]),D||(null!=w&&(t.width=100*t.width/w),null!=y&&(t.height=100*t.height/y)),t.widthUnits=D||null!=w?Jb:0,t.heightUnits=D||null!=y?Jb:0);if(v=Gv(v,l,"origin"))x=(D=Ev.exec(v))||Fv.exec(v),null!=x&&(t.viewportAnchorX=Number(x[1]),t.viewportAnchorY=
849
- Number(x[2]),D||(null!=y&&(t.viewportAnchorY=100*t.viewportAnchorY/y),null!=w&&(t.viewportAnchorX=100*t.viewportAnchorX/w)),t.viewportAnchorUnits=D||null!=w?Jb:0)}else t=null;t&&m.push(t)}if(jo(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=r(jo(f,"div"));for(p=e.next();!p.done;p=e.next())if(jo(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Hv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
850
- function Hv(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 t=null,v=r(Iv),w=v.next();!w.done&&!(t=Jv(p,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));w=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
851
- a=[];if(!w)for(var y=r(p.childNodes),x=y.next();!x.done;x=y.next())(x=Hv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;y=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||y||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Kv(p,c);y=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Lv(n,c,y,x),y=x.start,x=x.end,n=n.parentNode;null==y&&(y=0);y+=b;x=null==x?Infinity:x+b;if(!D&&0<a.length)for(y=Infinity,x=0,b=r(a),
852
- c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new rb(y,x,""),e.lineBreak=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new rb(y,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Jv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
853
- (g=Jv(l,"region",f,"")[0]);Mv(b,p,g,t,e,v,0==a.length);return b}
854
- function Mv(a,b,c,d,e,f,g){f=f||g;"rtl"==Nv(b,c,e,"direction",f)&&(a.direction="rtl");g=Nv(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=sb);(g=Nv(b,c,e,"textAlign",!0))?(a.positionAlign=Ov[g],a.lineAlign=Pv[g],a.textAlign=Db[g.toUpperCase()]):a.textAlign="start";if(g=Nv(b,c,e,"displayAlign",!0))a.displayAlign=Eb[g.toUpperCase()];if(g=Nv(b,c,e,"color",f))a.color=g;if(g=Nv(b,c,e,"backgroundColor",
855
- f))a.backgroundColor=g;if(g=Nv(b,c,e,"border",f))a.border=g;if(g=Nv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Nv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Nv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Nv(b,c,e,"lineHeight",f))&&g.match(Qv)&&(a.lineHeight=g);(g=Nv(b,c,e,"fontSize",f))&&(g.match(Qv)||g.match(Rv))&&(a.fontSize=g);if(g=Nv(b,c,e,"fontStyle",f))a.fontStyle=Ib[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
856
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Nv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Qv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Qv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Nv(b,c,e,"letterSpacing",f))&&d.match(Qv)&&(a.letterSpacing=d);(d=Nv(b,c,e,"linePadding",f))&&d.match(Qv)&&(a.linePadding=d);if(f=Nv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Gv(c,e,"textDecoration"))&&Sv(a,c);(b=
857
- Tv(b,e,"textDecoration"))&&Sv(a,b)}
858
- function Sv(a,b){for(var c=r(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")&&ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
859
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ob(a.textDecoration,"overline")}}function Nv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Tv(a,c,d))?a:e?Gv(b,c,d):null}function Gv(a,b,c){if(!a)return null;var d=oo(a,Cv,c);return d?d:Uv(a,b,c)}function Tv(a,b,c){var d=oo(a,Cv,c);return d?d:Uv(a,b,c)}
860
- function Uv(a,b,c){a=Jv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=no(a[e],"urn:ebu:tt:style",c);f||(f=oo(a[e],Cv,c));f||(f=Tv(a[e],b,c));f&&(d=f)}return d}
861
- function Jv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?no(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(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 Lv(a,b,c,d){a=Kv(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}}
862
- function Kv(a,b){var c=Vv(a.getAttribute("begin"),b),d=Vv(a.getAttribute("end"),b),e=Vv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
863
- function Vv(a,b){var c=null;if(Wv.test(a)){c=Wv.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(Xv.test(a))c=Yv(Xv,a);else if(Zv.test(a))c=Yv(Zv,a);else if($v.test(a))c=$v.exec(a),c=Number(c[1])/b.frameRate;else if(aw.test(a))c=aw.exec(a),c=Number(c[1])/b.g;else if(bw.test(a))c=Yv(bw,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
864
- function Yv(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",Av);Av.prototype.parseMedia=Av.prototype.parseMedia;Av.prototype.parseInit=Av.prototype.parseInit;function Dv(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]))}
865
- var Ev=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Rv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Qv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Fv=/^(\d+)px (\d+)px$/,Wv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Zv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,$v=/^(\d*(?:\.\d*)?)f$/,aw=/^(\d*(?:\.\d*)?)t$/,bw=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Pv={left:yb,center:"center",right:"end",start:yb,end:"end"},Ov=
866
- {left:"line-left",center:"center",right:"line-right"},Bv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Iv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ad["application/ttml+xml"]=function(){return new Av};function cw(){this.u=new Av}cw.prototype.parseInit=function(a){var b=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).box("minf",sg).box("stbl",sg).V("stsd",ug).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};cw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new og).box("mdat",vg(function(f){d=!0;e=e.concat(c.u.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;
867
- cw.prototype.parseInit=cw.prototype.parseInit;ad['application/mp4; codecs="stpp"']=function(){return new cw};ad['application/mp4; codecs="stpp.ttml"']=function(){return new cw};ad['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new cw};ad['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new cw};function dw(){}dw.prototype.parseInit=function(){};
868
- dw.prototype.parseMedia=function(a,b){var c=Cc(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=ew(new Aq(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=
869
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Aq(g);var h=new tb;Dq(g);Bq(g);for(var k=Dq(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))?
870
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Bq(g);k=Dq(g)}f.push(h)}e=new Map;fw(e);g=[];d=r(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 rb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
871
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[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=Bb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
872
- !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 Aq(h[0]);m=ew(k);t=Cq(k,/[ \t]+--\x3e[ \t]+/g);n=ew(k);if(null==m||null==t||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=
873
- ""):h=new rb(m,n,"");gw(p,h,e);Bq(k);for(m=Dq(k);m;)hw(h,m,f),Bq(k),m=Dq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function fw(a){for(var b=r(Object.entries(Gb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new rb(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Hb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new rb(0,0,""),e.backgroundColor=d,a.set(c,e)}
874
- function gw(a,b,c){0===c.size&&fw(c);a=iw(a);var d=Ao("<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=r(d);for(d=a.next();!d.done;d=a.next())jw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
875
- function iw(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 kw(a,b){return a&&0<a.length?a:b}
876
- function jw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(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=kw(h.backgroundColor,e.backgroundColor),e.color=kw(h.color,e.color),e.fontFamily=kw(h.fontFamily,e.fontFamily),e.fontSize=kw(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=
877
- "italic";break;case "u":e.textDecoration.push("underline")}}if(qo(a))for(f=!0,d=r(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=r(a.childNodes),a=b.next();!a.done;a=b.next())jw(a.value,e,c,d)}
878
- function hw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=vb:a.textAlign=Db[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"==
879
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=lw(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=Fb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=xb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Fb[c[2].toUpperCase()])}function lw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
880
- function ew(a){a=Cq(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",dw);dw.prototype.parseMedia=dw.prototype.parseMedia;dw.prototype.parseInit=dw.prototype.parseInit;ad["text/vtt"]=function(){return new dw};ad['text/vtt; codecs="vtt"']=function(){return new dw};ad['text/vtt; codecs="wvtt"']=function(){return new dw};function mw(){this.g=null}mw.prototype.parseInit=function(a){var b=this,c=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).V("mdhd",function(d){d=Jh(d.reader,d.version);b.g=d.timescale}).box("minf",sg).box("stbl",sg).V("stsd",ug).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
881
- mw.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 og).box("moof",sg).box("traf",sg).V("tfdt",function(A){g=!0;c=Ih(A.reader,A.version).rd}).V("tfhd",function(A){l=Hh(A.reader,A.flags).ke}).V("trun",function(A){h=!0;d=Kh(A.reader,A.version,A.flags).Ce}).box("mdat",vg(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 lg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.Td||l,w=t.Xc?
882
- c+t.Xc:m;m=w+(v||0);var y=0;do{var x=n.O();y+=x;var D=n.O(),C=null;"vttc"==wg(D)?8<x&&(C=n.hb(x-8)):n.skip(x-8);v&&C&&(x=nw(C,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(x))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Zb)};function nw(a,b,c){var d,e,f;(new og).box("payl",vg(function(g){d=Cc(g)})).box("iden",vg(function(g){e=Cc(g)})).box("sttg",vg(function(g){f=Cc(g)})).parse(a);return d?ow(d,e,f,b,c):null}
883
- function ow(a,b,c,d,e){d=new rb(d,e,"");gw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Aq(c),b=Dq(a);b;)hw(d,b,[]),Bq(a),b=Dq(a);return d}M("shaka.text.Mp4VttParser",mw);mw.prototype.parseMedia=mw.prototype.parseMedia;mw.prototype.parseInit=mw.prototype.parseInit;ad['application/mp4; codecs="wvtt"']=function(){return new mw};function pw(){}pw.prototype.parseInit=function(){};pw.prototype.parseMedia=function(a){var b=Cc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Aq(c[0]),e=qw(d),f=Cq(d,/,/g);d=qw(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 rb(e,d,c.slice(1).join("\n").trim()))}return a};
884
- function qw(a){a=Cq(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",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;pw.prototype.parseInit=pw.prototype.parseInit;ad["text/x-subviewer"]=function(){return new pw};function rw(){this.u=new dw}rw.prototype.parseInit=function(){};rw.prototype.parseMedia=function(a,b){var c=Cc(a);c=sw(c);c=Ob(Gc(c));return this.u.parseMedia(c,b)};function sw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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",rw);rw.srt2webvtt=sw;rw.prototype.parseMedia=rw.prototype.parseMedia;
885
- rw.prototype.parseInit=rw.prototype.parseInit;ad["text/srt"]=function(){return new rw};function tw(){}tw.prototype.parseInit=function(){};
886
- tw.prototype.parseMedia=function(a){var b="",c="";a=Cc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=uw.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=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=vw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(ww);else if("Style"==e){e=f.split(ww);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
887
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={od:e.od},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(ww);else if("Dialogue"==f){g=g.split(ww);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xw(f.Start);var k=xw(f.End);g=new rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.od=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.od}}(e)))&&yw(g,f);d.push(g)}return d};
888
- function yw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=zw(c))a.color=c;if(c=b.BackColour)if(c=zw(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=zb;a.textAlign="start";break;case 2:a.displayAlign=zb;a.textAlign=vb;break;case 3:a.displayAlign=zb;a.textAlign="end";
889
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=vb;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=vb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
890
- function zw(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 xw(a){a=Aw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",tw);tw.prototype.parseMedia=tw.prototype.parseMedia;tw.prototype.parseInit=tw.prototype.parseInit;var uw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vw=/^\s*([^:]+):\s*(.*)/,ww=/\s*,\s*/,Aw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
891
- ad["text/x-ssa"]=function(){return new tw};/*
745
+ function Fs(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=
746
+ e.value,g=Gs(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=Gs(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}
747
+ function Gs(a,b,c){var d=b.segments.map(function(e){return Hs(a,e)});c.Fb(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,
748
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Hs(a,b){var c=new Bs("segment",a.h,a.g,b.dataKey);return new ki(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Is(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
749
+ function Is(a,b){var c=new Bs("segment",a.h,a.g,b);return new ii(function(){return[c.toString()]},0,null)};function Js(){this.g=null}r=Js.prototype;r.configure=function(){};
750
+ 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=Cs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new is;ua(m);return u(m,e.init(),4);case 4:return u(m,ms(e,d.Aa(),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 Ds(d.Aa(),d.la()),l=Es(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
751
+ 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 is,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ms(e,d.Aa(),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.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:E(m),m.B(3)}})};
752
+ eg["application/x-offline-manifest"]=function(){return new Js};function Ks(){}function Ls(a){var b=Cs(a);b&&"manifest"==b.g?(a={uri:a,pe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=He(a)):a=b&&"segment"==b.g?Ms(b.key(),b):Fe(new N(2,1,9004,a));return a}
753
+ function Ms(a,b){var c=new is;return He(void 0).$(function(){return c.init()}).$(function(){return ms(c,b.Aa(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Ks);Ks.plugin=Ls;Se("offline",Ls);function Ns(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),y=v.next();!y.done;y=v.next())if(y=y.value,Os(y.info,p)){y.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.B(4);break}g=f.value;h=Ps(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
754
+ function Ps(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new rf({mb:b,onError:function(){},Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,zf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Jf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
755
+ 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,Kf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
756
+ function Os(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Qs(a,b,c){var d=b.presentationTimeline.getDuration();b=Rs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ss(a,b){var c=Es(new Ds(a.Aa(),a.la()),b),d=b.appMetadata||{};c=Rs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
757
+ function Rs(a){var b=[],c=ge(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Yd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Zd(c.value));return b};function Ts(){this.g={}}function Us(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Vs(a,b){a.g[b.id]=b.bandwidth||2048}function Ws(a,b){var c=a.g[b];null==c&&(c=0);return c};function Xs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.bc()):(this.h=vk(),this.g=new Re);this.i=[];this.j=[];var c=!a;this.l=new bf(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Tr(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.B(4);break}return u(k,b.g.destroy(),4);
758
+ case 4:b.h=null,b.g=null,z(k)}})})}function Ys(){if(od())a:{var a=t(js.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=Xs.prototype;r.destroy=function(){return this.l.destroy()};
759
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return xk(this.h,a)};r.getConfiguration=function(){var a=vk();xk(a,this.h,vk());return a};r.bc=function(){return this.g};
760
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Sr(this.g);this.j.push(f);b=Zs(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,dg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Sb(h))})},e,f);var g=new Ee(b,function(){return Tr(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("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.");
761
+ return g.promise.then(h)};return $s(this,g)};r.lf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
762
+ function Zs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w,x,D,B;return L(function(A){switch(A.g){case 1:return at(),h=g=null,k=new is,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,bt(a,b,g,e),6);case 6:p=A.h;ct(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.lb();if(!q)throw new N(2,9,9005,b);return u(A,dt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;ct(a);if(n)throw n;return u(A,et(p,e),8);case 8:return u(A,k.init(),9);case 9:return ct(a),u(A,ks(k),10);case 10:return l=A.h,ct(a),v=ft(h,
763
+ p,b,c,e,f),y=v.yf,w=v.Ud,u(A,l.la.addManifests([y]),11);case 11:x=A.h;ct(a);m=x[0];ct(a);if(n)throw n;return u(A,gt(a,w,m,y,f,e,l.la,p,h),12);case 12:return ct(a),D=new Bs("manifest",l.path.Aa,l.path.la,m),A["return"](Ss(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=E(A);if(null==m){A.B(18);break}return u(A,ht(m),18);case 18:throw n||B;}})}
764
+ function gt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,J,I,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(A);for(J=H.next();!J.done;G={ab:G.ab},J=H.next())G.ab=J.value,I=Pr(G.ab,f),K=G.ab.i,P=G.ab.h,R=function(aa){return function(Y){var Da,Fa,ya;return L(function(Ia){if(1==Ia.g)return u(Ia,g.addSegments([{data:Y}]),2);Da=Ia.h;ct(a);Fa=aa.ab.g;ya=Or(Fa);l[ya]=Da[0];m+=Y.byteLength;z(Ia)})}}(G),Vr(e,G.ab.groupId,I,K,P,R);return u(ba,
765
+ Xr(e),2)}if(!F)return ba.B(0);ct(a);it(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};p=!1;C(B,2);if(!jt(h)||!p||kt(h)){B.B(4);break}return u(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return ct(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(B,lt(g,c,d,q,v,function(){return ct(a)}),6);case 6:ct(a);case 4:if(p){B.B(7);break}return u(B,n(b,!1),8);case 8:return ct(a),y=l,w=m,l={},m=0,u(B,lt(g,c,d,y,w,function(){return ct(a)}),9);case 9:ct(a);case 7:va(B,0);break;case 2:return x=
766
+ E(B),D=Object.values(l),u(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function ht(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new is,u(f,b.init(),2);case 2:return u(f,ks(b),3);case 3:return c=f.h,d=new Bs("manifest",c.path.Aa,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new Xs,u(f,e.remove(d.toString()),0)}})}
767
+ function lt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:g=!1;C(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
768
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=E(x),u(x,ht(b),5);case 5:if(g){x.B(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
769
+ function et(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(Y,Od(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Yd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
770
+ d.push(Zd(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push($d(w));return u(Y,b.offline.trackSelectionCallback(d),3);case 3:x=Y.h;D=a.presentationTimeline.getDuration();B=0;A=t(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,B+=H;C(Y,4);return u(Y,b.offline.downloadSizeCallback(B),6);case 6:J=Y.h;if(!J)throw new N(2,9,9014);va(Y,5);break;case 4:I=E(Y);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;ba=t(x);for(F=ba.next();!F.done;F=
771
+ ba.next())aa=F.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&R.add(aa.id);a.variants=a.variants.filter(function(Da){return K.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return R.has(Da.id)});mt(a);z(Y)}})}
772
+ function ft(a,b,c,d,e,f){var g=Qs(c,b,d),h=e.offline.progressCallback;Ur(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&If(a,"cenc",q)});var k=jt(b)&&!kt(b),l=null;k&&(l=nt.get(a.g.keySystem));for(var m=new Ts,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Vs(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Us(m,n.value);m=ot(f,m,b);f=m.streams;m=m.Ud;p=a.g;n=e.offline.usePersistentLicense;
773
+ p&&n&&(p.initData=[]);return{yf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ac(),streams:f,sessionIds:n?Of(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ud:m}}function jt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
774
+ function kt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function it(a,b,c,d){b.expiration=c.ac();c=Of(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(jt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return pt(this,qt(this,a))};
775
+ function qt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:at();c=Cs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new is;ua(k);return u(k,e.init(),4);case 4:return u(k,ms(e,d.Aa(),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([rt(a,h,e),st(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
776
+ function tt(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:Nc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Nc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function rt(a,b,c){return L(function(d){return u(d,ut(a.g,a.h.drm,c,b),0)})}
777
+ function st(a,b,c){function d(){}var e=vt(c);Ss(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Mf=function(){return pt(this,wt(this))};
778
+ function wt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return at(),b=a.g,c=a.h.drm,d=new is,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],ns(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ns(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.B(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
779
+ r.list=function(){return pt(this,xt())};function xt(){var a,b,c;return L(function(d){switch(d.g){case 1:return at(),a=[],b=new is,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ls(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=Ss(new Bs("manifest",e.Aa,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
780
+ function bt(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,modifyManifestRequest:function(){},modifySegmentRequest:function(){},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),ct(a),u(l,c.start(b,
781
+ g),2);if(3!=l.g)return h=l.h,ct(a),k=yt(h),u(l,Promise.all(mf(k,function(m){return m.createSegmentIndex()})),3);ct(a);if(e)throw e;return l["return"](h)})}function dt(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new rf({mb:a.g,onError:c,Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,wf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Jf(e),3);case 3:return u(f,Hf(e),4);case 4:return f["return"](e)}})}
782
+ function ot(a,b,c){var d=new Map,e=yt(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=zt(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ud:Array.from(d.values())}}
783
+ function zt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
784
+ tilesLayout:d.tilesLayout};At(d,c.presentationTimeline.Qa(),function(g){var h=Or(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=Ws(b,d.id)*l;l=Rr(a.g,l);e.set(h,new Nr(g,l,d.id,!1))}g.g&&(k=Or(g.g),e.has(k)||(l=.5*Ws(b,d.id),l=Rr(a.g,l),e.set(k,new Nr(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
785
+ pendingSegmentRefId:h,dataKey:0})});return f}function At(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 ct(a){if(a.l.g)throw new N(2,9,7001);}function at(){if(!Ys())throw new N(2,9,9E3);}function pt(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return xa(c,0)})}function $s(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
786
+ function vt(a){var b=new Set;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.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
787
+ function ut(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=os(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:tt(d,!1),videoCapabilities:tt(d,!0)}});return u(h,Ns(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)})}
788
+ function yt(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}
789
+ function mt(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",Xs);Xs.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new is,ua(b),u(b,ps(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Xs.prototype.list=Xs.prototype.list;
790
+ Xs.prototype.removeEmeSessions=Xs.prototype.Mf;Xs.prototype.remove=Xs.prototype.remove;Xs.prototype.getStoreInProgress=Xs.prototype.lf;Xs.prototype.store=Xs.prototype.store;Xs.prototype.getNetworkingEngine=Xs.prototype.bc;Xs.prototype.getConfiguration=Xs.prototype.getConfiguration;Xs.prototype.configure=Xs.prototype.configure;Xs.prototype.destroy=Xs.prototype.destroy;Xs.support=Ys;
791
+ var nt=(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");
792
+ Am.offline=Ys;function Bt(){}function Ct(a,b){for(var c={priority:b||0,Je:a},d=0;d<Dt.length;d++)if(Dt[d].priority<c.priority){Dt.splice(d,0,c);return}Dt.push(c)}M("shaka.polyfill",Bt);Bt.register=Ct;Bt.installAll=function(){for(var a=t(Dt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Je()}catch(c){Ua("Error installing polyfill!",c)}}};var Dt=[];function Et(){}function Ft(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Gt(b.value)}function Gt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Bt.Aria=Et;Et.install=Ft;Ct(Ft);function Ht(){}function It(){Jt()}Bt.EncryptionScheme=Ht;Ht.install=It;Ct(It,-2);function Kt(){}
793
+ function Lt(){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}}),
794
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Mt);document.addEventListener("webkitfullscreenerror",Mt);document.addEventListener("mozfullscreenchange",Mt);document.addEventListener("mozfullscreenerror",Mt);document.addEventListener("MSFullscreenChange",Mt);document.addEventListener("MSFullscreenError",Mt)}}
795
+ function Mt(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)}Bt.Fullscreen=Kt;Kt.install=Lt;Ct(Lt);function Nt(){}function Ot(){}Bt.MathRound=Nt;Nt.install=Ot;Ct(Ot);function Pt(){}function Qt(){if(ud()||vd()||sd("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Rt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=St}
796
+ function St(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!od()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=pd(g),!h)||a.audio&&(k=a.audio.contentType,
797
+ l=pd(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["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));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
798
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(x,3);return u(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:E(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Bt.MediaCapabilities=Pt;Pt.install=Qt;var Rt=null;Pt.originalMcap=Rt;Ct(Qt,-1);function Tt(){}function Ut(){var a=wd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Vt():a?(Wt(),12>=a?(Xt(),Yt()):Xt()):(sd("Tizen 2")||sd("Tizen 3")||sd("Tizen 4"))&&Zt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&$t()}
799
+ function Xt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Yt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Wt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
800
+ function Zt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Qc(b)[0]&&a(b)}}function Vt(){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)}}
801
+ function $t(){var a=MediaSource.isTypeSupported;sd("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)})}Bt.MediaSource=Tt;Tt.install=Ut;Ct(Ut);function au(){}function bu(){screen.orientation||void 0!=window.orientation&&cu()}function cu(){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 du;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Bt.Orientation=au;
802
+ au.install=bu;function du(){Me.call(this);this.type="";this.angle=0}qa(du,Me);
803
+ du.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)};
804
+ du.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ct(bu);function eu(){}function fu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gu,window.MediaKeys=hu,window.MediaKeySystemAccess=iu,navigator.requestMediaKeySystemAccess=ju)}function ju(a,b){try{var c=new iu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
805
+ function gu(a){var b=this.mediaKeys;b&&b!=a&&ku(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ku(a,this):Promise.resolve()}function lu(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=vc(a.subarray(4),!0);a=yc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}Bt.PatchedMediaKeysApple=eu;eu.install=fu;
806
+ function iu(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,
807
+ 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;}
808
+ iu.prototype.createMediaKeys=function(){var a=new hu(this.keySystem);return Promise.resolve(a)};iu.prototype.getConfiguration=function(){return this.g};function hu(a){this.h=new WebKitMediaKeys(a);this.g=new df}hu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new mu(this.h,a)};hu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
809
+ function ku(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.A(b,"webkitneedkey",lu);try{return ri(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function mu(a){Me.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new df;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new nu}qa(mu,Me);r=mu.prototype;
810
+ r.generateRequest=function(a,b){var c=this;this.g=new rc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.A(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",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.A(d,"webkitkeyadded",function(){c.h&&(ou(c,"usable"),c.h.resolve(),c.h=null)});this.j.A(d,"webkitkeyerror",function(){var e=
811
+ 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:ou(c,"output-not-allowed");break;default:ou(c,"internal-error")}});ou(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
812
+ r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}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 ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
813
+ function nu(){this.size=0;this.g=void 0}r=nu.prototype;r.forEach=function(a){this.g&&a(this.g,bg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Ct(fu);function pu(){}function qu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=ru,window.MediaKeySystemAccess=su,navigator.requestMediaKeySystemAccess=tu,HTMLMediaElement.prototype.setMediaKeys=uu)}function tu(a,b){try{var c=new su(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
814
+ function vu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Gb(bo(a.initData));this.dispatchEvent(b)}}Bt.PatchedMediaKeysMs=pu;pu.install=qu;
815
+ function su(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=
816
+ !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;}
817
+ su.prototype.createMediaKeys=function(){var a=new ru(this.keySystem);return Promise.resolve(a)};su.prototype.getConfiguration=function(){return this.g};function uu(a){var b=this.mediaKeys;b&&b!=a&&wu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?wu(a,this):Promise.resolve()}function ru(a){this.h=new MSMediaKeys(a);this.g=new df}
818
+ ru.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new xu(this.h,a)};ru.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function wu(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.A(b,"msneedkey",vu);try{return ri(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
819
+ function xu(a){Me.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new df;this.sessionId="";this.expiration=NaN;this.closed=new rc;this.keyStatuses=new yu}qa(xu,Me);r=xu.prototype;
820
+ r.generateRequest=function(a,b){var c=this;this.g=new rc;try{this.i=this.l.createSession("video/mp4",Fb(b),null),this.j.A(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",Gb(d.message));d=new Q("message",d);c.dispatchEvent(d)}),this.j.A(this.i,"mskeyadded",function(){c.g?(zu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(zu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.A(this.i,"mskeyerror",
821
+ 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:zu(c,"output-not-allowed");break;default:zu(c,"internal-error")}}),zu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
822
+ r.update=function(a){this.h=new rc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}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 zu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
823
+ function yu(){this.size=0;this.g=void 0}r=yu.prototype;r.forEach=function(a){this.g&&a(this.g,bg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Ct(qu);function Au(){}function Bu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Cu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Du,window.MediaKeys=Eu,window.MediaKeySystemAccess=Fu)}function Cu(){return Promise.reject(Error("The key system specified is not supported."))}
824
+ function Du(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Bt.PatchedMediaKeysNop=Au;Au.install=Bu;function Eu(){throw new TypeError("Illegal constructor.");}Eu.prototype.createSession=function(){};Eu.prototype.setServerCertificate=function(){};function Fu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Fu.prototype.getConfiguration=function(){};Fu.prototype.createMediaKeys=function(){};Ct(Bu,-10);function Gu(){}function Hu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Iu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ju;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ku;window.MediaKeys=Lu;window.MediaKeySystemAccess=Mu}}
825
+ function Nu(a){var b=Iu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ju(a,b){try{var c=new Mu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ku(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ou(a,this);return Promise.resolve()}Bt.PatchedMediaKeysWebkit=Gu;Gu.install=Hu;
826
+ function Mu(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),
827
+ 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"]):
828
+ 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;}Mu.prototype.createMediaKeys=function(){var a=new Lu(this.g);return Promise.resolve(a)};Mu.prototype.getConfiguration=function(){return this.h};function Lu(a){this.l=a;this.h=null;this.g=new df;this.i=[];this.j=new Map}
829
+ function Ou(a,b){a.h=b;a.g.Sa();var c=Iu;b&&(a.g.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.A(b,c+"keymessage",function(d){var e=Pu(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.A(b,c+"keyadded",function(d){if(d=Pu(a,d.sessionId))Qu(d,"usable"),
830
+ d.g&&d.g.resolve(),d.g=null}),a.g.A(b,c+"keyerror",function(d){var e=Pu(a,d.sessionId);e&&e.handleError(d)}))}Lu.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 Ru(b,this.l,a);this.i.push(a);return a};Lu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
831
+ function Pu(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 Ru(a,b,c){Me.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 rc;this.keyStatuses=new Su}qa(Ru,Me);r=Ru.prototype;
832
+ 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?Qu(this,"output-restricted"):1==b?Qu(this,"expired"):Qu(this,"internal-error"))};
833
+ function Tu(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=Fb(yc("LOAD_SESSION|"+c));else{var e=yc("PERSISTENT|");d=Hc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new rc;var f=Nu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
834
+ function Uu(a,b,c){if(a.g)a.g.then(function(){return Uu(a,b,c)})["catch"](function(){return Uu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=uc(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=Dc(e.keys[0].k);e=Dc(e.keys[0].kid)}else d=Fb(c),e=null;var f=Nu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
835
+ function Qu(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 Tu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Tu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new rc;Uu(this,b,a);return b};
836
+ 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=Nu("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 Su(){this.size=0;this.g=void 0}r=Su.prototype;r.forEach=function(a){this.g&&a(this.g,bg.value())};r.get=function(a){if(this.has(a))return this.g};
837
+ r.has=function(a){var b=bg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Iu="";Ct(Hu);function Vu(){}function Wu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Xu,Object.defineProperty(a,"disablePictureInPicture",{get:Yu,set:Zu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=$u,document.addEventListener("webkitpresentationmodechanged",av,!0))}}
838
+ function av(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)}
839
+ function Xu(){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 $u(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
840
+ function Yu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Zu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Bt.PiPWebkit=Vu;Vu.install=Wu;Ct(Wu);function bv(){}function cv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=dv))}function dv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Bt.RandomUUID=bv;bv.install=cv;Ct(cv);function ev(){}function fv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=gv)}function gv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Bt.StorageEstimate=ev;ev.install=fv;Ct(fv);function hv(){}function iv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:jv})}function jv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Bt.Symbol=hv;hv.install=iv;Ct(iv);function kv(){}function lv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Bt.VideoPlayPromise=kv;kv.install=lv;Ct(lv);function mv(){}function nv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=ov)}}function ov(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Bt.VideoPlaybackQuality=mv;mv.install=nv;Ct(nv);function pv(){}function qv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=rv;else if(6==b)a=sv;else{try{var c=!!rv(1,2,"")}catch(d){c=!1}c&&(a=rv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function rv(a,b,c){return new window.TextTrackCue(a,b,c)}function sv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Bt.VTTCue=pv;pv.install=qv;Ct(qv);function tv(){}tv.prototype.parseInit=function(){};tv.prototype.parseMedia=function(a,b){var c=null,d=[],e=uc(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=uv.exec(f))){var g=vv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(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",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;
841
+ tv.prototype.parseInit=tv.prototype.parseInit;var uv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,vv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Uc["application/x-subtitle-lrc"]=function(){return new tv};function wv(){}wv.prototype.parseInit=function(){};
842
+ wv.prototype.parseMedia=function(a,b){var c=uc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){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.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=jo(g,xv,"frameRate"),k=jo(g,xv,"subFrameRate"),l=jo(g,xv,"frameRateMultiplier"),
843
+ m=jo(g,xv,"tickRate"),n=jo(g,xv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=jo(g,yv,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new zv(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])?ho(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=
844
+ p.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var w=null;e&&(w=Av.exec(e)||Bv.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,D;if(x=Cv(v,l,"extent"))x=(D=Av.exec(x))||Bv.exec(x),null!=x&&(q.width=Number(x[1]),q.height=Number(x[2]),D||(null!=y&&(q.width=100*q.width/y),null!=w&&(q.height=100*q.height/w)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=w?Ab:0);if(v=Cv(v,l,"origin"))x=(D=Av.exec(v))||Bv.exec(v),null!=x&&(q.viewportAnchorX=Number(x[1]),q.viewportAnchorY=
845
+ Number(x[2]),D||(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(eo(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(eo(f,"div"));for(p=e.next();!p.done;p=e.next())if(eo(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Dv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
846
+ function Dv(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(Ev),y=v.next();!y.done&&!(q=Fv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
847
+ a=[];if(!y)for(var w=t(p.childNodes),x=w.next();!x.done;x=w.next())(x=Dv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);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;x=Gv(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Hv(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b;x=null==x?Infinity:x+b;if(!D&&0<a.length)for(w=Infinity,x=0,b=t(a),
848
+ c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new ib(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Fv(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")&&
849
+ (g=Fv(l,"region",f,"")[0]);Iv(b,p,g,q,e,v,0==a.length);return b}
850
+ function Iv(a,b,c,d,e,f,g){f=f||g;"rtl"==Jv(b,c,e,"direction",f)&&(a.direction="rtl");g=Jv(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=jb);(g=Jv(b,c,e,"textAlign",!0))?(a.positionAlign=Kv[g],a.lineAlign=Lv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=Jv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Jv(b,c,e,"color",f))a.color=g;if(g=Jv(b,c,e,"backgroundColor",
851
+ f))a.backgroundColor=g;if(g=Jv(b,c,e,"border",f))a.border=g;if(g=Jv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Jv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Jv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Jv(b,c,e,"lineHeight",f))&&g.match(Mv)&&(a.lineHeight=g);(g=Jv(b,c,e,"fontSize",f))&&(g.match(Mv)||g.match(Nv))&&(a.fontSize=g);if(g=Jv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
852
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Jv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Mv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Mv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Jv(b,c,e,"letterSpacing",f))&&d.match(Mv)&&(a.letterSpacing=d);(d=Jv(b,c,e,"linePadding",f))&&d.match(Mv)&&(a.linePadding=d);if(f=Jv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Cv(c,e,"textDecoration"))&&Ov(a,c);(b=
853
+ Pv(b,e,"textDecoration"))&&Ov(a,b)}
854
+ function Ov(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")&&fb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&fb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
855
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&fb(a.textDecoration,"overline")}}function Jv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Pv(a,c,d))?a:e?Cv(b,c,d):null}function Cv(a,b,c){if(!a)return null;var d=jo(a,yv,c);return d?d:Qv(a,b,c)}function Pv(a,b,c){var d=jo(a,yv,c);return d?d:Qv(a,b,c)}
856
+ function Qv(a,b,c){a=Fv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=io(a[e],"urn:ebu:tt:style",c);f||(f=jo(a[e],yv,c));f||(f=Pv(a[e],b,c));f&&(d=f)}return d}
857
+ function Fv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?io(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 Hv(a,b,c,d){a=Gv(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}}
858
+ function Gv(a,b){var c=Rv(a.getAttribute("begin"),b),d=Rv(a.getAttribute("end"),b),e=Rv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
859
+ function Rv(a,b){var c=null;if(Sv.test(a)){c=Sv.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(Tv.test(a))c=Uv(Tv,a);else if(Vv.test(a))c=Uv(Vv,a);else if(Wv.test(a))c=Wv.exec(a),c=Number(c[1])/b.frameRate;else if(Xv.test(a))c=Xv.exec(a),c=Number(c[1])/b.g;else if(Yv.test(a))c=Uv(Yv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
860
+ function Uv(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",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;function zv(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]))}
861
+ var Av=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Nv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Mv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Bv=/^(\d+)px (\d+)px$/,Sv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Tv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Wv=/^(\d*(?:\.\d*)?)f$/,Xv=/^(\d*(?:\.\d*)?)t$/,Yv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Lv={left:pb,center:"center",right:"end",start:pb,
862
+ end:"end"},Kv={left:"line-left",center:"center",right:"line-right"},xv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ev=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Uc["application/ttml+xml"]=function(){return new wv};function Zv(){this.g=new wv}Zv.prototype.parseInit=function(a){var b=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).box("minf",pg).box("stbl",pg).R("stsd",rg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Zv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new lg).box("mdat",sg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;
863
+ Zv.prototype.parseInit=Zv.prototype.parseInit;Uc['application/mp4; codecs="stpp"']=function(){return new Zv};Uc['application/mp4; codecs="stpp.ttml"']=function(){return new Zv};Uc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Zv};Uc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Zv};function $v(){}$v.prototype.parseInit=function(){};
864
+ $v.prototype.parseMedia=function(a,b){var c=uc(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=aw(new wq(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=
865
+ [];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 wq(g);var h=new kb;zq(g);xq(g);for(var k=zq(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))?
866
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");xq(g);k=zq(g)}f.push(h)}e=new Map;bw(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 ib(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
867
+ /^\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=sb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
868
+ !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 wq(h[0]);m=aw(k);q=yq(k,/[ \t]+--\x3e[ \t]+/g);n=aw(k);if(null==m||null==q||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=
869
+ ""):h=new ib(m,n,"");cw(p,h,e);xq(k);for(m=zq(k);m;)dw(h,m,f),xq(k),m=zq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function bw(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set(c,e)}
870
+ function cw(a,b,c){0===c.size&&bw(c);a=ew(a);var d=vo("<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())fw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
871
+ function ew(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 gw(a,b){return a&&0<a.length?a:b}
872
+ function fw(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=gw(h.backgroundColor,e.backgroundColor),e.color=gw(h.color,e.color),e.fontFamily=gw(h.fontFamily,e.fontFamily),e.fontSize=gw(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=
873
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(lo(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())fw(a.value,e,c,d)}
874
+ function dw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[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"==
875
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=hw(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function hw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
876
+ function aw(a){a=yq(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",$v);$v.prototype.parseMedia=$v.prototype.parseMedia;$v.prototype.parseInit=$v.prototype.parseInit;Uc["text/vtt"]=function(){return new $v};Uc['text/vtt; codecs="vtt"']=function(){return new $v};Uc['text/vtt; codecs="wvtt"']=function(){return new $v};function iw(){this.g=null}iw.prototype.parseInit=function(a){var b=this,c=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).R("mdhd",function(d){d=Ch(d.reader,d.version);b.g=d.timescale}).box("minf",pg).box("stbl",pg).R("stsd",rg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
877
+ iw.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 lg).box("moof",pg).box("traf",pg).R("tfdt",function(A){g=!0;c=Bh(A.reader,A.version).ld}).R("tfhd",function(A){l=Ah(A.reader,A.flags).ce}).R("trun",function(A){h=!0;d=Dh(A.reader,A.version,A.flags).te}).box("mdat",sg(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 ig(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Ld||l,y=q.Rc?
878
+ c+q.Rc:m;m=y+(v||0);var w=0;do{var x=n.M();w+=x;var D=n.M(),B=null;"vttc"==tg(D)?8<x&&(B=n.Za(x-8)):n.skip(x-8);v&&B&&(x=jw(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Rb)};function jw(a,b,c){var d,e,f;(new lg).box("payl",sg(function(g){d=uc(g)})).box("iden",sg(function(g){e=uc(g)})).box("sttg",sg(function(g){f=uc(g)})).parse(a);return d?kw(d,e,f,b,c):null}
879
+ function kw(a,b,c,d,e){d=new ib(d,e,"");cw(a,d,new Map);b&&(d.id=b);if(c)for(a=new wq(c),b=zq(a);b;)dw(d,b,[]),xq(a),b=zq(a);return d}M("shaka.text.Mp4VttParser",iw);iw.prototype.parseMedia=iw.prototype.parseMedia;iw.prototype.parseInit=iw.prototype.parseInit;Uc['application/mp4; codecs="wvtt"']=function(){return new iw};function lw(){}lw.prototype.parseInit=function(){};lw.prototype.parseMedia=function(a){var b=uc(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 wq(c[0]),e=mw(d),f=yq(d,/,/g);d=mw(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 ib(e,d,c.slice(1).join("\n").trim()))}return a};
880
+ function mw(a){a=yq(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",lw);lw.prototype.parseMedia=lw.prototype.parseMedia;lw.prototype.parseInit=lw.prototype.parseInit;Uc["text/x-subviewer"]=function(){return new lw};function nw(){this.g=new $v}nw.prototype.parseInit=function(){};nw.prototype.parseMedia=function(a,b){var c=uc(a);c=ow(c);c=Fb(yc(c));return this.g.parseMedia(c,b)};function ow(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",nw);nw.srt2webvtt=ow;nw.prototype.parseMedia=nw.prototype.parseMedia;
881
+ nw.prototype.parseInit=nw.prototype.parseInit;Uc["text/srt"]=function(){return new nw};function pw(){}pw.prototype.parseInit=function(){};
882
+ pw.prototype.parseMedia=function(a){var b="",c="";a=uc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=qw.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=rw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(sw);else if("Style"==e){e=f.split(sw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
883
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={hd:e.hd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=rw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(sw);else if("Dialogue"==f){g=g.split(sw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=tw(f.Start);var k=tw(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.hd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.hd}}(e)))&&uw(g,f);d.push(g)}return d};
884
+ function uw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=vw(c))a.color=c;if(c=b.BackColour)if(c=vw(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=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
885
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mb;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=mb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
886
+ function vw(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 tw(a){a=ww.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;pw.prototype.parseInit=pw.prototype.parseInit;var qw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,rw=/^\s*([^:]+):\s*(.*)/,sw=/\s*,\s*/,ww=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
887
+ Uc["text/x-ssa"]=function(){return new pw};/*
892
888
  @license
893
889
  EME Encryption Scheme Polyfill
894
890
  Copyright 2019 Google LLC
895
891
  SPDX-License-Identifier: Apache-2.0
896
892
  */
897
- function Bw(){}var Cw;function Dw(){Cw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Cw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ew):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
898
- function Ew(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,Cw.call(c,a,b),2);d=e.h;if(Fw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Cw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Gw;return e["return"](Gw.call(c,
893
+ function xw(){}var yw;function zw(){yw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Aw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
894
+ function Aw(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,yw.call(c,a,b),2);d=e.h;if(Bw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Cw;return e["return"](Cw.call(c,
899
895
  a,b))})}
900
- function Gw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Hw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Iw(h.videoCapabilities,d),l=Iw(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."),
901
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Cw.call(c,a,e),2)}p=t.h;return t["return"](new Jw(p,d))})}function Iw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Bw);Bw.install=Dw;function Kw(){}var Lw;
902
- function Mw(){Lw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Lw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Nw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
903
- function Nw(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,Lw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Fw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Lw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
904
- navigator.mediaCapabilities.decodingInfo=Ow;return e["return"](Ow.call(b,a))})}
905
- function Ow(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=Hw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Lw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
906
- new Jw(k.keySystemAccess,c);n.A(3);break}if(!a.keySystemConfiguration){n.A(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.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};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
907
- 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)}})}M("McEncryptionSchemePolyfill",Kw);Kw.install=Mw;function Jw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
908
- Jw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Jw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
909
- function Hw(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 Fw(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 Pw(){}
910
- function Qt(){Dw();Mw()}M("EncryptionSchemePolyfills",Pw);Pw.install=Qt;"undefined"!==typeof module&&module.exports&&(module.exports=Pw);}).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})();
896
+ function Cw(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=Dw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ew(h.videoCapabilities,d),l=Ew(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."),
897
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,yw.call(c,a,e),2)}p=q.h;return q["return"](new Fw(p,d))})}function Ew(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",xw);xw.install=zw;function Gw(){}var Hw;
898
+ function Iw(){Hw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Hw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Jw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
899
+ function Jw(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,Hw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Bw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Hw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
900
+ navigator.mediaCapabilities.decodingInfo=Kw;return e["return"](Kw.call(b,a))})}
901
+ function Kw(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=Dw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Hw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
902
+ new Fw(k.keySystemAccess,c);n.B(3);break}if(!a.keySystemConfiguration){n.B(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=
903
+ 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)}})}M("McEncryptionSchemePolyfill",Gw);Gw.install=Iw;function Fw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
904
+ Fw.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};Fw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
905
+ function Dw(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 Bw(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 Lw(){}
906
+ function Jt(){zw();Iw()}M("EncryptionSchemePolyfills",Lw);Lw.install=Jt;"undefined"!==typeof module&&module.exports&&(module.exports=Lw);}).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})();
911
907
 
912
908
  //# sourceMappingURL=shaka-player.compiled.map