CINXE.COM

NSF Main

<!DOCTYPE html><html lang="en" class="bc-iframe"><head> <meta charset="utf-8"> <title>NSF Main</title> <meta name="viewport" content="user-scalable=0, width=device-width, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <style id="bc-style-vjs"> .video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABBIAAsAAAAAGoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3RY21hcAAAAYQAAADQAAADIjn098ZnbHlmAAACVAAACv4AABEIAwnSw2hlYWQAAA1UAAAAKwAAADYV1OgpaGhlYQAADYAAAAAbAAAAJA4DByFobXR4AAANnAAAAA8AAACE4AAAAGxvY2EAAA2sAAAARAAAAEQ9NEHGbWF4cAAADfAAAAAfAAAAIAEyAIFuYW1lAAAOEAAAASUAAAIK1cf1oHBvc3QAAA84AAABDwAAAZ5AAl/0eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGQ7xTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGBHcRdyA4RZgQRAC4HCwEAAHic7dFprsIgAEXhg8U61XmeWcBb1FuQP4w7ZQXK5boMm3yclFDSANAHmuKviBBeBPQ8ymyo8w3jOh/5r2ui5nN6v8sYNJb3WMdeWRvLji0DhozKdxM6psyYs2DJijUbtuzYc+DIiTMXrty4k8oGLb+n0xCe37ekM7Z66j1DbUy3l6PpHnLfdLO5NdSBoQ4NdWSoY9ON54mhdqa/y1NDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUJORPqkhTd54nJ1YDXBU1RV+576/JBs2bPYPkrDZt5vsJrv53V/I5mclhGDCTwgGBQQSTEji4hCkYIAGd4TGIWFAhV0RQTpWmQp1xv6hA4OTOlNr2zFANbHUYbq2OtNCpViRqsk+e+7bTQAhzti8vPfuPffcc88959zznbcMMPjHD/KDDGEY0ABpYX384NhlomIYlo4JISGEY9mMh2FSidYiqkEUphtNYDSY/dXg9023l4DdxlqUl0chuZRhncJKrsCQHIwcGuwfnhMIzBnuH4Sym+1D2zaGjheXlhYfD238z80mKYMmvJ5XeOTzd8z9eujbMxJNhu4C9xPE/bCMiDuSNIWgkTQwBE55hLSAE7ZwhrHLnAHZOGV/kmBGTiNjZxzI77Hb7Hqjz68TjT6vh+5JT/cCIkqS0D6CqPf5jX4Qjdx5j6vlDfZM4aZFdbVXIxtOlJaP/WottMnH6CJQ3bTiue3PrY23HjnChtuamxwvvzFjxkPrNj3z0tG9T561HDYf6OgmRWvlY3JQHoQb8ltV2Yet7YfWctEjR1AtxS/cSX6U4alf6NJEBQ7YKg9wrXQKd0IeZCb2ux75Uhh1Un+Nz+9LTOE7PK777nN5xqdTneTBhCbx446mZrhnUkrCz2YhA9dSMxaG0SYmT8hi9ZPu1E94PJYQSH6LRmhxec7Q7ZeXntgQuVpbh+a4qWNsckVyTdn0P7o7DpgPW84+uRcq0BITflBikGdUjAZ9wYBVI3mtrNvr9kpg1UsaK6t3690aoorC1lg0GpMH2HAMtkZjsSi5Ig9ESVosOh7GQfLjKNLvKpMKkLSKNFAka710GdgSi8oDMSoNhqjkKBXTgn3swtaxyzGkUzIzae9RtLdWkSlZ1KDX6EzgllzV4NV4SoDFSOGD4+HCeQUF8wrZ5Hs8zIb5EaVxy8DYFTbMCJPnLIWZxugZE2NlivC0gc1qEQUR8jEKgZcAXeH18BiCgl5nlHh0CrjB4Hb5fX4gb0J7c9PuHVsfgkx2n/vTY/JV8kn8PGxf7faOZ8qX8JVByuIf4whk9sqXli2hvPJV9hrp0hY7l8r2x37ydaVsb4xvXv/47v2NjfCl8m5oRDJclFMoE1yk0Uh1Te4/m8lFXe9qBZD0EkheicebXvzI2PLCuoKCukLuhPIeKwaHPEouxw3kMqaIUXDQ1p0mip+MyCORSCQaoUsnY1VZ38nUTrG21WvVo4f1OsEJFhvSfAFwGfT8VHRMeAVUpwLOoLzjT/REIj3O3FhuURE+nERF+0pTId5Fyxv5sfwGyg4O+my4vZv0sZm7oeQlFZORiB+tG0MweVNraeitl7yxiPIHTk4/diVxs94o5lEYishB2iAtkchEnsActoEpx44Fo8XnsQMaA22BlqC20RmhBKzYojZyYaxg+JggMc4HHY2m+L9EkWSYljirOisrO7d3VorxzyZ6Vc4lJqITAu1b2wOBdrLElAP+bFc2eGaZFVbkmJktv5uT6Jlz5D/MnBFor6ig/JPnRViBsV3LNKGGqB1ChJ0tgQywlVLFJIuQgTFttwkiKxhyQdAZMdMYtSaoAewqfvXVYPAbDT6/1mez85YS8FSDywQ6NfAnef6FNEGMilnppyvn5rB6tTyq1pOceRWnp2WJEZFXHeX5oyoem1nTTgdqc4heDY7bOeKz63vnz+/dRx+s31Ht2JGanQ5seirfWJL9tjozU/12TnEjn5oux9OzU3ckGbBzBwNOyk69JykKH0n/0LM9A72tuwM3zQpIRu4AxiToseEpgPOmbROyFe9/X2yeUvoUsCyEvjcgs7fpWP3/aKlFN0+6HFUe6D9HFz/XPwBlN9tTqNyZjFJ8UO2RUT5/h4CptCctEyeisnOyXjALEp7dXKaQKf6O7IMnGjNNACRMLxqdYJX8eMLvmmd68D+ayBLyKKYZwYxDt/GNhzETDJ05Qxlyi3pi3/Z93ndYVSumgj0V/KkIFlO6+1K3fF2+3g0q+YtuSIf0bvmLqV09nnobI6hwcjIP8aPCKayjsF5JBY3LaKAeRLSyYB1h81oTwe9SlPMkXB7G0mfL9q71gaqqwPqu67QRKS1+ObTx+sbQy9QV2OQHEScGkdFBeT7v7qisqqrs6N52i78/R+6S0qQONVj26agOVoswCyQWIV5D86vH53bxNUeXV0K+XZaHv/nm/KsHhOvylwsWnJX/HE8l/4WCv5x+l5n08z6UU8bUMa3MBpSmM7F63AxntdC9eBCKEZW9Hr+ABNqtxgAQrSbMtmrW7lKQuoSgBhSrTazWVU2QAKWY8wiiuhqFmQgWJBgoXiuWIm42N7hqZbBsgXz52O5P5uSvaNgFGnOuvsRw8I8Laha91wMvDuxqWFheN7/8GVtTltdS83DQsXRmqc5ZtcJXEVrlV2doTWk5+Yunm71dG5f55m/qY0MjI93vv9/NfpxXV9sUXrxy2fbNy1or65cOlDRnOoKFeeXcbw42H/bNDT5Qs3flgs31gWC1lD1nfUV/X7NdCnSUdHY2e8afzfKsqZ5ZljfDqjLOmk3UebNXB+aHArPYDRs+/HDDxeT5DiP+sFg7OpRaVQMGBV89PpeBdj22hCE0Uub0UqwLrNWsG0cuyadgLXTeR5rbO4+3c/vl15cur2nRq+TXCQDcS3SO+s6ak+e5/eMS+1dw3btu3YG2tvFL8XdIZvdjdW6TO/4B7IdrZWVPmctm5/59AgsPItTSbCiIBr2OqIGzmu20SMKAS7yqwGBUfGfgjDYlLLDeF0SfcLB2LSx8flT+08/kzz6yOj96rft4rpTjdPQcmLd47uKibbDq7ZSz/XtbH2nN717Nd62rU+c8Icevvv7I09wA6WvjVcafb+FsbNG+ZQ80Rn6ZZsvrP7teP2dzTdoETvNhjCmsr8FID2sJ69VYvdUcxk4AzYRlKcaE38eXNRlfW9H1as9i6acLHp1XpuNB5K7DIvkX08y1ZYvh3KfWaiCzH+ztrSDmD7LuX73x/mJelB8Yj39t8nhNQJJ2CAthpoFGLsGgtSOCJooCGoaJAMTjSWHVZ08YAa1Fg9lPI5U6DOsGVjDasJeZZ+YyhfCwfOzCxlBA69M9XLXtza7H/rav+9Tjq5xNi0wpKQIRNO4Lrzz7yp5QVYM6Jd/oc1Uvn/mQhhuWh6ENXoS2YTZ8QT42bF5d/559zp5r0Uff2VnR2tdf2/WCOd2cO0Mw6qpWPnvxpV0nrt5fZd2yItc199GWe8vlNfNDq+CH/7yAAnB9hn7T4QO4c1g9ScxsZgmzntnE/IDGndtHMw69lFwoCnYsMGx+rBp8JSBqdLzBr9QRPq/PbhWMWFtQZp1xguy/haw3TEHm3TWAnxFWQQWgt7M5OV0lCz1VRYucpWliy7z6Zd4urwPIyeZQqli2Lgg7szJV09PysATbOQtYIrB2YzbkJYkGgJ0m4AjPUap1pvYu1K9qr97z0Yl3p332b2LYB78ncYIlRkau/8GObSsOlZancACE5d5ily+c2+7h5Yj4lqhVmXXB+iXLfvdqSgqfKtQvfHDV0OnvQR1qhw42XS/vkvsh/hXcrDFP0a+SJNIomEfD1nsrYGO+1bgTOJhM8Hv6ek+7vVglxuSRwoKn17S937bm6YJCeSSG0Op1n+7tE37tcZ/p7dsTv4EUrGpDbWueKigsLHhqTVsoEj+JU0kaSjnj9tz8/gryQWwJ9BcJXBC/7smO+I/IFURJetFPrdt5WcoL6DbEJaygI8CTHfQTjf40ofD+DwalTqIAAHicY2BkYGAA4gDud4bx/DZfGbjZGUDg+q1z05BpdkawOAcDE4gCAB45CXEAeJxjYGRgYGcAARD5/z87IwMjAypQBAAtgwI4AHicY2BgYGAfYAwAOkQA4QAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhHicY2BkYGBQZChlYGcAASYg5gJCBob/YD4DABfTAbQAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2PyXLCMBBE3YCNDWEL2ffk7o8S8oCnkCVHC5C/jzBQlUP6IHVPzYyekl5y0iL5X5/ooY8BUmQYIkeBEca4wgRTzDDHAtdY4ga3uMM9HvCIJzzjBa94wzs+8ImvZNAq8TM+HqVkKxWlrQiOxjujQkNlEzyNzl6Z/cU2XF06at7U83VQyklLpEvSnuzsb+HAPnPfQVgaupa1Jlu4sPLsFblcitaz0dHU0ZF1qatjZ1+aTXYCmp6u0gSvWNPyHLtFZ+ZeXWVSaEkqs3T8S74WklbGbNNNq4LL4+CWKtZDv2cfX8l8aFbKFhEnJnJ+IULFpqwoQnNHlHaVQtPBl+ypmbSWdmyC61KS/AKZC3Y+AA==) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\f102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\f103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\f104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\f105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\f106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\f107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\f108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\f109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\f10a"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\f10b"}.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\f10c"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\f10d"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\f10e"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\f10f"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\f110"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\f111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\f112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\f113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\f114"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\f115"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\f116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\f117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\f118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\f119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\f11a"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\f11b"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\f11c"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\f11d"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\f11e"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\f11f"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\f120"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:0}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-fluid{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.81666em;margin-left:-1.5em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em 0;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.666666666666666666em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.333333333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:rgba(255,255,255,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em 0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel .vjs-volume-control:hover,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control,.video-js .vjs-volume-panel:hover .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em}.video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-vertical{left:-3.5em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:9em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control{display:none}.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time{display:none}.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:'X';font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\f10d";font-size:1.5em;line-height:inherit}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \f11d";font-size:1.5em;line-height:inherit}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-control{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-live) .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-liveui) .vjs-subs-caps-button{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-custom-control-spacer{flex:auto;display:block}.video-js:not(.vjs-fullscreen).vjs-layout-tiny.vjs-no-flex .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui.vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:none}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px 0}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px 0;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0;background:0 0}.video-js .vjs-menu :focus:not(:focus-visible),.video-js :focus:not(:focus-visible){outline:0;background:0 0} </style> <style class="bc-style-NkgrDczuol-default"> .bc-player-NkgrDczuol_default *,.bc-player-NkgrDczuol_default :after,.bc-player-NkgrDczuol_default :before{box-sizing:inherit;font-size:inherit;color:inherit;line-height:inherit}.bc-player-NkgrDczuol_default{width:300px;height:150px;font-size:14px;overflow:hidden}.bc-player-NkgrDczuol_default.vjs-fluid,.bc-player-NkgrDczuol_default.vjs-fluid.vjs-16-9{padding-top:56.25%}.bc-player-NkgrDczuol_default.vjs-fluid.vjs-4-3{padding-top:75%}.bc-player-NkgrDczuol_default.vjs-fill{width:100%;height:100%}.bc-iframe,.bc-iframe body,.bc-player-NkgrDczuol_default,.bc-player-NkgrDczuol_default .vjs-poster{background-color:#151B17}.bc-iframe,.bc-iframe .bc-player-NkgrDczuol_default,.bc-iframe body{margin:0;width:100%;height:100%;overflow:hidden}.bc-player-NkgrDczuol_default.vjs-fullscreen,.bc-player-NkgrDczuol_default.vjs-fullscreen .vjs-tech{width:100%!important;height:100%!important}.bc-player-NkgrDczuol_default .vjs-track-setting select{color:#000;background-color:#fff}.bc-player-NkgrDczuol_default .vjs-audio-button .vjs-menu-item,.bc-player-NkgrDczuol_default .vjs-chapters-button .vjs-menu-item,.bc-player-NkgrDczuol_default .vjs-descriptions-button .vjs-menu-item,.bc-player-NkgrDczuol_default .vjs-subs-caps-button .vjs-menu-item{text-transform:none}.bc-player-NkgrDczuol_default.vjs-waiting-for-autoplay .vjs-big-play-button{opacity:0}.bc-player-NkgrDczuol_default .vjs-progress-control .vjs-mouse-display{z-index:2}.vjs-error-display{color:#fff;display:none;font-family:Helvetica,Arial,sans serif;font-size:16px;line-height:1.428}.vjs-error .vjs-error-display{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:14px}.vjs-errors-dialog{text-align:left;border:1px #999 solid;overflow:hidden;position:absolute;top:2%;bottom:2%;left:5%;right:5%;padding-left:1%;padding-right:1%;background:rgba(24,24,24,.8);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC000000, endColorstr=#CC000000)"}.vjs-errors-details{margin-top:15px}.vjs-errors-message{border:1px #999 solid;background-color:#2c2c2c;overflow:auto;margin-top:15px;padding:15px}.vjs-errors-ok-button-container{display:block;position:absolute;bottom:15px;left:15px;right:15px;text-align:center}.vjs-errors-ok-button{display:block;margin:0 auto;width:80px;height:36px;background-color:#000;border:1px #999 solid;border-radius:5px;color:#999;font-size:14px;cursor:pointer}.vjs-errors-ok-button:hover{border:1px #FFF solid;color:#CCC}.vjs-errors-content-container{overflow:auto;position:absolute;padding-bottom:15px;top:0;left:15px;right:15px;bottom:61px}.vjs-errors-headline{font-size:14px;font-weight:700;padding-right:3em}.vjs-errors-dialog .vjs-control.vjs-close-button{width:3em;height:3em;top:0}.vjs-errors-flashmessage{float:right;font-size:9px;font-style:italic}.vjs-xs.vjs-error-display{font-size:14px;background-color:#000}.vjs-xs.vjs-error-display .vjs-errors-details,.vjs-xs.vjs-error-display .vjs-errors-message{display:none}.vjs-xs .vjs-errors-content-container{top:0}.vjs-xs .vjs-errors-headline{font-size:16px;font-weight:700}.vjs-xs .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-xs.vjs-errors-flashmessage{display:none}@media (max-width:600px),(max-height:250px){.vjs-error-display{font-size:14px;background-color:#000}.vjs-error-display .vjs-errors-details,.vjs-error-display .vjs-errors-message{display:none}.vjs-error-display .vjs-errors-content-container{top:15px}.vjs-error-display .vjs-errors-headline{font-size:16px;font-weight:700}.vjs-error-display .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-errors-flashmessage{display:none}}.vjs-errors-ref-id{color:rgba(255,255,255,.5);font-size:.75em;margin:.5em 0 0}/*! @name videojs-contextmenu-ui @version 5.1.1 @license Apache-2.0 */.vjs-contextmenu-ui-menu{position:absolute}.vjs-contextmenu-ui-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;padding:.25em}.vjs-contextmenu-ui-menu .vjs-menu-item{border-radius:.3em;cursor:pointer;margin:0 0 1px;padding:.5em 1em;font-size:1em;line-height:1.2;text-transform:none}.vjs-contextmenu-ui-menu .vjs-menu-item:active,.vjs-contextmenu-ui-menu .vjs-menu-item:hover{background-color:rgba(0,0,0,.5);text-shadow:0 0 1em #fff}.vjs-modal-dialog.vjs-player-info-modal{background:rgba(0,0,0,.9);font-size:10px}.vjs-modal-dialog.vjs-player-info-modal .vjs-modal-dialog-content{overflow:auto}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section{float:left;width:49%}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section:nth-child(2n+1){float:right}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section.vjs-pi-section--source{float:none;clear:both;width:auto}.vjs-modal-dialog.vjs-player-info-modal .vjs-pi-section.vjs-pi-section--source td:first-child{min-width:150px}.vjs-modal-dialog.vjs-player-info-modal table{border-collapse:collapse;margin-bottom:1em;width:100%}.vjs-modal-dialog.vjs-player-info-modal th{font-weight:400;text-align:left}.vjs-modal-dialog.vjs-player-info-modal td{border-bottom:1px solid rgba(255,255,255,.2);opacity:.5}.vjs-modal-dialog.vjs-player-info-modal tr:last-child td{border-bottom:0}.vjs-modal-dialog.vjs-player-info-modal tr:hover td{opacity:1}.bc-player-NkgrDczuol_default .vjs-control-bar{background-color:rgba(0,0,0,.45);color:#fff}.bc-player-NkgrDczuol_default .vjs-control{color:inherit}.bc-player-NkgrDczuol_default .vjs-mouse-display:after,.bc-player-NkgrDczuol_default .vjs-play-progress:after{border-radius:0}.bc-player-NkgrDczuol_default .vjs-menu-button-inline:hover,.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-menu-button-inline{width:8.35em}.bc-player-NkgrDczuol_default .vjs-control:focus:before,.bc-player-NkgrDczuol_default .vjs-control:hover:before{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff}.bc-player-NkgrDczuol_default .vjs-spacer{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:1 1 auto;-moz-box-flex:1 1 auto;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto}.bc-player-NkgrDczuol_default .vjs-time-control{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:0 1 auto;-moz-box-flex:0 1 auto;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;width:auto}.bc-player-NkgrDczuol_default .vjs-time-control.vjs-time-divider{width:14px}.bc-player-NkgrDczuol_default .vjs-time-control.vjs-time-divider div{width:100%;text-align:center}.bc-player-NkgrDczuol_default .vjs-time-control.vjs-current-time{margin-left:1em}.bc-player-NkgrDczuol_default .vjs-time-control .vjs-current-time-display,.bc-player-NkgrDczuol_default .vjs-time-control .vjs-duration-display{width:100%}.bc-player-NkgrDczuol_default .vjs-time-control .vjs-current-time-display{text-align:right}.bc-player-NkgrDczuol_default .vjs-time-control .vjs-duration-display{text-align:left}.bc-player-NkgrDczuol_default .vjs-remaining-time{display:none}.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-time-control.vjs-remaining-time{display:none}.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-NkgrDczuol_default .vjs-play-progress,.bc-player-NkgrDczuol_default .vjs-volume-level{background-color:#d52484}.bc-player-NkgrDczuol_default .vjs-play-progress:before,.bc-player-NkgrDczuol_default .vjs-volume-level:before{display:none}.bc-player-NkgrDczuol_default .vjs-volume-level:after{display:none}.bc-player-NkgrDczuol_default .vjs-progress-control{position:absolute;left:0;right:0;width:100%;height:1.5em;top:-1.5em}.bc-player-NkgrDczuol_default .vjs-progress-control .vjs-load-progress,.bc-player-NkgrDczuol_default .vjs-progress-control .vjs-play-progress,.bc-player-NkgrDczuol_default .vjs-progress-control .vjs-progress-holder{height:100%}.bc-player-NkgrDczuol_default .vjs-progress-control .vjs-progress-holder{margin:0}.bc-player-NkgrDczuol_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-NkgrDczuol_default .vjs-control-bar:not(.vjs-focus-within){-webkit-transition:-webkit-transform .1s ease 0s;-moz-transition:-moz-transform .1s ease 0s;-ms-transition:-ms-transform .1s ease 0s;-o-transition:-o-transform .1s ease 0s;transition:transform .1s ease 0s}.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible),.bc-player-NkgrDczuol_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar:not(.vjs-focus-within):not(.vjs-control-bar-visible){visibility:visible;opacity:1;-webkit-backface-visibility:hidden;-webkit-transform:translateY(3em);-moz-transform:translateY(3em);-ms-transform:translateY(3em);-o-transform:translateY(3em);transform:translateY(3em);-webkit-transition:-webkit-transform 1s ease 0s;-moz-transition:-moz-transform 1s ease 0s;-ms-transition:-ms-transform 1s ease 0s;-o-transition:-o-transform 1s ease 0s;transition:transform 1s ease 0s}.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-progress-control,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control{height:.3em;top:-.3em;pointer-events:none;-webkit-transition:height 1s,top 1s;-moz-transition:height 1s,top 1s;-ms-transition:height 1s,top 1s;-o-transition:height 1s,top 1s;transition:height 1s,top 1s}.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control{opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-ms-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s}.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-volume-vertical,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-volume-vertical,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-volume-vertical,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-menu,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical{opacity:0;-webkit-transition:opacity 1s;-moz-transition:opacity 1s;-ms-transition:opacity 1s;-o-transition:opacity 1s;transition:opacity 1s}.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-NkgrDczuol_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu-item,.bc-player-NkgrDczuol_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu{opacity:1}.bc-player-NkgrDczuol_default.vjs-live .vjs-live-control{margin-left:1em}.bc-player-NkgrDczuol_default.vjs-live .vjs-time-control.vjs-current-time,.bc-player-NkgrDczuol_default.vjs-live .vjs-time-control.vjs-duration,.bc-player-NkgrDczuol_default.vjs-live .vjs-time-control.vjs-time-divider{display:none}.bc-player-NkgrDczuol_default .vjs-big-play-button{top:50%;left:50%;margin-left:-1em;margin-top:-1em;width:2em;height:2em;line-height:2em;border:none;border-radius:50%;font-size:3.5em;background-color:rgba(0,0,0,.45);color:#fff;-webkit-transition:border-color .4s,outline .4s,background-color .4s;-moz-transition:border-color .4s,outline .4s,background-color .4s;-ms-transition:border-color .4s,outline .4s,background-color .4s;-o-transition:border-color .4s,outline .4s,background-color .4s;transition:border-color .4s,outline .4s,background-color .4s}.bc-player-NkgrDczuol_default .vjs-big-play-button:active,.bc-player-NkgrDczuol_default .vjs-big-play-button:focus,.bc-player-NkgrDczuol_default:active .vjs-big-play-button,.bc-player-NkgrDczuol_default:hover .vjs-big-play-button{background-color:#d52484}.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu{left:-3em}.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:transparent;width:12em;left:-1.5em;padding-bottom:.5em}.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item,.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-title{background-color:#151B17;margin:.3em 0;padding:.5em;border-radius:.3em}.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected{background-color:#d52484}.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:active,.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:focus,.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:hover{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff;color:#fff}.bc-player-NkgrDczuol_default.vjs-ad-playing .vjs-mouse-display,.bc-player-NkgrDczuol_default.vjs-ad-playing .vjs-mouse-display:after{display:none}.bc-player-NkgrDczuol_default.vjs-ad-playing.vjs-ad-playing .vjs-progress-control:after{pointer-events:auto;width:100%;height:100%;position:absolute;left:0;bottom:0;content:" ";user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none}.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-spacer{display:table-cell}.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-NkgrDczuol_default.vjs-no-flex .vjs-remaining-time{display:none}.vjs-mouse.bc-player-NkgrDczuol_default .vjs-control-bar{font-size:10px}.vjs-mouse.bc-player-NkgrDczuol_default .vjs-progress-control{height:.5em;top:-.5em}.vjs-mouse.bc-player-NkgrDczuol_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-NkgrDczuol_default select{width:inherit}.bc-player-NkgrDczuol_default.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.bc-player-NkgrDczuol_default.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:block}.bc-iframe .vjs-playlist-sidebar .vjs-playlist-show-hide button:hover,.bc-player-NkgrDczuol_default .vjs-big-play-button:active,.bc-player-NkgrDczuol_default .vjs-big-play-button:focus,.bc-player-NkgrDczuol_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected,.bc-player-NkgrDczuol_default .vjs-play-progress,.bc-player-NkgrDczuol_default .vjs-volume-level,.bc-player-NkgrDczuol_default:active .vjs-big-play-button,.bc-player-NkgrDczuol_default:hover .vjs-big-play-button{background-color:#006ead}.video-js.vjs-quality-menu{display:block}.video-js.vjs-quality-menu .vjs-quality-menu-button:before{font-family:VideoJS;font-weight:400;font-style:normal;content:"\f110"}.video-js.vjs-quality-menu.vjs-v6 .vjs-quality-menu-button,.video-js.vjs-quality-menu.vjs-v7 .vjs-quality-menu-button{position:initial}.video-js.vjs-quality-menu.vjs-v6 .vjs-quality-menu-button:before,.video-js.vjs-quality-menu.vjs-v7 .vjs-quality-menu-button:before{content:none}.video-js.vjs-quality-menu.vjs-v6 .vjs-quality-menu-button .vjs-icon-placeholder,.video-js.vjs-quality-menu.vjs-v7 .vjs-quality-menu-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-quality-menu.vjs-v6 .vjs-quality-menu-button .vjs-icon-placeholder:before,.video-js.vjs-quality-menu.vjs-v7 .vjs-quality-menu-button .vjs-icon-placeholder:before{content:"\f110"}.video-js.vjs-quality-menu .vjs-quality-menu-button{position:relative}.video-js.vjs-quality-menu .vjs-quality-menu-button li{text-transform:none}.video-js.vjs-quality-menu .vjs-quality-menu-button.vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em;width:10em;left:0}.video-js.vjs-quality-menu .vjs-menu-item .vjs-control-text{position:absolute}.video-js.vjs-quality-menu .vjs-quality-menu-wrapper{position:relative}.video-js.vjs-quality-menu .vjs-quality-menu-wrapper li{text-transform:none}.video-js.vjs-quality-menu .vjs-quality-menu-wrapper.vjs-menu-wrapper-popup .vjs-menu .vjs-menu-content{max-height:25em;width:10em;left:0}.video-js.vjs-quality-menu .vjs-quality-menu-item-sub-label{font-size:75%;font-weight:700;position:absolute;right:0;text-align:center;width:4em}.video-js.vjs-quality-menu .vjs-quality-menu-button-use-resolution .vjs-quality-menu-item-sub-label{position:absolute;right:0;text-align:center;width:4em}.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after,.video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after{background-color:#2B333F;color:inherit;content:"";font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.7em;font-weight:300;height:2.2em;line-height:2.2em;padding:0;position:absolute;right:0;text-align:center;top:.5em;width:2.2em;border-radius:2em;letter-spacing:.1em}.video-js.vjs-quality-menu .vjs-quality-menu-button-HD-flag:after{content:"HD"}.video-js.vjs-quality-menu .vjs-quality-menu-button-4K-flag:after{content:"4K"}.video-js.vjs-quality-menu .vjs-quality-menu-button-waiting:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite}.vjs-social-overlay{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:10px;letter-spacing:1px}.vjs-social-overlay .vjs-icon-facebook{background-color:#3b5998}.vjs-social-overlay .vjs-icon-gplus{background-color:#d53326}.vjs-social-overlay .vjs-icon-linkedin{background-color:#069}.vjs-social-overlay .vjs-icon-twitter{background-color:#55acee}.vjs-social-overlay .vjs-icon-tumblr{background-color:#29364b}.vjs-social-overlay .vjs-icon-pinterest{background-color:#c10218}.vjs-social-overlay a{color:#fff}.vjs-social-overlay .vjs-social-description,.vjs-social-overlay .vjs-social-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-social-overlay .vjs-social-title{font-size:1.25em;font-weight:700;line-height:1.33333;margin-bottom:.33333em}.vjs-social-overlay .vjs-social-description{font-size:1em;font-weight:400;line-height:1.5;margin-bottom:1em}.vjs-social-overlay .vjs-social-share-links{margin:-.33333em 0 .66667em -.28333em;overflow:auto}.vjs-social-overlay .vjs-social-share-link{border-radius:2px;float:left;font-size:1.16667em;line-height:1.07143;margin:.33571em .28571em;padding:.42857em;text-decoration:none}.vjs-social-overlay .vjs-social-direct-link,.vjs-social-overlay .vjs-social-embed-code,.vjs-social-overlay .vjs-social-start-from{float:left;margin-bottom:.66667em}.vjs-social-overlay .vjs-social-direct-link .vjs-social-label-text,.vjs-social-overlay .vjs-social-embed-code .vjs-social-label-text,.vjs-social-overlay .vjs-social-start-from .vjs-social-label-text{display:block;margin-bottom:.16667em}.vjs-social-overlay .vjs-social-direct-link input,.vjs-social-overlay .vjs-social-embed-code input,.vjs-social-overlay .vjs-social-start-from input{border:0;color:#333;display:block;font-size:1em;padding:.5em .66667em;width:100%}.vjs-social-overlay .vjs-social-direct-link input.vjs-invalid,.vjs-social-overlay .vjs-social-embed-code input.vjs-invalid,.vjs-social-overlay .vjs-social-start-from input.vjs-invalid{background-color:red;color:#fff}.vjs-social-overlay .vjs-social-direct-link{padding-right:24px;width:80%}.vjs-social-overlay .vjs-social-start-from{width:20%}.vjs-social-overlay .vjs-social-embed-code{margin-bottom:.33333em;width:100%}.vjs-social-overlay.vjs-social-as-endscreen .vjs-restart{border:0;cursor:pointer;display:block;font-size:4em;margin:0 auto;outline:0;padding:0}.vjs-social-overlay.vjs-social-as-endscreen .vjs-restart:focus:before,.vjs-social-overlay.vjs-social-as-endscreen .vjs-restart:hover:before{text-shadow:1px -1px 20px #fff,-1px 1px 20px #fff}.vjs-social-overlay.vjs-social-as-endscreen.vjs-social-short-player .vjs-social-description{display:none}.vjs-social-overlay .vjs-control.vjs-close-button{height:4.5em;top:0;width:4.5em}.vjs-social-overlay .vjs-control.vjs-close-button .vjs-icon-placeholder:before{line-height:2.5}.vjs-button.vjs-share-control{cursor:pointer;font-weight:700}.vjs-button.vjs-share-control:hover{text-shadow:0 0 1em rgba(255,255,255,.5),0 0 1em rgba(255,255,255,.5),0 0 1em rgba(255,255,255,.5)}.vjs-dock-shelf .vjs-button.vjs-share-control{position:relative;padding:1em;margin:-1em}.vjs-dock-shelf .vjs-button.vjs-share-control:before{position:relative;vertical-align:top}.vjs-dock-shelf .vjs-button.vjs-share-control span{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:top;text-decoration:underline;margin-left:2px}.vjs-button.vjs-share-control:before{font-family:VideoJS;font-weight:400;font-style:normal;content:"\f10f"}.vjs-v6 .vjs-button.vjs-share-control:before,.vjs-v7 .vjs-button.vjs-share-control:before{content:none}.vjs-v6 .vjs-button.vjs-share-control .vjs-icon-placeholder:before,.vjs-v7 .vjs-button.vjs-share-control .vjs-icon-placeholder:before{font-family:VideoJS;font-weight:400;font-style:normal;content:"\f10f"}.vjs-v6 .vjs-dock-shelf .vjs-button.vjs-share-control:before,.vjs-v7 .vjs-dock-shelf .vjs-button.vjs-share-control:before{content:"\f10f"}.vjs-v6 .vjs-dock-shelf .vjs-button.vjs-share-control .vjs-icon-placeholder:before,.vjs-v7 .vjs-dock-shelf .vjs-button.vjs-share-control .vjs-icon-placeholder:before{content:none}.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-button.vjs-share-control,.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-button.vjs-share-control{display:none}.vjs-layout-small .vjs-social-overlay .vjs-social-direct-link,.vjs-layout-tiny .vjs-social-overlay .vjs-social-direct-link,.vjs-layout-x-small .vjs-social-overlay .vjs-social-direct-link,.vjs-social-small .vjs-social-overlay .vjs-social-direct-link{width:100%;padding-right:0}.vjs-layout-small .vjs-social-overlay .vjs-social-start-from,.vjs-layout-tiny .vjs-social-overlay .vjs-social-start-from,.vjs-layout-x-small .vjs-social-overlay .vjs-social-start-from,.vjs-social-small .vjs-social-overlay .vjs-social-start-from{width:100%}.vjs-layout-small .vjs-social-overlay .vjs-social-embed-code,.vjs-layout-tiny .vjs-social-overlay .vjs-social-embed-code,.vjs-layout-x-small .vjs-social-overlay .vjs-social-embed-code,.vjs-social-small .vjs-social-overlay .vjs-social-embed-code{margin-bottom:2em} </style> </head> <body><video-js data-account="679256133001" data-player="NkgrDczuol" data-embed="default" data-application-id="" class="video-js vjs-default-skin" > </video-js> <script>(function(p){p.mark&&p.mark('bcParseStart')})(window.performance||{})</script> <script>(function(){var e=function(e,t){var r=undefined;var i=e.define;var n=[];var a=-1;var s=function(e,t,r){var i=(e.cssRules||[]).length;try{e.insertRule(t+" { "+r+" } ",i)}catch(e){}};var o=function(){var t=e.navigator.userAgent.match(/applewebkit\/(\d*).*Version\/(\d*.\d*)/i);return f.browser.IS_ANDROID&&f.browser.ANDROID_VERSION<5&&t&&t[2]>0};var u=e.bc;var l=e.videojs;e.VIDEOJS_NO_DYNAMIC_STYLE=true;var c=function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="0.2.0";var i={accountId:"",applicationId:"",embedId:"default",playerId:"default",previousInitializer:null,skin:"luna",version:"0.0.0"};var n=function(){function r(t){var n=this;if(t===void 0){t={}}Object.keys(i).forEach(function(e){n[e]=t.hasOwnProperty(e)?t[e]:i[e]});if(!r.shared.videojs){throw new Error("missing videojs")}this.videojs=r.shared.videojs;this.bcFrameEl=e.querySelector(".bc-iframe");this.isInAnyFrame=this.videojs.dom.isInFrame();this.isInBcFrame=Boolean(this.bcFrameEl)}var n=r.prototype;n.decorateInitializer=function e(r){var i=this.embedId,n=this.playerId,a=this.previousInitializer,s=this.skin,o=this.version,u=this.videojs;r.SKIN=s;r.VERSION=o;r.videojs=u;r[n+"_"+i]=r;if(a){Object.keys(a).forEach(function(e){var t=a[e];if(typeof t==="function"&&typeof t.videojs==="function"){r[e]=t;delete a[e]}})}t.bc=r;return r};r.dedupeVideojs=function e(i,n,a){var s=i;r.shared.firstVideojs=n||i;if(n&&n.VERSION===i.VERSION){s=n}else if(a){var o=Object.keys(a);for(var u=0;u<o.length;u++){var l=o[u];var c=a[l];if(typeof c==="function"&&typeof c.videojs==="function"){if(c.videojs.VERSION===i.VERSION){s=c.videojs;break}}}}t.videojs=s;r.shared.videojs=s;return s};r.restoreFirstVideojs=function e(){t.videojs=r.shared.firstVideojs};return r}();n.defaults=i;n.shared={};n.VERSION=r;return n}(t,e);(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("global/window"),require("global/document")):typeof r==="function"&&r.amd?r(["global/window","global/document"],t):(e=e||self,e.videojs=t(e.window,e.document))})(this,function(t,r){t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;var i="7.5.6";function n(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function a(e,t){a=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return a(e,t)}function s(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function o(e,t,r){if(s()){o=Reflect.construct}else{o=function e(t,r,i){var n=[null];n.push.apply(n,r);var s=Function.bind.apply(t,n);var o=new s;if(i)a(o,i.prototype);return o}}return o.apply(null,arguments)}function u(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function l(e,t){if(!t){t=e.slice(0)}e.raw=t;return e}var c=[];var f=function e(r,i){return function(e,n,a){var s=i.levels[n];var o=new RegExp("^("+s+")$");if(e!=="log"){a.unshift(e.toUpperCase()+":")}a.unshift(r+":");if(c){c.push([].concat(a))}if(!t.console){return}var u=t.console[e];if(!u&&e==="debug"){u=t.console.info||t.console.log}if(!u||!s||!o.test(e)){return}u[Array.isArray(a)?"apply":"call"](t.console,a)}};function d(e){var t="info";var r;var i=function e(){for(var i=arguments.length,n=new Array(i),a=0;a<i;a++){n[a]=arguments[a]}r("log",t,n)};r=f(e,i);i.createLogger=function(t){return d(e+": "+t)};i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t};i.level=function(e){if(typeof e==="string"){if(!i.levels.hasOwnProperty(e)){throw new Error('"'+e+'" in not a valid log level')}t=e}return t};i.history=function(){return c?[].concat(c):[]};i.history.filter=function(e){return(c||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})};i.history.clear=function(){if(c){c.length=0}};i.history.disable=function(){if(c!==null){c.length=0;c=null}};i.history.enable=function(){if(c===null){c=[]}};i.error=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("error",t,i)};i.warn=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("warn",t,i)};i.debug=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("debug",t,i)};return i}var h=d("VIDEOJS");var p=h.createLogger;function v(e){return e.replace(/\n\r?\s*/g,"")}var m=function e(t){var r="",i=0;for(;i<arguments.length;i++){r+=v(t[i])+(arguments[i+1]||"")}return r};var g=Object.prototype.toString;var y=function e(t){return S(t)?Object.keys(t):[]};function _(e,t){y(e).forEach(function(r){return t(e[r],r)})}function b(e,t,r){if(r===void 0){r=0}return y(e).reduce(function(r,i){return t(r,e[i],i)},r)}function T(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}if(Object.assign){return Object.assign.apply(Object,[e].concat(r))}r.forEach(function(t){if(!t){return}_(t,function(t,r){e[r]=t})});return e}function S(e){return!!e&&typeof e==="object"}function k(e){return S(e)&&g.call(e)==="[object Object]"&&e.constructor===Object}function w(e,r){if(!e||!r){return""}if(typeof t.getComputedStyle==="function"){var i=t.getComputedStyle(e);return i?i[r]:""}return""}function E(){var e=l(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);E=function t(){return e};return e}function C(e){return typeof e==="string"&&/\S/.test(e)}function I(e){if(/\s/.test(e)){throw new Error("class has illegal whitespace characters")}}function A(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function O(){return r===t.document}function P(e){return S(e)&&e.nodeType===1}function L(){try{return t.parent!==t.self}catch(e){return true}}function x(e){return function(t,i){if(!C(t)){return r[e](null)}if(C(i)){i=r.querySelector(i)}var n=P(i)?i:r;return n[e]&&n[e](t)}}function D(e,t,i,n){if(e===void 0){e="div"}if(t===void 0){t={}}if(i===void 0){i={}}var a=r.createElement(e);Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];if(e.indexOf("aria-")!==-1||e==="role"||e==="type"){h.warn(m(E(),e,r));a.setAttribute(e,r)}else if(e==="textContent"){U(a,r)}else{a[e]=r}});Object.getOwnPropertyNames(i).forEach(function(e){a.setAttribute(e,i[e])});if(n){Z(a,n)}return a}function U(e,t){if(typeof e.textContent==="undefined"){e.innerText=t}else{e.textContent=t}return e}function R(e,t){if(t.firstChild){t.insertBefore(e,t.firstChild)}else{t.appendChild(e)}}function M(e,t){I(t);if(e.classList){return e.classList.contains(t)}return A(t).test(e.className)}function j(e,t){if(e.classList){e.classList.add(t)}else if(!M(e,t)){e.className=(e.className+" "+t).trim()}return e}function N(e,t){if(e.classList){e.classList.remove(t)}else{I(t);e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")}return e}function B(e,t,r){var i=M(e,t);if(typeof r==="function"){r=r(e,t)}if(typeof r!=="boolean"){r=!i}if(r===i){return}if(r){j(e,t)}else{N(e,t)}return e}function F(e,t){Object.getOwnPropertyNames(t).forEach(function(r){var i=t[r];if(i===null||typeof i==="undefined"||i===false){e.removeAttribute(r)}else{e.setAttribute(r,i===true?"":i)}})}function q(e){var t={};var r=","+"autoplay,controls,playsinline,loop,muted,default,defaultMuted"+",";if(e&&e.attributes&&e.attributes.length>0){var i=e.attributes;for(var n=i.length-1;n>=0;n--){var a=i[n].name;var s=i[n].value;if(typeof e[a]==="boolean"||r.indexOf(","+a+",")!==-1){s=s!==null?true:false}t[a]=s}}return t}function V(e,t){return e.getAttribute(t)}function H(e,t,r){e.setAttribute(t,r)}function z(e,t){e.removeAttribute(t)}function W(){r.body.focus();r.onselectstart=function(){return false}}function G(){r.onselectstart=function(){return true}}function Y(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect();var r={};["bottom","height","left","right","top","width"].forEach(function(e){if(t[e]!==undefined){r[e]=t[e]}});if(!r.height){r.height=parseFloat(w(e,"height"))}if(!r.width){r.width=parseFloat(w(e,"width"))}return r}}function X(e){var i;if(e.getBoundingClientRect&&e.parentNode){i=e.getBoundingClientRect()}if(!i){return{left:0,top:0}}var n=r.documentElement;var a=r.body;var s=n.clientLeft||a.clientLeft||0;var o=t.pageXOffset||a.scrollLeft;var u=i.left+o-s;var l=n.clientTop||a.clientTop||0;var c=t.pageYOffset||a.scrollTop;var f=i.top+c-l;return{left:Math.round(u),top:Math.round(f)}}function K(e,t){var r={};var i=X(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=i.top;var o=i.left;var u=t.pageY;var l=t.pageX;if(t.changedTouches){l=t.changedTouches[0].pageX;u=t.changedTouches[0].pageY}r.y=Math.max(0,Math.min(1,(s-u+a)/a));r.x=Math.max(0,Math.min(1,(l-o)/n));return r}function $(e){return S(e)&&e.nodeType===3}function Q(e){while(e.firstChild){e.removeChild(e.firstChild)}return e}function J(e){if(typeof e==="function"){e=e()}return(Array.isArray(e)?e:[e]).map(function(e){if(typeof e==="function"){e=e()}if(P(e)||$(e)){return e}if(typeof e==="string"&&/\S/.test(e)){return r.createTextNode(e)}}).filter(function(e){return e})}function Z(e,t){J(t).forEach(function(t){return e.appendChild(t)});return e}function ee(e,t){return Z(Q(e),t)}function te(e){if(e.button===undefined&&e.buttons===undefined){return true}if(e.button===0&&e.buttons===undefined){return true}if(e.button!==0||e.buttons!==1){return false}return true}var re=x("querySelector");var ie=x("querySelectorAll");var ne=Object.freeze({isReal:O,isEl:P,isInFrame:L,createEl:D,textContent:U,prependTo:R,hasClass:M,addClass:j,removeClass:N,toggleClass:B,setAttributes:F,getAttributes:q,getAttribute:V,setAttribute:H,removeAttribute:z,blockTextSelection:W,unblockTextSelection:G,getBoundingClientRect:Y,findPosition:X,getPointerPosition:K,isTextNode:$,emptyEl:Q,normalizeContent:J,appendContent:Z,insertContent:ee,isSingleLeftClick:te,$:re,$$:ie});var ae=1;function se(){return ae++}var oe={};var ue="vdata"+(new Date).getTime();function le(e){var t=e[ue];if(!t){t=e[ue]=se()}if(!oe[t]){oe[t]={}}return oe[t]}function ce(e){var t=e[ue];if(!t){return false}return!!Object.getOwnPropertyNames(oe[t]).length}function fe(e){var t=e[ue];if(!t){return}delete oe[t];try{delete e[ue]}catch(t){if(e.removeAttribute){e.removeAttribute(ue)}else{e[ue]=null}}}function de(e,t){var r=le(e);if(r.handlers[t].length===0){delete r.handlers[t];if(e.removeEventListener){e.removeEventListener(t,r.dispatcher,false)}else if(e.detachEvent){e.detachEvent("on"+t,r.dispatcher)}}if(Object.getOwnPropertyNames(r.handlers).length<=0){delete r.handlers;delete r.dispatcher;delete r.disabled}if(Object.getOwnPropertyNames(r).length===0){fe(e)}}function he(e,t,r,i){r.forEach(function(r){e(t,r,i)})}function pe(e){function i(){return true}function n(){return false}if(!e||!e.isPropagationStopped){var a=e||t.event;e={};for(var s in a){if(s!=="layerX"&&s!=="layerY"&&s!=="keyLocation"&&s!=="webkitMovementX"&&s!=="webkitMovementY"){if(!(s==="returnValue"&&a.preventDefault)){e[s]=a[s]}}}if(!e.target){e.target=e.srcElement||r}if(!e.relatedTarget){e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement}e.preventDefault=function(){if(a.preventDefault){a.preventDefault()}e.returnValue=false;a.returnValue=false;e.defaultPrevented=true};e.defaultPrevented=false;e.stopPropagation=function(){if(a.stopPropagation){a.stopPropagation()}e.cancelBubble=true;a.cancelBubble=true;e.isPropagationStopped=i};e.isPropagationStopped=n;e.stopImmediatePropagation=function(){if(a.stopImmediatePropagation){a.stopImmediatePropagation()}e.isImmediatePropagationStopped=i;e.stopPropagation()};e.isImmediatePropagationStopped=n;if(e.clientX!==null&&e.clientX!==undefined){var o=r.documentElement;var u=r.body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0);e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode;if(e.button!==null&&e.button!==undefined){e.button=e.button&1?0:e.button&4?1:e.button&2?2:0}}return e}var ve=false;(function(){try{var e=Object.defineProperty({},"passive",{get:function e(){ve=true}});t.addEventListener("test",null,e);t.removeEventListener("test",null,e)}catch(e){}})();var me=["touchstart","touchmove"];function ge(e,t,r){if(Array.isArray(t)){return he(ge,e,t,r)}var i=le(e);if(!i.handlers){i.handlers={}}if(!i.handlers[t]){i.handlers[t]=[]}if(!r.guid){r.guid=se()}i.handlers[t].push(r);if(!i.dispatcher){i.disabled=false;i.dispatcher=function(t,r){if(i.disabled){return}t=pe(t);var n=i.handlers[t.type];if(n){var a=n.slice(0);for(var s=0,o=a.length;s<o;s++){if(t.isImmediatePropagationStopped()){break}else{try{a[s].call(e,t,r)}catch(e){h.error(e)}}}}}}if(i.handlers[t].length===1){if(e.addEventListener){var n=false;if(ve&&me.indexOf(t)>-1){n={passive:true}}e.addEventListener(t,i.dispatcher,n)}else if(e.attachEvent){e.attachEvent("on"+t,i.dispatcher)}}}function ye(e,t,r){if(!ce(e)){return}var i=le(e);if(!i.handlers){return}if(Array.isArray(t)){return he(ye,e,t,r)}var n=function e(t,r){i.handlers[r]=[];de(t,r)};if(t===undefined){for(var a in i.handlers){if(Object.prototype.hasOwnProperty.call(i.handlers||{},a)){n(e,a)}}return}var s=i.handlers[t];if(!s){return}if(!r){n(e,t);return}if(r.guid){for(var o=0;o<s.length;o++){if(s[o].guid===r.guid){s.splice(o--,1)}}}de(e,t)}function _e(e,t,r){var i=ce(e)?le(e):{};var n=e.parentNode||e.ownerDocument;if(typeof t==="string"){t={type:t,target:e}}else if(!t.target){t.target=e}t=pe(t);if(i.dispatcher){i.dispatcher.call(e,t,r)}if(n&&!t.isPropagationStopped()&&t.bubbles===true){_e.call(null,n,t,r)}else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){var a=le(t.target);if(t.target[t.type]){a.disabled=true;if(typeof t.target[t.type]==="function"){t.target[t.type]()}a.disabled=false}}return!t.defaultPrevented}function be(e,t,r){if(Array.isArray(t)){return he(be,e,t,r)}var i=function i(){ye(e,t,i);r.apply(this,arguments)};i.guid=r.guid=r.guid||se();ge(e,t,i)}var Te=Object.freeze({fixEvent:pe,on:ge,off:ye,trigger:_e,one:be});var Se=false;var ke;var we=function e(){if(!O()||ke.options.autoSetup===false){return}var t=Array.prototype.slice.call(r.getElementsByTagName("video"));var i=Array.prototype.slice.call(r.getElementsByTagName("audio"));var n=Array.prototype.slice.call(r.getElementsByTagName("video-js"));var a=t.concat(i,n);if(a&&a.length>0){for(var s=0,o=a.length;s<o;s++){var u=a[s];if(u&&u.getAttribute){if(u.player===undefined){var l=u.getAttribute("data-setup");if(l!==null){ke(u)}}}else{Ee(1);break}}}else if(!Se){Ee(1)}};function Ee(e,r){if(r){ke=r}t.setTimeout(we,e)}if(O()&&r.readyState==="complete"){Se=true}else{be(t,"load",function(){Se=true})}var Ce=function e(t){var i=r.createElement("style");i.className=t;return i};var Ie=function e(t,r){if(t.styleSheet){t.styleSheet.cssText=r}else{t.textContent=r}};var Ae=function e(t,r,i){if(!r.guid){r.guid=se()}var n=function e(){return r.apply(t,arguments)};n.guid=i?i+"_"+r.guid:r.guid;return n};var Oe=function e(t,r){var i=Date.now();var n=function e(){var n=Date.now();if(n-i>=r){t.apply(void 0,arguments);i=n}};return n};var Pe=function e(r,i,n,a){if(a===void 0){a=t}var s;var o=function e(){a.clearTimeout(s);s=null};var u=function e(){var t=this;var o=arguments;var u=function e(){s=null;u=null;if(!n){r.apply(t,o)}};if(!s&&n){r.apply(t,o)}a.clearTimeout(s);s=a.setTimeout(u,i)};u.cancel=o;return u};var Le=function e(){};Le.prototype.allowedEvents_={};Le.prototype.on=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};ge(this,e,t);this.addEventListener=r};Le.prototype.addEventListener=Le.prototype.on;Le.prototype.off=function(e,t){ye(this,e,t)};Le.prototype.removeEventListener=Le.prototype.off;Le.prototype.one=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};be(this,e,t);this.addEventListener=r};Le.prototype.trigger=function(e){var t=e.type||e;if(typeof e==="string"){e={type:t}}e=pe(e);if(this.allowedEvents_[t]&&this["on"+t]){this["on"+t](e)}_e(this,e)};Le.prototype.dispatchEvent=Le.prototype.trigger;var xe;Le.prototype.queueTrigger=function(e){var r=this;if(!xe){xe=new Map}var i=e.type||e;var n=xe.get(this);if(!n){n=new Map;xe.set(this,n)}var a=n.get(i);n.delete(i);t.clearTimeout(a);var s=t.setTimeout(function(){if(n.size===0){n=null;xe.delete(r)}r.trigger(e)},0);n.set(i,s)};var De=function e(t){return t instanceof Le||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return typeof t[e]==="function"})};var Ue=function e(t,r){if(De(t)){r()}else{if(!t.eventedCallbacks){t.eventedCallbacks=[]}t.eventedCallbacks.push(r)}};var Re=function e(t){return typeof t==="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length};var Me=function e(t){if(!t.nodeName&&!De(t)){throw new Error("Invalid target; must be a DOM node or evented object.")}};var je=function e(t){if(!Re(t)){throw new Error("Invalid event type; must be a non-empty string or array.")}};var Ne=function e(t){if(typeof t!=="function"){throw new Error("Invalid listener; must be a function.")}};var Be=function e(t,r){var i=r.length<3||r[0]===t||r[0]===t.eventBusEl_;var n;var a;var s;if(i){n=t.eventBusEl_;if(r.length>=3){r.shift()}a=r[0];s=r[1]}else{n=r[0];a=r[1];s=r[2]}Me(n);je(a);Ne(s);s=Ae(t,s);return{isTargetingSelf:i,target:n,type:a,listener:s}};var Fe=function e(t,r,i,n){Me(t);if(t.nodeName){Te[r](t,i,n)}else{t[r](i,n)}};var qe={on:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=Be(this,i),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;Fe(o,"on",u,l);if(!s){var c=function e(){return t.off(o,u,l)};c.guid=l.guid;var f=function e(){return t.off("dispose",c)};f.guid=l.guid;Fe(this,"on","dispose",c);Fe(o,"on","dispose",f)}},one:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=Be(this,i),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;if(s){Fe(o,"one",u,l)}else{var c=function e(){t.off(o,u,e);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}l.apply(null,i)};c.guid=l.guid;Fe(o,"one",u,c)}},off:function e(t,r,i){if(!t||Re(t)){ye(this.eventBusEl_,t,r)}else{var n=t;var a=r;Me(n);je(a);Ne(i);i=Ae(this,i);this.off("dispose",i);if(n.nodeName){ye(n,a,i);ye(n,"dispose",i)}else if(De(n)){n.off(a,i);n.off("dispose",i)}}},trigger:function e(t,r){return _e(this.eventBusEl_,t,r)}};function Ve(e,r){if(r===void 0){r={}}var i=r,n=i.eventBusKey;if(n){if(!e[n].nodeName){throw new Error('The eventBusKey "'+n+'" does not refer to an element.')}e.eventBusEl_=e[n]}else{e.eventBusEl_=D("span",{className:"vjs-event-bus"})}T(e,qe);if(e.eventedCallbacks){e.eventedCallbacks.forEach(function(e){e()})}e.on("dispose",function(){e.off();t.setTimeout(function(){e.eventBusEl_=null},0)});return e}var He={state:{},setState:function e(t){var r=this;if(typeof t==="function"){t=t()}var i;_(t,function(e,t){if(r.state[t]!==e){i=i||{};i[t]={from:r.state[t],to:e}}r.state[t]=e});if(i&&De(this)){this.trigger({changes:i,type:"statechanged"})}return i}};function ze(e,t){T(e,He);e.state=T({},e.state,t);if(typeof e.handleStateChanged==="function"&&De(e)){e.on("statechanged",e.handleStateChanged)}return e}function We(e){if(typeof e!=="string"){return e}return e.charAt(0).toUpperCase()+e.slice(1)}function Ge(e,t){return We(e)===We(t)}function Ye(){var e={};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}r.forEach(function(t){if(!t){return}_(t,function(t,r){if(!k(t)){e[r]=t;return}if(!k(e[r])){e[r]={}}e[r]=Ye(e[r],t)})});return e}var Xe=function(){function e(e,t,r){if(!e&&this.play){this.player_=e=this}else{this.player_=e}this.parentComponent_=null;this.options_=Ye({},this.options_);t=this.options_=Ye(this.options_,t);this.id_=t.id||t.el&&t.el.id;if(!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+se()}this.name_=t.name||null;if(t.el){this.el_=t.el}else if(t.createEl!==false){this.el_=this.createEl()}if(t.evented!==false){Ve(this,{eventBusKey:this.el_?"el_":null})}ze(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};if(t.initChildren!==false){this.initChildren()}this.ready(r);if(t.reportTouchActivity!==false){this.enableTouchActivity()}}var r=e.prototype;r.dispose=function e(){this.trigger({type:"dispose",bubbles:false});if(this.children_){for(var t=this.children_.length-1;t>=0;t--){if(this.children_[t].dispose){this.children_[t].dispose()}}}this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.parentComponent_=null;if(this.el_){if(this.el_.parentNode){this.el_.parentNode.removeChild(this.el_)}fe(this.el_);this.el_=null}this.player_=null};r.player=function e(){return this.player_};r.options=function e(t){h.warn("this.options() has been deprecated and will be moved to the constructor in 6.0");if(!t){return this.options_}this.options_=Ye(this.options_,t);return this.options_};r.el=function e(){return this.el_};r.createEl=function e(t,r,i){return D(t,r,i)};r.localize=function e(t,r,i){if(i===void 0){i=t}var n=this.player_.language&&this.player_.language();var a=this.player_.languages&&this.player_.languages();var s=a&&a[n];var o=n&&n.split("-")[0];var u=a&&a[o];var l=i;if(s&&s[t]){l=s[t]}else if(u&&u[t]){l=u[t]}if(r){l=l.replace(/\{(\d+)\}/g,function(e,t){var i=r[t-1];var n=i;if(typeof i==="undefined"){n=e}return n})}return l};r.contentEl=function e(){return this.contentEl_||this.el_};r.id=function e(){return this.id_};r.name=function e(){return this.name_};r.children=function e(){return this.children_};r.getChildById=function e(t){return this.childIndex_[t]};r.getChild=function e(t){if(!t){return}t=We(t);return this.childNameIndex_[t]};r.addChild=function t(r,i,n){if(i===void 0){i={}}if(n===void 0){n=this.children_.length}var a;var s;if(typeof r==="string"){s=We(r);var o=i.componentClass||s;i.name=s;var u=e.getComponent(o);if(!u){throw new Error("Component "+o+" does not exist")}if(typeof u!=="function"){return null}a=new u(this.player_||this,i)}else{a=r}if(a.parentComponent_){a.parentComponent_.removeChild(a)}this.children_.splice(n,0,a);a.parentComponent_=this;if(typeof a.id==="function"){this.childIndex_[a.id()]=a}s=s||a.name&&We(a.name());if(s){this.childNameIndex_[s]=a}if(typeof a.el==="function"&&a.el()){var l=this.contentEl().children;var c=l[n]||null;this.contentEl().insertBefore(a.el(),c)}return a};r.removeChild=function e(t){if(typeof t==="string"){t=this.getChild(t)}if(!t||!this.children_){return}var r=false;for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i]===t){r=true;this.children_.splice(i,1);break}}if(!r){return}t.parentComponent_=null;this.childIndex_[t.id()]=null;this.childNameIndex_[t.name()]=null;var n=t.el();if(n&&n.parentNode===this.contentEl()){this.contentEl().removeChild(t.el())}};r.initChildren=function t(){var r=this;var i=this.options_.children;if(i){var n=this.options_;var a=function e(t){var i=t.name;var a=t.opts;if(n[i]!==undefined){a=n[i]}if(a===false){return}if(a===true){a={}}a.playerOptions=r.options_.playerOptions;var s=r.addChild(i,a);if(s){r[i]=s}};var s;var o=e.getComponent("Tech");if(Array.isArray(i)){s=i}else{s=Object.keys(i)}s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){if(typeof t==="string"){return e===t}return e===t.name})})).map(function(e){var t;var n;if(typeof e==="string"){t=e;n=i[t]||r.options_[t]||{}}else{t=e.name;n=e}return{name:t,opts:n}}).filter(function(t){var r=e.getComponent(t.opts.componentClass||We(t.name));return r&&!o.isTech(r)}).forEach(a)}};r.buildCSSClass=function e(){return""};r.ready=function e(t,r){if(r===void 0){r=false}if(!t){return}if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(t);return}if(r){t.call(this)}else{this.setTimeout(t,1)}};r.triggerReady=function e(){this.isReady_=true;this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[];if(e&&e.length>0){e.forEach(function(e){e.call(this)},this)}this.trigger("ready")},1)};r.$=function e(t,r){return re(t,r||this.contentEl())};r.$$=function e(t,r){return ie(t,r||this.contentEl())};r.hasClass=function e(t){return M(this.el_,t)};r.addClass=function e(t){j(this.el_,t)};r.removeClass=function e(t){N(this.el_,t)};r.toggleClass=function e(t,r){B(this.el_,t,r)};r.show=function e(){this.removeClass("vjs-hidden")};r.hide=function e(){this.addClass("vjs-hidden")};r.lockShowing=function e(){this.addClass("vjs-lock-showing")};r.unlockShowing=function e(){this.removeClass("vjs-lock-showing")};r.getAttribute=function e(t){return V(this.el_,t)};r.setAttribute=function e(t,r){H(this.el_,t,r)};r.removeAttribute=function e(t){z(this.el_,t)};r.width=function e(t,r){return this.dimension("width",t,r)};r.height=function e(t,r){return this.dimension("height",t,r)};r.dimensions=function e(t,r){this.width(t,true);this.height(r)};r.dimension=function e(t,r,i){if(r!==undefined){if(r===null||r!==r){r=0}if((""+r).indexOf("%")!==-1||(""+r).indexOf("px")!==-1){this.el_.style[t]=r}else if(r==="auto"){this.el_.style[t]=""}else{this.el_.style[t]=r+"px"}if(!i){this.trigger("componentresize")}return}if(!this.el_){return 0}var n=this.el_.style[t];var a=n.indexOf("px");if(a!==-1){return parseInt(n.slice(0,a),10)}return parseInt(this.el_["offset"+We(t)],10)};r.currentDimension=function e(r){var i=0;if(r!=="width"&&r!=="height"){throw new Error("currentDimension only accepts width or height value")}if(typeof t.getComputedStyle==="function"){var n=t.getComputedStyle(this.el_);i=n.getPropertyValue(r)||n[r]}i=parseFloat(i);if(i===0){var a="offset"+We(r);i=this.el_[a]}return i};r.currentDimensions=function e(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};r.currentWidth=function e(){return this.currentDimension("width")};r.currentHeight=function e(){return this.currentDimension("height")};r.focus=function e(){this.el_.focus()};r.blur=function e(){this.el_.blur()};r.handleKeyDown=function e(t){if(this.player_){t.stopPropagation();this.player_.handleKeyDown(t)}};r.handleKeyPress=function e(t){this.handleKeyDown(t)};r.emitTapEvents=function e(){var t=0;var r=null;var i=10;var n=200;var a;this.on("touchstart",function(e){if(e.touches.length===1){r={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};t=(new Date).getTime();a=true}});this.on("touchmove",function(e){if(e.touches.length>1){a=false}else if(r){var t=e.touches[0].pageX-r.pageX;var n=e.touches[0].pageY-r.pageY;var s=Math.sqrt(t*t+n*n);if(s>i){a=false}}});var s=function e(){a=false};this.on("touchleave",s);this.on("touchcancel",s);this.on("touchend",function(e){r=null;if(a===true){var i=(new Date).getTime()-t;if(i<n){e.preventDefault();this.trigger("tap")}}})};r.enableTouchActivity=function e(){if(!this.player()||!this.player().reportUserActivity){return}var t=Ae(this.player(),this.player().reportUserActivity);var r;this.on("touchstart",function(){t();this.clearInterval(r);r=this.setInterval(t,250)});var i=function e(i){t();this.clearInterval(r)};this.on("touchmove",t);this.on("touchend",i);this.on("touchcancel",i)};r.setTimeout=function e(r,i){var n=this;var a,s;r=Ae(this,r);a=t.setTimeout(function(){n.off("dispose",s);r()},i);s=function e(){return n.clearTimeout(a)};s.guid="vjs-timeout-"+a;this.on("dispose",s);return a};r.clearTimeout=function e(r){t.clearTimeout(r);var i=function e(){};i.guid="vjs-timeout-"+r;this.off("dispose",i);return r};r.setInterval=function e(r,i){var n=this;r=Ae(this,r);var a=t.setInterval(r,i);var s=function e(){return n.clearInterval(a)};s.guid="vjs-interval-"+a;this.on("dispose",s);return a};r.clearInterval=function e(r){t.clearInterval(r);var i=function e(){};i.guid="vjs-interval-"+r;this.off("dispose",i);return r};r.requestAnimationFrame=function e(r){var i=this;var n,a;if(this.supportsRaf_){r=Ae(this,r);n=t.requestAnimationFrame(function(){i.off("dispose",a);r()});a=function e(){return i.cancelAnimationFrame(n)};a.guid="vjs-raf-"+n;this.on("dispose",a);return n}return this.setTimeout(r,1e3/60)};r.cancelAnimationFrame=function e(r){if(this.supportsRaf_){t.cancelAnimationFrame(r);var i=function e(){};i.guid="vjs-raf-"+r;this.off("dispose",i);return r}return this.clearTimeout(r)};e.registerComponent=function t(r,i){if(typeof r!=="string"||!r){throw new Error('Illegal component name, "'+r+'"; must be a non-empty string.')}var n=e.getComponent("Tech");var a=n&&n.isTech(i);var s=e===i||e.prototype.isPrototypeOf(i.prototype);if(a||!s){var o;if(a){o="techs must be registered using Tech.registerTech()"}else{o="must be a Component subclass"}throw new Error('Illegal component, "'+r+'"; '+o+".")}r=We(r);if(!e.components_){e.components_={}}var u=e.getComponent("Player");if(r==="Player"&&u&&u.players){var l=u.players;var c=Object.keys(l);if(l&&c.length>0&&c.map(function(e){return l[e]}).every(Boolean)){throw new Error("Can not register Player component after player has been created.")}}e.components_[r]=i;return i};e.getComponent=function t(r){if(!r){return}r=We(r);if(e.components_&&e.components_[r]){return e.components_[r]}};return e}();Xe.prototype.supportsRaf_=typeof t.requestAnimationFrame==="function"&&typeof t.cancelAnimationFrame==="function";Xe.registerComponent("Component",Xe);var Ke=t.navigator&&t.navigator.userAgent||"";var $e=/AppleWebKit\/([\d.]+)/i.exec(Ke);var Qe=$e?parseFloat($e.pop()):null;var Je=/iPad/i.test(Ke);var Ze=/iPhone/i.test(Ke)&&!Je;var et=/iPod/i.test(Ke);var tt=Ze||Je||et;var rt=function(){var e=Ke.match(/OS (\d+)_/i);if(e&&e[1]){return e[1]}return null}();var it=/Android/i.test(Ke);var nt=function(){var e=Ke.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e){return null}var t=e[1]&&parseFloat(e[1]);var r=e[2]&&parseFloat(e[2]);if(t&&r){return parseFloat(e[1]+"."+e[2])}else if(t){return t}return null}();var at=it&&nt<5&&Qe<537;var st=/Firefox/i.test(Ke);var ot=/Edge/i.test(Ke);var ut=!ot&&(/Chrome/i.test(Ke)||/CriOS/i.test(Ke));var lt=function(){var e=Ke.match(/(Chrome|CriOS)\/(\d+)/);if(e&&e[2]){return parseFloat(e[2])}return null}();var ct=function(){var e=/MSIE\s(\d+)\.\d/.exec(Ke);var t=e&&parseFloat(e[1]);if(!t&&/Trident\/7.0/i.test(Ke)&&/rv:11.0/.test(Ke)){t=11}return t}();var ft=/Safari/i.test(Ke)&&!ut&&!it&&!ot;var dt=(ft||tt)&&!ut;var ht=O()&&("ontouchstart"in t||t.navigator.maxTouchPoints||t.DocumentTouch&&t.document instanceof t.DocumentTouch);var pt=Object.freeze({IS_IPAD:Je,IS_IPHONE:Ze,IS_IPOD:et,IS_IOS:tt,IOS_VERSION:rt,IS_ANDROID:it,ANDROID_VERSION:nt,IS_NATIVE_ANDROID:at,IS_FIREFOX:st,IS_EDGE:ot,IS_CHROME:ut,CHROME_VERSION:lt,IE_VERSION:ct,IS_SAFARI:ft,IS_ANY_SAFARI:dt,TOUCH_ENABLED:ht});function vt(e,t,r){if(typeof t!=="number"||t<0||t>r){throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+r+").")}}function mt(e,t,r,i){vt(e,i,r.length-1);return r[i][t]}function gt(e){if(e===undefined||e.length===0){return{length:0,start:function e(){throw new Error("This TimeRanges object is empty")},end:function e(){throw new Error("This TimeRanges object is empty")}}}return{length:e.length,start:mt.bind(null,"start",0,e),end:mt.bind(null,"end",1,e)}}function yt(e,t){if(Array.isArray(e)){return gt(e)}else if(e===undefined||t===undefined){return gt()}return gt([[e,t]])}function _t(e,t){var r=0;var i;var n;if(!t){return 0}if(!e||!e.length){e=yt(0,0)}for(var a=0;a<e.length;a++){i=e.start(a);n=e.end(a);if(n>t){n=t}r+=n-i}return r/t}var bt={};var Tt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]];var St=Tt[0];var kt;var wt=false;for(var Et=0;Et<Tt.length;Et++){if(Tt[Et][1]in r){kt=Tt[Et];break}}if(kt){for(var Ct=0;Ct<kt.length;Ct++){bt[St[Ct]]=kt[Ct]}wt=kt[0]===St[0]}function It(e){if(e instanceof It){return e}if(typeof e==="number"){this.code=e}else if(typeof e==="string"){this.message=e}else if(S(e)){if(typeof e.code==="number"){this.code=e.code}T(this,e)}if(!this.message){this.message=It.defaultMessages[this.code]||""}}It.prototype.code=0;It.prototype.message="";It.prototype.status=null;It.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];It.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var At=0;At<It.errorTypes.length;At++){It[It.errorTypes[At]]=At;It.prototype[It.errorTypes[At]]=At}var Ot=Pt;function Pt(e,t){var r;var i=null;try{r=JSON.parse(e,t)}catch(e){i=e}return[i,r]}function Lt(e){return e!==undefined&&e!==null&&typeof e.then==="function"}function xt(e){if(Lt(e)){e.then(null,function(e){})}}var Dt=function e(t){var r=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,r,i){if(t[r]){e[r]=t[r]}return e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})});return r};var Ut=function e(t){var r=t.$$("track");var i=Array.prototype.map.call(r,function(e){return e.track});var n=Array.prototype.map.call(r,function(e){var t=Dt(e.track);if(e.src){t.src=e.src}return t});return n.concat(Array.prototype.filter.call(t.textTracks(),function(e){return i.indexOf(e)===-1}).map(Dt))};var Rt=function e(t,r){t.forEach(function(e){var t=r.addRemoteTextTrack(e).track;if(!e.src&&e.cues){e.cues.forEach(function(e){return t.addCue(e)})}});return r.textTracks()};var Mt={textTracksToJson:Ut,jsonToTextTracks:Rt,trackToJson_:Dt};function jt(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Nt=jt(function(e,t){function r(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;if(t)e=t}if("number"===typeof e)return s[e];var r=String(e);var a=i[r.toLowerCase()];if(a)return a;var a=n[r.toLowerCase()];if(a)return a;if(r.length===1)return r.charCodeAt(0);return undefined}r.isEventKey=function e(t,r){if(t&&"object"===typeof t){var a=t.which||t.keyCode||t.charCode;if(a===null||a===undefined){return false}if(typeof r==="string"){var s=i[r.toLowerCase()];if(s){return s===a}var s=n[r.toLowerCase()];if(s){return s===a}}else if(typeof r==="number"){return r===a}return false}};t=e.exports=r;var i=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};var n=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++){i[String.fromCharCode(a)]=a-32}for(var a=48;a<58;a++){i[a-48]=a}for(a=1;a<13;a++){i["f"+a]=a+111}for(a=0;a<10;a++){i["numpad "+a]=a+96}var s=t.names=t.title={};for(a in i){s[i[a]]=a}for(var o in n){i[o]=n[o]}});var Bt=Nt.code;var Ft=Nt.codes;var qt=Nt.aliases;var Vt=Nt.names;var Ht=Nt.title;var zt="vjs-modal-dialog";var Wt=function(e){n(i,e);function i(t,r){var i;i=e.call(this,t,r)||this;i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=false;i.closeable(!i.options_.uncloseable);i.content(i.options_.content);i.contentEl_=D("div",{className:zt+"-content"},{role:"document"});i.descEl_=D("p",{className:zt+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")});U(i.descEl_,i.description());i.el_.appendChild(i.descEl_);i.el_.appendChild(i.contentEl_);return i}var a=i.prototype;a.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})};a.dispose=function t(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;e.prototype.dispose.call(this)};a.buildCSSClass=function t(){return zt+" vjs-hidden "+e.prototype.buildCSSClass.call(this)};a.label=function e(){return this.localize(this.options_.label||"Modal Window")};a.description=function e(){var t=this.options_.description||this.localize("This is a modal window.");if(this.closeable()){t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")}return t};a.open=function e(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen");this.opened_=true;if(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_){this.fill()}this.wasPlaying_=!t.paused();if(this.options_.pauseOnOpen&&this.wasPlaying_){t.pause()}this.on("keydown",this.handleKeyDown);this.hadControls_=t.controls();t.controls(false);this.show();this.conditionalFocus_();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=true}};a.opened=function e(t){if(typeof t==="boolean"){this[t?"open":"close"]()}return this.opened_};a.close=function e(){if(!this.opened_){return}var t=this.player();this.trigger("beforemodalclose");this.opened_=false;if(this.wasPlaying_&&this.options_.pauseOnOpen){t.play()}this.off("keydown",this.handleKeyDown);if(this.hadControls_){t.controls(true)}this.hide();this.el().setAttribute("aria-hidden","true");this.trigger("modalclose");this.conditionalBlur_();if(this.options_.temporary){this.dispose()}};a.closeable=function e(t){if(typeof t==="boolean"){var e=this.closeable_=!!t;var r=this.getChild("closeButton");if(e&&!r){var i=this.contentEl_;this.contentEl_=this.el_;r=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=i;this.on(r,"close",this.close)}if(!e&&r){this.off(r,"close",this.close);this.removeChild(r);r.dispose()}}return this.closeable_};a.fill=function e(){this.fillWith(this.content())};a.fillWith=function e(t){var r=this.contentEl();var i=r.parentNode;var n=r.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=true;i.removeChild(r);this.empty();ee(r,t);this.trigger("modalfill");if(n){i.insertBefore(r,n)}else{i.appendChild(r)}var a=this.getChild("closeButton");if(a){i.appendChild(a.el_)}};a.empty=function e(){this.trigger("beforemodalempty");Q(this.contentEl());this.trigger("modalempty")};a.content=function e(t){if(typeof t!=="undefined"){this.content_=t}return this.content_};a.conditionalFocus_=function e(){var t=r.activeElement;var i=this.player_.el_;this.previouslyActiveEl_=null;if(i.contains(t)||i===t){this.previouslyActiveEl_=t;this.focus()}};a.conditionalBlur_=function e(){if(this.previouslyActiveEl_){this.previouslyActiveEl_.focus();this.previouslyActiveEl_=null}};a.handleKeyDown=function e(t){t.stopPropagation();if(Nt.isEventKey(t,"Escape")&&this.closeable()){t.preventDefault();this.close();return}if(!Nt.isEventKey(t,"Tab")){return}var i=this.focusableEls_();var n=this.el_.querySelector(":focus");var a;for(var s=0;s<i.length;s++){if(n===i[s]){a=s;break}}if(r.activeElement===this.el_){a=0}if(t.shiftKey&&a===0){i[i.length-1].focus();t.preventDefault()}else if(!t.shiftKey&&a===i.length-1){i[0].focus();t.preventDefault()}};a.focusableEls_=function e(){var r=this.el_.querySelectorAll("*");return Array.prototype.filter.call(r,function(e){return(e instanceof t.HTMLAnchorElement||e instanceof t.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof t.HTMLInputElement||e instanceof t.HTMLSelectElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof t.HTMLIFrameElement||e instanceof t.HTMLObjectElement||e instanceof t.HTMLEmbedElement||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!==-1||e.hasAttribute("contenteditable")})};return i}(Xe);Wt.prototype.options_={pauseOnOpen:true,temporary:true};Xe.registerComponent("ModalDialog",Wt);var Gt=function(e){n(t,e);function t(t){var r;if(t===void 0){t=[]}r=e.call(this)||this;r.tracks_=[];Object.defineProperty(u(u(r)),"length",{get:function e(){return this.tracks_.length}});for(var i=0;i<t.length;i++){r.addTrack(t[i])}return r}var r=t.prototype;r.addTrack=function e(t){var r=this.tracks_.length;if(!(""+r in this)){Object.defineProperty(this,r,{get:function e(){return this.tracks_[r]}})}if(this.tracks_.indexOf(t)===-1){this.tracks_.push(t);this.trigger({track:t,type:"addtrack",target:this})}};r.removeTrack=function e(t){var r;for(var i=0,n=this.length;i<n;i++){if(this[i]===t){r=this[i];if(r.off){r.off()}this.tracks_.splice(i,1);break}}if(!r){return}this.trigger({track:r,type:"removetrack",target:this})};r.getTrackById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return t}(Le);Gt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Yt in Gt.prototype.allowedEvents_){Gt.prototype["on"+Yt]=null}var Xt=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].enabled=false}};var Kt=function(e){n(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].enabled){Xt(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.enabled){Xt(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.enabledChange_=function(){if(i.changing_){return}i.changing_=true;Xt(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("enabledchange",r.enabledChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.enabledChange_){r.removeEventListener("enabledchange",r.enabledChange_);r.enabledChange_=null}};return t}(Gt);var $t=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].selected=false}};var Qt=function(e){n(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].selected){$t(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;Object.defineProperty(u(u(r)),"selectedIndex",{get:function e(){for(var t=0;t<this.length;t++){if(this[t].selected){return t}}return-1},set:function e(){}});return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.selected){$t(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.selectedChange_=function(){if(i.changing_){return}i.changing_=true;$t(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("selectedchange",r.selectedChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.selectedChange_){r.removeEventListener("selectedchange",r.selectedChange_);r.selectedChange_=null}};return t}(Gt);var Jt=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.addTrack=function t(r){var i=this;e.prototype.addTrack.call(this,r);if(!this.queueChange_){this.queueChange_=function(){return i.queueTrigger("change")}}if(!this.triggerSelectedlanguagechange){this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}}r.addEventListener("modechange",this.queueChange_);var n=["metadata","chapters"];if(n.indexOf(r.kind)===-1){r.addEventListener("modechange",this.triggerSelectedlanguagechange_)}};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener){if(this.queueChange_){r.removeEventListener("modechange",this.queueChange_)}if(this.selectedlanguagechange_){r.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}};return t}(Gt);var Zt=function(){function e(e){if(e===void 0){e=[]}this.trackElements_=[];Object.defineProperty(this,"length",{get:function e(){return this.trackElements_.length}});for(var t=0,r=e.length;t<r;t++){this.addTrackElement_(e[t])}}var t=e.prototype;t.addTrackElement_=function e(t){var r=this.trackElements_.length;if(!(""+r in this)){Object.defineProperty(this,r,{get:function e(){return this.trackElements_[r]}})}if(this.trackElements_.indexOf(t)===-1){this.trackElements_.push(t)}};t.getTrackElementByTrack_=function e(t){var r;for(var i=0,n=this.trackElements_.length;i<n;i++){if(t===this.trackElements_[i].track){r=this.trackElements_[i];break}}return r};t.removeTrackElement_=function e(t){for(var r=0,i=this.trackElements_.length;r<i;r++){if(t===this.trackElements_[r]){if(this.trackElements_[r].track&&typeof this.trackElements_[r].track.off==="function"){this.trackElements_[r].track.off()}if(typeof this.trackElements_[r].off==="function"){this.trackElements_[r].off()}this.trackElements_.splice(r,1);break}}};return e}();var er=function(){function e(t){e.prototype.setCues_.call(this,t);Object.defineProperty(this,"length",{get:function e(){return this.length_}})}var t=e.prototype;t.setCues_=function e(t){var r=this.length||0;var i=0;var n=t.length;this.cues_=t;this.length_=t.length;var a=function e(t){if(!(""+t in this)){Object.defineProperty(this,""+t,{get:function e(){return this.cues_[t]}})}};if(r<n){i=r;for(;i<n;i++){a.call(this,i)}}};t.getCueById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return e}();var tr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"};var rr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"};var ir={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};var nr={disabled:"disabled",hidden:"hidden",showing:"showing"};var ar=function(e){n(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i={id:t.id||"vjs_track_"+se(),kind:t.kind||"",label:t.label||"",language:t.language||""};var n=function e(t){Object.defineProperty(u(u(r)),t,{get:function e(){return i[t]},set:function e(){}})};for(var a in i){n(a)}return r}return t}(Le);var sr=function e(i){var n=["protocol","hostname","port","pathname","search","hash","host"];var a=r.createElement("a");a.href=i;var s=a.host===""&&a.protocol!=="file:";var o;if(s){o=r.createElement("div");o.innerHTML='<a href="'+i+'"></a>';a=o.firstChild;o.setAttribute("style","display:none; position:absolute;");r.body.appendChild(o)}var u={};for(var l=0;l<n.length;l++){u[n[l]]=a[n[l]]}if(u.protocol==="http:"){u.host=u.host.replace(/:80$/,"")}if(u.protocol==="https:"){u.host=u.host.replace(/:443$/,"")}if(!u.protocol){u.protocol=t.location.protocol}if(s){r.body.removeChild(o)}return u};var or=function e(t){if(!t.match(/^https?:\/\//)){var i=r.createElement("div");i.innerHTML='<a href="'+t+'">x</a>';t=i.firstChild.href}return t};var ur=function e(t){if(typeof t==="string"){var r=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i;var i=r.exec(t);if(i){return i.pop().toLowerCase()}}return""};var lr=function e(r){var i=t.location;var n=sr(r);var a=n.protocol===":"?i.protocol:n.protocol;var s=a+n.host!==i.protocol+i.host;return s};var cr=Object.freeze({parseUrl:sr,getAbsoluteURL:or,getFileExtension:ur,isCrossOrigin:lr});var fr=hr;var dr=Object.prototype.toString;function hr(t){var r=dr.call(t);return r==="[object Function]"||typeof t==="function"&&r!=="[object RegExp]"||typeof e!=="undefined"&&(t===e.setTimeout||t===e.alert||t===e.confirm||t===e.prompt)}var pr=jt(function(e,t){t=e.exports=r;function r(e){return e.replace(/^\s*|\s*$/g,"")}t.left=function(e){return e.replace(/^\s*/,"")};t.right=function(e){return e.replace(/\s*$/,"")}});var vr=pr.left;var mr=pr.right;var gr=Function.prototype.toString;var yr=/^\s*class\b/;var _r=function e(t){try{var r=gr.call(t);return yr.test(r)}catch(e){return false}};var br=function e(t){try{if(_r(t)){return false}gr.call(t);return true}catch(e){return false}};var Tr=Object.prototype.toString;var Sr="[object Function]";var kr="[object GeneratorFunction]";var wr=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var Er=function e(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(typeof t==="function"&&!t.prototype){return true}if(wr){return br(t)}if(_r(t)){return false}var r=Tr.call(t);return r===Sr||r===kr};var Cr=Object.prototype.toString;var Ir=Object.prototype.hasOwnProperty;var Ar=function e(t,r,i){for(var n=0,a=t.length;n<a;n++){if(Ir.call(t,n)){if(i==null){r(t[n],n,t)}else{r.call(i,t[n],n,t)}}}};var Or=function e(t,r,i){for(var n=0,a=t.length;n<a;n++){if(i==null){r(t.charAt(n),n,t)}else{r.call(i,t.charAt(n),n,t)}}};var Pr=function e(t,r,i){for(var n in t){if(Ir.call(t,n)){if(i==null){r(t[n],n,t)}else{r.call(i,t[n],n,t)}}}};var Lr=function e(t,r,i){if(!Er(r)){throw new TypeError("iterator must be a function")}var n;if(arguments.length>=3){n=i}if(Cr.call(t)==="[object Array]"){Ar(t,r,n)}else if(typeof t==="string"){Or(t,r,n)}else{Pr(t,r,n)}};var xr=Lr;var Dr=function e(t){return Object.prototype.toString.call(t)==="[object Array]"};var Ur=function e(t){if(!t)return{};var r={};xr(pr(t).split("\n"),function(e){var t=e.indexOf(":"),i=pr(e.slice(0,t)).toLowerCase(),n=pr(e.slice(t+1));if(typeof r[i]==="undefined"){r[i]=n}else if(Dr(r[i])){r[i].push(n)}else{r[i]=[r[i],n]}});return r};var Rr=jr;var Mr=Object.prototype.hasOwnProperty;function jr(){var e={};for(var t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Mr.call(r,i)){e[i]=r[i]}}}return e}var Nr=Vr;Vr.XMLHttpRequest=t.XMLHttpRequest||Wr;Vr.XDomainRequest="withCredentials"in new Vr.XMLHttpRequest?Vr.XMLHttpRequest:t.XDomainRequest;Br(["get","put","post","patch","head","delete"],function(e){Vr[e==="delete"?"del":e]=function(t,r,i){r=qr(t,r,i);r.method=e.toUpperCase();return Hr(r)}});function Br(e,t){for(var r=0;r<e.length;r++){t(e[r])}}function Fr(e){for(var t in e){if(e.hasOwnProperty(t))return false}return true}function qr(e,t,r){var i=e;if(fr(t)){r=t;if(typeof e==="string"){i={uri:e}}}else{i=Rr(t,{uri:e})}i.callback=r;return i}function Vr(e,t,r){t=qr(e,t,r);return Hr(t)}function Hr(e){if(typeof e.callback==="undefined"){throw new Error("callback argument missing")}var t=false;var r=function r(i,n,a){if(!t){t=true;e.callback(i,n,a)}};function i(){if(o.readyState===4){setTimeout(s,0)}}function n(){var e=undefined;if(o.response){e=o.response}else{e=o.responseText||zr(o)}if(v){try{e=JSON.parse(e)}catch(e){}}return e}function a(e){clearTimeout(m);if(!(e instanceof Error)){e=new Error(""+(e||"Unknown XMLHttpRequest Error"))}e.statusCode=0;return r(e,g)}function s(){if(l)return;var t;clearTimeout(m);if(e.useXDR&&o.status===undefined){t=200}else{t=o.status===1223?204:o.status}var i=g;var a=null;if(t!==0){i={body:n(),statusCode:t,method:f,headers:{},url:c,rawRequest:o};if(o.getAllResponseHeaders){i.headers=Ur(o.getAllResponseHeaders())}}else{a=new Error("Internal XMLHttpRequest Error")}return r(a,i,i.body)}var o=e.xhr||null;if(!o){if(e.cors||e.useXDR){o=new Vr.XDomainRequest}else{o=new Vr.XMLHttpRequest}}var u;var l;var c=o.url=e.uri||e.url;var f=o.method=e.method||"GET";var d=e.body||e.data;var h=o.headers=e.headers||{};var p=!!e.sync;var v=false;var m;var g={body:undefined,headers:{},statusCode:0,method:f,url:c,rawRequest:o};if("json"in e&&e.json!==false){v=true;h["accept"]||h["Accept"]||(h["Accept"]="application/json");if(f!=="GET"&&f!=="HEAD"){h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json");d=JSON.stringify(e.json===true?d:e.json)}}o.onreadystatechange=i;o.onload=s;o.onerror=a;o.onprogress=function(){};o.onabort=function(){l=true};o.ontimeout=a;o.open(f,c,!p,e.username,e.password);if(!p){o.withCredentials=!!e.withCredentials}if(!p&&e.timeout>0){m=setTimeout(function(){if(l)return;l=true;o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";a(e)},e.timeout)}if(o.setRequestHeader){for(u in h){if(h.hasOwnProperty(u)){o.setRequestHeader(u,h[u])}}}else if(e.headers&&!Fr(e.headers)){throw new Error("Headers cannot be set on an XDomainRequest object")}if("responseType"in e){o.responseType=e.responseType}if("beforeSend"in e&&typeof e.beforeSend==="function"){e.beforeSend(o)}o.send(d||null);return o}function zr(e){if(e.responseType==="document"){return e.responseXML}var t=e.responseXML&&e.responseXML.documentElement.nodeName==="parsererror";if(e.responseType===""&&!t){return e.responseXML}return null}function Wr(){}var Gr=function e(r,i){var n=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder());var a=[];n.oncue=function(e){i.addCue(e)};n.onparsingerror=function(e){a.push(e)};n.onflush=function(){i.trigger({type:"loadeddata",target:i})};n.parse(r);if(a.length>0){if(t.console&&t.console.groupCollapsed){t.console.groupCollapsed("Text Track parsing errors for "+i.src)}a.forEach(function(e){return h.error(e)});if(t.console&&t.console.groupEnd){t.console.groupEnd()}}n.flush()};var Yr=function e(r,i){var n={uri:r};var a=lr(r);if(a){n.cors=a}Nr(n,Ae(this,function(e,r,n){if(e){return h.error(e,r)}i.loaded_=true;if(typeof t.WebVTT!=="function"){if(i.tech_){var a;var s=function e(){h.error("vttjs failed to load, stopping trying to process "+i.src);i.tech_.off("vttjsloaded",a)};a=function e(){i.tech_.off("vttjserror",s);return Gr(n,i)};i.tech_.one("vttjsloaded",a);i.tech_.one("vttjserror",s)}}else{Gr(n,i)}}))};var Xr=function(e){n(r,e);function r(t){var r;if(t===void 0){t={}}if(!t.tech){throw new Error("A tech was not provided.")}var i=Ye(t,{kind:ir[t.kind]||"subtitles",language:t.language||t.srclang||""});var n=nr[i.mode]||"disabled";var a=i.default;if(i.kind==="metadata"||i.kind==="chapters"){n="hidden"}r=e.call(this,i)||this;r.tech_=i.tech;r.cues_=[];r.activeCues_=[];var s=new er(r.cues_);var o=new er(r.activeCues_);var l=false;var c=Ae(u(u(r)),function(){this.activeCues=this.activeCues;if(l){this.trigger("cuechange");l=false}});if(n!=="disabled"){r.tech_.ready(function(){r.tech_.on("timeupdate",c)},true)}Object.defineProperties(u(u(r)),{default:{get:function e(){return a},set:function e(){}},mode:{get:function e(){return n},set:function e(t){var r=this;if(!nr[t]){return}n=t;if(n!=="disabled"){this.tech_.ready(function(){r.tech_.on("timeupdate",c)},true)}else{this.tech_.off("timeupdate",c)}this.trigger("modechange")}},cues:{get:function e(){if(!this.loaded_){return null}return s},set:function e(){}},activeCues:{get:function e(){if(!this.loaded_){return null}if(this.cues.length===0){return o}var t=this.tech_.currentTime();var r=[];for(var i=0,n=this.cues.length;i<n;i++){var a=this.cues[i];if(a.startTime<=t&&a.endTime>=t){r.push(a)}else if(a.startTime===a.endTime&&a.startTime<=t&&a.startTime+.5>=t){r.push(a)}}l=false;if(r.length!==this.activeCues_.length){l=true}else{for(var s=0;s<r.length;s++){if(this.activeCues_.indexOf(r[s])===-1){l=true}}}this.activeCues_=r;o.setCues_(this.activeCues_);return o},set:function e(){}}});if(i.src){r.src=i.src;Yr(i.src,u(u(r)))}else{r.loaded_=true}return r}var i=r.prototype;i.addCue=function e(r){var i=r;if(t.vttjs&&!(r instanceof t.vttjs.VTTCue)){i=new t.vttjs.VTTCue(r.startTime,r.endTime,r.text);for(var n in r){if(!(n in i)){i[n]=r[n]}}i.id=r.id;i.originalCue_=r}var a=this.tech_.textTracks();for(var s=0;s<a.length;s++){if(a[s]!==this){a[s].removeCue(i)}}this.cues_.push(i);this.cues.setCues_(this.cues_)};i.removeCue=function e(t){var r=this.cues_.length;while(r--){var i=this.cues_[r];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(r,1);this.cues.setCues_(this.cues_);break}}};return r}(ar);Xr.prototype.allowedEvents_={cuechange:"cuechange"};var Kr=function(e){n(t,e);function t(t){var r;if(t===void 0){t={}}var i=Ye(t,{kind:rr[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(u(u(r)),"enabled",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("enabledchange")}});if(i.enabled){r.enabled=i.enabled}r.loaded_=true;return r}return t}(ar);var $r=function(e){n(t,e);function t(t){var r;if(t===void 0){t={}}var i=Ye(t,{kind:tr[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(u(u(r)),"selected",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("selectedchange")}});if(i.selected){r.selected=i.selected}return r}return t}(ar);var Qr=0;var Jr=1;var Zr=2;var ei=3;var ti=function(e){n(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i;var n=new Xr(t);r.kind=n.kind;r.src=n.src;r.srclang=n.language;r.label=n.label;r.default=n.default;Object.defineProperties(u(u(r)),{readyState:{get:function e(){return i}},track:{get:function e(){return n}}});i=Qr;n.addEventListener("loadeddata",function(){i=Zr;r.trigger({type:"load",target:u(u(r))})});return r}return t}(Le);ti.prototype.allowedEvents_={load:"load"};ti.NONE=Qr;ti.LOADING=Jr;ti.LOADED=Zr;ti.ERROR=ei;var ri={audio:{ListClass:Kt,TrackClass:Kr,capitalName:"Audio"},video:{ListClass:Qt,TrackClass:$r,capitalName:"Video"},text:{ListClass:Jt,TrackClass:Xr,capitalName:"Text"}};Object.keys(ri).forEach(function(e){ri[e].getterName=e+"Tracks";ri[e].privateName=e+"Tracks_"});var ii={remoteText:{ListClass:Jt,TrackClass:Xr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Zt,TrackClass:ti,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};var ni=Ye(ri,ii);ii.names=Object.keys(ii);ri.names=Object.keys(ri);ni.names=[].concat(ii.names).concat(ri.names);var ai={};function si(e,t,r,i,n){if(n===void 0){n={}}var a=e.textTracks();n.kind=t;if(r){n.label=r}if(i){n.language=i}n.tech=e;var s=new ni.text.TrackClass(n);a.addTrack(s);return s}var oi=function(e){n(i,e);function i(t,r){var i;if(t===void 0){t={}}if(r===void 0){r=function e(){}}t.reportTouchActivity=false;i=e.call(this,null,t,r)||this;i.hasStarted_=false;i.on("playing",function(){this.hasStarted_=true});i.on("loadstart",function(){this.hasStarted_=false});ni.names.forEach(function(e){var r=ni[e];if(t&&t[r.getterName]){i[r.privateName]=t[r.getterName]}});if(!i.featuresProgressEvents){i.manualProgressOn()}if(!i.featuresTimeupdateEvents){i.manualTimeUpdatesOn()}["Text","Audio","Video"].forEach(function(e){if(t["native"+e+"Tracks"]===false){i["featuresNative"+e+"Tracks"]=false}});if(t.nativeCaptions===false||t.nativeTextTracks===false){i.featuresNativeTextTracks=false}else if(t.nativeCaptions===true||t.nativeTextTracks===true){i.featuresNativeTextTracks=true}if(!i.featuresNativeTextTracks){i.emulateTextTracks()}i.autoRemoteTextTracks_=new ni.text.ListClass;i.initTrackListeners();if(!t.nativeControlsForTouch){i.emitTapEvents()}if(i.constructor){i.name_=i.constructor.name||"Unknown Tech"}return i}var a=i.prototype;a.triggerSourceset=function e(t){var r=this;if(!this.isReady_){this.one("ready",function(){return r.setTimeout(function(){return r.triggerSourceset(t)},1)})}this.trigger({src:t,type:"sourceset"})};a.manualProgressOn=function e(){this.on("durationchange",this.onDurationChange);this.manualProgress=true;this.one("ready",this.trackProgress)};a.manualProgressOff=function e(){this.manualProgress=false;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)};a.trackProgress=function e(t){this.stopTrackingProgress();this.progressInterval=this.setInterval(Ae(this,function(){var e=this.bufferedPercent();if(this.bufferedPercent_!==e){this.trigger("progress")}this.bufferedPercent_=e;if(e===1){this.stopTrackingProgress()}}),500)};a.onDurationChange=function e(t){this.duration_=this.duration()};a.buffered=function e(){return yt(0,0)};a.bufferedPercent=function e(){return _t(this.buffered(),this.duration_)};a.stopTrackingProgress=function e(){this.clearInterval(this.progressInterval)};a.manualTimeUpdatesOn=function e(){this.manualTimeUpdates=true;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)};a.manualTimeUpdatesOff=function e(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};a.trackCurrentTime=function e(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})},250)};a.stopTrackingCurrentTime=function e(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})};a.dispose=function t(){this.clearTracks(ri.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}e.prototype.dispose.call(this)};a.clearTracks=function e(t){var r=this;t=[].concat(t);t.forEach(function(e){var t=r[e+"Tracks"]()||[];var i=t.length;while(i--){var n=t[i];if(e==="text"){r.removeRemoteTextTrack(n)}t.removeTrack(n)}})};a.cleanupAutoTextTracks=function e(){var t=this.autoRemoteTextTracks_||[];var r=t.length;while(r--){var i=t[r];this.removeRemoteTextTrack(i)}};a.reset=function e(){};a.error=function e(t){if(t!==undefined){this.error_=new It(t);this.trigger("error")}return this.error_};a.played=function e(){if(this.hasStarted_){return yt(0,0)}return yt()};a.setCurrentTime=function e(){if(this.manualTimeUpdates){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})}};a.initTrackListeners=function e(){var t=this;ri.names.forEach(function(e){var r=ri[e];var i=function r(){t.trigger(e+"trackchange")};var n=t[r.getterName]();n.addEventListener("removetrack",i);n.addEventListener("addtrack",i);t.on("dispose",function(){n.removeEventListener("removetrack",i);n.removeEventListener("addtrack",i)})})};a.addWebVttScript_=function e(){var i=this;if(t.WebVTT){return}if(r.body.contains(this.el())){if(!this.options_["vtt.js"]&&k(ai)&&Object.keys(ai).length>0){this.trigger("vttjsloaded");return}var n=r.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";n.onload=function(){i.trigger("vttjsloaded")};n.onerror=function(){i.trigger("vttjserror")};this.on("dispose",function(){n.onload=null;n.onerror=null});t.WebVTT=true;this.el().parentNode.appendChild(n)}else{this.ready(this.addWebVttScript_)}};a.emulateTextTracks=function e(){var t=this;var r=this.textTracks();var i=this.remoteTextTracks();var n=function e(t){return r.addTrack(t.track)};var a=function e(t){return r.removeTrack(t.track)};i.on("addtrack",n);i.on("removetrack",a);this.addWebVttScript_();var s=function e(){return t.trigger("texttrackchange")};var o=function e(){s();for(var t=0;t<r.length;t++){var i=r[t];i.removeEventListener("cuechange",s);if(i.mode==="showing"){i.addEventListener("cuechange",s)}}};o();r.addEventListener("change",o);r.addEventListener("addtrack",o);r.addEventListener("removetrack",o);this.on("dispose",function(){i.off("addtrack",n);i.off("removetrack",a);r.removeEventListener("change",o);r.removeEventListener("addtrack",o);r.removeEventListener("removetrack",o);for(var e=0;e<r.length;e++){var t=r[e];t.removeEventListener("cuechange",s)}})};a.addTextTrack=function e(t,r,i){if(!t){throw new Error("TextTrack kind is required but was not provided")}return si(this,t,r,i)};a.createRemoteTextTrack=function e(t){var r=Ye(t,{tech:this});return new ii.remoteTextEl.TrackClass(r)};a.addRemoteTextTrack=function e(t,r){var i=this;if(t===void 0){t={}}var n=this.createRemoteTextTrack(t);if(r!==true&&r!==false){h.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js');r=true}this.remoteTextTrackEls().addTrackElement_(n);this.remoteTextTracks().addTrack(n.track);if(r!==true){this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)})}return n};a.removeRemoteTextTrack=function e(t){var r=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(r);this.remoteTextTracks().removeTrack(t);this.autoRemoteTextTracks_.removeTrack(t)};a.getVideoPlaybackQuality=function e(){return{}};a.setPoster=function e(){};a.playsinline=function e(){};a.setPlaysinline=function e(){};a.overrideNativeAudioTracks=function e(){};a.overrideNativeVideoTracks=function e(){};a.canPlayType=function e(){return""};i.canPlayType=function e(){return""};i.canPlaySource=function e(t,r){return i.canPlayType(t.type)};i.isTech=function e(t){return t.prototype instanceof i||t instanceof i||t===i};i.registerTech=function e(t,r){if(!i.techs_){i.techs_={}}if(!i.isTech(r)){throw new Error("Tech "+t+" must be a Tech")}if(!i.canPlayType){throw new Error("Techs must have a static canPlayType method on them")}if(!i.canPlaySource){throw new Error("Techs must have a static canPlaySource method on them")}t=We(t);i.techs_[t]=r;if(t!=="Tech"){i.defaultTechOrder_.push(t)}return r};i.getTech=function e(r){if(!r){return}r=We(r);if(i.techs_&&i.techs_[r]){return i.techs_[r]}if(t&&t.videojs&&t.videojs[r]){h.warn("The "+r+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)");return t.videojs[r]}};return i}(Xe);ni.names.forEach(function(e){var t=ni[e];oi.prototype[t.getterName]=function(){this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});oi.prototype.featuresVolumeControl=true;oi.prototype.featuresMuteControl=true;oi.prototype.featuresFullscreenResize=false;oi.prototype.featuresPlaybackRate=false;oi.prototype.featuresProgressEvents=false;oi.prototype.featuresSourceset=false;oi.prototype.featuresTimeupdateEvents=false;oi.prototype.featuresNativeTextTracks=false;oi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,r){var i=e.sourceHandlers;if(!i){i=e.sourceHandlers=[]}if(r===undefined){r=i.length}i.splice(r,0,t)};e.canPlayType=function(t){var r=e.sourceHandlers||[];var i;for(var n=0;n<r.length;n++){i=r[n].canPlayType(t);if(i){return i}}return""};e.selectSourceHandler=function(t,r){var i=e.sourceHandlers||[];var n;for(var a=0;a<i.length;a++){n=i[a].canHandleSource(t,r);if(n){return i[a]}}return null};e.canPlaySource=function(t,r){var i=e.selectSourceHandler(t,r);if(i){return i.canHandleSource(t,r)}return""};var t=["seekable","seeking","duration"];t.forEach(function(e){var t=this[e];if(typeof t!=="function"){return}this[e]=function(){if(this.sourceHandler_&&this.sourceHandler_[e]){return this.sourceHandler_[e].apply(this.sourceHandler_,arguments)}return t.apply(this,arguments)}},e.prototype);e.prototype.setSource=function(t){var r=e.selectSourceHandler(t,this.options_);if(!r){if(e.nativeSourceHandler){r=e.nativeSourceHandler}else{h.error("No source handler found for the current source.")}}this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);if(r!==e.nativeSourceHandler){this.currentSource_=t}this.sourceHandler_=r.handleSource(t,this,this.options_);this.one("dispose",this.disposeSourceHandler)};e.prototype.disposeSourceHandler=function(){if(this.currentSource_){this.clearTracks(["audio","video"]);this.currentSource_=null}this.cleanupAutoTextTracks();if(this.sourceHandler_){if(this.sourceHandler_.dispose){this.sourceHandler_.dispose()}this.sourceHandler_=null}}};Xe.registerComponent("Tech",oi);oi.registerTech("Tech",oi);oi.defaultTechOrder_=[];var ui={};var li={};var ci={};function fi(e,t){ui[e]=ui[e]||[];ui[e].push(t)}function di(e,t,r){e.setTimeout(function(){return wi(t,ui[t.type],r,e)},1)}function hi(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function pi(e,t,r){return e.reduceRight(bi(r),t[r]())}function vi(e,t,r,i){return t[r](e.reduce(bi(r),i))}function mi(e,t,r,i){if(i===void 0){i=null}var n="call"+We(r);var a=e.reduce(bi(n),i);var s=a===ci;var o=s?null:t[r](a);Ti(e,r,o,s);return o}var gi={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1};var yi={setCurrentTime:1};var _i={play:1,pause:1};function bi(e){return function(t,r){if(t===ci){return ci}if(r[e]){return r[e](t)}return t}}function Ti(e,t,r,i){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a[t]){a[t](i,r)}}}function Si(e){li[e.id()]=null}function ki(e,t){var r=li[e.id()];var i=null;if(r===undefined||r===null){i=t(e);li[e.id()]=[[t,i]];return i}for(var n=0;n<r.length;n++){var a=r[n],s=a[0],o=a[1];if(s!==t){continue}i=o}if(i===null){i=t(e);r.push([t,i])}return i}function wi(e,t,r,i,n,a){if(e===void 0){e={}}if(t===void 0){t=[]}if(n===void 0){n=[]}if(a===void 0){a=false}var s=t,o=s[0],u=s.slice(1);if(typeof o==="string"){wi(e,ui[o],r,i,n,a)}else if(o){var l=ki(i,o);if(!l.setSource){n.push(l);return wi(e,u,r,i,n,a)}l.setSource(T({},e),function(t,s){if(t){return wi(e,u,r,i,n,a)}n.push(l);wi(s,e.type===s.type?u:ui[s.type],r,i,n,a)})}else if(u.length){wi(e,u,r,i,n,a)}else if(a){r(e,n)}else{wi(e,ui["*"],r,i,n,true)}}var Ei={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};var Ci=function e(t){if(t===void 0){t=""}var r=ur(t);var i=Ei[r.toLowerCase()];return i||""};var Ii=function e(t,r){if(!r){return""}if(t.cache_.source.src===r&&t.cache_.source.type){return t.cache_.source.type}var i=t.cache_.sources.filter(function(e){return e.src===r});if(i.length){return i[0].type}var n=t.$$("source");for(var a=0;a<n.length;a++){var s=n[a];if(s.type&&s.src&&s.src===r){return s.type}}return Ci(r)};var Ai=function e(t){if(Array.isArray(t)){var r=[];t.forEach(function(t){t=e(t);if(Array.isArray(t)){r=r.concat(t)}else if(S(t)){r.push(t)}});t=r}else if(typeof t==="string"&&t.trim()){t=[Oi({src:t})]}else if(S(t)&&typeof t.src==="string"&&t.src&&t.src.trim()){t=[Oi(t)]}else{t=[]}return t};function Oi(e){var t=Ci(e.src);if(!e.type&&t){e.type=t}return e}var Pi=function(e){n(t,e);function t(t,r,i){var n;var a=Ye({createEl:false},r);n=e.call(this,t,a,i)||this;if(!r.playerOptions.sources||r.playerOptions.sources.length===0){for(var s=0,o=r.playerOptions.techOrder;s<o.length;s++){var u=We(o[s]);var l=oi.getTech(u);if(!u){l=Xe.getComponent(u)}if(l&&l.isSupported()){t.loadTech_(u);break}}}else{t.src(r.playerOptions.sources)}return n}return t}(Xe);Xe.registerComponent("MediaLoader",Pi);var Li=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.emitTapEvents();i.enable();return i}var r=t.prototype;r.createEl=function t(r,i,n){if(r===void 0){r="div"}if(i===void 0){i={}}if(n===void 0){n={}}i=T({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i);if(r==="button"){h.error("Creating a ClickableComponent with an HTML element of "+r+" is not supported; use a Button instead.")}n=T({role:"button"},n);this.tabIndex_=i.tabIndex;var a=e.prototype.createEl.call(this,r,i,n);this.createControlTextEl(a);return a};r.dispose=function t(){this.controlTextEl_=null;e.prototype.dispose.call(this)};r.createControlTextEl=function e(t){this.controlTextEl_=D("span",{className:"vjs-control-text"},{"aria-live":"polite"});if(t){t.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,t);return this.controlTextEl_};r.controlText=function e(t,r){if(r===void 0){r=this.el()}if(t===undefined){return this.controlText_||"Need Text"}var i=this.localize(t);this.controlText_=t;U(this.controlTextEl_,i);if(!this.nonIconControl){r.setAttribute("title",i)}};r.buildCSSClass=function t(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)};r.enable=function e(){if(!this.enabled_){this.enabled_=true;this.removeClass("vjs-disabled");this.el_.setAttribute("aria-disabled","false");if(typeof this.tabIndex_!=="undefined"){this.el_.setAttribute("tabIndex",this.tabIndex_)}this.on(["tap","click"],this.handleClick);this.on("keydown",this.handleKeyDown)}};r.disable=function e(){this.enabled_=false;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");if(typeof this.tabIndex_!=="undefined"){this.el_.removeAttribute("tabIndex")}this.off(["tap","click"],this.handleClick);this.off("keydown",this.handleKeyDown)};r.handleClick=function e(t){};r.handleKeyDown=function t(r){if(Nt.isEventKey(r,"Space")||Nt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,r)}};return t}(Xe);Xe.registerComponent("ClickableComponent",Li);var xi=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update();t.on("posterchange",Ae(u(u(i)),i.update));return i}var r=t.prototype;r.dispose=function t(){this.player().off("posterchange",this.update);e.prototype.dispose.call(this)};r.createEl=function e(){var t=D("div",{className:"vjs-poster",tabIndex:-1});return t};r.update=function e(t){var r=this.player().poster();this.setSrc(r);if(r){this.show()}else{this.hide()}};r.setSrc=function e(t){var r="";if(t){r='url("'+t+'")'}this.el_.style.backgroundImage=r};r.handleClick=function e(t){if(!this.player_.controls()){return}this.player_.tech(true).focus();if(this.player_.paused()){xt(this.player_.play())}else{this.player_.pause()}};return t}(Li);Xe.registerComponent("PosterImage",xi);var Di="#222";var Ui="#ccc";var Ri={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Mi(e,t){var r;if(e.length===4){r=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}else if(e.length===7){r=e.slice(1)}else{throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.")}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+t+")"}function ji(e,t,r){try{e.style[t]=r}catch(e){return}}var Ni=function(e){n(r,e);function r(r,i,n){var a;a=e.call(this,r,i,n)||this;var s=Ae(u(u(a)),a.updateDisplay);r.on("loadstart",Ae(u(u(a)),a.toggleDisplay));r.on("texttrackchange",s);r.on("loadedmetadata",Ae(u(u(a)),a.preselectTrack));r.ready(Ae(u(u(a)),function(){if(r.tech_&&r.tech_.featuresNativeTextTracks){this.hide();return}r.on("fullscreenchange",s);r.on("playerresize",s);t.addEventListener("orientationchange",s);r.on("dispose",function(){return t.removeEventListener("orientationchange",s)});var e=this.options_.playerOptions.tracks||[];for(var i=0;i<e.length;i++){this.player_.addRemoteTextTrack(e[i],true)}this.preselectTrack()}));return a}var i=r.prototype;i.preselectTrack=function e(){var t={captions:1,subtitles:1};var r=this.player_.textTracks();var i=this.player_.cache_.selectedLanguage;var n;var a;var s;for(var o=0;o<r.length;o++){var u=r[o];if(i&&i.enabled&&i.language&&i.language===u.language&&u.kind in t){if(u.kind===i.kind){s=u}else if(!s){s=u}}else if(i&&!i.enabled){s=null;n=null;a=null}else if(u.default){if(u.kind==="descriptions"&&!n){n=u}else if(u.kind in t&&!a){a=u}}}if(s){s.mode="showing"}else if(a){a.mode="showing"}else if(n){n.mode="showing"}};i.toggleDisplay=function e(){if(this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks){this.hide()}else{this.show()}};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})};i.clearDisplay=function e(){if(typeof t.WebVTT==="function"){t.WebVTT.processCues(t,[],this.el_)}};i.updateDisplay=function e(){var t=this.player_.textTracks();this.clearDisplay();var r=null;var i=null;var n=t.length;while(n--){var a=t[n];if(a.mode==="showing"){if(a.kind==="descriptions"){r=a}else{i=a}}}if(i){if(this.getAttribute("aria-live")!=="off"){this.setAttribute("aria-live","off")}this.updateForTrack(i)}else if(r){if(this.getAttribute("aria-live")!=="assertive"){this.setAttribute("aria-live","assertive")}this.updateForTrack(r)}};i.updateForTrack=function e(r){if(typeof t.WebVTT!=="function"||!r.activeCues){return}var i=[];for(var n=0;n<r.activeCues.length;n++){i.push(r.activeCues[n])}t.WebVTT.processCues(t,i,this.el_);if(!this.player_.textTrackSettings){return}var a=this.player_.textTrackSettings.getValues();var s=i.length;while(s--){var o=i[s];if(!o){continue}var u=o.displayState;if(a.color){u.firstChild.style.color=a.color}if(a.textOpacity){ji(u.firstChild,"color",Mi(a.color||"#fff",a.textOpacity))}if(a.backgroundColor){u.firstChild.style.backgroundColor=a.backgroundColor}if(a.backgroundOpacity){ji(u.firstChild,"backgroundColor",Mi(a.backgroundColor||"#000",a.backgroundOpacity))}if(a.windowColor){if(a.windowOpacity){ji(u,"backgroundColor",Mi(a.windowColor,a.windowOpacity))}else{u.style.backgroundColor=a.windowColor}}if(a.edgeStyle){if(a.edgeStyle==="dropshadow"){u.firstChild.style.textShadow="2px 2px 3px "+Di+", 2px 2px 4px "+Di+", 2px 2px 5px "+Di}else if(a.edgeStyle==="raised"){u.firstChild.style.textShadow="1px 1px "+Di+", 2px 2px "+Di+", 3px 3px "+Di}else if(a.edgeStyle==="depressed"){u.firstChild.style.textShadow="1px 1px "+Ui+", 0 1px "+Ui+", -1px -1px "+Di+", 0 -1px "+Di}else if(a.edgeStyle==="uniform"){u.firstChild.style.textShadow="0 0 4px "+Di+", 0 0 4px "+Di+", 0 0 4px "+Di+", 0 0 4px "+Di}}if(a.fontPercent&&a.fontPercent!==1){var l=t.parseFloat(u.style.fontSize);u.style.fontSize=l*a.fontPercent+"px";u.style.height="auto";u.style.top="auto";u.style.bottom="2px"}if(a.fontFamily&&a.fontFamily!=="default"){if(a.fontFamily==="small-caps"){u.firstChild.style.fontVariant="small-caps"}else{u.firstChild.style.fontFamily=Ri[a.fontFamily]}}}};return r}(Xe);Xe.registerComponent("TextTrackDisplay",Ni);var Bi=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){var r=this.player_.isAudio();var i=this.localize(r?"Audio Player":"Video Player");var n=D("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])});var a=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});a.appendChild(n);return a};return t}(Xe);Xe.registerComponent("LoadingSpinner",Bi);var Fi=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function e(t,r,i){if(r===void 0){r={}}if(i===void 0){i={}}t="button";r=T({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},r);i=T({type:"button"},i);var n=Xe.prototype.createEl.call(this,t,r,i);this.createControlTextEl(n);return n};r.addChild=function e(t,r){if(r===void 0){r={}}var i=this.constructor.name;h.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead.");return Xe.prototype.addChild.call(this,t,r)};r.enable=function t(){e.prototype.enable.call(this);this.el_.removeAttribute("disabled")};r.disable=function t(){e.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};r.handleKeyDown=function t(r){if(Nt.isEventKey(r,"Space")||Nt.isEventKey(r,"Enter")){r.stopPropagation();return}e.prototype.handleKeyDown.call(this,r)};return t}(Li);Xe.registerComponent("Button",Fi);var qi=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.mouseused_=false;i.on("mousedown",i.handleMouseDown);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-big-play-button"};r.handleClick=function e(t){var r=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){xt(r);this.player_.tech(true).focus();return}var i=this.player_.getChild("controlBar");var n=i&&i.getChild("playToggle");if(!n){this.player_.tech(true).focus();return}var a=function e(){return n.focus()};if(Lt(r)){r.then(a,function(){})}else{this.setTimeout(a,1)}};r.handleKeyDown=function t(r){this.mouseused_=false;e.prototype.handleKeyDown.call(this,r)};r.handleMouseDown=function e(t){this.mouseused_=true};return t}(Fi);qi.prototype.controlText_="Play Video";Xe.registerComponent("BigPlayButton",qi);var Vi=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.controlText(r&&r.controlText||i.localize("Close"));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){this.trigger({type:"close",bubbles:false})};return t}(Fi);Xe.registerComponent("CloseButton",Vi);var Hi=function(e){n(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;r.replay=r.replay===undefined||r.replay;i.on(t,"play",i.handlePlay);i.on(t,"pause",i.handlePause);if(r.replay){i.on(t,"ended",i.handleEnded)}return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};r.handleSeeked=function e(t){this.removeClass("vjs-ended");if(this.player_.paused()){this.handlePause(t)}else{this.handlePlay(t)}};r.handlePlay=function e(t){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")};r.handlePause=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};r.handleEnded=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)};return t}(Fi);Hi.prototype.controlText_="Play";Xe.registerComponent("PlayToggle",Hi);var zi=function e(t,r){t=t<0?0:t;var i=Math.floor(t%60);var n=Math.floor(t/60%60);var a=Math.floor(t/3600);var s=Math.floor(r/60%60);var o=Math.floor(r/3600);if(isNaN(t)||t===Infinity){a=n=i="-"}a=a>0||o>0?a+":":"";n=((a||s>=10)&&n<10?"0"+n:n)+":";i=i<10?"0"+i:i;return a+n+i};var Wi=zi;function Gi(e){Wi=e}function Yi(){Wi=zi}function Xi(e,t){if(t===void 0){t=e}return Wi(e,t)}var Ki=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.throttledUpdateContent=Oe(Ae(u(u(i)),i.updateContent),25);i.on(t,"timeupdate",i.throttledUpdateContent);return i}var i=t.prototype;i.createEl=function t(){var r=this.buildCSSClass();var i=e.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"\xa0</span>"});this.contentEl_=D("span",{className:r+"-display"},{"aria-live":"off",role:"presentation"});this.updateTextNode_();i.appendChild(this.contentEl_);return i};i.dispose=function t(){this.contentEl_=null;this.textNode_=null;e.prototype.dispose.call(this)};i.updateTextNode_=function e(){if(!this.contentEl_){return}while(this.contentEl_.firstChild){this.contentEl_.removeChild(this.contentEl_.firstChild)}this.textNode_=r.createTextNode(this.formattedTime_||this.formatTime_(0));this.contentEl_.appendChild(this.textNode_)};i.formatTime_=function e(t){return Xi(t)};i.updateFormattedTime_=function e(t){var r=this.formatTime_(t);if(r===this.formattedTime_){return}this.formattedTime_=r;this.requestAnimationFrame(this.updateTextNode_)};i.updateContent=function e(t){};return t}(Xe);Ki.prototype.labelText_="Time";Ki.prototype.controlText_="Time";Xe.registerComponent("TimeDisplay",Ki);var $i=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"ended",i.handleEnded);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-current-time"};r.updateContent=function e(t){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(r)};r.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(this.player_.duration())};return t}(Ki);$i.prototype.labelText_="Current Time";$i.prototype.controlText_="Current Time";Xe.registerComponent("CurrentTimeDisplay",$i);var Qi=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"durationchange",i.updateContent);i.on(t,"loadstart",i.updateContent);i.on(t,"loadedmetadata",i.throttledUpdateContent);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-duration"};r.updateContent=function e(t){var r=this.player_.duration();if(this.duration_!==r){this.duration_=r;this.updateFormattedTime_(r)}};return t}(Ki);Qi.prototype.labelText_="Duration";Qi.prototype.controlText_="Duration";Xe.registerComponent("DurationDisplay",Qi);var Ji=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":true})};return t}(Xe);Xe.registerComponent("TimeDivider",Ji);var Zi=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"durationchange",i.throttledUpdateContent);i.on(t,"ended",i.handleEnded);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-remaining-time"};r.createEl=function t(){var r=e.prototype.createEl.call(this);r.insertBefore(D("span",{},{"aria-hidden":true},"-"),this.contentEl_);return r};r.updateContent=function e(t){if(typeof this.player_.duration()!=="number"){return}if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.remainingTimeDisplay())}else{this.updateFormattedTime_(this.player_.remainingTime())}};r.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(0)};return t}(Ki);Zi.prototype.labelText_="Remaining Time";Zi.prototype.controlText_="Remaining Time";Xe.registerComponent("RemainingTimeDisplay",Zi);var en=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateShowing();i.on(i.player(),"durationchange",i.updateShowing);return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=D("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"\xa0</span>"+this.localize("LIVE")},{"aria-live":"off"});r.appendChild(this.contentEl_);return r};r.dispose=function t(){this.contentEl_=null;e.prototype.dispose.call(this)};r.updateShowing=function e(t){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return t}(Xe);Xe.registerComponent("LiveDisplay",en);var tn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateLiveEdgeStatus();if(i.player_.liveTracker){i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus)}return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.textEl_=D("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"});r.appendChild(this.textEl_);return r};r.updateLiveEdgeStatus=function e(t){if(!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()){this.setAttribute("aria-disabled",true);this.addClass("vjs-at-live-edge");this.controlText("Seek to live, currently playing live")}else{this.setAttribute("aria-disabled",false);this.removeClass("vjs-at-live-edge");this.controlText("Seek to live, currently behind live")}};r.handleClick=function e(){this.player_.liveTracker.seekToLiveEdge()};r.dispose=function t(){if(this.player_.liveTracker){this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus)}this.textEl_=null;e.prototype.dispose.call(this)};return t}(Fi);tn.prototype.controlText_="Seek to live, currently playing live";Xe.registerComponent("SeekToLive",tn);var rn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.bar=i.getChild(i.options_.barName);i.vertical(!!i.options_.vertical);i.enable();return i}var r=t.prototype;r.enabled=function e(){return this.enabled_};r.enable=function e(){if(this.enabled()){return}this.on("mousedown",this.handleMouseDown);this.on("touchstart",this.handleMouseDown);this.on("keydown",this.handleKeyDown);this.on("click",this.handleClick);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)}this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=true};r.disable=function e(){if(!this.enabled()){return}var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown);this.off("touchstart",this.handleMouseDown);this.off("keydown",this.handleKeyDown);this.off("click",this.handleClick);this.off(this.player_,"controlsvisible",this.update);this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.removeAttribute("tabindex");this.addClass("disabled");if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)}this.enabled_=false};r.createEl=function t(r,i,n){if(i===void 0){i={}}if(n===void 0){n={}}i.className=i.className+" vjs-slider";i=T({tabIndex:0},i);n=T({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n);return e.prototype.createEl.call(this,r,i,n)};r.handleMouseDown=function e(t){var r=this.bar.el_.ownerDocument;if(t.type==="mousedown"){t.preventDefault()}if(t.type==="touchstart"&&!ut){t.preventDefault()}W();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(r,"mousemove",this.handleMouseMove);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchmove",this.handleMouseMove);this.on(r,"touchend",this.handleMouseUp);this.handleMouseMove(t)};r.handleMouseMove=function e(t){};r.handleMouseUp=function e(){var t=this.bar.el_.ownerDocument;G();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.update()};r.update=function e(){if(!this.el_){return}var t=this.getPercent();var r=this.bar;if(!r){return}if(typeof t!=="number"||t!==t||t<0||t===Infinity){t=0}var i=(t*100).toFixed(2)+"%";var n=r.el().style;if(this.vertical()){n.height=i}else{n.width=i}return t};r.calculateDistance=function e(t){var r=K(this.el_,t);if(this.vertical()){return r.y}return r.x};r.handleKeyDown=function t(r){if(Nt.isEventKey(r,"Left")||Nt.isEventKey(r,"Down")){r.preventDefault();r.stopPropagation();this.stepBack()}else if(Nt.isEventKey(r,"Right")||Nt.isEventKey(r,"Up")){r.preventDefault();r.stopPropagation();this.stepForward()}else{e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){t.stopPropagation();t.preventDefault()};r.vertical=function e(t){if(t===undefined){return this.vertical_||false}this.vertical_=!!t;if(this.vertical_){this.addClass("vjs-slider-vertical")}else{this.addClass("vjs-slider-horizontal")}};return t}(Xe);Xe.registerComponent("Slider",rn);var nn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.partEls_=[];i.on(t,"progress",i.update);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})};r.dispose=function t(){this.partEls_=null;e.prototype.dispose.call(this)};r.update=function e(t){var r=this.player_.liveTracker;var i=this.player_.buffered();var n=r&&r.isLive()?r.seekableEnd():this.player_.duration();var a=this.player_.bufferedEnd();var s=this.partEls_;var o=this.$(".vjs-control-text-loaded-percentage");var u=function e(t,r,i){var n=t/r||0;n=(n>=1?1:n)*100;if(i){n=n.toFixed(2)}return n+"%"};this.el_.style.width=u(a,n);U(o,u(a,n,true));for(var l=0;l<i.length;l++){var c=i.start(l);var f=i.end(l);var d=s[l];if(!d){d=this.el_.appendChild(D());s[l]=d}d.style.left=u(c,a);d.style.width=u(f-c,a)}for(var h=s.length;h>i.length;h--){this.el_.removeChild(s[h-1])}s.length=i.length};return t}(Xe);Xe.registerComponent("LoadProgressBar",nn);var an=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};r.update=function e(t,r,i){var n=Y(this.el_);var a=Y(this.player_.el());var s=t.width*r;if(!a||!n){return}var o=t.left-a.left+s;var u=t.width-s+(a.right-t.right);var l=n.width/2;if(o<l){l+=l-o}else if(u<l){l=u}if(l<0){l=0}else if(l>n.width){l=n.width}this.el_.style.right="-"+l+"px";U(this.el_,i)};r.updateTime=function e(t,r,i,n){var a=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)}this.rafId_=this.requestAnimationFrame(function(){var e;var s=a.player_.duration();if(a.player_.liveTracker&&a.player_.liveTracker.isLive()){var o=a.player_.liveTracker.liveWindow();var u=o-r*o;e=(u<1?"":"-")+Xi(u,o)}else{e=Xi(i,s)}a.update(t,r,e);if(n){n()}})};return t}(Xe);Xe.registerComponent("TimeTooltip",an);var sn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};r.update=function e(t,r){var i=this.getChild("timeTooltip");if(!i){return}var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,r,n)};return t}(Xe);sn.prototype.options_={children:[]};if(!tt&&!it){sn.prototype.options_.children.push("timeTooltip")}Xe.registerComponent("PlayProgressBar",sn);var on=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=Oe(Ae(u(u(i)),i.update),25);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};r.update=function e(t,r){var i=this;var n=r*this.player_.duration();this.getChild("timeTooltip").updateTime(t,r,n,function(){i.el_.style.left=t.width*r+"px"})};return t}(Xe);on.prototype.options_={children:["timeTooltip"]};Xe.registerComponent("MouseTimeDisplay",on);var un=5;var ln=12;var cn=30;var fn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.setEventHandlers_();return i}var i=t.prototype;i.setEventHandlers_=function e(){this.update=Oe(Ae(this,this.update),cn);this.on(this.player_,"timeupdate",this.update);this.on(this.player_,"ended",this.handleEnded);this.on(this.player_,"durationchange",this.update);if(this.player_.liveTracker){this.on(this.player_.liveTracker,"liveedgechange",this.update)}this.updateInterval=null;this.on(this.player_,["playing"],this.enableInterval_);this.on(this.player_,["ended","pause","waiting"],this.disableInterval_);if("hidden"in r&&"visibilityState"in r){this.on(r,"visibilitychange",this.toggleVisibility_)}};i.toggleVisibility_=function e(t){if(r.hidden){this.disableInterval_(t)}else{this.enableInterval_();this.requestAnimationFrame(this.update)}};i.enableInterval_=function e(){var t=this;this.clearInterval(this.updateInterval);this.updateInterval=this.setInterval(function(){t.requestAnimationFrame(t.update)},cn)};i.disableInterval_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t.type!=="ended"){return}this.clearInterval(this.updateInterval)};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};i.update_=function e(t,r){var i=this.player_.liveTracker;var n=this.player_.duration();if(i&&i.isLive()){n=this.player_.liveTracker.liveCurrentTime()}this.el_.setAttribute("aria-valuenow",(r*100).toFixed(2));this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Xi(t,n),Xi(n,n)],"{1} of {2}"));if(this.bar){this.bar.update(Y(this.el_),r)}};i.update=function t(r){if(this.el().offsetParent===null){return}var i=e.prototype.update.call(this);this.update_(this.getCurrentTime_(),i);return i};i.getCurrentTime_=function e(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};i.handleEnded=function e(t){this.update_(this.player_.duration(),1)};i.getPercent=function e(){var t=this.getCurrentTime_();var r;var i=this.player_.liveTracker;if(i&&i.isLive()){r=(t-i.seekableStart())/i.liveWindow();if(i.atLiveEdge()){r=1}}else{r=t/this.player_.duration()}return r>=1?1:r||0};i.handleMouseDown=function t(r){if(!te(r)){return}r.stopPropagation();this.player_.scrubbing(true);this.videoWasPlaying=!this.player_.paused();this.player_.pause();e.prototype.handleMouseDown.call(this,r)};i.handleMouseMove=function e(t){if(!te(t)){return}var r;var i=this.calculateDistance(t);var n=this.player_.liveTracker;if(!n||!n.isLive()){r=i*this.player_.duration();if(r===this.player_.duration()){r=r-.1}}else{var a=n.seekableStart();var s=n.liveCurrentTime();r=a+i*n.liveWindow();if(r>=s){r=s}if(r<=a){r=a+.1}if(r===Infinity){return}}this.player_.currentTime(r)};i.enable=function t(){e.prototype.enable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.show()};i.disable=function t(){e.prototype.disable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.hide()};i.handleMouseUp=function t(r){e.prototype.handleMouseUp.call(this,r);if(r){r.stopPropagation()}this.player_.scrubbing(false);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:true});if(this.videoWasPlaying){xt(this.player_.play())}};i.stepForward=function e(){this.player_.currentTime(this.player_.currentTime()+un)};i.stepBack=function e(){this.player_.currentTime(this.player_.currentTime()-un)};i.handleAction=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};i.handleKeyDown=function t(r){if(Nt.isEventKey(r,"Space")||Nt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.handleAction(r)}else if(Nt.isEventKey(r,"Home")){r.preventDefault();r.stopPropagation();this.player_.currentTime(0)}else if(Nt.isEventKey(r,"End")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.duration())}else if(/^[0-9]$/.test(Nt(r))){r.preventDefault();r.stopPropagation();var i=(Nt.codes[Nt(r)]-Nt.codes["0"])*10/100;this.player_.currentTime(this.player_.duration()*i)}else if(Nt.isEventKey(r,"PgDn")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.currentTime()-un*ln)}else if(Nt.isEventKey(r,"PgUp")){r.preventDefault();r.stopPropagation();this.player_.currentTime(this.player_.currentTime()+un*ln)}else{e.prototype.handleKeyDown.call(this,r)}};return t}(rn);fn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};if(!tt&&!it){fn.prototype.options_.children.splice(1,0,"mouseTimeDisplay")}Xe.registerComponent("SeekBar",fn);var dn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.handleMouseMove=Oe(Ae(u(u(i)),i.handleMouseMove),25);i.throttledHandleMouseSeek=Oe(Ae(u(u(i)),i.handleMouseSeek),25);i.enable();return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};r.handleMouseMove=function e(t){var r=this.getChild("seekBar");if(r){var i=r.getChild("mouseTimeDisplay");var n=r.el();var a=Y(n);var s=K(n,t).x;if(s>1){s=1}else if(s<0){s=0}if(i){i.update(a,s)}}};r.handleMouseSeek=function e(t){var r=this.getChild("seekBar");if(r){r.handleMouseMove(t)}};r.enabled=function e(){return this.enabled_};r.disable=function e(){this.children().forEach(function(e){return e.disable&&e.disable()});if(!this.enabled()){return}this.off(["mousedown","touchstart"],this.handleMouseDown);this.off(this.el_,"mousemove",this.handleMouseMove);this.handleMouseUp();this.addClass("disabled");this.enabled_=false};r.enable=function e(){this.children().forEach(function(e){return e.enable&&e.enable()});if(this.enabled()){return}this.on(["mousedown","touchstart"],this.handleMouseDown);this.on(this.el_,"mousemove",this.handleMouseMove);this.removeClass("disabled");this.enabled_=true};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;var i=this.getChild("seekBar");if(i){i.handleMouseDown(t)}this.on(r,"mousemove",this.throttledHandleMouseSeek);this.on(r,"touchmove",this.throttledHandleMouseSeek);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchend",this.handleMouseUp)};r.handleMouseUp=function e(t){var r=this.el_.ownerDocument;var i=this.getChild("seekBar");if(i){i.handleMouseUp(t)}this.off(r,"mousemove",this.throttledHandleMouseSeek);this.off(r,"touchmove",this.throttledHandleMouseSeek);this.off(r,"mouseup",this.handleMouseUp);this.off(r,"touchend",this.handleMouseUp)};return t}(Xe);dn.prototype.options_={children:["seekBar"]};Xe.registerComponent("ProgressControl",dn);var hn=function(e){n(t,e);function t(t,i){var n;n=e.call(this,t,i)||this;n.on(t,"fullscreenchange",n.handleFullscreenChange);if(r[bt.fullscreenEnabled]===false){n.disable()}return n}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)};i.handleFullscreenChange=function e(t){if(this.player_.isFullscreen()){this.controlText("Non-Fullscreen")}else{this.controlText("Fullscreen")}};i.handleClick=function e(t){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return t}(Fi);hn.prototype.controlText_="Fullscreen";Xe.registerComponent("FullscreenToggle",hn);var pn=function e(t,r){if(r.tech_&&!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var vn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};return t}(Xe);Xe.registerComponent("VolumeLevel",vn);var mn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on("slideractive",i.updateLastVolume_);i.on(t,"volumechange",i.updateARIAAttributes);t.ready(function(){return i.updateARIAAttributes()});return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})};r.handleMouseDown=function t(r){if(!te(r)){return}e.prototype.handleMouseDown.call(this,r)};r.handleMouseMove=function e(t){if(!te(t)){return}this.checkMuted();this.player_.volume(this.calculateDistance(t))};r.checkMuted=function e(){if(this.player_.muted()){this.player_.muted(false)}};r.getPercent=function e(){if(this.player_.muted()){return 0}return this.player_.volume()};r.stepForward=function e(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};r.stepBack=function e(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};r.updateARIAAttributes=function e(t){var r=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",r);this.el_.setAttribute("aria-valuetext",r+"%")};r.volumeAsPercentage_=function e(){return Math.round(this.player_.volume()*100)};r.updateLastVolume_=function e(){var t=this;var r=this.player_.volume();this.one("sliderinactive",function(){if(t.player_.volume()===0){t.player_.lastVolume_(r)}})};return t}(rn);mn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};mn.prototype.playerEvent="volumechange";Xe.registerComponent("VolumeBar",mn);var gn=function(e){n(t,e);function t(t,r){var i;if(r===void 0){r={}}r.vertical=r.vertical||false;if(typeof r.volumeBar==="undefined"||k(r.volumeBar)){r.volumeBar=r.volumeBar||{};r.volumeBar.vertical=r.vertical}i=e.call(this,t,r)||this;pn(u(u(i)),t);i.throttledHandleMouseMove=Oe(Ae(u(u(i)),i.handleMouseMove),25);i.on("mousedown",i.handleMouseDown);i.on("touchstart",i.handleMouseDown);i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active");i.addClass("vjs-slider-active");i.trigger("slideractive")});i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active");i.removeClass("vjs-slider-active");i.trigger("sliderinactive")});return i}var r=t.prototype;r.createEl=function t(){var r="vjs-volume-horizontal";if(this.options_.vertical){r="vjs-volume-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+r})};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;this.on(r,"mousemove",this.throttledHandleMouseMove);this.on(r,"touchmove",this.throttledHandleMouseMove);this.on(r,"mouseup",this.handleMouseUp);this.on(r,"touchend",this.handleMouseUp)};r.handleMouseUp=function e(t){var r=this.el_.ownerDocument;this.off(r,"mousemove",this.throttledHandleMouseMove);this.off(r,"touchmove",this.throttledHandleMouseMove);this.off(r,"mouseup",this.handleMouseUp);this.off(r,"touchend",this.handleMouseUp)};r.handleMouseMove=function e(t){this.volumeBar.handleMouseMove(t)};return t}(Xe);gn.prototype.options_={children:["volumeBar"]};Xe.registerComponent("VolumeControl",gn);var yn=function e(t,r){if(r.tech_&&!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var _n=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;yn(u(u(i)),t);i.on(t,["loadstart","volumechange"],i.update);return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){var r=this.player_.volume();var i=this.player_.lastVolume_();if(r===0){var n=i<.1?.1:i;this.player_.volume(n);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};r.update=function e(t){this.updateIcon_();this.updateControlText_()};r.updateIcon_=function e(){var t=this.player_.volume();var r=3;if(tt&&this.player_.tech_&&this.player_.tech_.el_){this.player_.muted(this.player_.tech_.el_.muted)}if(t===0||this.player_.muted()){r=0}else if(t<.33){r=1}else if(t<.67){r=2}for(var i=0;i<4;i++){N(this.el_,"vjs-vol-"+i)}j(this.el_,"vjs-vol-"+r)};r.updateControlText_=function e(){var t=this.player_.muted()||this.player_.volume()===0;var r=t?"Unmute":"Mute";if(this.controlText()!==r){this.controlText(r)}};return t}(Fi);_n.prototype.controlText_="Mute";Xe.registerComponent("MuteToggle",_n);var bn=function(e){n(t,e);function t(t,r){var i;if(r===void 0){r={}}if(typeof r.inline!=="undefined"){r.inline=r.inline}else{r.inline=true}if(typeof r.volumeControl==="undefined"||k(r.volumeControl)){r.volumeControl=r.volumeControl||{};r.volumeControl.vertical=!r.inline}i=e.call(this,t,r)||this;i.on(t,["loadstart"],i.volumePanelState_);i.on(i.volumeControl,["slideractive"],i.sliderActive_);i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_);return i}var r=t.prototype;r.sliderActive_=function e(){this.addClass("vjs-slider-active")};r.sliderInactive_=function e(){this.removeClass("vjs-slider-active")};r.volumePanelState_=function e(){if(this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-hidden")}if(this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-mute-toggle-only")}};r.createEl=function t(){var r="vjs-volume-panel-horizontal";if(!this.options_.inline){r="vjs-volume-panel-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+r})};return t}(Xe);bn.prototype.options_={children:["muteToggle","volumeControl"]};Xe.registerComponent("VolumePanel",bn);var Tn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;if(r){i.menuButton_=r.menuButton}i.focusedChild_=-1;i.on("keydown",i.handleKeyDown);i.boundHandleBlur_=Ae(u(u(i)),i.handleBlur);i.boundHandleTapClick_=Ae(u(u(i)),i.handleTapClick);return i}var i=t.prototype;i.addEventListenerForItem=function e(t){if(!(t instanceof Xe)){return}this.on(t,"blur",this.boundHandleBlur_);this.on(t,["tap","click"],this.boundHandleTapClick_)};i.removeEventListenerForItem=function e(t){if(!(t instanceof Xe)){return}this.off(t,"blur",this.boundHandleBlur_);this.off(t,["tap","click"],this.boundHandleTapClick_)};i.removeChild=function t(r){if(typeof r==="string"){r=this.getChild(r)}this.removeEventListenerForItem(r);e.prototype.removeChild.call(this,r)};i.addItem=function e(t){var r=this.addChild(t);if(r){this.addEventListenerForItem(r)}};i.createEl=function t(){var r=this.options_.contentElType||"ul";this.contentEl_=D(r,{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});i.appendChild(this.contentEl_);ge(i,"click",function(e){e.preventDefault();e.stopImmediatePropagation()});return i};i.dispose=function t(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;e.prototype.dispose.call(this)};i.handleBlur=function e(t){var i=t.relatedTarget||r.activeElement;if(!this.children().some(function(e){return e.el()===i})){var n=this.menuButton_;if(n&&n.buttonPressed_&&i!==n.el().firstChild){n.unpressButton()}}};i.handleTapClick=function e(t){if(this.menuButton_){this.menuButton_.unpressButton();var r=this.children();if(!Array.isArray(r)){return}var i=r.filter(function(e){return e.el()===t.target})[0];if(!i){return}if(i.name()!=="CaptionSettingsMenuItem"){this.menuButton_.focus()}}};i.handleKeyDown=function e(t){if(Nt.isEventKey(t,"Left")||Nt.isEventKey(t,"Down")){t.preventDefault();t.stopPropagation();this.stepForward()}else if(Nt.isEventKey(t,"Right")||Nt.isEventKey(t,"Up")){t.preventDefault();t.stopPropagation();this.stepBack()}};i.stepForward=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_+1}this.focus(t)};i.stepBack=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_-1}this.focus(t)};i.focus=function e(t){if(t===void 0){t=0}var r=this.children().slice();var i=r.length&&r[0].className&&/vjs-menu-title/.test(r[0].className);if(i){r.shift()}if(r.length>0){if(t<0){t=0}else if(t>=r.length){t=r.length-1}this.focusedChild_=t;r[t].el_.focus()}};return t}(Xe);Xe.registerComponent("Menu",Tn);var Sn=function(e){n(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;i.menuButton_=new Fi(t,r);i.menuButton_.controlText(i.controlText_);i.menuButton_.el_.setAttribute("aria-haspopup","true");var n=Fi.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+n;i.menuButton_.removeClass("vjs-control");i.addChild(i.menuButton_);i.update();i.enabled_=true;i.on(i.menuButton_,"tap",i.handleClick);i.on(i.menuButton_,"click",i.handleClick);i.on(i.menuButton_,"keydown",i.handleKeyDown);i.on(i.menuButton_,"mouseenter",function(){i.menu.show()});i.on("keydown",i.handleSubmenuKeyDown);return i}var r=t.prototype;r.update=function e(){var t=this.createMenu();if(this.menu){this.menu.dispose();this.removeChild(this.menu)}this.menu=t;this.addChild(t);this.buttonPressed_=false;this.menuButton_.el_.setAttribute("aria-expanded","false");if(this.items&&this.items.length<=this.hideThreshold_){this.hide()}else{this.show()}};r.createMenu=function e(){var t=new Tn(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var r=D("li",{className:"vjs-menu-title",innerHTML:We(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new Xe(this.player_,{el:r});t.addItem(i)}this.items=this.createItems();if(this.items){for(var n=0;n<this.items.length;n++){t.addItem(this.items[n])}}return t};r.createItems=function e(){};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})};r.buildWrapperCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}var i=Fi.prototype.buildCSSClass();return"vjs-menu-button "+r+" "+i+" "+e.prototype.buildCSSClass.call(this)};r.buildCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}return"vjs-menu-button "+r+" "+e.prototype.buildCSSClass.call(this)};r.controlText=function e(t,r){if(r===void 0){r=this.menuButton_.el()}return this.menuButton_.controlText(t,r)};r.handleClick=function e(t){if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};r.focus=function e(){this.menuButton_.focus()};r.blur=function e(){this.menuButton_.blur()};r.handleKeyDown=function e(t){if(Nt.isEventKey(t,"Esc")||Nt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Nt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}else if(Nt.isEventKey(t,"Up")||Nt.isEventKey(t,"Down")){if(!this.buttonPressed_){t.preventDefault();this.pressButton()}}};r.handleSubmenuKeyPress=function e(t){this.handleSubmenuKeyDown(t)};r.handleSubmenuKeyDown=function e(t){if(Nt.isEventKey(t,"Esc")||Nt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Nt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}};r.pressButton=function e(){if(this.enabled_){this.buttonPressed_=true;this.menu.show();this.menu.lockShowing();this.menuButton_.el_.setAttribute("aria-expanded","true");if(tt&&L()){return}this.menu.focus()}};r.unpressButton=function e(){if(this.enabled_){this.buttonPressed_=false;this.menu.unlockShowing();this.menu.hide();this.menuButton_.el_.setAttribute("aria-expanded","false")}};r.disable=function e(){this.unpressButton();this.enabled_=false;this.addClass("vjs-disabled");this.menuButton_.disable()};r.enable=function e(){this.enabled_=true;this.removeClass("vjs-disabled");this.menuButton_.enable()};return t}(Xe);Xe.registerComponent("MenuButton",Sn);var kn=function(e){n(t,e);function t(t,r){var i;var n=r.tracks;i=e.call(this,t,r)||this;if(i.items.length<=1){i.hide()}if(!n){return u(i)}var a=Ae(u(u(i)),i.update);n.addEventListener("removetrack",a);n.addEventListener("addtrack",a);i.player_.on("ready",a);i.player_.on("dispose",function(){n.removeEventListener("removetrack",a);n.removeEventListener("addtrack",a)});return i}return t}(Sn);Xe.registerComponent("TrackButton",kn);var wn=["Tab","Esc","Up","Down","Right","Left"];var En=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.selectable=r.selectable;i.isSelected_=r.selected||false;i.multiSelectable=r.multiSelectable;i.selected(i.isSelected_);if(i.selectable){if(i.multiSelectable){i.el_.setAttribute("role","menuitemcheckbox")}else{i.el_.setAttribute("role","menuitemradio")}}else{i.el_.setAttribute("role","menuitem")}return i}var r=t.prototype;r.createEl=function t(r,i,n){this.nonIconControl=true;return e.prototype.createEl.call(this,"li",T({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)};r.handleKeyDown=function t(r){if(!wn.some(function(e){return Nt.isEventKey(r,e)})){e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){this.selected(true)};r.selected=function e(t){if(this.selectable){if(t){this.addClass("vjs-selected");this.el_.setAttribute("aria-checked","true");this.controlText(", selected");this.isSelected_=true}else{this.removeClass("vjs-selected");this.el_.setAttribute("aria-checked","false");this.controlText("");this.isSelected_=false}}};return t}(Li);Xe.registerComponent("MenuItem",En);var Cn=function(e){n(i,e);function i(i,n){var a;var s=n.track;var o=i.textTracks();n.label=s.label||s.language||"Unknown";n.selected=s.mode==="showing";a=e.call(this,i,n)||this;a.track=s;a.kinds=(n.kinds||[n.kind||a.track.kind]).filter(Boolean);var l=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleTracksChange.apply(u(u(a)),r)};var c=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleSelectedLanguageChange.apply(u(u(a)),r)};i.on(["loadstart","texttrackchange"],l);o.addEventListener("change",l);o.addEventListener("selectedlanguagechange",c);a.on("dispose",function(){i.off(["loadstart","texttrackchange"],l);o.removeEventListener("change",l);o.removeEventListener("selectedlanguagechange",c)});if(o.onchange===undefined){var f;a.on(["tap","click"],function(){if(typeof t.Event!=="object"){try{f=new t.Event("change")}catch(e){}}if(!f){f=r.createEvent("Event");f.initEvent("change",true,true)}o.dispatchEvent(f)})}a.handleTracksChange();return a}var a=i.prototype;a.handleClick=function t(r){var i=this.track;var n=this.player_.textTracks();e.prototype.handleClick.call(this,r);if(!n){return}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds.indexOf(s.kind)===-1){continue}if(s===i){if(s.mode!=="showing"){s.mode="showing"}}else if(s.mode!=="disabled"){s.mode="disabled"}}};a.handleTracksChange=function e(t){var r=this.track.mode==="showing";if(r!==this.isSelected_){this.selected(r)}};a.handleSelectedLanguageChange=function e(t){if(this.track.mode==="showing"){var r=this.player_.cache_.selectedLanguage;if(r&&r.enabled&&r.language===this.track.language&&r.kind!==this.track.kind){return}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind}}};a.dispose=function t(){this.track=null;e.prototype.dispose.call(this)};return i}(En);Xe.registerComponent("TextTrackMenuItem",Cn);var In=function(e){n(t,e);function t(t,r){r.track={player:t,kind:r.kind,kinds:r.kinds,default:false,mode:"disabled"};if(!r.kinds){r.kinds=[r.kind]}if(r.label){r.track.label=r.label}else{r.track.label=r.kinds.join(" and ")+" off"}r.selectable=true;r.multiSelectable=false;return e.call(this,t,r)||this}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i!==this.isSelected_){this.selected(i)}};r.handleSelectedLanguageChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i){this.player_.cache_.selectedLanguage={enabled:false}}};return t}(Cn);Xe.registerComponent("OffTextTrackMenuItem",In);var An=function(e){n(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.textTracks();return e.call(this,t,r)||this}var r=t.prototype;r.createItems=function e(t,r){if(t===void 0){t=[]}if(r===void 0){r=Cn}var i;if(this.label_){i=this.label_+" off"}t.push(new In(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i}));this.hideThreshold_+=1;var n=this.player_.textTracks();if(!Array.isArray(this.kinds_)){this.kinds_=[this.kind_]}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds_.indexOf(s.kind)>-1){var o=new r(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:true,multiSelectable:false});o.addClass("vjs-"+s.kind+"-menu-item");t.push(o)}}return t};return t}(kn);Xe.registerComponent("TextTrackButton",An);var On=function(e){n(t,e);function t(t,r){var i;var n=r.track;var a=r.cue;var s=t.currentTime();r.selectable=true;r.multiSelectable=false;r.label=a.text;r.selected=a.startTime<=s&&s<a.endTime;i=e.call(this,t,r)||this;i.track=n;i.cue=a;n.addEventListener("cuechange",Ae(u(u(i)),i.update));return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)};r.update=function e(t){var r=this.cue;var i=this.player_.currentTime();this.selected(r.startTime<=i&&i<r.endTime)};return t}(En);Xe.registerComponent("ChaptersTrackMenuItem",On);var Pn=function(e){n(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)};r.update=function t(r){if(!this.track_||r&&(r.type==="addtrack"||r.type==="removetrack")){this.setTrack(this.findChaptersTrack())}e.prototype.update.call(this)};r.setTrack=function e(t){if(this.track_===t){return}if(!this.updateHandler_){this.updateHandler_=this.update.bind(this)}if(this.track_){var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(r){r.removeEventListener("load",this.updateHandler_)}this.track_=null}this.track_=t;if(this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(i){i.addEventListener("load",this.updateHandler_)}}};r.findChaptersTrack=function e(){var t=this.player_.textTracks()||[];for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.kind===this.kind_){return i}}};r.getMenuCaption=function e(){if(this.track_&&this.track_.label){return this.track_.label}return this.localize(We(this.kind_))};r.createMenu=function t(){this.options_.title=this.getMenuCaption();return e.prototype.createMenu.call(this)};r.createItems=function e(){var t=[];if(!this.track_){return t}var r=this.track_.cues;if(!r){return t}for(var i=0,n=r.length;i<n;i++){var a=r[i];var s=new On(this.player_,{track:this.track_,cue:a});t.push(s)}return t};return t}(An);Pn.prototype.kind_="chapters";Pn.prototype.controlText_="Chapters";Xe.registerComponent("ChaptersButton",Pn);var Ln=function(e){n(t,e);function t(t,r,i){var n;n=e.call(this,t,r,i)||this;var a=t.textTracks();var s=Ae(u(u(n)),n.handleTracksChange);a.addEventListener("change",s);n.on("dispose",function(){a.removeEventListener("change",s)});return n}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=false;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(s.kind!==this.kind_&&s.mode==="showing"){i=true;break}}if(i){this.disable()}else{this.enable()}};r.buildCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(An);Ln.prototype.kind_="descriptions";Ln.prototype.controlText_="Descriptions";Xe.registerComponent("DescriptionsButton",Ln);var xn=function(e){n(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(An);xn.prototype.kind_="subtitles";xn.prototype.controlText_="Subtitles";Xe.registerComponent("SubtitlesButton",xn);var Dn=function(e){n(t,e);function t(t,r){var i;r.track={player:t,kind:r.kind,label:r.kind+" settings",selectable:false,default:false,mode:"disabled"};r.selectable=false;r.name="CaptionSettingsMenuItem";i=e.call(this,t,r)||this;i.addClass("vjs-texttrack-settings");i.controlText(", opens "+r.kind+" settings dialog");return i}var r=t.prototype;r.handleClick=function e(t){this.player().getChild("textTrackSettings").open()};return t}(Cn);Xe.registerComponent("CaptionSettingsMenuItem",Dn);var Un=function(e){n(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new Dn(this.player_,{kind:this.kind_}));this.hideThreshold_+=1}return e.prototype.createItems.call(this,r)};return t}(An);Un.prototype.kind_="captions";Un.prototype.controlText_="Captions";Xe.registerComponent("CaptionsButton",Un);var Rn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(r,i,n){var a='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);if(this.options_.track.kind==="captions"){a+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "}a+="</span>";var s=e.prototype.createEl.call(this,r,T({innerHTML:a},i),n);return s};return t}(Cn);Xe.registerComponent("SubsCapsMenuItem",Rn);var Mn=function(e){n(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;i.label_="subtitles";if(["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1){i.label_="captions"}i.menuButton_.controlText(We(i.label_));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new Dn(this.player_,{kind:this.label_}));this.hideThreshold_+=1}r=e.prototype.createItems.call(this,r,Rn);return r};return t}(An);Mn.prototype.kinds_=["captions","subtitles"];Mn.prototype.controlText_="Subtitles";Xe.registerComponent("SubsCapsButton",Mn);var jn=function(e){n(t,e);function t(t,r){var i;var n=r.track;var a=t.audioTracks();r.label=n.label||n.language||"Unknown";r.selected=n.enabled;i=e.call(this,t,r)||this;i.track=n;i.addClass("vjs-"+n.kind+"-menu-item");var s=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}i.handleTracksChange.apply(u(u(i)),r)};a.addEventListener("change",s);i.on("dispose",function(){a.removeEventListener("change",s)});return i}var r=t.prototype;r.createEl=function t(r,i,n){var a='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);if(this.options_.track.kind==="main-desc"){a+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "}a+="</span>";var s=e.prototype.createEl.call(this,r,T({innerHTML:a},i),n);return s};r.handleClick=function t(r){var i=this.player_.audioTracks();e.prototype.handleClick.call(this,r);for(var n=0;n<i.length;n++){var a=i[n];a.enabled=a===this.track}};r.handleTracksChange=function e(t){this.selected(this.track.enabled)};return t}(En);Xe.registerComponent("AudioTrackMenuItem",jn);var Nn=function(e){n(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.audioTracks();return e.call(this,t,r)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function e(t){if(t===void 0){t=[]}this.hideThreshold_=1;var r=this.player_.audioTracks();for(var i=0;i<r.length;i++){var n=r[i];t.push(new jn(this.player_,{track:n,selectable:true,multiSelectable:false}))}return t};return t}(kn);Nn.prototype.controlText_="Audio Track";Xe.registerComponent("AudioTrackButton",Nn);var Bn=function(e){n(t,e);function t(t,r){var i;var n=r.rate;var a=parseFloat(n,10);r.label=n;r.selected=a===1;r.selectable=true;r.multiSelectable=false;i=e.call(this,t,r)||this;i.label=n;i.rate=a;i.on(t,"ratechange",i.update);return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};r.update=function e(t){this.selected(this.player().playbackRate()===this.rate)};return t}(En);Bn.prototype.contentElType="button";Xe.registerComponent("PlaybackRateMenuItem",Bn);var Fn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateVisibility();i.updateLabel();i.on(t,"loadstart",i.updateVisibility);i.on(t,"ratechange",i.updateLabel);return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this);this.labelEl_=D("div",{className:"vjs-playback-rate-value",innerHTML:"1x"});r.appendChild(this.labelEl_);return r};r.dispose=function t(){this.labelEl_=null;e.prototype.dispose.call(this)};r.buildCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)};r.createMenu=function e(){var t=new Tn(this.player());var r=this.playbackRates();if(r){for(var i=r.length-1;i>=0;i--){t.addChild(new Bn(this.player(),{rate:r[i]+"x"}))}}return t};r.updateARIAAttributes=function e(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};r.handleClick=function e(t){var r=this.player().playbackRate();var i=this.playbackRates();var n=i[0];for(var a=0;a<i.length;a++){if(i[a]>r){n=i[a];break}}this.player().playbackRate(n)};r.playbackRates=function e(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates};r.playbackRateSupported=function e(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0};r.updateVisibility=function e(t){if(this.playbackRateSupported()){this.removeClass("vjs-hidden")}else{this.addClass("vjs-hidden")}};r.updateLabel=function e(t){if(this.playbackRateSupported()){this.labelEl_.innerHTML=this.player().playbackRate()+"x"}};return t}(Sn);Fn.prototype.controlText_="Playback Rate";Xe.registerComponent("PlaybackRateMenuButton",Fn);var qn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})};return t}(Xe);Xe.registerComponent("Spacer",qn);var Vn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(){var r=e.prototype.createEl.call(this,{className:this.buildCSSClass()});r.innerHTML="\xa0";return r};return t}(qn);Xe.registerComponent("CustomControlSpacer",Vn);var Hn=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};return t}(Xe);Hn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};Xe.registerComponent("ControlBar",Hn);var zn=function(e){n(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"error",i.open);return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)};r.content=function e(){var t=this.player().error();return t?this.localize(t.message):""};return t}(Wt);zn.prototype.options_=Ye(Wt.prototype.options_,{pauseOnOpen:false,fillAlways:true,temporary:false,uncloseable:true});Xe.registerComponent("ErrorDisplay",zn);var Wn="vjs-text-track-settings";var Gn=["#000","Black"];var Yn=["#00F","Blue"];var Xn=["#0FF","Cyan"];var Kn=["#0F0","Green"];var $n=["#F0F","Magenta"];var Qn=["#F00","Red"];var Jn=["#FFF","White"];var Zn=["#FF0","Yellow"];var ea=["1","Opaque"];var ta=["0.5","Semi-Transparent"];var ra=["0","Transparent"];var ia={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Gn,Jn,Qn,Kn,Yn,Zn,$n,Xn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ea,ta,ra]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Jn,Gn,Qn,Kn,Yn,Zn,$n,Xn]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function e(t){return t==="1.00"?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ea,ta]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[ra,ta,ea]}};ia.windowColor.options=ia.backgroundColor.options;function na(e,t){if(t){e=t(e)}if(e&&e!=="none"){return e}}function aa(e,t){var r=e.options[e.options.selectedIndex].value;return na(r,t)}function sa(e,t,r){if(!t){return}for(var i=0;i<e.options.length;i++){if(na(e.options[i].value,r)===t){e.selectedIndex=i;break}}}var oa=function(e){n(r,e);function r(t,r){var i;r.temporary=false;i=e.call(this,t,r)||this;i.updateDisplay=Ae(u(u(i)),i.updateDisplay);i.fill();i.hasBeenOpened_=i.hasBeenFilled_=true;i.endDialog=D("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")});i.el().appendChild(i.endDialog);i.setDefaults();if(r.persistTextTrackSettings===undefined){i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings}i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings();i.close()});i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults();i.updateDisplay()});_(ia,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)});if(i.options_.persistTextTrackSettings){i.restoreSettings()}return i}var i=r.prototype;i.dispose=function t(){this.endDialog=null;e.prototype.dispose.call(this)};i.createElSelect_=function e(t,r,i){var n=this;if(r===void 0){r=""}if(i===void 0){i="label"}var a=ia[t];var s=a.id.replace("%s",this.id_);var o=[r,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+(i==="label"?"vjs-label":"")+'">',this.localize(a.label),"</"+i+">",'<select aria-labelledby="'+o+'">'].concat(a.options.map(function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")};i.createElFgColor_=function e(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")};i.createElBgColor_=function e(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")};i.createElWinColor_=function e(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")};i.createElColors_=function e(){return D("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})};i.createElFont_=function e(){return D("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})};i.createElControls_=function e(){var t=this.localize("restore all settings to the default values");return D("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})};i.content=function e(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};i.label=function e(){return this.localize("Caption Settings Dialog")};i.description=function e(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")};i.buildCSSClass=function t(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};i.getValues=function e(){var t=this;return b(ia,function(e,r,i){var n=aa(t.$(r.selector),r.parser);if(n!==undefined){e[i]=n}return e},{})};i.setValues=function e(t){var r=this;_(ia,function(e,i){sa(r.$(e.selector),t[i],e.parser)})};i.setDefaults=function e(){var t=this;_(ia,function(e){var r=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=r})};i.restoreSettings=function e(){var r;try{r=JSON.parse(t.localStorage.getItem(Wn))}catch(e){h.warn(e)}if(r){this.setValues(r)}};i.saveSettings=function e(){if(!this.options_.persistTextTrackSettings){return}var r=this.getValues();try{if(Object.keys(r).length){t.localStorage.setItem(Wn,JSON.stringify(r))}else{t.localStorage.removeItem(Wn)}}catch(e){h.warn(e)}};i.updateDisplay=function e(){var t=this.player_.getChild("textTrackDisplay");if(t){t.updateDisplay()}};i.conditionalBlur_=function e(){this.previouslyActiveEl_=null;var t=this.player_.controlBar;var r=t&&t.subsCapsButton;var i=t&&t.captionsButton;if(r){r.focus()}else if(i){i.focus()}};return r}(Wt);Xe.registerComponent("TextTrackSettings",oa);var ua=function(e){n(r,e);function r(r,i){var n;var a=i.ResizeObserver||t.ResizeObserver;if(i.ResizeObserver===null){a=false}var s=Ye({createEl:!a,reportTouchActivity:false},i);n=e.call(this,r,s)||this;n.ResizeObserver=i.ResizeObserver||t.ResizeObserver;n.loadListener_=null;n.resizeObserver_=null;n.debouncedHandler_=Pe(function(){n.resizeHandler()},100,false,u(u(n)));if(a){n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_);n.resizeObserver_.observe(r.el())}else{n.loadListener_=function(){if(!n.el_||!n.el_.contentWindow){return}var e=n.debouncedHandler_;var t=n.unloadListener_=function(){ye(this,"resize",e);ye(this,"unload",t);t=null};ge(n.el_.contentWindow,"unload",t);ge(n.el_.contentWindow,"resize",e)};n.one("load",n.loadListener_)}return n}var i=r.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})};i.resizeHandler=function e(){if(!this.player_||!this.player_.trigger){return}this.player_.trigger("playerresize")};i.dispose=function t(){if(this.debouncedHandler_){this.debouncedHandler_.cancel()}if(this.resizeObserver_){if(this.player_.el()){this.resizeObserver_.unobserve(this.player_.el())}this.resizeObserver_.disconnect()}if(this.loadListener_){this.off("load",this.loadListener_)}if(this.el_&&this.el_.contentWindow&&this.unloadListener_){this.unloadListener_.call(this.el_.contentWindow)}this.ResizeObserver=null;this.resizeObserver=null;this.debouncedHandler_=null;this.loadListener_=null;e.prototype.dispose.call(this)};return r}(Xe);Xe.registerComponent("ResizeManager",ua);var la=function(e){n(t,e);function t(t,i){var n;var a=Ye({createEl:false},i);n=e.call(this,t,a)||this;n.reset_();n.on(n.player_,"durationchange",n.handleDurationchange);if(ct&&"hidden"in r&&"visibilityState"in r){n.on(r,"visibilitychange",n.handleVisibilityChange)}return n}var i=t.prototype;i.handleVisibilityChange=function e(){if(this.player_.duration()!==Infinity){return}if(r.hidden){this.stopTracking()}else{this.startTracking()}};i.isBehind_=function e(){if(!this.timeupdateSeen_){return false}var t=this.liveCurrentTime();var r=this.player_.currentTime();var i=this.seekableIncrement_;var n=i*2+.07;return t!==Infinity&&t-n>=r};i.trackLive_=function e(){this.pastSeekEnd_=this.pastSeekEnd_;var t=this.player_.seekable();if(!t||!t.length){return}var r=this.seekableEnd();if(r!==this.lastSeekEnd_){if(this.lastSeekEnd_){this.seekableIncrement_=Math.abs(r-this.lastSeekEnd_)}this.pastSeekEnd_=0;this.lastSeekEnd_=r;this.trigger("seekableendchange")}this.pastSeekEnd_=this.pastSeekEnd()+.03;if(this.isBehind_()!==this.behindLiveEdge()){this.behindLiveEdge_=this.isBehind_();this.trigger("liveedgechange")}};i.handleDurationchange=function e(){if(this.player_.duration()===Infinity){this.startTracking()}else{this.stopTracking()}};i.startTracking=function e(){var t=this;if(this.isTracking()){return}if(!this.timeupdateSeen_){this.timeupdateSeen_=this.player_.hasStarted()}this.trackingInterval_=this.setInterval(this.trackLive_,30);this.trackLive_();this.on(this.player_,"play",this.trackLive_);this.on(this.player_,"pause",this.trackLive_);if(!this.timeupdateSeen_){this.one(this.player_,"play",this.handlePlay);this.handleTimeupdate=function(){t.timeupdateSeen_=true;t.handleTimeupdate=null};this.one(this.player_,"timeupdate",this.handleTimeupdate)}};i.handlePlay=function e(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)};i.reset_=function e(){this.pastSeekEnd_=0;this.lastSeekEnd_=null;this.behindLiveEdge_=null;this.timeupdateSeen_=false;this.clearInterval(this.trackingInterval_);this.trackingInterval_=null;this.seekableIncrement_=12;this.off(this.player_,"play",this.trackLive_);this.off(this.player_,"pause",this.trackLive_);this.off(this.player_,"play",this.handlePlay);this.off(this.player_,"timeupdate",this.seekToLiveEdge);if(this.handleTimeupdate){this.off(this.player_,"timeupdate",this.handleTimeupdate);this.handleTimeupdate=null}};i.stopTracking=function e(){if(!this.isTracking()){return}this.reset_()};i.seekableEnd=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.end(i))}return r.length?r.sort()[r.length-1]:Infinity};i.seekableStart=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.start(i))}return r.length?r.sort()[0]:0};i.liveWindow=function e(){var t=this.liveCurrentTime();if(t===Infinity){return Infinity}return t-this.seekableStart()};i.isLive=function e(){return this.isTracking()};i.atLiveEdge=function e(){return!this.behindLiveEdge()};i.liveCurrentTime=function e(){return this.pastSeekEnd()+this.seekableEnd()};i.pastSeekEnd=function e(){return this.pastSeekEnd_};i.behindLiveEdge=function e(){return this.behindLiveEdge_};i.isTracking=function e(){return typeof this.trackingInterval_==="number"};i.seekToLiveEdge=function e(){if(this.atLiveEdge()){return}this.player_.currentTime(this.liveCurrentTime());if(this.player_.paused()){this.player_.play()}};i.dispose=function t(){this.stopTracking();e.prototype.dispose.call(this)};return t}(Xe);Xe.registerComponent("LiveTracker",la);var ca=function e(t){var r=t.el();if(r.hasAttribute("src")){t.triggerSourceset(r.src);return true}var i=t.$$("source");var n=[];var a="";if(!i.length){return false}for(var s=0;s<i.length;s++){var o=i[s].src;if(o&&n.indexOf(o)===-1){n.push(o)}}if(!n.length){return false}if(n.length===1){a=n[0]}t.triggerSourceset(a);return true};var fa=Object.defineProperty({},"innerHTML",{get:function e(){return this.cloneNode(true).innerHTML},set:function e(i){var n=r.createElement(this.nodeName.toLowerCase());n.innerHTML=i;var a=r.createDocumentFragment();while(n.childNodes.length){a.appendChild(n.childNodes[0])}this.innerText="";t.Element.prototype.appendChild.call(this,a);return this.innerHTML}});var da=function e(t,r){var i={};for(var n=0;n<t.length;n++){i=Object.getOwnPropertyDescriptor(t[n],r);if(i&&i.set&&i.get){break}}i.enumerable=true;i.configurable=true;return i};var ha=function e(r){return da([r.el(),t.HTMLMediaElement.prototype,t.Element.prototype,fa],"innerHTML")};var pa=function e(t){var r=t.el();if(r.resetSourceWatch_){return}var i={};var n=ha(t);var a=function e(i){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}var s=i.apply(r,n);ca(t);return s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){if(!r[e]){return}i[e]=r[e];r[e]=a(i[e])});Object.defineProperty(r,"innerHTML",Ye(n,{set:a(n.set)}));r.resetSourceWatch_=function(){r.resetSourceWatch_=null;Object.keys(i).forEach(function(e){r[e]=i[e]});Object.defineProperty(r,"innerHTML",n)};t.one("sourceset",r.resetSourceWatch_)};var va=Object.defineProperty({},"src",{get:function e(){if(this.hasAttribute("src")){return or(t.Element.prototype.getAttribute.call(this,"src"))}return""},set:function e(r){t.Element.prototype.setAttribute.call(this,"src",r);return r}});var ma=function e(r){return da([r.el(),t.HTMLMediaElement.prototype,va],"src")};var ga=function e(t){if(!t.featuresSourceset){return}var r=t.el();if(r.resetSourceset_){return}var i=ma(t);var n=r.setAttribute;var a=r.load;Object.defineProperty(r,"src",Ye(i,{set:function e(n){var a=i.set.call(r,n);t.triggerSourceset(r.src);return a}}));r.setAttribute=function(e,i){var a=n.call(r,e,i);if(/src/i.test(e)){t.triggerSourceset(r.src)}return a};r.load=function(){var e=a.call(r);if(!ca(t)){t.triggerSourceset("");pa(t)}return e};if(r.currentSrc){t.triggerSourceset(r.currentSrc)}else if(!ca(t)){pa(t)}r.resetSourceset_=function(){r.resetSourceset_=null;r.load=a;r.setAttribute=n;Object.defineProperty(r,"src",i);if(r.resetSourceWatch_){r.resetSourceWatch_()}}};function ya(){var e=l(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]);ya=function t(){return e};return e}var _a=function(e){n(i,e);function i(t,r){var i;i=e.call(this,t,r)||this;var n=t.source;var a=false;if(n&&(i.el_.currentSrc!==n.src||t.tag&&t.tag.initNetworkState_===3)){i.setSource(n)}else{i.handleLateInit_(i.el_)}if(t.enableSourceset){i.setupSourcesetHandling_()}if(i.el_.hasChildNodes()){var s=i.el_.childNodes;var o=s.length;var u=[];while(o--){var l=s[o];var c=l.nodeName.toLowerCase();if(c==="track"){if(!i.featuresNativeTextTracks){u.push(l)}else{i.remoteTextTrackEls().addTrackElement_(l);i.remoteTextTracks().addTrack(l.track);i.textTracks().addTrack(l.track);if(!a&&!i.el_.hasAttribute("crossorigin")&&lr(l.src)){a=true}}}}for(var f=0;f<u.length;f++){i.el_.removeChild(u[f])}}i.proxyNativeTracks_();if(i.featuresNativeTextTracks&&a){h.warn(m(ya()))}i.restoreMetadataTracksInIOSNativePlayer_();if((ht||Ze||at)&&t.nativeControlsForTouch===true){i.setControls(true)}i.proxyWebkitFullscreen_();i.triggerReady();return i}var a=i.prototype;a.dispose=function t(){if(this.el_&&this.el_.resetSourceset_){this.el_.resetSourceset_()}i.disposeMediaElement(this.el_);this.options_=null;e.prototype.dispose.call(this)};a.setupSourcesetHandling_=function e(){ga(this)};a.restoreMetadataTracksInIOSNativePlayer_=function e(){var t=this.textTracks();var r;var i=function e(){r=[];for(var i=0;i<t.length;i++){var n=t[i];if(n.kind==="metadata"){r.push({track:n,storedMode:n.mode})}}};i();t.addEventListener("change",i);this.on("dispose",function(){return t.removeEventListener("change",i)});var n=function e(){for(var i=0;i<r.length;i++){var n=r[i];if(n.track.mode==="disabled"&&n.track.mode!==n.storedMode){n.track.mode=n.storedMode}}t.removeEventListener("change",e)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",i);t.removeEventListener("change",n);t.addEventListener("change",n)});this.on("webkitendfullscreen",function(){t.removeEventListener("change",i);t.addEventListener("change",i);t.removeEventListener("change",n)})};a.overrideNative_=function e(t,r){var i=this;if(r!==this["featuresNative"+t+"Tracks"]){return}var n=t.toLowerCase();if(this[n+"TracksListeners_"]){Object.keys(this[n+"TracksListeners_"]).forEach(function(e){var t=i.el()[n+"Tracks"];t.removeEventListener(e,i[n+"TracksListeners_"][e])})}this["featuresNative"+t+"Tracks"]=!r;this[n+"TracksListeners_"]=null;this.proxyNativeTracksForType_(n)};a.overrideNativeAudioTracks=function e(t){this.overrideNative_("Audio",t)};a.overrideNativeVideoTracks=function e(t){this.overrideNative_("Video",t)};a.proxyNativeTracksForType_=function e(t){var r=this;var i=ri[t];var n=this.el()[i.getterName];var a=this[i.getterName]();if(!this["featuresNative"+i.capitalName+"Tracks"]||!n||!n.addEventListener){return}var s={change:function e(t){a.trigger({type:"change",target:a,currentTarget:a,srcElement:a})},addtrack:function e(t){a.addTrack(t.track)},removetrack:function e(t){a.removeTrack(t.track)}};var o=function e(){var t=[];for(var r=0;r<a.length;r++){var i=false;for(var s=0;s<n.length;s++){if(n[s]===a[r]){i=true;break}}if(!i){t.push(a[r])}}while(t.length){a.removeTrack(t.shift())}};this[i.getterName+"Listeners_"]=s;Object.keys(s).forEach(function(e){var t=s[e];n.addEventListener(e,t);r.on("dispose",function(r){return n.removeEventListener(e,t)})});this.on("loadstart",o);this.on("dispose",function(e){return r.off("loadstart",o)})};a.proxyNativeTracks_=function e(){var t=this;ri.names.forEach(function(e){t.proxyNativeTracksForType_(e)})};a.createEl=function e(){var t=this.options_.tag;if(!t||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(t){var n=t.cloneNode(true);if(t.parentNode){t.parentNode.insertBefore(n,t)}i.disposeMediaElement(t);t=n}else{t=r.createElement("video");var a=this.options_.tag&&q(this.options_.tag);var s=Ye({},a);if(!ht||this.options_.nativeControlsForTouch!==true){delete s.controls}F(t,T(s,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}if(typeof this.options_.preload!=="undefined"){H(t,"preload",this.options_.preload)}var o=["loop","muted","playsinline","autoplay"];for(var u=0;u<o.length;u++){var l=o[u];var c=this.options_[l];if(typeof c!=="undefined"){if(c){H(t,l,l)}else{z(t,l)}t[l]=c}}return t};a.handleLateInit_=function e(t){if(t.networkState===0||t.networkState===3){return}if(t.readyState===0){var r=false;var i=function e(){r=true};this.on("loadstart",i);var n=function e(){if(!r){this.trigger("loadstart")}};this.on("loadedmetadata",n);this.ready(function(){this.off("loadstart",i);this.off("loadedmetadata",n);if(!r){this.trigger("loadstart")}});return}var a=["loadstart"];a.push("loadedmetadata");if(t.readyState>=2){a.push("loadeddata")}if(t.readyState>=3){a.push("canplay")}if(t.readyState>=4){a.push("canplaythrough")}this.ready(function(){a.forEach(function(e){this.trigger(e)},this)})};a.setCurrentTime=function e(t){try{this.el_.currentTime=t}catch(e){h(e,"Video is not ready. (Video.js)")}};a.duration=function e(){var t=this;if(this.el_.duration===Infinity&&it&&ut&&this.el_.currentTime===0){var r=function e(){if(t.el_.currentTime>0){if(t.el_.duration===Infinity){t.trigger("durationchange")}t.off("timeupdate",e)}};this.on("timeupdate",r);return NaN}return this.el_.duration||NaN};a.width=function e(){return this.el_.offsetWidth};a.height=function e(){return this.el_.offsetHeight};a.proxyWebkitFullscreen_=function e(){var t=this;if(!("webkitDisplayingFullscreen"in this.el_)){return}var r=function e(){this.trigger("fullscreenchange",{isFullscreen:false})};var i=function e(){if("webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"){this.one("webkitendfullscreen",r);this.trigger("fullscreenchange",{isFullscreen:true})}};this.on("webkitbeginfullscreen",i);this.on("dispose",function(){t.off("webkitbeginfullscreen",i);t.off("webkitendfullscreen",r)})};a.supportsFullScreen=function e(){if(typeof this.el_.webkitEnterFullScreen==="function"){var r=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(r)||!/Chrome|Mac OS X 10.5/.test(r)){return true}}return false};a.enterFullScreen=function e(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA){this.el_.play();this.setTimeout(function(){t.pause();t.webkitEnterFullScreen()},0)}else{t.webkitEnterFullScreen()}};a.exitFullScreen=function e(){this.el_.webkitExitFullScreen()};a.src=function e(t){if(t===undefined){return this.el_.src}this.setSrc(t)};a.reset=function e(){i.resetMediaElement(this.el_)};a.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.currentSrc};a.setControls=function e(t){this.el_.controls=!!t};a.addTextTrack=function t(r,i,n){if(!this.featuresNativeTextTracks){return e.prototype.addTextTrack.call(this,r,i,n)}return this.el_.addTextTrack(r,i,n)};a.createRemoteTextTrack=function t(i){if(!this.featuresNativeTextTracks){return e.prototype.createRemoteTextTrack.call(this,i)}var n=r.createElement("track");if(i.kind){n.kind=i.kind}if(i.label){n.label=i.label}if(i.language||i.srclang){n.srclang=i.language||i.srclang}if(i.default){n.default=i.default}if(i.id){n.id=i.id}if(i.src){n.src=i.src}return n};a.addRemoteTextTrack=function t(r,i){var n=e.prototype.addRemoteTextTrack.call(this,r,i);if(this.featuresNativeTextTracks){this.el().appendChild(n)}return n};a.removeRemoteTextTrack=function t(r){e.prototype.removeRemoteTextTrack.call(this,r);if(this.featuresNativeTextTracks){var i=this.$$("track");var n=i.length;while(n--){if(r===i[n]||r===i[n].track){this.el().removeChild(i[n])}}}};a.getVideoPlaybackQuality=function e(){if(typeof this.el().getVideoPlaybackQuality==="function"){return this.el().getVideoPlaybackQuality()}var r={};if(typeof this.el().webkitDroppedFrameCount!=="undefined"&&typeof this.el().webkitDecodedFrameCount!=="undefined"){r.droppedVideoFrames=this.el().webkitDroppedFrameCount;r.totalVideoFrames=this.el().webkitDecodedFrameCount}if(t.performance&&typeof t.performance.now==="function"){r.creationTime=t.performance.now()}else if(t.performance&&t.performance.timing&&typeof t.performance.timing.navigationStart==="number"){r.creationTime=t.Date.now()-t.performance.timing.navigationStart}return r};return i}(oi);if(O()){_a.TEST_VID=r.createElement("video");var ba=r.createElement("track");ba.kind="captions";ba.srclang="en";ba.label="English";_a.TEST_VID.appendChild(ba)}_a.isSupported=function(){try{_a.TEST_VID.volume=.5}catch(e){return false}return!!(_a.TEST_VID&&_a.TEST_VID.canPlayType)};_a.canPlayType=function(e){return _a.TEST_VID.canPlayType(e)};_a.canPlaySource=function(e,t){return _a.canPlayType(e.type)};_a.canControlVolume=function(){try{var e=_a.TEST_VID.volume;_a.TEST_VID.volume=e/2+.1;return e!==_a.TEST_VID.volume}catch(e){return false}};_a.canMuteVolume=function(){try{var e=_a.TEST_VID.muted;_a.TEST_VID.muted=!e;if(_a.TEST_VID.muted){H(_a.TEST_VID,"muted","muted")}else{z(_a.TEST_VID,"muted","muted")}return e!==_a.TEST_VID.muted}catch(e){return false}};_a.canControlPlaybackRate=function(){if(it&&ut&&lt<58){return false}try{var e=_a.TEST_VID.playbackRate;_a.TEST_VID.playbackRate=e/2+.1;return e!==_a.TEST_VID.playbackRate}catch(e){return false}};_a.canOverrideAttributes=function(){try{var e=function e(){};Object.defineProperty(r.createElement("video"),"src",{get:e,set:e});Object.defineProperty(r.createElement("audio"),"src",{get:e,set:e});Object.defineProperty(r.createElement("video"),"innerHTML",{get:e,set:e});Object.defineProperty(r.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return false}return true};_a.supportsNativeTextTracks=function(){return dt||tt&&ut};_a.supportsNativeVideoTracks=function(){return!!(_a.TEST_VID&&_a.TEST_VID.videoTracks)};_a.supportsNativeAudioTracks=function(){return!!(_a.TEST_VID&&_a.TEST_VID.audioTracks)};_a.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];_a.prototype.featuresVolumeControl=_a.canControlVolume();_a.prototype.featuresMuteControl=_a.canMuteVolume();_a.prototype.featuresPlaybackRate=_a.canControlPlaybackRate();_a.prototype.featuresSourceset=_a.canOverrideAttributes();_a.prototype.movingMediaElementInDOM=!tt;_a.prototype.featuresFullscreenResize=true;_a.prototype.featuresProgressEvents=true;_a.prototype.featuresTimeupdateEvents=true;_a.prototype.featuresNativeTextTracks=_a.supportsNativeTextTracks();_a.prototype.featuresNativeVideoTracks=_a.supportsNativeVideoTracks();_a.prototype.featuresNativeAudioTracks=_a.supportsNativeAudioTracks();var Ta=_a.TEST_VID&&_a.TEST_VID.constructor.prototype.canPlayType;var Sa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;_a.patchCanPlayType=function(){if(nt>=4&&!st&&!ut){_a.TEST_VID.constructor.prototype.canPlayType=function(e){if(e&&Sa.test(e)){return"maybe"}return Ta.call(this,e)}}};_a.unpatchCanPlayType=function(){var e=_a.TEST_VID.constructor.prototype.canPlayType;_a.TEST_VID.constructor.prototype.canPlayType=Ta;return e};_a.patchCanPlayType();_a.disposeMediaElement=function(e){if(!e){return}if(e.parentNode){e.parentNode.removeChild(e)}while(e.hasChildNodes()){e.removeChild(e.firstChild)}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};_a.resetMediaElement=function(e){if(!e){return}var t=e.querySelectorAll("source");var r=t.length;while(r--){e.removeChild(t[r])}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){_a.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){_a.prototype["set"+We(e)]=function(t){this.el_[e]=t;if(t){this.el_.setAttribute(e,e)}else{this.el_.removeAttribute(e)}}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){_a.prototype[e]=function(){return this.el_[e]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){_a.prototype["set"+We(e)]=function(t){this.el_[e]=t}});["pause","load","play"].forEach(function(e){_a.prototype[e]=function(){return this.el_[e]()}});oi.withSourceHandlers(_a);_a.nativeSourceHandler={};_a.nativeSourceHandler.canPlayType=function(e){try{return _a.TEST_VID.canPlayType(e)}catch(e){return""}};_a.nativeSourceHandler.canHandleSource=function(e,t){if(e.type){return _a.nativeSourceHandler.canPlayType(e.type)}else if(e.src){var r=ur(e.src);return _a.nativeSourceHandler.canPlayType("video/"+r)}return""};_a.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};_a.nativeSourceHandler.dispose=function(){};_a.registerSourceHandler(_a.nativeSourceHandler);oi.registerTech("Html5",_a);function ka(){var e=l(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]);ka=function t(){return e};return e}var wa=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"];var Ea={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"};var Ca=["tiny","xsmall","small","medium","large","xlarge","huge"];var Ia={};Ca.forEach(function(e){var t=e.charAt(0)==="x"?"x-"+e.substring(1):e;Ia[e]="vjs-layout-"+t});var Aa={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity};var Oa=function(e){n(a,e);function a(t,r,n){var s;t.id=t.id||r.id||"vjs_video_"+se();r=T(a.getTagSettings(t),r);r.initChildren=false;r.createEl=false;r.evented=false;r.reportTouchActivity=false;if(!r.language){if(typeof t.closest==="function"){var o=t.closest("[lang]");if(o&&o.getAttribute){r.language=o.getAttribute("lang")}}else{var l=t;while(l&&l.nodeType===1){if(q(l).hasOwnProperty("lang")){r.language=l.getAttribute("lang");break}l=l.parentNode}}}s=e.call(this,null,r,n)||this;s.boundDocumentFullscreenChange_=Ae(u(u(s)),s.documentFullscreenChange_);s.boundFullWindowOnEscKey_=Ae(u(u(s)),s.fullWindowOnEscKey);s.log=p(s.id_);s.isPosterFromTech_=false;s.queuedCallbacks_=[];s.isReady_=false;s.hasStarted_=false;s.userActive_=false;if(!s.options_||!s.options_.techOrder||!s.options_.techOrder.length){throw new Error("No techOrder specified. Did you overwrite "+"videojs.options instead of just changing the "+"properties you want to override?")}s.tag=t;s.tagAttributes=t&&q(t);s.language(s.options_.language);if(r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach(function(e){c[e.toLowerCase()]=r.languages[e]});s.languages_=c}else{s.languages_=a.prototype.options_.languages}s.resetCache_();s.poster_=r.poster||"";s.controls_=!!r.controls;t.controls=false;t.removeAttribute("controls");s.changingSrc_=false;s.playCallbacks_=[];s.playTerminatedQueue_=[];if(t.hasAttribute("autoplay")){s.autoplay(true)}else{s.autoplay(s.options_.autoplay)}if(r.plugins){Object.keys(r.plugins).forEach(function(e){if(typeof s[e]!=="function"){throw new Error('plugin "'+e+'" does not exist')}})}s.scrubbing_=false;s.el_=s.createEl();Ve(u(u(s)),{eventBusKey:"el_"});if(s.fluid_){s.on("playerreset",s.updateStyleEl_)}var f=Ye(s.options_);if(r.plugins){Object.keys(r.plugins).forEach(function(e){s[e](r.plugins[e])})}s.options_.playerOptions=f;s.middleware_=[];s.initChildren();s.isAudio(t.nodeName.toLowerCase()==="audio");if(s.controls()){s.addClass("vjs-controls-enabled")}else{s.addClass("vjs-controls-disabled")}s.el_.setAttribute("role","region");if(s.isAudio()){s.el_.setAttribute("aria-label",s.localize("Audio Player"))}else{s.el_.setAttribute("aria-label",s.localize("Video Player"))}if(s.isAudio()){s.addClass("vjs-audio")}if(s.flexNotSupported_()){s.addClass("vjs-no-flex")}if(ht){s.addClass("vjs-touch-enabled")}if(!tt){s.addClass("vjs-workinghover")}a.players[s.id_]=u(u(s));var d=i.split(".")[0];s.addClass("vjs-v"+d);s.userActive(true);s.reportUserActivity();s.one("play",s.listenForUserActivity_);s.on("stageclick",s.handleStageClick_);s.on("keydown",s.handleKeyDown);s.breakpoints(s.options_.breakpoints);s.responsive(s.options_.responsive);return s}var s=a.prototype;s.dispose=function t(){var i=this;this.trigger("dispose");this.off("dispose");ye(r,bt.fullscreenchange,this.boundDocumentFullscreenChange_);ye(r,"keydown",this.boundFullWindowOnEscKey_);if(this.styleEl_&&this.styleEl_.parentNode){this.styleEl_.parentNode.removeChild(this.styleEl_);this.styleEl_=null}a.players[this.id_]=null;if(this.tag&&this.tag.player){this.tag.player=null}if(this.el_&&this.el_.player){this.el_.player=null}if(this.tech_){this.tech_.dispose();this.isPosterFromTech_=false;this.poster_=""}if(this.playerElIngest_){this.playerElIngest_=null}if(this.tag){this.tag=null}Si(this);ni.names.forEach(function(e){var t=ni[e];var r=i[t.getterName]();if(r&&r.off){r.off()}});e.prototype.dispose.call(this)};s.createEl=function i(){var n=this.tag;var a;var s=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player");var o=this.tag.tagName.toLowerCase()==="video-js";if(s){a=this.el_=n.parentNode}else if(!o){a=this.el_=e.prototype.createEl.call(this,"div")}var u=q(n);if(o){a=this.el_=n;n=this.tag=r.createElement("video");while(a.children.length){n.appendChild(a.firstChild)}if(!M(a,"video-js")){j(a,"video-js")}a.appendChild(n);s=this.playerElIngest_=a;Object.keys(a).forEach(function(e){n[e]=a[e]})}n.setAttribute("tabindex","-1");u.tabindex="-1";if(ct){n.setAttribute("role","application");u.role="application"}n.removeAttribute("width");n.removeAttribute("height");if("width"in u){delete u.width}if("height"in u){delete u.height}Object.getOwnPropertyNames(u).forEach(function(e){if(!(o&&e==="class")){a.setAttribute(e,u[e])}if(o){n.setAttribute(e,u[e])}});n.playerId=n.id;n.id+="_html5_api";n.className="vjs-tech";n.player=a.player=this;this.addClass("vjs-paused");if(t.VIDEOJS_NO_DYNAMIC_STYLE!==true){this.styleEl_=Ce("vjs-styles-dimensions");var l=re(".vjs-styles-defaults");var c=re("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=false;this.fluid_=false;this.width(this.options_.width);this.height(this.options_.height);this.fill(this.options_.fill);this.fluid(this.options_.fluid);this.aspectRatio(this.options_.aspectRatio);var f=n.getElementsByTagName("a");for(var d=0;d<f.length;d++){var h=f.item(d);j(h,"vjs-hidden");h.setAttribute("hidden","hidden")}n.initNetworkState_=n.networkState;if(n.parentNode&&!s){n.parentNode.insertBefore(a,n)}R(n,a);this.children_.unshift(n);this.el_.setAttribute("lang",this.language_);this.el_=a;return a};s.width=function e(t){return this.dimension("width",t)};s.height=function e(t){return this.dimension("height",t)};s.dimension=function e(t,r){var i=t+"_";if(r===undefined){return this[i]||0}if(r===""){this[i]=undefined;this.updateStyleEl_();return}var n=parseFloat(r);if(isNaN(n)){h.error('Improper value "'+r+'" supplied for for '+t);return}this[i]=n;this.updateStyleEl_()};s.fluid=function e(t){if(t===undefined){return!!this.fluid_}this.fluid_=!!t;if(De(this)){this.off("playerreset",this.updateStyleEl_)}if(t){this.addClass("vjs-fluid");this.fill(false);Ue(function(){this.on("playerreset",this.updateStyleEl_)})}else{this.removeClass("vjs-fluid")}this.updateStyleEl_()};s.fill=function e(t){if(t===undefined){return!!this.fill_}this.fill_=!!t;if(t){this.addClass("vjs-fill");this.fluid(false)}else{this.removeClass("vjs-fill")}};s.aspectRatio=function e(t){if(t===undefined){return this.aspectRatio_}if(!/^\d+\:\d+$/.test(t)){throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.")}this.aspectRatio_=t;this.fluid(true);this.updateStyleEl_()};s.updateStyleEl_=function e(){if(t.VIDEOJS_NO_DYNAMIC_STYLE===true){var r=typeof this.width_==="number"?this.width_:this.options_.width;var i=typeof this.height_==="number"?this.height_:this.options_.height;var n=this.tech_&&this.tech_.el();if(n){if(r>=0){n.width=r}if(i>=0){n.height=i}}return}var a;var s;var o;var u;if(this.aspectRatio_!==undefined&&this.aspectRatio_!=="auto"){o=this.aspectRatio_}else if(this.videoWidth()>0){o=this.videoWidth()+":"+this.videoHeight()}else{o="16:9"}var l=o.split(":");var c=l[1]/l[0];if(this.width_!==undefined){a=this.width_}else if(this.height_!==undefined){a=this.height_/c}else{a=this.videoWidth()||300}if(this.height_!==undefined){s=this.height_}else{s=a*c}if(/^[^a-zA-Z]/.test(this.id())){u="dimensions-"+this.id()}else{u=this.id()+"-dimensions"}this.addClass(u);Ie(this.styleEl_,"\n ."+u+" {\n width: "+a+"px;\n height: "+s+"px;\n }\n\n ."+u+".vjs-fluid {\n padding-top: "+c*100+"%;\n }\n ")};s.loadTech_=function e(t,r){var i=this;if(this.tech_){this.unloadTech_()}var n=We(t);var a=t.charAt(0).toLowerCase()+t.slice(1);if(n!=="Html5"&&this.tag){oi.getTech("Html5").disposeMediaElement(this.tag);this.tag.player=null;this.tag=null}this.techName_=n;this.isReady_=false;var s=typeof this.autoplay()==="string"?false:this.autoplay();var o={source:r,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+a+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||false,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};ni.names.forEach(function(e){var t=ni[e];o[t.getterName]=i[t.privateName]});T(o,this.options_[n]);T(o,this.options_[a]);T(o,this.options_[t.toLowerCase()]);if(this.tag){o.tag=this.tag}if(r&&r.src===this.cache_.src&&this.cache_.currentTime>0){o.startTime=this.cache_.currentTime}var u=oi.getTech(t);if(!u){throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'")}this.tech_=new u(o);this.tech_.ready(Ae(this,this.handleTechReady_),true);Mt.jsonToTextTracks(this.textTracksJson_||[],this.tech_);wa.forEach(function(e){i.on(i.tech_,e,i["handleTech"+We(e)+"_"])});Object.keys(Ea).forEach(function(e){i.on(i.tech_,e,function(t){if(i.tech_.playbackRate()===0&&i.tech_.seeking()){i.queuedCallbacks_.push({callback:i["handleTech"+Ea[e]+"_"].bind(i),event:t});return}i["handleTech"+Ea[e]+"_"](t)})});this.on(this.tech_,"loadstart",this.handleTechLoadStart_);this.on(this.tech_,"sourceset",this.handleTechSourceset_);this.on(this.tech_,"waiting",this.handleTechWaiting_);this.on(this.tech_,"ended",this.handleTechEnded_);this.on(this.tech_,"seeking",this.handleTechSeeking_);this.on(this.tech_,"play",this.handleTechPlay_);this.on(this.tech_,"firstplay",this.handleTechFirstPlay_);this.on(this.tech_,"pause",this.handleTechPause_);this.on(this.tech_,"durationchange",this.handleTechDurationChange_);this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_);this.on(this.tech_,"error",this.handleTechError_);this.on(this.tech_,"loadedmetadata",this.updateStyleEl_);this.on(this.tech_,"posterchange",this.handleTechPosterChange_);this.on(this.tech_,"textdata",this.handleTechTextData_);this.on(this.tech_,"ratechange",this.handleTechRateChange_);this.usingNativeControls(this.techGet_("controls"));if(this.controls()&&!this.usingNativeControls()){this.addTechControlsListeners_()}if(this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)){R(this.tech_.el(),this.el())}if(this.tag){this.tag.player=null;this.tag=null}};s.unloadTech_=function e(){var t=this;ni.names.forEach(function(e){var r=ni[e];t[r.privateName]=t[r.getterName]()});this.textTracksJson_=Mt.textTracksToJson(this.tech_);this.isReady_=false;this.tech_.dispose();this.tech_=false;if(this.isPosterFromTech_){this.poster_="";this.trigger("posterchange")}this.isPosterFromTech_=false};s.tech=function e(t){if(t===undefined){h.warn(m(ka()))}return this.tech_};s.addTechControlsListeners_=function e(){this.removeTechControlsListeners_();this.on(this.tech_,"mousedown",this.handleTechClick_);this.on(this.tech_,"dblclick",this.handleTechDoubleClick_);this.on(this.tech_,"touchstart",this.handleTechTouchStart_);this.on(this.tech_,"touchmove",this.handleTechTouchMove_);this.on(this.tech_,"touchend",this.handleTechTouchEnd_);this.on(this.tech_,"tap",this.handleTechTap_)};s.removeTechControlsListeners_=function e(){this.off(this.tech_,"tap",this.handleTechTap_);this.off(this.tech_,"touchstart",this.handleTechTouchStart_);this.off(this.tech_,"touchmove",this.handleTechTouchMove_);this.off(this.tech_,"touchend",this.handleTechTouchEnd_);this.off(this.tech_,"mousedown",this.handleTechClick_);this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)};s.handleTechReady_=function e(){this.triggerReady();if(this.cache_.volume){this.techCall_("setVolume",this.cache_.volume)}this.handleTechPosterChange_();this.handleTechDurationChange_()};s.handleTechLoadStart_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-seeking");this.error(null);this.handleTechDurationChange_();if(!this.paused()){this.trigger("loadstart");this.trigger("firstplay")}else{this.hasStarted(false);this.trigger("loadstart")}this.manualAutoplay_(this.autoplay())};s.manualAutoplay_=function e(t){var r=this;if(!this.tech_||typeof t!=="string"){return}var i=function e(){var t=r.muted();r.muted(true);var i=function e(){r.muted(t)};r.playTerminatedQueue_.push(i);var n=r.play();if(!Lt(n)){return}return n.catch(i)};var n;if(t==="any"&&this.muted()!==true){n=this.play();if(Lt(n)){n=n.catch(i)}}else if(t==="muted"&&this.muted()!==true){n=i()}else{n=this.play()}if(!Lt(n)){return}return n.then(function(){r.trigger({type:"autoplay-success",autoplay:t})}).catch(function(e){r.trigger({type:"autoplay-failure",autoplay:t})})};s.updateSourceCaches_=function e(t){if(t===void 0){t=""}var r=t;var i="";if(typeof r!=="string"){r=t.src;i=t.type}this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];if(r&&!i){i=Ii(this,r)}this.cache_.source=Ye({},t,{src:r,type:i});var n=this.cache_.sources.filter(function(e){return e.src&&e.src===r});var a=[];var s=this.$$("source");var o=[];for(var u=0;u<s.length;u++){var l=q(s[u]);a.push(l);if(l.src&&l.src===r){o.push(l.src)}}if(o.length&&!n.length){this.cache_.sources=a}else if(!n.length){this.cache_.sources=[this.cache_.source]}this.cache_.src=r};s.handleTechSourceset_=function e(t){var r=this;if(!this.changingSrc_){var i=function e(t){return r.updateSourceCaches_(t)};var n=this.currentSource().src;var a=t.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(a)){if(!this.lastSource_||this.lastSource_.tech!==a&&this.lastSource_.player!==n){i=function e(){}}}i(a);if(!t.src){var s=function e(t){if(t.type!=="sourceset"){var i=r.techGet("currentSrc");r.lastSource_.tech=i;r.updateSourceCaches_(i)}r.tech_.off(["sourceset","loadstart"],e)};this.tech_.one(["sourceset","loadstart"],s)}}this.lastSource_={player:this.currentSource().src,tech:t.src};this.trigger({src:t.src,type:"sourceset"})};s.hasStarted=function e(t){if(t===undefined){return this.hasStarted_}if(t===this.hasStarted_){return}this.hasStarted_=t;if(this.hasStarted_){this.addClass("vjs-has-started");this.trigger("firstplay")}else{this.removeClass("vjs-has-started")}};s.handleTechPlay_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(true);this.trigger("play")};s.handleTechRateChange_=function e(){if(this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0){this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)});this.queuedCallbacks_=[]}this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")};s.handleTechWaiting_=function e(){var t=this;this.addClass("vjs-waiting");this.trigger("waiting");var r=this.currentTime();var i=function e(){if(r!==t.currentTime()){t.removeClass("vjs-waiting");t.off("timeupdate",e)}};this.on("timeupdate",i)};s.handleTechCanPlay_=function e(){this.removeClass("vjs-waiting");this.trigger("canplay")};s.handleTechCanPlayThrough_=function e(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};s.handleTechPlaying_=function e(){this.removeClass("vjs-waiting");this.trigger("playing")};s.handleTechSeeking_=function e(){this.addClass("vjs-seeking");this.trigger("seeking")};s.handleTechSeeked_=function e(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")};s.handleTechFirstPlay_=function e(){if(this.options_.starttime){h.warn("Passing the `starttime` option to the player will be deprecated in 6.0");this.currentTime(this.options_.starttime)}this.addClass("vjs-has-started");this.trigger("firstplay")};s.handleTechPause_=function e(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")};s.handleTechEnded_=function e(){this.addClass("vjs-ended");if(this.options_.loop){this.currentTime(0);this.play()}else if(!this.paused()){this.pause()}this.trigger("ended")};s.handleTechDurationChange_=function e(){this.duration(this.techGet_("duration"))};s.handleTechClick_=function e(t){if(!te(t)){return}if(!this.controls_){return}if(this.paused()){xt(this.play())}else{this.pause()}};s.handleTechDoubleClick_=function e(t){if(!this.controls_){return}var r=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)});if(!r){if(this.options_===undefined||this.options_.userActions===undefined||this.options_.userActions.doubleClick===undefined||this.options_.userActions.doubleClick!==false){if(this.options_!==undefined&&this.options_.userActions!==undefined&&typeof this.options_.userActions.doubleClick==="function"){this.options_.userActions.doubleClick.call(this,t)}else if(this.isFullscreen()){this.exitFullscreen()}else{this.requestFullscreen()}}}};s.handleTechTap_=function e(){this.userActive(!this.userActive())};s.handleTechTouchStart_=function e(){this.userWasActive=this.userActive()};s.handleTechTouchMove_=function e(){if(this.userWasActive){this.reportUserActivity()}};s.handleTechTouchEnd_=function e(t){t.preventDefault()};s.handleStageClick_=function e(){this.reportUserActivity()};s.toggleFullscreenClass_=function e(){if(this.isFullscreen()){this.addClass("vjs-fullscreen")}else{this.removeClass("vjs-fullscreen")}};s.documentFullscreenChange_=function e(t){var i=bt;var n=this.el();var a=r[i.fullscreenElement]===n;if(!a&&n.matches){a=n.matches(":"+i.fullscreen)}else if(!a&&n.msMatchesSelector){a=n.msMatchesSelector(":"+i.fullscreen)}this.isFullscreen(a);if(this.isFullscreen()===false){ye(r,i.fullscreenchange,this.boundDocumentFullscreenChange_)}if(!wt){this.trigger("fullscreenchange")}};s.handleTechFullscreenChange_=function e(t,r){if(r){this.isFullscreen(r.isFullscreen)}this.trigger("fullscreenchange")};s.handleTechError_=function e(){var t=this.tech_.error();this.error(t)};s.handleTechTextData_=function e(){var t=null;if(arguments.length>1){t=arguments[1]}this.trigger("textdata",t)};s.getCache=function e(){return this.cache_};s.resetCache_=function e(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}};s.techCall_=function e(t,r){this.ready(function(){if(t in yi){return vi(this.middleware_,this.tech_,t,r)}else if(t in _i){return mi(this.middleware_,this.tech_,t,r)}try{if(this.tech_){this.tech_[t](r)}}catch(e){h(e);throw e}},true)};s.techGet_=function e(t){if(!this.tech_||!this.tech_.isReady_){return}if(t in gi){return pi(this.middleware_,this.tech_,t)}else if(t in _i){return mi(this.middleware_,this.tech_,t)}try{return this.tech_[t]()}catch(e){if(this.tech_[t]===undefined){h("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e);throw e}if(e.name==="TypeError"){h("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e);this.tech_.isReady_=false;throw e}h(e);throw e}};s.play=function e(){var r=this;var i=this.options_.Promise||t.Promise;if(i){return new i(function(e){r.play_(e)})}return this.play_()};s.play_=function e(t){var r=this;if(t===void 0){t=xt}this.playCallbacks_.push(t);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_){this.off(["ready","loadstart"],this.waitToPlay_);this.waitToPlay_=null}if(!this.isReady_||!i){this.waitToPlay_=function(e){r.play_()};this.one(["ready","loadstart"],this.waitToPlay_);if(!i&&(dt||tt)){this.load()}return}var n=this.techGet_("play");if(n===null){this.runPlayTerminatedQueue_()}else{this.runPlayCallbacks_(n)}};s.runPlayTerminatedQueue_=function e(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];t.forEach(function(e){e()})};s.runPlayCallbacks_=function e(t){var r=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];r.forEach(function(e){e(t)})};s.pause=function e(){this.techCall_("pause")};s.paused=function e(){return this.techGet_("paused")===false?false:true};s.played=function e(){return this.techGet_("played")||yt(0,0)};s.scrubbing=function e(t){if(typeof t==="undefined"){return this.scrubbing_}this.scrubbing_=!!t;if(t){this.addClass("vjs-scrubbing")}else{this.removeClass("vjs-scrubbing")}};s.currentTime=function e(t){if(typeof t!=="undefined"){if(t<0){t=0}this.techCall_("setCurrentTime",t);return}this.cache_.currentTime=this.techGet_("currentTime")||0;return this.cache_.currentTime};s.duration=function e(t){if(t===undefined){return this.cache_.duration!==undefined?this.cache_.duration:NaN}t=parseFloat(t);if(t<0){t=Infinity}if(t!==this.cache_.duration){this.cache_.duration=t;if(t===Infinity){this.addClass("vjs-live");if(this.options_.liveui&&this.player_.liveTracker){this.addClass("vjs-liveui")}}else{this.removeClass("vjs-live");this.removeClass("vjs-liveui")}if(!isNaN(t)){this.trigger("durationchange")}}};s.remainingTime=function e(){return this.duration()-this.currentTime()};s.remainingTimeDisplay=function e(){return Math.floor(this.duration())-Math.floor(this.currentTime())};s.buffered=function e(){var e=this.techGet_("buffered");if(!e||!e.length){e=yt(0,0)}return e};s.bufferedPercent=function e(){return _t(this.buffered(),this.duration())};s.bufferedEnd=function e(){var t=this.buffered();var r=this.duration();var i=t.end(t.length-1);if(i>r){i=r}return i};s.volume=function e(t){var r;if(t!==undefined){r=Math.max(0,Math.min(1,parseFloat(t)));this.cache_.volume=r;this.techCall_("setVolume",r);if(r>0){this.lastVolume_(r)}return}r=parseFloat(this.techGet_("volume"));return isNaN(r)?1:r};s.muted=function e(t){if(t!==undefined){this.techCall_("setMuted",t);return}return this.techGet_("muted")||false};s.defaultMuted=function e(t){if(t!==undefined){return this.techCall_("setDefaultMuted",t)}return this.techGet_("defaultMuted")||false};s.lastVolume_=function e(t){if(t!==undefined&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume};s.supportsFullScreen=function e(){return this.techGet_("supportsFullScreen")||false};s.isFullscreen=function e(t){if(t!==undefined){this.isFullscreen_=!!t;this.toggleFullscreenClass_();return}if(wt){var i=bt;var n=this.el();var a=r[i.fullscreenElement]===n;if(!a&&n.matches){a=n.matches(":"+i.fullscreen)}else if(!a&&n.msMatchesSelector){a=n.msMatchesSelector(":"+i.fullscreen)}return a}return!!this.isFullscreen_};s.requestFullscreen=function e(){var t=bt;this.isFullscreen(true);if(t.requestFullscreen){ge(r,t.fullscreenchange,this.boundDocumentFullscreenChange_);this.el_[t.requestFullscreen]()}else if(this.tech_.supportsFullScreen()){this.techCall_("enterFullScreen")}else{this.enterFullWindow();this.trigger("fullscreenchange")}};s.exitFullscreen=function e(){var t=bt;this.isFullscreen(false);if(t.requestFullscreen){r[t.exitFullscreen]()}else if(this.tech_.supportsFullScreen()){this.techCall_("exitFullScreen")}else{this.exitFullWindow();this.trigger("fullscreenchange")}};s.enterFullWindow=function e(){this.isFullWindow=true;this.docOrigOverflow=r.documentElement.style.overflow;ge(r,"keydown",this.boundFullWindowOnEscKey_);r.documentElement.style.overflow="hidden";j(r.body,"vjs-full-window");this.trigger("enterFullWindow")};s.fullWindowOnEscKey=function e(t){if(Nt.isEventKey(t,"Esc")){if(this.isFullscreen()===true){this.exitFullscreen()}else{this.exitFullWindow()}}};s.exitFullWindow=function e(){this.isFullWindow=false;ye(r,"keydown",this.boundFullWindowOnEscKey_);r.documentElement.style.overflow=this.docOrigOverflow;N(r.body,"vjs-full-window");this.trigger("exitFullWindow")};s.handleKeyDown=function e(t){var r=this.options_.userActions;if(!r||!r.hotkeys){return}var i=function e(t){var r=t.tagName.toLowerCase();var i=["textarea"];var n=["button","checkbox","hidden","radio","reset","submit"];if(r==="input"){return n.indexOf(t.type)===-1}return i.indexOf(r)!==-1};if(i(this.el_.ownerDocument.activeElement)){return}if(typeof r.hotkeys==="function"){r.hotkeys.call(this,t)}else{this.handleHotkeys(t)}};s.handleHotkeys=function e(t){var i=this.options_.userActions?this.options_.userActions.hotkeys:{};var n=i.fullscreenKey,a=n===void 0?function(e){return Nt.isEventKey(e,"f")}:n,s=i.muteKey,o=s===void 0?function(e){return Nt.isEventKey(e,"m")}:s,u=i.playPauseKey,l=u===void 0?function(e){return Nt.isEventKey(e,"k")||Nt.isEventKey(e,"Space")}:u;if(a.call(this,t)){t.preventDefault();t.stopPropagation();var c=Xe.getComponent("FullscreenToggle");if(r[bt.fullscreenEnabled]!==false){c.prototype.handleClick.call(this)}}else if(o.call(this,t)){t.preventDefault();t.stopPropagation();var f=Xe.getComponent("MuteToggle");f.prototype.handleClick.call(this)}else if(l.call(this,t)){t.preventDefault();t.stopPropagation();var d=Xe.getComponent("PlayToggle");d.prototype.handleClick.call(this)}};s.canPlayType=function e(t){var r;for(var i=0,n=this.options_.techOrder;i<n.length;i++){var a=n[i];var s=oi.getTech(a);if(!s){s=Xe.getComponent(a)}if(!s){h.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');continue}if(s.isSupported()){r=s.canPlayType(t);if(r){return r}}}return""};s.selectSource=function e(t){var r=this;var i=this.options_.techOrder.map(function(e){return[e,oi.getTech(e)]}).filter(function(e){var t=e[0],r=e[1];if(r){return r.isSupported()}h.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.');return false});var n=function e(t,r,i){var n;t.some(function(e){return r.some(function(t){n=i(e,t);if(n){return true}})});return n};var a;var s=function e(t){return function(e,r){return t(r,e)}};var o=function e(t,i){var n=t[0],a=t[1];if(a.canPlaySource(i,r.options_[n.toLowerCase()])){return{source:i,tech:n}}};if(this.options_.sourceOrder){a=n(t,i,s(o))}else{a=n(i,t,o)}return a||false};s.src=function e(t){var r=this;if(typeof t==="undefined"){return this.cache_.src||""}var i=Ai(t);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);return}this.changingSrc_=true;this.cache_.sources=i;this.updateSourceCaches_(i[0]);di(this,i[0],function(e,t){r.middleware_=t;r.cache_.sources=i;r.updateSourceCaches_(e);var n=r.src_(e);if(n){if(i.length>1){return r.src(i.slice(1))}r.changingSrc_=false;r.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);r.triggerReady();return}hi(t,r.tech_)})};s.src_=function e(t){var r=this;var i=this.selectSource([t]);if(!i){return true}if(!Ge(i.tech,this.techName_)){this.changingSrc_=true;this.loadTech_(i.tech,i.source);this.tech_.ready(function(){r.changingSrc_=false});return false}this.ready(function(){if(this.tech_.constructor.prototype.hasOwnProperty("setSource")){this.techCall_("setSource",t)}else{this.techCall_("src",t.src)}this.changingSrc_=false},true);return false};s.load=function e(){this.techCall_("load")};s.reset=function e(){var r=this;var i=this.options_.Promise||t.Promise;if(this.paused()||!i){this.doReset_()}else{var n=this.play();xt(n.then(function(){return r.doReset_()}))}};s.doReset_=function e(){if(this.tech_){this.tech_.clearTracks("text")}this.resetCache_();this.poster("");this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset");this.resetControlBarUI_();if(De(this)){this.trigger("playerreset")}};s.resetControlBarUI_=function e(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()};s.resetProgressBar_=function e(){this.currentTime(0);var t=this.controlBar,r=t.durationDisplay,i=t.remainingTimeDisplay;if(r){r.updateContent()}if(i){i.updateContent()}};s.resetPlaybackRate_=function e(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()};s.resetVolumeBar_=function e(){this.volume(1);this.trigger("volumechange")};s.currentSources=function e(){var t=this.currentSource();var r=[];if(Object.keys(t).length!==0){r.push(t)}return this.cache_.sources||r};s.currentSource=function e(){return this.cache_.source||{}};s.currentSrc=function e(){return this.currentSource()&&this.currentSource().src||""};s.currentType=function e(){return this.currentSource()&&this.currentSource().type||""};s.preload=function e(t){if(t!==undefined){this.techCall_("setPreload",t);this.options_.preload=t;return}return this.techGet_("preload")};s.autoplay=function e(t){if(t===undefined){return this.options_.autoplay||false}var r;if(typeof t==="string"&&/(any|play|muted)/.test(t)){this.options_.autoplay=t;this.manualAutoplay_(t);r=false}else if(!t){this.options_.autoplay=false}else{this.options_.autoplay=true}r=typeof r==="undefined"?this.options_.autoplay:r;if(this.tech_){this.techCall_("setAutoplay",r)}};s.playsinline=function e(t){if(t!==undefined){this.techCall_("setPlaysinline",t);this.options_.playsinline=t;return this}return this.techGet_("playsinline")};s.loop=function e(t){if(t!==undefined){this.techCall_("setLoop",t);this.options_.loop=t;return}return this.techGet_("loop")};s.poster=function e(t){if(t===undefined){return this.poster_}if(!t){t=""}if(t===this.poster_){return}this.poster_=t;this.techCall_("setPoster",t);this.isPosterFromTech_=false;this.trigger("posterchange")};s.handleTechPosterChange_=function e(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";if(t!==this.poster_){this.poster_=t;this.isPosterFromTech_=true;this.trigger("posterchange")}}};s.controls=function e(t){if(t===undefined){return!!this.controls_}t=!!t;if(this.controls_===t){return}this.controls_=t;if(this.usingNativeControls()){this.techCall_("setControls",t)}if(this.controls_){this.removeClass("vjs-controls-disabled");this.addClass("vjs-controls-enabled");this.trigger("controlsenabled");if(!this.usingNativeControls()){this.addTechControlsListeners_()}}else{this.removeClass("vjs-controls-enabled");this.addClass("vjs-controls-disabled");this.trigger("controlsdisabled");if(!this.usingNativeControls()){this.removeTechControlsListeners_()}}};s.usingNativeControls=function e(t){if(t===undefined){return!!this.usingNativeControls_}t=!!t;if(this.usingNativeControls_===t){return}this.usingNativeControls_=t;if(this.usingNativeControls_){this.addClass("vjs-using-native-controls");this.trigger("usingnativecontrols")}else{this.removeClass("vjs-using-native-controls");this.trigger("usingcustomcontrols")}};s.error=function e(t){if(t===undefined){return this.error_||null}if(t===null){this.error_=t;this.removeClass("vjs-error");if(this.errorDisplay){this.errorDisplay.close()}return}this.error_=new It(t);this.addClass("vjs-error");h.error("(CODE:"+this.error_.code+" "+It.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error");return};s.reportUserActivity=function e(t){this.userActivity_=true};s.userActive=function e(t){if(t===undefined){return this.userActive_}t=!!t;if(t===this.userActive_){return}this.userActive_=t;if(this.userActive_){this.userActivity_=true;this.removeClass("vjs-user-inactive");this.addClass("vjs-user-active");this.trigger("useractive");return}if(this.tech_){this.tech_.one("mousemove",function(e){e.stopPropagation();e.preventDefault()})}this.userActivity_=false;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")};s.listenForUserActivity_=function e(){var t;var r;var i;var n=Ae(this,this.reportUserActivity);var a=function e(t){if(t.screenX!==r||t.screenY!==i){r=t.screenX;i=t.screenY;n()}};var s=function e(){n();this.clearInterval(t);t=this.setInterval(n,250)};var o=function e(r){n();this.clearInterval(t)};this.on("mousedown",s);this.on("mousemove",a);this.on("mouseup",o);var u=this.getChild("controlBar");if(u&&!tt&&!it){u.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout;this.player().options_.inactivityTimeout=0});u.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})}this.on("keydown",n);this.on("keyup",n);var l;this.setInterval(function(){if(!this.userActivity_){return}this.userActivity_=false;this.userActive(true);this.clearTimeout(l);var e=this.options_.inactivityTimeout;if(e<=0){return}l=this.setTimeout(function(){if(!this.userActivity_){this.userActive(false)}},e)},250)};s.playbackRate=function e(t){if(t!==undefined){this.techCall_("setPlaybackRate",t);return}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.cache_.lastPlaybackRate||this.techGet_("playbackRate")}return 1};s.defaultPlaybackRate=function e(t){if(t!==undefined){return this.techCall_("setDefaultPlaybackRate",t)}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_("defaultPlaybackRate")}return 1};s.isAudio=function e(t){if(t!==undefined){this.isAudio_=!!t;return}return!!this.isAudio_};s.addTextTrack=function e(t,r,i){if(this.tech_){return this.tech_.addTextTrack(t,r,i)}};s.addRemoteTextTrack=function e(t,r){if(this.tech_){return this.tech_.addRemoteTextTrack(t,r)}};s.removeRemoteTextTrack=function e(t){if(t===void 0){t={}}var r=t,i=r.track;if(!i){i=t}if(this.tech_){return this.tech_.removeRemoteTextTrack(i)}};s.getVideoPlaybackQuality=function e(){return this.techGet_("getVideoPlaybackQuality")};s.videoWidth=function e(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};s.videoHeight=function e(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};s.language=function e(t){if(t===undefined){return this.language_}this.language_=String(t).toLowerCase()};s.languages=function e(){return Ye(a.prototype.options_.languages,this.languages_)};s.toJSON=function e(){var t=Ye(this.options_);var r=t.tracks;t.tracks=[];for(var i=0;i<r.length;i++){var n=r[i];n=Ye(n);n.player=undefined;t.tracks[i]=n}return t};s.createModal=function e(t,r){var i=this;r=r||{};r.content=t||"";var n=new Wt(this,r);this.addChild(n);n.on("dispose",function(){i.removeChild(n)});n.open();return n};s.updateCurrentBreakpoint_=function e(){if(!this.responsive()){return}var t=this.currentBreakpoint();var r=this.currentWidth();for(var i=0;i<Ca.length;i++){var n=Ca[i];var a=this.breakpoints_[n];if(r<=a){if(t===n){return}if(t){this.removeClass(Ia[t])}this.addClass(Ia[n]);this.breakpoint_=n;break}}};s.removeCurrentBreakpoint_=function e(){var t=this.currentBreakpointClass();this.breakpoint_="";if(t){this.removeClass(t)}};s.breakpoints=function e(t){if(t===undefined){return T(this.breakpoints_)}this.breakpoint_="";this.breakpoints_=T({},Aa,t);this.updateCurrentBreakpoint_();return T(this.breakpoints_)};s.responsive=function e(t){if(t===undefined){return this.responsive_}t=Boolean(t);var r=this.responsive_;if(t===r){return}this.responsive_=t;if(t){this.on("playerresize",this.updateCurrentBreakpoint_);this.updateCurrentBreakpoint_()}else{this.off("playerresize",this.updateCurrentBreakpoint_);this.removeCurrentBreakpoint_()}return t};s.currentBreakpoint=function e(){return this.breakpoint_};s.currentBreakpointClass=function e(){return Ia[this.breakpoint_]||""};s.loadMedia=function e(t,r){var i=this;if(!t||typeof t!=="object"){return}this.reset();this.cache_.media=Ye(t);var n=this.cache_.media,a=n.artwork,s=n.poster,o=n.src,u=n.textTracks;if(!a&&s){this.cache_.media.artwork=[{src:s,type:Ci(s)}]}if(o){this.src(o)}if(s){this.poster(s)}if(Array.isArray(u)){u.forEach(function(e){return i.addRemoteTextTrack(e,false)})}this.ready(r)};s.getMedia=function e(){if(!this.cache_.media){var t=this.poster();var r=this.currentSources();var i=Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}});var n={src:r,textTracks:i};if(t){n.poster=t;n.artwork=[{src:n.poster,type:Ci(n.poster)}]}return n}return Ye(this.cache_.media)};a.getTagSettings=function e(t){var r={sources:[],tracks:[]};var i=q(t);var n=i["data-setup"];if(M(t,"vjs-fill")){i.fill=true}if(M(t,"vjs-fluid")){i.fluid=true}if(n!==null){var a=Ot(n||"{}"),s=a[0],o=a[1];if(s){h.error(s)}T(i,o)}T(r,i);if(t.hasChildNodes()){var u=t.childNodes;for(var l=0,c=u.length;l<c;l++){var f=u[l];var d=f.nodeName.toLowerCase();if(d==="source"){r.sources.push(q(f))}else if(d==="track"){r.tracks.push(q(f))}}}return r};s.flexNotSupported_=function e(){var t=r.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)};return a}(Xe);ni.names.forEach(function(e){var t=ni[e];Oa.prototype[t.getterName]=function(){if(this.tech_){return this.tech_[t.getterName]()}this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});Oa.players={};var Pa=t.navigator;Oa.prototype.options_={techOrder:oi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:false,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Pa&&(Pa.languages&&Pa.languages[0]||Pa.userLanguage||Pa.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:false};["ended","seeking","seekable","networkState","readyState"].forEach(function(e){Oa.prototype[e]=function(){return this.techGet_(e)}});wa.forEach(function(e){Oa.prototype["handleTech"+We(e)+"_"]=function(){return this.trigger(e)}});Xe.registerComponent("Player",Oa);var La="plugin";var xa="activePlugins_";var Da={};var Ua=function e(t){return Da.hasOwnProperty(t)};var Ra=function e(t){return Ua(t)?Da[t]:undefined};var Ma=function e(t,r){t[xa]=t[xa]||{};t[xa][r]=true};var ja=function e(t,r,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,r);t.trigger(n+":"+r.name,r)};var Na=function e(t,r){var i=function e(){ja(this,{name:t,plugin:r,instance:null},true);var i=r.apply(this,arguments);Ma(this,t);ja(this,{name:t,plugin:r,instance:i});return i};Object.keys(r).forEach(function(e){i[e]=r[e]});return i};var Ba=function e(t,r){r.prototype.name=t;return function(){ja(this,{name:t,plugin:r,instance:null},true);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}var a=o(r,[this].concat(i));this[t]=function(){return a};ja(this,a.getEventHash());return a}};var Fa=function(){function e(t){if(this.constructor===e){throw new Error("Plugin must be sub-classed; not directly instantiated.")}this.player=t;Ve(this);delete this.trigger;ze(this,this.constructor.defaultState);Ma(t,this.name);this.dispose=Ae(this,this.dispose);t.on("dispose",this.dispose)}var t=e.prototype;t.version=function e(){return this.constructor.VERSION};t.getEventHash=function e(t){if(t===void 0){t={}}t.name=this.name;t.plugin=this.constructor;t.instance=this;return t};t.trigger=function e(t,r){if(r===void 0){r={}}return _e(this.eventBusEl_,t,this.getEventHash(r))};t.handleStateChanged=function e(t){};t.dispose=function e(){var t=this.name,r=this.player;this.trigger("dispose");this.off();r.off("dispose",this.dispose);r[xa][t]=false;this.player=this.state=null;r[t]=Ba(t,Da[t])};e.isBasic=function t(r){var i=typeof r==="string"?Ra(r):r;return typeof i==="function"&&!e.prototype.isPrototypeOf(i.prototype)};e.registerPlugin=function t(r,i){if(typeof r!=="string"){throw new Error('Illegal plugin name, "'+r+'", must be a string, was '+typeof r+".")}if(Ua(r)){h.warn('A plugin named "'+r+'" already exists. You may want to avoid re-registering plugins!')}else if(Oa.prototype.hasOwnProperty(r)){throw new Error('Illegal plugin name, "'+r+'", cannot share a name with an existing player method!')}if(typeof i!=="function"){throw new Error('Illegal plugin for "'+r+'", must be a function, was '+typeof i+".")}Da[r]=i;if(r!==La){if(e.isBasic(i)){Oa.prototype[r]=Na(r,i)}else{Oa.prototype[r]=Ba(r,i)}}return i};e.deregisterPlugin=function e(t){if(t===La){throw new Error("Cannot de-register base plugin.")}if(Ua(t)){delete Da[t];delete Oa.prototype[t]}};e.getPlugins=function e(t){if(t===void 0){t=Object.keys(Da)}var r;t.forEach(function(e){var t=Ra(e);if(t){r=r||{};r[e]=t}});return r};e.getPluginVersion=function e(t){var r=Ra(t);return r&&r.VERSION||""};return e}();Fa.getPlugin=Ra;Fa.BASE_PLUGIN_NAME=La;Fa.registerPlugin(La,Fa);Oa.prototype.usingPlugin=function(e){return!!this[xa]&&this[xa][e]===true};Oa.prototype.hasPlugin=function(e){return!!Ua(e)};var qa=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r){t.super_=r}};var Va=function e(t,r){if(r===void 0){r={}}var i=function e(){t.apply(this,arguments)};var n={};if(typeof r==="object"){if(r.constructor!==Object.prototype.constructor){i=r.constructor}n=r}else if(typeof r==="function"){i=r}qa(i,t);for(var a in n){if(n.hasOwnProperty(a)){i.prototype[a]=n[a]}}return i};var Ha=function e(t){return t.indexOf("#")===0?t.slice(1):t};function za(e,t,r){var i=za.getPlayer(e);if(i){if(t){h.warn('Player "'+e+'" is already initialised. Options will not be applied.')}if(r){i.ready(r)}return i}var n=typeof e==="string"?re("#"+Ha(e)):e;if(!P(n)){throw new TypeError("The element or ID supplied is not valid. (videojs)")}if(!n.ownerDocument.defaultView||!n.ownerDocument.body.contains(n)){h.warn("The element supplied is not included in the DOM")}t=t||{};za.hooks("beforesetup").forEach(function(e){var r=e(n,Ye(t));if(!S(r)||Array.isArray(r)){h.error("please return an object in beforesetup hooks");return}t=Ye(t,r)});var a=Xe.getComponent("Player");i=new a(n,t,r);za.hooks("setup").forEach(function(e){return e(i)});return i}za.hooks_={};za.hooks=function(e,t){za.hooks_[e]=za.hooks_[e]||[];if(t){za.hooks_[e]=za.hooks_[e].concat(t)}return za.hooks_[e]};za.hook=function(e,t){za.hooks(e,t)};za.hookOnce=function(e,t){za.hooks(e,[].concat(t).map(function(t){var r=function r(){za.removeHook(e,r);return t.apply(void 0,arguments)};return r}))};za.removeHook=function(e,t){var r=za.hooks(e).indexOf(t);if(r<=-1){return false}za.hooks_[e]=za.hooks_[e].slice();za.hooks_[e].splice(r,1);return true};if(t.VIDEOJS_NO_DYNAMIC_STYLE!==true&&O()){var Wa=re(".vjs-styles-defaults");if(!Wa){Wa=Ce("vjs-styles-defaults");var Ga=re("head");if(Ga){Ga.insertBefore(Wa,Ga.firstChild)}Ie(Wa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Ee(1,za);za.VERSION=i;za.options=Oa.prototype.options_;za.getPlayers=function(){return Oa.players};za.getPlayer=function(e){var t=Oa.players;var r;if(typeof e==="string"){var i=Ha(e);var n=t[i];if(n){return n}r=re("#"+i)}else{r=e}if(P(r)){var a=r,s=a.player,o=a.playerId;if(s||t[o]){return s||t[o]}}};za.getAllPlayers=function(){return Object.keys(Oa.players).map(function(e){return Oa.players[e]}).filter(Boolean)};za.players=Oa.players;za.getComponent=Xe.getComponent;za.registerComponent=function(e,t){if(oi.isTech(t)){h.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")}Xe.registerComponent.call(Xe,e,t)};za.getTech=oi.getTech;za.registerTech=oi.registerTech;za.use=fi;Object.defineProperty(za,"middleware",{value:{},writeable:false,enumerable:true});Object.defineProperty(za.middleware,"TERMINATOR",{value:ci,writeable:false,enumerable:true});za.browser=pt;za.TOUCH_ENABLED=ht;za.extend=Va;za.mergeOptions=Ye;za.bind=Ae;za.registerPlugin=Fa.registerPlugin;za.deregisterPlugin=Fa.deregisterPlugin;za.plugin=function(e,t){h.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");return Fa.registerPlugin(e,t)};za.getPlugins=Fa.getPlugins;za.getPlugin=Fa.getPlugin;za.getPluginVersion=Fa.getPluginVersion;za.addLanguage=function(e,t){var r;e=(""+e).toLowerCase();za.options.languages=Ye(za.options.languages,(r={},r[e]=t,r));return za.options.languages[e]};za.log=h;za.createLogger=p;za.createTimeRange=za.createTimeRanges=yt;za.formatTime=Xi;za.setFormatTime=Gi;za.resetFormatTime=Yi;za.parseUrl=sr;za.isCrossOrigin=lr;za.EventTarget=Le;za.on=ge;za.one=be;za.off=ye;za.trigger=_e;za.xhr=Nr;za.TextTrack=Xr;za.AudioTrack=Kr;za.VideoTrack=$r;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){za[e]=function(){h.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead");return ne[e].apply(null,arguments)}});za.computedStyle=w;za.dom=ne;za.url=cr;return za});var f=c.dedupeVideojs(e.videojs,l,u);var d="";var h="6.35.2";var p=new c({accountId:"679256133001",embedId:"default",playerId:"NkgrDczuol",previousInitializer:u,skin:d,version:h});var v=p.isInBcFrame;var m=p.accountId;var g=p.applicationId;var y=p.embedId;var _=p.playerId;var b=function(){var e;if(v){return""}if(typeof i==="function"&&i.amd){return require.toUrl("bc")}else if(t.currentScript){return t.currentScript.src}e=t.getElementsByTagName("script");return e.length&&e[e.length-1].src||""}();var T=b&&b.split("/").slice(0,-1).join("/")||".";(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsLoscore=t(e.videojs)})(this,function(r){"use strict";r=r&&r.hasOwnProperty("default")?r["default"]:r;var i=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function n(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}var s;if(typeof e!=="undefined"){s=e}else if(typeof i!=="undefined"){s=i}else if(typeof self!=="undefined"){s=self}else{s={}}var o=s;function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var l=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function c(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function f(e,t,r,i){t=t||"&";r=r||"=";if(e===null){e=undefined}if(typeof e==="object"){return d(h(e),function(i){var n=encodeURIComponent(c(i))+r;if(l(e[i])){return d(e[i],function(e){return n+encodeURIComponent(c(e))}).join(t)}else{return n+encodeURIComponent(c(e[i]))}}).join(t)}if(!i)return"";return encodeURIComponent(c(i))+r+encodeURIComponent(c(e))}function d(e,t){if(e.map)return e.map(t);var r=[];for(var i=0;i<e.length;i++){r.push(t(e[i],i))}return r}var h=Object.keys||function(e){var t=[];for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t.push(r)}return t};function p(e,t,r,i){t=t||"&";r=r||"=";var n={};if(typeof e!=="string"||e.length===0){return n}var a=/\+/g;e=e.split(t);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var o=e.length;if(s>0&&o>s){o=s}for(var c=0;c<o;++c){var f=e[c].replace(a,"%20"),d=f.indexOf(r),h,p,v,m;if(d>=0){h=f.substr(0,d);p=f.substr(d+1)}else{h=f;p=""}v=decodeURIComponent(h);m=decodeURIComponent(p);if(!u(n,v)){n[v]=m}else if(l(n[v])){n[v].push(m)}else{n[v]=[n[v],m]}}return n}var v={encode:f,stringify:f,decode:p,parse:p};var m=a(function(r,a){(function(e,t){r.exports=t()})(i,function(){function r(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function a(e){return typeof e==="function"}var s=void 0;if(Array.isArray){s=Array.isArray}else{s=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}var o=s;var u=0;var l=void 0;var c=void 0;var f=function e(t,r){w[u]=t;w[u+1]=r;u+=2;if(u===2){if(c){c(E)}else{I()}}};function d(e){c=e}function h(e){f=e}var p=typeof e!=="undefined"?e:undefined;var v=p||{};var m=v.MutationObserver||v.WebKitMutationObserver;var g=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var y=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function _(){return function(){return process.nextTick(E)}}function b(){if(typeof l!=="undefined"){return function(){l(E)}}return k()}function T(){var e=0;var r=new m(E);var i=t.createTextNode("");r.observe(i,{characterData:true});return function(){i.data=e=++e%2}}function S(){var e=new MessageChannel;e.port1.onmessage=E;return function(){return e.port2.postMessage(0)}}function k(){var e=setTimeout;return function(){return e(E,1)}}var w=new Array(1e3);function E(){for(var e=0;e<u;e+=2){var t=w[e];var r=w[e+1];t(r);w[e]=undefined;w[e+1]=undefined}u=0}function C(){try{var e=Function("return this")().require("vertx");l=e.runOnLoop||e.runOnContext;return b()}catch(e){return k()}}var I=void 0;if(g){I=_()}else if(m){I=T()}else if(y){I=S()}else if(p===undefined&&typeof n==="function"){I=C()}else{I=k()}function A(e,t){var r=this;var i=new this.constructor(L);if(i[P]===undefined){ee(i)}var n=r._state;if(n){var a=arguments[n-1];f(function(){return $(n,i,a,r._result)})}else{Y(r,i,e,t)}return i}function O(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e}var r=new t(L);H(r,e);return r}var P=Math.random().toString(36).substring(2);function L(){}var x=void 0;var D=1;var U=2;var R={error:null};function M(){return new TypeError("You cannot resolve a promise with itself")}function j(){return new TypeError("A promises callback cannot return that same promise.")}function N(e){try{return e.then}catch(e){R.error=e;return R}}function B(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}function F(e,t,r){f(function(e){var i=false;var n=B(r,t,function(r){if(i){return}i=true;if(t!==r){H(e,r)}else{W(e,r)}},function(t){if(i){return}i=true;G(e,t)},"Settle: "+(e._label||" unknown promise"));if(!i&&n){i=true;G(e,n)}},e)}function q(e,t){if(t._state===D){W(e,t._result)}else if(t._state===U){G(e,t._result)}else{Y(t,undefined,function(t){return H(e,t)},function(t){return G(e,t)})}}function V(e,t,r){if(t.constructor===e.constructor&&r===A&&t.constructor.resolve===O){q(e,t)}else{if(r===R){G(e,R.error);R.error=null}else if(r===undefined){W(e,t)}else if(a(r)){F(e,t,r)}else{W(e,t)}}}function H(e,t){if(e===t){G(e,M())}else if(r(t)){V(e,t,N(t))}else{W(e,t)}}function z(e){if(e._onerror){e._onerror(e._result)}X(e)}function W(e,t){if(e._state!==x){return}e._result=t;e._state=D;if(e._subscribers.length!==0){f(X,e)}}function G(e,t){if(e._state!==x){return}e._state=U;e._result=t;f(z,e)}function Y(e,t,r,i){var n=e._subscribers;var a=n.length;e._onerror=null;n[a]=t;n[a+D]=r;n[a+U]=i;if(a===0&&e._state){f(X,e)}}function X(e){var t=e._subscribers;var r=e._state;if(t.length===0){return}var i=void 0,n=void 0,a=e._result;for(var s=0;s<t.length;s+=3){i=t[s];n=t[s+r];if(i){$(r,i,n,a)}else{n(a)}}e._subscribers.length=0}function K(e,t){try{return e(t)}catch(e){R.error=e;return R}}function $(e,t,r,i){var n=a(r),s=void 0,o=void 0,u=void 0,l=void 0;if(n){s=K(r,i);if(s===R){l=true;o=s.error;s.error=null}else{u=true}if(t===s){G(t,j());return}}else{s=i;u=true}if(t._state!==x){}else if(n&&u){H(t,s)}else if(l){G(t,o)}else if(e===D){W(t,s)}else if(e===U){G(t,s)}}function Q(e,t){try{t(function t(r){H(e,r)},function t(r){G(e,r)})}catch(t){G(e,t)}}var J=0;function Z(){return J++}function ee(e){e[P]=J++;e._state=undefined;e._result=undefined;e._subscribers=[]}function te(){return new Error("Array Methods must be provided an Array")}var re=function(){function e(e,t){this._instanceConstructor=e;this.promise=new e(L);if(!this.promise[P]){ee(this.promise)}if(o(t)){this.length=t.length;this._remaining=t.length;this._result=new Array(this.length);if(this.length===0){W(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(t);if(this._remaining===0){W(this.promise,this._result)}}}else{G(this.promise,te())}}e.prototype._enumerate=function e(t){for(var r=0;this._state===x&&r<t.length;r++){this._eachEntry(t[r],r)}};e.prototype._eachEntry=function e(t,r){var i=this._instanceConstructor;var n=i.resolve;if(n===O){var a=N(t);if(a===A&&t._state!==x){this._settledAt(t._state,r,t._result)}else if(typeof a!=="function"){this._remaining--;this._result[r]=t}else if(i===ue){var s=new i(L);V(s,t,a);this._willSettleAt(s,r)}else{this._willSettleAt(new i(function(e){return e(t)}),r)}}else{this._willSettleAt(n(t),r)}};e.prototype._settledAt=function e(t,r,i){var n=this.promise;if(n._state===x){this._remaining--;if(t===U){G(n,i)}else{this._result[r]=i}}if(this._remaining===0){W(n,this._result)}};e.prototype._willSettleAt=function e(t,r){var i=this;Y(t,undefined,function(e){return i._settledAt(D,r,e)},function(e){return i._settledAt(U,r,e)})};return e}();function ie(e){return new re(this,e).promise}function ne(e){var t=this;if(!o(e)){return new t(function(e,t){return t(new TypeError("You must pass an array to race."))})}else{return new t(function(r,i){var n=e.length;for(var a=0;a<n;a++){t.resolve(e[a]).then(r,i)}})}}function ae(e){var t=this;var r=new t(L);G(r,e);return r}function se(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function oe(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ue=function(){function e(t){this[P]=Z();this._result=this._state=undefined;this._subscribers=[];if(L!==t){typeof t!=="function"&&se();this instanceof e?Q(this,t):oe()}}e.prototype.catch=function e(t){return this.then(null,t)};e.prototype.finally=function e(t){var r=this;var i=r.constructor;return r.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})})};return e}();ue.prototype.then=A;ue.all=ie;ue.race=ne;ue.resolve=O;ue.reject=ae;ue._setScheduler=d;ue._setAsap=h;ue._asap=f;function le(){var e=void 0;if(typeof i!=="undefined"){e=i}else if(typeof self!=="undefined"){e=self}else{try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if(r==="[object Promise]"&&!t.cast){return}}e.Promise=ue}ue.polyfill=le;ue.Promise=ue;return ue})});var g="2.8.0";var y={isArr:function e(t){return Array.isArray(t)},isFn:function e(t){return typeof t==="function"},isNil:function e(t){return t===null||t===undefined},isNum:function e(t){return typeof t==="number"&&t===t},isNonEmptyStr:function e(t){return typeof t==="string"&&/\S/.test(t)},isObj:function e(t){return Object.prototype.toString.call(t)==="[object Object]"}};var _=o.performance;var b={};["memory","navigation","timing"].forEach(function(e){b[e]=_&&_[e]||{}});["clearMarks","clearMeasures","clearResourceTimings","getEntries","getEntriesByName","getEntriesByType","mark","measure","now","setResourceTimingBufferSize","toJSON"].forEach(function(e){b[e]=function(){if(_&&_[e]){return _[e].apply(_,arguments)}}});var T=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var S=function(){var e=typeof Symbol==="function"&&Symbol.for&&Symbol.for("react.element")||60103;return function t(r,i,n,a){var s=r&&r.defaultProps;var o=arguments.length-3;if(!i&&o!==0){i={}}if(i&&s){for(var u in s){if(i[u]===void 0){i[u]=s[u]}}}else if(!i){i=s||{}}if(o===1){i.children=a}else if(o>1){var l=Array(o);for(var c=0;c<o;c++){l[c]=arguments[c+3]}i.children=l}return{$$typeof:e,type:r,key:n===undefined?null:""+n,ref:null,props:i,_owner:null}}}();var k=function(e){if(typeof Symbol==="function"){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(t!=null)return t.call(e)}if(Symbol.iterator){return e[Symbol.iterator]()}}throw new TypeError("Object is not async iterable")};var w=function(){function e(e){this.value=e}function t(t){var r,i;function n(e,t){return new Promise(function(n,s){var o={key:e,arg:t,resolve:n,reject:s,next:null};if(i){i=i.next=o}else{r=i=o;a(e,t)}})}function a(r,i){try{var n=t[r](i);var o=n.value;if(o instanceof e){Promise.resolve(o.value).then(function(e){a("next",e)},function(e){a("throw",e)})}else{s(n.done?"return":"normal",n.value)}}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":r.resolve({value:t,done:true});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:false});break}r=r.next;if(r){a(r.key,r.arg)}else{i=null}}this._invoke=n;if(typeof t.return!=="function"){this.return=undefined}}if(typeof Symbol==="function"&&Symbol.asyncIterator){t.prototype[Symbol.asyncIterator]=function(){return this}}t.prototype.next=function(e){return this._invoke("next",e)};t.prototype.throw=function(e){return this._invoke("throw",e)};t.prototype.return=function(e){return this._invoke("return",e)};return{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}();var E=function(e,t){var r={},i=false;function n(r,n){i=true;n=new Promise(function(t){t(e[r](n))});return{done:false,value:t(n)}}if(typeof Symbol==="function"&&Symbol.iterator){r[Symbol.iterator]=function(){return this}}r.next=function(e){if(i){i=false;return e}return n("next",e)};if(typeof e.throw==="function"){r.throw=function(e){if(i){i=false;throw e}return n("throw",e)}}if(typeof e.return==="function"){r.return=function(e){return n("return",e)}}return r};var C=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){function i(n,a){try{var s=t[n](a);var o=s.value}catch(e){r(e);return}if(s.done){e(o)}else{return Promise.resolve(o).then(function(e){i("next",e)},function(e){i("throw",e)})}}return i("next")})}};var I=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var A=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var O=function(e,t){for(var r in t){var i=t[r];i.configurable=i.enumerable=true;if("value"in i)i.writable=true;Object.defineProperty(e,r,i)}return e};var P=function(e,t){var r=Object.getOwnPropertyNames(t);for(var i=0;i<r.length;i++){var n=r[i];var a=Object.getOwnPropertyDescriptor(t,n);if(a&&a.configurable&&e[n]===undefined){Object.defineProperty(e,n,a)}}return e};var L=function(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e};var x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};var D=function e(t,r,i){if(t===null)t=Function.prototype;var n=Object.getOwnPropertyDescriptor(t,r);if(n===undefined){var a=Object.getPrototypeOf(t);if(a===null){return undefined}else{return e(a,r,i)}}else if("value"in n){return n.value}else{var s=n.get;if(s===undefined){return undefined}return s.call(i)}};var U=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var R=function(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return t[Symbol.hasInstance](e)}else{return e instanceof t}};var M=function(e){return e&&e.__esModule?e:{default:e}};var j=function(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t.default=e;return t}};var N=function(e,t){if(e!==t){throw new TypeError("Cannot instantiate an arrow function")}};var B=function(e){if(e==null)throw new TypeError("Cannot destructure undefined")};var F=function(e,t){var r={};for(var i in e){if(t.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(e,i))continue;r[i]=e[i]}return r};var q=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var V=typeof global==="undefined"?self:global;var H=function e(t,r,i,n){var a=Object.getOwnPropertyDescriptor(t,r);if(a===undefined){var s=Object.getPrototypeOf(t);if(s!==null){e(s,r,i,n)}}else if("value"in a&&a.writable){a.value=i}else{var o=a.set;if(o!==undefined){o.call(n,i)}}return i};var z=function(){function e(e,t){var r=[];var i=true;var n=false;var a=undefined;try{for(var s=e[Symbol.iterator](),o;!(i=(o=s.next()).done);i=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){n=true;a=e}finally{try{if(!i&&s["return"])s["return"]()}finally{if(n)throw a}}return r}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return e(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var W=function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){var r=[];for(var i=e[Symbol.iterator](),n;!(n=i.next()).done;){r.push(n.value);if(t&&r.length===t)break}return r}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}};var G=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))};var Y=function(e,t){e.raw=t;return e};var X=function(e,t,r){if(e===r){throw new ReferenceError(t+" is not defined - temporal dead zone")}else{return e}};var K={};var $=function(e){return Array.isArray(e)?e:Array.from(e)};var Q=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var J=(Object.freeze||Object)({jsx:S,asyncIterator:k,asyncGenerator:w,asyncGeneratorDelegate:E,asyncToGenerator:C,classCallCheck:I,createClass:A,defineEnumerableProperties:O,defaults:P,defineProperty:L,get:D,inherits:U,interopRequireDefault:M,interopRequireWildcard:j,newArrowCheck:N,objectDestructuringEmpty:B,objectWithoutProperties:F,possibleConstructorReturn:q,selfGlobal:V,set:H,slicedToArray:z,slicedToArrayLoose:W,taggedTemplateLiteral:G,taggedTemplateLiteralLoose:Y,temporalRef:X,temporalUndefined:K,toArray:$,toConsumableArray:Q,typeof:T,extends:x,instanceof:R});var Z={perf:b,Promise:m,assign:function e(){var t;return(t=J).extends.apply(t,arguments)},withoutNilValues:function e(t){var r=t;if(y.isArr(t)){r=t.filter(function(e){return!y.isNil(e)}).map(Z.withoutNilValues)}else if(y.isObj(t)){r={};Object.keys(t).forEach(function(e){if(!y.isNil(t[e])){r[e]=Z.withoutNilValues(t[e])}})}return r},debounce:function e(t,r,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:o;var a=void 0;return function(){var e=this;var s=arguments;var o=function r(){a=null;o=null;if(!i){t.apply(e,s)}};if(!a&&i){t.apply(e,s)}n.clearTimeout(a);a=n.setTimeout(o,r)}},throttle:function e(t,r){var i=Date.now();return function(){var e=Date.now();if(e-i>=r){t.apply(undefined,arguments);i=e}}},qs:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:o&&o.location||{};return x({hash:v.parse((t.hash||"#").substr(1)),search:v.parse((t.search||"?").substr(1))},v)}};x(Z,y);Z.VERSION=g;if(r){r.bc_=Z}return Z});var S=f.bc_;var k;k=function(){return S.Promise.resolve(false)};k.mightBe=false;k.mightNotBe=true;k.lastResult=false;k.VERSION="mock";if(!f.getTech("flash")){(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsFlash=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="5.4.1";var i="2.1.0";function n(e){e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};e.streamFromParts=function(e,t){return e+"&"+t};e.streamToParts=function(e){var t={connection:"",stream:""};if(!e){return t}var r=e.search(/&(?!\w+=)/);var i=void 0;if(r!==-1){i=r+1}else{r=i=e.lastIndexOf("/")+1;if(r===0){r=i=e.length}}t.connection=e.substring(0,r);t.stream=e.substring(i,e.length);return t};e.isStreamingType=function(t){return t in e.streamingFormats};e.RTMP_RE=/^rtmp[set]?:\/\//i;e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)};e.rtmpSourceHandler={};e.rtmpSourceHandler.canPlayType=function(t){if(e.isStreamingType(t)){return"maybe"}return""};e.rtmpSourceHandler.canHandleSource=function(t,r){var i=e.rtmpSourceHandler.canPlayType(t.type);if(i){return i}if(e.isStreamingSrc(t.src)){return"maybe"}return""};e.rtmpSourceHandler.handleSource=function(t,r,i){var n=e.streamToParts(t.src);r.setRtmpConnection(n.connection);r.setRtmpStream(n.stream)};e.registerSourceHandler(e.rtmpSourceHandler);return e}var a=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var s;if(typeof e!=="undefined"){s=e}else if(typeof a!=="undefined"){s=a}else if(typeof self!=="undefined"){s=self}else{s={}}var o=s;var u=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var l=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var c=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var f=t.getComponent("Tech");var d=t.dom;var h=t.url;var p=t.createTimeRange;var v=t.mergeOptions;var m=o&&o.navigator||{};var g=function(e){l(t,e);function t(r,i){u(this,t);var n=c(this,e.call(this,r,i));if(r.source){n.ready(function(){this.setSource(r.source)},true)}if(r.startTime){n.ready(function(){this.load();this.play();this.currentTime(r.startTime)},true)}o.videojs=o.videojs||{};o.videojs.Flash=o.videojs.Flash||{};o.videojs.Flash.onReady=t.onReady;o.videojs.Flash.onEvent=t.onEvent;o.videojs.Flash.onError=t.onError;n.on("seeked",function(){this.lastSeekTarget_=undefined});return n}t.prototype.createEl=function e(){var i=this.options_;if(!i.swf){i.swf="https://vjs.zencdn.net/swf/"+r+"/video-js.swf"}var n=i.techId;var a=v({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:i.autoplay,preload:i.preload,loop:i.loop,muted:i.muted},i.flashVars);var s=v({wmode:"opaque",bgcolor:"#000000"},i.params);var o=v({id:n,name:n,class:"vjs-tech"},i.attributes);this.el_=t.embed(i.swf,a,s,o);this.el_.tech=this;return this.el_};t.prototype.play=function e(){if(this.ended()){this.setCurrentTime(0)}this.el_.vjs_play()};t.prototype.pause=function e(){this.el_.vjs_pause()};t.prototype.src=function e(t){if(t===undefined){return this.currentSrc()}return this.setSrc(t)};t.prototype.setSrc=function e(t){var r=this;t=h.getAbsoluteURL(t);this.el_.vjs_src(t);if(this.autoplay()){this.setTimeout(function(){return r.play()},0)}};t.prototype.seeking=function e(){return this.lastSeekTarget_!==undefined};t.prototype.setCurrentTime=function t(r){var i=this.seekable();if(i.length){r=r>i.start(0)?r:i.start(0);r=r<i.end(i.length-1)?r:i.end(i.length-1);this.lastSeekTarget_=r;this.trigger("seeking");this.el_.vjs_setProperty("currentTime",r);e.prototype.setCurrentTime.call(this)}};t.prototype.currentTime=function e(){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty("currentTime")};t.prototype.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.vjs_getProperty("currentSrc")};t.prototype.duration=function e(){if(this.readyState()===0){return NaN}var e=this.el_.vjs_getProperty("duration");return e>=0?e:Infinity};t.prototype.load=function e(){this.el_.vjs_load()};t.prototype.poster=function e(){this.el_.vjs_getProperty("poster")};t.prototype.setPoster=function e(){};t.prototype.seekable=function e(){var t=this.duration();if(t===0){return p()}return p(0,t)};t.prototype.buffered=function e(){var t=this.el_.vjs_getProperty("buffered");if(t.length===0){return p()}return p(t[0][0],t[0][1])};t.prototype.supportsFullScreen=function e(){return false};t.prototype.enterFullScreen=function e(){return false};t.prototype.getVideoPlaybackQuality=function e(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");if(o.performance&&typeof o.performance.now==="function"){t.creationTime=o.performance.now()}else if(o.performance&&o.performance.timing&&typeof o.performance.timing.navigationStart==="number"){t.creationTime=o.Date.now()-o.performance.timing.navigationStart}return t};return t}(f);var y=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"];var _=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"];var b=g.prototype;function T(e){var t=e.charAt(0).toUpperCase()+e.slice(1);b["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}function S(e){b[e]=function(){return this.el_.vjs_getProperty(e)}}for(var k=0;k<y.length;k++){S(y[k]);T(y[k])}for(var w=0;w<_.length;w++){S(_[w])}g.isSupported=function(){if(t.browser.IS_CHROME&&!t.browser.IS_ANDROID||t.browser.IS_SAFARI&&!t.browser.IS_IOS){return true}return g.version()[0]>=10};f.withSourceHandlers(g);g.nativeSourceHandler={};g.nativeSourceHandler.canPlayType=function(e){if(e in g.formats){return"maybe"}return""};g.nativeSourceHandler.canHandleSource=function(e,t){var r=void 0;function i(e){var t=h.getFileExtension(e);if(t){return"video/"+t}return""}if(!e.type){r=i(e.src)}else{r=e.type.replace(/;.*/,"").toLowerCase()}return g.nativeSourceHandler.canPlayType(r)};g.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};g.nativeSourceHandler.dispose=function(){};g.registerSourceHandler(g.nativeSourceHandler);g.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};g.onReady=function(e){var t=d.$("#"+e);var r=t&&t.tech;if(r&&r.el()){g.checkReady(r)}};g.checkReady=function(e){if(!e.el()){return}if(e.el().vjs_getProperty){e.triggerReady()}else{this.setTimeout(function(){g.checkReady(e)},50)}};g.onEvent=function(e,t){var r=d.$("#"+e).tech;var i=Array.prototype.slice.call(arguments,2);r.setTimeout(function(){r.trigger(t,i)},1)};g.onError=function(e,t){var r=d.$("#"+e).tech;if(t==="srcnotfound"){return r.error(4)}if(typeof t==="string"){r.error("FLASH: "+t)}else{t.origin="flash";r.error(t)}};g.version=function(){var e="0,0,0";try{e=new o.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{if(m.mimeTypes["application/x-shockwave-flash"].enabledPlugin){e=(m.plugins["Shockwave Flash 2.0"]||m.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(e){}}return e.split(",")};g.embed=function(e,t,r,i){var n=g.getEmbedCode(e,t,r,i);var a=d.createEl("div",{innerHTML:n}).childNodes[0];return a};g.getEmbedCode=function(e,t,r,i){var n='<object type="application/x-shockwave-flash" ';var a="";var s="";var o="";if(t){Object.getOwnPropertyNames(t).forEach(function(e){a+=e+"="+t[e]+"&amp;"})}r=v({movie:e,flashvars:a,allowScriptAccess:"always",allowNetworking:"all"},r);Object.getOwnPropertyNames(r).forEach(function(e){s+='<param name="'+e+'" value="'+r[e]+'" />'});i=v({data:e,width:"100%",height:"100%"},i);Object.getOwnPropertyNames(i).forEach(function(e){o+=e+'="'+i[e]+'" '});return""+n+o+">"+s+"</object>"};n(g);if(f.getTech("Flash")){t.log.warn("Not using videojs-flash as it appears to already be registered");t.log.warn("videojs-flash should only be used with video.js@6 and above")}else{t.registerTech("Flash",g)}g.VERSION=i;return g})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("global/window"),require("video.js")):typeof r==="function"&&r.amd?r(["exports","global/window","video.js"],t):t(e.videojsFlashlsSourceHandler={},e.window,e.videojs)})(this,function(e,t,r){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;var i=function(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};i.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};i.prototype.push=function(e){this.trigger("data",e)};i.prototype.flush=function(e){this.trigger("done",e)};var n=i;var a=4,s=128;var o=function(e){var t=0,r={payloadType:-1,payloadSize:0},i=0,n=0;while(t<e.byteLength){if(e[t]===s){break}while(e[t]===255){i+=255;t++}i+=e[t++];while(e[t]===255){n+=255;t++}n+=e[t++];if(!r.payload&&i===a){r.payloadType=i;r.payloadSize=n;r.payload=e.subarray(t,t+n);break}t+=n;i=0;n=0}return r};var u=function(e){if(e.payload[0]!==181){return null}if((e.payload[1]<<8|e.payload[2])!==49){return null}if(String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])!=="GA94"){return null}if(e.payload[7]!==3){return null}return e.payload.subarray(8,e.payload.length-1)};var l=function(e,t){var r=[],i,n,a,s;if(!(t[0]&64)){return r}n=t[0]&31;for(i=0;i<n;i++){a=i*3;s={type:t[a+2]&3,pts:e};if(t[a+2]&4){s.ccData=t[a+3]<<8|t[a+4];r.push(s)}}return r};var c=function(e){var t=e.byteLength,r=[],i=1,n,a;while(i<t-2){if(e[i]===0&&e[i+1]===0&&e[i+2]===3){r.push(i+2);i+=2}else{i++}}if(r.length===0){return e}n=t-r.length;a=new Uint8Array(n);var s=0;for(i=0;i<n;s++,i++){if(s===r[0]){s++;r.shift()}a[i]=e[s]}return a};var f={parseSei:o,parseUserData:u,parseCaptionPackets:l,discardEmulationPreventionBytes:c,USER_DATA_REGISTERED_ITU_T_T35:a};var d=function(){d.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new y(0,0),new y(0,1),new y(1,0),new y(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("done",this.trigger.bind(this,"done"))},this)};d.prototype=new n;d.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=f.parseSei(e.escapedRBSP);if(t.payloadType!==f.USER_DATA_REGISTERED_ITU_T_T35){return}r=f.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=f.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};d.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(e){e.flush()},this);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(e){e.flush()},this);return};d.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};d.prototype.dispatchCea608Packet=function(e){if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};d.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};d.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};var h={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var p=function(e){if(e===null){return""}e=h[e]||e;return String.fromCharCode(e)};var v=14;var m=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var g=function(){var e=[],t=v+1;while(t--){e.push("")}return e};var y=function(e,t){y.prototype.init.call(this);this.field_=e||0;this.dataChannel_=t||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=g()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=g()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=g()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=m.indexOf(t&7968);if(this.mode_==="rollUp"){this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=p(i);a+=p(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};y.prototype=new n;y.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};y.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=g();this.nonDisplayed_=g();this.lastControlCode_=null;this.column_=0;this.row_=v;this.rollUpRows_=2;this.formatting_=[]};y.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};y.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};y.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&(t>=32&&t<=63)};y.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&(t>=32&&t<=47)};y.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&(t>=33&&t<=35)};y.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&(t>=64&&t<=127)};y.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};y.prototype.isNormalChar=function(e){return e>=32&&e<=127};y.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=v;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=g();this.displayed_=g()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};y.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};y.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};y.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};y.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};y.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<v+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};y.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var _={CaptionStream:d,Cea608Stream:y};var b=_.CaptionStream;var T={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var S=function(e,t,r){var i,n="";for(i=t;i<r;i++){n+="%"+("00"+e[i].toString(16)).slice(-2)}return n},k=function(e,t,r){return decodeURIComponent(S(e,t,r))},w=function(e,t,r){return unescape(S(e,t,r))},E=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},C={TXXX:function(e){var t;if(e.data[0]!==3){return}for(t=1;t<e.data.length;t++){if(e.data[t]===0){e.description=k(e.data,1,t);e.value=k(e.data,t+1,e.data.length).replace(/\0*$/,"");break}}e.data=e.value},WXXX:function(e){var t;if(e.data[0]!==3){return}for(t=1;t<e.data.length;t++){if(e.data[t]===0){e.description=k(e.data,1,t);e.url=k(e.data,t+1,e.data.length);break}}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++){if(e.data[t]===0){e.owner=w(e.data,0,t);break}}e.privateData=e.data.subarray(t+1);e.data=e.privateData}},I;I=function(e){var t={debug:!!(e&&e.debug),descriptor:e&&e.descriptor},r=0,i=[],n=0,a;I.prototype.init.call(this);this.dispatchType=T.METADATA_STREAM_TYPE.toString(16);if(t.descriptor){for(a=0;a<t.descriptor.length;a++){this.dispatchType+=("00"+t.descriptor[a].toString(16)).slice(-2)}}this.push=function(e){var a,s,o,u,l,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){n=0;i.length=0}if(i.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(t.debug){console.log("Skipping unrecognized metadata packet")}return}i.push(e);n+=e.data.byteLength;if(i.length===1){r=E(e.data.subarray(6,10));r+=10}if(n<r){return}a={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts};for(l=0;l<r;){a.data.set(i[0].data.subarray(0,r-l),l);l+=i[0].data.byteLength;n-=i[0].data.byteLength;i.shift()}s=10;if(a.data[5]&64){s+=4;s+=E(a.data.subarray(10,14));r-=E(a.data.subarray(16,20))}do{o=E(a.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}c=String.fromCharCode(a.data[s],a.data[s+1],a.data[s+2],a.data[s+3]);u={id:c,data:a.data.subarray(s+10,s+o+10)};u.key=u.id;if(C[u.id]){C[u.id](u);if(u.owner==="com.apple.streaming.transportStreamTimestamp"){var f=u.data,d=(f[3]&1)<<30|f[4]<<22|f[5]<<14|f[6]<<6|f[7]>>>2;d*=4;d+=f[7]&3;u.timeStamp=d;if(a.pts===undefined&&a.dts===undefined){a.pts=u.timeStamp;a.dts=u.timeStamp}this.trigger("timestamp",u)}}a.frames.push(u);s+=10;s+=o}while(s<r);this.trigger("data",a)}};I.prototype=new n;var A=I;var O=function e(t,r){var i={id:r.index+"",width:r.width,height:r.height,bandwidth:r.bitrate,isEnabled_:true};i.enabled=function(e){if(typeof e==="undefined"){return i.isEnabled_}if(e===i.isEnabled_){return}if(e===true||e===false){i.isEnabled_=e;t()}};return i};var P=function e(t){var r=null;var i=function e(){var i=r.filter(function(e){return e.enabled()});if(i.length===r.length||i.length===0){t.el_.vjs_setProperty("autoLevelCapping",-1);t.el_.vjs_setProperty("level",-1);return}if(i.length===1){t.el_.vjs_setProperty("level",parseInt(i[0].id,10));t.el_.vjs_setProperty("autoLevelCapping",-1);return}var n=i[i.length-1].id;t.el_.vjs_setProperty("autoLevelCapping",parseInt(n,10));t.el_.vjs_setProperty("level",-1)};return function(){if(!r){var e=t.el_.vjs_getProperty("levels");r=e.filter(function(e){return!e.audio}).map(O.bind(null,i))}return r}};var L=function e(t){var r=t.el_.vjs_getProperty("audioTracks");var i=t.audioTracks();var n=null;for(var a=0;a<i.length;a++){if(i[a].enabled){n=i[a].id;break}}if(n===null){return}for(var s=0;s<r.length;s++){if(n===r[s].title){t.el_.vjs_setProperty("audioTrack",s);return}}};var x=function e(t){var i=t.el_.vjs_getProperty("altAudioTracks");var n=t.el_.vjs_getProperty("audioTracks");var a=t.el_.vjs_getProperty("audioTrack");n.forEach(function(e,n){var s=i[e.id];t.audioTracks().addTrack(new r.AudioTrack({id:s.name,enabled:a===n,language:s.lang,default:s.default_track,label:s.name}))})};var D="1.4.8";var U=function e(t){Object.defineProperties(t.frame,{id:{get:function e(){r.log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return t.value.key}},value:{get:function e(){r.log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return t.value.data}},privateData:{get:function e(){r.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return t.value.data}}})};var R=function e(t,r,i){var n=t.remoteTextTracks()||[];for(var a=0;a<n.length;a++){var s=n[a];if(s.kind===r&&s.label===i){t.removeRemoteTextTrack(s)}}};var M=function e(t){var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r};var j=function e(t,r,i){var n;var a;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime<=r&&a.endTime>=t){i.removeCue(a)}}};var N=function e(t,r){if(t.length){j(0,t.start(0),r)}};var B=function e(t,r){var i=-1;for(var n=0;n<t.length;n++){if(t[n].id===r){i=n;break}}t.selectedIndex_=i;t.trigger({selectedIndex:i,type:"change"})};var F=1/30;var q=function e(t,i){var n=[];if(t&&t.length){for(var a=0;a<t.length;a++){if(i(t.start(a),t.end(a))){n.push([t.start(a),t.end(a)])}}}return r.createTimeRanges(n)};var V=function e(t,r){return q(t,function(e,t){return e-F<=r&&t+F>=r})};var H=function(){function e(e,t,i){var n=this;if(t.options_&&t.options_.playerId){var a=r(t.options_.playerId);if(!a.hasOwnProperty("hls")){Object.defineProperty(a,"hls",{get:function e(){r.log.warn("player.hls is deprecated. Use player.tech_.hls instead.");t.trigger({type:"usage",name:"flashls-player-access"});return n}})}}Object.defineProperties(this,{stats:{get:function e(){return this.tech_.el_.vjs_getProperty("stats")}},bandwidth:{get:function e(){return this.tech_.el_.vjs_getProperty("stats").bandwidth}}});this.tech_=t;this.metadataTrack_=null;this.inbandTextTracks_={};this.metadataStream_=new A;this.captionStream_=new b;this.offsetPts=null;this.offsetDts=null;this.onLoadedmetadata_=this.onLoadedmetadata_.bind(this);this.onSeeking_=this.onSeeking_.bind(this);this.onId3updated_=this.onId3updated_.bind(this);this.onCaptionData_=this.onCaptionData_.bind(this);this.onMetadataStreamData_=this.onMetadataStreamData_.bind(this);this.onCaptionStreamData_=this.onCaptionStreamData_.bind(this);this.onLevelSwitch_=this.onLevelSwitch_.bind(this);this.onLevelLoaded_=this.onLevelLoaded_.bind(this);this.onFragmentLoaded_=this.onFragmentLoaded_.bind(this);this.onAudioTrackChanged=this.onAudioTrackChanged.bind(this);this.onPlay_=this.onPlay_.bind(this);this.tech_.on("loadedmetadata",this.onLoadedmetadata_);this.tech_.on("seeking",this.onSeeking_);this.tech_.on("id3updated",this.onId3updated_);this.tech_.on("captiondata",this.onCaptionData_);this.tech_.on("levelswitch",this.onLevelSwitch_);this.tech_.on("levelloaded",this.onLevelLoaded_);this.tech_.on("fragmentloaded",this.onFragmentLoaded_);this.tech_.on("play",this.onPlay_);this.metadataStream_.on("data",this.onMetadataStreamData_);this.captionStream_.on("data",this.onCaptionStreamData_);this.playlists=new r.EventTarget;this.playlists.media=function(){return n.media_()}}var i=e.prototype;i.src=function e(t){if(!t){return}this.tech_.setSrc(t.src)};i.onPlay_=function e(){if(this.tech_.duration()===Infinity){var t=this.seekable();if(this.tech_.currentTime()<t.start(0)){return this.tech_.setCurrentTime(t.end(t.length-1))}}};i.seekable=function e(){var t=this.tech_.el_.vjs_getProperty("seekableStart");var i=this.tech_.el_.vjs_getProperty("seekableEnd");if(i===0){return r.createTimeRange()}return r.createTimeRange(t,i)};i.media_=function e(){var t=this.tech_.el_.vjs_getProperty("levels");var r=this.tech_.el_.vjs_getProperty("level");var i;if(t.length){i={resolvedUri:t[r].url,attributes:{BANDWIDTH:t[r].bitrate,RESOLUTION:{width:t[r].width,height:t[r].height}}}}return i};i.onLoadedmetadata_=function e(){var t=this;this.representations=P(this.tech_);var i=r.players[this.tech_.options_.playerId];if(i&&i.qualityLevels){this.qualityLevels_=i.qualityLevels();this.representations().forEach(function(e){t.qualityLevels_.addQualityLevel(e)});B(this.qualityLevels_,this.tech_.el_.vjs_getProperty("level")+"")}x(this.tech_);this.tech_.audioTracks().on("change",this.onAudioTrackChanged)};i.onAudioTrackChanged=function e(){L(this.tech_)};i.onLevelSwitch_=function e(t,r){if(this.qualityLevels_){B(this.qualityLevels_,r[0].levelIndex+"")}this.playlists.trigger("mediachange");this.tech_.trigger({type:"mediachange",bubbles:true})};i.onLevelLoaded_=function e(){this.playlists.trigger("loadedplaylist")};i.onFragmentLoaded_=function e(){this.tech_.trigger("bandwidthupdate");this.captionStream_.flush()};i.onSeeking_=function e(){var t=this;j(0,Infinity,this.metadataTrack_);var r=V(this.tech_.buffered(),this.tech_.currentTime());if(!r.length){Object.keys(this.inbandTextTracks_).forEach(function(e){j(0,Infinity,t.inbandTextTracks_[e])});this.captionStream_.reset()}};i.onId3updated_=function e(r,i){var n=t.atob(i[0]);var a=M(n);var s={type:"timed-metadata",dataAlignmentIndicator:true,data:a};this.metadataStream_.push(s)};i.onMetadataStreamData_=function e(r){var i=this;if(!this.metadataTrack_){this.metadataTrack_=this.tech_.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;this.metadataTrack_.inBandMetadataTrackDispatchType="15"}N(this.tech_.buffered(),this.metadataTrack_);var n=this.tech_.currentTime();r.frames.forEach(function(e){var r=new t.VTTCue(n,n+.1,e.value||e.url||e.data||"");r.frame=e;r.value=e;U(r);i.metadataTrack_.addCue(r)});if(this.metadataTrack_.cues&&this.metadataTrack_.cues.length){var a=this.metadataTrack_.cues;var s=[];var o=this.tech_.duration();if(isNaN(o)||Math.abs(o)===Infinity){o=Number.MAX_VALUE}for(var u=0;u<a.length;u++){s.push(a[u])}s.sort(function(e,t){return e.startTime-t.startTime});for(var l=0;l<s.length-1;l++){if(s[l].endTime!==s[l+1].startTime){s[l].endTime=s[l+1].startTime}}s[s.length-1].endTime=o}};i.onCaptionData_=function e(r,i){var n=this;i[0].forEach(function(e){if(!n.offsetPts){n.offsetPts=e.pos}if(!n.offsetDts){n.offsetDts=e.dts}n.captionStream_.push({pts:(e.pos-n.offsetPts)*9e4,dts:(e.dts-n.offsetDts)*9e4,escapedRBSP:M(t.atob(e.data)),nalUnitType:"sei_rbsp"})})};i.onCaptionStreamData_=function e(r){if(r){if(!this.inbandTextTracks_[r.stream]){R(this.tech_,"captions",r.stream);this.inbandTextTracks_[r.stream]=this.tech_.addRemoteTextTrack({kind:"captions",label:r.stream,id:r.stream},false).track}N(this.tech_.buffered(),this.inbandTextTracks_[r.stream]);this.inbandTextTracks_[r.stream].addCue(new t.VTTCue(r.startPts/9e4,r.endPts/9e4,r.text))}};i.dispose=function e(){this.tech_.off("loadedmetadata",this.onLoadedmetadata_);this.tech_.off("seeked",this.onSeeking_);this.tech_.off("id3updated",this.onId3updated_);this.tech_.off("captiondata",this.onCaptionData_);this.tech_.audioTracks().off("change",this.onAudioTrackChanged);this.tech_.off("levelswitch",this.onLevelSwitch_);this.tech_.off("levelloaded",this.onLevelLoaded_);this.tech_.off("fragmentloaded",this.onFragmentLoaded_);this.tech_.off("play",this.onPlay_);if(this.qualityLevels_){this.qualityLevels_.dispose()}};return e}();var z={};var W=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;z.canPlayType=function(e){return W.test(e)?"maybe":""};z.canHandleSource=function(e,t){return z.canPlayType(e.type)==="maybe"};z.handleSource=function(e,t,r){t.hls=new H(e,t,r);t.hls.src(e);return t.hls};r.getTech("Flash").registerSourceHandler(z,0);z.VERSION=D;e.FlashlsHandler=H;e.default=z;Object.defineProperty(e,"__esModule",{value:true})});(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("video.js")):typeof r==="function"&&r.amd?r(["exports","video.js"],t):t(e.videojsHttpStreaming={},e.videojs)})(this,function(r,i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i;var n=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}var s={};var o=Object.freeze({default:s});var u=o&&s||o;var l=typeof n!=="undefined"?n:typeof e!=="undefined"?e:{};var c;if(typeof t!=="undefined"){c=t}else{c=l["__GLOBAL_DOCUMENT_CACHE@4"];if(!c){c=l["__GLOBAL_DOCUMENT_CACHE@4"]=u}}var f=c;var d=a(function(e,t){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var i=/^([^\/;?#]*)(.*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var s={buildAbsoluteURL:function e(t,r,n){n=n||{};t=t.trim();r=r.trim();if(!r){if(!n.alwaysNormalize){return t}var a=this.parseURL(t);if(!a){throw new Error("Error trying to parse base URL.")}a.path=s.normalizePath(a.path);return s.buildURLFromParts(a)}var o=this.parseURL(r);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return r}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var u=this.parseURL(t);if(!u){throw new Error("Error trying to parse base URL.")}if(!u.netLoc&&u.path&&u.path[0]!=="/"){var l=i.exec(u.path);u.netLoc=l[1];u.path=l[2]}if(u.netLoc&&!u.path){u.path="/"}var c={scheme:u.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){c.netLoc=u.netLoc;if(o.path[0]!=="/"){if(!o.path){c.path=u.path;if(!o.params){c.params=u.params;if(!o.query){c.query=u.query}}}else{var f=u.path;var d=f.substring(0,f.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(d)}}}if(c.path===null){c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(c)},parseURL:function e(t){var i=r.exec(t);if(!i){return null}return{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}},normalizePath:function e(t){t=t.split("").reverse().join("").replace(n,"");while(t.length!==(t=t.replace(a,"")).length){}return t.split("").reverse().join("")},buildURLFromParts:function e(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};e.exports=s})(n)});var h;if(typeof e!=="undefined"){h=e}else if(typeof n!=="undefined"){h=n}else if(typeof self!=="undefined"){h=self}else{h={}}var p=h;var v=function e(t,r){if(/^[a-z]+:/i.test(r)){return r}if(!/\/\//i.test(t)){t=d.buildAbsoluteURL(p.location.href,t)}return d.buildAbsoluteURL(t,r)};var m=function e(t,r,i){if(t&&i.responseURL&&r!==i.responseURL){return i.responseURL}return r};function g(){g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};return g.apply(this,arguments)}function y(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function _(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var b=function(){function e(){this.listeners={}}var t=e.prototype;t.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};t.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};t.trigger=function e(t){var r=this.listeners[t];var i;var n;var a;if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=Array.prototype.slice.call(arguments,1);n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};t.dispose=function e(){this.listeners={}};t.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var T=function(e){y(t,e);function t(){var t;t=e.call(this)||this;t.buffer="";return t}var r=t.prototype;r.push=function e(t){var r;this.buffer+=t;r=this.buffer.indexOf("\n");for(;r>-1;r=this.buffer.indexOf("\n")){this.trigger("data",this.buffer.substring(0,r));this.buffer=this.buffer.substring(r+1)}};return t}(b);var S=function e(){var t="[^=]*";var r='"[^"]*"|[^,]*';var i="(?:"+t+")=(?:"+r+")";return new RegExp("(?:^|,)("+i+")")};var k=function e(t){var r=t.split(S());var i={};var n=r.length;var a;while(n--){if(r[n]===""){continue}a=/([^=]*)=(.*)/.exec(r[n]).slice(1);a[0]=a[0].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^['"](.*)['"]$/g,"$1");i[a[0]]=a[1]}return i};var w=function(e){y(t,e);function t(){var t;t=e.call(this)||this;t.customParsers=[];t.tagMappers=[];return t}var r=t.prototype;r.push=function e(t){var r=this;var i;var n;t=t.trim();if(t.length===0){return}if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}var a=this.tagMappers.reduce(function(e,r){var i=r(t);if(i===t){return e}return e.concat([i])},[t]);a.forEach(function(e){for(var t=0;t<r.customParsers.length;t++){if(r.customParsers[t].call(r,e)){return}}if(e.indexOf("#EXT")!==0){r.trigger("data",{type:"comment",text:e.slice(1)});return}e=e.replace("\r","");i=/^#EXTM3U/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"m3u"});return}i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"inf"};if(i[1]){n.duration=parseFloat(i[1])}if(i[2]){n.title=i[2]}r.trigger("data",n);return}i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"targetduration"};if(i[1]){n.duration=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"totalduration"};if(i[1]){n.duration=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"version"};if(i[1]){n.version=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"media-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"discontinuity-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"playlist-type"};if(i[1]){n.playlistType=i[1]}r.trigger("data",n);return}i=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"byterange"};if(i[1]){n.length=parseInt(i[1],10)}if(i[2]){n.offset=parseInt(i[2],10)}r.trigger("data",n);return}i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e);if(i){n={type:"tag",tagType:"allow-cache"};if(i[1]){n.allowed=!/NO/.test(i[1])}r.trigger("data",n);return}i=/^#EXT-X-MAP:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"map"};if(i[1]){var a=k(i[1]);if(a.URI){n.uri=a.URI}if(a.BYTERANGE){var s=a.BYTERANGE.split("@"),o=s[0],u=s[1];n.byterange={};if(o){n.byterange.length=parseInt(o,10)}if(u){n.byterange.offset=parseInt(u,10)}}}r.trigger("data",n);return}i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"stream-inf"};if(i[1]){n.attributes=k(i[1]);if(n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION.split("x");var c={};if(l[0]){c.width=parseInt(l[0],10)}if(l[1]){c.height=parseInt(l[1],10)}n.attributes.RESOLUTION=c}if(n.attributes.BANDWIDTH){n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)}if(n.attributes["PROGRAM-ID"]){n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10)}}r.trigger("data",n);return}i=/^#EXT-X-MEDIA:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"media"};if(i[1]){n.attributes=k(i[1])}r.trigger("data",n);return}i=/^#EXT-X-ENDLIST/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"endlist"});return}i=/^#EXT-X-DISCONTINUITY/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"discontinuity"});return}i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"program-date-time"};if(i[1]){n.dateTimeString=i[1];n.dateTimeObject=new Date(i[1])}r.trigger("data",n);return}i=/^#EXT-X-KEY:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"key"};if(i[1]){n.attributes=k(i[1]);if(n.attributes.IV){if(n.attributes.IV.substring(0,2).toLowerCase()==="0x"){n.attributes.IV=n.attributes.IV.substring(2)}n.attributes.IV=n.attributes.IV.match(/.{8}/g);n.attributes.IV[0]=parseInt(n.attributes.IV[0],16);n.attributes.IV[1]=parseInt(n.attributes.IV[1],16);n.attributes.IV[2]=parseInt(n.attributes.IV[2],16);n.attributes.IV[3]=parseInt(n.attributes.IV[3],16);n.attributes.IV=new Uint32Array(n.attributes.IV)}}r.trigger("data",n);return}i=/^#EXT-X-START:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"start"};if(i[1]){n.attributes=k(i[1]);n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]);n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out-cont"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-in"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}r.trigger("data",{type:"tag",data:e.slice(4)})})};r.addParser=function e(t){var r=this;var i=t.expression,n=t.customType,a=t.dataParser,s=t.segment;if(typeof a!=="function"){a=function e(t){return t}}this.customParsers.push(function(e){var t=i.exec(e);if(t){r.trigger("data",{type:"custom",data:a(e),customType:n,segment:s});return true}})};r.addTagMapper=function e(t){var r=t.expression,i=t.map;var n=function e(t){if(r.test(t)){return i(t)}return t};this.tagMappers.push(n)};return t}(b);var E=function(e){y(t,e);function t(){var t;t=e.call(this)||this;t.lineStream=new T;t.parseStream=new w;t.lineStream.pipe(t.parseStream);var r=_(_(t));var i=[];var n={};var a;var s;var o=function e(){};var u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};var l=0;t.manifest={allowCache:true,discontinuityStarts:[],segments:[]};t.parseStream.on("data",function(e){var t;var c;({tag:function f(){(({"allow-cache":function t(){this.manifest.allowCache=e.allowed;if(!("allowed"in e)){this.trigger("info",{message:"defaulting allowCache to YES"});this.manifest.allowCache=true}},byterange:function t(){var t={};if("length"in e){n.byterange=t;t.length=e.length;if(!("offset"in e)){this.trigger("info",{message:"defaulting offset to zero"});e.offset=0}}if("offset"in e){n.byterange=t;t.offset=e.offset}},endlist:function e(){this.manifest.endList=true},inf:function t(){if(!("mediaSequence"in this.manifest)){this.manifest.mediaSequence=0;this.trigger("info",{message:"defaulting media sequence to zero"})}if(!("discontinuitySequence"in this.manifest)){this.manifest.discontinuitySequence=0;this.trigger("info",{message:"defaulting discontinuity sequence to zero"})}if(e.duration>0){n.duration=e.duration}if(e.duration===0){n.duration=.01;this.trigger("info",{message:"updating zero segment duration to a small value"})}this.manifest.segments=i},key:function t(){if(!e.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(e.attributes.METHOD==="NONE"){s=null;return}if(!e.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(!e.attributes.METHOD){this.trigger("warn",{message:"defaulting key method to AES-128"})}s={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI};if(typeof e.attributes.IV!=="undefined"){s.iv=e.attributes.IV}},"media-sequence":function t(){if(!isFinite(e.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number});return}this.manifest.mediaSequence=e.number},"discontinuity-sequence":function t(){if(!isFinite(e.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number});return}this.manifest.discontinuitySequence=e.number;l=e.number},"playlist-type":function t(){if(!/VOD|EVENT/.test(e.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist});return}this.manifest.playlistType=e.playlistType},map:function t(){a={};if(e.uri){a.uri=e.uri}if(e.byterange){a.byterange=e.byterange}},"stream-inf":function t(){this.manifest.playlists=i;this.manifest.mediaGroups=this.manifest.mediaGroups||u;if(!e.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}if(!n.attributes){n.attributes={}}g(n.attributes,e.attributes)},media:function r(){this.manifest.mediaGroups=this.manifest.mediaGroups||u;if(!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{};t=i[e.attributes["GROUP-ID"]];c={default:/yes/i.test(e.attributes.DEFAULT)};if(c.default){c.autoselect=true}else{c.autoselect=/yes/i.test(e.attributes.AUTOSELECT)}if(e.attributes.LANGUAGE){c.language=e.attributes.LANGUAGE}if(e.attributes.URI){c.uri=e.attributes.URI}if(e.attributes["INSTREAM-ID"]){c.instreamId=e.attributes["INSTREAM-ID"]}if(e.attributes.CHARACTERISTICS){c.characteristics=e.attributes.CHARACTERISTICS}if(e.attributes.FORCED){c.forced=/yes/i.test(e.attributes.FORCED)}t[e.attributes.NAME]=c},discontinuity:function e(){l+=1;n.discontinuity=true;this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function t(){if(typeof this.manifest.dateTimeString==="undefined"){this.manifest.dateTimeString=e.dateTimeString;this.manifest.dateTimeObject=e.dateTimeObject}n.dateTimeString=e.dateTimeString;n.dateTimeObject=e.dateTimeObject},targetduration:function t(){if(!isFinite(e.duration)||e.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration});return}this.manifest.targetDuration=e.duration},totalduration:function t(){if(!isFinite(e.duration)||e.duration<0){this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration});return}this.manifest.totalDuration=e.duration},start:function t(){if(!e.attributes||isNaN(e.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}},"cue-out":function t(){n.cueOut=e.data},"cue-out-cont":function t(){n.cueOutCont=e.data},"cue-in":function t(){n.cueIn=e.data}})[e.tagType]||o).call(r)},uri:function t(){n.uri=e.uri;i.push(n);if(this.manifest.targetDuration&&!("duration"in n)){this.trigger("warn",{message:"defaulting segment duration to the target duration"});n.duration=this.manifest.targetDuration}if(s){n.key=s}n.timeline=l;if(a){n.map=a}n={}},comment:function e(){},custom:function t(){if(e.segment){n.custom=n.custom||{};n.custom[e.customType]=e.data}else{this.manifest.custom=this.manifest.custom||{};this.manifest.custom[e.customType]=e.data}}})[e.type].call(r)});return t}var r=t.prototype;r.push=function e(t){this.lineStream.push(t)};r.end=function e(){this.lineStream.push("\n")};r.addParser=function e(t){this.parseStream.addParser(t)};r.addTagMapper=function e(t){this.parseStream.addTagMapper(t)};return t}(b);var C=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var I=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var A=function e(t,r,i){if(t===null)t=Function.prototype;var n=Object.getOwnPropertyDescriptor(t,r);if(n===undefined){var a=Object.getPrototypeOf(t);if(a===null){return undefined}else{return e(a,r,i)}}else if("value"in n){return n.value}else{var s=n.get;if(s===undefined){return undefined}return s.call(i)}};var O=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var P=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var L=function(){function e(e,t){var r=[];var i=true;var n=false;var a=undefined;try{for(var s=e[Symbol.iterator](),o;!(i=(o=s.next()).done);i=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){n=true;a=e}finally{try{if(!i&&s["return"])s["return"]()}finally{if(n)throw a}}return r}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return e(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var x=i.mergeOptions,D=i.EventTarget,U=i.log;var R=function e(t,r){["AUDIO","SUBTITLES"].forEach(function(e){for(var i in t.mediaGroups[e]){for(var n in t.mediaGroups[e][i]){var a=t.mediaGroups[e][i][n];r(a,e,i,n)}}})};var M=function e(t,r,i){var n=r.slice();i=i||0;var a=Math.min(t.length,r.length+i);for(var s=i;s<a;s++){n[s-i]=x(t[s],n[s-i])}return n};var j=function e(t,r){if(!t.resolvedUri){t.resolvedUri=v(r,t.uri)}if(t.key&&!t.key.resolvedUri){t.key.resolvedUri=v(r,t.key.uri)}if(t.map&&!t.map.resolvedUri){t.map.resolvedUri=v(r,t.map.uri)}};var N=function e(t,r){var i=x(t,{});var n=i.playlists[r.uri];if(!n){return null}if(n.segments&&r.segments&&n.segments.length===r.segments.length&&n.endList===r.endList&&n.mediaSequence===r.mediaSequence){return null}var a=x(n,r);if(n.segments){a.segments=M(n.segments,r.segments,r.mediaSequence-n.mediaSequence)}a.segments.forEach(function(e){j(e,a.resolvedUri)});for(var s=0;s<i.playlists.length;s++){if(i.playlists[s].uri===r.uri){i.playlists[s]=a}}i.playlists[r.uri]=a;return i};var B=function e(t){var r=t.playlists.length;while(r--){var i=t.playlists[r];t.playlists[i.uri]=i;i.resolvedUri=v(t.uri,i.uri);i.id=r;if(!i.attributes){i.attributes={};U.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}};var F=function e(t){R(t,function(e){if(e.uri){e.resolvedUri=v(t.uri,e.uri)}})};var q=function e(t,r){var i=t.segments[t.segments.length-1];var n=void 0;if(r&&i&&i.duration){n=i.duration*1e3}else{n=(t.targetDuration||10)*500}return n};var V=function(e){O(t,e);function t(e,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};C(this,t);var n=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var a=i.withCredentials,s=a===undefined?false:a,o=i.handleManifestRedirects,u=o===undefined?false:o;n.srcUrl=e;n.hls_=r;n.withCredentials=s;n.handleManifestRedirects=u;var l=r.options_;n.customTagParsers=l&&l.customTagParsers||[];n.customTagMappers=l&&l.customTagMappers||[];if(!n.srcUrl){throw new Error("A non-empty playlist URL is required")}n.state="HAVE_NOTHING";n.on("mediaupdatetimeout",function(){if(n.state!=="HAVE_METADATA"){return}n.state="HAVE_CURRENT_METADATA";n.request=n.hls_.xhr({uri:v(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(e,t){if(!n.request){return}if(e){return n.playlistRequestError(n.request,n.media().uri,"HAVE_METADATA")}n.haveMetadata(n.request,n.media().uri)})});return n}I(t,[{key:"playlistRequestError",value:function e(t,r,i){this.request=null;if(i){this.state=i}this.error={playlist:this.master.playlists[r],status:t.status,message:"HLS playlist request error at URL: "+r+".",responseText:t.responseText,code:t.status>=500?4:2};this.trigger("error")}},{key:"haveMetadata",value:function e(t,r){var i=this;this.request=null;this.state="HAVE_METADATA";var n=new E;this.customTagParsers.forEach(function(e){return n.addParser(e)});this.customTagMappers.forEach(function(e){return n.addTagMapper(e)});n.push(t.responseText);n.end();n.manifest.uri=r;n.manifest.attributes=n.manifest.attributes||{};var a=N(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration;if(a){this.master=a;this.media_=this.master.playlists[n.manifest.uri]}else{this.trigger("playlistunchanged")}if(!this.media().endList){p.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=p.setTimeout(function(){i.trigger("mediaupdatetimeout")},q(this.media(),!!a))}this.trigger("loadedplaylist")}},{key:"dispose",value:function e(){this.stopRequest();p.clearTimeout(this.mediaUpdateTimeout);p.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}}},{key:"media",value:function e(t,r){var i=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}if(typeof t==="string"){if(!this.master.playlists[t]){throw new Error("Unknown playlist URI: "+t)}t=this.master.playlists[t]}p.clearTimeout(this.finalRenditionTimeout);if(r){var n=t.targetDuration/2*1e3||5*1e3;this.finalRenditionTimeout=p.setTimeout(this.media.bind(this,t,false),n);return}var a=this.state;var s=!this.media_||t.uri!==this.media_.uri;if(this.master.playlists[t.uri].endList){if(this.request){this.request.onreadystatechange=null;this.request.abort();this.request=null}this.state="HAVE_METADATA";this.media_=t;if(s){this.trigger("mediachanging");this.trigger("mediachange")}return}if(!s){return}this.state="SWITCHING_MEDIA";if(this.request){if(t.resolvedUri===this.request.url){return}this.request.onreadystatechange=null;this.request.abort();this.request=null}if(this.media_){this.trigger("mediachanging")}this.request=this.hls_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},function(e,r){if(!i.request){return}t.resolvedUri=m(i.handleManifestRedirects,t.resolvedUri,r);if(e){return i.playlistRequestError(i.request,t.uri,a)}i.haveMetadata(r,t.uri);if(a==="HAVE_MASTER"){i.trigger("loadedmetadata")}else{i.trigger("mediachange")}})}},{key:"pause",value:function e(){this.stopRequest();p.clearTimeout(this.mediaUpdateTimeout);if(this.state==="HAVE_NOTHING"){this.started=false}if(this.state==="SWITCHING_MEDIA"){if(this.media_){this.state="HAVE_METADATA"}else{this.state="HAVE_MASTER"}}else if(this.state==="HAVE_CURRENT_METADATA"){this.state="HAVE_METADATA"}}},{key:"load",value:function e(t){var r=this;p.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=p.setTimeout(function(){return r.load()},n);return}if(!this.started){this.start();return}if(i&&!i.endList){this.trigger("mediaupdatetimeout")}else{this.trigger("loadedplaylist")}}},{key:"start",value:function e(){var t=this;this.started=true;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"HLS playlist request error at URL: "+t.srcUrl+".",responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}var i=new E;t.customTagParsers.forEach(function(e){return i.addParser(e)});t.customTagMappers.forEach(function(e){return i.addTagMapper(e)});i.push(r.responseText);i.end();t.state="HAVE_MASTER";t.srcUrl=m(t.handleManifestRedirects,t.srcUrl,r);i.manifest.uri=t.srcUrl;if(i.manifest.playlists){t.master=i.manifest;B(t.master);F(t.master);t.trigger("loadedplaylist");if(!t.request){t.media(i.manifest.playlists[0])}return}t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:p.location.href,playlists:[{uri:t.srcUrl,id:0,resolvedUri:t.srcUrl,attributes:{}}]};t.master.playlists[t.srcUrl]=t.master.playlists[0];t.haveMetadata(r,t.srcUrl);return t.trigger("loadedmetadata")})}}]);return t}(D);var H=i.createTimeRange;var z=function e(t,r){var i=0;var n=r-t.mediaSequence;var a=t.segments[n];if(a){if(typeof a.start!=="undefined"){return{result:a.start,precise:true}}if(typeof a.end!=="undefined"){return{result:a.end-a.duration,precise:true}}}while(n--){a=t.segments[n];if(typeof a.end!=="undefined"){return{result:i+a.end,precise:true}}i+=a.duration;if(typeof a.start!=="undefined"){return{result:i+a.start,precise:true}}}return{result:i,precise:false}};var W=function e(t,r){var i=0;var n=void 0;var a=r-t.mediaSequence;for(;a<t.segments.length;a++){n=t.segments[a];if(typeof n.start!=="undefined"){return{result:n.start-i,precise:true}}i+=n.duration;if(typeof n.end!=="undefined"){return{result:n.end-i,precise:true}}}return{result:-1,precise:false}};var G=function e(t,r,i){var n=void 0;var a=void 0;if(typeof r==="undefined"){r=t.mediaSequence+t.segments.length}if(r<t.mediaSequence){return 0}n=z(t,r);if(n.precise){return n.result}a=W(t,r);if(a.precise){return a.result}return n.result+i};var Y=function e(t,r,i){if(!t){return 0}if(typeof i!=="number"){i=0}if(typeof r==="undefined"){if(t.totalDuration){return t.totalDuration}if(!t.endList){return p.Infinity}}return G(t,r,i)};var X=function e(t,r,i){var n=0;if(r>i){var a=[i,r];r=a[0];i=a[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++){n+=t.targetDuration}r=0}for(var o=r;o<i;o++){n+=t.segments[o].duration}return n};var K=function e(t){if(!t.segments.length){return 0}var r=t.segments.length-1;var i=t.segments[r].duration||t.targetDuration;var n=i+t.targetDuration*2;while(r--){i+=t.segments[r].duration;if(i>=n){break}}return Math.max(0,r)};var $=function e(t,r,i){if(!t||!t.segments){return null}if(t.endList){return Y(t)}if(r===null){return null}r=r||0;var n=i?K(t):t.segments.length;return G(t,t.mediaSequence+n,r)};var Q=function e(t,r){var i=true;var n=r||0;var a=$(t,r,i);if(a===null){return H()}return H(n,a)};var J=function e(t){return t-Math.floor(t)===0};var Z=function e(t,r){if(J(r)){return r+t*.1}var i=r.toString().split(".")[1].length;for(var n=1;n<=i;n++){var a=Math.pow(10,n);var s=r*a;if(J(s)||n===i){return(s+t)/a}}};var ee=Z.bind(null,1);var te=Z.bind(null,-1);var re=function e(t,r,i,n){var a=void 0;var s=void 0;var o=t.segments.length;var u=r-n;if(u<0){if(i>0){for(a=i-1;a>=0;a--){s=t.segments[a];u+=te(s.duration);if(u>0){return{mediaIndex:a,startTime:n-X(t,i,a)}}}}return{mediaIndex:0,startTime:r}}if(i<0){for(a=i;a<0;a++){u-=t.targetDuration;if(u<0){return{mediaIndex:0,startTime:r}}}i=0}for(a=i;a<o;a++){s=t.segments[a];u-=ee(s.duration);if(u<0){return{mediaIndex:a,startTime:n+X(t,i,a)}}}return{mediaIndex:o-1,startTime:r}};var ie=function e(t){return t.excludeUntil&&t.excludeUntil>Date.now()};var ne=function e(t){return t.excludeUntil&&t.excludeUntil===Infinity};var ae=function e(t){var r=ie(t);return!t.disabled&&!r};var se=function e(t){return t.disabled};var oe=function e(t){for(var r=0;r<t.segments.length;r++){if(t.segments[r].key){return true}}return false};var ue=function e(t){for(var r=0;r<t.segments.length;r++){if(t.segments[r].map){return true}}return false};var le=function e(t,r){return r.attributes&&r.attributes[t]};var ce=function e(t,r,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;if(!le("BANDWIDTH",i)){return NaN}var a=t*i.attributes.BANDWIDTH;return(a-n*8)/r};var fe=function e(t,r){if(t.playlists.length===1){return true}var i=r.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(function(e){if(!ae(e)){return false}return(e.attributes.BANDWIDTH||0)<i}).length===0};var de={duration:Y,seekable:Q,safeLiveIndex:K,getMediaInfoForTime:re,isEnabled:ae,isDisabled:se,isBlacklisted:ie,isIncompatible:ne,playlistEnd:$,isAes:oe,isFmp4:ue,hasAttribute:le,estimateSegmentRequestTime:ce,isLowestEnabledRendition:fe};var he=i.xhr,pe=i.mergeOptions;var ve=function e(){var t=function e(t,r){t=pe({timeout:45e3},t);var n=e.beforeRequest||i.Hls.xhr.beforeRequest;if(n&&typeof n==="function"){var a=n(t);if(a){t=a}}var s=he(t,function(e,t){var i=s.response;if(!e&&i){s.responseTime=Date.now();s.roundTripTime=s.responseTime-s.requestTime;s.bytesReceived=i.byteLength||i.length;if(!s.bandwidth){s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3)}}if(t.headers){s.responseHeaders=t.headers}if(e&&e.code==="ETIMEDOUT"){s.timedout=true}if(!e&&!s.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0){e=new Error("XHR Failed with a response of: "+(s&&(i||s.responseText)))}r(e,s)});var o=s.abort;s.abort=function(){s.aborted=true;return o.apply(s,arguments)};s.uri=t.uri;s.requestTime=Date.now();return s};return t};var me=function e(t){var r=void 0;var i=void 0;i=t.offset+t.length-1;r=t.offset;return"bytes="+r+"-"+i};var ge=function e(t){var r={};if(t.byterange){r.Range=me(t.byterange)}return r};function ye(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var _e=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var be=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var Te=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r};var Se=function e(t,r){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:t};var ke=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var r=t[0];var i=t[1];var n=r[4];var a=i[4];var s=void 0;var o=void 0;var u=void 0;var l=[];var c=[];var f=void 0;var d=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;for(s=0;s<256;s++){c[(l[s]=s<<1^(s>>7)*283)^s]=s}for(o=u=0;!n[o];o^=f||1,u=c[u]||1){p=u^u<<1^u<<2^u<<3^u<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=l[d=l[f=l[o]]];m=h*16843009^d*65537^f*257^o*16843008;v=l[p]*257^p*16843008;for(s=0;s<4;s++){r[s][o]=v=v<<24^v>>>8;i[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){r[s]=r[s].slice(0);i[s]=i[s].slice(0)}return t};var we=null;var Ee=function(){function e(t){_e(this,e);if(!we){we=ke()}this._tables=[[we[0][0].slice(),we[0][1].slice(),we[0][2].slice(),we[0][3].slice(),we[0][4].slice()],[we[1][0].slice(),we[1][1].slice(),we[1][2].slice(),we[1][3].slice(),we[1][4].slice()]];var r=void 0;var i=void 0;var n=void 0;var a=void 0;var s=void 0;var o=this._tables[0][4];var u=this._tables[1];var l=t.length;var c=1;if(l!==4&&l!==6&&l!==8){throw new Error("Invalid aes key size")}a=t.slice(0);s=[];this._key=[a,s];for(r=l;r<4*l+28;r++){n=a[r-1];if(r%l===0||l===8&&r%l===4){n=o[n>>>24]<<24^o[n>>16&255]<<16^o[n>>8&255]<<8^o[n&255];if(r%l===0){n=n<<8^n>>>24^c<<24;c=c<<1^(c>>7)*283}}a[r]=a[r-l]^n}for(i=0;r;i++,r--){n=a[i&3?r:r-4];if(r<=4||i<4){s[i]=n}else{s[i]=u[0][o[n>>>24]]^u[1][o[n>>16&255]]^u[2][o[n>>8&255]]^u[3][o[n&255]]}}}e.prototype.decrypt=function e(t,r,i,n,a,s){var o=this._key[1];var u=t^o[0];var l=n^o[1];var c=i^o[2];var f=r^o[3];var d=void 0;var h=void 0;var p=void 0;var v=o.length/4-2;var m=void 0;var g=4;var y=this._tables[1];var _=y[0];var b=y[1];var T=y[2];var S=y[3];var k=y[4];for(m=0;m<v;m++){d=_[u>>>24]^b[l>>16&255]^T[c>>8&255]^S[f&255]^o[g];h=_[l>>>24]^b[c>>16&255]^T[f>>8&255]^S[u&255]^o[g+1];p=_[c>>>24]^b[f>>16&255]^T[u>>8&255]^S[l&255]^o[g+2];f=_[f>>>24]^b[u>>16&255]^T[l>>8&255]^S[c&255]^o[g+3];g+=4;u=d;l=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=k[u>>>24]<<24^k[l>>16&255]<<16^k[c>>8&255]<<8^k[f&255]^o[g++];d=u;u=l;l=c;c=f;f=d}};return e}();var Ce=function(){function e(){_e(this,e);this.listeners={}}e.prototype.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};e.prototype.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};e.prototype.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};e.prototype.dispose=function e(){this.listeners={}};e.prototype.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var Ie=function(e){Te(t,e);function t(){_e(this,t);var r=Se(this,e.call(this,Ce));r.jobs=[];r.delay=1;r.timeout_=null;return r}t.prototype.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};t.prototype.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return t}(Ce);var Ae=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var Oe=function e(t,r,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new Ee(Array.prototype.slice.call(r));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var u=void 0;var l=void 0;var c=void 0;var f=void 0;var d=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;u=i[0];l=i[1];c=i[2];f=i[3];for(m=0;m<n.length;m+=4){d=Ae(n[m]);h=Ae(n[m+1]);p=Ae(n[m+2]);v=Ae(n[m+3]);a.decrypt(d,h,p,v,o,m);o[m]=Ae(o[m]^u);o[m+1]=Ae(o[m+1]^l);o[m+2]=Ae(o[m+2]^c);o[m+3]=Ae(o[m+3]^f);u=d;l=h;c=p;f=v}return s};var Pe=function(){function e(t,r,i,n){_e(this,e);var a=e.STEP;var s=new Int32Array(t.buffer);var o=new Uint8Array(t.byteLength);var u=0;this.asyncStream_=new Ie;this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),r,i,o));for(u=a;u<s.length;u+=a){i=new Uint32Array([Ae(s[u-4]),Ae(s[u-3]),Ae(s[u-2]),Ae(s[u-1])]);this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),r,i,o))}this.asyncStream_.push(function(){n(null,ye(o))})}e.prototype.decryptChunk_=function e(t,r,i,n){return function(){var e=Oe(t,r,i);n.set(e,t.byteOffset)}};be(e,null,[{key:"STEP",get:function e(){return 32e3}}]);return e}();var Le=function e(t,r){return t.start(r)+"-"+t.end(r)};var xe=function e(t,r){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(r%2?" ":"")};var De=function e(t){if(t>=32&&t<126){return String.fromCharCode(t)}return"."};var Ue=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(ArrayBuffer.isView(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};var Re=function e(t){var r=t.byterange||{length:Infinity,offset:0};return[r.length,r.offset,t.resolvedUri].join(",")};var Me=function e(t){return t.resolvedUri};var je=function e(t){var r=Array.prototype.slice.call(t);var i=16;var n="";var a=void 0;var s=void 0;for(var o=0;o<r.length/i;o++){a=r.slice(o*i,o*i+i).map(xe).join("");s=r.slice(o*i,o*i+i).map(De).join("");n+=a+" "+s+"\n"}return n};var Ne=function e(t){var r=t.bytes;return je(r)};var Be=function e(t){var r="";var i=void 0;for(i=0;i<t.length;i++){r+=Le(t,i)+" "}return r};var Fe=Object.freeze({createTransferableMessage:Ue,initSegmentId:Re,segmentKeyId:Me,hexDump:je,tagDump:Ne,textRanges:Be});var qe=.25;var Ve=function e(t,r){if(!r.dateTimeObject){return null}var i=r.videoTimingInfo.transmuxerPrependedSeconds;var n=r.videoTimingInfo.transmuxedPresentationStart;var a=n+i;var s=t-a;return new Date(r.dateTimeObject.getTime()+s*1e3)};var He=function e(t){return t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds};var ze=function e(t,r){var i=void 0;try{i=new Date(t)}catch(e){return null}if(!r||!r.segments||r.segments.length===0){return null}var n=r.segments[0];if(i<n.dateTimeObject){return null}for(var a=0;a<r.segments.length-1;a++){n=r.segments[a];var s=r.segments[a+1].dateTimeObject;if(i<s){break}}var o=r.segments[r.segments.length-1];var u=o.dateTimeObject;var l=o.videoTimingInfo?He(o.videoTimingInfo):o.duration+o.duration*qe;var c=new Date(u.getTime()+l*1e3);if(i>c){return null}if(i>u){n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:de.duration(r,r.mediaSequence+r.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"}};var We=function e(t,r){if(!r||!r.segments||r.segments.length===0){return null}var i=0;var n=void 0;for(var a=0;a<r.segments.length;a++){n=r.segments[a];i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration;if(t<=i){break}}var s=r.segments[r.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t){return null}if(t>i){if(t>i+s.duration*qe){return null}n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}};var Ge=function e(t,r){var i=void 0;var n=void 0;try{i=new Date(t);n=new Date(r)}catch(e){}var a=i.getTime();var s=n.getTime();return(s-a)/1e3};var Ye=function e(t){if(!t.segments||t.segments.length===0){return false}for(var r=0;r<t.segments.length;r++){var i=t.segments[r];if(!i.dateTimeObject){return false}}return true};var Xe=function e(t){var r=t.playlist,i=t.time,n=i===undefined?undefined:i,a=t.callback;if(!a){throw new Error("getProgramTime: callback must be provided")}if(!r||n===undefined){return a({message:"getProgramTime: playlist and time must be provided"})}var s=We(n,r);if(!s){return a({message:"valid programTime was not found"})}if(s.type==="estimate"){return a({message:"Accurate programTime could not be determined."+" Please seek to e.seekTime and try again",seekTime:s.estimatedStart})}var o={mediaSeconds:n};var u=Ve(n,s.segment);if(u){o.programDateTime=u.toISOString()}return a(null,o)};var Ke=function e(t){var r=t.programTime,i=t.playlist,n=t.retryCount,a=n===undefined?2:n,s=t.seekTo,o=t.pauseAfterSeek,u=o===undefined?true:o,l=t.tech,c=t.callback;if(!c){throw new Error("seekToProgramTime: callback must be provided")}if(typeof r==="undefined"||!i||!s){return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"})}if(!i.endList&&!l.hasStarted_){return c({message:"player must be playing a live stream to start buffering"})}if(!Ye(i)){return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri})}var f=ze(r,i);if(!f){return c({message:r+" was not found in the stream"})}var d=f.segment;var h=Ge(d.dateTimeObject,r);if(f.type==="estimate"){if(a===0){return c({message:r+" is not buffered yet. Try again"})}s(f.estimatedStart+h);l.one("seeked",function(){e({programTime:r,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})});return}var p=d.start+h;var v=function e(){return c(null,l.currentTime())};l.one("seeked",v);if(u){l.pause()}s(p)};var $e=1/30;var Qe=$e*3;var Je=function e(t,r){var n=[];var a=void 0;if(t&&t.length){for(a=0;a<t.length;a++){if(r(t.start(a),t.end(a))){n.push([t.start(a),t.end(a)])}}}return i.createTimeRanges(n)};var Ze=function e(t,r){return Je(t,function(e,t){return e-$e<=r&&t+$e>=r})};var et=function e(t,r){return Je(t,function(e){return e-$e>=r})};var tt=function e(t){if(t.length<2){return i.createTimeRanges()}var r=[];for(var n=1;n<t.length;n++){var a=t.end(n-1);var s=t.start(n);r.push([a,s])}return i.createTimeRanges(r)};var rt=function e(t){var r=[];if(!t||!t.length){return""}for(var i=0;i<t.length;i++){r.push(t.start(i)+" => "+t.end(i))}return r.join(", ")};var it=function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=t.length?t.end(t.length-1):0;return(n-r)/i};var nt=function e(t){var r=[];for(var i=0;i<t.length;i++){r.push({start:t.start(i),end:t.end(i)})}return r};var at=function e(t,r,i){var n=r.player_;if(i.captions&&i.captions.length){if(!t.inbandTextTracks_){t.inbandTextTracks_={}}for(var a in i.captionStreams){if(!t.inbandTextTracks_[a]){n.tech_.trigger({type:"usage",name:"hls-608"});var s=n.textTracks().getTrackById(a);if(s){t.inbandTextTracks_[a]=s}else{t.inbandTextTracks_[a]=n.addRemoteTextTrack({kind:"captions",id:a,label:a},false).track}}}}if(i.metadata&&i.metadata.length&&!t.metadataTrack_){t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;t.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType}};var st=function e(t,r,i){var n=void 0;var a=void 0;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime<=r&&a.endTime>=t){i.removeCue(a)}}};var ot=function e(t){Object.defineProperties(t.frame,{id:{get:function e(){i.log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return t.value.key}},value:{get:function e(){i.log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return t.value.data}},privateData:{get:function e(){i.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return t.value.data}}})};var ut=function e(t){var r=void 0;if(isNaN(t)||Math.abs(t)===Infinity){r=Number.MAX_VALUE}else{r=t}return r};var lt=function e(t,r,i){var n=p.WebKitDataCue||p.VTTCue;if(r){r.forEach(function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new n(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},t)}if(i){var a=ut(t.mediaSource_.duration);i.forEach(function(e){var t=e.cueTime+this.timestampOffset;if(typeof t!=="number"||p.isNaN(t)||t<0||!(t<Infinity)){return}e.frames.forEach(function(e){var r=new n(t,t,e.value||e.url||e.data||"");r.frame=e;r.value=e;ot(r);this.metadataTrack_.addCue(r)},this)},t);if(t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){var s=t.metadataTrack_.cues;var o=[];for(var u=0;u<s.length;u++){if(s[u]){o.push(s[u])}}var l=o.reduce(function(e,t){var r=e[t.startTime]||[];r.push(t);e[t.startTime]=r;return e},{});var c=Object.keys(l).sort(function(e,t){return Number(e)-Number(t)});c.forEach(function(e,t){var r=l[e];var i=Number(c[t+1])||a;r.forEach(function(e){e.endTime=i})})}}};var ct=typeof e!=="undefined"?e:{},ft=typeof Symbol==="undefined"?"__target":Symbol(),dt="application/javascript",ht=ct.BlobBuilder||ct.WebKitBlobBuilder||ct.MozBlobBuilder||ct.MSBlobBuilder,pt=ct.URL||ct.webkitURL||pt&&pt.msURL,vt=ct.Worker;function mt(e,t){return function r(i){var n=this;if(!t){return new vt(e)}else if(vt&&!i){var a=t.toString().replace(/^function.+?{/,"").slice(0,-1),s=bt(a);this[ft]=new vt(s);Tt(this[ft],s);return this[ft]}else{var o={postMessage:function e(t){if(n.onmessage){setTimeout(function(){n.onmessage({data:t,target:o})})}}};t.call(o);this.postMessage=function(e){setTimeout(function(){o.onmessage({data:e,target:n})})};this.isThisThread=true}}}if(vt){var gt,yt=bt("self.onmessage = function () {}"),_t=new Uint8Array(1);try{gt=new vt(yt);gt.postMessage(_t,[_t.buffer])}catch(e){vt=null}finally{pt.revokeObjectURL(yt);if(gt){gt.terminate()}}}function bt(e){try{return pt.createObjectURL(new Blob([e],{type:dt}))}catch(r){var t=new ht;t.append(e);return pt.createObjectURL(t.getBlob(type))}}function Tt(e,t){if(!e||!t)return;var r=e.terminate;e.objURL=t;e.terminate=function(){if(e.objURL)pt.revokeObjectURL(e.objURL);r.call(e)}}var St=new mt("./transmuxer-worker.worker.js",function(e,t){var r=this;var i=function(){var e=Math.pow(2,32)-1;var t,i,n,a,s,o,u,l,c,f,d,h,p,v,m,g,y,_,b,T,S,k,w,E,C,I,A,O,P,L,x,D,U,R,M,j;(function(){var e;w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]};if(typeof Uint8Array==="undefined"){return}for(e in w){if(w.hasOwnProperty(e)){w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]}}E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);I=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);C=new Uint8Array([0,0,0,1]);A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]);O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);P={video:A,audio:O};D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);x=new Uint8Array([0,0,0,0,0,0,0,0]);U=new Uint8Array([0,0,0,0,0,0,0,0]);R=U;M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);j=U;L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();t=function e(t){var r=[],i=0,n,a,s;for(n=1;n<arguments.length;n++){r.push(arguments[n])}n=r.length;while(n--){i+=r[n].byteLength}a=new Uint8Array(i+8);s=new DataView(a.buffer,a.byteOffset,a.byteLength);s.setUint32(0,a.byteLength);a.set(t,4);for(n=0,i=8;n<r.length;n++){a.set(r[n],i);i+=r[n].byteLength}return a};i=function e(){return t(w.dinf,t(w.dref,D))};n=function e(r){return t(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,r.audioobjecttype<<3|r.samplingfrequencyindex>>>1,r.samplingfrequencyindex<<7|r.channelcount<<3,6,1,2]))};a=function e(){return t(w.ftyp,E,C,E,I)};g=function e(r){return t(w.hdlr,P[r])};s=function e(r){return t(w.mdat,r)};m=function e(r){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,r.duration>>>24&255,r.duration>>>16&255,r.duration>>>8&255,r.duration&255,85,196,0,0]);if(r.samplerate){i[12]=r.samplerate>>>24&255;i[13]=r.samplerate>>>16&255;i[14]=r.samplerate>>>8&255;i[15]=r.samplerate&255}return t(w.mdhd,i)};v=function e(r){return t(w.mdia,m(r),g(r.type),u(r))};o=function e(r){return t(w.mfhd,new Uint8Array([0,0,0,0,(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255]))};u=function e(r){return t(w.minf,r.type==="video"?t(w.vmhd,L):t(w.smhd,x),i(),_(r))};l=function e(r,i){var n=[],a=i.length;while(a--){n[a]=T(i[a])}return t.apply(null,[w.moof,o(r)].concat(n))};c=function e(r){var i=r.length,n=[];while(i--){n[i]=h(r[i])}return t.apply(null,[w.moov,d(4294967295)].concat(n).concat(f(r)))};f=function e(r){var i=r.length,n=[];while(i--){n[i]=S(r[i])}return t.apply(null,[w.mvex].concat(n))};d=function e(r){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(w.mvhd,i)};y=function e(r){var i=r.samples||[],n=new Uint8Array(4+i.length),a,s;for(s=0;s<i.length;s++){a=i[s].flags;n[s+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return t(w.sdtp,n)};_=function e(r){return t(w.stbl,b(r),t(w.stts,j),t(w.stsc,R),t(w.stsz,M),t(w.stco,U))};(function(){var e,r;b=function i(n){return t(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),n.type==="video"?e(n):r(n))};e=function e(r){var i=r.sps||[],n=r.pps||[],a=[],s=[],o;for(o=0;o<i.length;o++){a.push((i[o].byteLength&65280)>>>8);a.push(i[o].byteLength&255);a=a.concat(Array.prototype.slice.call(i[o]))}for(o=0;o<n.length;o++){s.push((n[o].byteLength&65280)>>>8);s.push(n[o].byteLength&255);s=s.concat(Array.prototype.slice.call(n[o]))}return t(w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(r.width&65280)>>8,r.width&255,(r.height&65280)>>8,r.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(w.avcC,new Uint8Array([1,r.profileIdc,r.profileCompatibility,r.levelIdc,255].concat([i.length]).concat(a).concat([n.length]).concat(s))),t(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};r=function e(r){return t(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(r.channelcount&65280)>>8,r.channelcount&255,(r.samplesize&65280)>>8,r.samplesize&255,0,0,0,0,(r.samplerate&65280)>>8,r.samplerate&255,0,0]),n(r))}})();p=function e(r){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(r.id&4278190080)>>24,(r.id&16711680)>>16,(r.id&65280)>>8,r.id&255,0,0,0,0,(r.duration&4278190080)>>24,(r.duration&16711680)>>16,(r.duration&65280)>>8,r.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(r.width&65280)>>8,r.width&255,0,0,(r.height&65280)>>8,r.height&255,0,0]);return t(w.tkhd,i)};T=function r(i){var n,a,s,o,u,l,c;n=t(w.tfhd,new Uint8Array([0,0,0,58,(i.id&4278190080)>>24,(i.id&16711680)>>16,(i.id&65280)>>8,i.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));l=Math.floor(i.baseMediaDecodeTime/(e+1));c=Math.floor(i.baseMediaDecodeTime%(e+1));a=t(w.tfdt,new Uint8Array([1,0,0,0,l>>>24&255,l>>>16&255,l>>>8&255,l&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255]));u=32+20+8+16+8+8;if(i.type==="audio"){s=k(i,u);return t(w.traf,n,a,s)}o=y(i);s=k(i,o.length+u);return t(w.traf,n,a,s,o)};h=function e(r){r.duration=r.duration||4294967295;return t(w.trak,p(r),v(r))};S=function e(r){var i=new Uint8Array([0,0,0,0,(r.id&4278190080)>>24,(r.id&16711680)>>16,(r.id&65280)>>8,r.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);if(r.type!=="video"){i[i.length-1]=0}return t(w.trex,i)};(function(){var e,r,i;i=function e(t,r){var i=0,n=0,a=0,s=0;if(t.length){if(t[0].duration!==undefined){i=1}if(t[0].size!==undefined){n=2}if(t[0].flags!==undefined){a=4}if(t[0].compositionTimeOffset!==undefined){s=8}}return[0,0,i|n|a|s,1,(t.length&4278190080)>>>24,(t.length&16711680)>>>16,(t.length&65280)>>>8,t.length&255,(r&4278190080)>>>24,(r&16711680)>>>16,(r&65280)>>>8,r&255]};r=function e(r,n){var a,s,o,u;s=r.samples||[];n+=8+12+16*s.length;a=i(s,n);for(u=0;u<s.length;u++){o=s[u];a=a.concat([(o.duration&4278190080)>>>24,(o.duration&16711680)>>>16,(o.duration&65280)>>>8,o.duration&255,(o.size&4278190080)>>>24,(o.size&16711680)>>>16,(o.size&65280)>>>8,o.size&255,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,o.flags.degradationPriority&240<<8,o.flags.degradationPriority&15,(o.compositionTimeOffset&4278190080)>>>24,(o.compositionTimeOffset&16711680)>>>16,(o.compositionTimeOffset&65280)>>>8,o.compositionTimeOffset&255])}return t(w.trun,new Uint8Array(a))};e=function e(r,n){var a,s,o,u;s=r.samples||[];n+=8+12+8*s.length;a=i(s,n);for(u=0;u<s.length;u++){o=s[u];a=a.concat([(o.duration&4278190080)>>>24,(o.duration&16711680)>>>16,(o.duration&65280)>>>8,o.duration&255,(o.size&4278190080)>>>24,(o.size&16711680)>>>16,(o.size&65280)>>>8,o.size&255])}return t(w.trun,new Uint8Array(a))};k=function t(i,n){if(i.type==="audio"){return e(i,n)}return r(i,n)}})();var N={ftyp:a,mdat:s,moof:l,moov:c,initSegment:function e(t){var r=a(),i=c(t),n;n=new Uint8Array(r.byteLength+i.byteLength);n.set(r);n.set(i,r.byteLength);return n}};var B=function e(t){return t>>>0};var F={toUnsigned:B};var q=F.toUnsigned;var V,H,z,W,G;V=function e(t,r){var i=[],n,a,s,o,u;if(!r.length){return null}for(n=0;n<t.byteLength;){a=q(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);s=H(t.subarray(n+4,n+8));o=a>1?n+a:t.byteLength;if(s===r[0]){if(r.length===1){i.push(t.subarray(n+8,o))}else{u=V(t.subarray(n+8,o),r.slice(1));if(u.length){i=i.concat(u)}}}n=o}return i};H=function e(t){var r="";r+=String.fromCharCode(t[0]);r+=String.fromCharCode(t[1]);r+=String.fromCharCode(t[2]);r+=String.fromCharCode(t[3]);return r};z=function e(t){var r={},i=V(t,["moov","trak"]);return i.reduce(function(e,t){var r,i,n,a,s;r=V(t,["tkhd"])[0];if(!r){return null}i=r[0];n=i===0?12:20;a=q(r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3]);s=V(t,["mdia","mdhd"])[0];if(!s){return null}i=s[0];n=i===0?12:20;e[a]=q(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]);return e},r)};W=function e(t,r){var i,n,a;i=V(r,["moof","traf"]);n=[].concat.apply([],i.map(function(e){return V(e,["tfhd"]).map(function(r){var i,n,a;i=q(r[4]<<24|r[5]<<16|r[6]<<8|r[7]);n=t[i]||9e4;a=V(e,["tfdt"]).map(function(e){var t,r;t=e[0];r=q(e[4]<<24|e[5]<<16|e[6]<<8|e[7]);if(t===1){r*=Math.pow(2,32);r+=q(e[8]<<24|e[9]<<16|e[10]<<8|e[11])}return r})[0];a=a||Infinity;return a/n})}));a=Math.min.apply(null,n);return isFinite(a)?a:0};G=function e(t){var r=V(t,["moov","trak"]);var i=[];r.forEach(function(e){var t=V(e,["mdia","hdlr"]);var r=V(e,["tkhd"]);t.forEach(function(e,t){var n=H(e.subarray(8,12));var a=r[t];var s;var o;var u;if(n==="vide"){s=new DataView(a.buffer,a.byteOffset,a.byteLength);o=s.getUint8(0);u=o===0?s.getUint32(12):s.getUint32(20);i.push(u)}})});return i};var Y={findBox:V,parseType:H,timescale:z,startTime:W,videoTrackIds:G};var X=function e(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};X.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};X.prototype.push=function(e){this.trigger("data",e)};X.prototype.flush=function(e){this.trigger("done",e)};var K=X;var $=function e(t){var r,i,n=[],a=[];n.byteLength=0;for(r=0;r<t.length;r++){i=t[r];if(i.nalUnitType==="access_unit_delimiter_rbsp"){if(n.length){n.duration=i.dts-n.dts;a.push(n)}n=[i];n.byteLength=i.data.byteLength;n.pts=i.pts;n.dts=i.dts}else{if(i.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"){n.keyFrame=true}n.duration=i.dts-n.dts;n.byteLength+=i.data.byteLength;n.push(i)}}if(a.length&&(!n.duration||n.duration<=0)){n.duration=a[a.length-1].duration}a.push(n);return a};var Q=function e(t){var r,i,n=[],a=[];n.byteLength=0;n.nalCount=0;n.duration=0;n.pts=t[0].pts;n.dts=t[0].dts;a.byteLength=0;a.nalCount=0;a.duration=0;a.pts=t[0].pts;a.dts=t[0].dts;for(r=0;r<t.length;r++){i=t[r];if(i.keyFrame){if(n.length){a.push(n);a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration}n=[i];n.nalCount=i.length;n.byteLength=i.byteLength;n.pts=i.pts;n.dts=i.dts;n.duration=i.duration}else{n.duration+=i.duration;n.nalCount+=i.length;n.byteLength+=i.byteLength;n.push(i)}}if(a.length&&n.duration<=0){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration;a.push(n);return a};var J=function e(t){var r;if(!t[0][0].keyFrame&&t.length>1){r=t.shift();t.byteLength-=r.byteLength;t.nalCount-=r.nalCount;t[0][0].dts=r.dts;t[0][0].pts=r.pts;t[0][0].duration+=r.duration}return t};var Z=function e(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}};var ee=function e(t,r){var i=Z();i.dataOffset=r;i.compositionTimeOffset=t.pts-t.dts;i.duration=t.duration;i.size=4*t.length;i.size+=t.byteLength;if(t.keyFrame){i.flags.dependsOn=2;i.flags.isNonSyncSample=0}return i};var te=function e(t,r){var i,n,a,s,o,u=r||0,l=[];for(i=0;i<t.length;i++){s=t[i];for(n=0;n<s.length;n++){o=s[n];a=ee(o,u);u+=a.size;l.push(a)}}return l};var re=function e(t){var r,i,n,a,s,o,u=0,l=t.byteLength,c=t.nalCount,f=l+4*c,d=new Uint8Array(f),h=new DataView(d.buffer);for(r=0;r<t.length;r++){a=t[r];for(i=0;i<a.length;i++){s=a[i];for(n=0;n<s.length;n++){o=s[n];h.setUint32(u,o.data.byteLength);u+=4;d.set(o.data,u);u+=o.data.byteLength}}}return d};var ie={groupNalsIntoFrames:$,groupFramesIntoGops:Q,extendFirstKeyFrame:J,generateSampleTable:te,concatenateNalData:re};var ne=[33,16,5,32,164,27];var ae=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var se=function e(t){var r=[];while(t--){r.push(0)}return r};var oe=function e(t){return Object.keys(t).reduce(function(e,r){e[r]=new Uint8Array(t[r].reduce(function(e,t){return e.concat(t)},[]));return e},{})};var ue={96000:[ne,[227,64],se(154),[56]],88200:[ne,[231],se(170),[56]],64000:[ne,[248,192],se(240),[56]],48000:[ne,[255,192],se(268),[55,148,128],se(54),[112]],44100:[ne,[255,192],se(268),[55,163,128],se(84),[112]],32000:[ne,[255,192],se(268),[55,234],se(226),[112]],24000:[ne,[255,192],se(268),[55,255,128],se(268),[111,112],se(126),[224]],16000:[ne,[255,192],se(268),[55,255,128],se(268),[111,255],se(269),[223,108],se(195),[1,192]],12000:[ae,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,253,128],se(259),[56]],11025:[ae,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,255,192],se(268),[55,175,128],se(108),[112]],8000:[ae,se(268),[3,121,16],se(47),[7]]};var le=oe(ue);var ce=9e4,fe,de,he,pe,ve,me;fe=function e(t){return t*ce};de=function e(t,r){return t*r};he=function e(t){return t/ce};pe=function e(t,r){return t/r};ve=function e(t,r){return fe(pe(t,r))};me=function e(t,r){return de(he(t),r)};var ge={secondsToVideoTs:fe,secondsToAudioTs:de,videoTsToSeconds:he,audioTsToSeconds:pe,audioTsToVideoTs:ve,videoTsToAudioTs:me};var ye=9e4;var _e=function e(t){var r,i,n=0;for(r=0;r<t.length;r++){i=t[r];n+=i.data.byteLength}return n};var be=function e(t,r,i,n){var a,s=0,o=0,u=0,l=0,c,f;if(!r.length){return}a=ge.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate);s=Math.ceil(ye/(t.samplerate/1024));if(i&&n){o=a-Math.max(i,n);u=Math.floor(o/s);l=u*s}if(u<1||l>ye/2){return}c=le[t.samplerate];if(!c){c=r[0].data}for(f=0;f<u;f++){r.splice(f,0,{data:c})}t.baseMediaDecodeTime-=Math.floor(ge.videoTsToAudioTs(l,t.samplerate))};var Te=function e(t,r,i){if(r.minSegmentDts>=i){return t}r.minSegmentDts=Infinity;return t.filter(function(e){if(e.dts>=i){r.minSegmentDts=Math.min(r.minSegmentDts,e.dts);r.minSegmentPts=r.minSegmentDts;return true}return false})};var Se=function e(t){var r,i,n=[];for(r=0;r<t.length;r++){i=t[r];n.push({size:i.data.byteLength,duration:1024})}return n};var ke=function e(t){var r,i,n=0,a=new Uint8Array(_e(t));for(r=0;r<t.length;r++){i=t[r];a.set(i.data,n);n+=i.data.byteLength}return a};var we={prefixWithSilence:be,trimAdtsFramesByEarliestDts:Te,generateSampleTable:Se,concatenateFrameData:ke};var Ee=9e4;var Ce=function e(t,r){if(typeof r.pts==="number"){if(t.timelineStartInfo.pts===undefined){t.timelineStartInfo.pts=r.pts}if(t.minSegmentPts===undefined){t.minSegmentPts=r.pts}else{t.minSegmentPts=Math.min(t.minSegmentPts,r.pts)}if(t.maxSegmentPts===undefined){t.maxSegmentPts=r.pts}else{t.maxSegmentPts=Math.max(t.maxSegmentPts,r.pts)}}if(typeof r.dts==="number"){if(t.timelineStartInfo.dts===undefined){t.timelineStartInfo.dts=r.dts}if(t.minSegmentDts===undefined){t.minSegmentDts=r.dts}else{t.minSegmentDts=Math.min(t.minSegmentDts,r.dts)}if(t.maxSegmentDts===undefined){t.maxSegmentDts=r.dts}else{t.maxSegmentDts=Math.max(t.maxSegmentDts,r.dts)}}};var Ie=function e(t){delete t.minSegmentDts;delete t.maxSegmentDts;delete t.minSegmentPts;delete t.maxSegmentPts};var Ae=function e(t,r){var i,n,a=t.minSegmentDts;if(!r){a-=t.timelineStartInfo.dts}i=t.timelineStartInfo.baseMediaDecodeTime;i+=a;i=Math.max(0,i);if(t.type==="audio"){n=t.samplerate/Ee;i*=n;i=Math.floor(i)}return i};var Oe={clearDtsInfo:Ie,calculateTrackBaseMediaDecodeTime:Ae,collectDtsInfo:Ce};var Pe=4,Le=128;var xe=function e(t){var r=0,i={payloadType:-1,payloadSize:0},n=0,a=0;while(r<t.byteLength){if(t[r]===Le){break}while(t[r]===255){n+=255;r++}n+=t[r++];while(t[r]===255){a+=255;r++}a+=t[r++];if(!i.payload&&n===Pe){i.payloadType=n;i.payloadSize=a;i.payload=t.subarray(r,r+a);break}r+=a;n=0;a=0}return i};var De=function e(t){if(t.payload[0]!==181){return null}if((t.payload[1]<<8|t.payload[2])!==49){return null}if(String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])!=="GA94"){return null}if(t.payload[7]!==3){return null}return t.payload.subarray(8,t.payload.length-1)};var Ue=function e(t,r){var i=[],n,a,s,o;if(!(r[0]&64)){return i}a=r[0]&31;for(n=0;n<a;n++){s=n*3;o={type:r[s+2]&3,pts:t};if(r[s+2]&4){o.ccData=r[s+3]<<8|r[s+4];i.push(o)}}return i};var Re=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};var Me={parseSei:xe,parseUserData:De,parseCaptionPackets:Ue,discardEmulationPreventionBytes:Re,USER_DATA_REGISTERED_ITU_T_T35:Pe};var je=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new He(0,0),new He(0,1),new He(1,0),new He(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("done",this.trigger.bind(this,"done"))},this)};je.prototype=new K;je.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=Me.parseSei(e.escapedRBSP);if(t.payloadType!==Me.USER_DATA_REGISTERED_ITU_T_T35){return}r=Me.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=Me.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};je.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(e){e.flush()},this);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(e){e.flush()},this);return};je.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};je.prototype.dispatchCea608Packet=function(e){if(this.setsTextOrXDSActive(e)){this.activeCea608Channel_[e.type]=null}else if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};je.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};je.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};je.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var Ne={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var Be=function e(t){if(t===null){return""}t=Ne[t]||t;return String.fromCharCode(t)};var Fe=14;var qe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var Ve=function e(){var t=[],r=Fe+1;while(r--){t.push("")}return t};var He=function e(t,r){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=r||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=Ve()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=Ve()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=Ve()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=Be(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=Be(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=qe.indexOf(t&7968);if(this.mode_==="rollUp"){if(s-this.rollUpRows_+1<0){s=this.rollUpRows_-1}this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=Be(i);a+=Be(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};He.prototype=new K;He.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){console.error("Skipping malformed caption.");return""}}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};He.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=Ve();this.nonDisplayed_=Ve();this.lastControlCode_=null;this.column_=0;this.row_=Fe;this.rollUpRows_=2;this.formatting_=[]};He.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};He.prototype.isNormalChar=function(e){return e>=32&&e<=127};He.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=Fe;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=Ve();this.displayed_=Ve()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};He.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};He.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};He.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};He.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};He.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<Fe+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};He.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var ze={CaptionStream:je,Cea608Stream:He};var We={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var Ge=8589934592;var Ye=4294967296;var Xe=function e(t,r){var i=1;if(t>r){i=-1}while(Math.abs(r-t)>Ye){t+=i*Ge}return t};var Ke=function e(t){var r,i;e.prototype.init.call(this);this.type_=t;this.push=function(e){if(e.type!==this.type_){return}if(i===undefined){i=e.dts}e.dts=Xe(e.dts,i);e.pts=Xe(e.pts,i);r=e.dts;this.trigger("data",e)};this.flush=function(){i=r;this.trigger("done")};this.discontinuity=function(){i=void 0;r=void 0}};Ke.prototype=new K;var $e={TimestampRolloverStream:Ke,handleRollover:Xe};var Qe=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a},Je=function e(t,r,i){return decodeURIComponent(Qe(t,r,i))},Ze=function e(t,r,i){return unescape(Qe(t,r,i))},et=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},tt={TXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=Je(t.data,1,r);t.value=Je(t.data,r+1,t.data.length).replace(/\0*$/,"");break}}t.data=t.value},WXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=Je(t.data,1,r);t.url=Je(t.data,r+1,t.data.length);break}}},PRIV:function e(t){var r;for(r=0;r<t.data.length;r++){if(t.data[r]===0){t.owner=Ze(t.data,0,r);break}}t.privateData=t.data.subarray(r+1);t.data=t.privateData}},rt;rt=function e(t){var r={debug:!!(t&&t.debug),descriptor:t&&t.descriptor},i=0,n=[],a=0,s;rt.prototype.init.call(this);this.dispatchType=We.METADATA_STREAM_TYPE.toString(16);if(r.descriptor){for(s=0;s<r.descriptor.length;s++){this.dispatchType+=("00"+r.descriptor[s].toString(16)).slice(-2)}}this.push=function(e){var t,s,o,u,l,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){a=0;n.length=0}if(n.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(r.debug){console.log("Skipping unrecognized metadata packet")}return}n.push(e);a+=e.data.byteLength;if(n.length===1){i=et(e.data.subarray(6,10));i+=10}if(a<i){return}t={data:new Uint8Array(i),frames:[],pts:n[0].pts,dts:n[0].dts};for(l=0;l<i;){t.data.set(n[0].data.subarray(0,i-l),l);l+=n[0].data.byteLength;a-=n[0].data.byteLength;n.shift()}s=10;if(t.data[5]&64){s+=4;s+=et(t.data.subarray(10,14));i-=et(t.data.subarray(16,20))}do{o=et(t.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}c=String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]);u={id:c,data:t.data.subarray(s+10,s+o+10)};u.key=u.id;if(tt[u.id]){tt[u.id](u);if(u.owner==="com.apple.streaming.transportStreamTimestamp"){var f=u.data,d=(f[3]&1)<<30|f[4]<<22|f[5]<<14|f[6]<<6|f[7]>>>2;d*=4;d+=f[7]&3;u.timeStamp=d;if(t.pts===undefined&&t.dts===undefined){t.pts=u.timeStamp;t.dts=u.timeStamp}this.trigger("timestamp",u)}}t.frames.push(u);s+=10;s+=o}while(s<i);this.trigger("data",t)}};rt.prototype=new K;var it=rt;var nt=$e.TimestampRolloverStream;var at,st,ot;var ut=188,lt=71;at=function e(){var t=new Uint8Array(ut),r=0;at.prototype.init.call(this);this.push=function(e){var i=0,n=ut,a;if(r){a=new Uint8Array(e.byteLength+r);a.set(t.subarray(0,r));a.set(e,r);r=0}else{a=e}while(n<a.byteLength){if(a[i]===lt&&a[n]===lt){this.trigger("data",a.subarray(i,n));i+=ut;n+=ut;continue}i++;n++}if(i<a.byteLength){t.set(a.subarray(i),0);r=a.byteLength-i}};this.flush=function(){if(r===ut&&t[0]===lt){this.trigger("data",t);r=0}this.trigger("done")}};at.prototype=new K;st=function e(){var t,r,i,n;st.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function e(t,n){var a=0;if(n.payloadUnitStartIndicator){a+=t[a]+1}if(n.type==="pat"){r(t.subarray(a),n)}else{i(t.subarray(a),n)}};r=function e(t,r){r.section_number=t[7];r.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];r.pmtPid=n.pmtPid};i=function e(t,r){var i,a,s,o;if(!(t[5]&1)){return}n.programMapTable={video:null,audio:null,"timed-metadata":{}};i=(t[1]&15)<<8|t[2];a=3+i-4;s=(t[10]&15)<<8|t[11];o=12+s;while(o<a){var u=t[o];var l=(t[o+1]&31)<<8|t[o+2];if(u===We.H264_STREAM_TYPE&&n.programMapTable.video===null){n.programMapTable.video=l}else if(u===We.ADTS_STREAM_TYPE&&n.programMapTable.audio===null){n.programMapTable.audio=l}else if(u===We.METADATA_STREAM_TYPE){n.programMapTable["timed-metadata"][l]=u}o+=((t[o+3]&15)<<8|t[o+4])+5}r.programMapTable=n.programMapTable};this.push=function(e){var r={},i=4;r.payloadUnitStartIndicator=!!(e[1]&64);r.pid=e[1]&31;r.pid<<=8;r.pid|=e[2];if((e[3]&48)>>>4>1){i+=e[i]+1}if(r.pid===0){r.type="pat";t(e.subarray(i),r);this.trigger("data",r)}else if(r.pid===this.pmtPid){r.type="pmt";t(e.subarray(i),r);this.trigger("data",r);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([e,i,r])}else{this.processPes_(e,i,r)}};this.processPes_=function(e,t,r){if(r.pid===this.programMapTable.video){r.streamType=We.H264_STREAM_TYPE}else if(r.pid===this.programMapTable.audio){r.streamType=We.ADTS_STREAM_TYPE}else{r.streamType=this.programMapTable["timed-metadata"][r.pid]}r.type="pes";r.data=e.subarray(t);this.trigger("data",r)}};st.prototype=new K;st.STREAM_TYPES={h264:27,adts:15};ot=function e(){var t=this,r={data:[],size:0},i={data:[],size:0},n={data:[],size:0},a=function e(t,r){var i;r.packetLength=6+(t[4]<<8|t[5]);r.dataAlignmentIndicator=(t[6]&4)!==0;i=t[7];if(i&192){r.pts=(t[9]&14)<<27|(t[10]&255)<<20|(t[11]&254)<<12|(t[12]&255)<<5|(t[13]&254)>>>3;r.pts*=4;r.pts+=(t[13]&6)>>>1;r.dts=r.pts;if(i&64){r.dts=(t[14]&14)<<27|(t[15]&255)<<20|(t[16]&254)<<12|(t[17]&255)<<5|(t[18]&254)>>>3;r.dts*=4;r.dts+=(t[18]&6)>>>1}}r.data=t.subarray(9+t[8])},s=function e(r,i,n){var s=new Uint8Array(r.size),o={type:i},u=0,l=0,c=false,f;if(!r.data.length||r.size<9){return}o.trackId=r.data[0].pid;for(u=0;u<r.data.length;u++){f=r.data[u];s.set(f.data,l);l+=f.data.byteLength}a(s,o);c=i==="video"||o.packetLength<=r.size;if(n||c){r.size=0;r.data.length=0}if(c){t.trigger("data",o)}};ot.prototype.init.call(this);this.push=function(e){({pat:function e(){},pes:function t(){var a,o;switch(e.streamType){case We.H264_STREAM_TYPE:case We.H264_STREAM_TYPE:a=r;o="video";break;case We.ADTS_STREAM_TYPE:a=i;o="audio";break;case We.METADATA_STREAM_TYPE:a=n;o="timed-metadata";break;default:return}if(e.payloadUnitStartIndicator){s(a,o,true)}a.data.push(e);a.size+=e.data.byteLength},pmt:function r(){var i={type:"metadata",tracks:[]},n=e.programMapTable;if(n.video!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"})}if(n.audio!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"})}t.trigger("data",i)}})[e.type]()};this.flush=function(){s(r,"video");s(i,"audio");s(n,"timed-metadata");this.trigger("done")}};ot.prototype=new K;var ct={PAT_PID:0,MP2T_PACKET_LENGTH:ut,TransportPacketStream:at,TransportParseStream:st,ElementaryStream:ot,TimestampRolloverStream:nt,CaptionStream:ze.CaptionStream,Cea608Stream:ze.Cea608Stream,MetadataStream:it};for(var ft in We){if(We.hasOwnProperty(ft)){ct[ft]=We[ft]}}var dt=ct;var ht;var pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ht=function e(){var t;ht.prototype.init.call(this);this.push=function(e){var r=0,i=0,n,a,s,o,u,l;if(e.type!=="audio"){return}if(t){o=t;t=new Uint8Array(o.byteLength+e.data.byteLength);t.set(o);t.set(e.data,o.byteLength)}else{t=e.data}while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}a=(~t[r+1]&1)*2;n=(t[r+3]&3)<<11|t[r+4]<<3|(t[r+5]&224)>>5;u=((t[r+6]&3)+1)*1024;l=u*9e4/pt[(t[r+2]&60)>>>2];s=r+n;if(t.byteLength<s){return}this.trigger("data",{pts:e.pts+i*l,dts:e.dts+i*l,sampleCount:u,audioobjecttype:(t[r+2]>>>6&3)+1,channelcount:(t[r+2]&1)<<2|(t[r+3]&192)>>>6,samplerate:pt[(t[r+2]&60)>>>2],samplingfrequencyindex:(t[r+2]&60)>>>2,samplesize:16,data:t.subarray(r+7+a,s)});if(t.byteLength===s){t=undefined;return}i++;t=t.subarray(s)}};this.flush=function(){this.trigger("done")}};ht.prototype=new K;var vt=ht;var mt;mt=function e(t){var r=t.byteLength,i=0,n=0;this.length=function(){return 8*r};this.bitsAvailable=function(){return 8*r+n};this.loadWord=function(){var e=t.byteLength-r,a=new Uint8Array(4),s=Math.min(4,r);if(s===0){throw new Error("no bytes available")}a.set(t.subarray(e,e+s));i=new DataView(a.buffer).getUint32(0);n=s*8;r-=s};this.skipBits=function(e){var t;if(n>e){i<<=e;n-=e}else{e-=n;t=Math.floor(e/8);e-=t*8;r-=t;this.loadWord();i<<=e;n-=e}};this.readBits=function(e){var t=Math.min(n,e),a=i>>>32-t;n-=t;if(n>0){i<<=t}else if(r>0){this.loadWord()}t=e-t;if(t>0){return a<<t|this.readBits(t)}return a};this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e){if((i&2147483648>>>e)!==0){i<<=e;n-=e;return e}}this.loadWord();return e+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1};this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();if(1&e){return 1+e>>>1}return-1*(e>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};var gt=mt;var yt,_t;var bt;_t=function e(){var t=0,r,i;_t.prototype.init.call(this);this.push=function(e){var n;if(!i){i=e.data}else{n=new Uint8Array(i.byteLength+e.data.byteLength);n.set(i);n.set(e.data,i.byteLength);i=n}for(;t<i.byteLength-3;t++){if(i[t+2]===1){r=t+5;break}}while(r<i.byteLength){switch(i[r]){case 0:if(i[r-1]!==0){r+=2;break}else if(i[r-2]!==0){r++;break}if(t+3!==r-2){this.trigger("data",i.subarray(t+3,r-2))}do{r++}while(i[r]!==1&&r<i.length);t=r-2;r+=3;break;case 1:if(i[r-1]!==0||i[r-2]!==0){r+=3;break}this.trigger("data",i.subarray(t+3,r-2));t=r-2;r+=3;break;default:r+=3;break}}i=i.subarray(t);r-=t;t=0};this.flush=function(){if(i&&i.byteLength>3){this.trigger("data",i.subarray(t+3))}i=null;t=0;this.trigger("done")}};_t.prototype=new K;bt={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};yt=function e(){var t=new _t,r,i,n,a,s,o,u;yt.prototype.init.call(this);r=this;this.push=function(e){if(e.type!=="video"){return}i=e.trackId;n=e.pts;a=e.dts;t.push(e)};t.on("data",function(e){var t={trackId:i,pts:n,dts:a,data:e};switch(e[0]&31){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp";t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp";t.escapedRBSP=s(e.subarray(1));t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp";break;default:break}r.trigger("data",t)});t.on("done",function(){r.trigger("done")});this.flush=function(){t.flush()};u=function e(t,r){var i=8,n=8,a,s;for(a=0;a<t;a++){if(n!==0){s=r.readExpGolomb();n=(i+s+256)%256}i=n===0?i:n}};s=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};o=function e(t){var r=0,i=0,n=0,a=0,s=1,o,l,c,f,d,h,p,v,m,g,y,_,b,T;o=new gt(t);l=o.readUnsignedByte();f=o.readUnsignedByte();c=o.readUnsignedByte();o.skipUnsignedExpGolomb();if(bt[l]){d=o.readUnsignedExpGolomb();if(d===3){o.skipBits(1)}o.skipUnsignedExpGolomb();o.skipUnsignedExpGolomb();o.skipBits(1);if(o.readBoolean()){y=d!==3?8:12;for(T=0;T<y;T++){if(o.readBoolean()){if(T<6){u(16,o)}else{u(64,o)}}}}}o.skipUnsignedExpGolomb();h=o.readUnsignedExpGolomb();if(h===0){o.readUnsignedExpGolomb()}else if(h===1){o.skipBits(1);o.skipExpGolomb();o.skipExpGolomb();p=o.readUnsignedExpGolomb();for(T=0;T<p;T++){o.skipExpGolomb()}}o.skipUnsignedExpGolomb();o.skipBits(1);v=o.readUnsignedExpGolomb();m=o.readUnsignedExpGolomb();g=o.readBits(1);if(g===0){o.skipBits(1)}o.skipBits(1);if(o.readBoolean()){r=o.readUnsignedExpGolomb();i=o.readUnsignedExpGolomb();n=o.readUnsignedExpGolomb();a=o.readUnsignedExpGolomb()}if(o.readBoolean()){if(o.readBoolean()){b=o.readUnsignedByte();switch(b){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[o.readUnsignedByte()<<8|o.readUnsignedByte(),o.readUnsignedByte()<<8|o.readUnsignedByte()];break}}if(_){s=_[0]/_[1]}}}return{profileIdc:l,levelIdc:c,profileCompatibility:f,width:Math.ceil(((v+1)*16-r*2-i*2)*s),height:(2-g)*(m+1)*16-n*2-a*2}}};yt.prototype=new K;var Tt={H264Stream:yt,NalByteStream:_t};var St=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var kt=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var wt=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var Et=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var Ct=function e(t,r,i){return unescape(Et(t,r,i))};var It=function e(t,r){var i=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],n=t[r+5],a=(n&16)>>4;if(a){return i+20}return i+10};var At=function e(t,r){var i=(t[r+5]&224)>>5,n=t[r+4]<<3,a=t[r+3]&3<<11;return a|n|i};var Ot=function e(t,r){if(t[r]==="I".charCodeAt(0)&&t[r+1]==="D".charCodeAt(0)&&t[r+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[r]&255===255&&(t[r+1]&240)===240){return"audio"}return null};var Pt=function e(t){var r=0;while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}return St[(t[r+2]&60)>>>2]}return null};var Lt=function e(t){var r,i,n,a;r=10;if(t[5]&64){r+=4;r+=wt(t.subarray(10,14))}do{i=wt(t.subarray(r+4,r+8));if(i<1){return null}a=String.fromCharCode(t[r],t[r+1],t[r+2],t[r+3]);if(a==="PRIV"){n=t.subarray(r+10,r+i+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=Ct(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var u=n.subarray(s+1);var l=(u[3]&1)<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;l*=4;l+=u[7]&3;return l}break}}}r+=10;r+=i}while(r<t.byteLength);return null};var xt={isLikelyAacData:kt,parseId3TagSize:It,parseAdtsSize:At,parseType:Ot,parseSampleRate:Pt,parseAacTimestamp:Lt};var Dt;Dt=function e(){var t=new Uint8Array,r=0;Dt.prototype.init.call(this);this.setTimestamp=function(e){r=e};this.push=function(e){var i=0,n=0,a,s,o,u;if(t.length){u=t.length;t=new Uint8Array(e.byteLength+u);t.set(t.subarray(0,u));t.set(e,u)}else{t=e}while(t.length-n>=3){if(t[n]==="I".charCodeAt(0)&&t[n+1]==="D".charCodeAt(0)&&t[n+2]==="3".charCodeAt(0)){if(t.length-n<10){break}i=xt.parseId3TagSize(t,n);if(n+i>t.length){break}s={type:"timed-metadata",data:t.subarray(n,n+i)};this.trigger("data",s);n+=i;continue}else if((t[n]&255)===255&&(t[n+1]&240)===240){if(t.length-n<7){break}i=xt.parseAdtsSize(t,n);if(n+i>t.length){break}o={type:"audio",data:t.subarray(n,n+i),pts:r,dts:r};this.trigger("data",o);n+=i;continue}n++}a=t.length-n;if(a>0){t=t.subarray(n)}else{t=new Uint8Array}}};Dt.prototype=new K;var Ut=Dt;var Rt=Tt.H264Stream;var Mt=xt.isLikelyAacData;var jt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"];var Nt=["width","height","profileIdc","levelIdc","profileCompatibility"];var Bt,Ft,qt,Vt;var Ht=function e(t,r){var i;if(t.length!==r.length){return false}for(i=0;i<t.length;i++){if(t[i]!==r[i]){return false}}return true};var zt=function e(t,r,i,n,a,s){var o=i-r,u=n-r,l=a-i;return{start:{dts:t,pts:t+o},end:{dts:t+u,pts:t+l},prependedContentDuration:s,baseMediaDecodeTime:t}};Ft=function e(t,r){var i=[],n=0,a=0,s=0,o=Infinity;r=r||{};Ft.prototype.init.call(this);this.push=function(e){Oe.collectDtsInfo(t,e);if(t){jt.forEach(function(r){t[r]=e[r]})}i.push(e)};this.setEarliestDts=function(e){a=e-t.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(e){o=e};this.setAudioAppendStart=function(e){s=e};this.flush=function(){var e,u,l,c;if(i.length===0){this.trigger("done","AudioSegmentStream");return}e=we.trimAdtsFramesByEarliestDts(i,t,a);t.baseMediaDecodeTime=Oe.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);we.prefixWithSilence(t,e,s,o);t.samples=we.generateSampleTable(e);l=N.mdat(we.concatenateFrameData(e));i=[];u=N.moof(n,[t]);c=new Uint8Array(u.byteLength+l.byteLength);n++;c.set(u);c.set(l,u.byteLength);Oe.clearDtsInfo(t);this.trigger("data",{track:t,boxes:c});this.trigger("done","AudioSegmentStream")}};Ft.prototype=new K;Bt=function e(t,r){var i=0,n=[],a=[],s,o;r=r||{};Bt.prototype.init.call(this);delete t.minPTS;this.gopCache_=[];this.push=function(e){Oe.collectDtsInfo(t,e);if(e.nalUnitType==="seq_parameter_set_rbsp"&&!s){s=e.config;t.sps=[e.data];Nt.forEach(function(e){t[e]=s[e]},this)}if(e.nalUnitType==="pic_parameter_set_rbsp"&&!o){o=e.data;t.pps=[e.data]}n.push(e)};this.flush=function(){var e,s,o,u,l,c,f=0,d,h;while(n.length){if(n[0].nalUnitType==="access_unit_delimiter_rbsp"){break}n.shift()}if(n.length===0){this.resetStream_();this.trigger("done","VideoSegmentStream");return}e=ie.groupNalsIntoFrames(n);o=ie.groupFramesIntoGops(e);if(!o[0][0].keyFrame){s=this.getGopForFusion_(n[0],t);if(s){f=s.duration;o.unshift(s);o.byteLength+=s.byteLength;o.nalCount+=s.nalCount;o.pts=s.pts;o.dts=s.dts;o.duration+=s.duration}else{o=ie.extendFirstKeyFrame(o)}}if(a.length){var p;if(r.alignGopsAtEnd){p=this.alignGopsAtEnd_(o)}else{p=this.alignGopsAtStart_(o)}if(!p){this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}Oe.clearDtsInfo(t);o=p}Oe.collectDtsInfo(t,o);t.samples=ie.generateSampleTable(o);l=N.mdat(ie.concatenateNalData(o));t.baseMediaDecodeTime=Oe.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}));d=o[0];h=o[o.length-1];this.trigger("segmentTimingInfo",zt(t.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,f));this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime);this.trigger("timelineStartInfo",t.timelineStartInfo);u=N.moof(i,[t]);c=new Uint8Array(u.byteLength+l.byteLength);i++;c.set(u);c.set(l,u.byteLength);this.trigger("data",{track:t,boxes:c});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){Oe.clearDtsInfo(t);s=undefined;o=undefined};this.getGopForFusion_=function(e){var r=45e3,i=1e4,n=Infinity,a,s,o,u,l;for(l=0;l<this.gopCache_.length;l++){u=this.gopCache_[l];o=u.gop;if(!(t.pps&&Ht(t.pps[0],u.pps[0]))||!(t.sps&&Ht(t.sps[0],u.sps[0]))){continue}if(o.dts<t.timelineStartInfo.dts){continue}a=e.dts-o.dts-o.duration;if(a>=-i&&a<=r){if(!s||n>a){s=u;n=a}}}if(s){return s.gop}return null};this.alignGopsAtStart_=function(e){var t,r,i,n,s,o,u,l;s=e.byteLength;o=e.nalCount;u=e.duration;t=r=0;while(t<a.length&&r<e.length){i=a[t];n=e[r];if(i.pts===n.pts){break}if(n.pts>i.pts){t++;continue}r++;s-=n.byteLength;o-=n.nalCount;u-=n.duration}if(r===0){return e}if(r===e.length){return null}l=e.slice(r);l.byteLength=s;l.duration=u;l.nalCount=o;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsAtEnd_=function(e){var t,r,i,n,s,o;t=a.length-1;r=e.length-1;s=null;o=false;while(t>=0&&r>=0){i=a[t];n=e[r];if(i.pts===n.pts){o=true;break}if(i.pts>n.pts){t--;continue}if(t===a.length-1){s=r}r--}if(!o&&s===null){return null}var u;if(o){u=r}else{u=s}if(u===0){return e}var l=e.slice(u);var c=l.reduce(function(e,t){e.byteLength+=t.byteLength;e.duration+=t.duration;e.nalCount+=t.nalCount;return e},{byteLength:0,duration:0,nalCount:0});l.byteLength=c.byteLength;l.duration=c.duration;l.nalCount=c.nalCount;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsWith=function(e){a=e}};Bt.prototype=new K;Vt=function e(t,r){this.numberOfTracks=0;this.metadataStream=r;t=t||{};if(typeof t.remux!=="undefined"){this.remuxTracks=!!t.remux}else{this.remuxTracks=true}if(typeof t.keepOriginalTimestamps==="boolean"){this.keepOriginalTimestamps=t.keepOriginalTimestamps}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;Vt.prototype.init.call(this);this.push=function(e){if(e.text){return this.pendingCaptions.push(e)}if(e.frames){return this.pendingMetadata.push(e)}this.pendingTracks.push(e.track);this.pendingBoxes.push(e.boxes);this.pendingBytes+=e.boxes.byteLength;if(e.track.type==="video"){this.videoTrack=e.track}if(e.track.type==="audio"){this.audioTrack=e.track}}};Vt.prototype=new K;Vt.prototype.flush=function(e){var t=0,r={captions:[],captionStreams:{},metadata:[],info:{}},i,n,a,s=0,o;if(this.pendingTracks.length<this.numberOfTracks){if(e!=="VideoSegmentStream"&&e!=="AudioSegmentStream"){return}else if(this.remuxTracks){return}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}return}}if(this.videoTrack){s=this.videoTrack.timelineStartInfo.pts;Nt.forEach(function(e){r.info[e]=this.videoTrack[e]},this)}else if(this.audioTrack){s=this.audioTrack.timelineStartInfo.pts;jt.forEach(function(e){r.info[e]=this.audioTrack[e]},this)}if(this.pendingTracks.length===1){r.type=this.pendingTracks[0].type}else{r.type="combined"}this.emittedTracks+=this.pendingTracks.length;a=N.initSegment(this.pendingTracks);r.initSegment=new Uint8Array(a.byteLength);r.initSegment.set(a);r.data=new Uint8Array(this.pendingBytes);for(o=0;o<this.pendingBoxes.length;o++){r.data.set(this.pendingBoxes[o],t);t+=this.pendingBoxes[o].byteLength}for(o=0;o<this.pendingCaptions.length;o++){i=this.pendingCaptions[o];i.startTime=i.startPts;if(!this.keepOriginalTimestamps){i.startTime-=s}i.startTime/=9e4;i.endTime=i.endPts;if(!this.keepOriginalTimestamps){i.endTime-=s}i.endTime/=9e4;r.captionStreams[i.stream]=true;r.captions.push(i)}for(o=0;o<this.pendingMetadata.length;o++){n=this.pendingMetadata[o];n.cueTime=n.pts;if(!this.keepOriginalTimestamps){n.cueTime-=s}n.cueTime/=9e4;r.metadata.push(n)}r.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger("data",r);if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}};qt=function e(t){var r=this,i=true,n,a;qt.prototype.init.call(this);t=t||{};this.baseMediaDecodeTime=t.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="aac";e.metadataStream=new dt.MetadataStream;e.aacStream=new Ut;e.audioTimestampRolloverStream=new dt.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new dt.TimestampRolloverStream("timed-metadata");e.adtsStream=new vt;e.coalesceStream=new Vt(t,e.metadataStream);e.headOfPipeline=e.aacStream;e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)});e.aacStream.on("data",function(i){if(i.type==="timed-metadata"&&!e.audioSegmentStream){a=a||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"};e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Ft(a,t);e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="ts";e.metadataStream=new dt.MetadataStream;e.packetStream=new dt.TransportPacketStream;e.parseStream=new dt.TransportParseStream;e.elementaryStream=new dt.ElementaryStream;e.videoTimestampRolloverStream=new dt.TimestampRolloverStream("video");e.audioTimestampRolloverStream=new dt.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new dt.TimestampRolloverStream("timed-metadata");e.adtsStream=new vt;e.h264Stream=new Rt;e.captionStream=new dt.CaptionStream;e.coalesceStream=new Vt(t,e.metadataStream);e.headOfPipeline=e.packetStream;e.packetStream.pipe(e.parseStream).pipe(e.elementaryStream);e.elementaryStream.pipe(e.videoTimestampRolloverStream).pipe(e.h264Stream);e.elementaryStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.elementaryStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.h264Stream.pipe(e.captionStream).pipe(e.coalesceStream);e.elementaryStream.on("data",function(i){var s;if(i.type==="metadata"){s=i.tracks.length;while(s--){if(!n&&i.tracks[s].type==="video"){n=i.tracks[s];n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}else if(!a&&i.tracks[s].type==="audio"){a=i.tracks[s];a.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}}if(n&&!e.videoSegmentStream){e.coalesceStream.numberOfTracks++;e.videoSegmentStream=new Bt(n,t);e.videoSegmentStream.on("timelineStartInfo",function(t){if(a){a.timelineStartInfo=t;e.audioSegmentStream.setEarliestDts(t.dts)}});e.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo"));e.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo"));e.videoSegmentStream.on("baseMediaDecodeTime",function(t){if(a){e.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}});e.h264Stream.pipe(e.videoSegmentStream).pipe(e.coalesceStream)}if(a&&!e.audioSegmentStream){e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Ft(a,t);e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(e){var r=this.transmuxPipeline_;if(!t.keepOriginalTimestamps){this.baseMediaDecodeTime=e}if(a){a.timelineStartInfo.dts=undefined;a.timelineStartInfo.pts=undefined;Oe.clearDtsInfo(a);if(!t.keepOriginalTimestamps){a.timelineStartInfo.baseMediaDecodeTime=e}if(r.audioTimestampRolloverStream){r.audioTimestampRolloverStream.discontinuity()}}if(n){if(r.videoSegmentStream){r.videoSegmentStream.gopCache_=[];r.videoTimestampRolloverStream.discontinuity()}n.timelineStartInfo.dts=undefined;n.timelineStartInfo.pts=undefined;Oe.clearDtsInfo(n);r.captionStream.reset();if(!t.keepOriginalTimestamps){n.timelineStartInfo.baseMediaDecodeTime=e}}if(r.timedMetadataTimestampRolloverStream){r.timedMetadataTimestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(e){if(a){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)}};this.alignGopsWith=function(e){if(n&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)}};this.push=function(e){if(i){var t=Mt(e);if(t&&this.transmuxPipeline_.type!=="aac"){this.setupAacPipeline()}else if(!t&&this.transmuxPipeline_.type!=="ts"){this.setupTsPipeline()}i=false}this.transmuxPipeline_.headOfPipeline.push(e)};this.flush=function(){i=true;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset()}}};qt.prototype=new K;var Wt={Transmuxer:qt,VideoSegmentStream:Bt,AudioSegmentStream:Ft,AUDIO_PROPERTIES:jt,VIDEO_PROPERTIES:Nt,generateVideoSegmentTimingInfo:zt};var Gt,Yt,Xt=Y.parseType,Kt=function e(t){return new Date(t*1e3-20828448e5)},$t=function e(t){return{isLeading:(t[0]&12)>>>2,dependsOn:t[0]&3,isDependedOn:(t[1]&192)>>>6,hasRedundancy:(t[1]&48)>>>4,paddingValue:(t[1]&14)>>>1,isNonSyncSample:t[1]&1,degradationPriority:t[2]<<8|t[3]}},Qt=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=[],n,a;for(n=0;n+4<t.length;n+=a){a=r.getUint32(n);n+=4;if(a<=0){i.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(t[n]&31){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+t[n]&31);break}}return i},Jt={avc1:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:r.getUint16(6),width:r.getUint16(24),height:r.getUint16(26),horizresolution:r.getUint16(28)+r.getUint16(30)/16,vertresolution:r.getUint16(32)+r.getUint16(34)/16,frameCount:r.getUint16(40),depth:r.getUint16(74),config:Gt(t.subarray(78,t.byteLength))}},avcC:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:t[4]&3,sps:[],pps:[]},n=t[5]&31,a,s,o,u;o=6;for(u=0;u<n;u++){s=r.getUint16(o);o+=2;i.sps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}a=t[o];o++;for(u=0;u<a;u++){s=r.getUint16(o);o+=2;i.pps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}return i},btrt:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:r.getUint32(0),maxBitrate:r.getUint32(4),avgBitrate:r.getUint32(8)}},esds:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:t[8]&31,decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(t[26]&7)<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:Xt(t.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},n=8;while(n<t.byteLength){i.compatibleBrands.push(Xt(t.subarray(n,n+4)));n+=4}return i},dinf:function e(t){return{boxes:Gt(t)}},dref:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:Gt(t.subarray(8))}},hdlr:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:Xt(t.subarray(8,12)),name:""},n=8;for(n=24;n<t.byteLength;n++){if(t[n]===0){n++;break}i.name+=String.fromCharCode(t[n])}i.name=decodeURIComponent(escape(i.name));return i},mdat:function e(t){return{byteLength:t.byteLength,nals:Qt(t)}},mdhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n,a={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};if(a.version===1){i+=4;a.creationTime=Kt(r.getUint32(i));i+=8;a.modificationTime=Kt(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=8;a.duration=r.getUint32(i)}else{a.creationTime=Kt(r.getUint32(i));i+=4;a.modificationTime=Kt(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=4;a.duration=r.getUint32(i)}i+=4;n=r.getUint16(i);a.language+=String.fromCharCode((n>>10)+96);a.language+=String.fromCharCode(((n&992)>>5)+96);a.language+=String.fromCharCode((n&31)+96);return a},mdia:function e(t){return{boxes:Gt(t)}},mfhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function e(t){return{boxes:Gt(t)}},mp4a:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:r.getUint16(6),channelcount:r.getUint16(16),samplesize:r.getUint16(18),samplerate:r.getUint16(24)+r.getUint16(26)/65536};if(t.byteLength>28){i.streamDescriptor=Gt(t.subarray(28))[0]}return i},moof:function e(t){return{boxes:Gt(t)}},moov:function e(t){return{boxes:Gt(t)}},mvex:function e(t){return{boxes:Gt(t)}},mvhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=Kt(r.getUint32(i));i+=8;n.modificationTime=Kt(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=8;n.duration=r.getUint32(i)}else{n.creationTime=Kt(r.getUint32(i));i+=4;n.modificationTime=Kt(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=4;n.duration=r.getUint32(i)}i+=4;n.rate=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;i+=2*4;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;i+=6*4;n.nextTrackId=r.getUint32(i);return n},pdin:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:r.getUint32(4),initialDelay:r.getUint32(8)}},sdtp:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i;for(i=4;i<t.byteLength;i++){r.samples.push({dependsOn:(t[i]&48)>>4,isDependedOn:(t[i]&12)>>2,hasRedundancy:t[i]&3})}return r},sidx:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8),earliestPresentationTime:r.getUint32(12),firstOffset:r.getUint32(16)},n=r.getUint16(22),a;for(a=24;n;a+=12,n--){i.references.push({referenceType:(t[a]&128)>>>7,referencedSize:r.getUint32(a)&2147483647,subsegmentDuration:r.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:r.getUint32(a+8)&268435455})}return i},smhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function e(t){return{boxes:Gt(t)}},stco:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},n=r.getUint32(4),a;for(a=8;n;a+=4,n--){i.chunkOffsets.push(r.getUint32(a))}return i},stsc:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=r.getUint32(4),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]},a;for(a=8;i;a+=12,i--){n.sampleToChunks.push({firstChunk:r.getUint32(a),samplesPerChunk:r.getUint32(a+4),sampleDescriptionIndex:r.getUint32(a+8)})}return n},stsd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:Gt(t.subarray(8))}},stsz:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:r.getUint32(4),entries:[]},n;for(n=12;n<t.byteLength;n+=4){i.entries.push(r.getUint32(n))}return i},stts:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},n=r.getUint32(4),a;for(a=8;n;a+=8,n--){i.timeToSamples.push({sampleCount:r.getUint32(a),sampleDelta:r.getUint32(a+4)})}return i},styp:function e(t){return Jt.ftyp(t)},tfdt:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};if(r.version===1){r.baseMediaDecodeTime*=Math.pow(2,32);r.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]}return r},tfhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4)},n=i.flags[2]&1,a=i.flags[2]&2,s=i.flags[2]&8,o=i.flags[2]&16,u=i.flags[2]&32,l=i.flags[0]&65536,c=i.flags[0]&131072,f;f=8;if(n){f+=4;i.baseDataOffset=r.getUint32(12);f+=4}if(a){i.sampleDescriptionIndex=r.getUint32(f);f+=4}if(s){i.defaultSampleDuration=r.getUint32(f);f+=4}if(o){i.defaultSampleSize=r.getUint32(f);f+=4}if(u){i.defaultSampleFlags=r.getUint32(f)}if(l){i.durationIsEmpty=true}if(!n&&c){i.baseDataOffsetIsMoof=true}return i},tkhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=Kt(r.getUint32(i));i+=8;n.modificationTime=Kt(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=8;n.duration=r.getUint32(i)}else{n.creationTime=Kt(r.getUint32(i));i+=4;n.modificationTime=Kt(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=4;n.duration=r.getUint32(i)}i+=4;i+=2*4;n.layer=r.getUint16(i);i+=2;n.alternateGroup=r.getUint16(i);i+=2;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;n.width=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.height=r.getUint16(i)+r.getUint16(i+2)/16;return n},traf:function e(t){return{boxes:Gt(t)}},trak:function e(t){return{boxes:Gt(t)}},trex:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4),defaultSampleDescriptionIndex:r.getUint32(8),defaultSampleDuration:r.getUint32(12),defaultSampleSize:r.getUint32(16),sampleDependsOn:t[20]&3,sampleIsDependedOn:(t[21]&192)>>6,sampleHasRedundancy:(t[21]&48)>>4,samplePaddingValue:(t[21]&14)>>1,sampleIsDifferenceSample:!!(t[21]&1),sampleDegradationPriority:r.getUint16(22)}},trun:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.flags[2]&1,a=r.flags[2]&4,s=r.flags[1]&1,o=r.flags[1]&2,u=r.flags[1]&4,l=r.flags[1]&8,c=i.getUint32(4),f=8,d;if(n){r.dataOffset=i.getInt32(f);f+=4}if(a&&c){d={flags:$t(t.subarray(f,f+4))};f+=4;if(s){d.duration=i.getUint32(f);f+=4}if(o){d.size=i.getUint32(f);f+=4}if(l){d.compositionTimeOffset=i.getUint32(f);f+=4}r.samples.push(d);c--}while(c--){d={};if(s){d.duration=i.getUint32(f);f+=4}if(o){d.size=i.getUint32(f);f+=4}if(u){d.flags=$t(t.subarray(f,f+4));f+=4}if(l){d.compositionTimeOffset=i.getUint32(f);f+=4}r.samples.push(d)}return r},"url ":function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:r.getUint16(4),opcolor:new Uint16Array([r.getUint16(6),r.getUint16(8),r.getUint16(10)])}}};Gt=function e(t){var r=0,i=[],n,a,s,o,u;var l=new ArrayBuffer(t.length);var c=new Uint8Array(l);for(var f=0;f<t.length;++f){c[f]=t[f]}n=new DataView(l);while(r<t.byteLength){a=n.getUint32(r);s=Xt(t.subarray(r+4,r+8));o=a>1?r+a:t.byteLength;u=(Jt[s]||function(e){return{data:e}})(t.subarray(r+8,o));u.size=a;u.type=s;i.push(u);r=o}return i};Yt=function e(t,r){var i;r=r||0;i=new Array(r*2+1).join(" ");return t.map(function(e,t){return i+e.type+"\n"+Object.keys(e).filter(function(e){return e!=="type"&&e!=="boxes"}).map(function(t){var r=i+" "+t+": ",n=e[t];if(n instanceof Uint8Array||n instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);if(!a){return r+"<>"}if(a.length===1){return r+"<"+a.join("").slice(1)+">"}return r+"<\n"+a.map(function(e){return i+" "+e}).join("\n")+"\n"+i+" >"}return r+JSON.stringify(n,null,2).split("\n").map(function(e,t){if(t===0){return e}return i+" "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+Yt(e.boxes,r+1):"")}).join("\n")};var Zt={inspect:Gt,textify:Yt,parseTfdt:Jt.tfdt,parseHdlr:Jt.hdlr,parseTfhd:Jt.tfhd,parseTrun:Jt.trun,parseSidx:Jt.sidx};var er=Me.discardEmulationPreventionBytes;var tr=ze.CaptionStream;var rr=function e(t,r){var i=t;for(var n=0;n<r.length;n++){var a=r[n];if(i<a.size){return a}i-=a.size}return null};var ir=function e(t,r,i){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=[],s,o,u,l;for(o=0;o+4<t.length;o+=u){u=n.getUint32(o);o+=4;if(u<=0){continue}switch(t[o]&31){case 6:var c=t.subarray(o+1,o+1+u);var f=rr(o,r);s={nalUnitType:"sei_rbsp",size:u,data:c,escapedRBSP:er(c),trackId:i};if(f){s.pts=f.pts;s.dts=f.dts;l=f}else{s.pts=l.pts;s.dts=l.dts}a.push(s);break;default:break}}return a};var nr=function e(t,r,i){var n=r;var a=i.defaultSampleDuration||0;var s=i.defaultSampleSize||0;var o=i.trackId;var u=[];t.forEach(function(e){var t=Zt.parseTrun(e);var r=t.samples;r.forEach(function(e){if(e.duration===undefined){e.duration=a}if(e.size===undefined){e.size=s}e.trackId=o;e.dts=n;if(e.compositionTimeOffset===undefined){e.compositionTimeOffset=0}e.pts=n+e.compositionTimeOffset;n+=e.duration});u=u.concat(r)});return u};var ar=function e(t,r){var i=Y.findBox(t,["moof","traf"]);var n=Y.findBox(t,["mdat"]);var a={};var s=[];n.forEach(function(e,t){var r=i[t];s.push({mdat:e,traf:r})});s.forEach(function(e){var t=e.mdat;var i=e.traf;var n=Y.findBox(i,["tfhd"]);var s=Zt.parseTfhd(n[0]);var o=s.trackId;var u=Y.findBox(i,["tfdt"]);var l=u.length>0?Zt.parseTfdt(u[0]).baseMediaDecodeTime:0;var c=Y.findBox(i,["trun"]);var f;var d;if(r===o&&c.length>0){f=nr(c,l,s);d=ir(t,f,o);if(!a[o]){a[o]=[]}a[o]=a[o].concat(d)}});return a};var sr=function e(t,r,i){var n;if(!r){return null}n=ar(t,r);return{seiNals:n[r],timescale:i}};var or=function e(){var t=false;var r;var i;var n;var a;var s;this.isInitialized=function(){return t};this.init=function(){r=new tr;t=true;r.on("data",function(e){e.startTime=e.startPts/a;e.endTime=e.endPts/a;s.captions.push(e);s.captionStreams[e.stream]=true})};this.isNewInit=function(e,t){if(e&&e.length===0||t&&typeof t==="object"&&Object.keys(t).length===0){return false}return n!==e[0]||a!==t[n]};this.parse=function(e,t,r){var o;if(!this.isInitialized()){return null}else if(!t||!r){return null}else if(this.isNewInit(t,r)){n=t[0];a=r[n]}else if(!n||!a){i.push(e);return null}while(i.length>0){var u=i.shift();this.parse(u,t,r)}o=sr(e,n,a);if(o===null||!o.seiNals){return null}this.pushNals(o.seiNals);this.flushStream();return s};this.pushNals=function(e){if(!this.isInitialized()||!e||e.length===0){return null}e.forEach(function(e){r.push(e)})};this.flushStream=function(){if(!this.isInitialized()){return null}r.flush()};this.clearParsedCaptions=function(){s.captions=[];s.captionStreams={}};this.resetCaptionStream=function(){if(!this.isInitialized()){return null}r.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){i=[];n=null;a=null;if(!s){s={captions:[],captionStreams:{}}}else{this.clearParsedCaptions()}this.resetCaptionStream()};this.reset()};var ur=or;var lr={generator:N,probe:Y,Transmuxer:Wt.Transmuxer,AudioSegmentStream:Wt.AudioSegmentStream,VideoSegmentStream:Wt.VideoSegmentStream,CaptionParser:ur};var cr=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var fr=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var dr=function e(t,r){r.on("data",function(e){var r=e.initSegment;e.initSegment={data:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength};var i=e.data;e.data=i.buffer;t.postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])});if(r.captionStream){r.captionStream.on("data",function(e){t.postMessage({action:"caption",data:e})})}r.on("done",function(e){t.postMessage({action:"done"})});r.on("gopInfo",function(e){t.postMessage({action:"gopInfo",gopInfo:e})});r.on("videoSegmentTimingInfo",function(e){t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:e})})};var hr=function(){function e(t,r){cr(this,e);this.options=r||{};this.self=t;this.init()}fr(e,[{key:"init",value:function e(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new lr.Transmuxer(this.options);dr(this.self,this.transmuxer)}},{key:"push",value:function e(t){var r=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(r)}},{key:"reset",value:function e(){this.init()}},{key:"setTimestampOffset",value:function e(t){var r=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(r*9e4))}},{key:"setAudioAppendStart",value:function e(t){this.transmuxer.setAudioAppendStart(Math.ceil(t.appendStart*9e4))}},{key:"flush",value:function e(t){this.transmuxer.flush()}},{key:"resetCaptions",value:function e(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function e(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]);return e}();var pr=function e(t){t.onmessage=function(e){if(e.data.action==="init"&&e.data.options){this.messageHandlers=new hr(t,e.data.options);return}if(!this.messageHandlers){this.messageHandlers=new hr(t)}if(e.data&&e.data.action&&e.data.action!=="init"){if(this.messageHandlers[e.data.action]){this.messageHandlers[e.data.action](e.data)}}}};var vr=new pr(r);return vr}()});var kt={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"};var wt=function e(t){return t.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,r){var i=("00"+Number(t).toString(16)).slice(-2);var n=("00"+Number(r).toString(16)).slice(-2);return"avc1."+i+"00"+n})})};var Et=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var r={codecCount:0};var i=void 0;r.codecCount=t.split(",").length;r.codecCount=r.codecCount||2;i=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t);if(i){r.videoCodec=i[2];r.videoObjectTypeIndicator=i[3]}r.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t);r.audioProfile=r.audioProfile&&r.audioProfile[2];return r};var Ct=function e(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return wt([e])[0]})};var It=function e(t,r,i){return t+"/"+r+'; codecs="'+i.filter(function(e){return!!e}).join(", ")+'"'};var At=function e(t){if(t.segments&&t.segments.length&&t.segments[0].map){return"mp4"}return"mp2t"};var Ot=function e(t){var r=t.attributes||{};if(r.CODECS){return Et(r.CODECS)}return kt};var Pt=function e(t,r){if(!t.mediaGroups.AUDIO||!r){return null}var i=t.mediaGroups.AUDIO[r];if(!i){return null}for(var n in i){var a=i[n];if(a.default&&a.playlists){return Et(a.playlists[0].attributes.CODECS).audioProfile}}return null};var Lt=function e(t,r){var n=At(r);var a=Ot(r);var s=r.attributes||{};var o=true;var u=false;if(!r){return[]}if(t.mediaGroups.AUDIO&&s.AUDIO){var l=t.mediaGroups.AUDIO[s.AUDIO];if(l){u=true;o=false;for(var c in l){if(!l[c].uri&&!l[c].playlists){o=true;break}}}}if(u&&!a.audioProfile){if(!o){a.audioProfile=Pt(t,s.AUDIO)}if(!a.audioProfile){i.log.warn("Multiple audio tracks present but no audio codec string is specified. "+"Attempting to use the default audio codec (mp4a.40.2)");a.audioProfile=kt.audioProfile}}var f={};if(a.videoCodec){f.video=""+a.videoCodec+a.videoObjectTypeIndicator}if(a.audioProfile){f.audio="mp4a.40."+a.audioProfile}var d=It("audio",n,[f.audio]);var h=It("video",n,[f.video]);var p=It("video",n,[f.video,f.audio]);if(u){if(!o&&f.video){return[h,d]}if(!o&&!f.video){return[d,d]}return[p,d]}if(!f.video){return[d]}return[p]};var xt=function e(t){var r={type:"",parameters:{}};var i=t.trim().split(";");r.type=i.shift().trim();i.forEach(function(e){var t=e.trim().split("=");if(t.length>1){var i=t[0].replace(/"/g,"").trim();var n=t[1].replace(/"/g,"").trim();r.parameters[i]=n}});return r};var Dt=function e(t){return/mp4a\.\d+.\d+/i.test(t)};var Ut=function e(t){return/avc1\.[\da-f]+/i.test(t)};var Rt=function e(t,r,i){if(typeof r==="undefined"||r===null||!t.length){return[]}var n=Math.ceil((r-i+3)*9e4);var a=void 0;for(a=0;a<t.length;a++){if(t[a].pts>n){break}}return t.slice(a)};var Mt=function e(t,r,i){if(!r.length){return t}if(i){return r.slice()}var n=r[0].pts;var a=0;for(a;a<t.length;a++){if(t[a].pts>=n){break}}return t.slice(0,a).concat(r)};var jt=function e(t,r,i,n){var a=Math.ceil((r-n)*9e4);var s=Math.ceil((i-n)*9e4);var o=t.slice();var u=t.length;while(u--){if(t[u].pts<=s){break}}if(u===-1){return o}var l=u+1;while(l--){if(t[l].pts<=a){break}}l=Math.max(l,0);o.splice(l,u-l+1);return o};var Nt=function e(t,r,n){var a=null;var s=null;var o=0;var u=[];var l=[];if(!t&&!r){return i.createTimeRange()}if(!t){return r.buffered}if(!r){return t.buffered}if(n){return t.buffered}if(t.buffered.length===0&&r.buffered.length===0){return i.createTimeRange()}var c=t.buffered;var f=r.buffered;var d=c.length;while(d--){u.push({time:c.start(d),type:"start"});u.push({time:c.end(d),type:"end"})}d=f.length;while(d--){u.push({time:f.start(d),type:"start"});u.push({time:f.end(d),type:"end"})}u.sort(function(e,t){return e.time-t.time});for(d=0;d<u.length;d++){if(u[d].type==="start"){o++;if(o===2){a=u[d].time}}else if(u[d].type==="end"){o--;if(o===1){s=u[d].time}}if(a!==null&&s!==null){l.push([a,s]);a=null;s=null}}return i.createTimeRanges(l)};var Bt=9e4;var Ft=function e(t,r){var i=t.addSourceBuffer(r);var n=Object.create(null);n.updating=false;n.realBuffer_=i;var a=function e(t){if(typeof i[t]==="function"){n[t]=function(){return i[t].apply(i,arguments)}}else if(typeof n[t]==="undefined"){Object.defineProperty(n,t,{get:function e(){return i[t]},set:function e(r){return i[t]=r}})}};for(var s in i){a(s)}return n};var qt=function(e){O(t,e);function t(e,r){C(this,t);var n=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i.EventTarget));n.timestampOffset_=0;n.pendingBuffers_=[];n.bufferUpdating_=false;n.mediaSource_=e;n.codecs_=r;n.audioCodec_=null;n.videoCodec_=null;n.audioDisabled_=false;n.appendAudioInitSegment_=true;n.gopBuffer_=[];n.timeMapping_=0;n.safeAppend_=i.browser.IE_VERSION>=11;var a={remux:false,alignGopsAtEnd:n.safeAppend_};n.codecs_.forEach(function(e){if(Dt(e)){n.audioCodec_=e}else if(Ut(e)){n.videoCodec_=e}});n.transmuxer_=new St;n.transmuxer_.postMessage({action:"init",options:a});n.transmuxer_.onmessage=function(e){if(e.data.action==="data"){return n.data_(e)}if(e.data.action==="done"){return n.done_(e)}if(e.data.action==="gopInfo"){return n.appendGopInfo_(e)}if(e.data.action==="videoSegmentTimingInfo"){return n.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo)}};Object.defineProperty(n,"timestampOffset",{get:function e(){return this.timestampOffset_},set:function e(t){if(typeof t==="number"&&t>=0){this.timestampOffset_=t;this.appendAudioInitSegment_=true;this.gopBuffer_.length=0;this.timeMapping_=0;this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t})}}});Object.defineProperty(n,"appendWindowStart",{get:function e(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function e(t){if(this.videoBuffer_){this.videoBuffer_.appendWindowStart=t}if(this.audioBuffer_){this.audioBuffer_.appendWindowStart=t}}});Object.defineProperty(n,"updating",{get:function e(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}});Object.defineProperty(n,"buffered",{get:function e(){return Nt(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}});return n}I(t,[{key:"data_",value:function e(t){var r=t.data.segment;r.data=new Uint8Array(r.data,t.data.byteOffset,t.data.byteLength);r.initSegment=new Uint8Array(r.initSegment.data,r.initSegment.byteOffset,r.initSegment.byteLength);at(this,this.mediaSource_,r);this.pendingBuffers_.push(r);return}},{key:"done_",value:function e(t){if(this.mediaSource_.readyState==="closed"){this.pendingBuffers_.length=0;return}this.processPendingSegments_();return}},{key:"videoSegmentTimingInfo_",value:function e(t){var r={start:{decode:t.start.dts/Bt,presentation:t.start.pts/Bt},end:{decode:t.end.dts/Bt,presentation:t.end.pts/Bt},baseMediaDecodeTime:t.baseMediaDecodeTime/Bt};if(t.prependedContentDuration){r.prependedContentDuration=t.prependedContentDuration/Bt}this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:r})}},{key:"createRealSourceBuffers_",value:function e(){var t=this;var r=["audio","video"];r.forEach(function(e){if(!t[e+"Codec_"]){return}if(t[e+"Buffer_"]){return}var i=null;if(t.mediaSource_[e+"Buffer_"]){i=t.mediaSource_[e+"Buffer_"];i.updating=false}else{var n=e+"Codec_";var a=e+'/mp4;codecs="'+t[n]+'"';i=Ft(t.mediaSource_.nativeMediaSource_,a);t.mediaSource_[e+"Buffer_"]=i}t[e+"Buffer_"]=i;["update","updatestart","updateend"].forEach(function(n){i.addEventListener(n,function(){if(e==="audio"&&t.audioDisabled_){return}if(n==="updateend"){t[e+"Buffer_"].updating=false}var i=r.every(function(r){if(r==="audio"&&t.audioDisabled_){return true}if(e!==r&&t[r+"Buffer_"]&&t[r+"Buffer_"].updating){return false}return true});if(i){return t.trigger(n)}})})})}},{key:"appendBuffer",value:function e(t){this.bufferUpdating_=true;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var r=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:r.end(r.length-1)})}if(this.videoBuffer_){this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Rt(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)})}this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function e(t){this.gopBuffer_=Mt(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function e(t,r){if(this.videoBuffer_){this.videoBuffer_.updating=true;this.videoBuffer_.remove(t,r);this.gopBuffer_=jt(this.gopBuffer_,t,r,this.timeMapping_)}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.updating=true;this.audioBuffer_.remove(t,r)}st(t,r,this.metadataTrack_);if(this.inbandTextTracks_){for(var i in this.inbandTextTracks_){st(t,r,this.inbandTextTracks_[i])}}}},{key:"processPendingSegments_",value:function e(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(e,t){var r=t.type;var i=t.data;var n=t.initSegment;e[r].segments.push(i);e[r].bytes+=i.byteLength;e[r].initSegment=n;if(t.captions){e.captions=e.captions.concat(t.captions)}if(t.info){e[r].info=t.info}if(t.metadata){e.metadata=e.metadata.concat(t.metadata)}return e},t);if(!this.videoBuffer_&&!this.audioBuffer_){if(t.video.bytes===0){this.videoCodec_=null}if(t.audio.bytes===0){this.audioCodec_=null}this.createRealSourceBuffers_()}if(t.audio.info){this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info})}if(t.video.info){this.mediaSource_.trigger({type:"videoinfo",info:t.video.info})}if(this.appendAudioInitSegment_){if(!this.audioDisabled_&&this.audioBuffer_){t.audio.segments.unshift(t.audio.initSegment);t.audio.bytes+=t.audio.initSegment.byteLength}this.appendAudioInitSegment_=false}var r=false;if(this.videoBuffer_&&t.video.bytes){t.video.segments.unshift(t.video.initSegment);t.video.bytes+=t.video.initSegment.byteLength;this.concatAndAppendSegments_(t.video,this.videoBuffer_)}else if(this.videoBuffer_&&(this.audioDisabled_||!this.audioBuffer_)){r=true}lt(this,t.captions,t.metadata);if(!this.audioDisabled_&&this.audioBuffer_){this.concatAndAppendSegments_(t.audio,this.audioBuffer_)}this.pendingBuffers_.length=0;if(r){this.trigger("updateend")}this.bufferUpdating_=false}},{key:"concatAndAppendSegments_",value:function e(t,r){var i=0;var n=void 0;if(t.bytes){n=new Uint8Array(t.bytes);t.segments.forEach(function(e){n.set(e,i);i+=e.byteLength});try{r.updating=true;r.appendBuffer(n)}catch(e){if(this.mediaSource_.player_){this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}}},{key:"abort",value:function e(){if(this.videoBuffer_){this.videoBuffer_.abort()}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.abort()}if(this.transmuxer_){this.transmuxer_.postMessage({action:"reset"})}this.pendingBuffers_.length=0;this.bufferUpdating_=false}}]);return t}(i.EventTarget);var Vt=function(e){O(t,e);function t(){C(this,t);var e=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var r=void 0;e.nativeMediaSource_=new p.MediaSource;for(r in e.nativeMediaSource_){if(!(r in t.prototype)&&typeof e.nativeMediaSource_[r]==="function"){e[r]=e.nativeMediaSource_[r].bind(e.nativeMediaSource_)}}e.duration_=NaN;Object.defineProperty(e,"duration",{get:function e(){if(this.duration_===Infinity){return this.duration_}return this.nativeMediaSource_.duration},set:function e(t){this.duration_=t;if(t!==Infinity){this.nativeMediaSource_.duration=t;return}}});Object.defineProperty(e,"seekable",{get:function e(){if(this.duration_===Infinity){return i.createTimeRanges([[0,this.nativeMediaSource_.duration]])}return this.nativeMediaSource_.seekable}});Object.defineProperty(e,"readyState",{get:function e(){return this.nativeMediaSource_.readyState}});Object.defineProperty(e,"activeSourceBuffers",{get:function e(){return this.activeSourceBuffers_}});e.sourceBuffers=[];e.activeSourceBuffers_=[];e.updateActiveSourceBuffers_=function(){e.activeSourceBuffers_.length=0;if(e.sourceBuffers.length===1){var t=e.sourceBuffers[0];t.appendAudioInitSegment_=true;t.audioDisabled_=!t.audioCodec_;e.activeSourceBuffers_.push(t);return}var r=false;var i=true;for(var n=0;n<e.player_.audioTracks().length;n++){var a=e.player_.audioTracks()[n];if(a.enabled&&a.kind!=="main"){r=true;i=false;break}}e.sourceBuffers.forEach(function(t,n){t.appendAudioInitSegment_=true;if(t.videoCodec_&&t.audioCodec_){t.audioDisabled_=r}else if(t.videoCodec_&&!t.audioCodec_){t.audioDisabled_=true;i=false}else if(!t.videoCodec_&&t.audioCodec_){t.audioDisabled_=n?i:!i;if(t.audioDisabled_){return}}e.activeSourceBuffers_.push(t)})};e.onPlayerMediachange_=function(){e.sourceBuffers.forEach(function(e){e.appendAudioInitSegment_=true})};e.onHlsReset_=function(){e.sourceBuffers.forEach(function(e){if(e.transmuxer_){e.transmuxer_.postMessage({action:"resetCaptions"})}})};e.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach(function(e){return e.timeMapping_=t.mapping})};["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},e);e.on("sourceopen",function(t){var r=f.querySelector('[src="'+e.url_+'"]');if(!r){return}e.player_=i(r.parentNode);if(!e.player_){return}e.player_.tech_.on("hls-reset",e.onHlsReset_);e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_);if(e.player_.audioTracks&&e.player_.audioTracks()){e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_);e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_);e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)}e.player_.on("mediachange",e.onPlayerMediachange_)});e.on("sourceended",function(t){var r=ut(e.duration);for(var i=0;i<e.sourceBuffers.length;i++){var n=e.sourceBuffers[i];var a=n.metadataTrack_&&n.metadataTrack_.cues;if(a&&a.length){a[a.length-1].endTime=r}}});e.on("sourceclose",function(e){this.sourceBuffers.forEach(function(e){if(e.transmuxer_){e.transmuxer_.terminate()}});this.sourceBuffers.length=0;if(!this.player_){return}if(this.player_.audioTracks&&this.player_.audioTracks()){this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_);this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_);this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)}if(this.player_.el_){this.player_.off("mediachange",this.onPlayerMediachange_)}if(this.player_.tech_&&this.player_.tech_.el_){this.player_.tech_.off("hls-reset",this.onHlsReset_);this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)}});return e}I(t,[{key:"addSeekableRange_",value:function e(t,r){var i=void 0;if(this.duration!==Infinity){i=new Error("MediaSource.addSeekableRange() can only be invoked "+"when the duration is Infinity");i.name="InvalidStateError";i.code=11;throw i}if(r>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration)){this.nativeMediaSource_.duration=r}}},{key:"addSourceBuffer",value:function e(t){var r=void 0;var i=xt(t);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];if(i.parameters&&i.parameters.codecs){n=i.parameters.codecs.split(",");n=wt(n);n=n.filter(function(e){return Dt(e)||Ut(e)})}if(n.length===0){n=["avc1.4d400d","mp4a.40.2"]}r=new qt(this,n);if(this.sourceBuffers.length!==0){this.sourceBuffers[0].createRealSourceBuffers_();r.createRealSourceBuffers_();this.sourceBuffers[0].audioDisabled_=true}}else{r=this.nativeMediaSource_.addSourceBuffer(t)}this.sourceBuffers.push(r);return r}}]);return t}(i.EventTarget);var Ht=0;i.mediaSources={};var zt=function e(t,r){var n=i.mediaSources[t];if(n){n.trigger({type:"sourceopen",swfId:r})}else{throw new Error("Media Source not found (Video.js)")}};var Wt=function e(){return!!p.MediaSource&&!!p.MediaSource.isTypeSupported&&p.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')};var Gt=function e(){this.MediaSource={open:zt,supportsNativeMediaSources:Wt};if(Wt()){return new Vt}throw new Error("Cannot use create a virtual MediaSource for this video")};Gt.open=zt;Gt.supportsNativeMediaSources=Wt;var Yt={createObjectURL:function e(t){var r="blob:vjs-media-source/";var n=void 0;if(t instanceof Vt){n=p.URL.createObjectURL(t.nativeMediaSource_);t.url_=n;return n}if(!(t instanceof Vt)){n=p.URL.createObjectURL(t);t.url_=n;return n}n=r+Ht;Ht++;i.mediaSources[n]=t;return n}};i.MediaSource=Gt;i.URL=Yt;var Xt=function e(t){return!!t&&typeof t==="object"};var Kt=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return r.reduce(function(t,r){Object.keys(r).forEach(function(i){if(Array.isArray(t[i])&&Array.isArray(r[i])){t[i]=t[i].concat(r[i])}else if(Xt(t[i])&&Xt(r[i])){t[i]=e(t[i],r[i])}else{t[i]=r[i]}});return t},{})};var $t=function e(t){return Object.keys(t).map(function(e){return t[e]})};var Qt=function e(t,r){var i=[];for(var n=t;n<r;n++){i.push(n)}return i};var Jt=function e(t){return t.reduce(function(e,t){return e.concat(t)},[])};var Zt=function e(t){if(!t.length){return[]}var r=[];for(var i=0;i<t.length;i++){r.push(t[i])}return r};var er=function e(t,r){return t.reduce(function(e,t,i){if(t[r]){e.push(i)}return e},[])};var tr={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};var rr=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function ir(e,t){return t={exports:{}},e(t,t.exports),t.exports}var nr=ir(function(e,t){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var i=/^([^\/?#]*)(.*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var s={buildAbsoluteURL:function e(t,r,n){n=n||{};t=t.trim();r=r.trim();if(!r){if(!n.alwaysNormalize){return t}var a=s.parseURL(t);if(!a){throw new Error("Error trying to parse base URL.")}a.path=s.normalizePath(a.path);return s.buildURLFromParts(a)}var o=s.parseURL(r);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return r}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var u=s.parseURL(t);if(!u){throw new Error("Error trying to parse base URL.")}if(!u.netLoc&&u.path&&u.path[0]!=="/"){var l=i.exec(u.path);u.netLoc=l[1];u.path=l[2]}if(u.netLoc&&!u.path){u.path="/"}var c={scheme:u.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){c.netLoc=u.netLoc;if(o.path[0]!=="/"){if(!o.path){c.path=u.path;if(!o.params){c.params=u.params;if(!o.query){c.query=u.query}}}else{var f=u.path;var d=f.substring(0,f.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(d)}}}if(c.path===null){c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(c)},parseURL:function e(t){var i=r.exec(t);if(!i){return null}return{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}},normalizePath:function e(t){t=t.split("").reverse().join("").replace(n,"");while(t.length!==(t=t.replace(a,"")).length){}return t.split("").reverse().join("")},buildURLFromParts:function e(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};e.exports=s})(rr)});var ar=function e(t,r){if(/^[a-z]+:/i.test(r)){return r}if(!/\/\//i.test(t)){t=nr.buildAbsoluteURL(p.location.href,t)}return nr.buildAbsoluteURL(t,r)};var sr=function e(t){var r=t.baseUrl,i=r===void 0?"":r,n=t.source,a=n===void 0?"":n,s=t.range,o=s===void 0?"":s,u=t.indexRange,l=u===void 0?"":u;var c={uri:a,resolvedUri:ar(i||"",a)};if(o||l){var f=o?o:l;var d=f.split("-");var h=parseInt(d[0],10);var p=parseInt(d[1],10);c.byterange={length:p-h+1,offset:h}}return c};var or=function e(t){var r=t.offset+t.length-1;return t.offset+"-"+r};var ur={static:function e(t){var r=t.duration,i=t.timescale,n=i===void 0?1:i,a=t.sourceDuration;return{start:0,end:Math.ceil(a/(r/n))}},dynamic:function e(t){var r=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,a=t.timescale,s=a===void 0?1:a,o=t.duration,u=t.start,l=u===void 0?0:u,c=t.minimumUpdatePeriod,f=c===void 0?0:c,d=t.timeShiftBufferDepth,h=d===void 0?Infinity:d;var p=(r+i)/1e3;var v=n+l;var m=p+f;var g=m-v;var y=Math.ceil(g*s/o);var _=Math.floor((p-v-h)*s/o);var b=Math.floor((p-v)*s/o);return{start:Math.max(0,_),end:Math.min(y,b)}}};var lr=function e(t){return function(e,r){var i=t.duration,n=t.timescale,a=n===void 0?1:n,s=t.periodIndex,o=t.startNumber,u=o===void 0?1:o;return{number:u+e,duration:i/a,timeline:s,time:r*i}}};var cr=function e(t){var r=t.type,i=r===void 0?"static":r,n=t.duration,a=t.timescale,s=a===void 0?1:a,o=t.sourceDuration;var u=ur[i](t),l=u.start,c=u.end;var f=Qt(l,c).map(lr(t));if(i==="static"){var d=f.length-1;f[d].duration=o-n/s*d}return f};var fr=function e(t){var r=t.baseUrl,i=t.initialization,n=i===void 0?{}:i,a=t.sourceDuration,s=t.timescale,o=s===void 0?1:s,u=t.indexRange,l=u===void 0?"":u,c=t.duration;if(!r){throw new Error(tr.NO_BASE_URL)}var f=sr({baseUrl:r,source:n.sourceURL,range:n.range});var d=sr({baseUrl:r,source:r,indexRange:l});d.map=f;if(c){var h=cr(t);if(h.length){d.duration=h[0].duration;d.timeline=h[0].timeline}}else if(a){d.duration=a/o;d.timeline=0}d.number=0;return[d]};var dr=function e(t,r,i){var n=t.sidx.map?t.sidx.map:null;var a=t.sidx.duration;var s=t.timeline||0;var o=t.sidx.byterange;var u=o.offset+o.length;var l=r.timescale;var c=r.references.filter(function(e){return e.referenceType!==1});var f=[];var d=u+r.firstOffset;for(var h=0;h<c.length;h++){var p=r.references[h];var v=p.referencedSize;var m=p.subsegmentDuration;var g=d+v-1;var y=d+"-"+g;var _={baseUrl:i,timescale:l,timeline:s,periodIndex:s,duration:m,sourceDuration:a,indexRange:y};var b=fr(_)[0];if(n){b.map=n}f.push(b);d+=v}t.segments=f;return t};var hr=function e(t){var r=$t(t.reduce(function(e,t){var r=t.attributes.id+(t.attributes.lang||"");if(e[r]){var i;if(t.segments[0]){t.segments[0].discontinuity=true}(i=e[r].segments).push.apply(i,t.segments);if(t.attributes.contentProtection){e[r].attributes.contentProtection=t.attributes.contentProtection}}else{e[r]=t}return e},{}));return r.map(function(e){e.discontinuityStarts=er(e.segments,"discontinuity");return e})};var pr=function e(t,r){if(r===void 0){r={}}if(!Object.keys(r).length){return t}for(var i in t){var n=t[i];if(!n.sidx){continue}var a=n.sidx.uri+"-"+or(n.sidx.byterange);var s=r[a]&&r[a].sidx;if(n.sidx&&s){dr(n,s,n.sidx.resolvedUri)}}return t};var vr=function e(t){var r;var i=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(r={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(i.contentProtection){s.contentProtection=i.contentProtection}if(a){s.sidx=a}return s};var mr=function e(t){var r;var i=t.attributes,n=t.segments;if(typeof n==="undefined"){n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}];i.duration=i.sourceDuration}return{attributes:(r={NAME:i.id,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:i.baseUrl||"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}};var gr=function e(t,r){if(r===void 0){r={}}var i;var n=t.reduce(function(e,t){var n=t.attributes.role&&t.attributes.role.value||"";var a=t.attributes.lang||"";var s="main";if(a){var o=n?" ("+n+")":"";s=""+t.attributes.lang+o}if(e[s]&&e[s].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth){return e}e[s]={language:a,autoselect:true,default:n==="main",playlists:pr([vr(t)],r),uri:""};if(typeof i==="undefined"&&n==="main"){i=t;i.default=true}return e},{});if(!i){var a=Object.keys(n)[0];n[a].default=true}return n};var yr=function e(t,r){if(r===void 0){r={}}return t.reduce(function(e,t){var i=t.attributes.lang||"text";if(e[i]){return e}e[i]={language:i,default:false,autoselect:false,playlists:pr([mr(t)],r),uri:""};return e},{})};var _r=function e(t){var r;var i=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(r={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(i.type||"static")==="static",timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(i.contentProtection){s.contentProtection=i.contentProtection}if(a){s.sidx=a}return s};var br=function e(t,r){var i;if(r===void 0){r={}}if(!t.length){return{}}var n=t[0].attributes,a=n.sourceDuration,s=n.minimumUpdatePeriod,o=s===void 0?0:s;var u=function e(t){var r=t.attributes;return r.mimeType==="video/mp4"||r.contentType==="video"};var l=function e(t){var r=t.attributes;return r.mimeType==="audio/mp4"||r.contentType==="audio"};var c=function e(t){var r=t.attributes;return r.mimeType==="text/vtt"||r.contentType==="text"};var f=hr(t.filter(u)).map(_r);var d=hr(t.filter(l));var h=t.filter(c);var p={allowCache:true,discontinuityStarts:[],segments:[],endList:true,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:a,playlists:pr(f,r),minimumUpdatePeriod:o*1e3};if(d.length){p.mediaGroups.AUDIO.audio=gr(d,r)}if(h.length){p.mediaGroups.SUBTITLES.subs=yr(h,r)}return p};var Tr=function e(t,r,i){var n=t.NOW,a=t.clientOffset,s=t.availabilityStartTime,o=t.timescale,u=o===void 0?1:o,l=t.start,c=l===void 0?0:l,f=t.minimumUpdatePeriod,d=f===void 0?0:f;var h=(n+a)/1e3;var p=s+c;var v=h+d;var m=v-p;return Math.ceil((m*u-r)/i)};var Sr=function e(t,r){var i=t.type,n=i===void 0?"static":i,a=t.minimumUpdatePeriod,s=a===void 0?0:a,o=t.media,u=o===void 0?"":o,l=t.sourceDuration,c=t.timescale,f=c===void 0?1:c,d=t.startNumber,h=d===void 0?1:d,p=t.periodIndex;var v=[];var m=-1;for(var g=0;g<r.length;g++){var y=r[g];var _=y.d;var b=y.r||0;var T=y.t||0;if(m<0){m=T}if(T&&T>m){m=T}var S=void 0;if(b<0){var k=g+1;if(k===r.length){if(n==="dynamic"&&s>0&&u.indexOf("$Number$")>0){S=Tr(t,m,_)}else{S=(l*f-m)/_}}else{S=(r[k].t-m)/_}}else{S=b+1}var w=h+v.length+S;var E=h+v.length;while(E<w){v.push({number:E,duration:_/f,time:m,timeline:p});m+=_;E++}}return v};var kr=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g;var wr=function e(t){return function(e,r,i,n){if(e==="$$"){return"$"}if(typeof t[r]==="undefined"){return e}var a=""+t[r];if(r==="RepresentationID"){return a}if(!i){n=1}else{n=parseInt(n,10)}if(a.length>=n){return a}return""+new Array(n-a.length+1).join("0")+a}};var Er=function e(t,r){return t.replace(kr,wr(r))};var Cr=function e(t,r){if(!t.duration&&!r){return[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}if(t.duration){return cr(t)}return Sr(t,r)};var Ir=function e(t,r){var i={RepresentationID:t.id,Bandwidth:t.bandwidth||0};var n=t.initialization,a=n===void 0?{sourceURL:"",range:""}:n;var s=sr({baseUrl:t.baseUrl,source:Er(a.sourceURL,i),range:a.range});var o=Cr(t,r);return o.map(function(e){i.Number=e.number;i.Time=e.time;var r=Er(t.media||"",i);return{uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:ar(t.baseUrl||"",r),map:s,number:e.number}})};var Ar=function e(t,r){var i=t.baseUrl,n=t.initialization,a=n===void 0?{}:n;var s=sr({baseUrl:i,source:a.sourceURL,range:a.range});var o=sr({baseUrl:i,source:r.media,range:r.mediaRange});o.map=s;return o};var Or=function e(t,r){var i=t.duration,n=t.segmentUrls,a=n===void 0?[]:n;if(!i&&!r||i&&r){throw new Error(tr.SEGMENT_TIME_UNSPECIFIED)}var s=a.map(function(e){return Ar(t,e)});var o;if(i){o=cr(t)}if(r){o=Sr(t,r)}var u=o.map(function(e,t){if(s[t]){var r=s[t];r.timeline=e.timeline;r.duration=e.duration;r.number=e.number;return r}}).filter(function(e){return e});return u};var Pr=function e(t){var r=t.attributes,i=t.segmentInfo;var n;var a;if(i.template){a=Ir;n=Kt(r,i.template)}else if(i.base){a=fr;n=Kt(r,i.base)}else if(i.list){a=Or;n=Kt(r,i.list)}var s={attributes:r};if(!a){return s}var o=a(n,i.timeline);if(n.duration){var u=n,l=u.duration,c=u.timescale,f=c===void 0?1:c;n.duration=l/f}else if(o.length){n.duration=o.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0)}else{n.duration=0}s.attributes=n;s.segments=o;if(i.base&&n.indexRange){s.sidx=o[0];s.segments=[]}return s};var Lr=function e(t){return t.map(Pr)};var xr=function e(t,r){return Zt(t.childNodes).filter(function(e){var t=e.tagName;return t===r})};var Dr=function e(t){return t.textContent.trim()};var Ur=function e(t){var r=365*24*60*60;var i=30*24*60*60;var n=24*60*60;var a=60*60;var s=60;var o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/;var u=o.exec(t);if(!u){return 0}var l=u.slice(1),c=l[0],f=l[1],d=l[2],h=l[3],p=l[4],v=l[5];return parseFloat(c||0)*r+parseFloat(f||0)*i+parseFloat(d||0)*n+parseFloat(h||0)*a+parseFloat(p||0)*s+parseFloat(v||0)};var Rr=function e(t){var r=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;if(r.test(t)){t+="Z"}return Date.parse(t)};var Mr={mediaPresentationDuration:function e(t){return Ur(t)},availabilityStartTime:function e(t){return Rr(t)/1e3},minimumUpdatePeriod:function e(t){return Ur(t)},timeShiftBufferDepth:function e(t){return Ur(t)},start:function e(t){return Ur(t)},width:function e(t){return parseInt(t,10)},height:function e(t){return parseInt(t,10)},bandwidth:function e(t){return parseInt(t,10)},startNumber:function e(t){return parseInt(t,10)},timescale:function e(t){return parseInt(t,10)},duration:function e(t){var r=parseInt(t,10);if(isNaN(r)){return Ur(t)}return r},d:function e(t){return parseInt(t,10)},t:function e(t){return parseInt(t,10)},r:function e(t){return parseInt(t,10)},DEFAULT:function e(t){return t}};var jr=function e(t){if(!(t&&t.attributes)){return{}}return Zt(t.attributes).reduce(function(e,t){var r=Mr[t.name]||Mr.DEFAULT;e[t.name]=r(t.value);return e},{})};function Nr(e){var t=p.atob(e);var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r}var Br={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"};var Fr=function e(t,r){if(!r.length){return t}return Jt(t.map(function(e){return r.map(function(t){return ar(e,Dr(t))})}))};var qr=function e(t){var r=xr(t,"SegmentTemplate")[0];var i=xr(t,"SegmentList")[0];var n=i&&xr(i,"SegmentURL").map(function(e){return Kt({tag:"SegmentURL"},jr(e))});var a=xr(t,"SegmentBase")[0];var s=i||r;var o=s&&xr(s,"SegmentTimeline")[0];var u=i||a||r;var l=u&&xr(u,"Initialization")[0];var c=r&&jr(r);if(c&&l){c.initialization=l&&jr(l)}else if(c&&c.initialization){c.initialization={sourceURL:c.initialization}}var f={template:c,timeline:o&&xr(o,"S").map(function(e){return jr(e)}),list:i&&Kt(jr(i),{segmentUrls:n,initialization:jr(l)}),base:a&&Kt(jr(a),{initialization:jr(l)})};Object.keys(f).forEach(function(e){if(!f[e]){delete f[e]}});return f};var Vr=function e(t,r,i){return function(e){var n=xr(e,"BaseURL");var a=Fr(r,n);var s=Kt(t,jr(e));var o=qr(e);return a.map(function(e){return{segmentInfo:Kt(i,o),attributes:Kt(s,{baseUrl:e})}})}};var Hr=function e(t){return t.reduce(function(e,t){var r=jr(t);var i=Br[r.schemeIdUri];if(i){e[i]={attributes:r};var n=xr(t,"cenc:pssh")[0];if(n){var a=Dr(n);var s=a&&Nr(a);e[i].pssh=s}}return e},{})};var zr=function e(t,r,i){return function(e){var n=jr(e);var a=Fr(r,xr(e,"BaseURL"));var s=xr(e,"Role")[0];var o={role:jr(s)};var u=Kt(t,n,o);var l=Hr(xr(e,"ContentProtection"));if(Object.keys(l).length){u=Kt(u,{contentProtection:l})}var c=qr(e);var f=xr(e,"Representation");var d=Kt(i,c);return Jt(f.map(Vr(u,a,d)))}};var Wr=function e(t,r){return function(e,i){var n=Fr(r,xr(e,"BaseURL"));var a=jr(e);var s=parseInt(a.id,10);var o=p.isNaN(s)?i:s;var u=Kt(t,{periodIndex:o});var l=xr(e,"AdaptationSet");var c=qr(e);return Jt(l.map(zr(u,n,c)))}};var Gr=function e(t,r){if(r===void 0){r={}}var i=r,n=i.manifestUri,a=n===void 0?"":n,s=i.NOW,o=s===void 0?Date.now():s,u=i.clientOffset,l=u===void 0?0:u;var c=xr(t,"Period");if(!c.length){throw new Error(tr.INVALID_NUMBER_OF_PERIOD)}var f=jr(t);var d=Fr([a],xr(t,"BaseURL"));f.sourceDuration=f.mediaPresentationDuration||0;f.NOW=o;f.clientOffset=l;return Jt(c.map(Wr(f,d)))};var Yr=function e(t){if(t===""){throw new Error(tr.DASH_EMPTY_MANIFEST)}var r=new p.DOMParser;var i=r.parseFromString(t,"application/xml");var n=i&&i.documentElement.tagName==="MPD"?i.documentElement:null;if(!n||n&&n.getElementsByTagName("parsererror").length>0){throw new Error(tr.DASH_INVALID_XML)}return n};var Xr=function e(t){var r=xr(t,"UTCTiming")[0];if(!r){return null}var i=jr(r);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT";i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(tr.UNSUPPORTED_UTC_TIMING_SCHEME)}return i};var Kr=function e(t,r){if(r===void 0){r={}}return br(Lr(Gr(Yr(t),r)),r.sidxMapping)};var $r=function e(t){return Xr(Yr(t))};var Qr=function e(t){return t>>>0};var Jr={toUnsigned:Qr};var Zr=Jr.toUnsigned;var ei,ti,ri,ii,ni;ei=function e(t,r){var i=[],n,a,s,o,u;if(!r.length){return null}for(n=0;n<t.byteLength;){a=Zr(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);s=ti(t.subarray(n+4,n+8));o=a>1?n+a:t.byteLength;if(s===r[0]){if(r.length===1){i.push(t.subarray(n+8,o))}else{u=ei(t.subarray(n+8,o),r.slice(1));if(u.length){i=i.concat(u)}}}n=o}return i};ti=function e(t){var r="";r+=String.fromCharCode(t[0]);r+=String.fromCharCode(t[1]);r+=String.fromCharCode(t[2]);r+=String.fromCharCode(t[3]);return r};ri=function e(t){var r={},i=ei(t,["moov","trak"]);return i.reduce(function(e,t){var r,i,n,a,s;r=ei(t,["tkhd"])[0];if(!r){return null}i=r[0];n=i===0?12:20;a=Zr(r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3]);s=ei(t,["mdia","mdhd"])[0];if(!s){return null}i=s[0];n=i===0?12:20;e[a]=Zr(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]);return e},r)};ii=function e(t,r){var i,n,a;i=ei(r,["moof","traf"]);n=[].concat.apply([],i.map(function(e){return ei(e,["tfhd"]).map(function(r){var i,n,a;i=Zr(r[4]<<24|r[5]<<16|r[6]<<8|r[7]);n=t[i]||9e4;a=ei(e,["tfdt"]).map(function(e){var t,r;t=e[0];r=Zr(e[4]<<24|e[5]<<16|e[6]<<8|e[7]);if(t===1){r*=Math.pow(2,32);r+=Zr(e[8]<<24|e[9]<<16|e[10]<<8|e[11])}return r})[0];a=a||Infinity;return a/n})}));a=Math.min.apply(null,n);return isFinite(a)?a:0};ni=function e(t){var r=ei(t,["moov","trak"]);var i=[];r.forEach(function(e){var t=ei(e,["mdia","hdlr"]);var r=ei(e,["tkhd"]);t.forEach(function(e,t){var n=ti(e.subarray(8,12));var a=r[t];var s;var o;var u;if(n==="vide"){s=new DataView(a.buffer,a.byteOffset,a.byteLength);o=s.getUint8(0);u=o===0?s.getUint32(12):s.getUint32(20);i.push(u)}})});return i};var ai={findBox:ei,parseType:ti,timescale:ri,startTime:ii,videoTrackIds:ni};var si,oi,ui=ai.parseType,li=function e(t){return new Date(t*1e3-20828448e5)},ci=function e(t){return{isLeading:(t[0]&12)>>>2,dependsOn:t[0]&3,isDependedOn:(t[1]&192)>>>6,hasRedundancy:(t[1]&48)>>>4,paddingValue:(t[1]&14)>>>1,isNonSyncSample:t[1]&1,degradationPriority:t[2]<<8|t[3]}},fi=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=[],n,a;for(n=0;n+4<t.length;n+=a){a=r.getUint32(n);n+=4;if(a<=0){i.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(t[n]&31){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+t[n]&31);break}}return i},di={avc1:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:r.getUint16(6),width:r.getUint16(24),height:r.getUint16(26),horizresolution:r.getUint16(28)+r.getUint16(30)/16,vertresolution:r.getUint16(32)+r.getUint16(34)/16,frameCount:r.getUint16(40),depth:r.getUint16(74),config:si(t.subarray(78,t.byteLength))}},avcC:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:t[4]&3,sps:[],pps:[]},n=t[5]&31,a,s,o,u;o=6;for(u=0;u<n;u++){s=r.getUint16(o);o+=2;i.sps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}a=t[o];o++;for(u=0;u<a;u++){s=r.getUint16(o);o+=2;i.pps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}return i},btrt:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:r.getUint32(0),maxBitrate:r.getUint32(4),avgBitrate:r.getUint32(8)}},esds:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:t[8]&31,decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(t[26]&7)<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:ui(t.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},n=8;while(n<t.byteLength){i.compatibleBrands.push(ui(t.subarray(n,n+4)));n+=4}return i},dinf:function e(t){return{boxes:si(t)}},dref:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:si(t.subarray(8))}},hdlr:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:ui(t.subarray(8,12)),name:""},n=8;for(n=24;n<t.byteLength;n++){if(t[n]===0){n++;break}i.name+=String.fromCharCode(t[n])}i.name=decodeURIComponent(escape(i.name));return i},mdat:function e(t){return{byteLength:t.byteLength,nals:fi(t)}},mdhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n,a={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};if(a.version===1){i+=4;a.creationTime=li(r.getUint32(i));i+=8;a.modificationTime=li(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=8;a.duration=r.getUint32(i)}else{a.creationTime=li(r.getUint32(i));i+=4;a.modificationTime=li(r.getUint32(i));i+=4;a.timescale=r.getUint32(i);i+=4;a.duration=r.getUint32(i)}i+=4;n=r.getUint16(i);a.language+=String.fromCharCode((n>>10)+96);a.language+=String.fromCharCode(((n&992)>>5)+96);a.language+=String.fromCharCode((n&31)+96);return a},mdia:function e(t){return{boxes:si(t)}},mfhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function e(t){return{boxes:si(t)}},mp4a:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:r.getUint16(6),channelcount:r.getUint16(16),samplesize:r.getUint16(18),samplerate:r.getUint16(24)+r.getUint16(26)/65536};if(t.byteLength>28){i.streamDescriptor=si(t.subarray(28))[0]}return i},moof:function e(t){return{boxes:si(t)}},moov:function e(t){return{boxes:si(t)}},mvex:function e(t){return{boxes:si(t)}},mvhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=li(r.getUint32(i));i+=8;n.modificationTime=li(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=8;n.duration=r.getUint32(i)}else{n.creationTime=li(r.getUint32(i));i+=4;n.modificationTime=li(r.getUint32(i));i+=4;n.timescale=r.getUint32(i);i+=4;n.duration=r.getUint32(i)}i+=4;n.rate=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;i+=2*4;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;i+=6*4;n.nextTrackId=r.getUint32(i);return n},pdin:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:r.getUint32(4),initialDelay:r.getUint32(8)}},sdtp:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i;for(i=4;i<t.byteLength;i++){r.samples.push({dependsOn:(t[i]&48)>>4,isDependedOn:(t[i]&12)>>2,hasRedundancy:t[i]&3})}return r},sidx:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8),earliestPresentationTime:r.getUint32(12),firstOffset:r.getUint32(16)},n=r.getUint16(22),a;for(a=24;n;a+=12,n--){i.references.push({referenceType:(t[a]&128)>>>7,referencedSize:r.getUint32(a)&2147483647,subsegmentDuration:r.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:r.getUint32(a+8)&268435455})}return i},smhd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function e(t){return{boxes:si(t)}},stco:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},n=r.getUint32(4),a;for(a=8;n;a+=4,n--){i.chunkOffsets.push(r.getUint32(a))}return i},stsc:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=r.getUint32(4),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]},a;for(a=8;i;a+=12,i--){n.sampleToChunks.push({firstChunk:r.getUint32(a),samplesPerChunk:r.getUint32(a+4),sampleDescriptionIndex:r.getUint32(a+8)})}return n},stsd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:si(t.subarray(8))}},stsz:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:r.getUint32(4),entries:[]},n;for(n=12;n<t.byteLength;n+=4){i.entries.push(r.getUint32(n))}return i},stts:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},n=r.getUint32(4),a;for(a=8;n;a+=8,n--){i.timeToSamples.push({sampleCount:r.getUint32(a),sampleDelta:r.getUint32(a+4)})}return i},styp:function e(t){return di.ftyp(t)},tfdt:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};if(r.version===1){r.baseMediaDecodeTime*=Math.pow(2,32);r.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]}return r},tfhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4)},n=i.flags[2]&1,a=i.flags[2]&2,s=i.flags[2]&8,o=i.flags[2]&16,u=i.flags[2]&32,l=i.flags[0]&65536,c=i.flags[0]&131072,f;f=8;if(n){f+=4;i.baseDataOffset=r.getUint32(12);f+=4}if(a){i.sampleDescriptionIndex=r.getUint32(f);f+=4}if(s){i.defaultSampleDuration=r.getUint32(f);f+=4}if(o){i.defaultSampleSize=r.getUint32(f);f+=4}if(u){i.defaultSampleFlags=r.getUint32(f)}if(l){i.durationIsEmpty=true}if(!n&&c){i.baseDataOffsetIsMoof=true}return i},tkhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:r.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){i+=4;n.creationTime=li(r.getUint32(i));i+=8;n.modificationTime=li(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=8;n.duration=r.getUint32(i)}else{n.creationTime=li(r.getUint32(i));i+=4;n.modificationTime=li(r.getUint32(i));i+=4;n.trackId=r.getUint32(i);i+=4;i+=4;n.duration=r.getUint32(i)}i+=4;i+=2*4;n.layer=r.getUint16(i);i+=2;n.alternateGroup=r.getUint16(i);i+=2;n.volume=r.getUint8(i)+r.getUint8(i+1)/8;i+=2;i+=2;n.matrix=new Uint32Array(t.subarray(i,i+9*4));i+=9*4;n.width=r.getUint16(i)+r.getUint16(i+2)/16;i+=4;n.height=r.getUint16(i)+r.getUint16(i+2)/16;return n},traf:function e(t){return{boxes:si(t)}},trak:function e(t){return{boxes:si(t)}},trex:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4),defaultSampleDescriptionIndex:r.getUint32(8),defaultSampleDuration:r.getUint32(12),defaultSampleSize:r.getUint32(16),sampleDependsOn:t[20]&3,sampleIsDependedOn:(t[21]&192)>>6,sampleHasRedundancy:(t[21]&48)>>4,samplePaddingValue:(t[21]&14)>>1,sampleIsDifferenceSample:!!(t[21]&1),sampleDegradationPriority:r.getUint16(22)}},trun:function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.flags[2]&1,a=r.flags[2]&4,s=r.flags[1]&1,o=r.flags[1]&2,u=r.flags[1]&4,l=r.flags[1]&8,c=i.getUint32(4),f=8,d;if(n){r.dataOffset=i.getInt32(f);f+=4}if(a&&c){d={flags:ci(t.subarray(f,f+4))};f+=4;if(s){d.duration=i.getUint32(f);f+=4}if(o){d.size=i.getUint32(f);f+=4}if(l){d.compositionTimeOffset=i.getUint32(f);f+=4}r.samples.push(d);c--}while(c--){d={};if(s){d.duration=i.getUint32(f);f+=4}if(o){d.size=i.getUint32(f);f+=4}if(u){d.flags=ci(t.subarray(f,f+4));f+=4}if(l){d.compositionTimeOffset=i.getUint32(f);f+=4}r.samples.push(d)}return r},"url ":function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:r.getUint16(4),opcolor:new Uint16Array([r.getUint16(6),r.getUint16(8),r.getUint16(10)])}}};si=function e(t){var r=0,i=[],n,a,s,o,u;var l=new ArrayBuffer(t.length);var c=new Uint8Array(l);for(var f=0;f<t.length;++f){c[f]=t[f]}n=new DataView(l);while(r<t.byteLength){a=n.getUint32(r);s=ui(t.subarray(r+4,r+8));o=a>1?r+a:t.byteLength;u=(di[s]||function(e){return{data:e}})(t.subarray(r+8,o));u.size=a;u.type=s;i.push(u);r=o}return i};oi=function e(t,r){var i;r=r||0;i=new Array(r*2+1).join(" ");return t.map(function(e,t){return i+e.type+"\n"+Object.keys(e).filter(function(e){return e!=="type"&&e!=="boxes"}).map(function(t){var r=i+" "+t+": ",n=e[t];if(n instanceof Uint8Array||n instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);if(!a){return r+"<>"}if(a.length===1){return r+"<"+a.join("").slice(1)+">"}return r+"<\n"+a.map(function(e){return i+" "+e}).join("\n")+"\n"+i+" >"}return r+JSON.stringify(n,null,2).split("\n").map(function(e,t){if(t===0){return e}return i+" "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+oi(e.boxes,r+1):"")}).join("\n")};var hi={inspect:si,textify:oi,parseTfdt:di.tfdt,parseHdlr:di.hdlr,parseTfhd:di.tfhd,parseTrun:di.trun,parseSidx:di.sidx};var pi=i.EventTarget,vi=i.mergeOptions;var mi=function e(t,r){var i=void 0;var n=vi(t,{duration:r.duration,minimumUpdatePeriod:r.minimumUpdatePeriod});for(var a=0;a<r.playlists.length;a++){var s=N(n,r.playlists[a]);if(s){n=s}else{i=true}}R(r,function(e,t,r,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].uri;var o=N(n,e.playlists[0]);if(o){n=o;n.mediaGroups[t][r][a].playlists[0]=n.playlists[s];i=false}}});if(i){return null}return n};var gi=function e(t){var r=t.byterange.offset+t.byterange.length-1;return t.uri+"-"+t.byterange.offset+"-"+r};var yi=function e(t,r){var i=Boolean(!t.map&&!r.map);var n=i||Boolean(t.map&&r.map&&t.map.byterange.offset===r.map.byterange.offset&&t.map.byterange.length===r.map.byterange.length);return n&&t.uri===r.uri&&t.byterange.offset===r.byterange.offset&&t.byterange.length===r.byterange.length};var _i=function e(t,r){var i={};for(var n in t){var a=t[n];var s=a.sidx;if(s){var o=gi(s);if(!r[o]){break}var u=r[o].sidxInfo;if(yi(u,s)){i[o]=r[o]}}}return i};var bi=function e(t,r,i,n){var a=Kr(t,{manifestUri:r,clientOffset:i});var s=_i(a.playlists,n);var o=s;R(a,function(e,t,r,i){if(e.playlists&&e.playlists.length){var a=e.playlists;o=vi(o,_i(a,n))}});return o};var Ti=function e(t,r,n,a,s){var o={uri:m(a.handleManifestRedirects,t.resolvedUri),byterange:t.byterange,playlist:r};var u=i.mergeOptions(o,{responseType:"arraybuffer",headers:ge(o)});return n(u,s)};var Si=function(e){O(t,e);function t(e,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];C(this,t);var a=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var s=i.withCredentials,o=s===undefined?false:s,u=i.handleManifestRedirects,l=u===undefined?false:u;a.hls_=r;a.withCredentials=o;a.handleManifestRedirects=l;if(!e){throw new Error("A non-empty playlist URL or playlist is required")}a.on("minimumUpdatePeriod",function(){a.refreshXml_()});a.on("mediaupdatetimeout",function(){a.refreshMedia_(a.media().uri)});a.state="HAVE_NOTHING";a.loadedPlaylists_={};if(typeof e==="string"){a.srcUrl=e;a.sidxMapping_={};return P(a)}a.setupChildLoader(n,e);return a}I(t,[{key:"setupChildLoader",value:function e(t,r){this.masterPlaylistLoader_=t;this.childPlaylist_=r}},{key:"dispose",value:function e(){this.stopRequest();this.loadedPlaylists_={};p.clearTimeout(this.minimumUpdatePeriodTimeout_);p.clearTimeout(this.mediaRequest_);p.clearTimeout(this.mediaUpdateTimeout)}},{key:"hasPendingRequest",value:function e(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}}},{key:"sidxRequestFinished_",value:function e(t,r,i,n){var a=this;return function(e,s){if(!a.request){return}a.request=null;if(e){a.error={status:s.status,message:"DASH playlist request error at URL: "+t.uri,response:s.response,code:2};if(i){a.state=i}a.trigger("error");return n(r,null)}var o=new Uint8Array(s.response);var u=hi.parseSidx(o.subarray(8));return n(r,u)}}},{key:"media",value:function e(t){var r=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}var i=this.state;if(typeof t==="string"){if(!this.master.playlists[t]){throw new Error("Unknown playlist URI: "+t)}t=this.master.playlists[t]}var n=!this.media_||t.uri!==this.media_.uri;if(n&&this.loadedPlaylists_[t.uri]&&this.loadedPlaylists_[t.uri].endList){this.state="HAVE_METADATA";this.media_=t;if(n){this.trigger("mediachanging");this.trigger("mediachange")}return}if(!n){return}if(this.media_){this.trigger("mediachanging")}if(!t.sidx){this.mediaRequest_=p.setTimeout(this.haveMetadata.bind(this,{startingState:i,playlist:t}),0);return}var a=void 0;var s=void 0;if(this.masterPlaylistLoader_){a=this.masterPlaylistLoader_.master;s=this.masterPlaylistLoader_.sidxMapping_}else{a=this.master;s=this.sidxMapping_}var o=gi(t.sidx);s[o]={sidxInfo:t.sidx};this.request=Ti(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,a,i,function(e,n){if(!e||!n){throw new Error("failed to request sidx")}s[o].sidx=n;r.haveMetadata({startingState:i,playlist:e.playlists[t.uri]})}))}},{key:"haveMetadata",value:function e(t){var r=t.startingState,i=t.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[i.uri]=i;this.mediaRequest_=null;this.refreshMedia_(i.uri);if(r==="HAVE_MASTER"){this.trigger("loadedmetadata")}else{this.trigger("mediachange")}}},{key:"pause",value:function e(){this.stopRequest();p.clearTimeout(this.mediaUpdateTimeout);p.clearTimeout(this.minimumUpdatePeriodTimeout_);if(this.state==="HAVE_NOTHING"){this.started=false}}},{key:"load",value:function e(t){var r=this;p.clearTimeout(this.mediaUpdateTimeout);p.clearTimeout(this.minimumUpdatePeriodTimeout_);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=p.setTimeout(function(){return r.load()},n);return}if(!this.started){this.start();return}this.trigger("loadedplaylist")}},{key:"parseMasterXml",value:function e(){var t=Kr(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});t.uri=this.srcUrl;for(var r=0;r<t.playlists.length;r++){var i="placeholder-uri-"+r;t.playlists[r].uri=i;t.playlists[i]=t.playlists[r]}R(t,function(e,r,i,n){if(e.playlists&&e.playlists.length){var a="placeholder-uri-"+r+"-"+i+"-"+n;e.playlists[0].uri=a;t.playlists[a]=e.playlists[0]}});B(t);F(t);return t}},{key:"start",value:function e(){var t=this;this.started=true;if(this.masterPlaylistLoader_){this.mediaRequest_=p.setTimeout(this.haveMaster_.bind(this),0);return}this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=r.responseText;if(r.responseHeaders&&r.responseHeaders.date){t.masterLoaded_=Date.parse(r.responseHeaders.date)}else{t.masterLoaded_=Date.now()}t.srcUrl=m(t.handleManifestRedirects,t.srcUrl,r);t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))})}},{key:"syncClientServerClock_",value:function e(t){var r=this;var i=$r(this.masterXml_);if(i===null){this.clientOffset_=this.masterLoaded_-Date.now();return t()}if(i.method==="DIRECT"){this.clientOffset_=i.value-Date.now();return t()}this.request=this.hls_.xhr({uri:v(this.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},function(e,n){if(!r.request){return}if(e){r.clientOffset_=r.masterLoaded_-Date.now();return t()}var a=void 0;if(i.method==="HEAD"){if(!n.responseHeaders||!n.responseHeaders.date){a=r.masterLoaded_}else{a=Date.parse(n.responseHeaders.date)}}else{a=Date.parse(n.responseText)}r.clientOffset_=a-Date.now();t()})}},{key:"haveMaster_",value:function e(){this.state="HAVE_MASTER";this.mediaRequest_=null;if(!this.masterPlaylistLoader_){this.master=this.parseMasterXml();this.trigger("loadedplaylist")}else if(!this.media_){this.media(this.childPlaylist_)}}},{key:"onClientServerClockSync_",value:function e(){var t=this;this.haveMaster_();if(!this.hasPendingRequest()&&!this.media_){this.media(this.master.playlists[0])}if(this.master&&this.master.minimumUpdatePeriod){this.minimumUpdatePeriodTimeout_=p.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}}},{key:"refreshXml_",value:function e(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}t.request=null;if(e){t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=r.responseText;t.sidxMapping_=bi(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);var i=t.parseMasterXml();var n=mi(t.master,i);if(n){var a=gi(t.media().sidx);if(!t.sidxMapping_[a]){var s=t.media();t.request=Ti(s.sidx,s,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(s,i,t.state,function(e,r){if(!e||!r){throw new Error("failed to request sidx on minimumUpdatePeriod")}t.sidxMapping_[a].sidx=r;t.minimumUpdatePeriodTimeout_=p.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod);t.refreshMedia_(t.media().uri);return}))}else{t.master=n}}t.minimumUpdatePeriodTimeout_=p.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)})}},{key:"refreshMedia_",value:function e(t){var r=this;if(!t){throw new Error("refreshMedia_ must take a media uri")}var i=void 0;var n=void 0;if(this.masterPlaylistLoader_){i=this.masterPlaylistLoader_.master;n=this.masterPlaylistLoader_.parseMasterXml()}else{i=this.master;n=this.parseMasterXml()}var a=mi(i,n);if(a){if(this.masterPlaylistLoader_){this.masterPlaylistLoader_.master=a}else{this.master=a}this.media_=a.playlists[t]}else{this.media_=n.playlists[t];this.trigger("playlistunchanged")}if(!this.media().endList){this.mediaUpdateTimeout=p.setTimeout(function(){r.trigger("mediaupdatetimeout")},q(this.media(),!!a))}this.trigger("loadedplaylist")}}]);return t}(pi);var ki=function e(t){if(i.log.debug){return i.log.debug.bind(i,"VHS:",t+" >")}return function(){}};function wi(){}var Ei=function(){function e(t,r,i,n){C(this,e);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=t;this.processedAppend_=false;this.type_=i;this.mimeType_=r;this.logger_=ki("SourceUpdater["+i+"]["+r+"]");if(t.readyState==="closed"){t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,r,n))}else{this.createSourceBuffer_(r,n)}}I(e,[{key:"createSourceBuffer_",value:function e(t,r){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t);this.logger_("created SourceBuffer");if(r){r.trigger("sourcebufferadded");if(this.mediaSource.sourceBuffers.length<2){r.on("sourcebufferadded",function(){i.start_()});return}}this.start_()}},{key:"start_",value:function e(){var t=this;this.started_=true;this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null;t.sourceBuffer_.removing=false;t.logger_("buffered ["+rt(t.buffered())+"]");if(e){e()}t.runCallback_()};this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_);this.runCallback_()}},{key:"abort",value:function e(t){var r=this;if(this.processedAppend_){this.queueCallback_(function(){r.sourceBuffer_.abort()},t)}}},{key:"appendBuffer",value:function e(t,r){var i=this;this.processedAppend_=true;this.queueCallback_(function(){if(t.videoSegmentTimingInfoCallback){i.sourceBuffer_.addEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}i.sourceBuffer_.appendBuffer(t.bytes)},function(){if(t.videoSegmentTimingInfoCallback){i.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}r()})}},{key:"buffered",value:function e(){if(!this.sourceBuffer_){return i.createTimeRanges()}return this.sourceBuffer_.buffered}},{key:"remove",value:function e(t,r){var i=this;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:wi;if(this.processedAppend_){this.queueCallback_(function(){i.logger_("remove ["+t+" => "+r+"]");i.sourceBuffer_.removing=true;i.sourceBuffer_.remove(t,r)},n)}}},{key:"updating",value:function e(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==wi}},{key:"timestampOffset",value:function e(t){var r=this;if(typeof t!=="undefined"){this.queueCallback_(function(){r.sourceBuffer_.timestampOffset=t;r.runCallback_()});this.timestampOffset_=t}return this.timestampOffset_}},{key:"queueCallback_",value:function e(t,r){this.callbacks_.push([t.bind(this),r]);this.runCallback_()}},{key:"runCallback_",value:function e(){var t=void 0;if(!this.updating()&&this.callbacks_.length&&this.started_){t=this.callbacks_.shift();this.pendingCallback_=t[1];t[0]()}}},{key:"dispose",value:function e(){var t=this;var r=function e(){if(t.sourceBuffer_&&t.mediaSource.readyState==="open"){t.sourceBuffer_.abort()}t.sourceBuffer_.removeEventListener("updateend",e)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);if(this.sourceBuffer_.removing){this.sourceBuffer_.addEventListener("updateend",r)}else{r()}}}]);return e}();var Ci={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1};var Ii={FAILURE:2,TIMEOUT:-101,ABORTED:-102};var Ai=function e(t){t.forEach(function(e){e.abort()})};var Oi=function e(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}};var Pi=function e(t){var r=t.target;var i=Date.now()-r.requestTime;var n={bandwidth:Infinity,bytesReceived:0,roundTripTime:i||0};n.bytesReceived=t.loaded;n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3);return n};var Li=function e(t,r){if(r.timedout){return{status:r.status,message:"HLS request timed-out at URL: "+r.uri,code:Ii.TIMEOUT,xhr:r}}if(r.aborted){return{status:r.status,message:"HLS request aborted at URL: "+r.uri,code:Ii.ABORTED,xhr:r}}if(t){return{status:r.status,message:"HLS request errored at URL: "+r.uri,code:Ii.FAILURE,xhr:r}}return null};var xi=function e(t,r){return function(e,i){var n=i.response;var a=Li(e,i);if(a){return r(a,t)}if(n.byteLength!==16){return r({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:Ii.FAILURE,xhr:i},t)}var s=new DataView(n);t.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]);return r(null,t)}};var Di=function e(t,r,i){return function(e,n){var a=n.response;var s=Li(e,n);if(s){return i(s,t)}if(a.byteLength===0){return i({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:Ii.FAILURE,xhr:n},t)}t.map.bytes=new Uint8Array(n.response);if(r&&!r.isInitialized()){r.init()}t.map.timescales=ai.timescale(t.map.bytes);t.map.videoTrackIds=ai.videoTrackIds(t.map.bytes);return i(null,t)}};var Ui=function e(t,r,i){return function(e,n){var a=n.response;var s=Li(e,n);var o=void 0;if(s){return i(s,t)}if(a.byteLength===0){return i({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:Ii.FAILURE,xhr:n},t)}t.stats=Oi(n);if(t.key){t.encryptedBytes=new Uint8Array(n.response)}else{t.bytes=new Uint8Array(n.response)}if(r&&t.map&&t.map.bytes){if(!r.isInitialized()){r.init()}o=r.parse(t.bytes,t.map.videoTrackIds,t.map.timescales);if(o&&o.captions){t.captionStreams=o.captionStreams;t.fmp4Captions=o.captions}}return i(null,t)}};var Ri=function e(t,r,i){var n=function e(n){if(n.data.source===r.requestId){t.removeEventListener("message",e);var a=n.data.decrypted;r.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength);return i(null,r)}};t.addEventListener("message",n);var a=void 0;if(r.key.bytes.slice){a=r.key.bytes.slice()}else{a=new Uint32Array(Array.prototype.slice.call(r.key.bytes))}t.postMessage(Ue({source:r.requestId,encrypted:r.encryptedBytes,key:a,iv:r.key.iv}),[r.encryptedBytes.buffer,a.buffer])};var Mi=function e(t,r,i){var n=0;var a=false;return function(e,s){if(a){return}if(e){a=true;Ai(t);return i(e,s)}n+=1;if(n===t.length){s.endOfAllRequests=Date.now();if(s.encryptedBytes){return Ri(r,s,i)}return i(null,s)}}};var ji=function e(t,r){return function(e){t.stats=i.mergeOptions(t.stats,Pi(e));if(!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived){t.stats.firstBytesReceivedAt=Date.now()}return r(e,t)}};var Ni=function e(t,r,n,a,s,o,u){var l=[];var c=Mi(l,n,u);if(s.key&&!s.key.bytes){var f=i.mergeOptions(r,{uri:s.key.resolvedUri,responseType:"arraybuffer"});var d=xi(s,c);var h=t(f,d);l.push(h)}if(s.map&&!s.map.bytes){var p=i.mergeOptions(r,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:ge(s.map)});var v=Di(s,a,c);var m=t(p,v);l.push(m)}var g=i.mergeOptions(r,{uri:s.resolvedUri,responseType:"arraybuffer",headers:ge(s)});var y=Ui(s,a,c);var _=t(g,y);_.addEventListener("progress",ji(s,o));l.push(_);return function(){return Ai(l)}};var Bi=function e(t,r){var i=void 0;if(!t){return""}i=p.getComputedStyle(t);if(!i){return""}return i[r]};var Fi=function e(t,r){var i=t.slice();t.sort(function(e,t){var n=r(e,t);if(n===0){return i.indexOf(e)-i.indexOf(t)}return n})};var qi=function e(t,r){var i=void 0;var n=void 0;if(t.attributes.BANDWIDTH){i=t.attributes.BANDWIDTH}i=i||p.Number.MAX_VALUE;if(r.attributes.BANDWIDTH){n=r.attributes.BANDWIDTH}n=n||p.Number.MAX_VALUE;return i-n};var Vi=function e(t,r){var i=void 0;var n=void 0;if(t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width){i=t.attributes.RESOLUTION.width}i=i||p.Number.MAX_VALUE;if(r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width){n=r.attributes.RESOLUTION.width}n=n||p.Number.MAX_VALUE;if(i===n&&t.attributes.BANDWIDTH&&r.attributes.BANDWIDTH){return t.attributes.BANDWIDTH-r.attributes.BANDWIDTH}return i-n};var Hi=function e(t,r,i,n,a){var s=t.playlists.map(function(e){var t=void 0;var r=void 0;var i=void 0;t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width;r=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;i=e.attributes.BANDWIDTH;i=i||p.Number.MAX_VALUE;return{bandwidth:i,width:t,height:r,playlist:e}});Fi(s,function(e,t){return e.bandwidth-t.bandwidth});s=s.filter(function(e){return!de.isIncompatible(e.playlist)});var o=s.filter(function(e){return de.isEnabled(e.playlist)});if(!o.length){o=s.filter(function(e){return!de.isDisabled(e.playlist)})}var u=o.filter(function(e){return e.bandwidth*Ci.BANDWIDTH_VARIANCE<r});var l=u[u.length-1];var c=u.filter(function(e){return e.bandwidth===l.bandwidth})[0];if(a===false){var f=c||o[0]||s[0];return f?f.playlist:null}var d=u.filter(function(e){return e.width&&e.height});Fi(d,function(e,t){return e.width-t.width});var h=d.filter(function(e){return e.width===i&&e.height===n});l=h[h.length-1];var v=h.filter(function(e){return e.bandwidth===l.bandwidth})[0];var m=void 0;var g=void 0;var y=void 0;if(!v){m=d.filter(function(e){return e.width>i||e.height>n});g=m.filter(function(e){return e.width===m[0].width&&e.height===m[0].height});l=g[g.length-1];y=g.filter(function(e){return e.bandwidth===l.bandwidth})[0]}var _=y||v||c||o[0]||s[0];return _?_.playlist:null};var zi=function e(){return Hi(this.playlists.master,this.systemBandwidth,parseInt(Bi(this.tech_.el(),"width"),10),parseInt(Bi(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)};var Wi=function e(t){var r=t.master,i=t.currentTime,n=t.bandwidth,a=t.duration,s=t.segmentDuration,o=t.timeUntilRebuffer,u=t.currentTimeline,l=t.syncController;var c=r.playlists.filter(function(e){return!de.isIncompatible(e)});var f=c.filter(de.isEnabled);if(!f.length){f=c.filter(function(e){return!de.isDisabled(e)})}var d=f.filter(de.hasAttribute.bind(null,"BANDWIDTH"));var h=d.map(function(e){var t=l.getSyncPoint(e,a,u,i);var r=t?1:2;var c=de.estimateSegmentRequestTime(s,n,e);var f=c*r-o;return{playlist:e,rebufferingImpact:f}});var p=h.filter(function(e){return e.rebufferingImpact<=0});Fi(p,function(e,t){return qi(t.playlist,e.playlist)});if(p.length){return p[0]}Fi(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact});return h[0]||null};var Gi=function e(){var t=this.playlists.master.playlists.filter(de.isEnabled);Fi(t,function(e,t){return qi(e,t)});var r=t.filter(function(e){return Et(e.attributes.CODECS).videoCodec});return r[0]||null};var Yi=function e(t,r,i){for(var n in i){if(!t[n]){r.trigger({type:"usage",name:"hls-608"});var a=r.textTracks().getTrackById(n);if(a){t[n]=a}else{t[n]=r.addRemoteTextTrack({kind:"captions",id:n,label:n},false).track}}}};var Xi=function t(r){var i=r.inbandTextTracks,n=r.captionArray,a=r.timestampOffset;if(!n){return}var s=e.WebKitDataCue||e.VTTCue;n.forEach(function(e){var t=e.stream;var r=e.startTime;var n=e.endTime;if(!i[t]){return}r+=a;n+=a;i[t].addCue(new s(r,n,e.text))})};var Ki=Math.pow(2,32)-1;var $i,Qi,Ji,Zi,en,tn,rn,nn,an,sn,on,un,ln,cn,fn,dn,hn,pn,vn,mn,gn,yn,_n,bn,Tn,Sn,kn,wn,En,Cn,In,An,On,Pn,Ln,xn;(function(){var e;_n={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]};if(typeof Uint8Array==="undefined"){return}for(e in _n){if(_n.hasOwnProperty(e)){_n[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]}}bn=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);Sn=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);Tn=new Uint8Array([0,0,0,1]);kn=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]);wn=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);En={video:kn,audio:wn};An=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);In=new Uint8Array([0,0,0,0,0,0,0,0]);On=new Uint8Array([0,0,0,0,0,0,0,0]);Pn=On;Ln=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);xn=On;Cn=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();$i=function e(t){var r=[],i=0,n,a,s;for(n=1;n<arguments.length;n++){r.push(arguments[n])}n=r.length;while(n--){i+=r[n].byteLength}a=new Uint8Array(i+8);s=new DataView(a.buffer,a.byteOffset,a.byteLength);s.setUint32(0,a.byteLength);a.set(t,4);for(n=0,i=8;n<r.length;n++){a.set(r[n],i);i+=r[n].byteLength}return a};Qi=function e(){return $i(_n.dinf,$i(_n.dref,An))};Ji=function e(t){return $i(_n.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))};Zi=function e(){return $i(_n.ftyp,bn,Tn,bn,Sn)};dn=function e(t){return $i(_n.hdlr,En[t])};en=function e(t){return $i(_n.mdat,t)};fn=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,t.duration&255,85,196,0,0]);if(t.samplerate){r[12]=t.samplerate>>>24&255;r[13]=t.samplerate>>>16&255;r[14]=t.samplerate>>>8&255;r[15]=t.samplerate&255}return $i(_n.mdhd,r)};cn=function e(t){return $i(_n.mdia,fn(t),dn(t.type),rn(t))};tn=function e(t){return $i(_n.mfhd,new Uint8Array([0,0,0,0,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255]))};rn=function e(t){return $i(_n.minf,t.type==="video"?$i(_n.vmhd,Cn):$i(_n.smhd,In),Qi(),pn(t))};nn=function e(t,r){var i=[],n=r.length;while(n--){i[n]=mn(r[n])}return $i.apply(null,[_n.moof,tn(t)].concat(i))};an=function e(t){var r=t.length,i=[];while(r--){i[r]=un(t[r])}return $i.apply(null,[_n.moov,on(4294967295)].concat(i).concat(sn(t)))};sn=function e(t){var r=t.length,i=[];while(r--){i[r]=gn(t[r])}return $i.apply(null,[_n.mvex].concat(i))};on=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return $i(_n.mvhd,r)};hn=function e(t){var r=t.samples||[],i=new Uint8Array(4+r.length),n,a;for(a=0;a<r.length;a++){n=r[a].flags;i[a+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy}return $i(_n.sdtp,i)};pn=function e(t){return $i(_n.stbl,vn(t),$i(_n.stts,xn),$i(_n.stsc,Pn),$i(_n.stsz,Ln),$i(_n.stco,On))};(function(){var e,t;vn=function r(i){return $i(_n.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),i.type==="video"?e(i):t(i))};e=function e(t){var r=t.sps||[],i=t.pps||[],n=[],a=[],s;for(s=0;s<r.length;s++){n.push((r[s].byteLength&65280)>>>8);n.push(r[s].byteLength&255);n=n.concat(Array.prototype.slice.call(r[s]))}for(s=0;s<i.length;s++){a.push((i[s].byteLength&65280)>>>8);a.push(i[s].byteLength&255);a=a.concat(Array.prototype.slice.call(i[s]))}return $i(_n.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(t.width&65280)>>8,t.width&255,(t.height&65280)>>8,t.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),$i(_n.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length]).concat(n).concat([i.length]).concat(a))),$i(_n.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};t=function e(t){return $i(_n.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(t.channelcount&65280)>>8,t.channelcount&255,(t.samplesize&65280)>>8,t.samplesize&255,0,0,0,0,(t.samplerate&65280)>>8,t.samplerate&255,0,0]),Ji(t))}})();ln=function e(t){var r=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,0,(t.duration&4278190080)>>24,(t.duration&16711680)>>16,(t.duration&65280)>>8,t.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(t.width&65280)>>8,t.width&255,0,0,(t.height&65280)>>8,t.height&255,0,0]);return $i(_n.tkhd,r)};mn=function e(t){var r,i,n,a,s,o,u;r=$i(_n.tfhd,new Uint8Array([0,0,0,58,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));o=Math.floor(t.baseMediaDecodeTime/(Ki+1));u=Math.floor(t.baseMediaDecodeTime%(Ki+1));i=$i(_n.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,o&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255]));s=32+20+8+16+8+8;if(t.type==="audio"){n=yn(t,s);return $i(_n.traf,r,i,n)}a=hn(t);n=yn(t,a.length+s);return $i(_n.traf,r,i,n,a)};un=function e(t){t.duration=t.duration||4294967295;return $i(_n.trak,ln(t),cn(t))};gn=function e(t){var r=new Uint8Array([0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);if(t.type!=="video"){r[r.length-1]=0}return $i(_n.trex,r)};(function(){var e,t,r;r=function e(t,r){var i=0,n=0,a=0,s=0;if(t.length){if(t[0].duration!==undefined){i=1}if(t[0].size!==undefined){n=2}if(t[0].flags!==undefined){a=4}if(t[0].compositionTimeOffset!==undefined){s=8}}return[0,0,i|n|a|s,1,(t.length&4278190080)>>>24,(t.length&16711680)>>>16,(t.length&65280)>>>8,t.length&255,(r&4278190080)>>>24,(r&16711680)>>>16,(r&65280)>>>8,r&255]};t=function e(t,i){var n,a,s,o;a=t.samples||[];i+=8+12+16*a.length;n=r(a,i);for(o=0;o<a.length;o++){s=a[o];n=n.concat([(s.duration&4278190080)>>>24,(s.duration&16711680)>>>16,(s.duration&65280)>>>8,s.duration&255,(s.size&4278190080)>>>24,(s.size&16711680)>>>16,(s.size&65280)>>>8,s.size&255,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,s.flags.degradationPriority&240<<8,s.flags.degradationPriority&15,(s.compositionTimeOffset&4278190080)>>>24,(s.compositionTimeOffset&16711680)>>>16,(s.compositionTimeOffset&65280)>>>8,s.compositionTimeOffset&255])}return $i(_n.trun,new Uint8Array(n))};e=function e(t,i){var n,a,s,o;a=t.samples||[];i+=8+12+8*a.length;n=r(a,i);for(o=0;o<a.length;o++){s=a[o];n=n.concat([(s.duration&4278190080)>>>24,(s.duration&16711680)>>>16,(s.duration&65280)>>>8,s.duration&255,(s.size&4278190080)>>>24,(s.size&16711680)>>>16,(s.size&65280)>>>8,s.size&255])}return $i(_n.trun,new Uint8Array(n))};yn=function r(i,n){if(i.type==="audio"){return e(i,n)}return t(i,n)}})();var Dn={ftyp:Zi,mdat:en,moof:nn,moov:an,initSegment:function e(t){var r=Zi(),i=an(t),n;n=new Uint8Array(r.byteLength+i.byteLength);n.set(r);n.set(i,r.byteLength);return n}};var Un=function e(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};Un.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};Un.prototype.push=function(e){this.trigger("data",e)};Un.prototype.flush=function(e){this.trigger("done",e)};var Rn=Un;var Mn=function e(t){var r,i,n=[],a=[];n.byteLength=0;for(r=0;r<t.length;r++){i=t[r];if(i.nalUnitType==="access_unit_delimiter_rbsp"){if(n.length){n.duration=i.dts-n.dts;a.push(n)}n=[i];n.byteLength=i.data.byteLength;n.pts=i.pts;n.dts=i.dts}else{if(i.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"){n.keyFrame=true}n.duration=i.dts-n.dts;n.byteLength+=i.data.byteLength;n.push(i)}}if(a.length&&(!n.duration||n.duration<=0)){n.duration=a[a.length-1].duration}a.push(n);return a};var jn=function e(t){var r,i,n=[],a=[];n.byteLength=0;n.nalCount=0;n.duration=0;n.pts=t[0].pts;n.dts=t[0].dts;a.byteLength=0;a.nalCount=0;a.duration=0;a.pts=t[0].pts;a.dts=t[0].dts;for(r=0;r<t.length;r++){i=t[r];if(i.keyFrame){if(n.length){a.push(n);a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration}n=[i];n.nalCount=i.length;n.byteLength=i.byteLength;n.pts=i.pts;n.dts=i.dts;n.duration=i.duration}else{n.duration+=i.duration;n.nalCount+=i.length;n.byteLength+=i.byteLength;n.push(i)}}if(a.length&&n.duration<=0){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration;a.push(n);return a};var Nn=function e(t){var r;if(!t[0][0].keyFrame&&t.length>1){r=t.shift();t.byteLength-=r.byteLength;t.nalCount-=r.nalCount;t[0][0].dts=r.dts;t[0][0].pts=r.pts;t[0][0].duration+=r.duration}return t};var Bn=function e(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}};var Fn=function e(t,r){var i=Bn();i.dataOffset=r;i.compositionTimeOffset=t.pts-t.dts;i.duration=t.duration;i.size=4*t.length;i.size+=t.byteLength;if(t.keyFrame){i.flags.dependsOn=2;i.flags.isNonSyncSample=0}return i};var qn=function e(t,r){var i,n,a,s,o,u=r||0,l=[];for(i=0;i<t.length;i++){s=t[i];for(n=0;n<s.length;n++){o=s[n];a=Fn(o,u);u+=a.size;l.push(a)}}return l};var Vn=function e(t){var r,i,n,a,s,o,u=0,l=t.byteLength,c=t.nalCount,f=l+4*c,d=new Uint8Array(f),h=new DataView(d.buffer);for(r=0;r<t.length;r++){a=t[r];for(i=0;i<a.length;i++){s=a[i];for(n=0;n<s.length;n++){o=s[n];h.setUint32(u,o.data.byteLength);u+=4;d.set(o.data,u);u+=o.data.byteLength}}}return d};var Hn={groupNalsIntoFrames:Mn,groupFramesIntoGops:jn,extendFirstKeyFrame:Nn,generateSampleTable:qn,concatenateNalData:Vn};var zn=[33,16,5,32,164,27];var Wn=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var Gn=function e(t){var r=[];while(t--){r.push(0)}return r};var Yn=function e(t){return Object.keys(t).reduce(function(e,r){e[r]=new Uint8Array(t[r].reduce(function(e,t){return e.concat(t)},[]));return e},{})};var Xn={96000:[zn,[227,64],Gn(154),[56]],88200:[zn,[231],Gn(170),[56]],64000:[zn,[248,192],Gn(240),[56]],48000:[zn,[255,192],Gn(268),[55,148,128],Gn(54),[112]],44100:[zn,[255,192],Gn(268),[55,163,128],Gn(84),[112]],32000:[zn,[255,192],Gn(268),[55,234],Gn(226),[112]],24000:[zn,[255,192],Gn(268),[55,255,128],Gn(268),[111,112],Gn(126),[224]],16000:[zn,[255,192],Gn(268),[55,255,128],Gn(268),[111,255],Gn(269),[223,108],Gn(195),[1,192]],12000:[Wn,Gn(268),[3,127,248],Gn(268),[6,255,240],Gn(268),[13,255,224],Gn(268),[27,253,128],Gn(259),[56]],11025:[Wn,Gn(268),[3,127,248],Gn(268),[6,255,240],Gn(268),[13,255,224],Gn(268),[27,255,192],Gn(268),[55,175,128],Gn(108),[112]],8000:[Wn,Gn(268),[3,121,16],Gn(47),[7]]};var Kn=Yn(Xn);var $n=9e4,Qn,Jn,Zn,ea,ta,ra;Qn=function e(t){return t*$n};Jn=function e(t,r){return t*r};Zn=function e(t){return t/$n};ea=function e(t,r){return t/r};ta=function e(t,r){return Qn(ea(t,r))};ra=function e(t,r){return Jn(Zn(t),r)};var ia={secondsToVideoTs:Qn,secondsToAudioTs:Jn,videoTsToSeconds:Zn,audioTsToSeconds:ea,audioTsToVideoTs:ta,videoTsToAudioTs:ra};var na=9e4;var aa=function e(t){var r,i,n=0;for(r=0;r<t.length;r++){i=t[r];n+=i.data.byteLength}return n};var sa=function e(t,r,i,n){var a,s=0,o=0,u=0,l=0,c,f;if(!r.length){return}a=ia.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate);s=Math.ceil(na/(t.samplerate/1024));if(i&&n){o=a-Math.max(i,n);u=Math.floor(o/s);l=u*s}if(u<1||l>na/2){return}c=Kn[t.samplerate];if(!c){c=r[0].data}for(f=0;f<u;f++){r.splice(f,0,{data:c})}t.baseMediaDecodeTime-=Math.floor(ia.videoTsToAudioTs(l,t.samplerate))};var oa=function e(t,r,i){if(r.minSegmentDts>=i){return t}r.minSegmentDts=Infinity;return t.filter(function(e){if(e.dts>=i){r.minSegmentDts=Math.min(r.minSegmentDts,e.dts);r.minSegmentPts=r.minSegmentDts;return true}return false})};var ua=function e(t){var r,i,n=[];for(r=0;r<t.length;r++){i=t[r];n.push({size:i.data.byteLength,duration:1024})}return n};var la=function e(t){var r,i,n=0,a=new Uint8Array(aa(t));for(r=0;r<t.length;r++){i=t[r];a.set(i.data,n);n+=i.data.byteLength}return a};var ca={prefixWithSilence:sa,trimAdtsFramesByEarliestDts:oa,generateSampleTable:ua,concatenateFrameData:la};var fa=9e4;var da=function e(t,r){if(typeof r.pts==="number"){if(t.timelineStartInfo.pts===undefined){t.timelineStartInfo.pts=r.pts}if(t.minSegmentPts===undefined){t.minSegmentPts=r.pts}else{t.minSegmentPts=Math.min(t.minSegmentPts,r.pts)}if(t.maxSegmentPts===undefined){t.maxSegmentPts=r.pts}else{t.maxSegmentPts=Math.max(t.maxSegmentPts,r.pts)}}if(typeof r.dts==="number"){if(t.timelineStartInfo.dts===undefined){t.timelineStartInfo.dts=r.dts}if(t.minSegmentDts===undefined){t.minSegmentDts=r.dts}else{t.minSegmentDts=Math.min(t.minSegmentDts,r.dts)}if(t.maxSegmentDts===undefined){t.maxSegmentDts=r.dts}else{t.maxSegmentDts=Math.max(t.maxSegmentDts,r.dts)}}};var ha=function e(t){delete t.minSegmentDts;delete t.maxSegmentDts;delete t.minSegmentPts;delete t.maxSegmentPts};var pa=function e(t,r){var i,n,a=t.minSegmentDts;if(!r){a-=t.timelineStartInfo.dts}i=t.timelineStartInfo.baseMediaDecodeTime;i+=a;i=Math.max(0,i);if(t.type==="audio"){n=t.samplerate/fa;i*=n;i=Math.floor(i)}return i};var va={clearDtsInfo:ha,calculateTrackBaseMediaDecodeTime:pa,collectDtsInfo:da};var ma=4,ga=128;var ya=function e(t){var r=0,i={payloadType:-1,payloadSize:0},n=0,a=0;while(r<t.byteLength){if(t[r]===ga){break}while(t[r]===255){n+=255;r++}n+=t[r++];while(t[r]===255){a+=255;r++}a+=t[r++];if(!i.payload&&n===ma){i.payloadType=n;i.payloadSize=a;i.payload=t.subarray(r,r+a);break}r+=a;n=0;a=0}return i};var _a=function e(t){if(t.payload[0]!==181){return null}if((t.payload[1]<<8|t.payload[2])!==49){return null}if(String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])!=="GA94"){return null}if(t.payload[7]!==3){return null}return t.payload.subarray(8,t.payload.length-1)};var ba=function e(t,r){var i=[],n,a,s,o;if(!(r[0]&64)){return i}a=r[0]&31;for(n=0;n<a;n++){s=n*3;o={type:r[s+2]&3,pts:t};if(r[s+2]&4){o.ccData=r[s+3]<<8|r[s+4];i.push(o)}}return i};var Ta=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};var Sa={parseSei:ya,parseUserData:_a,parseCaptionPackets:ba,discardEmulationPreventionBytes:Ta,USER_DATA_REGISTERED_ITU_T_T35:ma};var ka=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new Oa(0,0),new Oa(0,1),new Oa(1,0),new Oa(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("done",this.trigger.bind(this,"done"))},this)};ka.prototype=new Rn;ka.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=Sa.parseSei(e.escapedRBSP);if(t.payloadType!==Sa.USER_DATA_REGISTERED_ITU_T_T35){return}r=Sa.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=Sa.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};ka.prototype.flush=function(){if(!this.captionPackets_.length){this.ccStreams_.forEach(function(e){e.flush()},this);return}this.captionPackets_.forEach(function(e,t){e.presortIndex=t});this.captionPackets_.sort(function(e,t){if(e.pts===t.pts){return e.presortIndex-t.presortIndex}return e.pts-t.pts});this.captionPackets_.forEach(function(e){if(e.type<2){this.dispatchCea608Packet(e)}},this);this.captionPackets_.length=0;this.ccStreams_.forEach(function(e){e.flush()},this);return};ka.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};ka.prototype.dispatchCea608Packet=function(e){if(this.setsTextOrXDSActive(e)){this.activeCea608Channel_[e.type]=null}else if(this.setsChannel1Active(e)){this.activeCea608Channel_[e.type]=0}else if(this.setsChannel2Active(e)){this.activeCea608Channel_[e.type]=1}if(this.activeCea608Channel_[e.type]===null){return}this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)};ka.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};ka.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};ka.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var wa={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496};var Ea=function e(t){if(t===null){return""}t=wa[t]||t;return String.fromCharCode(t)};var Ca=14;var Ia=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var Aa=function e(){var t=[],r=Ca+1;while(r--){t.push("")}return t};var Oa=function e(t,r){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=r||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=Aa()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=Aa()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=Aa()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=Ea(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=Ea(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=Ia.indexOf(t&7968);if(this.mode_==="rollUp"){if(s-this.rollUpRows_+1<0){s=this.rollUpRows_-1}this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=Ea(i);a+=Ea(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};Oa.prototype=new Rn;Oa.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){console.error("Skipping malformed caption.");return""}}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};Oa.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=Aa();this.nonDisplayed_=Aa();this.lastControlCode_=null;this.column_=0;this.row_=Ca;this.rollUpRows_=2;this.formatting_=[]};Oa.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};Oa.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};Oa.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};Oa.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};Oa.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};Oa.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};Oa.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};Oa.prototype.isNormalChar=function(e){return e>=32&&e<=127};Oa.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=Ca;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=Aa();this.displayed_=Aa()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};Oa.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};Oa.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};Oa.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};Oa.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};Oa.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<Ca+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};Oa.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var Pa={CaptionStream:ka,Cea608Stream:Oa};var La={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var xa=8589934592;var Da=4294967296;var Ua=function e(t,r){var i=1;if(t>r){i=-1}while(Math.abs(r-t)>Da){t+=i*xa}return t};var Ra=function e(t){var r,i;e.prototype.init.call(this);this.type_=t;this.push=function(e){if(e.type!==this.type_){return}if(i===undefined){i=e.dts}e.dts=Ua(e.dts,i);e.pts=Ua(e.pts,i);r=e.dts;this.trigger("data",e)};this.flush=function(){i=r;this.trigger("done")};this.discontinuity=function(){i=void 0;r=void 0}};Ra.prototype=new Rn;var Ma={TimestampRolloverStream:Ra,handleRollover:Ua};var ja=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a},Na=function e(t,r,i){return decodeURIComponent(ja(t,r,i))},Ba=function e(t,r,i){return unescape(ja(t,r,i))},Fa=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},qa={TXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=Na(t.data,1,r);t.value=Na(t.data,r+1,t.data.length).replace(/\0*$/,"");break}}t.data=t.value},WXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=Na(t.data,1,r);t.url=Na(t.data,r+1,t.data.length);break}}},PRIV:function e(t){var r;for(r=0;r<t.data.length;r++){if(t.data[r]===0){t.owner=Ba(t.data,0,r);break}}t.privateData=t.data.subarray(r+1);t.data=t.privateData}},Va;Va=function e(t){var r={debug:!!(t&&t.debug),descriptor:t&&t.descriptor},i=0,n=[],a=0,s;Va.prototype.init.call(this);this.dispatchType=La.METADATA_STREAM_TYPE.toString(16);if(r.descriptor){for(s=0;s<r.descriptor.length;s++){this.dispatchType+=("00"+r.descriptor[s].toString(16)).slice(-2)}}this.push=function(e){var t,s,o,u,l,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){a=0;n.length=0}if(n.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(r.debug){console.log("Skipping unrecognized metadata packet")}return}n.push(e);a+=e.data.byteLength;if(n.length===1){i=Fa(e.data.subarray(6,10));i+=10}if(a<i){return}t={data:new Uint8Array(i),frames:[],pts:n[0].pts,dts:n[0].dts};for(l=0;l<i;){t.data.set(n[0].data.subarray(0,i-l),l);l+=n[0].data.byteLength;a-=n[0].data.byteLength;n.shift()}s=10;if(t.data[5]&64){s+=4;s+=Fa(t.data.subarray(10,14));i-=Fa(t.data.subarray(16,20))}do{o=Fa(t.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}c=String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]);u={id:c,data:t.data.subarray(s+10,s+o+10)};u.key=u.id;if(qa[u.id]){qa[u.id](u);if(u.owner==="com.apple.streaming.transportStreamTimestamp"){var f=u.data,d=(f[3]&1)<<30|f[4]<<22|f[5]<<14|f[6]<<6|f[7]>>>2;d*=4;d+=f[7]&3;u.timeStamp=d;if(t.pts===undefined&&t.dts===undefined){t.pts=u.timeStamp;t.dts=u.timeStamp}this.trigger("timestamp",u)}}t.frames.push(u);s+=10;s+=o}while(s<i);this.trigger("data",t)}};Va.prototype=new Rn;var Ha=Va;var za=Ma.TimestampRolloverStream;var Wa,Ga,Ya;var Xa=188,Ka=71;Wa=function e(){var t=new Uint8Array(Xa),r=0;Wa.prototype.init.call(this);this.push=function(e){var i=0,n=Xa,a;if(r){a=new Uint8Array(e.byteLength+r);a.set(t.subarray(0,r));a.set(e,r);r=0}else{a=e}while(n<a.byteLength){if(a[i]===Ka&&a[n]===Ka){this.trigger("data",a.subarray(i,n));i+=Xa;n+=Xa;continue}i++;n++}if(i<a.byteLength){t.set(a.subarray(i),0);r=a.byteLength-i}};this.flush=function(){if(r===Xa&&t[0]===Ka){this.trigger("data",t);r=0}this.trigger("done")}};Wa.prototype=new Rn;Ga=function e(){var t,r,i,n;Ga.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function e(t,n){var a=0;if(n.payloadUnitStartIndicator){a+=t[a]+1}if(n.type==="pat"){r(t.subarray(a),n)}else{i(t.subarray(a),n)}};r=function e(t,r){r.section_number=t[7];r.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];r.pmtPid=n.pmtPid};i=function e(t,r){var i,a,s,o;if(!(t[5]&1)){return}n.programMapTable={video:null,audio:null,"timed-metadata":{}};i=(t[1]&15)<<8|t[2];a=3+i-4;s=(t[10]&15)<<8|t[11];o=12+s;while(o<a){var u=t[o];var l=(t[o+1]&31)<<8|t[o+2];if(u===La.H264_STREAM_TYPE&&n.programMapTable.video===null){n.programMapTable.video=l}else if(u===La.ADTS_STREAM_TYPE&&n.programMapTable.audio===null){n.programMapTable.audio=l}else if(u===La.METADATA_STREAM_TYPE){n.programMapTable["timed-metadata"][l]=u}o+=((t[o+3]&15)<<8|t[o+4])+5}r.programMapTable=n.programMapTable};this.push=function(e){var r={},i=4;r.payloadUnitStartIndicator=!!(e[1]&64);r.pid=e[1]&31;r.pid<<=8;r.pid|=e[2];if((e[3]&48)>>>4>1){i+=e[i]+1}if(r.pid===0){r.type="pat";t(e.subarray(i),r);this.trigger("data",r)}else if(r.pid===this.pmtPid){r.type="pmt";t(e.subarray(i),r);this.trigger("data",r);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([e,i,r])}else{this.processPes_(e,i,r)}};this.processPes_=function(e,t,r){if(r.pid===this.programMapTable.video){r.streamType=La.H264_STREAM_TYPE}else if(r.pid===this.programMapTable.audio){r.streamType=La.ADTS_STREAM_TYPE}else{r.streamType=this.programMapTable["timed-metadata"][r.pid]}r.type="pes";r.data=e.subarray(t);this.trigger("data",r)}};Ga.prototype=new Rn;Ga.STREAM_TYPES={h264:27,adts:15};Ya=function e(){var t=this,r={data:[],size:0},i={data:[],size:0},n={data:[],size:0},a=function e(t,r){var i;r.packetLength=6+(t[4]<<8|t[5]);r.dataAlignmentIndicator=(t[6]&4)!==0;i=t[7];if(i&192){r.pts=(t[9]&14)<<27|(t[10]&255)<<20|(t[11]&254)<<12|(t[12]&255)<<5|(t[13]&254)>>>3;r.pts*=4;r.pts+=(t[13]&6)>>>1;r.dts=r.pts;if(i&64){r.dts=(t[14]&14)<<27|(t[15]&255)<<20|(t[16]&254)<<12|(t[17]&255)<<5|(t[18]&254)>>>3;r.dts*=4;r.dts+=(t[18]&6)>>>1}}r.data=t.subarray(9+t[8])},s=function e(r,i,n){var s=new Uint8Array(r.size),o={type:i},u=0,l=0,c=false,f;if(!r.data.length||r.size<9){return}o.trackId=r.data[0].pid;for(u=0;u<r.data.length;u++){f=r.data[u];s.set(f.data,l);l+=f.data.byteLength}a(s,o);c=i==="video"||o.packetLength<=r.size;if(n||c){r.size=0;r.data.length=0}if(c){t.trigger("data",o)}};Ya.prototype.init.call(this);this.push=function(e){({pat:function e(){},pes:function t(){var a,o;switch(e.streamType){case La.H264_STREAM_TYPE:case La.H264_STREAM_TYPE:a=r;o="video";break;case La.ADTS_STREAM_TYPE:a=i;o="audio";break;case La.METADATA_STREAM_TYPE:a=n;o="timed-metadata";break;default:return}if(e.payloadUnitStartIndicator){s(a,o,true)}a.data.push(e);a.size+=e.data.byteLength},pmt:function r(){var i={type:"metadata",tracks:[]},n=e.programMapTable;if(n.video!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"})}if(n.audio!==null){i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"})}t.trigger("data",i)}})[e.type]()};this.flush=function(){s(r,"video");s(i,"audio");s(n,"timed-metadata");this.trigger("done")}};Ya.prototype=new Rn;var $a={PAT_PID:0,MP2T_PACKET_LENGTH:Xa,TransportPacketStream:Wa,TransportParseStream:Ga,ElementaryStream:Ya,TimestampRolloverStream:za,CaptionStream:Pa.CaptionStream,Cea608Stream:Pa.Cea608Stream,MetadataStream:Ha};for(var Qa in La){if(La.hasOwnProperty(Qa)){$a[Qa]=La[Qa]}}var Ja=$a;var Za;var es=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Za=function e(){var t;Za.prototype.init.call(this);this.push=function(e){var r=0,i=0,n,a,s,o,u,l;if(e.type!=="audio"){return}if(t){o=t;t=new Uint8Array(o.byteLength+e.data.byteLength);t.set(o);t.set(e.data,o.byteLength)}else{t=e.data}while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}a=(~t[r+1]&1)*2;n=(t[r+3]&3)<<11|t[r+4]<<3|(t[r+5]&224)>>5;u=((t[r+6]&3)+1)*1024;l=u*9e4/es[(t[r+2]&60)>>>2];s=r+n;if(t.byteLength<s){return}this.trigger("data",{pts:e.pts+i*l,dts:e.dts+i*l,sampleCount:u,audioobjecttype:(t[r+2]>>>6&3)+1,channelcount:(t[r+2]&1)<<2|(t[r+3]&192)>>>6,samplerate:es[(t[r+2]&60)>>>2],samplingfrequencyindex:(t[r+2]&60)>>>2,samplesize:16,data:t.subarray(r+7+a,s)});if(t.byteLength===s){t=undefined;return}i++;t=t.subarray(s)}};this.flush=function(){this.trigger("done")}};Za.prototype=new Rn;var ts=Za;var rs;rs=function e(t){var r=t.byteLength,i=0,n=0;this.length=function(){return 8*r};this.bitsAvailable=function(){return 8*r+n};this.loadWord=function(){var e=t.byteLength-r,a=new Uint8Array(4),s=Math.min(4,r);if(s===0){throw new Error("no bytes available")}a.set(t.subarray(e,e+s));i=new DataView(a.buffer).getUint32(0);n=s*8;r-=s};this.skipBits=function(e){var t;if(n>e){i<<=e;n-=e}else{e-=n;t=Math.floor(e/8);e-=t*8;r-=t;this.loadWord();i<<=e;n-=e}};this.readBits=function(e){var t=Math.min(n,e),a=i>>>32-t;n-=t;if(n>0){i<<=t}else if(r>0){this.loadWord()}t=e-t;if(t>0){return a<<t|this.readBits(t)}return a};this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e){if((i&2147483648>>>e)!==0){i<<=e;n-=e;return e}}this.loadWord();return e+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1};this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();if(1&e){return 1+e>>>1}return-1*(e>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};var is=rs;var ns,as;var ss;as=function e(){var t=0,r,i;as.prototype.init.call(this);this.push=function(e){var n;if(!i){i=e.data}else{n=new Uint8Array(i.byteLength+e.data.byteLength);n.set(i);n.set(e.data,i.byteLength);i=n}for(;t<i.byteLength-3;t++){if(i[t+2]===1){r=t+5;break}}while(r<i.byteLength){switch(i[r]){case 0:if(i[r-1]!==0){r+=2;break}else if(i[r-2]!==0){r++;break}if(t+3!==r-2){this.trigger("data",i.subarray(t+3,r-2))}do{r++}while(i[r]!==1&&r<i.length);t=r-2;r+=3;break;case 1:if(i[r-1]!==0||i[r-2]!==0){r+=3;break}this.trigger("data",i.subarray(t+3,r-2));t=r-2;r+=3;break;default:r+=3;break}}i=i.subarray(t);r-=t;t=0};this.flush=function(){if(i&&i.byteLength>3){this.trigger("data",i.subarray(t+3))}i=null;t=0;this.trigger("done")}};as.prototype=new Rn;ss={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};ns=function e(){var t=new as,r,i,n,a,s,o,u;ns.prototype.init.call(this);r=this;this.push=function(e){if(e.type!=="video"){return}i=e.trackId;n=e.pts;a=e.dts;t.push(e)};t.on("data",function(e){var t={trackId:i,pts:n,dts:a,data:e};switch(e[0]&31){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp";t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp";t.escapedRBSP=s(e.subarray(1));t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp";break;default:break}r.trigger("data",t)});t.on("done",function(){r.trigger("done")});this.flush=function(){t.flush()};u=function e(t,r){var i=8,n=8,a,s;for(a=0;a<t;a++){if(n!==0){s=r.readExpGolomb();n=(i+s+256)%256}i=n===0?i:n}};s=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};o=function e(t){var r=0,i=0,n=0,a=0,s=1,o,l,c,f,d,h,p,v,m,g,y,_,b,T;o=new is(t);l=o.readUnsignedByte();f=o.readUnsignedByte();c=o.readUnsignedByte();o.skipUnsignedExpGolomb();if(ss[l]){d=o.readUnsignedExpGolomb();if(d===3){o.skipBits(1)}o.skipUnsignedExpGolomb();o.skipUnsignedExpGolomb();o.skipBits(1);if(o.readBoolean()){y=d!==3?8:12;for(T=0;T<y;T++){if(o.readBoolean()){if(T<6){u(16,o)}else{u(64,o)}}}}}o.skipUnsignedExpGolomb();h=o.readUnsignedExpGolomb();if(h===0){o.readUnsignedExpGolomb()}else if(h===1){o.skipBits(1);o.skipExpGolomb();o.skipExpGolomb();p=o.readUnsignedExpGolomb();for(T=0;T<p;T++){o.skipExpGolomb()}}o.skipUnsignedExpGolomb();o.skipBits(1);v=o.readUnsignedExpGolomb();m=o.readUnsignedExpGolomb();g=o.readBits(1);if(g===0){o.skipBits(1)}o.skipBits(1);if(o.readBoolean()){r=o.readUnsignedExpGolomb();i=o.readUnsignedExpGolomb();n=o.readUnsignedExpGolomb();a=o.readUnsignedExpGolomb()}if(o.readBoolean()){if(o.readBoolean()){b=o.readUnsignedByte();switch(b){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[o.readUnsignedByte()<<8|o.readUnsignedByte(),o.readUnsignedByte()<<8|o.readUnsignedByte()];break}}if(_){s=_[0]/_[1]}}}return{profileIdc:l,levelIdc:c,profileCompatibility:f,width:Math.ceil(((v+1)*16-r*2-i*2)*s),height:(2-g)*(m+1)*16-n*2-a*2}}};ns.prototype=new Rn;var os={H264Stream:ns,NalByteStream:as};var us=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var ls=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var cs=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var fs=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var ds=function e(t,r,i){return unescape(fs(t,r,i))};var hs=function e(t,r){var i=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],n=t[r+5],a=(n&16)>>4;if(a){return i+20}return i+10};var ps=function e(t,r){var i=(t[r+5]&224)>>5,n=t[r+4]<<3,a=t[r+3]&3<<11;return a|n|i};var vs=function e(t,r){if(t[r]==="I".charCodeAt(0)&&t[r+1]==="D".charCodeAt(0)&&t[r+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[r]&255===255&&(t[r+1]&240)===240){return"audio"}return null};var ms=function e(t){var r=0;while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}return us[(t[r+2]&60)>>>2]}return null};var gs=function e(t){var r,i,n,a;r=10;if(t[5]&64){r+=4;r+=cs(t.subarray(10,14))}do{i=cs(t.subarray(r+4,r+8));if(i<1){return null}a=String.fromCharCode(t[r],t[r+1],t[r+2],t[r+3]);if(a==="PRIV"){n=t.subarray(r+10,r+i+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=ds(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var u=n.subarray(s+1);var l=(u[3]&1)<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;l*=4;l+=u[7]&3;return l}break}}}r+=10;r+=i}while(r<t.byteLength);return null};var ys={isLikelyAacData:ls,parseId3TagSize:hs,parseAdtsSize:ps,parseType:vs,parseSampleRate:ms,parseAacTimestamp:gs};var _s;_s=function e(){var t=new Uint8Array,r=0;_s.prototype.init.call(this);this.setTimestamp=function(e){r=e};this.push=function(e){var i=0,n=0,a,s,o,u;if(t.length){u=t.length;t=new Uint8Array(e.byteLength+u);t.set(t.subarray(0,u));t.set(e,u)}else{t=e}while(t.length-n>=3){if(t[n]==="I".charCodeAt(0)&&t[n+1]==="D".charCodeAt(0)&&t[n+2]==="3".charCodeAt(0)){if(t.length-n<10){break}i=ys.parseId3TagSize(t,n);if(n+i>t.length){break}s={type:"timed-metadata",data:t.subarray(n,n+i)};this.trigger("data",s);n+=i;continue}else if((t[n]&255)===255&&(t[n+1]&240)===240){if(t.length-n<7){break}i=ys.parseAdtsSize(t,n);if(n+i>t.length){break}o={type:"audio",data:t.subarray(n,n+i),pts:r,dts:r};this.trigger("data",o);n+=i;continue}n++}a=t.length-n;if(a>0){t=t.subarray(n)}else{t=new Uint8Array}}};_s.prototype=new Rn;var bs=_s;var Ts=os.H264Stream;var Ss=ys.isLikelyAacData;var ks=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"];var ws=["width","height","profileIdc","levelIdc","profileCompatibility"];var Es,Cs,Is,As;var Os=function e(t,r){var i;if(t.length!==r.length){return false}for(i=0;i<t.length;i++){if(t[i]!==r[i]){return false}}return true};var Ps=function e(t,r,i,n,a,s){var o=i-r,u=n-r,l=a-i;return{start:{dts:t,pts:t+o},end:{dts:t+u,pts:t+l},prependedContentDuration:s,baseMediaDecodeTime:t}};Cs=function e(t,r){var i=[],n=0,a=0,s=0,o=Infinity;r=r||{};Cs.prototype.init.call(this);this.push=function(e){va.collectDtsInfo(t,e);if(t){ks.forEach(function(r){t[r]=e[r]})}i.push(e)};this.setEarliestDts=function(e){a=e-t.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(e){o=e};this.setAudioAppendStart=function(e){s=e};this.flush=function(){var e,u,l,c;if(i.length===0){this.trigger("done","AudioSegmentStream");return}e=ca.trimAdtsFramesByEarliestDts(i,t,a);t.baseMediaDecodeTime=va.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);ca.prefixWithSilence(t,e,s,o);t.samples=ca.generateSampleTable(e);l=Dn.mdat(ca.concatenateFrameData(e));i=[];u=Dn.moof(n,[t]);c=new Uint8Array(u.byteLength+l.byteLength);n++;c.set(u);c.set(l,u.byteLength);va.clearDtsInfo(t);this.trigger("data",{track:t,boxes:c});this.trigger("done","AudioSegmentStream")}};Cs.prototype=new Rn;Es=function e(t,r){var i=0,n=[],a=[],s,o;r=r||{};Es.prototype.init.call(this);delete t.minPTS;this.gopCache_=[];this.push=function(e){va.collectDtsInfo(t,e);if(e.nalUnitType==="seq_parameter_set_rbsp"&&!s){s=e.config;t.sps=[e.data];ws.forEach(function(e){t[e]=s[e]},this)}if(e.nalUnitType==="pic_parameter_set_rbsp"&&!o){o=e.data;t.pps=[e.data]}n.push(e)};this.flush=function(){var e,s,o,u,l,c,f=0,d,h;while(n.length){if(n[0].nalUnitType==="access_unit_delimiter_rbsp"){break}n.shift()}if(n.length===0){this.resetStream_();this.trigger("done","VideoSegmentStream");return}e=Hn.groupNalsIntoFrames(n);o=Hn.groupFramesIntoGops(e);if(!o[0][0].keyFrame){s=this.getGopForFusion_(n[0],t);if(s){f=s.duration;o.unshift(s);o.byteLength+=s.byteLength;o.nalCount+=s.nalCount;o.pts=s.pts;o.dts=s.dts;o.duration+=s.duration}else{o=Hn.extendFirstKeyFrame(o)}}if(a.length){var p;if(r.alignGopsAtEnd){p=this.alignGopsAtEnd_(o)}else{p=this.alignGopsAtStart_(o)}if(!p){this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}va.clearDtsInfo(t);o=p}va.collectDtsInfo(t,o);t.samples=Hn.generateSampleTable(o);l=Dn.mdat(Hn.concatenateNalData(o));t.baseMediaDecodeTime=va.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}));d=o[0];h=o[o.length-1];this.trigger("segmentTimingInfo",Ps(t.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,f));this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime);this.trigger("timelineStartInfo",t.timelineStartInfo);u=Dn.moof(i,[t]);c=new Uint8Array(u.byteLength+l.byteLength);i++;c.set(u);c.set(l,u.byteLength);this.trigger("data",{track:t,boxes:c});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){va.clearDtsInfo(t);s=undefined;o=undefined};this.getGopForFusion_=function(e){var r=45e3,i=1e4,n=Infinity,a,s,o,u,l;for(l=0;l<this.gopCache_.length;l++){u=this.gopCache_[l];o=u.gop;if(!(t.pps&&Os(t.pps[0],u.pps[0]))||!(t.sps&&Os(t.sps[0],u.sps[0]))){continue}if(o.dts<t.timelineStartInfo.dts){continue}a=e.dts-o.dts-o.duration;if(a>=-i&&a<=r){if(!s||n>a){s=u;n=a}}}if(s){return s.gop}return null};this.alignGopsAtStart_=function(e){var t,r,i,n,s,o,u,l;s=e.byteLength;o=e.nalCount;u=e.duration;t=r=0;while(t<a.length&&r<e.length){i=a[t];n=e[r];if(i.pts===n.pts){break}if(n.pts>i.pts){t++;continue}r++;s-=n.byteLength;o-=n.nalCount;u-=n.duration}if(r===0){return e}if(r===e.length){return null}l=e.slice(r);l.byteLength=s;l.duration=u;l.nalCount=o;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsAtEnd_=function(e){var t,r,i,n,s,o;t=a.length-1;r=e.length-1;s=null;o=false;while(t>=0&&r>=0){i=a[t];n=e[r];if(i.pts===n.pts){o=true;break}if(i.pts>n.pts){t--;continue}if(t===a.length-1){s=r}r--}if(!o&&s===null){return null}var u;if(o){u=r}else{u=s}if(u===0){return e}var l=e.slice(u);var c=l.reduce(function(e,t){e.byteLength+=t.byteLength;e.duration+=t.duration;e.nalCount+=t.nalCount;return e},{byteLength:0,duration:0,nalCount:0});l.byteLength=c.byteLength;l.duration=c.duration;l.nalCount=c.nalCount;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsWith=function(e){a=e}};Es.prototype=new Rn;As=function e(t,r){this.numberOfTracks=0;this.metadataStream=r;t=t||{};if(typeof t.remux!=="undefined"){this.remuxTracks=!!t.remux}else{this.remuxTracks=true}if(typeof t.keepOriginalTimestamps==="boolean"){this.keepOriginalTimestamps=t.keepOriginalTimestamps}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;As.prototype.init.call(this);this.push=function(e){if(e.text){return this.pendingCaptions.push(e)}if(e.frames){return this.pendingMetadata.push(e)}this.pendingTracks.push(e.track);this.pendingBoxes.push(e.boxes);this.pendingBytes+=e.boxes.byteLength;if(e.track.type==="video"){this.videoTrack=e.track}if(e.track.type==="audio"){this.audioTrack=e.track}}};As.prototype=new Rn;As.prototype.flush=function(e){var t=0,r={captions:[],captionStreams:{},metadata:[],info:{}},i,n,a,s=0,o;if(this.pendingTracks.length<this.numberOfTracks){if(e!=="VideoSegmentStream"&&e!=="AudioSegmentStream"){return}else if(this.remuxTracks){return}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}return}}if(this.videoTrack){s=this.videoTrack.timelineStartInfo.pts;ws.forEach(function(e){r.info[e]=this.videoTrack[e]},this)}else if(this.audioTrack){s=this.audioTrack.timelineStartInfo.pts;ks.forEach(function(e){r.info[e]=this.audioTrack[e]},this)}if(this.pendingTracks.length===1){r.type=this.pendingTracks[0].type}else{r.type="combined"}this.emittedTracks+=this.pendingTracks.length;a=Dn.initSegment(this.pendingTracks);r.initSegment=new Uint8Array(a.byteLength);r.initSegment.set(a);r.data=new Uint8Array(this.pendingBytes);for(o=0;o<this.pendingBoxes.length;o++){r.data.set(this.pendingBoxes[o],t);t+=this.pendingBoxes[o].byteLength}for(o=0;o<this.pendingCaptions.length;o++){i=this.pendingCaptions[o];i.startTime=i.startPts;if(!this.keepOriginalTimestamps){i.startTime-=s}i.startTime/=9e4;i.endTime=i.endPts;if(!this.keepOriginalTimestamps){i.endTime-=s}i.endTime/=9e4;r.captionStreams[i.stream]=true;r.captions.push(i)}for(o=0;o<this.pendingMetadata.length;o++){n=this.pendingMetadata[o];n.cueTime=n.pts;if(!this.keepOriginalTimestamps){n.cueTime-=s}n.cueTime/=9e4;r.metadata.push(n)}r.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger("data",r);if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}};Is=function e(t){var r=this,i=true,n,a;Is.prototype.init.call(this);t=t||{};this.baseMediaDecodeTime=t.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="aac";e.metadataStream=new Ja.MetadataStream;e.aacStream=new bs;e.audioTimestampRolloverStream=new Ja.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new Ja.TimestampRolloverStream("timed-metadata");e.adtsStream=new ts;e.coalesceStream=new As(t,e.metadataStream);e.headOfPipeline=e.aacStream;e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)});e.aacStream.on("data",function(i){if(i.type==="timed-metadata"&&!e.audioSegmentStream){a=a||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"};e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Cs(a,t);e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="ts";e.metadataStream=new Ja.MetadataStream;e.packetStream=new Ja.TransportPacketStream;e.parseStream=new Ja.TransportParseStream;e.elementaryStream=new Ja.ElementaryStream;e.videoTimestampRolloverStream=new Ja.TimestampRolloverStream("video");e.audioTimestampRolloverStream=new Ja.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new Ja.TimestampRolloverStream("timed-metadata");e.adtsStream=new ts;e.h264Stream=new Ts;e.captionStream=new Ja.CaptionStream;e.coalesceStream=new As(t,e.metadataStream);e.headOfPipeline=e.packetStream;e.packetStream.pipe(e.parseStream).pipe(e.elementaryStream);e.elementaryStream.pipe(e.videoTimestampRolloverStream).pipe(e.h264Stream);e.elementaryStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.elementaryStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.h264Stream.pipe(e.captionStream).pipe(e.coalesceStream);e.elementaryStream.on("data",function(i){var s;if(i.type==="metadata"){s=i.tracks.length;while(s--){if(!n&&i.tracks[s].type==="video"){n=i.tracks[s];n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}else if(!a&&i.tracks[s].type==="audio"){a=i.tracks[s];a.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}}if(n&&!e.videoSegmentStream){e.coalesceStream.numberOfTracks++;e.videoSegmentStream=new Es(n,t);e.videoSegmentStream.on("timelineStartInfo",function(t){if(a){a.timelineStartInfo=t;e.audioSegmentStream.setEarliestDts(t.dts)}});e.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo"));e.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo"));e.videoSegmentStream.on("baseMediaDecodeTime",function(t){if(a){e.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}});e.h264Stream.pipe(e.videoSegmentStream).pipe(e.coalesceStream)}if(a&&!e.audioSegmentStream){e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Cs(a,t);e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(e){var r=this.transmuxPipeline_;if(!t.keepOriginalTimestamps){this.baseMediaDecodeTime=e}if(a){a.timelineStartInfo.dts=undefined;a.timelineStartInfo.pts=undefined;va.clearDtsInfo(a);if(!t.keepOriginalTimestamps){a.timelineStartInfo.baseMediaDecodeTime=e}if(r.audioTimestampRolloverStream){r.audioTimestampRolloverStream.discontinuity()}}if(n){if(r.videoSegmentStream){r.videoSegmentStream.gopCache_=[];r.videoTimestampRolloverStream.discontinuity()}n.timelineStartInfo.dts=undefined;n.timelineStartInfo.pts=undefined;va.clearDtsInfo(n);r.captionStream.reset();if(!t.keepOriginalTimestamps){n.timelineStartInfo.baseMediaDecodeTime=e}}if(r.timedMetadataTimestampRolloverStream){r.timedMetadataTimestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(e){if(a){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)}};this.alignGopsWith=function(e){if(n&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)}};this.push=function(e){if(i){var t=Ss(e);if(t&&this.transmuxPipeline_.type!=="aac"){this.setupAacPipeline()}else if(!t&&this.transmuxPipeline_.type!=="ts"){this.setupTsPipeline()}i=false}this.transmuxPipeline_.headOfPipeline.push(e)};this.flush=function(){i=true;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset()}}};Is.prototype=new Rn;var Ls={Transmuxer:Is,VideoSegmentStream:Es,AudioSegmentStream:Cs,AUDIO_PROPERTIES:ks,VIDEO_PROPERTIES:ws,generateVideoSegmentTimingInfo:Ps};var xs=Sa.discardEmulationPreventionBytes;var Ds=Pa.CaptionStream;var Us=function e(t,r){var i=t;for(var n=0;n<r.length;n++){var a=r[n];if(i<a.size){return a}i-=a.size}return null};var Rs=function e(t,r,i){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=[],s,o,u,l;for(o=0;o+4<t.length;o+=u){u=n.getUint32(o);o+=4;if(u<=0){continue}switch(t[o]&31){case 6:var c=t.subarray(o+1,o+1+u);var f=Us(o,r);s={nalUnitType:"sei_rbsp",size:u,data:c,escapedRBSP:xs(c),trackId:i};if(f){s.pts=f.pts;s.dts=f.dts;l=f}else{s.pts=l.pts;s.dts=l.dts}a.push(s);break;default:break}}return a};var Ms=function e(t,r,i){var n=r;var a=i.defaultSampleDuration||0;var s=i.defaultSampleSize||0;var o=i.trackId;var u=[];t.forEach(function(e){var t=hi.parseTrun(e);var r=t.samples;r.forEach(function(e){if(e.duration===undefined){e.duration=a}if(e.size===undefined){e.size=s}e.trackId=o;e.dts=n;if(e.compositionTimeOffset===undefined){e.compositionTimeOffset=0}e.pts=n+e.compositionTimeOffset;n+=e.duration});u=u.concat(r)});return u};var js=function e(t,r){var i=ai.findBox(t,["moof","traf"]);var n=ai.findBox(t,["mdat"]);var a={};var s=[];n.forEach(function(e,t){var r=i[t];s.push({mdat:e,traf:r})});s.forEach(function(e){var t=e.mdat;var i=e.traf;var n=ai.findBox(i,["tfhd"]);var s=hi.parseTfhd(n[0]);var o=s.trackId;var u=ai.findBox(i,["tfdt"]);var l=u.length>0?hi.parseTfdt(u[0]).baseMediaDecodeTime:0;var c=ai.findBox(i,["trun"]);var f;var d;if(r===o&&c.length>0){f=Ms(c,l,s);d=Rs(t,f,o);if(!a[o]){a[o]=[]}a[o]=a[o].concat(d)}});return a};var Ns=function e(t,r,i){var n;if(!r){return null}n=js(t,r);return{seiNals:n[r],timescale:i}};var Bs=function e(){var t=false;var r;var i;var n;var a;var s;this.isInitialized=function(){return t};this.init=function(){r=new Ds;t=true;r.on("data",function(e){e.startTime=e.startPts/a;e.endTime=e.endPts/a;s.captions.push(e);s.captionStreams[e.stream]=true})};this.isNewInit=function(e,t){if(e&&e.length===0||t&&typeof t==="object"&&Object.keys(t).length===0){return false}return n!==e[0]||a!==t[n]};this.parse=function(e,t,r){var o;if(!this.isInitialized()){return null}else if(!t||!r){return null}else if(this.isNewInit(t,r)){n=t[0];a=r[n]}else if(!n||!a){i.push(e);return null}while(i.length>0){var u=i.shift();this.parse(u,t,r)}o=Ns(e,n,a);if(o===null||!o.seiNals){return null}this.pushNals(o.seiNals);this.flushStream();return s};this.pushNals=function(e){if(!this.isInitialized()||!e||e.length===0){return null}e.forEach(function(e){r.push(e)})};this.flushStream=function(){if(!this.isInitialized()){return null}r.flush()};this.clearParsedCaptions=function(){s.captions=[];s.captionStreams={}};this.resetCaptionStream=function(){if(!this.isInitialized()){return null}r.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){i=[];n=null;a=null;if(!s){s={captions:[],captionStreams:{}}}else{this.clearParsedCaptions()}this.resetCaptionStream()};this.reset()};var Fs=Bs;var qs={generator:Dn,probe:ai,Transmuxer:Ls.Transmuxer,AudioSegmentStream:Ls.AudioSegmentStream,VideoSegmentStream:Ls.VideoSegmentStream,CaptionParser:Fs};var Vs=qs.CaptionParser;var Hs=500;var zs=function e(t,r,i){if(!t||!r){return false}var n=t.segments;var a=i===n.length;return t.endList&&r.readyState==="open"&&a};var Ws=function e(t){return typeof t==="number"&&isFinite(t)};var Gs=function e(t,r,i){if(t!=="main"||!r||!i){return null}if(!i.containsAudio&&!i.containsVideo){return"Neither audio nor video found in segment."}if(r.containsVideo&&!i.containsVideo){return"Only audio found in segment when we expected video."+" We can't switch to audio only from a stream that had video."+" To get rid of this message, please add codec information to the manifest."}if(!r.containsVideo&&i.containsVideo){return"Video found in segment when we expected only audio."+" We can't switch to a stream with video from an audio only stream."+" To get rid of this message, please add codec information to the manifest."}return null};var Ys=function e(t,r,i){var n=void 0;if(t.length&&t.start(0)>0&&t.start(0)<r){n=t.start(0)}else{n=r-30}return Math.min(n,r-i)};var Xs=function e(t){var r=t.segment,i=r.start,n=r.end,a=t.playlist,s=a.mediaSequence,o=a.id,u=a.segments,l=u===undefined?[]:u,c=t.mediaIndex,f=t.timeline;return["appending ["+c+"] of ["+s+", "+(s+l.length)+"] from playlist ["+o+"]","["+i+" => "+n+"] in timeline ["+f+"]"].join(" ")};var Ks=function(e){O(t,e);function t(e){C(this,t);var r=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(!e){throw new TypeError("Initialization settings are required")}if(typeof e.currentTime!=="function"){throw new TypeError("No currentTime getter specified")}if(!e.mediaSource){throw new TypeError("No MediaSource specified")}r.bandwidth=e.bandwidth;r.throughput={rate:0,count:0};r.roundTrip=NaN;r.resetStats_();r.mediaIndex=null;r.hasPlayed_=e.hasPlayed;r.currentTime_=e.currentTime;r.seekable_=e.seekable;r.seeking_=e.seeking;r.duration_=e.duration;r.mediaSource_=e.mediaSource;r.hls_=e.hls;r.loaderType_=e.loaderType;r.startingMedia_=void 0;r.segmentMetadataTrack_=e.segmentMetadataTrack;r.goalBufferLength_=e.goalBufferLength;r.sourceType_=e.sourceType;r.inbandTextTracks_=e.inbandTextTracks;r.state_="INIT";r.checkBufferTimeout_=null;r.error_=void 0;r.currentTimeline_=-1;r.pendingSegment_=null;r.mimeType_=null;r.sourceUpdater_=null;r.xhrOptions_=null;r.activeInitSegmentId_=null;r.initSegments_={};r.cacheEncryptionKeys_=e.cacheEncryptionKeys;r.keyCache_={};if(r.loaderType_==="main"){r.captionParser_=new Vs}else{r.captionParser_=null}r.decrypter_=e.decrypter;r.syncController_=e.syncController;r.syncPoint_={segmentIndex:0,time:0};r.syncController_.on("syncinfoupdate",function(){return r.trigger("syncinfoupdate")});r.mediaSource_.addEventListener("sourceopen",function(){return r.ended_=false});r.fetchAtBuffer_=false;r.logger_=ki("SegmentLoader["+r.loaderType_+"]");Object.defineProperty(r,"state",{get:function e(){return this.state_},set:function e(t){if(t!==this.state_){this.logger_(this.state_+" -> "+t);this.state_=t}}});return r}I(t,[{key:"resetStats_",value:function e(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0}},{key:"dispose",value:function e(){this.state="DISPOSED";this.pause();this.abort_();if(this.sourceUpdater_){this.sourceUpdater_.dispose()}this.resetStats_();if(this.captionParser_){this.captionParser_.reset()}}},{key:"abort",value:function e(){if(this.state!=="WAITING"){if(this.pendingSegment_){this.pendingSegment_=null}return}this.abort_();this.state="READY";if(!this.paused()){this.monitorBuffer_()}}},{key:"abort_",value:function e(){if(this.pendingSegment_){this.pendingSegment_.abortRequests()}this.pendingSegment_=null}},{key:"error",value:function e(t){if(typeof t!=="undefined"){this.error_=t}this.pendingSegment_=null;return this.error_}},{key:"endOfStream",value:function e(){this.ended_=true;this.pause();this.trigger("ended")}},{key:"buffered_",value:function e(){if(!this.sourceUpdater_){return i.createTimeRanges()}return this.sourceUpdater_.buffered()}},{key:"initSegment",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Re(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,timescales:t.timescales,videoTrackIds:t.videoTrackIds}}return n||t}},{key:"segmentKey",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Me(t);var n=this.keyCache_[i];if(this.cacheEncryptionKeys_&&r&&!n&&t.bytes){this.keyCache_[i]=n={resolvedUri:t.resolvedUri,bytes:t.bytes}}var a={resolvedUri:(n||t).resolvedUri};if(n){a.bytes=n.bytes}return a}},{key:"couldBeginLoading_",value:function e(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state==="INIT")&&!this.paused()}},{key:"load",value:function e(){this.monitorBuffer_();if(!this.playlist_){return}this.syncController_.setDateTimeMapping(this.playlist_);if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"){return}this.state="READY"}},{key:"init_",value:function e(){this.state="READY";this.sourceUpdater_=new Ei(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_);this.resetEverything();return this.monitorBuffer_()}},{key:"playlist",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!t){return}var i=this.playlist_;var n=this.pendingSegment_;this.playlist_=t;this.xhrOptions_=r;if(!this.hasPlayed_()){t.syncInfo={mediaSequence:t.mediaSequence,time:0}}var a=null;if(i){if(i.id){a=i.id}else if(i.uri){a=i.uri}}this.logger_("playlist update ["+a+" => "+(t.id||t.uri)+"]");this.trigger("syncinfoupdate");if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!i||i.uri!==t.uri){if(this.mediaIndex!==null){this.resyncLoader()}return}var s=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+s+"]");if(this.mediaIndex!==null){this.mediaIndex-=s}if(n){n.mediaIndex-=s;if(n.mediaIndex>=0){n.segment=t.segments[n.mediaIndex]}}this.syncController_.saveExpiredSegmentInfo(i,t)}},{key:"pause",value:function e(){if(this.checkBufferTimeout_){p.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null}}},{key:"paused",value:function e(){return this.checkBufferTimeout_===null}},{key:"mimeType",value:function e(t,r){if(this.mimeType_){return}this.mimeType_=t;this.sourceBufferEmitter_=r;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}}},{key:"resetEverything",value:function e(t){this.ended_=false;this.resetLoader();this.remove(0,this.duration_(),t);if(this.captionParser_){this.captionParser_.clearAllCaptions()}this.trigger("reseteverything")}},{key:"resetLoader",value:function e(){this.fetchAtBuffer_=false;this.resyncLoader()}},{key:"resyncLoader",value:function e(){this.mediaIndex=null;this.syncPoint_=null;this.abort()}},{key:"remove",value:function e(t,r,i){if(this.sourceUpdater_){this.sourceUpdater_.remove(t,r,i)}st(t,r,this.segmentMetadataTrack_);if(this.inbandTextTracks_){for(var n in this.inbandTextTracks_){st(t,r,this.inbandTextTracks_[n])}}}},{key:"monitorBuffer_",value:function e(){if(this.checkBufferTimeout_){p.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=p.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function e(){if(this.state==="READY"){this.fillBuffer_()}if(this.checkBufferTimeout_){p.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=p.setTimeout(this.monitorBufferTick_.bind(this),Hs)}},{key:"fillBuffer_",value:function e(){if(this.sourceUpdater_.updating()){return}if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(!t){return}if(this.isEndOfStream_(t.mediaIndex)){this.endOfStream();return}if(t.mediaIndex===this.playlist_.segments.length-1&&this.mediaSource_.readyState==="ended"&&!this.seeking_()){return}if(t.timeline!==this.currentTimeline_){this.syncController_.reset();t.timestampOffset=t.startOfSegment;if(this.captionParser_){this.captionParser_.clearAllCaptions()}}this.loadSegment_(t)}},{key:"isEndOfStream_",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.playlist_;return zs(r,this.mediaSource_,t)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function e(t,r,i,n,a,s){var o=0;var u=void 0;if(t.length){o=t.end(t.length-1)}var l=Math.max(0,o-a);if(!r.segments.length){return null}if(l>=this.goalBufferLength_()){return null}if(!n&&l>=1){return null}if(s===null){i=this.getSyncSegmentCandidate_(r);return this.generateSegmentInfo_(r,i,null,true)}if(i!==null){var c=r.segments[i];if(c&&c.end){u=c.end}else{u=o}return this.generateSegmentInfo_(r,i+1,u,false)}if(this.fetchAtBuffer_){var f=de.getMediaInfoForTime(r,o,s.segmentIndex,s.time);i=f.mediaIndex;u=f.startTime}else{var d=de.getMediaInfoForTime(r,a,s.segmentIndex,s.time);i=d.mediaIndex;u=d.startTime}return this.generateSegmentInfo_(r,i,u,false)}},{key:"getSyncSegmentCandidate_",value:function e(t){var r=this;if(this.currentTimeline_===-1){return 0}var i=t.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===r.currentTimeline_});if(i.length){return i[Math.min(i.length-1,1)].segmentIndex}return Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function e(t,r,i,n){if(r<0||r>=t.segments.length){return null}var a=t.segments[r];return{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:r,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a}}},{key:"abortRequestEarly_",value:function e(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH){return false}if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3){return false}var r=this.currentTime_();var i=t.bandwidth;var n=this.pendingSegment_.duration;var a=de.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived);var s=it(this.buffered_(),r,this.hls_.tech_.playbackRate())-1;if(a<=s){return false}var o=Wi({master:this.hls_.playlists.master,currentTime:r,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o){return}var u=a-s;var l=u-o.rebufferingImpact;var c=.5;if(s<=$e){c=1}if(!o.playlist||o.playlist.uri===this.playlist_.uri||l<c){return false}this.bandwidth=o.playlist.attributes.BANDWIDTH*Ci.BANDWIDTH_VARIANCE+1;this.abort();this.trigger("earlyabort");return true}},{key:"handleProgress_",value:function e(t,r){if(!this.pendingSegment_||r.requestId!==this.pendingSegment_.requestId||this.abortRequestEarly_(r.stats)){return}this.trigger("progress")}},{key:"loadSegment_",value:function e(t){this.state="WAITING";this.pendingSegment_=t;this.trimBackBuffer_(t);t.abortRequests=Ni(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function e(t){var r=Ys(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);if(r>0){this.remove(0,r)}}},{key:"createSimplifiedSegmentObj_",value:function e(t){var r=t.segment;var i={resolvedUri:r.resolvedUri,byterange:r.byterange,requestId:t.requestId};if(r.key){var n=r.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key=this.segmentKey(r.key);i.key.iv=n}if(r.map){i.map=this.initSegment(r.map)}return i}},{key:"segmentRequestFinished_",value:function e(t,r){this.mediaRequests+=1;if(r.stats){this.mediaBytesTransferred+=r.stats.bytesReceived;this.mediaTransferDuration+=r.stats.roundTripTime}if(!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(r.requestId!==this.pendingSegment_.requestId){return}if(t){this.pendingSegment_=null;this.state="READY";if(t.code===Ii.ABORTED){this.mediaRequestsAborted+=1;return}this.pause();if(t.code===Ii.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");return}this.mediaRequestsErrored+=1;this.error(t);this.trigger("error");return}this.bandwidth=r.stats.bandwidth;this.roundTrip=r.stats.roundTripTime;if(r.map){r.map=this.initSegment(r.map,true)}if(r.key){this.segmentKey(r.key,true)}this.processSegmentResponse_(r)}},{key:"processSegmentResponse_",value:function e(t){var r=this.pendingSegment_;r.bytes=t.bytes;if(t.map){r.segment.map.bytes=t.map.bytes}r.endOfAllRequests=t.endOfAllRequests;if(t.fmp4Captions){Yi(this.inbandTextTracks_,this.hls_.tech_,t.captionStreams);Xi({inbandTextTracks:this.inbandTextTracks_,captionArray:t.fmp4Captions,timestampOffset:0});if(this.captionParser_){this.captionParser_.clearParsedCaptions()}}this.handleSegment_()}},{key:"handleSegment_",value:function e(){var t=this;if(!this.pendingSegment_){this.state="READY";return}var r=this.pendingSegment_;var i=r.segment;var n=this.syncController_.probeSegmentInfo(r);if(typeof this.startingMedia_==="undefined"&&n&&(n.containsAudio||n.containsVideo)){this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo}}var a=Gs(this.loaderType_,this.startingMedia_,n);if(a){this.error({message:a,blacklistDuration:Infinity});this.trigger("error");return}if(r.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}if(r.timestampOffset!==null&&r.timestampOffset!==this.sourceUpdater_.timestampOffset()){this.sourceUpdater_.timestampOffset(r.timestampOffset);this.trigger("timestampoffset")}var s=this.syncController_.mappingForTimeline(r.timeline);if(s!==null){this.trigger({type:"segmenttimemapping",mapping:s})}this.state="APPENDING";if(i.map){var o=Re(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==o){var u=this.initSegment(i.map);this.sourceUpdater_.appendBuffer({bytes:u.bytes},function(){t.activeInitSegmentId_=o})}}r.byteLength=r.bytes.byteLength;if(typeof i.start==="number"&&typeof i.end==="number"){this.mediaSecondsLoaded+=i.end-i.start}else{this.mediaSecondsLoaded+=i.duration}this.logger_(Xs(r));this.sourceUpdater_.appendBuffer({bytes:r.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,r.requestId)},this.handleUpdateEnd_.bind(this))}},{key:"handleVideoSegmentTimingInfo_",value:function e(t,r){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId){return}var i=this.pendingSegment_.segment;if(!i.videoTimingInfo){i.videoTimingInfo={}}i.videoTimingInfo.transmuxerPrependedSeconds=r.videoSegmentTimingInfo.prependedContentDuration||0;i.videoTimingInfo.transmuxedPresentationStart=r.videoSegmentTimingInfo.start.presentation;i.videoTimingInfo.transmuxedPresentationEnd=r.videoSegmentTimingInfo.end.presentation;i.videoTimingInfo.baseMediaDecodeTime=r.videoSegmentTimingInfo.baseMediaDecodeTime}},{key:"handleUpdateEnd_",value:function e(){if(!this.pendingSegment_){this.state="READY";if(!this.paused()){this.monitorBuffer_()}return}var t=this.pendingSegment_;var r=t.segment;var i=this.mediaIndex!==null;this.pendingSegment_=null;this.recordThroughput_(t);this.addSegmentMetadataCue_(t);this.state="READY";this.mediaIndex=t.mediaIndex;this.fetchAtBuffer_=true;this.currentTimeline_=t.timeline;this.trigger("syncinfoupdate");if(r.end&&this.currentTime_()-r.end>t.playlist.targetDuration*3){this.resetEverything();return}if(i){this.trigger("bandwidthupdate")}this.trigger("progress");if(this.isEndOfStream_(t.mediaIndex+1,t.playlist)){this.endOfStream()}if(!this.paused()){this.monitorBuffer_()}}},{key:"recordThroughput_",value:function e(t){var r=this.throughput.rate;var i=Date.now()-t.endOfAllRequests+1;var n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-r)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function e(t){if(!this.segmentMetadataTrack_){return}var r=t.segment;var i=r.start;var n=r.end;if(!Ws(i)||!Ws(n)){return}st(i,n,this.segmentMetadataTrack_);var a=p.WebKitDataCue||p.VTTCue;var s={custom:r.custom,dateTimeObject:r.dateTimeObject,dateTimeString:r.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:n};var o=JSON.stringify(s);var u=new a(i,n,o);u.value=s;this.segmentMetadataTrack_.addCue(u)}}]);return t}(i.EventTarget);var $s=function e(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))};var Qs=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)}));var Js=function(e){O(t,e);function t(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};C(this,t);var i=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));i.mediaSource_=null;i.subtitlesTrack_=null;return i}I(t,[{key:"buffered_",value:function e(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length){return i.createTimeRanges()}var t=this.subtitlesTrack_.cues;var r=t[0].startTime;var n=t[t.length-1].startTime;return i.createTimeRanges([[r,n]])}},{key:"initSegment",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var i=Re(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){var a=Qs.byteLength+t.bytes.byteLength;var s=new Uint8Array(a);s.set(t.bytes);s.set(Qs,t.bytes.byteLength);this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:s}}return n||t}},{key:"couldBeginLoading_",value:function e(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function e(){this.state="READY";this.resetEverything();return this.monitorBuffer_()}},{key:"track",value:function e(t){if(typeof t==="undefined"){return this.subtitlesTrack_}this.subtitlesTrack_=t;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}return this.subtitlesTrack_}},{key:"remove",value:function e(t,r){st(t,r,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function e(){var t=this;if(!this.syncPoint_){this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())}var r=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);r=this.skipEmptySegments_(r);if(!r){return}if(this.syncController_.timestampOffsetForTimeline(r.timeline)===null){var i=function e(){t.state="READY";if(!t.paused()){t.monitorBuffer_()}};this.syncController_.one("timestampoffset",i);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(r)}},{key:"skipEmptySegments_",value:function e(t){while(t&&t.segment.empty){t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest)}return t}},{key:"handleSegment_",value:function e(){var t=this;if(!this.pendingSegment_||!this.subtitlesTrack_){this.state="READY";return}this.state="APPENDING";var r=this.pendingSegment_;var i=r.segment;if(typeof p.WebVTT!=="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=void 0;var a=function e(){t.subtitlesTrack_.tech_.off("vttjsloaded",n);t.error({message:"Error loading vtt.js"});t.state="READY";t.pause();t.trigger("error")};n=function e(){t.subtitlesTrack_.tech_.off("vttjserror",a);t.handleSegment_()};this.state="WAITING_ON_VTTJS";this.subtitlesTrack_.tech_.one("vttjsloaded",n);this.subtitlesTrack_.tech_.one("vttjserror",a);return}i.requested=true;try{this.parseVTTCues_(r)}catch(e){this.error({message:e.message});this.state="READY";this.pause();return this.trigger("error")}this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_);if(r.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}r.byteLength=r.bytes.byteLength;this.mediaSecondsLoaded+=i.duration;if(r.cues.length){this.remove(r.cues[0].endTime,r.cues[r.cues.length-1].endTime)}r.cues.forEach(function(e){t.subtitlesTrack_.addCue(e)});this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function e(t){var r=void 0;var n=false;if(typeof p.TextDecoder==="function"){r=new p.TextDecoder("utf8")}else{r=p.WebVTT.StringDecoder();n=true}var a=new p.WebVTT.Parser(p,p.vttjs,r);t.cues=[];t.timestampmap={MPEGTS:0,LOCAL:0};a.oncue=t.cues.push.bind(t.cues);a.ontimestampmap=function(e){return t.timestampmap=e};a.onparsingerror=function(e){i.log.warn("Error encountered when parsing cues: "+e.message)};if(t.segment.map){var s=t.segment.map.bytes;if(n){s=$s(s)}a.parse(s)}var o=t.bytes;if(n){o=$s(o)}a.parse(o);a.flush()}},{key:"updateTimeMapping_",value:function e(t,r,i){var n=t.segment;if(!r){return}if(!t.cues.length){n.empty=true;return}var a=t.timestampmap;var s=a.MPEGTS/9e4-a.LOCAL+r.mapping;t.cues.forEach(function(e){e.startTime+=s;e.endTime+=s});if(!i.syncInfo){var o=t.cues[0].startTime;var u=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(o,u-n.duration)}}}}]);return t}(Ks);var Zs=function e(t,r){var i=t.cues;for(var n=0;n<i.length;n++){var a=i[n];if(r>=a.adStartTime&&r<=a.adEndTime){return a}}return null};var eo=function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!t.segments){return}var n=i;var a=void 0;for(var s=0;s<t.segments.length;s++){var o=t.segments[s];if(!a){a=Zs(r,n+o.duration/2)}if(a){if("cueIn"in o){a.endTime=n;a.adEndTime=n;n+=o.duration;a=null;continue}if(n<a.endTime){n+=o.duration;continue}a.endTime+=o.duration}else{if("cueOut"in o){a=new p.VTTCue(n,n+o.duration,o.cueOut);a.adStartTime=n;a.adEndTime=n+parseFloat(o.cueOut);r.addCue(a)}if("cueOutCont"in o){var u=void 0;var l=void 0;var c=o.cueOutCont.split("/").map(parseFloat);var f=L(c,2);u=f[0];l=f[1];a=new p.VTTCue(n,n+o.duration,"");a.adStartTime=n-u;a.adEndTime=a.adStartTime+l;r.addCue(a)}}n+=o.duration}};var to=function e(t){var r=t[1]&31;r<<=8;r|=t[2];return r};var ro=function e(t){return!!(t[1]&64)};var io=function e(t){var r=0;if((t[3]&48)>>>4>1){r+=t[4]+1}return r};var no=function e(t,r){var i=to(t);if(i===0){return"pat"}else if(i===r){return"pmt"}else if(r){return"pes"}return null};var ao=function e(t){var r=ro(t);var i=4+io(t);if(r){i+=t[i]+1}return(t[i+10]&31)<<8|t[i+11]};var so=function e(t){var r={};var i=ro(t);var n=4+io(t);if(i){n+=t[n]+1}if(!(t[n+5]&1)){return}var a,s,o;a=(t[n+1]&15)<<8|t[n+2];s=3+a-4;o=(t[n+10]&15)<<8|t[n+11];var u=12+o;while(u<s){var l=n+u;r[(t[l+1]&31)<<8|t[l+2]]=t[l];u+=((t[l+3]&15)<<8|t[l+4])+5}return r};var oo=function e(t,r){var i=to(t);var n=r[i];switch(n){case La.H264_STREAM_TYPE:return"video";case La.ADTS_STREAM_TYPE:return"audio";case La.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}};var uo=function e(t){var r=ro(t);if(!r){return null}var i=4+io(t);if(i>=t.byteLength){return null}var n=null;var a;a=t[i+7];if(a&192){n={};n.pts=(t[i+9]&14)<<27|(t[i+10]&255)<<20|(t[i+11]&254)<<12|(t[i+12]&255)<<5|(t[i+13]&254)>>>3;n.pts*=4;n.pts+=(t[i+13]&6)>>>1;n.dts=n.pts;if(a&64){n.dts=(t[i+14]&14)<<27|(t[i+15]&255)<<20|(t[i+16]&254)<<12|(t[i+17]&255)<<5|(t[i+18]&254)>>>3;n.dts*=4;n.dts+=(t[i+18]&6)>>>1}}return n};var lo=function e(t){switch(t){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};var co=function e(t){var r=4+io(t);var i=t.subarray(r);var n=0;var a=0;var s=false;var o;for(;a<i.byteLength-3;a++){if(i[a+2]===1){n=a+5;break}}while(n<i.byteLength){switch(i[n]){case 0:if(i[n-1]!==0){n+=2;break}else if(i[n-2]!==0){n++;break}if(a+3!==n-2){o=lo(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}do{n++}while(i[n]!==1&&n<i.length);a=n-2;n+=3;break;case 1:if(i[n-1]!==0||i[n-2]!==0){n+=3;break}o=lo(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}a=n-2;n+=3;break;default:n+=3;break}}i=i.subarray(a);n-=a;a=0;if(i&&i.byteLength>3){o=lo(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}return s};var fo={parseType:no,parsePat:ao,parsePmt:so,parsePayloadUnitStartIndicator:ro,parsePesType:oo,parsePesTime:uo,videoPacketContainsKeyFrame:co};var ho=Ma.handleRollover;var po={};po.ts=fo;po.aac=ys;var vo=9e4,mo=188,go=71;var yo=function e(t,r){var i=0,n=mo,a,s;while(n<t.byteLength){if(t[i]===go&&t[n]===go){a=t.subarray(i,n);s=po.ts.parseType(a,r.pid);switch(s){case"pat":if(!r.pid){r.pid=po.ts.parsePat(a)}break;case"pmt":if(!r.table){r.table=po.ts.parsePmt(a)}break;default:break}if(r.pid&&r.table){return}i+=mo;n+=mo;continue}i++;n++}};var _o=function e(t,r,i){var n=0,a=mo,s,o,u,l,c;var f=false;while(a<=t.byteLength){if(t[n]===go&&(t[a]===go||a===t.byteLength)){s=t.subarray(n,a);o=po.ts.parseType(s,r.pid);switch(o){case"pes":u=po.ts.parsePesType(s,r.table);l=po.ts.parsePayloadUnitStartIndicator(s);if(u==="audio"&&l){c=po.ts.parsePesTime(s);if(c){c.type="audio";i.audio.push(c);f=true}}break;default:break}if(f){break}n+=mo;a+=mo;continue}n++;a++}a=t.byteLength;n=a-mo;f=false;while(n>=0){if(t[n]===go&&(t[a]===go||a===t.byteLength)){s=t.subarray(n,a);o=po.ts.parseType(s,r.pid);switch(o){case"pes":u=po.ts.parsePesType(s,r.table);l=po.ts.parsePayloadUnitStartIndicator(s);if(u==="audio"&&l){c=po.ts.parsePesTime(s);if(c){c.type="audio";i.audio.push(c);f=true}}break;default:break}if(f){break}n-=mo;a-=mo;continue}n--;a--}};var bo=function e(t,r,i){var n=0,a=mo,s,o,u,l,c,f,d,h;var p=false;var v={data:[],size:0};while(a<t.byteLength){if(t[n]===go&&t[a]===go){s=t.subarray(n,a);o=po.ts.parseType(s,r.pid);switch(o){case"pes":u=po.ts.parsePesType(s,r.table);l=po.ts.parsePayloadUnitStartIndicator(s);if(u==="video"){if(l&&!p){c=po.ts.parsePesTime(s);if(c){c.type="video";i.video.push(c);p=true}}if(!i.firstKeyFrame){if(l){if(v.size!==0){f=new Uint8Array(v.size);d=0;while(v.data.length){h=v.data.shift();f.set(h,d);d+=h.byteLength}if(po.ts.videoPacketContainsKeyFrame(f)){var m=po.ts.parsePesTime(f);if(m){i.firstKeyFrame=m;i.firstKeyFrame.type="video"}else{console.warn("Failed to extract PTS/DTS from PES at first keyframe. "+"This could be an unusual TS segment, or else mux.js did not "+"parse your TS segment correctly. If you know your TS "+"segments do contain PTS/DTS on keyframes please file a bug "+"report! You can try ffprobe to double check for yourself.")}}v.size=0}}v.data.push(s);v.size+=s.byteLength}}break;default:break}if(p&&i.firstKeyFrame){break}n+=mo;a+=mo;continue}n++;a++}a=t.byteLength;n=a-mo;p=false;while(n>=0){if(t[n]===go&&t[a]===go){s=t.subarray(n,a);o=po.ts.parseType(s,r.pid);switch(o){case"pes":u=po.ts.parsePesType(s,r.table);l=po.ts.parsePayloadUnitStartIndicator(s);if(u==="video"&&l){c=po.ts.parsePesTime(s);if(c){c.type="video";i.video.push(c);p=true}}break;default:break}if(p){break}n-=mo;a-=mo;continue}n--;a--}};var To=function e(t,r){if(t.audio&&t.audio.length){var i=r;if(typeof i==="undefined"){i=t.audio[0].dts}t.audio.forEach(function(e){e.dts=ho(e.dts,i);e.pts=ho(e.pts,i);e.dtsTime=e.dts/vo;e.ptsTime=e.pts/vo})}if(t.video&&t.video.length){var n=r;if(typeof n==="undefined"){n=t.video[0].dts}t.video.forEach(function(e){e.dts=ho(e.dts,n);e.pts=ho(e.pts,n);e.dtsTime=e.dts/vo;e.ptsTime=e.pts/vo});if(t.firstKeyFrame){var a=t.firstKeyFrame;a.dts=ho(a.dts,n);a.pts=ho(a.pts,n);a.dtsTime=a.dts/vo;a.ptsTime=a.dts/vo}}};var So=function e(t){var r=false,i=0,n=null,a=null,s=0,o=0,u;while(t.length-o>=3){var l=po.aac.parseType(t,o);switch(l){case"timed-metadata":if(t.length-o<10){r=true;break}s=po.aac.parseId3TagSize(t,o);if(s>t.length){r=true;break}if(a===null){u=t.subarray(o,o+s);a=po.aac.parseAacTimestamp(u)}o+=s;break;case"audio":if(t.length-o<7){r=true;break}s=po.aac.parseAdtsSize(t,o);if(s>t.length){r=true;break}if(n===null){u=t.subarray(o,o+s);n=po.aac.parseSampleRate(u)}i++;o+=s;break;default:o++;break}if(r){return null}}if(n===null||a===null){return null}var c=vo/n;var f={audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+i*1024*c,pts:a+i*1024*c}]};return f};var ko=function e(t){var r={pid:null,table:null};var i={};yo(t,r);for(var n in r.table){if(r.table.hasOwnProperty(n)){var a=r.table[n];switch(a){case La.H264_STREAM_TYPE:i.video=[];bo(t,r,i);if(i.video.length===0){delete i.video}break;case La.ADTS_STREAM_TYPE:i.audio=[];_o(t,r,i);if(i.audio.length===0){delete i.audio}break;default:break}}}return i};var wo=function e(t,r){var i=po.aac.isLikelyAacData(t);var n;if(i){n=So(t)}else{n=ko(t)}if(!n||!n.audio&&!n.video){return null}To(n,r);return n};var Eo={inspect:wo,parseAudioPes_:_o};var Co=Eo.inspect;var Io=[{name:"VOD",run:function e(t,r,i,n,a){if(i!==Infinity){var s={time:0,segmentIndex:0};return s}return null}},{name:"ProgramDateTime",run:function e(t,r,i,n,a){if(!t.datetimeToDisplayTime){return null}var s=r.segments||[];var o=null;var u=null;a=a||0;for(var l=0;l<s.length;l++){var c=s[l];if(c.dateTimeObject){var f=c.dateTimeObject.getTime()/1e3;var d=f+t.datetimeToDisplayTime;var h=Math.abs(a-d);if(u!==null&&(h===0||u<h)){break}u=h;o={time:d,segmentIndex:l}}}return o}},{name:"Segment",run:function e(t,r,i,n,a){var s=r.segments||[];var o=null;var u=null;a=a||0;for(var l=0;l<s.length;l++){var c=s[l];if(c.timeline===n&&typeof c.start!=="undefined"){var f=Math.abs(a-c.start);if(u!==null&&u<f){break}if(!o||u===null||u>=f){u=f;o={time:c.start,segmentIndex:l}}}}return o}},{name:"Discontinuity",run:function e(t,r,i,n,a){var s=null;a=a||0;if(r.discontinuityStarts&&r.discontinuityStarts.length){var o=null;for(var u=0;u<r.discontinuityStarts.length;u++){var l=r.discontinuityStarts[u];var c=r.discontinuitySequence+u+1;var f=t.discontinuities[c];if(f){var d=Math.abs(a-f.time);if(o!==null&&o<d){break}if(!s||o===null||o>=d){o=d;s={time:f.time,segmentIndex:l}}}}}return s}},{name:"Playlist",run:function e(t,r,i,n,a){if(r.syncInfo){var s={time:r.syncInfo.time,segmentIndex:r.syncInfo.mediaSequence-r.mediaSequence};return s}return null}}];var Ao=function(e){O(t,e);function t(){C(this,t);var e=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.inspectCache_=undefined;e.timelines=[];e.discontinuities=[];e.datetimeToDisplayTime=null;e.logger_=ki("SyncController");return e}I(t,[{key:"getSyncPoint",value:function e(t,r,i,n){var a=this.runStrategies_(t,r,i,n);if(!a.length){return null}return this.selectSyncPoint_(a,{key:"time",value:n})}},{key:"getExpiredTime",value:function e(t,r){if(!t||!t.segments){return null}var i=this.runStrategies_(t,r,t.discontinuitySequence,0);if(!i.length){return null}var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});if(n.segmentIndex>0){n.time*=-1}return Math.abs(n.time+X(t,n.segmentIndex,0))}},{key:"runStrategies_",value:function e(t,r,i,n){var a=[];for(var s=0;s<Io.length;s++){var o=Io[s];var u=o.run(this,t,r,i,n);if(u){u.strategy=o.name;a.push({strategy:o.name,syncPoint:u})}}return a}},{key:"selectSyncPoint_",value:function e(t,r){var i=t[0].syncPoint;var n=Math.abs(t[0].syncPoint[r.key]-r.value);var a=t[0].strategy;for(var s=1;s<t.length;s++){var o=Math.abs(t[s].syncPoint[r.key]-r.value);if(o<n){n=o;i=t[s].syncPoint;a=t[s].strategy}}this.logger_("syncPoint for ["+r.key+": "+r.value+"] chosen with strategy"+(" ["+a+"]: [time:"+i.time+",")+(" segmentIndex:"+i.segmentIndex+"]"));return i}},{key:"saveExpiredSegmentInfo",value:function e(t,r){var i=r.mediaSequence-t.mediaSequence;for(var n=i-1;n>=0;n--){var a=t.segments[n];if(a&&typeof a.start!=="undefined"){r.syncInfo={mediaSequence:t.mediaSequence+n,time:a.start};this.logger_("playlist refresh sync: [time:"+r.syncInfo.time+","+(" mediaSequence: "+r.syncInfo.mediaSequence+"]"));this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function e(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var r=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-r}}},{key:"reset",value:function e(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function e(t){var r=t.segment;var i=t.playlist;var n=void 0;if(r.map){n=this.probeMp4Segment_(t)}else{n=this.probeTsSegment_(t)}if(n){if(this.calculateSegmentTimeMapping_(t,n)){this.saveDiscontinuitySyncInfo_(t);if(!i.syncInfo){i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:r.start}}}}return n}},{key:"probeMp4Segment_",value:function e(t){var r=t.segment;var i=ai.timescale(r.map.bytes);var n=ai.startTime(i,t.bytes);if(t.timestampOffset!==null){t.timestampOffset-=n}return{start:n,end:n+r.duration}}},{key:"probeTsSegment_",value:function e(t){var r=Co(t.bytes,this.inspectCache_);var i=void 0;var n=void 0;if(!r){return null}if(r.video&&r.video.length===2){this.inspectCache_=r.video[1].dts;i=r.video[0].dtsTime;n=r.video[1].dtsTime}else if(r.audio&&r.audio.length===2){this.inspectCache_=r.audio[1].dts;i=r.audio[0].dtsTime;n=r.audio[1].dtsTime}var a={start:i,end:n,containsVideo:r.video&&r.video.length===2,containsAudio:r.audio&&r.audio.length===2};return a}},{key:"timestampOffsetForTimeline",value:function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].time}},{key:"mappingForTimeline",value:function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].mapping}},{key:"calculateSegmentTimeMapping_",value:function e(t,r){var i=t.segment;var n=this.timelines[t.timeline];if(t.timestampOffset!==null){n={time:t.startOfSegment,mapping:t.startOfSegment-r.start};this.timelines[t.timeline]=n;this.trigger("timestampoffset");this.logger_("time mapping for timeline "+t.timeline+": "+("[time: "+n.time+"] [mapping: "+n.mapping+"]"));i.start=t.startOfSegment;i.end=r.end+n.mapping}else if(n){i.start=r.start+n.mapping;i.end=r.end+n.mapping}else{return false}return true}},{key:"saveDiscontinuitySyncInfo_",value:function e(t){var r=t.playlist;var i=t.segment;if(i.discontinuity){this.discontinuities[i.timeline]={time:i.start,accuracy:0}}else if(r.discontinuityStarts&&r.discontinuityStarts.length){for(var n=0;n<r.discontinuityStarts.length;n++){var a=r.discontinuityStarts[n];var s=r.discontinuitySequence+n+1;var o=a-t.mediaIndex;var u=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>u){var l=void 0;if(o<0){l=i.start-X(r,t.mediaIndex,a)}else{l=i.end+X(r,t.mediaIndex+1,a)}this.discontinuities[s]={time:l,accuracy:u}}}}}}]);return t}(i.EventTarget);var Oo=new mt("./decrypter-worker.worker.js",function(e,t){var r=this;var i=function(){function e(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var t=function e(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}};var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,r,i){if(r)e(t.prototype,r);if(i)e(t,i);return t}}();var n=function e(t,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r};var a=function e(t,r){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:t};var s=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var r=t[0];var i=t[1];var n=r[4];var a=i[4];var s=void 0;var o=void 0;var u=void 0;var l=[];var c=[];var f=void 0;var d=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;for(s=0;s<256;s++){c[(l[s]=s<<1^(s>>7)*283)^s]=s}for(o=u=0;!n[o];o^=f||1,u=c[u]||1){p=u^u<<1^u<<2^u<<3^u<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=l[d=l[f=l[o]]];m=h*16843009^d*65537^f*257^o*16843008;v=l[p]*257^p*16843008;for(s=0;s<4;s++){r[s][o]=v=v<<24^v>>>8;i[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){r[s]=r[s].slice(0);i[s]=i[s].slice(0)}return t};var o=null;var u=function(){function e(r){t(this,e);if(!o){o=s()}this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var i=void 0;var n=void 0;var a=void 0;var u=void 0;var l=void 0;var c=this._tables[0][4];var f=this._tables[1];var d=r.length;var h=1;if(d!==4&&d!==6&&d!==8){throw new Error("Invalid aes key size")}u=r.slice(0);l=[];this._key=[u,l];for(i=d;i<4*d+28;i++){a=u[i-1];if(i%d===0||d===8&&i%d===4){a=c[a>>>24]<<24^c[a>>16&255]<<16^c[a>>8&255]<<8^c[a&255];if(i%d===0){a=a<<8^a>>>24^h<<24;h=h<<1^(h>>7)*283}}u[i]=u[i-d]^a}for(n=0;i;n++,i--){a=u[n&3?i:i-4];if(i<=4||n<4){l[n]=a}else{l[n]=f[0][c[a>>>24]]^f[1][c[a>>16&255]]^f[2][c[a>>8&255]]^f[3][c[a&255]]}}}e.prototype.decrypt=function e(t,r,i,n,a,s){var o=this._key[1];var u=t^o[0];var l=n^o[1];var c=i^o[2];var f=r^o[3];var d=void 0;var h=void 0;var p=void 0;var v=o.length/4-2;var m=void 0;var g=4;var y=this._tables[1];var _=y[0];var b=y[1];var T=y[2];var S=y[3];var k=y[4];for(m=0;m<v;m++){d=_[u>>>24]^b[l>>16&255]^T[c>>8&255]^S[f&255]^o[g];h=_[l>>>24]^b[c>>16&255]^T[f>>8&255]^S[u&255]^o[g+1];p=_[c>>>24]^b[f>>16&255]^T[u>>8&255]^S[l&255]^o[g+2];f=_[f>>>24]^b[u>>16&255]^T[l>>8&255]^S[c&255]^o[g+3];g+=4;u=d;l=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=k[u>>>24]<<24^k[l>>16&255]<<16^k[c>>8&255]<<8^k[f&255]^o[g++];d=u;u=l;l=c;c=f;f=d}};return e}();var l=function(){function e(){t(this,e);this.listeners={}}e.prototype.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};e.prototype.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t].splice(i,1);return i>-1};e.prototype.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};e.prototype.dispose=function e(){this.listeners={}};e.prototype.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var c=function(e){n(r,e);function r(){t(this,r);var i=a(this,e.call(this,l));i.jobs=[];i.delay=1;i.timeout_=null;return i}r.prototype.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};r.prototype.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return r}(l);var f=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var d=function e(t,r,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new u(Array.prototype.slice.call(r));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var l=void 0;var c=void 0;var d=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;var g=void 0;var y=void 0;l=i[0];c=i[1];d=i[2];h=i[3];for(y=0;y<n.length;y+=4){p=f(n[y]);v=f(n[y+1]);m=f(n[y+2]);g=f(n[y+3]);a.decrypt(p,v,m,g,o,y);o[y]=f(o[y]^l);o[y+1]=f(o[y+1]^c);o[y+2]=f(o[y+2]^d);o[y+3]=f(o[y+3]^h);l=p;c=v;d=m;h=g}return s};var h=function(){function r(i,n,a,s){t(this,r);var o=r.STEP;var u=new Int32Array(i.buffer);var l=new Uint8Array(i.byteLength);var d=0;this.asyncStream_=new c;this.asyncStream_.push(this.decryptChunk_(u.subarray(d,d+o),n,a,l));for(d=o;d<u.length;d+=o){a=new Uint32Array([f(u[d-4]),f(u[d-3]),f(u[d-2]),f(u[d-1])]);this.asyncStream_.push(this.decryptChunk_(u.subarray(d,d+o),n,a,l))}this.asyncStream_.push(function(){s(null,e(l))})}r.prototype.decryptChunk_=function e(t,r,i,n){return function(){var e=d(t,r,i);n.set(e,t.byteOffset)}};i(r,null,[{key:"STEP",get:function e(){return 32e3}}]);return r}();var p=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(ArrayBuffer.isView(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};var v=function e(t){t.onmessage=function(e){var r=e.data;var i=new Uint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength);var n=new Uint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4);var a=new Uint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);new h(i,n,a,function(e,i){t.postMessage(p({source:r.source,decrypted:i}),[i.buffer])})}};var m=new v(r);return m}()});var Po=function e(t){var r=t.default?"main":"alternative";if(t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0){r="main-desc"}return r};var Lo=function e(t,r){t.abort();t.pause();if(r&&r.activePlaylistLoader){r.activePlaylistLoader.pause();r.activePlaylistLoader=null}};var xo=function e(t,r){r.activePlaylistLoader=t;t.load()};var Do=function e(t,r){return function(){var e=r.segmentLoaders,i=e[t],n=e.main,a=r.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var u=a.activePlaylistLoader;Lo(i,a);if(!o){return}if(!o.playlistLoader){if(u){n.resetEverything()}return}i.resyncLoader();xo(o.playlistLoader,a)}};var Uo=function e(t,r){return function(){var e=r.segmentLoaders,i=e[t],n=e.main,a=r.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var u=a.activePlaylistLoader;Lo(i,a);if(!o){return}if(!o.playlistLoader){n.resetEverything();return}if(u===o.playlistLoader){xo(o.playlistLoader,a);return}if(i.track){i.track(s)}i.resetEverything();xo(o.playlistLoader,a)}};var Ro={AUDIO:function e(t,r){return function(){var e=r.segmentLoaders[t],n=r.mediaTypes[t],a=r.blacklistCurrentPlaylist;Lo(e,n);var s=n.activeTrack();var o=n.activeGroup();var u=(o.filter(function(e){return e.default})[0]||o[0]).id;var l=n.tracks[u];if(s===l){a({message:"Problem encountered loading the default audio track."});return}i.log.warn("Problem encountered loading the alternate audio track."+"Switching back to default.");for(var c in n.tracks){n.tracks[c].enabled=n.tracks[c]===l}n.onTrackChanged()}},SUBTITLES:function e(t,r){return function(){var e=r.segmentLoaders[t],n=r.mediaTypes[t];i.log.warn("Problem encountered loading the subtitle track."+"Disabling subtitle track.");Lo(e,n);var a=n.activeTrack();if(a){a.mode="disabled"}n.onTrackChanged()}}};var Mo={AUDIO:function e(t,r,i){if(!r){return}var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",Ro[t](t,i))},SUBTITLES:function e(t,r,i){var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t],o=i.mediaTypes[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);s.track(o.activeTrack());if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",Ro[t](t,i))}};var jo={AUDIO:function e(t,r){var n=r.hls,a=r.sourceType,s=r.segmentLoaders[t],o=r.requestOptions,u=r.master.mediaGroups,l=r.mediaTypes[t],c=l.groups,f=l.tracks,d=r.masterPlaylistLoader;if(!u[t]||Object.keys(u[t]).length===0){u[t]={main:{default:{default:true}}}}for(var h in u[t]){if(!c[h]){c[h]=[]}for(var p in u[t][h]){var v=u[t][h][p];var m=void 0;if(v.resolvedUri){m=new V(v.resolvedUri,n,o)}else if(v.playlists&&a==="dash"){m=new Si(v.playlists[0],n,o,d)}else{m=null}v=i.mergeOptions({id:p,playlistLoader:m},v);Mo[t](t,v.playlistLoader,r);c[h].push(v);if(typeof f[p]==="undefined"){var g=new i.AudioTrack({id:p,kind:Po(v),enabled:false,language:v.language,default:v.default,label:p});f[p]=g}}}s.on("error",Ro[t](t,r))},SUBTITLES:function e(t,r){var n=r.tech,a=r.hls,s=r.sourceType,o=r.segmentLoaders[t],u=r.requestOptions,l=r.master.mediaGroups,c=r.mediaTypes[t],f=c.groups,d=c.tracks,h=r.masterPlaylistLoader;for(var p in l[t]){if(!f[p]){f[p]=[]}for(var v in l[t][p]){if(l[t][p][v].forced){continue}var m=l[t][p][v];var g=void 0;if(s==="hls"){g=new V(m.resolvedUri,a,u)}else if(s==="dash"){g=new Si(m.playlists[0],a,u,h)}m=i.mergeOptions({id:v,playlistLoader:g},m);Mo[t](t,m.playlistLoader,r);f[p].push(m);if(typeof d[v]==="undefined"){var y=n.addRemoteTextTrack({id:v,kind:"subtitles",default:m.default&&m.autoselect,language:m.language,label:v},false).track;d[v]=y}}}o.on("error",Ro[t](t,r))},"CLOSED-CAPTIONS":function e(t,r){var n=r.tech,a=r.master.mediaGroups,s=r.mediaTypes[t],o=s.groups,u=s.tracks;for(var l in a[t]){if(!o[l]){o[l]=[]}for(var c in a[t][l]){var f=a[t][l][c];if(!f.instreamId.match(/CC\d/)){continue}o[l].push(i.mergeOptions({id:c},f));if(typeof u[c]==="undefined"){var d=n.addRemoteTextTrack({id:f.instreamId,kind:"captions",default:f.default&&f.autoselect,language:f.language,label:c},false).track;u[c]=d}}}}};var No=function e(t,r){return function(e){var i=r.masterPlaylistLoader,n=r.mediaTypes[t].groups;var a=i.media();if(!a){return null}var s=null;if(a.attributes[t]){s=n[a.attributes[t]]}s=s||n.main;if(typeof e==="undefined"){return s}if(e===null){return null}return s.filter(function(t){return t.id===e.id})[0]||null}};var Bo={AUDIO:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].enabled){return e[i]}}return null}},SUBTITLES:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].mode==="showing"){return e[i]}}return null}}};var Fo=function e(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){jo[e](e,t)});var r=t.mediaTypes,i=t.masterPlaylistLoader,n=t.tech,a=t.hls;["AUDIO","SUBTITLES"].forEach(function(e){r[e].activeGroup=No(e,t);r[e].activeTrack=Bo[e](e,t);r[e].onGroupChanged=Do(e,t);r[e].onTrackChanged=Uo(e,t)});var s=r.AUDIO.activeGroup();var o=(s.filter(function(e){return e.default})[0]||s[0]).id;r.AUDIO.tracks[o].enabled=true;r.AUDIO.onTrackChanged();i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return r[e].onGroupChanged()})});var u=function e(){r.AUDIO.onTrackChanged();n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",u);n.remoteTextTracks().addEventListener("change",r.SUBTITLES.onTrackChanged);a.on("dispose",function(){n.audioTracks().removeEventListener("change",u);n.remoteTextTracks().removeEventListener("change",r.SUBTITLES.onTrackChanged)});n.clearTracks("audio");for(var l in r.AUDIO.tracks){n.audioTracks().addTrack(r.AUDIO.tracks[l])}};var qo=function e(){var t={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:wi,activeTrack:wi,onGroupChanged:wi,onTrackChanged:wi}});return t};var Vo=60*2;var Ho=void 0;var zo=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"];var Wo=function e(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]};var Go=function(e){O(t,e);function t(e){C(this,t);var r=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var n=e.url,a=e.handleManifestRedirects,s=e.withCredentials,o=e.tech,u=e.bandwidth,l=e.externHls,c=e.useCueTags,f=e.blacklistDuration,d=e.enableLowInitialPlaylist,h=e.sourceType,p=e.seekTo,v=e.cacheEncryptionKeys;if(!n){throw new Error("A non-empty playlist URL is required")}Ho=l;r.withCredentials=s;r.tech_=o;r.hls_=o.hls;r.seekTo_=p;r.sourceType_=h;r.useCueTags_=c;r.blacklistDuration=f;r.enableLowInitialPlaylist=d;if(r.useCueTags_){r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues");r.cueTagsTrack_.inBandMetadataTrackDispatchType=""}r.requestOptions_={withCredentials:s,handleManifestRedirects:a,timeout:null};r.mediaTypes_=qo();r.mediaSource=new i.MediaSource;r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_.bind(r));r.seekable_=i.createTimeRanges();r.hasPlayed_=function(){return false};r.syncController_=new Ao(e);r.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},false).track;r.decrypter_=new Oo;r.inbandTextTracks_={};var m={hls:r.hls_,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function e(){return r.seekable()},seeking:function e(){return r.tech_.seeking()},duration:function e(){return r.mediaSource.duration},hasPlayed:function e(){return r.hasPlayed_()},goalBufferLength:function e(){return r.goalBufferLength()},bandwidth:u,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_,inbandTextTracks:r.inbandTextTracks_,cacheEncryptionKeys:v};r.masterPlaylistLoader_=r.sourceType_==="dash"?new Si(n,r.hls_,r.requestOptions_):new V(n,r.hls_,r.requestOptions_);r.setupMasterPlaylistLoaderListeners_();r.mainSegmentLoader_=new Ks(i.mergeOptions(m,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),e);r.audioSegmentLoader_=new Ks(i.mergeOptions(m,{loaderType:"audio"}),e);r.subtitleSegmentLoader_=new Js(i.mergeOptions(m,{loaderType:"vtt"}),e);r.setupSegmentLoaderListeners_();zo.forEach(function(e){r[e+"_"]=Wo.bind(r,e)});r.logger_=ki("MPC");r.masterPlaylistLoader_.load();return r}I(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function e(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(fe(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}if(e.endList&&t.tech_.preload()!=="none"){t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load()}Fo({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,hls:t.hls_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)});t.triggerPresenceUsage_(t.master(),e);try{t.setupSourceBuffers_()}catch(e){i.log.warn("Failed to create SourceBuffers",e);return t.mediaSource.endOfStream("decode")}t.setupFirstPlay();if(!t.mediaTypes_.AUDIO.activePlaylistLoader||t.mediaTypes_.AUDIO.activePlaylistLoader.media()){t.trigger("selectedinitialmedia")}else{t.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){t.trigger("selectedinitialmedia")})}});this.masterPlaylistLoader_.on("loadedplaylist",function(){var e=t.masterPlaylistLoader_.media();if(!e){t.excludeUnsupportedVariants_();var r=void 0;if(t.enableLowInitialPlaylist){r=t.selectInitialPlaylist()}if(!r){r=t.selectPlaylist()}t.initialMedia_=r;t.masterPlaylistLoader_.media(t.initialMedia_);return}if(t.useCueTags_){t.updateAdCues_(e)}t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.updateDuration();if(!t.tech_.paused()){t.mainSegmentLoader_.load();if(t.audioSegmentLoader_){t.audioSegmentLoader_.load()}}if(!e.endList){var i=function e(){var r=t.seekable();if(r.length!==0){t.mediaSource.addSeekableRange_(r.start(0),r.end(0))}};if(t.duration()!==Infinity){var n=function e(){if(t.duration()===Infinity){i()}else{t.tech_.one("durationchange",e)}};t.tech_.one("durationchange",n)}else{i()}}});this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort();t.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(fe(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load();t.tech_.trigger({type:"mediachange",bubbles:true})});this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=t.masterPlaylistLoader_.media();var r=t.stuckAtPlaylistEnd_(e);if(r){t.blacklistCurrentPlaylist({message:"Playlist no longer updating."});t.tech_.trigger("playliststuck")}});this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})});this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function e(t,r){var i=t.mediaGroups||{};var n=true;var a=Object.keys(i.AUDIO);for(var s in i.AUDIO){for(var o in i.AUDIO[s]){var u=i.AUDIO[s][o];if(!u.uri){n=false}}}if(n){this.tech_.trigger({type:"usage",name:"hls-demuxed"})}if(Object.keys(i.SUBTITLES).length){this.tech_.trigger({type:"usage",name:"hls-webvtt"})}if(Ho.Playlist.isAes(r)){this.tech_.trigger({type:"usage",name:"hls-aes"})}if(Ho.Playlist.isFmp4(r)){this.tech_.trigger({type:"usage",name:"hls-fmp4"})}if(a.length&&Object.keys(i.AUDIO[a[0]]).length>1){this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})}if(this.useCueTags_){this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}}},{key:"setupSegmentLoaderListeners_",value:function e(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=t.selectPlaylist();var r=t.masterPlaylistLoader_.media();var i=t.tech_.buffered();var n=i.length?i.end(i.length-1)-t.tech_.currentTime():0;var a=t.bufferLowWaterLine();if(!r.endList||t.duration()<Ci.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<r.attributes.BANDWIDTH||n>=a){t.masterPlaylistLoader_.media(e)}t.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")});this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())});this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("ended",function(){t.onEndOfStream()});this.mainSegmentLoader_.on("earlyabort",function(){t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the "+"request without rebuffering."},Vo)});this.mainSegmentLoader_.on("reseteverything",function(){t.tech_.trigger("hls-reset")});this.mainSegmentLoader_.on("segmenttimemapping",function(e){t.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})});this.audioSegmentLoader_.on("ended",function(){t.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function e(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function e(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load()}}},{key:"smoothQualityChange_",value:function e(){var t=this.selectPlaylist();if(t!==this.masterPlaylistLoader_.media()){this.masterPlaylistLoader_.media(t);this.mainSegmentLoader_.resetLoader()}}},{key:"fastQualityChange_",value:function e(){var t=this;var r=this.selectPlaylist();if(r===this.masterPlaylistLoader_.media()){return}this.masterPlaylistLoader_.media(r);this.mainSegmentLoader_.resetEverything(function(){if(i.browser.IE_VERSION||i.browser.IS_EDGE){t.tech_.setCurrentTime(t.tech_.currentTime()+.04)}else{t.tech_.setCurrentTime(t.tech_.currentTime())}})}},{key:"play",value:function e(){if(this.setupFirstPlay()){return}if(this.tech_.ended()){this.seekTo_(0)}if(this.hasPlayed_()){this.load()}var t=this.tech_.seekable();if(this.tech_.duration()===Infinity){if(this.tech_.currentTime()<t.start(0)){return this.seekTo_(t.end(t.length-1))}}}},{key:"setupFirstPlay",value:function e(){var t=this;var r=this.masterPlaylistLoader_.media();if(!r||this.tech_.paused()||this.hasPlayed_()){return false}if(!r.endList){var n=this.seekable();if(!n.length){return false}if(i.browser.IE_VERSION&&this.tech_.readyState()===0){this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.seekTo_(n.end(0));t.hasPlayed_=function(){return true}});return false}this.trigger("firstplay");this.seekTo_(n.end(0))}this.hasPlayed_=function(){return true};this.load();return true}},{key:"handleSourceOpen_",value:function e(){try{this.setupSourceBuffers_()}catch(e){i.log.warn("Failed to create Source Buffers",e);return this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();if(typeof t!=="undefined"&&typeof t.then==="function"){t.then(null,function(e){})}}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function e(){var t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo){t=t&&this.audioSegmentLoader_.ended_}else{t=this.audioSegmentLoader_.ended_}}if(!t){return}this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(e){i.log.warn("Failed to call media source endOfStream",e)}}},{key:"stuckAtPlaylistEnd_",value:function e(t){var r=this.seekable();if(!r.length){return false}var i=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(i===null){return false}var n=Ho.Playlist.playlistEnd(t,i);var a=this.tech_.currentTime();var s=this.tech_.buffered();if(!s.length){return n-a<=Qe}var o=s.end(s.length-1);return o-a<=Qe&&n-o<=Qe}},{key:"blacklistCurrentPlaylist",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=arguments[1];var n=void 0;var a=void 0;n=t.playlist||this.masterPlaylistLoader_.media();r=r||t.blacklistDuration||this.blacklistDuration;if(!n){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var s=this.masterPlaylistLoader_.master.playlists.filter(ae).length===1;var o=this.masterPlaylistLoader_.master.playlists;if(o.length===1){i.log.warn("Problem encountered with the current "+"HLS playlist. Trying again since it is the only playlist.");this.tech_.trigger("retryplaylist");return this.masterPlaylistLoader_.load(s)}if(s){i.log.warn("Removing all playlists from the blacklist because the last "+"rendition is about to be blacklisted.");o.forEach(function(e){if(e.excludeUntil!==Infinity){delete e.excludeUntil}});this.tech_.trigger("retryplaylist")}n.excludeUntil=Date.now()+r*1e3;this.tech_.trigger("blacklistplaylist");this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});a=this.selectPlaylist();i.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist.");return this.masterPlaylistLoader_.media(a,s)}},{key:"pauseLoading",value:function e(){this.mainSegmentLoader_.pause();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.pause()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.pause()}}},{key:"setCurrentTime",value:function e(t){var r=Ze(this.tech_.buffered(),t);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0}if(!this.masterPlaylistLoader_.media().segments){return 0}if(r&&r.length){return t}this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.resetEverything();this.audioSegmentLoader_.abort()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.resetEverything();this.subtitleSegmentLoader_.abort()}this.load()}},{key:"duration",value:function e(){if(!this.masterPlaylistLoader_){return 0}if(this.mediaSource){return this.mediaSource.duration}return Ho.Playlist.duration(this.masterPlaylistLoader_.media())}},{key:"seekable",value:function e(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function e(){var t=void 0;var r=void 0;if(!this.masterPlaylistLoader_){return}var n=this.masterPlaylistLoader_.media();if(!n){return}var a=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(a===null){return}t=Ho.Playlist.seekable(n,a);if(t.length===0){return}if(this.mediaTypes_.AUDIO.activePlaylistLoader){n=this.mediaTypes_.AUDIO.activePlaylistLoader.media();a=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(a===null){return}r=Ho.Playlist.seekable(n,a);if(r.length===0){return}}var s=void 0;var o=void 0;if(this.seekable_&&this.seekable_.length){s=this.seekable_.end(0);o=this.seekable_.start(0)}if(!r){this.seekable_=t}else if(r.start(0)>t.end(0)||t.start(0)>r.end(0)){this.seekable_=t}else{this.seekable_=i.createTimeRanges([[r.start(0)>t.start(0)?r.start(0):t.start(0),r.end(0)<t.end(0)?r.end(0):t.end(0)]])}if(this.seekable_&&this.seekable_.length){if(this.seekable_.end(0)===s&&this.seekable_.start(0)===o){return}}this.logger_("seekable updated ["+rt(this.seekable_)+"]");this.tech_.trigger("seekablechanged")}},{key:"updateDuration",value:function e(){var t=this;var r=this.mediaSource.duration;var n=Ho.Playlist.duration(this.masterPlaylistLoader_.media());var a=this.tech_.buffered();var s=function e(){t.logger_("Setting duration from "+t.mediaSource.duration+" => "+n);try{t.mediaSource.duration=n}catch(e){i.log.warn("Failed to set media source duration",e)}t.tech_.trigger("durationchange");t.mediaSource.removeEventListener("sourceopen",e)};if(a.length>0){n=Math.max(n,a.end(a.length-1))}if(r!==n){if(this.mediaSource.readyState!=="open"){this.mediaSource.addEventListener("sourceopen",s)}else{s()}}}},{key:"dispose",value:function e(){var t=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();["AUDIO","SUBTITLES"].forEach(function(e){var r=t.mediaTypes_[e].groups;for(var i in r){r[i].forEach(function(e){if(e.playlistLoader){e.playlistLoader.dispose()}})}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function e(){return this.masterPlaylistLoader_.master}},{key:"media",value:function e(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function e(){var t=this.masterPlaylistLoader_.media();var r=void 0;if(!t||this.mediaSource.readyState!=="open"){return}r=Lt(this.masterPlaylistLoader_.master,t);if(r.length<1){this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri;return this.mediaSource.endOfStream("decode")}this.configureLoaderMimeTypes_(r);this.excludeIncompatibleVariants_(t)}},{key:"configureLoaderMimeTypes_",value:function e(t){var r=t.length>1&&t[0].indexOf(",")===-1&&t[0]!==t[1]?new i.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],r);if(t[1]){this.audioSegmentLoader_.mimeType(t[1],r)}}},{key:"excludeUnsupportedVariants_",value:function e(){this.master().playlists.forEach(function(e){if(e.attributes.CODECS&&p.MediaSource&&p.MediaSource.isTypeSupported&&!p.MediaSource.isTypeSupported('video/mp4; codecs="'+Ct(e.attributes.CODECS)+'"')){e.excludeUntil=Infinity}})}},{key:"excludeIncompatibleVariants_",value:function e(t){var r=2;var i=null;var n=void 0;if(t.attributes.CODECS){n=Et(t.attributes.CODECS);i=n.videoCodec;r=n.codecCount}this.master().playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){t=Et(e.attributes.CODECS)}if(t.codecCount!==r){e.excludeUntil=Infinity}if(t.videoCodec!==i){e.excludeUntil=Infinity}})}},{key:"updateAdCues_",value:function e(t){var r=0;var i=this.seekable();if(i.length){r=i.start(0)}eo(t,this.cueTagsTrack_,r)}},{key:"goalBufferLength",value:function e(){var t=this.tech_.currentTime();var r=Ci.GOAL_BUFFER_LENGTH;var i=Ci.GOAL_BUFFER_LENGTH_RATE;var n=Math.max(r,Ci.MAX_GOAL_BUFFER_LENGTH);return Math.min(r+t*i,n)}},{key:"bufferLowWaterLine",value:function e(){var t=this.tech_.currentTime();var r=Ci.BUFFER_LOW_WATER_LINE;var i=Ci.BUFFER_LOW_WATER_LINE_RATE;var n=Math.max(r,Ci.MAX_BUFFER_LOW_WATER_LINE);return Math.min(r+t*i,n)}}]);return t}(i.EventTarget);var Yo=function e(t,r,i){return function(e){var n=t.master.playlists[r];var a=ne(n);var s=ae(n);if(typeof e==="undefined"){return s}if(e){delete n.disabled}else{n.disabled=true}if(e!==s&&!a){i();if(e){t.trigger("renditionenabled")}else{t.trigger("renditiondisabled")}}return e}};var Xo=function e(t,r,i){C(this,e);var n=t.masterPlaylistController_,a=t.options_.smoothQualityChange;var s=a?"smooth":"fast";var o=n[s+"QualityChange_"].bind(n);if(r.attributes.RESOLUTION){var u=r.attributes.RESOLUTION;this.width=u.width;this.height=u.height}this.bandwidth=r.attributes.BANDWIDTH;this.id=i;this.enabled=Yo(t.playlists,r.uri,o)};var Ko=function e(t){var r=t.playlists;t.representations=function(){return r.master.playlists.filter(function(e){return!ne(e)}).map(function(e,r){return new Xo(t,e,e.uri)})}};var $o=["seeking","seeked","pause","playing","error"];var Qo=function(){function e(t){var r=this;C(this,e);this.tech_=t.tech;this.seekable=t.seekable;this.seekTo=t.seekTo;this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow;this.media=t.media;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=ki("PlaybackWatcher");this.logger_("initialize");var i=function e(){return r.monitorCurrentTime_()};var n=function e(){return r.techWaiting_()};var a=function e(){return r.cancelTimer_()};var s=function e(){return r.fixesBadSeeks_()};this.tech_.on("seekablechanged",s);this.tech_.on("waiting",n);this.tech_.on($o,a);this.tech_.on("canplay",i);this.dispose=function(){r.logger_("dispose");r.tech_.off("seekablechanged",s);r.tech_.off("waiting",n);r.tech_.off($o,a);r.tech_.off("canplay",i);if(r.checkCurrentTimeTimeout_){p.clearTimeout(r.checkCurrentTimeTimeout_)}r.cancelTimer_()}}I(e,[{key:"monitorCurrentTime_",value:function e(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){p.clearTimeout(this.checkCurrentTimeTimeout_)}this.checkCurrentTimeTimeout_=p.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function e(){if(this.tech_.seeking()&&this.fixesBadSeeks_()){this.consecutiveUpdates=0;this.lastRecordedTime=this.tech_.currentTime();return}if(this.tech_.paused()||this.tech_.seeking()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();if(this.lastRecordedTime===t&&(!r.length||t+Qe>=r.end(r.length-1))){return this.techWaiting_()}if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime){this.consecutiveUpdates++;this.waiting_()}else if(t===this.lastRecordedTime){this.consecutiveUpdates++}else{this.consecutiveUpdates=0;this.lastRecordedTime=t}}},{key:"cancelTimer_",value:function e(){this.consecutiveUpdates=0;if(this.timer_){this.logger_("cancelTimer_");clearTimeout(this.timer_)}this.timer_=null}},{key:"fixesBadSeeks_",value:function e(){var t=this.tech_.seeking();if(!t){return false}var r=this.seekable();var i=this.tech_.currentTime();var n=this.afterSeekableWindow_(r,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);var a=void 0;if(n){var s=r.end(r.length-1);a=s}if(this.beforeSeekableWindow_(r,i)){var o=r.start(0);a=o+Qe}if(typeof a!=="undefined"){this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+rt(r)+". Seeking to ")+(a+"."));this.seekTo(a);return true}return false}},{key:"waiting_",value:function e(){if(this.techWaiting_()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();var i=Ze(r,t);if(i.length&&t+3<=i.end(0)){this.cancelTimer_();this.seekTo(t);this.logger_("Stopped at "+t+" while inside a buffered region "+("["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time.");this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},{key:"techWaiting_",value:function e(){var t=this.seekable();var r=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()){return true}if(this.tech_.seeking()||this.timer_!==null){return true}if(this.beforeSeekableWindow_(t,r)){var i=t.end(t.length-1);this.logger_("Fell out of live window at time "+r+". Seeking to "+("live point (seekable end) "+i));this.cancelTimer_();this.seekTo(i);this.tech_.trigger({type:"usage",name:"hls-live-resync"});return true}var n=this.tech_.buffered();var a=et(n,r);if(this.videoUnderflow_(a,n,r)){this.cancelTimer_();this.seekTo(r);this.tech_.trigger({type:"usage",name:"hls-video-underflow"});return true}if(a.length>0){var s=a.start(0)-r;this.logger_("Stopped at "+r+", setting timer for "+s+", seeking "+("to "+a.start(0)));this.timer_=setTimeout(this.skipTheGap_.bind(this),s*1e3,r);return true}return false}},{key:"afterSeekableWindow_",value:function e(t,r,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(!t.length){return false}var a=t.end(t.length-1)+Qe;var s=!i.endList;if(s&&n){a=t.end(t.length-1)+i.targetDuration*3}if(r>a){return true}return false}},{key:"beforeSeekableWindow_",value:function e(t,r){if(t.length&&t.start(0)>0&&r<t.start(0)-Qe){return true}return false}},{key:"videoUnderflow_",value:function e(t,r,i){if(t.length===0){var n=this.gapFromVideoUnderflow_(r,i);if(n){this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". "+("Seeking to current time "+i));return true}}return false}},{key:"skipTheGap_",value:function e(t){var r=this.tech_.buffered();var i=this.tech_.currentTime();var n=et(r,i);this.cancelTimer_();if(n.length===0||i!==t){return}this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0));this.seekTo(n.start(0)+$e);this.tech_.trigger({type:"usage",name:"hls-gap-skip"})}},{key:"gapFromVideoUnderflow_",value:function e(t,r){var i=tt(t);for(var n=0;n<i.length;n++){var a=i.start(n);var s=i.end(n);if(r-a<4&&r-a>2){return{start:a,end:s}}}return null}}]);return e}();var Jo={errorInterval:30,getSource:function e(t){var r=this.tech({IWillNotUseThisInPlugins:true});var i=r.currentSource_;return t(i)}};var Zo=function e(t,r){var n=0;var a=0;var s=i.mergeOptions(Jo,r);t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function e(){if(a){t.currentTime(a)}};var u=function e(r){if(r===null||r===undefined){return}a=t.duration()!==Infinity&&t.currentTime()||0;t.one("loadedmetadata",o);t.src(r);t.trigger({type:"usage",name:"hls-error-reload"});t.play()};var l=function e(){if(Date.now()-n<s.errorInterval*1e3){t.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!=="function"){i.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}n=Date.now();return s.getSource.call(t,u)};var c=function e(){t.off("loadedmetadata",o);t.off("error",l);t.off("dispose",e)};var f=function r(i){c();e(t,i)};t.on("error",l);t.on("dispose",c);t.reloadSourceOnError=f};var eu=function e(t){Zo(this,t)};var tu="1.10.3";i.use("*",function(e){return{setSource:function e(t,r){r(null,t)},setCurrentTime:function t(r){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(r)}return r},play:function t(){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(e.tech_.currentTime())}}}});var ru={PlaylistLoader:V,Playlist:de,Decrypter:Pe,AsyncStream:Ie,decrypt:Oe,utils:Fe,STANDARD_PLAYLIST_SELECTOR:zi,INITIAL_PLAYLIST_SELECTOR:Gi,comparePlaylistBandwidth:qi,comparePlaylistResolution:Vi,xhr:ve()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(e){Object.defineProperty(ru,e,{get:function t(){i.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");return Ci[e]},set:function t(r){i.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");if(typeof r!=="number"||r<0){i.log.warn("value of Hls."+e+" must be greater than or equal to 0");return}Ci[e]=r}})});var iu="videojs-vhs";var nu=function e(t){var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;if(r.test(t)){return"hls"}var i=/^application\/dash\+xml/i;if(i.test(t)){return"dash"}return null};var au=function e(t,r){var i=r.media();var n=-1;for(var a=0;a<t.length;a++){if(t[a].id===i.uri){n=a;break}}t.selectedIndex_=n;t.trigger({selectedIndex:n,type:"change"})};var su=function e(t,r){r.representations().forEach(function(e){t.addQualityLevel(e)});au(t,r.playlists)};ru.canPlaySource=function(){return i.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var ou=function e(t,r,n){if(!t){return t}var a={};for(var s in t){a[s]={audioContentType:'audio/mp4; codecs="'+n.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+r.attributes.CODECS+'"'};if(r.contentProtection&&r.contentProtection[s]&&r.contentProtection[s].pssh){a[s].pssh=r.contentProtection[s].pssh}if(typeof t[s]==="string"){a[s].url=t[s]}}return i.mergeOptions(t,a)};var uu=function e(t){if(t.options_.sourceType!=="dash"){return}var r=i.players[t.tech_.options_.playerId];if(r.eme){var n=ou(t.source_.keySystems,t.playlists.media(),t.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());if(n){r.currentSource().keySystems=n;if(r.eme.initializeMediaKeys){r.eme.initializeMediaKeys()}}}};var lu=function t(){if(!e.localStorage){return null}var r=e.localStorage.getItem(iu);if(!r){return null}try{return JSON.parse(r)}catch(e){return null}};var cu=function t(r){if(!e.localStorage){return false}var n=lu();n=n?i.mergeOptions(n,r):r;try{e.localStorage.setItem(iu,JSON.stringify(n))}catch(e){return false}return n};ru.supportsNativeHls=function(){var e=f.createElement("video");if(!i.getTech("Html5").isSupported()){return false}var t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}();ru.supportsNativeDash=function(){if(!i.getTech("Html5").isSupported()){return false}return/maybe|probably/i.test(f.createElement("video").canPlayType("application/dash+xml"))}();ru.supportsTypeNatively=function(e){if(e==="hls"){return ru.supportsNativeHls}if(e==="dash"){return ru.supportsNativeDash}return false};ru.isSupported=function(){return i.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var fu=i.getComponent("Component");var du=function(e){O(t,e);function t(e,r,n){C(this,t);var a=P(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r,n.hls));if(r.options_&&r.options_.playerId){var s=i(r.options_.playerId);if(!s.hasOwnProperty("hls")){Object.defineProperty(s,"hls",{get:function e(){i.log.warn("player.hls is deprecated. Use player.tech().hls instead.");r.trigger({type:"usage",name:"hls-player-access"});return a},configurable:true})}s.vhs=a;s.dash=a;a.player_=s}a.tech_=r;a.source_=e;a.stats={};a.setOptions_();if(a.options_.overrideNative&&r.overrideNativeAudioTracks&&r.overrideNativeVideoTracks){r.overrideNativeAudioTracks(true);r.overrideNativeVideoTracks(true)}else if(a.options_.overrideNative&&(r.featuresNativeVideoTracks||r.featuresNativeAudioTracks)){throw new Error("Overriding native HLS requires emulated tracks. "+"See https://git.io/vMpjB")}a.on(f,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=f.fullscreenElement||f.webkitFullscreenElement||f.mozFullScreenElement||f.msFullscreenElement;if(t&&t.contains(a.tech_.el())){a.masterPlaylistController_.smoothQualityChange_()}});a.on(a.tech_,"seeking",function(){if(this.tech_.currentTime()===0&&this.tech_.player_.loop()){this.setCurrentTime(0)}});a.on(a.tech_,"error",function(){if(this.masterPlaylistController_){this.masterPlaylistController_.pauseLoading()}});a.on(a.tech_,"play",a.play);return a}I(t,[{key:"setOptions_",value:function e(){var t=this;this.options_.withCredentials=this.options_.withCredentials||false;this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||false;this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions===false?false:true;this.options_.smoothQualityChange=this.options_.smoothQualityChange||false;this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage!=="undefined"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||false;this.options_.customTagParsers=this.options_.customTagParsers||[];this.options_.customTagMappers=this.options_.customTagMappers||[];this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||false;if(typeof this.options_.blacklistDuration!=="number"){this.options_.blacklistDuration=5*60}if(typeof this.options_.bandwidth!=="number"){if(this.options_.useBandwidthFromLocalStorage){var r=lu();if(r&&r.bandwidth){this.options_.bandwidth=r.bandwidth;this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})}if(r&&r.throughput){this.options_.throughput=r.throughput;this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"})}}}if(typeof this.options_.bandwidth!=="number"){this.options_.bandwidth=Ci.INITIAL_BANDWIDTH}this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ci.INITIAL_BANDWIDTH;["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(e){if(typeof t.source_[e]!=="undefined"){t.options_[e]=t.source_[e]}});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function e(t,r){var n=this;if(!t){return}this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=ru;this.options_.sourceType=nu(r);this.options_.seekTo=function(e){n.tech_.setCurrentTime(e);n.setCurrentTime(e)};this.masterPlaylistController_=new Go(this.options_);this.playbackWatcher_=new Qo(i.mergeOptions(this.options_,{seekable:function e(){return n.seekable()},media:function e(){return n.masterPlaylistController_.media()}}));this.masterPlaylistController_.on("error",function(){var e=i.players[n.tech_.options_.playerId];e.error(n.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):ru.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=ru.INITIAL_PLAYLIST_SELECTOR.bind(this);this.playlists=this.masterPlaylistController_.masterPlaylistLoader_;this.mediaSource=this.masterPlaylistController_.mediaSource;Object.defineProperties(this,{selectPlaylist:{get:function e(){return this.masterPlaylistController_.selectPlaylist},set:function e(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function e(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function e(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function e(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function e(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function e(){var t=1/(this.bandwidth||1);var r=void 0;if(this.throughput>0){r=1/this.throughput}else{r=0}var i=Math.floor(1/(t+r));return i},set:function e(){i.log.error('The "systemBandwidth" property is read-only')}}});if(this.options_.bandwidth){this.bandwidth=this.options_.bandwidth}if(this.options_.throughput){this.throughput=this.options_.throughput}Object.defineProperties(this.stats,{bandwidth:{get:function e(){return n.bandwidth||0},enumerable:true},mediaRequests:{get:function e(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:true},mediaRequestsAborted:{get:function e(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:true},mediaRequestsTimedout:{get:function e(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:true},mediaRequestsErrored:{get:function e(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:true},mediaTransferDuration:{get:function e(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:true},mediaBytesTransferred:{get:function e(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:true},mediaSecondsLoaded:{get:function e(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:true},buffered:{get:function e(){return nt(n.tech_.buffered())},enumerable:true},currentTime:{get:function e(){return n.tech_.currentTime()},enumerable:true},currentSource:{get:function e(){return n.tech_.currentSource_},enumerable:true},currentTech:{get:function e(){return n.tech_.name_},enumerable:true},duration:{get:function e(){return n.tech_.duration()},enumerable:true},master:{get:function e(){return n.playlists.master},enumerable:true},playerDimensions:{get:function e(){return n.tech_.currentDimensions()},enumerable:true},seekable:{get:function e(){return nt(n.tech_.seekable())},enumerable:true},timestamp:{get:function e(){return Date.now()},enumerable:true},videoPlaybackQuality:{get:function e(){return n.tech_.getVideoPlaybackQuality()},enumerable:true}});this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.tech_.on("bandwidthupdate",function(){if(n.options_.useBandwidthFromLocalStorage){cu({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}});this.masterPlaylistController_.on("selectedinitialmedia",function(){Ko(n);uu(n)});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});this.tech_.ready(function(){return n.setupQualityLevels_()});if(!this.tech_.el()){return}this.tech_.src(i.URL.createObjectURL(this.masterPlaylistController_.mediaSource))}},{key:"setupQualityLevels_",value:function e(){var t=this;var r=i.players[this.tech_.options_.playerId];if(r&&r.qualityLevels){this.qualityLevels_=r.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){su(t.qualityLevels_,t)});this.playlists.on("mediachange",function(){au(t.qualityLevels_,t.playlists)})}}},{key:"play",value:function e(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function e(t){this.masterPlaylistController_.setCurrentTime(t)}},{key:"duration",value:function e(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function e(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function e(){if(this.playbackWatcher_){this.playbackWatcher_.dispose()}if(this.masterPlaylistController_){this.masterPlaylistController_.dispose()}if(this.qualityLevels_){this.qualityLevels_.dispose()}if(this.player_){delete this.player_.vhs;delete this.player_.dash;delete this.player_.hls}if(this.tech_&&this.tech_.hls){delete this.tech_.hls}A(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function e(t,r){return Xe({playlist:this.masterPlaylistController_.media(),time:t,callback:r})}},{key:"seekToProgramTime",value:function e(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:2;return Ke({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:r})}}]);return t}(fu);var hu={name:"videojs-http-streaming",VERSION:tu,canHandleSource:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=i.mergeOptions(i.options,r);return hu.canPlayType(t.type,n)},handleSource:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=i.mergeOptions(i.options,n);r.hls=new du(t,r,a);r.hls.xhr=ve();r.hls.src(t.src,t.type);return r.hls},canPlayType:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=i.mergeOptions(i.options,r),a=n.hls.overrideNative;var s=nu(t);var o=s&&(!ru.supportsTypeNatively(s)||a);return o?"maybe":""}};if(typeof i.MediaSource==="undefined"||typeof i.URL==="undefined"){i.MediaSource=Gt;i.URL=Yt}if(Gt.supportsNativeMediaSources()){i.getTech("Html5").registerSourceHandler(hu,0)}i.HlsHandler=du;i.HlsSourceHandler=hu;i.Hls=ru;if(!i.use){i.registerComponent("Hls",ru)}i.options.hls=i.options.hls||{};if(i.registerPlugin){i.registerPlugin("reloadSourceOnError",eu)}else{i.plugin("reloadSourceOnError",eu)}r.LOCAL_STORAGE_KEY=iu;r.Hls=ru;r.HlsHandler=du;r.HlsSourceHandler=hu;r.emeKeySystems=ou;r.simpleTypeFromSourceType=nu;Object.defineProperty(r,"__esModule",{value:true})});(function(){if(f.getPlugin("proxyTracks")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsProxyTracks=t(e.videojs)})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;function t(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function r(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var i={activeCues:null,cues:null,id:"",inBandMetadataTrackDispatchType:undefined,kind:"metadata",label:"",language:"",mode:"",oncuechange:undefined};var n=["activeCues","cues","id","inBandMetadataTrackDispatchType","kind","label","language"];var a=["mode"];var s=function e(t,r){if(t==="media"&&r.kind==="metadata"&&r.label==="media-cues"){return true}if(t==="id3"&&typeof r.inBandMetadataTrackDispatchType==="string"&&r.inBandMetadataTrackDispatchType.trim().length>0){return true}return false};var o=function(o){t(u,o);function u(t,s,u){var l;if(u===void 0){u=function e(){}}l=o.call(this)||this;var c=r(r(l));c.player_=t;c.reTriggerEvent_=e.bind(c,c.reTriggerEvent_);c.update_=e.bind(c,c.update_);c.type_=s;c.logger_=u;n.concat(a).forEach(function(e){var t={get:function t(){return c.track_&&c.track_[e]||i[e]},enumerable:true};if(a.indexOf(e)!==-1){t.set=function(t){if(!c.track_){return}c.track_[e]=t}}Object.defineProperty(c,e,t)});c.update_();var f=t.textTracks();var d=function e(t){if(!c.track_){c.update_(t)}else if(c.track_.mode!=="hidden"){c.track_.mode="hidden";c.logger_("timeupdate -> type:"+c.type_+(c.track_?",mode:"+c.track_.mode:"")+" -> track was set to hidden")}};["addtrack","removetrack"].forEach(function(e){return f.addEventListener(e,c.update_)});c.player_.on("timeupdate",d);return c||r(l)}var l=u.prototype;l.addCue=function e(){var t=this;var r=arguments;if(!this.track_){this.one("trackexists",function(){return t.addCue.apply(t,r)});return}return this.track_.addCue.apply(this.track_,r)};l.removeCue=function e(){var t=this;var r=arguments;if(!this.track_){return this.one("trackexists",function(){return t.removeCue.apply(t,r)})}return this.track_.removeCue.apply(this.track_,r)};l.reTriggerEvent_=function e(t){this.trigger(t)};l.update_=function e(t){if(t===void 0){t={}}var r;if(t.type==="removetrack"&&t.track&&t.track===this.track_){r=null}else if(t.type==="addtrack"&&t.track&&!this.track_&&s(this.type_,t.track)){r=t.track}else{var i=this.player_.textTracks();var n=i.length;while(n--){if(s(this.type_,i[n])){r=i[n];break}}}this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> event:"+(t.type||"constructor"));if(this.track_===r){this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> "+(r?"already proxied":"no track to proxy"));return}if(this.track_){this.track_.removeEventListener("cuechange",this.reTriggerEvent_)}this.track_=r;if(!this.track_){this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> track changed, but no new track exists");return}if(this.track_.mode!=="hidden"){this.track_.mode="hidden"}this.track_.addEventListener("cuechange",this.reTriggerEvent_);this.trigger("trackexists");this.logger_("update -> type:"+this.type_+", mode:"+(r?r.mode:"?")+" -> track exists")};return u}(e.EventTarget);o.prototype.allowedEvents_={cuechange:"cuechange"};var u="1.0.8";var l={id3CuePointsTrack:function e(t){var r=this.proxyTracks_.id3;if(!r){r=this.proxyTracks_.id3=new o(this,"id3",t)}return r},mediaCuePointsTrack:function e(t){var r=this.proxyTracks_.media;if(r){return r}r=this.proxyTracks_.media=new o(this,"media",t);if(r.track_){return r}this.addTextTrack("metadata","media-cues");r.update_();return r}};function c(t){var r=this;if(t===void 0){t={}}this.proxyTracks_={};var i=e.createLogger("proxyTracks");if(!t.debug){i=function e(){}}i("initialized");Object.keys(l).forEach(function(e){r[e]=function(){return l[e].call(r,i)}});this.ready(function(){Object.keys(l).forEach(function(e){var n=r[e]();if(t.debug){n.on("cuechange",function(){for(var e=0;e<n.activeCues.length;e++){var t=n.activeCues[e];i(n.type_+" -> cuechange -> activeCues["+e+"]: "+(t.value&&t.value.key||t.frame&&t.frame.id))}})}})})}e.registerPlugin("proxyTracks",c);c.VERSION=u;return c})})();(function(){if(f.getPlugin("perSourceBehaviors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsPerSourceBehaviors=t(e.videojs)})(typeof self!=="undefined"?self:this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.1.0";var r=e.getTech("Html5");var i=e.registerPlugin||e.plugin;var n=["abort","emptied","loadstart","play"];var a=["abort","emptied"];var s=["ad-playback","ads-ready?","postroll?","preroll?"];var o=function e(t){return s.indexOf(t)>-1};var u=function e(t){return t.usingPlugin("ads")&&typeof t.ads.inAdBreak==="function"};var l=function e(t,r){if(!t.usingPlugin("ads")){return false}if(u(t)){return t.ads.isInAdMode()&&r.type!=="loadstart"}return o(t.ads.state)};var c=function i(){var s=this;var o=[];var u;var c=false;var f;var d=true;var h=function t(r){return function(t,i){var n=this;if(this.perSourceBehaviors.disabled()){return}var a=arguments.length===2;var s=this.currentSrc();var u=[t];var l=e.bind(a?this:t,arguments[arguments.length-1]);var c=function e(){var t=n.currentSrc()!==s;if(n.perSourceBehaviors.disabled()){return}if(t||r){n.off.apply(n,u)}if(!t){l.apply(void 0,arguments)}};c.guid=l.guid;if(!a){u.push(i)}u.push(c);o.push(u);return this.on.apply(this,u)}};this.perSourceBehaviors={disable:e.bind(this,function e(){this.clearTimeout(f);f=null;c=true;return c}),disabled:function e(){return c},enable:function e(){c=false;return c},enabled:function e(){return!c},isSrcStable:function e(){return d},VERSION:t};this.onPerSrc=h();this.onePerSrc=h(true);this.on("dispose",function(){o.length=0});this.on(n,function(e){if(s.perSourceBehaviors.disabled()||f||l(s,e)){return}if(d&&a.indexOf(e.type)>-1){d=false;s.trigger("sourceunstable")}var t=[];var i=function e(r){return t.push({time:Date.now(),event:r})};i(e);s.on(r.Events,i);f=s.setTimeout(function(){var e=s.currentSrc();d=true;f=null;s.off(r.Events,i);if(e&&e!==u){o.forEach(function(e){return s.off.apply(s,e)});o.length=0;s.trigger("sourcechanged",{interimEvents:t,from:u,to:e});u=e}},1)})};c.VERSION=t;i("perSourceBehaviors",c);return c})})();(function(){if(f.getPlugin("seekEvents")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsSeekEvents=t(e.videojs)})(this,function(e){"use strict";e="default"in e?e["default"]:e;var t={verbose:false,maxSavedSeekEvents:10,debounceTimeout:1e3,playbackRateTolerance:1.5,stableTimeUpdateCount:3,minInterval:1};var r=function e(t,r){var i=void 0;return function(){var e=this;for(var n=arguments.length,a=Array(n),s=0;s<n;s++){a[s]=arguments[s]}var o=function r(){i=null;o=null;t.apply(e,a)};clearTimeout(i);i=setTimeout(o,r)}};var i=function e(t){t.trigger("seek")};var n=function n(a){var s=e.mergeOptions(t,a);var o=void 0;var u=false;var l=void 0;var c=void 0;var f=void 0;var d=void 0;var h=0;var p=[];var v=0;var m={};var g={};var y=s.verbose?function(){var t;for(var r=arguments.length,i=Array(r),n=0;n<r;n++){i[n]=arguments[n]}return(t=e.log).call.apply(t,[e,"seek-events:"].concat(i))}:function(){};var _=function e(){m.seek=this.seekEvents.last().seekEnd;u=false;y("event seekStart: ",this.seekEvents.last().seekStart);y("event seekEnd: ",this.seekEvents.last().seekEnd)};var b=function e(){y("stable");this.seekEvents.stable=true};var T=function e(){y("unstable");this.seekEvents.stable=false};var S=function e(t){m.seek=this.currentTime();m.clock=t.timeStamp||Date.now();g.seek=m.seek;g.clock=m.clock};var k=r(i,s.debounceTimeout);var w=function e(t){l=this.currentTime();c=t.timeStamp||+new Date;f=l-g.seek;if(c===g.clock||l===m.seek){return}d=Math.abs(f)/(Math.abs(c-g.clock)*.001);if(d>this.seekEvents.playbackRateTolerance){if(Math.abs(l-m.seek)>=this.seekEvents.minInterval){this.trigger("unstable");h=0;if(!u){v=Number(m.seek)}p.push({timeStamp:c,seekStart:v,seekEnd:l,seekInterval:l-v});if(p.length>s.maxSavedSeekEvents){p.shift()}u=true;k(this)}}else{h++;y(l+": "+h);if(h>=this.seekEvents.stableTimeUpdateCount&&!this.seekEvents.stable&&!u){this.trigger("stable")}m.seek=l}g.seek=l;g.clock=c};this.seekEvents={stableTimeUpdateCount:s.stableTimeUpdateCount,playbackRateTolerance:s.playbackRateTolerance,debounceTimeout:s.debounceTimeout,minInterval:s.minInterval,stable:false,enabled:function e(){return o},enable:e.bind(this,function(){if(o){return}o=true;m.seek=0;m.clock=Date.now();g.seek=0;g.clock=m.clock;this.on("seek",_);this.on("stable",b);this.on("unstable",T);this.on(["loadstart","playing","adplaying"],S);this.on(["timeupdate","adtimeupdate"],w)}),disable:e.bind(this,function(){if(!o){return}o=false;this.off("seek",_);this.off("stable",b);this.off("unstable",T);this.off(["loadstart","playing","adplaying"],S);this.off(["timeupdate","adtimeupdate"],w)}),last:function e(){return p[p.length-1]},all:function e(){return p}};this.seekEvents.enable()};var a=e.registerPlugin||e.plugin;a("seekEvents",n);return n})})();(function(){if(f.getPlugin("contextmenu")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsContextmenu=t(e.videojs)})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.0.2";var r=e.registerPlugin||e.plugin;var i={cancel:true,sensitivity:10,wait:500,disabled:false};var n="vjs-contextmenu";function a(e,t){if(e.contextmenu.options.disabled){return e}var r={target:e,type:n};["clientX","clientY","pageX","pageY","screenX","screenY"].forEach(function(e){r[e]=t[e]});return e.trigger(r)}function s(e){var t=this.contextmenu.current;if(!t){return}var r=this.contextmenu.options.wait;if(e.type==="touchend"&&Number(new Date)-t.time>=r){a(this,e)}this.contextmenu.current=null}function o(e){var t=this.contextmenu.current;if(!t){return}var r=e.touches[0];var i=this.contextmenu.options.sensitivity;if(r.screenX-t.screenX>i||r.screenY-t.screenY>i){this.contextmenu.current=null}}function u(e){if(this.contextmenu.current){return}var t=e.touches[0];this.contextmenu.current={screenX:t.screenX,screenY:t.screenY,time:Number(new Date)}}function l(e){if(this.contextmenu.options.cancel&&!this.contextmenu.options.disabled){e.preventDefault()}a(this,e);this.off(["touchcancel","touchend"],s);this.off("touchmove",o);this.off("touchstart",u)}function c(t){var r=this;this.contextmenu.options=e.mergeOptions(i,t);this.contextmenu.VERSION="__VERSION__";this.on("contextmenu",l);this.on(["touchcancel","touchend"],s);this.on("touchmove",o);this.on("touchstart",u);this.ready(function(){return r.addClass(n)})}r("contextmenu",c);c.VERSION=t;return c})})();(function(){if(f.getPlugin("contextmenuUI")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document"),require("global/window")):typeof r==="function"&&r.amd?r(["video.js","global/document","global/window"],t):e.videojsContextmenuUi=t(e.videojs,e.document,e.window)})(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;function i(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var a=e.getComponent("MenuItem");var s=function(e){i(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;n.handleClick=function t(i){var n=this;e.prototype.handleClick.call(this);this.options_.listener();r.setTimeout(function(){n.player().contextmenuUI.menu.dispose()},1)};return t}(a);var o=e.getComponent("Menu");var u=e.dom||e;var l=function(t){i(a,t);function a(i,a){var o;o=t.call(this,i,a)||this;o.dispose=e.bind(n(o),o.dispose);a.content.forEach(function(t){var n=function e(){};if(typeof t.listener==="function"){n=t.listener}else if(typeof t.href==="string"){n=function e(){return r.open(t.href)}}o.addItem(new s(i,{label:t.label,listener:e.bind(i,n)}))});return o}var o=a.prototype;o.createEl=function e(){var r=t.prototype.createEl.call(this);u.addClass(r,"vjs-contextmenu-ui-menu");r.style.left=this.options_.position.left+"px";r.style.top=this.options_.position.top+"px";return r};return a}(o);function c(e){var i;if(e.getBoundingClientRect&&e.parentNode){i=e.getBoundingClientRect()}if(!i){return{left:0,top:0}}var n=t.documentElement;var a=t.body;var s=n.clientLeft||a.clientLeft||0;var o=r.pageXOffset||a.scrollLeft;var u=i.left+o-s;var l=n.clientTop||a.clientTop||0;var c=r.pageYOffset||a.scrollTop;var f=i.top+c-l;return{left:Math.round(u),top:Math.round(f)}}function f(e,t){var r={};var i=c(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=i.top;var o=i.left;var u=t.pageY;var l=t.pageX;if(t.changedTouches){l=t.changedTouches[0].pageX;u=t.changedTouches[0].pageY}r.y=Math.max(0,Math.min(1,(s-u+a)/a));r.x=Math.max(0,Math.min(1,(l-o)/n));return r}var d="5.1.1";function h(e){return e.hasOwnProperty("contextmenuUI")&&e.contextmenuUI.hasOwnProperty("menu")&&e.contextmenuUI.menu.el()}function p(e,t){return{left:Math.round(t.width*e.x),top:Math.round(t.height-t.height*e.y)}}function v(r){var i=this;if(h(this)){this.contextmenuUI.menu.dispose();return}var n=f(this.el(),r);var a=this.el().getBoundingClientRect();var s=p(n,a);var o=e.browser.IS_FIREFOX?t.documentElement:t;r.preventDefault();var u=this.contextmenuUI.menu=new l(this,{content:this.contextmenuUI.content,position:s});this.contextmenuUI.closeMenu=function(){e.log.warn("player.contextmenuUI.closeMenu() is deprecated, please use player.contextmenuUI.menu.dispose() instead!");u.dispose()};u.on("dispose",function(){e.off(o,["click","tap"],u.dispose);i.removeChild(u);delete i.contextmenuUI.menu});this.addChild(u);var c=u.el_.getBoundingClientRect();var d=t.body.getBoundingClientRect();if(this.contextmenuUI.keepInside||c.right>d.width||c.bottom>d.height){u.el_.style.left=Math.floor(Math.min(s.left,this.player_.currentWidth()-u.currentWidth()))+"px";u.el_.style.top=Math.floor(Math.min(s.top,this.player_.currentHeight()-u.currentHeight()))+"px"}e.on(o,["click","tap"],u.dispose)}function m(t){var r=this;var i={keepInside:true};t=e.mergeOptions(i,t);if(!Array.isArray(t.content)){throw new Error('"content" required')}if(h(this)){this.contextmenuUI.menu.dispose();this.off("contextmenu",this.contextmenuUI.onContextMenu);delete this.contextmenuUI}var n=this.contextmenuUI=function(){m.apply(this,arguments)};n.onContextMenu=e.bind(this,v);n.content=t.content;n.keepInside=t.keepInside;n.VERSION=d;this.on("contextmenu",n.onContextMenu);this.ready(function(){return r.addClass("vjs-contextmenu-ui")})}e.registerPlugin("contextmenuUI",m);m.VERSION=d;return m})})();(function(){if(f.getPlugin("playerInfo")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsPlayerInfo=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="1.3.0";var i=typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var n;if(typeof e!=="undefined"){n=e}else if(typeof i!=="undefined"){n=i}else if(typeof self!=="undefined"){n=self}else{n={}}var a=n;var s=function(){function e(e){this.value=e}function t(t){var r,i;function n(e,t){return new Promise(function(n,s){var o={key:e,arg:t,resolve:n,reject:s,next:null};if(i){i=i.next=o}else{r=i=o;a(e,t)}})}function a(r,i){try{var n=t[r](i);var o=n.value;if(o instanceof e){Promise.resolve(o.value).then(function(e){a("next",e)},function(e){a("throw",e)})}else{s(n.done?"return":"normal",n.value)}}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":r.resolve({value:t,done:true});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:false});break}r=r.next;if(r){a(r.key,r.arg)}else{i=null}}this._invoke=n;if(typeof t.return!=="function"){this.return=undefined}}if(typeof Symbol==="function"&&Symbol.asyncIterator){t.prototype[Symbol.asyncIterator]=function(){return this}}t.prototype.next=function(e){return this._invoke("next",e)};t.prototype.throw=function(e){return this._invoke("throw",e)};t.prototype.return=function(e){return this._invoke("return",e)};return{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}();var o=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var u=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var l=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var c="unknown";var f=t.getComponent("ModalDialog");var d=t.getComponent("Player");var h=t.dom||t;function p(e,t,r){var i=e;var n=t.split(".");if(!i){return r}for(var a=0;a<n.length;a++){var s=n[a];if(i[s]===undefined){return r}if(a+1<n.length){i=i[s]}else{return i[s]}}}var v={adonly:"Ad-Only",bcPlaylistUi:"Brightcove Playlist UI",chromecastReceiver:"Chromecast Receiver",customEndscreen:"Custom Endscreen",dash:"DASH",eme:"DRM",dvrux:"Live DVRUX",FreeWheelPlugin:"FreeWheel",ima3:"IMA3",onceux:"OnceUX",pip:"Picture-in-Picture",qualityMenu:"Quality Menu",social:"Social",ssai:"SSAI",vr:"VR"};var m=function e(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++){r[i]=arguments[i]}return"<tr>"+r.map(function(e){return"<td>"+e+"</td>"}).join("")+"</tr>"};var g=function(e){u(r,e);function r(){o(this,r);return l(this,e.apply(this,arguments))}r.prototype.buildCSSClass=function t(){return"vjs-player-info-modal "+e.prototype.buildCSSClass.call(this)};r.prototype.dataForPlugins_=function e(){var r=this;return Object.keys(v).filter(function(e){return t.getPlugin?t.getPlugin(e):typeof d.prototype[e]==="function"}).map(function(e){var i=r.player();return{active:i.usingPlugin?i.usingPlugin(e):c,displayName:v[e]||e,version:t.getPluginVersion?t.getPluginVersion(e):p(i,e+".VERSION",c)}})};r.prototype.dataForSource_=function e(){var t=this.player();var r=t.tech_.hls,i=t.mediainfo;var n=p(r,"playlists",{media:function e(){}});var a=n.media();return{mediainfo:i,hls:{bandwidth:p(r,"stats.bandwidth",c),mediaBytesTransferred:p(r,"stats.mediaBytesTransferred",c),mediaTransferDuration:p(r,"stats.mediaTransferDuration",c),mediaRequests:p(r,"stats.mediaRequests",c),rendition:a&&{height:p(a,"attributes.RESOLUTION.height",c),width:p(a,"attributes.RESOLUTION.width",c)}},tech:t.techName_,type:t.currentType()}};r.prototype.data=function e(){var t=this.player();var r=h.getAttributes(t.el());var i=p(t,"bcinfo.accountId",p(r,"data-account",c));var n=p(t,"bcinfo.playerId",p(r,"data-player",c));var s=p(t,"bcinfo.embedId",p(r,"data-embed",c));var o=p(t,"bcinfo.applicationId",p(r,"data-application-id",""));var u=p(a,"bc."+n+"_"+s+".VERSION",p(a,"bc.VERSION",c));var l=p(a,"bc."+n+"_"+s+".videojs.VERSION",p(a,"videojs.VERSION",c));return{player:{accountId:i,playerId:n,embedId:s,applicationId:o,playerVersion:u,videojsVersion:l},plugins:this.dataForPlugins_(),source:this.dataForSource_()}};r.prototype.contentForPlugins_=function e(t){var r=this;var i=('\n <tr>\n <td colspan="3">'+this.localize("No plugins available.")+"</td>\n </tr>\n ").trim();if(t.plugins.length){i=t.plugins.map(function(e){return m(e.displayName,e.version,e.active?r.localize("yes"):r.localize("no"))}).join("")}return("\n <table>\n <thead>\n <tr>\n <th>"+this.localize("Name")+"</th>\n <th>"+this.localize("Version")+"</th>\n <th>"+this.localize("Active")+"</th>\n </tr>\n </thead>\n <tbody>"+i+"</tbody>\n </table>\n ").trim()};r.prototype.contentForSource_=function e(t){var r=["<table><tbody>",m(this.localize("Current Playback Tech"),t.source.tech),m(this.localize("Current Media Type"),t.source.type)];if(t.source.mediainfo){r.push(m(this.localize("Video Name"),t.source.mediainfo.name),m(this.localize("Video ID"),t.source.mediainfo.id))}if(t.source.hls){r.push(m(this.localize("Current Bandwidth"),t.source.hls.bandwidth),m(this.localize("Media Bytes Transferred"),t.source.hls.mediaBytesTransferred),m(this.localize("Media Requests"),t.source.hls.mediaRequests),m(this.localize("Media Transfer Duration"),t.source.hls.mediaTransferDuration));if(t.source.hls.rendition){r.push(m(this.localize("Rendition Width"),t.source.hls.rendition.width),m(this.localize("Rendition Height"),t.source.hls.rendition.height))}}return r.concat("</tbody></table>").join("")};r.prototype.content=function e(){var t=this.data();return[h.createEl("h1",{innerHTML:this.localize("Player Information")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--player",innerHTML:["<h2>"+this.localize("General")+"</h2>","<table><tbody>",m(this.localize("Brightcove Player Version"),t.player.playerVersion),m(this.localize("Video.js Version"),t.player.videojsVersion),m(this.localize("Account ID"),t.player.accountId),m(this.localize("Player ID"),t.player.playerId),m(this.localize("Embed ID"),t.player.embedId),m(this.localize("Application ID"),t.player.applicationId),"</tbody></table>"].join("")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--plugins",innerHTML:["<h2>"+this.localize("Plugins")+"</h2>",this.contentForPlugins_(t)].join("")}),h.createEl("div",{className:"vjs-pi-section vjs-pi-section--source",innerHTML:["<h2>"+this.localize("Source")+"</h2>",this.contentForSource_(t)].join("")})]};return r}(f);t.registerComponent("PlayerInfoModal",g);var y=t.registerPlugin||t.plugin;function _(){var e=this;if(this.playerInfo.modal){this.playerInfo.modal.dispose()}this.playerInfo=function(){_.apply(this,arguments)};this.ready(function(){e.addClass("vjs-player-info");e.playerInfo.modal=e.addChild("playerInfoModal",{fillAlways:true,label:e.localize("Player Information Dialog"),temporary:false});e.playerInfo.modal.on("dispose",function(){delete e.playerInfo})})}y("playerInfo",_);_.VERSION=r;return _})})();(function(){if(f.getPlugin("urlparams")){return}(function(){var e=f.registerPlugin||f.plugin;e("urlparams",function(e){e=e||{};var t=function(e){var t=0,r;e=(e||"").replace(/^\s+|\s+$/g,"");if(!e||!/^(\d+h)?(\d+m)?(\d+s)?$/.test(e)){return-1}r=e.match(/^(\d+)h/);if(r){t+=parseFloat(r[1])*3600;e=e.replace(/^(\d+)h/,"")}r=e.match(/^(\d+)m/);if(r){t+=parseFloat(r[1])*60;e=e.replace(/^(\d+)m/,"")}r=e.match(/^(\d+)s/);if(r){t+=parseFloat(r[1])}return t},r=.9,i=function(e,t){var i=e-t;if(isNaN(i)){return false}return Math.abs(i)<r},n=function(e){a.ready(function(){if(a.networkState()===2){e()}else{a.one("loadedmetadata",function(){a.setTimeout(e,0)})}})},a=this,s=f.bc_.qs(),o=s.hash.t||s.search.t,u;if(typeof e.time==="number"){u=e.time}else{u=t(e.time)}if(o){if(/^[\d]+$/.test(o)){u=Number(o)}else{u=t(o)}if(!e.iframe&&u!==-1){f.log.warn("DEPRECATION: Using the `t` query parameter or URL hash value to set an initial playback start time for advanced, in-page embeds is deprecated and will be removed in Brightcove Player 7. Please add a `data-start-time` attribute going forward!")}}if(u>0){(function(){var t=e.delay||250,r,s=false,o=function(){if(s||i(a.currentTime(),u)){s=true;l()}else{a.currentTime(u);r=a.setTimeout(o,t)}},l=function(){a.clearTimeout(r);a.off("timeupdate",l);if(!s){a.currentTime(u)}};a.on("timeupdate",l);n(o)})()}if(s.hash.captions!==undefined||s.search.captions!==undefined){(function(){var e=s.hash.captions||s.search.captions;a.one("play",function(){var t=a.textTracks(),r,i;if(t){for(i=0;i<t.length;i++){r=t[i];if(r.language===e){r.mode="showing";break}}}})})()}})})()})();(function(){if(f.getPlugin("resizeTextTracks")){return}(function(){var t=f.registerPlugin||f.plugin;t("resizeTextTracks",function(t){if(!t.iframe){return}var r=this,i=f.bc_.debounce(function(){r.textTrackSettings.updateDisplay()},500);f.on(e,"resize",i);r.on("dispose",function(){f.off(e,"resize",i)})})})()})();(function(){if(f.getPlugin("bcAnalytics")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("global/window"),require("global/document"),require("video.js"),require("@brightcove/loscore")):typeof r==="function"&&r.amd?r(["global/window","global/document","video.js","@brightcove/loscore"],t):(e=e||self,e.videojsBcAnalytics=t(e.window,e.document,e.videojs,e.videojs.bc_))})(this,function(e,t,r,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;i=i&&i.hasOwnProperty("default")?i["default"]:i;var n=function(e,t,r){if(r===void 0){r={}}t.forEach(function(t){if(e[t]!==undefined){r[t]=e[t]}});return r};var a=function e(t,n){if(n===void 0){n=[]}var a={};Object.keys(t).forEach(function(s){var o=t[s];n.push(s);if(i.isObj(o)){a=r.mergeOptions(a,e(o,n))}else{a[n.join(".")]=o}n.pop()});return a};var s=function e(t){return t.charAt(0).toUpperCase()+t.slice(1)};var o=function e(t,r){return t+"x"+r};var u={memory:["jsHeapSizeLimit","usedJSHeapSize","totalJSHeapSize"],navigation:["redirectCount","type","directedMigration"],timing:["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"]};var l={bitrate:"bitrates",event:"events"};var c=function(){function t(){this.data_={bitrates:{bitrates:[],playlists:[],rendered:[],throughput:[]},events:[],mr:0,performance:{},content:{},player:{dimensions:[],pixelratio:[],screendimensions:[]},frames:{}}}var c=t.prototype;c.keys=function e(){return Object.keys(this.data_)};c.append=function e(t){t=l.hasOwnProperty(t)?l[t]:t;if(!this.data_.hasOwnProperty(t)){throw new Error('"'+t+'" is not a known QosBuffer key')}for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++){i[n-1]=arguments[n]}this["append"+s(t)+"_"].apply(this,i)};c.flush=function e(){var t=this;for(var n=arguments.length,a=new Array(n),o=0;o<n;o++){a[o]=arguments[o]}if(!a.length){a=this.keys()}for(var u=0;u<a.length;u++){if(!this.data_.hasOwnProperty(a[u])){throw new Error('"'+a[u]+'" is not a known QosBuffer key')}}var l=a.map(function(e){return t["flush"+s(e)+"_"]()});var c=r.mergeOptions.apply(r,l);var f=i.qs().stringify(c).length;if(f>3e3&&c["qos.bitrates"]){c["qos.bitrates"]=JSON.stringify({bitrates:[],playlists:[],rendered:[],throughput:[]})}return c};c.appendBitrates_=function e(t){var r=this;if(typeof t.playlists!=="undefined"){this.data_.bitrates.playlists.push([Date.now(),t.bitrates,t.playlists]);delete t.bitrates;delete t.playlists}Object.keys(t).forEach(function(e){r.data_.bitrates[e].push([Date.now(),t[e]])})};c.appendMr_=function e(t){this.data_.mr=t?1:null};c.appendPerformance_=function t(r){var a=this;var s=e.performance;if(i.isNil(s)){return}Object.keys(u).forEach(function(e){if(!i.isNil(s[e])){a.data_.performance[e]=n(s[e],u[e])}});if(i.isFn(s.measure)){["bcParse","bcInit"].forEach(function(e){s.getEntriesByName(e,"measure").forEach(function(t){a.data_.performance[e]=t.duration})})}if(this.data_.performance.navigation){this.data_.performance.navigation.directedMigration=r?i.qs().parse(r).directedMigration==="true":false}};c.appendFrames_=function e(t){this.data_.frames={dropped:t.droppedVideoFrames,corrupted:t.corruptedVideoFrames,total:t.totalVideoFrames}};c.appendPlayer_=function t(r,i){if(i===void 0){i=Date.now()}this.data_.player.dimensions.push([i,o(r.width,r.height),o(r.computedWidth,r.computedHeight)]);this.data_.player.pixelratio.push([i,e.devicePixelRatio]);this.data_.player.screendimensions.push([i,o(e.screen.width,e.screen.height)])};c.appendEvents_=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}this.data_.events.push({type:r.join("."),time:Date.now()})};c.appendContent_=function e(t){this.data_.content={sourceMimeType:t.sourceMimeType}};c.flushBitrates_=function e(){var t=this.data_.bitrates;var r={};if(t.bitrates.length||t.playlists.length||t.rendered.length||t.throughput.length){r["qos.bitrates"]=JSON.stringify(t)}t.bitrates.length=0;t.playlists.length=0;t.rendered.length=0;t.throughput.length=0;return r};c.flushEvents_=function e(){var t=this.data_.events;var r={};t.forEach(function(e){var t=e.time,i=e.type;var n="qos.events."+i;if(Array.isArray(r[n])){r[n].push(t)}else if(r.hasOwnProperty(n)){r[n]=[r[n],t]}else{r[n]=t}});Object.keys(r).forEach(function(e){if(Array.isArray(r[e])){r[e]=JSON.stringify(r[e])}});t.length=0;return r};c.flushMr_=function e(){return{"qos.mr":this.data_.mr}};c.flushFrames_=function e(){var t=a(this.data_.frames,["qos","frames"]);this.data_.frames={};return t};c.flushPerformance_=function e(){return a(this.data_.performance,["qos","performance"])};c.flushPlayer_=function e(){var t=this.data_.player;var r={};Object.keys(t).forEach(function(e){var i=t[e];if(i.length){r["qos.player."+e]=JSON.stringify(i);i.length=0}});return r};c.flushContent_=function e(){return a(this.data_.content,["qos","content"])};return t}();var f=["ad-playback","ads-ready?","postroll?","preroll?"];var d=function e(t){return t.usingPlugin("ads")?t.ads.state:undefined};var h=function e(t){return t.usingPlugin("ads")&&!!t.adonly};var p=function e(t){return f.indexOf(t)>-1};var v=function e(t){return t.usingPlugin("ads")&&i.isFn(t.ads.inAdBreak)};var m=function e(t){if(!t.usingPlugin("ads")){return false}if(h(t)){return true}if(v(t)){return t.ads.isInAdMode()}return p(t.ads.state)};var g=function e(t,r){if(v(r)&&t&&t.type==="loadstart"){return true}return!m(r)};var y=function e(t){var r={};if(t.ima3){var a=t.ima3.currentAdEventInfo;r.plugin="ima3";if(i.isFn(t.ima3)){return r}r.pluginVersion=t.ima3.VERSION||t.ima3.version;r.adTech=t.ima3.adTech;r.requestMode=t.ima3.settings.requestMode;r.timeout=t.ima3.settings.timeout;if(a){n(a,["adType","adPodLength","adPodId","creativeFormat","creativeLength","creativeId","creativeIndex","creativeUrl","advertiserName","wrapperCreativeIds","dealId","surveyUrl","adId","adTitle","adSystem","adIsciId","creativeAdId"],r);var s=a.creativeIndex;if(s&&s.length){r.firstPlayedAdIndex=s[0]}r.startedInAdPod=a.started;r.completedInAdPod=a.completed}}else if(t.FreeWheelPlugin){r.plugin="freewheel";if(i.isFn(t.FreeWheelPlugin)){return r}r.pluginVersion=t.FreeWheelPlugin.VERSION||t.FreeWheelPlugin.getVersion()}return r};var _=function e(t){t.adBreakIndex=null;t.hasAdBreakStarted=false;t["ads-request"]=null;t["ads-response-received"]=null;t["ads-loading"]=[];t["ads-ad-started"]=[];t["ads-ad-ended"]=[]};var b=function e(){var t={};_(t);return t};var T=function e(t,r,i){var n=t.currentAdSequence_;var a=["ads-loading","ads-ad-started","ads-ad-ended"];if(r==="ads-request"){_(n)}else if(r==="adstart"||r==="ads-loading"){if(!n.hasAdBreakStarted){if(n.adBreakIndex===null){n.adBreakIndex=0}else{n.adBreakIndex++}n.hasAdBreakStarted=true;a.forEach(function(e){n[e].push([])})}}else if(r==="adend"){n.hasAdBreakStarted=false}if(a.indexOf(r)>-1){n[r][n.adBreakIndex].push(i)}else if(r==="ads-request"||r==="ads-response-received"){n[r]=i}};var S="sendBeacon"in e.navigator;var k=e.Set;var w="lbu";var E=4e3;var C=new k;["account","domain","event","player"].forEach(function(e){return C.add(e)});var I=new k;["account","catalog_url","destination","domain","dropped_frames","error_code","event","file_size_bytes","forward_buffer_seconds","load_time_ms","measured_bps","platform","platform_version","player","player_height","player_name","player_width","range","rebuffering_count","rebuffering_seconds","rendition_height","rendition_indicated_bps","rendition_mime_type","rendition_url","rendition_width","response_time_ms","session","start_time_ms","source","time","video","video_duration","video_name","video_seconds_viewed"].forEach(function(e){return I.add(e)});var A=function e(t,r){return Math.floor(t)+".."+(Math.floor(r)-1)};var O=function e(t){var r=2166136261;var i=r;for(var n=0;n<t.length;++n){i^=t.charCodeAt(n);i*=16777619}return i>>>0};var P=function e(t,r){var n=i.qs();Object.keys(r).forEach(function(e){if(i.isNil(r[e])){delete r[e]}});var a=t+"?"+n.stringify(r);if(a.length<=E){return a}Object.keys(r).forEach(function(e){if(!I.has(e)){delete r[e]}});r.usage=w;return t+"?"+n.stringify(r)};var L=function e(t,r,i,n,a){var s=r-t;if(a!==undefined&&a<r){s-=a-t}else if(i!==undefined&&n!==undefined){if(i<t){i=t}if(n>r){n=r}s-=n-i}return s};var x=function e(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++){n[a-1]=arguments[a]}var s=r.mergeOptions.apply(r,[t.params||{}].concat(n));delete t.params;return s};var D=function e(t,r){var n=t.mediainfo;var a=n&&n.duration||t.duration();if(n){if(r.video===undefined){r.video=n.id}if(r.video_name===undefined){r.video_name=n.name}}if(i.isNum(a)&&r.video_duration===undefined){r.video_duration=Math.floor(a);if(r.video_duration<1||r.video_duration===Infinity){r.video_duration=null}}return r};var U=function e(t,r){var i=t.preload();if(typeof i!=="string"){i=t.el().getAttribute("preload")}if(typeof i==="string"&&i.length===0){i="auto"}if(i){r.preload=i}};var R=function(){function a(e,t,r,i){if(i===void 0){i={}}this.baseUrl_=r;this.logger_=i.logger;this.history_=t;this.currentAdSequence_=b();this.player_=e;this.metrics_=[];this.eventCount_=0;this.streamCount_=-1;this.user(i.user||null);this.defaultParams_={domain:"videocloud",platform:"video-js",session:""};for(var n=0;n<3;n++){this.defaultParams_.session+=(Math.random()*4294967295>>>0).toString(16)}this.qos=new c(this);this.resetTimesOf()}var s=a.prototype;s.logger=function e(){if(this.logger_);};s.metrics=function e(){return this.metrics_.map(r.mergeOptions)};s.resetTimesOf=function e(){this.timeOfImpression=null;this.timeOfView=null};s.defaultParams=function e(t){if(t){t=i.isFn(t)?t():t;this.defaultParams_=r.mergeOptions(this.defaultParams_,t)}return this.defaultParams_};s.getSession=function e(){return this.defaultParams_.session};s.user=function e(t){if(t===null||i.isNonEmptyStr(t)||i.isNum(t)){this.user_=t}return this.user_};s.send=function n(a,s){var o;if(a===void 0){a={}}if(s===void 0){s={}}if(this.user()){a.user=O(this.user())}if(i.isNil(a.time)){a.time=Date.now()}s.qos=Array.isArray(s.qos)?s.qos:[];s.qos.push("mr");a=r.mergeOptions(this.defaultParams_,a,(o=this.qos).flush.apply(o,s.qos));a.seq=""+this.eventCount_;this.eventCount_++;if("streamCount"in s){a.seq+="_"+s.streamCount}C.forEach(function(e){if(i.isNil(a[e])){throw new Error('the "'+e+'" param is required')}});var u=P(this.baseUrl_,a);if(s.useSendBeaconOnly){if(S){e.navigator.sendBeacon(u)}else{return null}}else{var l=t.createElement("img");l.src=u}this.metrics_.push(a);this.player_.trigger({params:a,type:"analytics_request"});this.player_.trigger({params:a,type:"analytics_request_"+a.event});return{params:a,url:u}};s.sendCatalog_=function e(t,r){if(r===void 0){r={}}var i=r,n=i.error,a=i.xhr;if(a){var s=["BCOV-Debug-Cache-Stats","BCOV-instance","X-Cache","Via","X-Amz-Cf-Id"];s.forEach(function(e){t[e]=a.getResponseHeader(e)});if(n){n.status=a.status}}if(n){t.error=JSON.stringify(n)}return this.send(t,r)};s.sendVideoImpression=function e(t){if(t===void 0){t={}}var n=x(t,{event:"video_impression"});var a=y(this.player_);if(Object.keys(a).length>0){n.web_ad_info=JSON.stringify(a)}var s=i.isNonEmptyStr(this.player_.currentSrc());if(!s||this.timeOfImpression){return null}if(r.bc_.isNonEmptyStr(this.player_.currentType())){this.qos.append("content",{sourceMimeType:this.player_.currentType()});t.qos=t.qos||["content"]}this.streamCount_++;t.streamCount=this.streamCount_;D(this.player_,n);n.autoplay=this.player_.autoplay();U(this.player_,n);var o=this.send(n,t);if(o){this.timeOfImpression=Number(o.params.time)}return o};s.sendVideoView=function e(t){if(t===void 0){t={}}var r=x(t,{event:"video_view"});var n=i.isNonEmptyStr(this.player_.currentSrc());if(!n||this.timeOfView||!this.timeOfImpression){return null}var a=this.history_;var s=a.first("canplay");var o=a.first("loadstart");var u=a.first("play");if(s){r.load_time_ms=s-this.timeOfImpression}r.start_time_ms=L(u||o,r.time,a.first("adstart",true),a.first("adend",true),a.first("adtimeout",true));D(this.player_,r);t.streamCount=this.streamCount_;var l=this.send(r,t);if(l){this.timeOfView=Number(l.params.time)}return l};s.sendVideoEngagement=function e(t,r,n){if(n===void 0){n={}}var a=x(n,{event:"video_engagement"});var s=r.buffered,o=r.duration,u=r.playbackEndTime,l=r.height,c=r.mediainfo,f=r.playbackRate,d=r.rebufferingCount,h=r.rendition,p=r.playbackStartTime,v=r.rangeStart,m=r.rangeEnd,g=r.stats,y=r.width;var _=u-p;n.qos=n.qos||["bitrates","events","player","frames"];t.length=t.end-t.start;a.player_height=l;a.player_width=y;a.video_duration=o;if(c){a.video=c.id;a.video_name=c.name}if(h){a.rendition_url=h.url;a.rendition_indicated_bps=h.indicatedBPS;a.rendition_mime_type=h.mimeType;a.rendition_height=h.height;a.rendition_width=h.width}if(g){if(!i.isNil(g.mediaRequests)){a.media_requests=g.mediaRequests}if(!i.isNil(g.mediaTransferDuration)){a.media_transfer_duration=g.mediaTransferDuration}if(!i.isNil(g.mediaBytesTransferred)){a.media_bytes_transferred=g.mediaBytesTransferred}if(!i.isNil(g.bandwidth)){a.measured_bps=g.bandwidth}}var b=_/f*1e3;var T=t.end-t.start;var S=100;var k=Math.floor((T-b)/S)*S/1e3;if(d>0){a.rebuffering_count=d}if(k>0){a.rebuffering_seconds=k}if(s){var w=0;for(var E=0;E<s.length;E++){var C=s.start(E);var I=s.end(E);if(u>=C&&u<=I){w=I-u;break}}a.forward_buffer_seconds=w}if(_<1&&!a.rebuffering_seconds){return null}var O=this.history_.filter(function(e){return e.name==="licenserequestattempted"&&e.time>=t.start&&e.time<t.end});if(O.length){a.license_request_attempts=O.length}D(this.player_,a);n.streamCount=this.streamCount_;if(a.video_duration===Infinity){a.video_seconds_viewed=Math.round(_);delete a.video_duration}else if(_>=1){a["qos.derived_range"]=A(p,u);a.range=v+".."+m}return this.send(a,n)};s.sendVideoComplete=function e(t){if(t===void 0){t={}}var r=x(t,{event:"video_complete"});D(this.player_,r);t.streamCount=this.streamCount_;return this.send(r,t)};s.sendError=function e(t){if(t===void 0){t={}}var r=this.player_.error();if(!r){return null}var n=x(t,{event:"error"});var a=i.isFn(this.player_.errors)&&i.isFn(this.player_.errors.getAll)&&this.player_.errors.getAll()||{unknown:{type:"MEDIA_ERR_UNKNOWN"}};if(r&&a.hasOwnProperty(String(r.code))){n.error_code=a[String(r.code)].type}else if(r.type!==undefined){n.error_code=r.type}else{n.error_code=a.unknown.type}D(this.player_,n);t.streamCount=this.streamCount_;return this.send(n,t)};s.sendCatalogRequest=function e(t,r){if(r===void 0){r={}}var i=x(r,{event:"catalog_request",url:t});return this.sendCatalog_(i,r)};s.sendCatalogRequestError=function e(t,r){if(r===void 0){r={}}var i=x(r,{event:"catalog_request_error",url:t});if(r.error){r.error=n(r.error,["code","message","type"])}return this.sendCatalog_(i,r)};s.sendCatalogResponse=function e(t,r){if(r===void 0){r={}}var i=x(r,{event:"catalog_response",url:t});i.time=Date.now();i.response_time_ms=i.time-this.history_.last("catalog_request");return this.sendCatalog_(i,r)};s.sendAdEnd=function e(t){if(t===void 0){t={}}var r=y(this.player_);var i=this.currentAdSequence_["ads-ad-started"];var n=this.currentAdSequence_.adBreakIndex;if(r.plugin!==undefined){if(r.adType==="preroll"&&i.length>0&&i[0].length>0){var a=this.history_.first("play",true);r.prerollDelay=i[0][0]-a;r.firstPlayInSession=a}r.adsRequest=this.currentAdSequence_["ads-request"];r.adsResponseReceived=this.currentAdSequence_["ads-response-received"];r.adsLoading=this.currentAdSequence_["ads-loading"][n];r.adsAdStarted=this.currentAdSequence_["ads-ad-started"][n];r.adsAdEnded=this.currentAdSequence_["ads-ad-ended"][n]}else{r.plugin="unknown"}var s={event:"ad_end",web_ad_info:JSON.stringify(r)};t.streamCount=this.streamCount_;return this.send(D(this.player_,x(t,s)),t)};s.sendAdHardTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,x(t,{event:"ad_hard_timeout"})),t)};s.sendAdStart=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,x(t,{event:"ad_start"})),t)};s.sendAdTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,x(t,{event:"ad_timeout"})),t)};s.sendPlayRequest=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,x(t,{event:"play_request"})),t)};s.sendPlayerInit=function e(t){if(t===void 0){t={}}return this.send(x(t,{event:"player_init"}),t)};s.sendPlayerLoad=function e(t){if(t===void 0){t={}}return this.send(x(t,{event:"player_load"}),t)};return a}();var M=function(e){var t=e.bcAnalyticsLogger&&e.bcAnalyticsLogger();var r=function e(){return t&&t.add.apply(t,arguments)};return r};function j(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var N=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var B=function e(t){return t.map(function(e){return Math.floor(e)}).reduce(function(e,t){var r=e[e.length-1];if(t!==r){e.push(t)}return e},[])};var F=function e(t){return t.reduce(function(e,t){var r=e[e.length-1];if(r){if(r.end+1===t){r.end=t}else{e.push({start:t,end:t})}}else{e.push({start:t,end:t})}return e},[])};var q=function e(t){return t.map(function(e){var t=e.start,r=e.end;var i=r-t;if(i>0){return{start:t,end:r-1,remainder:r}}return{start:t,end:r,remainder:r}})};var V=function e(t){var r=[];var i=t.shift()||{},n=i.start,a=i.end,s=i.remainder;while(N(n)&&N(a)&&N(s)&&n===a&&n===s){var o=t.shift()||{};n=o.start;a=o.end;s=o.remainder}if(t.length===0){r.push(s)}for(var u=0;u<t.length;u++){var l=t[u],c=l.start,f=l.end,d=l.remainder;for(var h=c;h<=(d||f);h++){r.push(h)}}return{start:n,end:a,remainders:r,ranges:t.length}};var H=function e(t){return V(q(F(B(t))))};var z=1;function W(){return z++}var G=[];var Y=function e(t,r,i,n,a){if(a===void 0){a=true}var s=[].concat(i).sort();if(r!=="removeEventListener"){t.off(s,n)}else{s.forEach(function(e){t.removeEventListener(e,n)})}if(!a){return}var o=G.length;var u=function e(){var r=G[o];if(r.context===t&&(r.fn.guid===n.guid||r.fn===n)&&s.every(function(e,t){return r.events[t]})){G.splice(o,1);return"break"}};while(o--){var l=u();if(l==="break")break}};var X=function e(){var t=G.length;while(t--){var r=G.shift(),i=r.context,n=r.mode,a=r.events,s=r.fn;var o="off";if(n==="addEventListener"){o="removeEventListener"}Y(i,o,a,s,false)}};var K=function e(t,r,i,n){var a=[].concat(i).sort();var s={events:a,fn:n,mode:r,context:t};if(r==="one"||r==="onePerSrc"){s.fn=function(){var e="off";if(s.mode==="addEventListener"){e="removeEventListener"}Y(s.context,e,s.events,s.fn);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return n.apply(this,r)};if(!n.guid){n.guid=W()}s.fn.guid=n.guid}G.push(s);if(r==="addEventListener"){s.events.forEach(function(e){s.context.addEventListener(e,s.fn)})}else{s.context[s.mode](s.events,s.fn)}};var $=function e(){var t=G.slice(0);X();t.forEach(function(e){var t=e.context,r=e.mode,i=e.events,n=e.fn;K(t,r,i,n)})};var Q=1e4;var J=function e(t){return Boolean(t.onceux&&t.onceux.currentTime&&t.onceux.timeline)};var Z=function(e){j(t,e);function t(t,r){var i;i=e.call(this)||this;i.player_=t;i.logger_=r;i.stateBySrc_={};i.lastStateRecord_=0;return i}var i=t.prototype;i.logger=function e(){};i.stateBySrc=function e(t){if(t===void 0){t=this.player_.currentSrc()}if(!this.stateBySrc_.hasOwnProperty(t)){this.stateBySrc_[t]={buffered:null,duration:0,end:0,height:0,mediainfo:null,playbackRate:1,rebufferingCount:0,src:t,start:0,width:0,playbackStartTime:0,playbackEndTime:0,stats:null,rendition:null,videoPlaybackQuality:null,times:[]}}var r=this.player_.tech_&&this.player_.tech_.hls;this.stateBySrc_[t].stats=r&&r.stats||null;return this.stateBySrc_[t]};i.clearStateBySrc=function e(t){if(t===void 0){t=this.player_.currentSrc()}delete this.stateBySrc_[t]};i.recordState=function e(){var t=this.player_;var r=this.stateBySrc();r.mediainfo=t.mediainfo;r.playbackEndTime=t.currentTime();r.times.push(r.playbackEndTime);if(J(t)){r.duration=t.onceux.timeline.contentDuration}else{r.duration=t.duration()}r.buffered=t.buffered();r.playbackRate=t.playbackRate()};i.isTracking=function e(){return!!this.timerId_};i.start=function e(t){var r=this;if(t===void 0){t={}}var i=t,n=i.reason,a=i.src;if(!a){a=this.player_.currentSrc()}var s=this.stateBySrc(a);s.playbackStartTime=s.playbackEndTime=this.player_.currentTime();if(J(this.player_)){s.duration=this.player_.onceux.timeline.contentDuration}else{s.duration=this.player_.duration()}s.rebufferingCount=0;this.player_.clearTimeout(this.timerId_);this.timerCreatedAt_=Date.now();this.timerId_=this.player_.setTimeout(function(){return r.stop({src:a,reason:"engagement timer fired"})},Q);return this};i.prepareState_=function e(t){var i=this.player_;var n=this.stateBySrc(t);n.height=Math.round(i.currentHeight());n.width=Math.round(i.currentWidth());var a=i.tech_&&i.tech_.hls;if(a&&a.playlists&&a.playlists.media()){var s=a.playlists.media();var o=n.rendition={url:s.resolvedUri,mimeType:i.currentType()};if(s.attributes){o.indicatedBPS=s.attributes.BANDWIDTH;if(s.attributes.RESOLUTION){o.height=s.attributes.RESOLUTION.height;o.width=s.attributes.RESOLUTION.width}}}n.videoPlaybackQuality=i.getVideoPlaybackQuality();if(n.mediainfo){var u={};Object.keys(n.mediainfo).forEach(function(e){if(!/_/.test(e)){u[e]=n.mediainfo[e]}});n.mediainfo=u}n.times.push(i.currentTime());var l=H(n.times),c=l.start,f=l.end,d=l.remainders,h=l.ranges;n.times=d;return r.mergeOptions({rangeExtras:h,rangeStart:c,rangeEnd:f},n)};i.stop=function e(t){var r=this;if(t===void 0){t={}}if(!t.src){t.src=this.player_.currentSrc()}if(this.isTracking()){this.player_.clearTimeout(this.timerId_);this.timerId_=null;var i=this.stateBySrc(t.src);var n=(i.duration-i.playbackEndTime)*1e3;if(!this.player_.ended()&&n<1500){this.timerId_=true;K(this.player_,"one","ended",function(){r.recordState();r.stop({reason:"content ended after we delayed the engager"})});return this}t.state=this.prepareState_(t.src);t.period=t.period||{};t.period.start=t.period.start||this.timerCreatedAt_;t.period.end=t.period.end||Date.now();this.trigger({type:"engagement",engagement:t})}return this};return t}(r.EventTarget);var ee=["progress","seeking","suspend","timeupdate"];var te=["seek","stable","unstable"];var re=["adend","adscanceled","adserror","adskip","adsready","adstart","adtimeout","contentplayback","contentupdate","nopostroll","nopreroll","readyforpreroll"];var ie=[].concat(r.getTech("Html5").Events);var ne=ie.filter(function(e){return ee.indexOf(e)===-1});var ae=["ads-request","ads-response-received","adstart","ads-loading","ads-ad-started","ads-ad-ended","adend"];var se=["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"];var oe=["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"];var ue=function(){function e(e){this.logger_=e;this.events_=[]}var t=e.prototype;t.add=function e(t,i,n){if(i===void 0){i=Date.now()}var a=r.mergeOptions(n,{name:t,time:i});this.events_.push(a);return i};t.record=function e(t,r){var i=Date.now();this.add(t,i,{adState:d(r),isInAdState:m(r),networkState:se[r.networkState()],readyState:oe[r.readyState()]});return i};t.reset=function e(){this.events_.length=0};t.filter=function e(t){if(!i.isFn(t)){return this.events_.filter(function(e){return e.name===t})}return this.events_.filter(t)};t.map=function e(t){return this.events_.map(t)};t.names=function e(){return this.map(function(e){return e.name})};t.first=function e(t,r){for(var i=0;i<this.events_.length;i++){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};t.last=function e(t,r){var i=this.events_.length;while(i--){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};return e}();var le=function(){function e(){this.log_={}}var t=e.prototype;t.put=function e(t){this.log_[t]=true};t.peek=function e(){return Object.keys(this.log_)};t.flush=function e(){var t=Object.keys(this.log_);this.log_={};return t};return e}();var ce="3.8.7";var fe={production:"https://metrics.brightcove.com/v2/tracker",staging:"http://metrics.aws-qa.rnatest.brightcove.com/v2/tracker"};var de=function e(t,r,n){Object.keys(n).forEach(function(e){r[e]=String(r[e]||"");if(e==="accountId"&&!i.isNonEmptyStr(r[e])){r[e]=String(r.account||"")}if(!i.isNonEmptyStr(r[e])){r[e]=t.getAttribute("data-"+n[e])||""}});return r};var he=function t(r,n){var a=de(r.el(),n,{accountId:"account",applicationId:"application-id",embedId:"embed",playerId:"player",playerName:"name",usage:"usage"}),s=a.accountId,o=a.applicationId,u=a.embedId,l=a.playerId;if(!i.isNonEmptyStr(n.player)){if(e.location.hostname==="players.api.brightcove.com"){n.player="players.api.brightcove.com/"+l+"_"+u;return}n.player="players.brightcove.com/"+s+"/"+l+"_"+u;if(o){n.player+="/"+o}}if(o){if(i.isNonEmptyStr(n.playerName)){n.playerName+=" - "+o}else{n.playerName=o}}};var pe=function e(t){return{computedHeight:t.currentHeight(),computedWidth:t.currentWidth(),height:t.height(),width:t.width()}};var ve=function t(i){if(typeof i==="boolean"){r.log.warn("The __iframe__ option should only be used in tests!");return i}try{return e.parent!==e.self}catch(e){return true}};var me=function n(a){var s=this;if(a===void 0){a={}}var o=false;var u=false;var l={};a=r.mergeOptions(a);a.env=fe.hasOwnProperty(a.env)?a.env:"production";he(this,a);var c=M(this);var f=new Z(this,c);var p=new ue(c);var y=new le;var _=i.isNonEmptyStr(a.usage)?a.usage.split(","):[];_.forEach(function(e){y.put(e)});var b=new R(this,p,i.isNonEmptyStr(a.analyticsUrl)?a.analyticsUrl:fe[a.env],{logger:c,user:a.user});b.defaultParams(function(){var r={account:a.accountId||null,destination:e.location.href,platform_version:a.platformVersion,player:a.player,player_name:a.playerName,source:t.referrer};if(ve(a.__iframe__)){r.destination=t.referrer;if(i.isNonEmptyStr(a.referrer)){r.source=a.referrer}else{try{r.source=e.parent.document.referrer}catch(e){r.source=null}}}return r});K(this,"on","pluginsetup:ads",$);this.bcAnalytics={client:b,engager:f,history:p,settings:a,VERSION:ce};K(this,"on","usage",function(e){if(!e.name){return r.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)});var S=function e(){y.put("unload");f.stop({fromUnload:true,ignoreAdState:true,reason:"unload called"})};K(e,"addEventListener","unload",S);var k=function e(t){if(!g(t,s)){return}var r=p.first("loadstart",v(s));var i=p.first("play");var n=p.last("playing");if((i||n)&&!f.isTracking()&&!s.paused()){f.start({period:{start:i||n},reason:"workflow detected that it is playing"})}if(b.timeOfImpression&&b.timeOfView){return}l.workflow=l.workflow||s.setTimeout(function(){l.workflow=null;r=p.first("loadstart",v(s));i=p.first("play");n=p.last("playing");if((r||i)&&!b.timeOfImpression){b.sendVideoImpression({params:{time:Math.min(r||Infinity,i||Infinity)}})}if(r&&n&&!b.timeOfView){b.sendVideoView({params:{time:n}})}},1)};f.on("engagement",function(t){var r=t.engagement,i=r.fromUnload,n=r.ignoreAdState,a=r.period,o=r.state;var u=m(s);var l={useSendBeaconOnly:i,params:{time:a.end}};if(o.rangeExtras>=2){y.put("disco-engmnt")}var c=y.peek();if(c&&c.length){l.params.usage=c.map(e.encodeURIComponent).sort().join(",")}if(!u||n){b.qos.append("frames",o.videoPlaybackQuality);if(b.sendVideoEngagement(a,o,l)&&!s.paused()){if(u){return}y.flush();f.start({reason:"sent engagement and still playing"})}}});K(this,"on","dispose",function(){X();y.put("disposed");f.stop({ignoreAdState:true,reason:"player disposed"});f.off()});K(this,"on",ne.concat(re,te).concat("sourceunstable"),function(e){p.record(e.type,s)});K(this,"on",ne.concat("ads-ad-started"),function(e){b.qos.append("event",m(s)?"ad":"content",e.type)});K(this,"on",["loadedmetadata","resize"],function(){b.qos.append("player",pe(s))});K(this,"on","fullscreenchange",function(){var e=Date.now();l.fullscreen=s.setTimeout(function(){l.fullscreen=null;b.qos.append("player",pe(s),e)},500)});K(this,"on","mediachange",function(){if(s.tech_.hls){var e=s.tech_.hls.playlists.media();b.qos.append("bitrate",{bitrates:s.tech_.hls.bandwidth,playlists:e&&e.attributes&&e.attributes.BANDWIDTH})}});K(this,"on","ready",function(){K(s.tech_,"on","usage",function(e){if(!e.name){return r.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)});K(s.tech_,"on","bandwidthupdate",function(){b.qos.append("bitrate",{bitrates:s.tech_.hls.bandwidth,throughput:Math.round(s.tech_.hls.throughput)})});K(s.tech_,"on","liveresync",function(){s.trigger({type:"usage",name:"hls-live-resync"})});K(s.tech_,"on","videounderflow",function(){s.trigger({type:"usage",name:"hls-video-underflow"})});K(s.tech_,"on","licenserequestattempted",function(){p.add("licenserequestattempted")});K(s,"on","loadedmetadata",function(){var e=s.textTracks();for(var t=0;t<e.length;t++){if(e[t].label==="segment-metadata"){(function(){var r=e[t];var i=void 0;K(r,"addEventListener","cuechange",function(){var e=r.activeCues[0];if(e){var t=s.tech_.hls.playlists.master.playlists[e.value.playlist];if(i!==t.uri){i=t.uri;if(t.attributes&&t.attributes.BANDWIDTH){b.qos.append("bitrate",{rendered:t.attributes.BANDWIDTH})}}}})})()}}})});K(this,"on","waiting",function(e){if(!u&&!m(s)){f.stateBySrc().rebufferingCount++}});K(this,"on","sourcechanged",function(e,t){var r=t.interimEvents;var i=r[0].event;var n=function e(){if(!u&&!m(s)){f.recordState()}};if(t.from){f.stop({reason:"changing sources",period:{end:r[0].time},ignoreAdState:true,src:t.from});f.clearStateBySrc(t.from)}o=false;u=false;b.resetTimesOf();p.reset();r.forEach(function(e){return p.add(e.event.type,e.time)});k();K(s,"onPerSrc","timeupdate",n);K(s,"onePerSrc","sourceunstable",function(){if(d(s)==="content-resuming"){return}var e=s.currentSrc();f.stop({ignoreAdState:true,reason:"sourceunstable",src:e});if(!m(s)){Y(s,"off","timeupdate",n)}});K(s,"onPerSrc",["loadstart","play","playing"],k);K(s,"onPerSrc",["pause","ratechange"],function(e){if(!u&&!m(s)&&!s.ended()){f.stop({reason:'saw "'+e.type+'"'});if(s.paused()){K(s,"onePerSrc","playing",function(){f.start({reason:"playback began after a pause"})})}else if(e.type==="ratechange"){l.ratechange=s.setTimeout(function(){l.ratechange=null;f.start({reason:"the playback rate changed"})},1)}}});K(s,"onPerSrc","unstable",function(){if(!u&&!m(s)){u=true;f.stop({reason:"seeking"})}});K(s,"onPerSrc","seek",function(){if(u&&!m(s)){u=false;f.start({reason:"stopped seeking"})}});K(s,"onePerSrc","adstart",function(){if(!h(s)){b.sendVideoImpression({params:{time:p.last("adstart",true)-100}})}});K(s,"onPerSrc","adstart",function(){o=s.ended();f.stop({ignoreAdState:true,period:{end:p.last("adstart",true)},reason:"saw adstart"})});K(s,"onePerSrc","adend",function(){if(!s.paused()&&!s.ended()){k()}});K(s,"onPerSrc","adend",function(){if(!o){f.start({reason:'saw "adend"'})}});K(s,"onePerSrc","ended",function(){f.stop({reason:"end of content"});b.sendVideoComplete()})});K(this,"on","catalog_request",function(e){p.record(e.type,s);b.sendCatalogRequest(e.url)});K(this,"on","catalog_request_error",function(e){p.record(e.type,s);b.sendCatalogRequestError(e.url,{error:e.error,xhr:e.response})});K(this,"on","catalog_response",function(e){p.record(e.type,s);b.sendCatalogResponse(e.url,{xhr:e.response})});K(this,"on","play",function(e){if(m(s)){return}var t={params:{time:Date.now()}};if(s.perSourceBehaviors.isSrcStable()){b.sendPlayRequest(t)}else{K(s,"one","sourcechanged",function(){b.sendPlayRequest(t)})}});K(this,"on","error",function(){if(!m(s)){b.sendError()}});K(this,"on","adstart",function(e){b.sendAdStart();l.perSrcDisable=s.setTimeout(function(){l.perSrcDisable=null;s.perSourceBehaviors.disable()},1)});K(this,"on","adend",function(e){b.sendAdEnd();if(l.perSrcDisable){s.clearTimeout(l.perSrcDisable)}else{s.perSourceBehaviors.enable()}});K(this,"on","adtimeout",function(){b.sendAdTimeout()});K(this,"on","ad-hard-timeout",function(){b.sendAdHardTimeout()});K(this,"on",ae,function(e){T(b,e.type,Date.now())});b.qos.append("mr",a.mr);b.sendPlayerInit();b.sendError();K(this,"on","ready",function(){b.defaultParams({feature:h(s)?"adonly":null});b.qos.append("performance",(e.location.href||"").split("?")[1]);b.qos.append("player",pe(s));if("hidden"in t&&"visibilityState"in t){if(t.hidden){s.trigger({type:"usage",name:"document-hidden"})}var r=function e(){s.trigger({type:"usage",name:"document-"+t.visibilityState})};K(t,"addEventListener","visibilitychange",r)}if(t.querySelector(".bc-iframe")){s.trigger({type:"usage",name:"iframe-embed"})}else{s.trigger({type:"usage",name:"inpage-embed"})}b.sendPlayerLoad({qos:b.qos.keys(),params:{usage:y.flush()}})})};me.VERSION=ce;if(r.registerPlugin){r.registerPlugin("bcAnalytics",me)}else{r.plugin("bcAnalytics",me)}return me})})();(function(){if(f.getPlugin("errors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document")):typeof r==="function"&&r.amd?r(["video.js","global/document"],t):e.videojsErrors=t(e.videojs,e.document)})(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="4.2.0";var i=e.getComponent("Flash");var n=!e.browser.IS_IPHONE;var a=e.registerPlugin||e.plugin;var s={header:"",code:"",message:"",timeout:45*1e3,dismiss:n,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are "+"connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how "+"to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"Could not download the video"},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"},FLASHLS_ERR_CROSS_DOMAIN:{headline:"The video could not be loaded: crossdomain access denied."}}};var o=function n(a,o){var u;var l;var c;var f=[];var d=function t(r){o.errors=e.mergeOptions(o.errors,r);Object.keys(o.errors).forEach(function(e){var t=o.errors[e];if(!t.type){t.type=e}})};d();var h=function e(){a.clearTimeout(l);if(c){c=false;a.removeClass("vjs-waiting")}l=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}c=true;a.addClass("vjs-waiting")},1e3);a.clearTimeout(u);u=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},o.timeout);if(a.error()&&a.error().code===-2){a.error(null)}};var p=function e(){var t;while(f.length){t=f.shift();a.off(t[0],t[1])}a.clearTimeout(u);a.clearTimeout(l)};var v=function e(t,r){var i=function e(){if(!a.error()){var t=a.$(".vjs-tech");if(t&&t.type==="application/x-shockwave-flash"&&!t.vjs_getProperty){a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});return}if(a.paused()){return h()}if(a.ended()){return h()}}r.call(this)};a.on(t,i);f.push([t,i])};var m=function e(){var t=0;p();h();v(["timeupdate","adtimeupdate"],function(){var e=a.currentTime();if(e!==t){t=e;h()}})};var g=function e(){if(!a.currentSrc()){a.error({code:-1,type:"PLAYER_ERR_NO_SRC"})}};var y=function r(){var n="";var s=a.error();var u=t.createElement("div");var l="";if(!s){return}s=e.mergeOptions(s,o.errors[s.code||s.type||0]);if(s.message){n='<div class="vjs-errors-details">'+a.localize("Technical details")+'\n : <div class="vjs-errors-message">'+a.localize(s.message)+"</div>\n </div>"}if(s.code===4&&i&&!i.isSupported()){var c=a.localize("If you are using an older browser please try upgrading or installing Flash.");n+='<span class="vjs-errors-flashmessage">'+c+"</span>"}var f=a.getChild("errorDisplay");u.className="vjs-errors-dialog";u.id="vjs-errors-dialog";l='<div class="vjs-errors-content-container">\n <h2 class="vjs-errors-headline">'+this.localize(s.headline)+"</h2>\n <div><b>"+this.localize("Error Code")+"</b>: "+(s.type||s.code)+"</div>\n "+n+"\n </div>";var d=f.closeable(!("dismiss"in s)||s.dismiss);if(d){l+='<div class="vjs-errors-ok-button-container">\n <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n </div>";u.innerHTML=l;f.fillWith(u);f.contentEl().firstChild.appendChild(f.getChild("closeButton").el());var h=f.el().querySelector(".vjs-errors-ok-button");a.on(h,"click",function(){f.close()})}else{u.innerHTML=l;f.fillWith(u)}if(a.currentWidth()<=600||a.currentHeight()<=250){f.addClass("vjs-xs")}f.one("modalclose",function(){return a.error(null)})};var _=function e(){p();a.removeClass("vjs-errors");a.off("play",m);a.off("play",g);a.off("dispose",e);a.off(["aderror","error"],y)};var b=function t(r){_();n(a,e.mergeOptions(s,r))};b.extend=function(e){return d(e)};b.getAll=function(){return e.mergeOptions(o.errors)};b.timeout=function(e){if(typeof e==="undefined"){return o.timeout}if(e!==o.timeout){o.timeout=e;if(!a.paused()){m()}}};b.disableProgress=function(){};a.on("play",m);a.on("play",g);a.on("dispose",_);a.on(["aderror","error"],y);a.ready(function(){a.addClass("vjs-errors")});if(!a.paused()){m()}b.VERSION=r;a.errors=b};var u=function t(r){o(this,e.mergeOptions(s,r))};["extend","getAll"].forEach(function(t){u[t]=function(){e.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}});u.VERSION=r;a("errors",u);return u})})();(function(){if(f.getPlugin("catalog")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("@brightcove/loscore"),require("global/window"),require("global/document")):typeof r==="function"&&r.amd?r(["video.js","@brightcove/loscore","global/window","global/document"],t):e.videojsBcCatalog=t(e.videojs,e.videojs.bc_,e.window,e.document)})(this,function(e,t,r,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;i=i&&i.hasOwnProperty("default")?i["default"]:i;var n="3.28.1";var a="video";var s="playlist";var o="search";var u="lazySequence";var l="related";var c=[{attr:"data-video-id",query:"videoId",config:"videoId",type:a},{attr:"data-playlist-id",query:"playlistId",config:"playlistId",type:s},{attr:"data-catalog-search",query:"catalogSearch",config:"search",type:o},{attr:"data-catalog-sequence",query:"catalogSequence",config:"sequence",type:u}];var f=function e(t,r,i){for(var n=0;n<c.length;n++){var a=c[n];var o=a[t];if(r[o]){var u={id:r[o],type:a.type};if(u.type===s){u.playlistVideoId=i}return u}}};var d=function r(i,n,a){var s=n.options_;var l=Boolean(n.el().ownerDocument.querySelector(".bc-iframe"));var d=t.qs();a=a?d.parse(a):d.search;c.concat({query:"playlistVideoId"}).forEach(function(e){var t=e.query;if(Array.isArray(a[t])){a[t]=a[t].pop()}});if(c.filter(function(e){return!!i[e.config]}).length>1||c.filter(function(e){return!!s[e.attr]}).length>1){n.error({headline:"Bad Request: Multiple catalog media queries provided. Please only provide one",type:"PLAYER_ERR_CONFLICTING_DATA",code:-3,message:"Too many catalog media parameters were provided in this player. "+"Please use only one of the following: videoId, playlistId, catalogSequence, or catalogSearch."});return}var h=l&&f("query",a,a.playlistVideoId)||f("attr",s,s["data-playlist-video-id"]||a.playlistVideoId)||f("config",i,a.playlistVideoId||i.playlistVideoId);if(!h){return}if(typeof h.id==="string"&&(h.type===o||h.type===u)){var p=h.id;try{h.id=JSON.parse(p)}catch(t){if(h.type===u){e.log.error("sequence must be valid JSON or an object",t);return}}if(!t.isObj(h.id)&&!Array.isArray(h.id)){h.id=p}}["adConfigId","deliveryConfigId"].forEach(function(e){var r=i[e];if(!t.isNonEmptyStr(r)){return}if(t.isObj(h.id)){h.id[e]=r}else if(Array.isArray(h.id)){h.id.forEach(function(t){t[e]=r})}else{h[e]=i[e]}});return h};var h=function e(r){if(!t.isFn(r.errors)||!t.isFn(r.errors.extend)){return}r.errors.extend({VIDEO_CLOUD_ERR_ACCOUNT_NOT_FOUND:{headline:"The Video Cloud account was not found."},VIDEO_CLOUD_ERR_RESOURCE_NOT_FOUND:{headline:"The Video Cloud resource was not found."},VIDEO_CLOUD_ERR_VIDEO_NOT_FOUND:{headline:"The Video Cloud video was not found."},VIDEO_CLOUD_ERR_NOT_PLAYABLE:{headline:"The Video Cloud video is not playable."},VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND:{headline:"The Video Cloud SSAI ad config id was not found."}})};var p={403:{ACCESS_DENIED:{DOMAIN:"PLAYER_ERR_DOMAIN_RESTRICTED",CLIENT_IP:"PLAYER_ERR_IP_RESTRICTED",CLIENT_GEO:"PLAYER_ERR_GEO_RESTRICTED"},VIDEO_NOT_PLAYABLE:"VIDEO_CLOUD_ERR_NOT_PLAYABLE"},404:{ACCOUNT_NOT_FOUND:"VIDEO_CLOUD_ERR_ACCOUNT_NOT_FOUND",RESOURCE_NOT_FOUND:"VIDEO_CLOUD_ERR_RESOURCE_NOT_FOUND",VIDEO_NOT_FOUND:"VIDEO_CLOUD_ERR_VIDEO_NOT_FOUND"},400:{AD_CONFIG_NOT_FOUND:"VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND"}};var v=function e(r,i){var n=i.shift();if(t.isNonEmptyStr(r[n])){return r[n]}if(!n||!r[n]){return"unknown"}return e(r[n],i)};var m=function e(t,r){r=Array.isArray(r)?r[0]:r||{};return{code:v(p,[t,r.error_code,r.error_subcode])}};var g=function t(r,i,n){if(n.embedHasPoster){r.poster=i.options_.poster}if(n.embedHasSources){r.sources=i.options_.sources}if(n.embedHasTracks){r.textTracks=i.options_.tracks}if(r.textTracks&&r.textTracks.length>0&&e.browser.IS_ANY_SAFARI){i.$(".vjs-tech").setAttribute("crossorigin","anonymous")}return r};var y=function e(t,r){return function(e,i){if(e){e.data=i;t.catalog.error=e;t.error(m(e.status,i));return t.trigger("bc-catalog-error")}t.ready(function(){return t.catalog.load(r(i))})}};var _=function t(r,i,n){if(r===a){return y(i,function(e){return g(e,i,n)})}return y(i,function(t){var a=g({},i,n);if(Array.isArray(t.videos)){var o=t.videos[0]||{};t.videos[0]=e.mergeOptions(o,a,{rawItem:o})}else{t.videos=[a]}if(n.playlistVideoId&&r===s){for(var u=0;u<t.length;u++){if(t[u].id===n.playlistVideoId||"ref:"+t[u].referenceId===n.playlistVideoId){t.startingIndex=u;break}}}return t})};var b=function e(){return Number.MAX_SAFE_INTEGER||Math.pow(2,53)-2};var T=function e(t,r){var i=t.cuePoints;var n=i[r];var a;for(r++;r<i.length;r++){if(i[r].time>n.time){a=i[r];break}}var s=isFinite(t.duration)?t.duration:b();n.startTime=n.time;if(a&&a.time<s){n.endTime=a.time}else{n.endTime=s}return n};var S=function e(t){var r=t.remoteTextTracks();if(r){var i=r.length;while(i--){t.removeRemoteTextTrack(r[i])}}var n=t.textTracks();if(n){var a=n.length;while(a--){var s=n[a];if(s.kind==="metadata"&&s.cues){var o=s.cues.length;while(o--){s.removeCue(s.cues[o])}}s.mode="disabled"}}};var k=function e(t,i){S(t);if(!i.cuePoints){return}var n=t.mediaCuePointsTrack();var a=r.VTTCue||r.vttjs&&r.vttjs.VTTCue||r.TextTrackCue;for(var s=0;s<i.cuePoints.length;s++){var o=i.cuePoints[s];var u=new a(o.startTime,o.endTime,o.type);u.originalCuePoint=o;n.addCue(u)}n.mode="hidden"};var w=function e(t,r,i){var n=0;for(;n<t.length;n++){if(r(t[n])){return t[n]}}return i};function E(e){var t=E.windowLocationProtocol();var r=function e(r){return r.src&&r.src.indexOf(t)===0};if(e&&e.length&&e.length>0){return w(e,r,e[0]).src}}E.windowLocationProtocol=function(){return r.location.protocol};var C=function e(t){return r.encodeURIComponent(t)};var I=function e(r){var i={ad_config_id:"adConfigId",config_id:"deliveryConfigId"};var n=["ad_config_id","config_id","tveToken"];if(r.type!==a){n.push("limit");n.push("offset")}if(r.type===o){n.push("q");n.push("sort")}var s={};n.forEach(function(e){var t=i[e]||e;if(r[t]){s[e]=r[t]}});var u=t.qs().stringify(s);return u?"?"+u:""};var A=function e(t){var r=t.accountId,i=t.baseUrl,n=i===void 0?"https://edge.api.brightcove.com/playback/v1":i,a=t.type;if(n.slice(-1)==="/"){n=n.slice(0,-1)}var u;u=n+"/accounts/"+C(r)+"/"+(a===s?"playlists":"videos");if(a!==o){u+="/"+C(t.id)}if(a===l){u+="/related"}u+=I(t);return u};var O=function r(i,n,u){if(u===void 0){u=function e(){}}var c=n.accountId,f=n.deliveryConfigId,d=n.adConfigId,h=n.id,p=n.policyKey,v=n.q,m=n.type;if(!c||!p||!m){return u(new Error("accountId, policyKey, and type are required"))}if(m===o&&!v){return u(new Error("q is required when performing a search"))}else if(m!==o&&!h){return u(new Error("id is required when getting a video or playlist"))}var g=A(n);var y=function e(r,n){i.trigger(t.assign({type:"catalog_"+r,accountId:c,deliveryConfigId:f,adConfigId:d,playlistId:m===s?h:undefined,related:m===l?h:undefined,search:m===o?v:undefined,url:g,videoId:m===a?h:undefined},n))};var _=function e(t,r,i){return y("request_error",{error:t,response:r,body:i})};y("request");var b={Accept:"application/json;pk="+p};var T=e.xhr({headers:b,json:true,url:g},function(e,t,r){if(e){_(e,T,r);return u(e,r)}if(T.status>=400){_(new Error("Request Failed"),T,r);return u(T,r)}y("response",{response:T});u(null,r)});var S=T.onabort.bind(T);T.onabort=function(){var e=new Error("Request Aborted");S();_(e,T,null);return u(e,null)};return T};var P=function e(){var t=r.GestureEvent;return!!(t&&r.WebKitMediaKeys&&r.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4"))};var L=function e(t){return t==="application/vnd.apple.mpegurl"||t==="application/x-mpegURL"};var x=function t(r){var i=e.parseUrl(r);return i.hostname.indexOf("boltdns.net")!==-1&&i.pathname.indexOf("/aes128/")!==-1};var D=function e(t){return t.isSecureContext||!/^http:/.test(t.location.href)};var U={isSafariWithFairplaySupport:P,isHlsType:L,isBoltEncryptedHls:x,preferHttps:D};var R="https://fps.brightcove.com/v1/application_certificate";var M="com.apple.fps.1_0";var j=function e(t){return r.btoa(String.fromCharCode.apply(null,t))};var N=function e(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))};var B=function e(t){var r=t.source,i=t.publisherId,n=t.applicationId;var a=r.key_systems[M].certificate_url;if(a){return a}if(n&&i){return R+"/"+i+"/"+n}return null};var F=function t(r,i){var n=B({source:r.source,publisherId:r.publisherId,applicationId:r.applicationId});e.xhr({uri:n,responseType:"arraybuffer"},function(e,t,r){if(e){i(e);return}i(null,new Uint8Array(r))})};var q=function e(t,r){return N(r).split("//")[1]};var V=function t(r){return function(t,i,n,a){var s={"Content-Type":"application/json",Accept:"application/octet-stream"};if(t.emeHeaders&&t.emeHeaders["BCOV-Auth"]){s["BCOV-Auth"]=t.emeHeaders["BCOV-Auth"]}e.xhr({uri:r,method:"POST",responseType:"arraybuffer",json:{publisher_id:t.publisherId,application_id:t.applicationId,key_id:i.split("/")[3],server_playback_context:j(n)},headers:s},function(e,t,r){if(e){a(e);return}a(null,r)})}};var H={getCertificateUri:B,getCertificate:F,getContentId:q,createGetLicenseFunc:V,base64EncodeUint8Array:j,FAIRPLAY_KEY_SYSTEM:M};var z=function e(t){if(t===void 0){t=[]}return t.filter(function(e){return e.keySystems&&e.keySystems[H.FAIRPLAY_KEY_SYSTEM]})};var W=function e(t,r,i){var n=z(r);if(!n.length||!t.eme){i();return}var a=t.eme.options||{};var s=0;var o=[];var u={};var l=function e(t){var r=n[t];var l=H.getCertificateUri({source:r,publisherId:a.publisherId,applicationId:a.applicationId});if(!l){return"continue"}if(u[l]){u[l].push(r);return"continue"}s++;u[l]=[r];r.keySystems[H.FAIRPLAY_KEY_SYSTEM].getCertificate({source:r,publisherId:a.publisherId,applicationId:a.applicationId},function(e,t){if(e){o.push({message:"Unable to resolve FairPlay certificate",error:e})}else{var r=u[l];for(var n=0;n<r.length;n++){var a=r[n];a.keySystems[H.FAIRPLAY_KEY_SYSTEM].getCertificate=function(e,r){r(null,t)}}}s--;if(!s){if(o.length){i(o);return}i()}})};for(var c=0;c<n.length;c++){var f=l(c);if(f==="continue")continue}};var G=function e(t){if(!U.isHlsType(t.type)||!t.key_systems||!t.key_systems[H.FAIRPLAY_KEY_SYSTEM]){return null}var r=t.key_systems[H.FAIRPLAY_KEY_SYSTEM];var i=r.key_request_url;var n={};n[H.FAIRPLAY_KEY_SYSTEM]={getCertificate:H.getCertificate,getLicense:H.createGetLicenseFunc(i),getContentId:H.getContentId};return n};var Y=function e(t){return G(t)};var X={getKeySystemOptions:Y,getFairPlaySources:z,resolveFairPlayCertificates:W};var K=function e(t,r){r=r||t&&t.mediainfo||{};return t&&t.hasPlugin&&t.hasPlugin("vr")&&r&&r.projection};var $=50*1024*1024;var Q=3*1024*1024;var J=.5*1024*1024;var Z={http:{nativeHls:{http:{"application/vnd.apple.mpegurl":1,"video/mp4":5,"application/dash+xml":3},https:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":4}},noNativeHls:{http:{"application/vnd.apple.mpegurl":1,"video/mp4":5,"application/dash+xml":3},https:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":4}},preferMp4:{http:{"application/vnd.apple.mpegurl":3,"video/mp4":1,"application/dash+xml":5},https:{"application/vnd.apple.mpegurl":4,"video/mp4":2,"application/dash+xml":6}}},https:{nativeHls:{http:{"application/vnd.apple.mpegurl":2,"video/mp4":6,"application/dash+xml":5},https:{"application/vnd.apple.mpegurl":1,"video/mp4":4,"application/dash+xml":3}},noNativeHls:{http:{"application/vnd.apple.mpegurl":5,"video/mp4":4,"application/dash+xml":6},https:{"application/vnd.apple.mpegurl":1,"video/mp4":3,"application/dash+xml":2}},preferMp4:{http:{"application/vnd.apple.mpegurl":5,"video/mp4":4,"application/dash+xml":6},https:{"application/vnd.apple.mpegurl":2,"video/mp4":1,"application/dash+xml":3}}}};var ee={1:3,2:3.2,3:4.2,4:5,5:6,6:7,7:8};var te=function e(t,r){return r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&U.isSafariWithFairplaySupport()&&t.eme&&t.eme.options};var re=function t(r,i,n){if(!i.src){return 9999}if(i.type==="application/vnd.apple.mpegurl"&&i.key_systems&&!te(n,i)){return 9999}if(i.profiles&&i.profiles.match(/hbbtv/i)){return 9999}if(e.browser.IS_IOS&&i.type==="application/vnd.apple.mpegurl"&&ee[i.ext_x_version]>parseFloat(e.browser.IOS_VERSION)){return 9999}r=r[/^[^:]*/.exec(i.src)];if(!r){return 9999}return r[i.type]||9999};var ie=function t(r,i,n,a){var s=ne.preferHttps()?Z.https:Z.http;var o;var u;if(K(r,i)){o=$}else if(e.browser.IS_IOS||e.browser.IS_ANDROID){o=J}else{o=Q}if(ne.preferMp4(r,i)){s=s.preferMp4}else if(ne.supportsNativeHls()){s=s.nativeHls}else{s=s.noNativeHls}u=re(s,n,r)-re(s,a,r);if(u){return u}if(n.type==="video/mp4"&&a.type==="video/mp4"){if(n.avg_bitrate&&a.avg_bitrate){return Math.abs(n.avg_bitrate-o)-Math.abs(a.avg_bitrate-o)}if(n.avg_bitrate||a.avg_bitrate){u=n.avg_bitrate?-1:1}}if(n.type==="application/vnd.apple.mpegurl"&&a.type==="application/vnd.apple.mpegurl"){if(n.ext_x_version&&a.ext_x_version){return a.ext_x_version-n.ext_x_version}if(n.ext_x_version||a.ext_x_version){u=n.ext_x_version?-1:1}}return u};function ne(r,i,n){if(n===void 0){n={}}var a=i.sources||[];var s=[];var o=n,u=o.bcovAuthToken;if(u&&!t.isNonEmptyStr(u)){e.log.error("The bcovAuthToken catalog property must be a string");u=null}for(var l=0;l<a.length;l++){var c=a[l];if(u&&c.key_systems){c.emeHeaders={"BCOV-Auth":u}}if(c.src&&c.container==="MP4"){c.type="video/mp4"}else if(c.src&&(c.container==="M2TS"||U.isHlsType(c.type))){c.type="application/vnd.apple.mpegurl";if(te(r,c)){c.keySystems=X.getKeySystemOptions(c)}if(U.isBoltEncryptedHls(c.src)&&u){if(c.vmap&&r.hasPlugin("ssai")){c.bcovAuthToken=u}else{var f=e.parseUrl(c.src);var d="bcov_auth="+u;if(!f.search){d="?"+d}else if(!(f.search[f.search.length-1]==="&")){d="&"+d}c.src+=d}}}s.push(c)}return s.sort(ie.bind(null,r,i))}ne.supportsNativeHls=function(){var t=i.createElement("video");var r=e.options.hls&&e.options.hls.overrideNative;if(t&&t.canPlayType){return!r&&/probably|maybe/i.test(t.canPlayType("application/vnd.apple.mpegurl"))}return false};ne.preferHttps=function(){return U.preferHttps(r)};ne.preferMp4=function(t,r){return e.browser.IS_ANDROID&&e.browser.ANDROID_VERSION<5||K(t,r)};var ae={};var se=function e(r,i,n){var a=t.assign({},ae);if(r&&!t.isObj(r)){a.id=r}else{t.assign(a,r);if(t.isObj(r.id)){t.assign(a,r.id);if(!r.id.hasOwnProperty("id")){delete a.id}}}if(typeof i==="string"){a.type=i}if(a.type===o){if(!a.q){a.q=a.id}delete a.id}if(typeof r.deliveryConfigId==="string"){a.deliveryConfigId=r.deliveryConfigId}if(typeof n==="string"){a.adConfigId=n}if((a.type===s||a.type===o)&&a.limit===undefined){a.limit="100"}return a};var oe=function e(r){if(r===null){ae={}}else{t.assign(ae,r)}};var ue=/([A-Za-z0-9])_([A-Za-z0-9])/g;var le=function e(t){return t.replace(ue,function(e,t,r){return t+r.toUpperCase()})};var ce=function t(r){var i=e.mergeOptions(r);Object.keys(i).filter(function(e){return e.match(ue)}).forEach(function(e){i[le(e)]=i[e]});return i};var fe=function e(t,r){if(!r){return}t.mediainfo=ce(r);var n=Boolean(t.el().ownerDocument.querySelector(".bc-iframe"));var a=t.mediainfo.name;if(n&&a){i.title=a}};var de=function e(t,r){if(!r){return}t.playlistinfo=ce(r);delete t.playlistinfo.videos};var he=function e(t,r){return(t.type==="application/vnd.apple.mpegurl"||t.type==="application/dash+xml")&&r.toLowerCase()==="html5"};function pe(r){var i=this;var n=t.assign({accountId:i.options_["data-account"],policyKey:i.options_["data-policy-key"]},r);var l=["accountId","baseUrl","policyKey"].reduce(function(e,t){if(n[t]){e[t]=n[t]}return e},{});oe(l);h(i);i.on("loadstart",function(){if(!t.isFn(i.playlist)||!i.playlist()||!i.playlist().length){return}fe(i,i.playlist()[i.playlist.indexOf(i.currentSrc())])});i.on("dispose",function(){return S(i)});var c=function t(r,n){var a=X.getFairPlaySources(r);if(!a.length){n();return}X.resolveFairPlayCertificates(i,a,function(t){if(t){e.log("Unable to resolve FairPlay certificates",t)}n()})};var f=function t(r){if(!i.hasPlugin||!i.hasPlugin("ssai")||!r){return r}return r.map(function(t){if(t.vmap){t.type=e.getPlugin("ssai").MIME_TYPE;t.originalHlsSource=t.src;t.src=t.vmap}return t})};var p=function e(t){var r=function e(){var r=false;fe(i,t);if(K(i)){var n=i.el().querySelector("video");n.setAttribute("crossorigin","anonymous")}i.el().setAttribute("data-video-id",t.id);i.poster(t.poster);if(t.sources){for(var a=0;a<t.sources.length;a++){if(t.sources[a].vmap!==undefined){r=true;break}}}if(r&&i.onceux!==undefined){i.onceux.loadSourcesFromCatalog(t.sources)}else{if(r){t.sources=f(t.sources)}i.src(t.sources)}k(i,t);if(t.textTracks){for(var s=0;s<t.textTracks.length;s++){i.addRemoteTextTrack(t.textTracks[s])}}};c(t.sources,r)};var v=function e(t){var r=function e(){i.on("beforeplaylistitem",function(e,t){return k(i,t)});for(var r=0;r<t.length;r++){t[r].sources=f(t[r].sources)}var n=t.startingIndex||0;fe(i,t[n]);de(i,i.catalog.data);if(K(i)){var a=i.el().querySelector("video");a.setAttribute("crossorigin","anonymous")}i.playlist(t,n)};var n=t.filter(function(e){return e.sources}).reduce(function(e,t){return e.concat(t.sources)},[]);c(n,r)};var g=function e(t,n){var a;var s=ce(t);if(s.sources){s.rawSources_=s.sources;s.sources=(r.getSources||ne)(i,s,n);a=i.selectSource(s.sources)}if(s.posterSources){s.poster=E(s.posterSources)}if(s.thumbnailSources){s.thumbnail=E(s.thumbnailSources)}if(s.textTracks){var o=a&&he(a.source,a.tech);s.textTracks=s.textTracks.filter(function(e){return!(o&&e.in_band_metadata_track_dispatch_type!==undefined)}).map(function(e){if(e.sources){e.src=E(e.sources)}return e})}if(s.duration){s.duration=s.duration*.001}if(s.cuePoints){for(var u=0;u<s.cuePoints.length;u++){T(s,u)}}return s};i.catalog={transformCatalogError:m,transformVideoResponse:g,mediaCuePointsTrack:function t(){if(!i.catalog.mediaCuePointsTrack.hasWarned_){e.log.warn("player.catalog.mediaCuePointsTrack() is deprecated, please use player.mediaCuePointsTrack() instead!");i.catalog.mediaCuePointsTrack.hasWarned_=true}return i.mediaCuePointsTrack()},get:function e(r,n){r=se(r);if(i.catalog.tveToken){r.tveToken=i.catalog.tveToken}i.catalog.loading++;var s;var u=new t.Promise(function(e,t){s=O(i,r,function(n,s){i.catalog.loading--;if(r.type===o&&s&&(!s.videos||!s.videos.length)){n=new Error("No videos returned from search")}if(n){n.data=s;i.catalog.error=n;return t(n)}if(!s){return e(null)}i.catalog.data=s;var u={};if(r.bcovAuthToken){u.bcovAuthToken=r.bcovAuthToken}if(r.type===a){i.catalog.sources=s.sources;i.catalog.poster=s.poster;return e(g(s,u))}return e(s.videos.map(function(e){return g(e,u)}))})});if(!t.isFn(n)){return u}u.then(function(e){n(null,e)}).catch(function(e){n(e,e.data)});return s},getVideo:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(se(t,a,i),r)},getSequence:function t(r,n,a){var s=this;if(n===void 0){n=function e(){}}if(!Array.isArray(r)){r=[r]}r=r.filter(function(t){if(!/^(search|video|playlist)$/i.test(t.type)){e.log.error("invalid sequence type, please use search, video, or playlist. for:",t);return false}return true});if(!r.length){n(new Error("No valid sequences"),null);return}var o=r.length;var u=new Array(r.length);return r.map(function(t,l){return s.get(se(t,t.type,a),function(a,s){o--;if(a){e.log.error("failed to request sequence",t);e.log.error("with error",a)}else if(s){if(!Array.isArray(s)){s=[s]}u[l]=s}if(o===0){i.catalog.data=u;var c=u.reduce(function(e,t){return t&&e.concat(t)},[]);if(!c.length){n(new Error("No data was loaded for the sequence "+JSON.stringify(r),null))}else{n(null,c)}}},a)})},getLazySequence:function e(t,r,n){var a=this;if(r===void 0){r=function e(){}}if(!Array.isArray(t)){t=[t]}var s=function e(r){return a.getSequence(t.shift(),function(i,n){if((i||!n)&&t&&t.length){return e(r)}r(i,n)},n)};var o=function e(){if(!t.length){i.off("playlistitem",e);return}var r=i.playlist;var n=r.currentIndex&&r.currentIndex()||r.currentItem&&r.currentItem()||0;var a=r.lastIndex&&r.lastIndex()||r().length-1||0;if(n!==a){return}s(function(e,t){if(e||!t){return}i.playlist(i.playlist().concat(t),n)})};i.on("playlistitem",o);return s(r)},getSearch:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(se(t,o,i),r)},getPlaylist:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(se(t,s,i),r)},load:function e(t){if(Array.isArray(t)){v(t)}else{p(t)}},autoFindAndLoadMedia:function e(t){var r=d(t,i);if(!r){return}t.playlistVideoId=r.playlistVideoId;var n=_(r.type,i,t);if(r.type===u){this.getLazySequence(r.id,n)}else{this.get(se(r),n)}return r},loading:0}}e.registerPlugin("catalog",pe);pe.VERSION=n;return pe})})();(function(){if(f.getPlugin("touchActive")){return}(function(e,t){var r=f.registerPlugin||f.plugin;r("touchActive",function(){if(!f.browser.TOUCH_ENABLED){return}var e=this,t=false,r=function(){if(!t){e.userActive(false)}};e.one("play",function(){var i=e.options_.inactivityTimeout>0?e.options_.inactivityTimeout:5e3;e.el().className+=" vjs-user-active";e.one(["click","tap"],function(){t=true});e.setTimeout(r,i)})})})(e,t)})();(function(){if(f.getPlugin("playlist")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):(e=e||self,e.videojsPlaylist=t(e.videojs))})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var r=function e(t){var r=t.playlist.autoadvance_;if(r.timeout){t.clearTimeout(r.timeout)}if(r.trigger){t.off("ended",r.trigger)}r.timeout=null;r.trigger=null};var i=function e(i,n){r(i);if(!t(n)){i.playlist.autoadvance_.delay=null;return}i.playlist.autoadvance_.delay=n;i.playlist.autoadvance_.trigger=function(){var t=function t(){return e(i,n)};i.one("play",t);i.playlist.autoadvance_.timeout=i.setTimeout(function(){r(i);i.off("play",t);i.playlist.next()},n*1e3)};i.one("ended",i.playlist.autoadvance_.trigger)};var n=function e(t){var r=t.remoteTextTracks();var i=r&&r.length||0;while(i--){t.removeRemoteTextTrack(r[i])}};var a=function e(t,r){var a=!t.paused()||t.ended();t.trigger("beforeplaylistitem",r.originalValue||r);if(r.playlistItemId_){t.playlist.currentPlaylistItemId_=r.playlistItemId_}t.poster(r.poster||"");t.src(r.sources);n(t);t.ready(function(){(r.textTracks||[]).forEach(t.addRemoteTextTrack.bind(t));t.trigger("playlistitem",r.originalValue||r);if(a){var e=t.play();if(typeof e!=="undefined"&&typeof e.then==="function"){e.then(null,function(e){})}}i(t,t.playlist.autoadvance_.delay)});return t};var s=function e(t){return!!t&&typeof t==="object"};var o=function e(t){var r=[];var i;t.forEach(function(e){if(!s(e)){i=Object(e);i.originalValue=e}else{i=e}r.push(i)});return r};var u=function e(t){var r=1;t.forEach(function(e){e.playlistItemId_=r++})};var l=function e(t,r){for(var i=0;i<t.length;i++){if(t[i].playlistItemId_===r){return i}}return-1};var c=function e(t,r){var i=t;var n=r;if(typeof t==="object"){i=t.src}if(typeof r==="object"){n=r.src}if(/^\/\//.test(i)){n=n.slice(n.indexOf("//"))}if(/^\/\//.test(n)){i=i.slice(i.indexOf("//"))}return i===n};var f=function e(t,r){for(var i=0;i<t.length;i++){var n=t[i].sources;if(Array.isArray(n)){for(var a=0;a<n.length;a++){var s=n[a];if(s&&c(s,r)){return i}}}}return-1};var d=function e(t){var r=-1;var i=t.length-1;while(++r<t.length){var n=r+Math.floor(Math.random()*(i-r+1));var a=t[n];t[n]=t[r];t[r]=a}return t};function h(t,n,c){if(c===void 0){c=0}var h=null;var p=false;var v=t.playlist=function(e,r){if(r===void 0){r=0}if(p){throw new Error("do not call playlist() during a playlist change")}if(Array.isArray(e)){var i=Array.isArray(h)?h.slice():null;var n=e.slice();h=n.slice();if(h.filter(function(e){return s(e)}).length!==h.length){h=o(h)}u(h);p=true;t.trigger({type:"duringplaylistchange",nextIndex:r,nextPlaylist:n,previousIndex:v.currentIndex_,previousPlaylist:i||[]});p=false;if(r!==-1){v.currentItem(r)}if(i){t.setTimeout(function(){t.trigger("playlistchange")},0)}}return h.map(function(e){return e.originalValue||e}).slice()};t.on("loadstart",function(){if(v.currentItem()===-1){r(t)}});v.currentIndex_=-1;v.player_=t;v.autoadvance_={};v.repeat_=false;v.currentPlaylistItemId_=null;v.currentItem=function(e){if(p){return v.currentIndex_}if(typeof e==="number"&&v.currentIndex_!==e&&e>=0&&e<h.length){v.currentIndex_=e;a(v.player_,h[v.currentIndex_]);return v.currentIndex_}var t=v.player_.currentSrc()||"";if(v.currentPlaylistItemId_){var r=l(h,v.currentPlaylistItemId_);var i=h[r];if(i&&Array.isArray(i.sources)&&f([i],t)>-1){v.currentIndex_=r;return v.currentIndex_}v.currentPlaylistItemId_=null}v.currentIndex_=v.indexOf(t);return v.currentIndex_};v.contains=function(e){return v.indexOf(e)!==-1};v.indexOf=function(e){if(typeof e==="string"){return f(h,e)}var t=Array.isArray(e)?e:e.sources;for(var r=0;r<t.length;r++){var i=t[r];if(typeof i==="string"){return f(h,i)}else if(i.src){return f(h,i.src)}}return-1};v.currentIndex=function(){return v.currentItem()};v.lastIndex=function(){return h.length-1};v.nextIndex=function(){var e=v.currentItem();if(e===-1){return-1}var t=v.lastIndex();if(v.repeat_&&e===t){return 0}return Math.min(e+1,t)};v.previousIndex=function(){var e=v.currentItem();if(e===-1){return-1}if(v.repeat_&&e===0){return v.lastIndex()}return Math.max(e-1,0)};v.first=function(){if(p){return}var e=v.currentItem(0);if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.last=function(){if(p){return}var e=v.currentItem(v.lastIndex());if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.next=function(){if(p){return}var e=v.nextIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.previous=function(){if(p){return}var e=v.previousIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.autoadvance=function(e){i(v.player_,e)};v.repeat=function(t){if(t===undefined){return v.repeat_}if(typeof t!=="boolean"){e.log.error("videojs-playlist: Invalid value for repeat",t);return}v.repeat_=!!t;return v.repeat_};v.sort=function(e){if(!h.length){return}h.sort(e);if(p){return}t.trigger("playlistsorted")};v.reverse=function(){if(!h.length){return}h.reverse();if(p){return}t.trigger("playlistsorted")};v.shuffle=function(e){var r=e===void 0?{}:e,i=r.rest;var n=0;var a=h;if(i){n=v.currentIndex_+1;a=h.slice(n)}if(a.length<=1){return}d(a);if(i){var s;(s=h).splice.apply(s,[n,a.length].concat(a))}if(p){return}t.trigger("playlistsorted")};if(Array.isArray(n)){v(n.slice(),c)}else{h=[]}return v}var p="4.3.1";var v=e.registerPlugin||e.plugin;var m=function e(t,r){h(this,t,r)};v("playlist",m);m.VERSION=p;return m})})();(function(){if(f.getPlugin("qualityMenu")){return}!function e(t,r,i){function n(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return n(r?r:e)},c,c.exports,e,t,r,i)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(t,r,i){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}i.__esModule=!0;var u="undefined"!=typeof e?e.videojs:"undefined"!=typeof r?r.videojs:null,l=n(u),c=t(2),f=n(c),d=l["default"].getComponent("MenuButton"),h=function(e){for(var t=0,r=e.length;t<r;t++)if(!e[t].height)return!1;return!0},p=function(e){return e>=2160?"4K":e>=720?"HD":""},v=function(e){function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,t);var n=s(this,e.call(this,r,i));return n.el_.setAttribute("aria-label",n.localize("Quality Levels")),n.controlText("Quality Levels"),n.qualityLevels_=r.qualityLevels(),n.update=n.update.bind(n),n.handleQualityChange_=n.handleQualityChange_.bind(n),n.changeHandler_=function(){for(var e=n.options_.defaultResolution,t=0;t<n.items.length;t++)n.items[t].options_.label.indexOf(e)!==-1&&n.items[t].handleClick()},n.on(n.qualityLevels_,"addqualitylevel",n.update),n.on(n.qualityLevels_,"removequalitylevel",n.update),n.on(n.qualityLevels_,"change",n.handleQualityChange_),n.one(n.qualityLevels_,"change",n.changeHandler_),n.update(),n.on("dispose",function(){n.off(n.qualityLevels_,"addqualitylevel",n.update),n.off(n.qualityLevels_,"removequalitylevel",n.update),n.off(n.qualityLevels_,"change",n.handleQualityChange_),n.off(n.qualityLevels_,"change",n.changeHandler_)}),n}return o(t,e),t.prototype.buildWrapperCSSClass=function(){return"vjs-quality-menu-wrapper "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.buildCSSClass=function(){return"vjs-quality-menu-button "+e.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var e=this,t=[];if(!this.qualityLevels_||!this.qualityLevels_.length)return t;var r=void 0;if(this.options_.useResolutionLabels&&h(this.qualityLevels_)?(r=this.groupByResolution_(),this.addClass("vjs-quality-menu-button-use-resolution")):(r=this.groupByBitrate_(),this.removeClass("vjs-quality-menu-button-use-resolution")),r.length<=1)return[];r.forEach(function(r){r.levels.length&&(r.selectable=!0,t.push(new f["default"](e.player(),r)))});var i=new f["default"](this.player(),{levels:Array.prototype.map.call(this.qualityLevels_,function(e,t){return t}),label:"Auto",controlText:"Auto",active:!0,selected:!0,selectable:!0});return this.autoMenuItem_=i,t.push(i),t},t.prototype.groupByResolution_=function(){for(var e={},t=[],r=0,i=this.qualityLevels_.length;r<i;r++){var n=this.qualityLevels_[r],a=this.qualityLevels_.selectedIndex===r,s=n.height,o=void 0;if(this.options_.resolutionLabelBitrates){var u=Math.round(n.bitrate/1e3);o=s+"p @ "+u+" kbps"}else o=s+"p";if(!e[o]){var l=p(s);e[o]={levels:[],label:o,controlText:o,subLabel:l},t.push({label:o,lines:s})}a&&(e[o].active=!0),e[o].levels.push(r)}t.sort(function(e,t){return t.lines-e.lines});var c=[];return t.forEach(function(t){c.push(e[t.label])}),c},t.prototype.groupByBitrate_=function(){for(var e=[{levels:[],label:"HD",controlText:"High Definition"},{levels:[],label:"SD",controlText:"Standard Definition"}],t=0,r=this.qualityLevels_.length;t<r;t++){var i=this.qualityLevels_[t],n=this.qualityLevels_.selectedIndex===t,a=void 0;a=i.bitrate<this.options_.sdBitrateLimit?e[1]:e[0],n&&(a.active=!0),a.levels.push(t)}return e[0].levels.length&&e[1].levels.length?e:[]},t.prototype.handleQualityChange_=function(){var e=this.qualityLevels_[this.qualityLevels_.selectedIndex],t=this.options_.useResolutionLabels&&h(this.qualityLevels_),r="";e&&(t?r=p(e.height):e.bitrate>=this.options_.sdBitrateLimit&&(r="HD")),"HD"===r?(this.addClass("vjs-quality-menu-button-HD-flag"),this.removeClass("vjs-quality-menu-button-4K-flag")):"4K"===r?(this.removeClass("vjs-quality-menu-button-HD-flag"),this.addClass("vjs-quality-menu-button-4K-flag")):(this.removeClass("vjs-quality-menu-button-HD-flag"),this.removeClass("vjs-quality-menu-button-4K-flag")),this.autoMenuItem_&&(this.autoMenuItem_.manuallySelected_&&e?this.autoMenuItem_.subLabel_.innerHTML=this.localize(r):this.autoMenuItem_.subLabel_.innerHTML="")},t}(d);l["default"].registerComponent("QualityMenuButton",v),i["default"]=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],2:[function(t,r,i){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}i.__esModule=!0;var o="undefined"!=typeof e?e.videojs:"undefined"!=typeof t?t.videojs:null,u=r(o),l=u["default"].getComponent("MenuItem"),c=u["default"].dom||u["default"],f=function(e){function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t);var s=i.selected;i.selected=i.active;var o=a(this,e.call(this,r,i)),u=r.qualityLevels();return o.levels_=i.levels,o.selected_=s,o.handleQualityChange=o.handleQualityChange.bind(o),o.controlText(i.controlText),o.on(u,"change",o.handleQualityChange),o.on("dispose",function(){o.off(u,"change",o.handleQualityChange)}),o}return s(t,e),t.prototype.createEl=function(t,r,i){var n=e.prototype.createEl.call(this,t,r,i),a=c.createEl("span",{className:"vjs-quality-menu-item-sub-label",innerHTML:this.localize(this.options_.subLabel||"")});return this.subLabel_=a,n&&n.appendChild(a),n},t.prototype.handleClick=function(){this.updateSiblings_();for(var e=this.player().qualityLevels(),t=e.selectedIndex,r=0,i=e.length;r<i;r++)r!==t&&(e[r].enabled=!1);for(var n=0,a=this.levels_.length;n<a;n++)e[this.levels_[n]].enabled=!0;t!==-1&&this.levels_.indexOf(t)===-1&&(e[t].enabled=!1)},t.prototype.handleQualityChange=function(){var e=this.player().qualityLevels(),t=this.levels_.indexOf(e.selectedIndex)>-1;this.selected(t)},t.prototype.selected=function(e){if(this.selectable)if(this.selected_){this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(this.localize(this.options_.controlText)+this.localize(", selected"));var t=this.player().controlBar,r=t.getChild("QualityMenuButton");e?r.removeClass("vjs-quality-menu-button-waiting"):r.addClass("vjs-quality-menu-button-waiting")}else this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(this.options_.controlText)},t.prototype.updateSiblings_=function(){for(var e=this.player().qualityLevels(),t=this.player().controlBar,r=t.getChild("QualityMenuButton").items,i=0,n=r.length;i<n;i++){var a=r[i],s=a.levels_.indexOf(e.selectedIndex)>-1;a.selected_=a===this,a.selected(s)}},t}(l);i["default"]=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],3:[function(e,t,r){},{}],4:[function(r,i,n){(function(n){var a="undefined"!=typeof n?n:"undefined"!=typeof e?e:{},s=r(3);if("undefined"!=typeof t)i.exports=t;else{var o=a["__GLOBAL_DOCUMENT_CACHE@4"];o||(o=a["__GLOBAL_DOCUMENT_CACHE@4"]=s),i.exports=o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],5:[function(t,r,i){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}i.__esModule=!0;var a="undefined"!=typeof e?e.videojs:"undefined"!=typeof r?r.videojs:null,s=n(a),o=t(6),u=n(o),l=s["default"].registerPlugin||s["default"].plugin,c=function(e,t){var r=e.qualityLevels,i=new u["default"],n=function t(){i.dispose(),e.qualityLevels=r,e.off("dispose",t)};return e.on("dispose",n),e.qualityLevels=function(){return i},e.qualityLevels.VERSION="2.0.3",i},f=function(e){return c(this,s["default"].mergeOptions({},e))};l("qualityLevels",f),f.VERSION="2.0.3",i["default"]=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],6:[function(t,r,i){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}i.__esModule=!0;var u="undefined"!=typeof e?e.videojs:"undefined"!=typeof r?r.videojs:null,l=n(u),c=t(4),f=n(c),d=t(7),h=n(d),p=function(e){function t(){var r;a(this,t);var i=s(this,e.call(this)),n=i;if(l["default"].browser.IS_IE8){n=f["default"].createElement("custom");for(var o in t.prototype)"constructor"!==o&&(n[o]=t.prototype[o])}return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),r=n,s(i,r)}return o(t,e),t.prototype.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var r=this.levels_.length;return t=new h["default"](e),""+r in this||Object.defineProperty(this,r,{get:function(){return this.levels_[r]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},t.prototype.removeQualityLevel=function(e){for(var t=null,r=0,i=this.length;r<i;r++)if(this[r]===e){t=this.levels_.splice(r,1)[0],this.selectedIndex_===r?this.selectedIndex_=-1:this.selectedIndex_>r&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},t.prototype.getQualityLevelById=function(e){for(var t=0,r=this.length;t<r;t++){var i=this[t];if(i.id===e)return i}return null},t.prototype.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},t}(l["default"].EventTarget);p.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(var v in p.prototype.allowedEvents_)p.prototype["on"+v]=null;i["default"]=p}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],7:[function(t,r,i){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s="undefined"!=typeof e?e.videojs:"undefined"!=typeof r?r.videojs:null,o=n(s),u=t(4),l=n(u),c=function e(t){a(this,e);var r=this;if(o["default"].browser.IS_IE8){r=l["default"].createElement("custom");for(var i in e.prototype)"constructor"!==i&&(r[i]=e.prototype[i])}return r.id=t.id,r.label=r.id,r.width=t.width,r.height=t.height,r.bitrate=t.bandwidth,r.enabled_=t.enabled,Object.defineProperty(r,"enabled",{get:function(){return r.enabled_()},set:function(e){r.enabled_(e)}}),r};i["default"]=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}],8:[function(t,r,i){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}i.__esModule=!0;var a="undefined"!=typeof e?e.videojs:"undefined"!=typeof r?r.videojs:null,s=n(a);t(5),t(1);var o=s["default"].registerPlugin||s["default"].plugin,u={sdBitrateLimit:2e6,useResolutionLabels:!0,resolutionLabelBitrates:!1,defaultResolution:"none"},l=function(e,t){e.addClass("vjs-quality-menu");var r=e.getChild("controlBar"),i=r.addChild("QualityMenuButton",t,r.children_.length-2);return function(){e.removeClass("vjs-quality-menu"),r.removeChild(i),i.dispose()}},c=function(e,t){if("undefined"!=typeof e.qualityLevels){e.qualityLevels();var r=function(){};e.ready(function(){r=l(e,t),e.on("loadstart",function(){r(),r=l(e,t)})}),e.qualityMenu=function(){},e.qualityMenu.VERSION="1.2.2"}},f=function(e){c(this,s["default"].mergeOptions(u,e))};o("qualityMenu",f),f.VERSION="1.2.2",i["default"]=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{})},{}]},{},[8])})();(function(){if(f.getPlugin("social")){return}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js"),require("global/document"),require("global/window")):"function"==typeof r&&r.amd?r(["video.js","global/document","global/window"],t):e.videojsSocial=t(e.videojs,e.document,e.window)}(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e,t){return"function"==typeof e.usingPlugin?e.usingPlugin(t):"ads"===t?"object"===i(e.ads):"playlist"===t?!(!e.playlist||"object"!==i(e.playlist.autoadvance_)):!!e[t]},a=function(e){e.postrollStarted=!1,e.postrollFinished=!1,e.postrollTimedOut=!1,e.sawNoPostrollEvent=!1},s=function(){var e=this;if(!this.endscreenState_){var t=this.endscreenState_={},r=function(){return e.trigger("endscreen")};a(t),this.on("adstart",function(){var r=e.ended();t.postrollStarted=r,t.postrollFinished=!r}),this.on("adend",function(){t.postrollFinished=e.ended()}),this.on("adtimeout",function(){t.postrollTimedOut=e.ended()}),this.on(["endscreen","loadstart"],function(){e.off("adend",r),a(t)}),this.on("nopostroll",function(){t.sawNoPostrollEvent=!0}),this.on("ended",function(){(function(e){if(!n(e,"playlist"))return!1;var t=e.playlist,r=t();return!(0!==t.autoadvance_.delay||!r.length)&&(t.repeat()||t.currentItem()!==r.length-1)})(e)||(!function(e){if(!n(e,"ads"))return!1;var t=e.endscreenState_;return!t.sawNoPostrollEvent&&t.postrollStarted&&!t.postrollFinished&&!t.postrollTimedOut}(e)?r():e.one("adend",r))})}};function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function u(e,t){return t||(t=e.slice(0)),e.raw=t,e}e.registerPlugin?e.getPlugin("endscreen")||e.registerPlugin("endscreen",s):e.plugin("endscreen",s);var l=function(e){function t(t,r){var i;return(i=e.call(this,t,r)||this).controlText(i.localize("Share")),i}o(t,e);var r=t.prototype;return r.handleClick=function(){this.showOverlay()},r.showOverlay=function(){var e=this.player().socialOverlay;e&&e.open()},r.buildCSSClass=function(){return"vjs-share-control "+e.prototype.buildCSSClass.call(this)},t}(e.getComponent("Button"));function c(e){return e.replace(/\n\r?\s*/g,"")}var f=function(e){for(var t="",r=0;r<arguments.length;r++)t+=c(e[r])+(arguments[r+1]||"");return t};function d(){var e=u(["\n //players.brightcove.net/\n ","/\n ","_","/\n index.html\n ","\n ","\n "]);return d=function(){return e},e}function h(){var e=u(['\n <button class="vjs-restart vjs-icon-replay vjs-button">\n <span class="vjs-control-text">',"</span>\n </button>\n "]);return h=function(){return e},e}function p(){var e=u(['\n <label class="vjs-social-start-from" aria-label="','">\n <span class="vjs-social-label-text">','</span>\n <input type="text" title="'," ",'" placeholder=\n "','" maxlength="10" value="','">\n </label>\n ']);return p=function(){return e},e}function v(){var e=u(['\n <label class="vjs-social-direct-link" aria-label="','">\n <span class="vjs-social-label-text">','</span>\n <input type="text" readonly="true" value="">\n </label>\n ']);return v=function(){return e},e}function m(){var e=u(['\n <label class="vjs-social-embed-code" aria-label="','">\n <span class="vjs-social-label-text">','</span>\n <input type="text" readonly="true" value="">\n </label>\n ']);return m=function(){return e},e}function g(){var e=u(['\n <h1 class="vjs-social-title">',": ",'</h1>\n <h2 class="vjs-social-description">','</h2>\n <div class="vjs-social-share-links">\n ',"\n </div>\n ","\n ","\n ","\n "]);return g=function(){return e},e}function y(){var e=u(["\n <iframe src='","' allowfullscreen frameborder=0></iframe>\n "]);return y=function(){return e},e}function _(){var e=u(["\n https://twitter.com/intent/tweet\n ?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons\n &text=","\n &tw_p=tweetbutton\n &url=","\n "]);return _=function(){return e},e}function b(){var e=u(["\n https://www.tumblr.com/share\n ?v=3\n &u=","\n &t=","\n "]);return b=function(){return e},e}function T(){var e=u(["\n https://pinterest.com/pin/create/button/\n ?url=","\n &media=","\n &description=","\n &is_video=true\n "]);return T=function(){return e},e}function S(){var e=u(["\n https://www.linkedin.com/shareArticle\n ?mini=true\n &url=","\n &title=","\n &summary=","\n &source=Classic\n "]);return S=function(){return e},e}function k(){var e=u(["\n https://plus.google.com/share\n ?url=","\n "]);return k=function(){return e},e}function w(){var e=u(["\n https://www.facebook.com/sharer/sharer.php\n ?u=","\n &title=","\n "]);return w=function(){return e},e}var E,C=e.getComponent("ModalDialog"),I=e.dom||e,A=[{key:"facebook",title:"Facebook",href:function(e){return f(w(),e.url,e.title)}},{key:"google",classSuffix:"gplus",title:"Google+",href:function(e){return f(k(),e.url)}},{key:"linkedin",title:"LinkedIn",href:function(e){return f(S(),e.url,e.title,e.description)}},{key:"pinterest",title:"Pinterest",href:function(e){return f(T(),e.url,e.poster,e.title)}},{key:"tumblr",title:"Tumblr",href:function(e){return f(b(),e.url,e.title)}},{key:"twitter",title:"Twitter",href:function(e){return f(_(),e.title,e.url)}}],O=(E={width:600,height:400,top:100,left:100,titlebar:"yes",modal:"yes",resizable:"yes",toolbar:"no",status:1,location:"no",menubar:"no",centerscreen:"yes"},Object.keys(E).map(function(e){return e+"="+E[e]}).join(",")),P=/^\s*(0*[1-5]?\d|0*[1-5]?\d:[0-5]\d|\d+:[0-5]\d:[0-5]\d)\s*$/,L=function(i){function n(e,n){var a;return n.label=n.label||e.localize("Sharing Dialog"),(a=i.call(this,e,n)||this).isIframe_=r.parent!=r,a.on("modalfill",a.performSafeDomUpdates),a.on("modalopen",function(){if(a.toggleDock("hide"),e.el().contains(t.activeElement)||t.activeElement===e.el()){var r=a.el().querySelector(".vjs-social-share-links a")||a.el().querySelector(".vjs-social-direct-link input")||a.el().querySelector(".vjs-social-embed-code input");r&&r.focus()}}),a.on("modalclose",function(){a.toggleDock("show"),a.player().socialButton.el().focus()}),a.on(a.contentEl(),"click",a.delegateClick),a.options_.deeplinking&&(a.on("modalfill",function(){var e=a.offsetEl();e&&a.on(e,"change",a.performSafeDomUpdates)}),a.on(["beforemodalfill","dipose"],function(){var e=a.offsetEl();e&&a.off(e,"change",a.performSafeDomUpdates)})),a}o(n,i);var a=n.prototype;return a.directLinkEl=function(){return this.contentEl().querySelector(".vjs-social-direct-link input")},a.embedCodeEl=function(){return this.contentEl().querySelector(".vjs-social-embed-code input")},a.offsetEl=function(){return this.contentEl().querySelector(".vjs-social-start-from input")},a.toggleDock=function(e){this.options_.hasDock&&(this.player().getChild("shelf")[e](),this.player().getChild("title")[e]())},a.delegateClick=function(e){e.preventDefault(),e.target===this.contentEl().querySelector(".vjs-restart")?(this.close(),this.player().currentTime(0),this.player().play()):e.target===this.directLinkEl()||e.target===this.embedCodeEl()?e.target.select():I.hasClass(e.target,"vjs-social-share-link")&&r.open(e.target.href,"_blank",O)},a.buildCSSClass=function(){return"vjs-social-overlay "+i.prototype.buildCSSClass.call(this)},a.performSafeDomUpdates=function(){var e=this.offsetEl(),t=this.directLinkEl(),r=this.embedCodeEl();if(e){var i=!!e.value&&!P.test(e.value);I.toggleClass(e,"vjs-invalid",i)}t&&(t.value=this.getDirectLink()),r&&(r.value=this.getEmbedCode())},a.getEmbedCode=function(){var e=this.player(),t=this.getPlayerMediaInfo_(),r=this.getEmbedUrl_({accountId:e.options_["data-account"],playerId:e.options_["data-player"],embedId:e.options_["data-embed"],videoId:t.id?"?videoId="+t.id:""});return this.options_.embedCode||f(y(),r)},a.setEmbedCode=function(e){void 0===e&&(e=""),this.options_.embedCode=e},a.getDirectLink=function(){return this.getVideoUrl_(!0)},a.setDirectLink=function(e){void 0===e&&(e=""),this.options_.url=e},a.asEndscreen=function(e){var t=this;return"boolean"==typeof e&&this.asEndscreen_!==e&&(this.asEndscreen_=e,e?(this.player().height()<=300&&this.addClass("vjs-social-short-player"),this.addClass("vjs-social-as-endscreen"),this.open(),this.one("modalclose",function(){return t.asEndscreen(!1)})):(this.removeClass("vjs-social-short-player"),this.removeClass("vjs-social-as-endscreen"))),this.asEndscreen_},a.content=function(){var e=t.createElement("form");return e.innerHTML=f(g(),this.localize("Share"),this.getTitle_(),this.getDescription_(),this.contentForSocialButtons_(this.options_.services,this.options_.customServices),this.contentForDirectLink_(),this.contentForEmbed_(),this.contentForRestart_()),e},a.contentForEmbed_=function(){if(!0===this.options_.removeEmbed)return"";var e=this.localize("Embed Code"),t=this.localize("Read Only: Embed Code");return f(m(),t,e)},a.contentForDirectLink_=function(){var e=this.options_.deeplinking,t=!0!==this.options_.removeDirect;if(!e&&!t)return"";var r="";if(t){var i=this.localize("Direct Link"),n=this.localize("Read Only")+": "+this.localize("Direct Link To Content");r+=f(v(),n,i)}if(e){var a=this.localize("Start From"),s=this.localize("The offset must be specified using the following pattern:"),o=P.test(this.options_.offset)?this.options_.offset:"";r+=f(p(),a,a,s,"hh:mm:ss","hh:mm:ss",o)}return r},a.contentForRestart_=function(){if(!this.asEndscreen())return"";var e=this.localize("Restart");return f(h(),e)},a.contentForSocialButtons_=function(t,r){void 0===r&&(r=[]);var i=this.player(),n={description:encodeURIComponent(this.options_.description),poster:encodeURIComponent(i.poster()||""),title:encodeURIComponent(this.getTitle_()),url:encodeURIComponent(this.getVideoUrl_())};return r=r.filter(function(t){return!(t.mobileOnly&&!e.browser.IS_IOS&&!e.browser.IS_ANDROID)}).map(function(e){return e.hrefTemplate&&"function"!=typeof e.href&&(e.href=function(t){var r=e.hrefTemplate;for(var i in t){var n=new RegExp("{{"+i+"}}","g");r=r.replace(n,t[i])}return r}),e}),A.filter(function(e){return t[e.key]}).concat(r).map(function(e,t){return'\n <a href="'+e.href(n)+'"\n class="vjs-social-share-link '+(e.className?e.className:"vjs-icon-"+(e.classSuffix||e.key))+'"\n aria-role="link"\n aria-label="'+i.localize("Share on {{network}}").replace("{{network}}",i.localize(e.title))+'"\n title="'+i.localize(e.title)+'"\n '+(e.bgColor?'style="background-color:'+e.bgColor+'"':"")+'\n target="_blank">\n <span class="vjs-control-text">'+i.localize(e.title)+"</span>\n </a>\n "}).join("")},a.getConvertedOffsetHash_=function(){if(this.options_.deeplinking){var e=this.offsetEl(),t=this.convertOffset_(e&&e.value||this.options_.offset);if(t)return"#t="+t}return""},a.addPlaylistVideoId_=function(e){var t=this.player(),i="function"==typeof t.playlist&&t.playlist();if(Array.isArray(i)&&i.length){var n=t.playlist.currentItem(),a=n>-1&&i[n];if(a&&a.id){var s=(r.location.search?"&":"?")+"playlistVideoId="+a.id,o=/([?&])playlistVideoId=[^&]+/,u=e.match(o);u?e=e.replace(o,u[1]+"playlistVideoId="+a.id):e+=s}}return e},a.getVideoUrl_=function(e){var i;return i=this.options_.url?this.options_.url:this.isIframe_?t.referrer:this.addPlaylistVideoId_(r.location.href),e&&(i+=this.getConvertedOffsetHash_()),i},a.getEmbedUrl_=function(e){return this.isIframe_?r.location.href:f(d(),e.accountId,e.playerId,e.embedId,e.videoId,this.getConvertedOffsetHash_())},a.getPlayerMediaInfo_=function(){var e=this.player();return e.mediainfo||e.options_["data-media"]||{}},a.getTitle_=function(){return this.options_.title||this.getPlayerMediaInfo_().name||""},a.getDescription_=function(){return this.options_.description||this.getPlayerMediaInfo_().description||""},a.convertOffset_=function(e){var t=0,r=[1,60,3600],i="";if("string"==typeof e){var n=e.split(":");if(n.length>=1&&n.length<=3){for(var a=0;a<n.length;++a){var s=parseInt(n[a],10)*r[n.length-1-a];if(isNaN(s))return"";t+=s}t>=r[2]&&0!==Math.floor(t/r[2])&&(i=Math.floor(t/r[2])+"h",t%=r[2]),t>=r[1]&&0!==Math.floor(t/r[1])&&(i+=Math.floor(t/r[1])+"m",t%=r[1]),t>0&&(i+=t+"s")}}return i},n}(C);L.prototype.options_=e.mergeOptions(C.prototype.options_,{fillAlways:!0,temporary:!1});var x={title:"",description:"",url:"",label:"",embedCode:"",deeplinking:!1,displayAfterVideo:!1,offset:"00:00:00",buttonParent:"controlBar",hasDock:!1,removeDirect:!1,removeEmbed:!1,services:{facebook:!0,google:!0,twitter:!0,tumblr:!0,pinterest:!0,linkedin:!0},customServices:[]},D=e.getComponent("Component"),U=e.registerPlugin||e.plugin,R=e.dom||e,M=function(e){return e instanceof D},j=function(e,t){var r;r=e.socialSettings,"[object Object]"===Object.prototype.toString.call(r)&&e.socialButton.dispose();var i=function e(t,r){var i=r.buttonParent,n="string"==typeof i?t.getChild(i):i;return M(n)||i===x.buttonParent||(r.buttonParent=x.buttonParent,n=e(t,r)),M(n)?n:null}(e,t),n=i.addChild("socialButton",t);if(i.one(n,"dispose",function(){return i.removeChild(n)}),t.buttonParent===x.buttonParent){var a=i.el().querySelector(".vjs-spacer");i.el().insertBefore(n.el(),a.nextSibling)}else i===e.shelf&&(n.removeClass("vjs-control"),R.removeClass(n.$(".vjs-control-text"),"vjs-control-text"));return n},N=function(t,r){var i,n=t.socialOverlay;return n&&(i=n.opened(),n.close(),n.options_.temporary||n.dispose()),function(t){var r=function(){e.log.warn('Using "show" to open the social plugin overlay is deprecated. Use open() instead!'),this.open()},i=function(){e.log.warn('Using "hide" to close the social plugin overlay is deprecated. Use close() instead!'),this.close()};t.show=r,t.hide=i,t.on("beforemodalopen",function(){delete t.show}),t.on("modalopen",function(){t.show=r}),t.on("beforemodalclose",function(){delete t.hide}),t.on("modalclose",function(){t.hide=i})}(n=t.addChild("socialOverlay",r)),R.addClass(n.$(".vjs-close-button",n),"vjs-icon-cancel"),t.one(n,"dispose",function(){return t.removeChild(n)}),r.displayAfterVideo&&t.on("endscreen",function(){return n.asEndscreen(!0)}),i&&n.open(),n},B=function(t){var r=this,i=e.mergeOptions(x,t);i.removeDirect&&(i.deeplinking=!1),i.displayAfterVideo&&this.endscreen(),this.ready(function(){i.hasDock=M(r.title)&&M(r.shelf),r.socialButton=j(r,i),r.socialOverlay=N(r,i),r.socialSettings=i,r.on("loadstart",function(){r.socialOverlay.close()});var e=function(){var e;(e=r).socialOverlay.toggleClass("vjs-social-small",function(){return e.currentWidth()<e.breakpoints().small+1})};r.on("playerresize",e),r.socialOverlay.on("dispose",function(){r.off("playerresize",e)}),e.call(r)})};return B.VERSION="3.8.2",e.registerComponent("SocialButton",l),e.registerComponent("SocialOverlay",L),U("social",B),B})})();var w=S.qs();var E=v?w.search:{};var C=v?w.hash:{};var I=function(e,r,i){if(!r&&!i&&r!==0&&i!==0){return}var n=t.querySelector(".bc-style-NkgrDczuol-default")||t.querySelector(".bc-style-vjs");var a="bc-player-NkgrDczuol_default";var s=a+"-index-"+e;var o=s+"-video-dimensions";var u=t.querySelector("."+o);var l=/width: (\d+)px;/g;var c=/height: (\d+)px;/g;var f;var d;if(!u){u=t.createElement("style");u.className=o;if(n){n.parentNode.insertBefore(u,n.nextSibling)}else{t.head.appendChild(u)}}else if(u.innerText){if(!r&&r!==0){f=l.exec(u.innerText);if(f&&f[1]){r=parseInt(f[1])}}else if(!i&&i!==0){f=c.exec(u.innerText);if(f&&f[1]){i=parseInt(f[1])}}}d="."+s+"{";if(r||r===0){d+="width: "+parseInt(r)+"px;"}if(i||i===0){d+="height: "+parseInt(i)+"px;"}d+="}";u.innerText=d};var A=function(r){var i=f.getPlayer(r);if(i){i.trigger({type:"usage",name:"bc-used-as-getter"});return i}a++;var s;var u;var l;var c;var d;var h;var O;var P;var L;var x;S.perf.mark("bcInitStart");var D;var U;var R=function(e,t){s=e;t=t||{};if(!(f.browser.IS_ANY_SAFARI||f.browser.IS_IOS)){t.html5=t.html5||{};t.html5.nativeCaptions=false}g=E.applicationId||e.getAttribute("data-application-id")||"";var r=C.t||E.t||e.getAttribute("data-start-time");if(/^[\d]+$/.test(r)){L=Number(r)}else if(/^(\d+h)?(\d+m)?(\d+s)?$/.test(r)){L=r}var i=E.deliveryConfigId;var n=e.getAttribute("data-config-id");if(v&&S.isNonEmptyStr(i)){D=i}else if(S.isNonEmptyStr(n)){D=n}if(typeof D==="string"){D=D.trim()}var p=E.adConfigId;var m=e.getAttribute("data-ad-config-id");if(v&&S.isNonEmptyStr(p)){U=p}else if(S.isNonEmptyStr(m)){U=m}if(typeof U==="string"){U=U.trim()}if(w.hash.hasOwnProperty("autoplay")||w.search.hasOwnProperty("autoplay")){t.autoplay=w.hash.autoplay||w.search.autoplay||true}else if(e.hasAttribute("autoplay")){t.autoplay=true}else if(!t.hasOwnProperty("autoplay")){t.autoplay=false}if(t.autoplay){f.dom.addClass(e,"vjs-waiting-for-autoplay")}d=!!e.querySelector("source");c=!!e.querySelector("track");h=e.hasAttribute("poster");t.inactivityTimeout=5e3;if(f.browser.TOUCH_ENABLED){t.inactivityTimeout=0}u=e.getAttribute("height")||undefined;l=e.getAttribute("width")||undefined;if(!v&&e&&l||u){I(a,l,u)}t=f.mergeOptions(t,{width:l,height:u,nativeControlsForTouch:o(),controls:v?true:e.hasAttribute("controls"),persistTextTrackSettings:true,preload:"metadata",responsive:true,"vtt.js":t["vttjs"]||"https://vjs.zencdn.net/vttjs/0.12.5/vtt.global.min.js",liveui:true,playbackRates:[.5,.75,1,1.25,1.5,1.75,2],sourceOrder:true,controlBar:{volumePanel:{inline:false,vertical:true}},userActions:{hotkeys:{}}});if(E.language){t.language=E.language}if(E.preload){t.preload=E.preload}if(E.playsinline!==undefined){e.setAttribute("playsinline","playsinline")}if(E.muted!==undefined){e.setAttribute("muted","muted");e.muted=true;t.muted=true}if(E.crossorigin!==undefined){e.setAttribute("crossorigin","anonymous")}if(E.loop!==undefined){t.loop=true}x=e.getAttribute("data-vttjs")||E.vttjs;if(x&&S.isNonEmptyStr(x)){t["vtt.js"]=x}if(!t.flash){t.flash={}}if(!t.flash.swf){t.flash.swf="https://players.brightcove.net/videojs-flashls-source-handler/1.4.8/video-js.swf"}f.options.hls=true;if(typeof f.options.hls!=="object"){f.options.hls={}}if(f.browser.IS_ANDROID&&f.options.hls.enableLowInitialPlaylist===undefined){f.options.hls.enableLowInitialPlaylist=true}if(f.options.hls.overrideNative===undefined&&!f.browser.IS_ANY_SAFARI){f.options.hls.overrideNative=true}return t};var M=function(r){var i=r.options_;var o=r.dimension;var w;r.mediainfo={accountId:m,account_id:m};r.bcinfo={accountId:m,applicationId:g,css:{progressColor:"rgb(0, 110, 173)"},embedId:y,playerId:_,scriptUrl:b,scriptBaseUrl:T};Object.defineProperty(r,"usingAdBlocker",{enumerable:true,value:k});k().then(function(e){if(e){r.trigger({type:"usage",name:"using-ad-blocker"})}});r.dimension=function(e,t){var i=new RegExp("bc-player-"+_+"_"+y+"-index-(\\d+)");var n=i.exec(r.el().getAttribute("class"));if(n){var a=n[1];if(e==="width"){I(a,t,null)}else if(e==="height"){I(a,null,t)}}return o.call(r,e,t)};r.addClass("bc-player-"+_+"_"+y);r.addClass("bc-player-"+_+"_"+y+"-index-"+a);if(!f.browser.TOUCH_ENABLED){r.addClass("vjs-mouse");if(v){f.dom.addClass(p.bcFrameEl,"vjs-mouse")}}else if(f.browser.IS_IPHONE){r.addClass("vjs-native")}r.on("dispose",function(){s=r=u=l=i=c=d=h=O=P=g=playerName=p=null;n=[];A.videojs.log.history.clear()});if(f.browser.IS_IPHONE){r.on("fullscreenchange",function(){var e=r.$(".vjs-tech");if(e.hasAttribute("controls")){e.removeAttribute("controls")}});if(s.hasAttribute("playsinline")&&s.hasAttribute("muted")){r.addClass("vjs-iphone")}}if(f.browser.IS_IOS&&s.hasAttribute("muted")){r.addClass("vjs-ios")}if(r.controls()){r.one("play",function(){if(!r.controlBar){return}var e=r.controlBar.children();if(!e||!e.length){return}var t=["Enter","ArrowDown","ArrowUp","Up","Down"," ","Spacebar"];for(var i=0;i<e.length;i++){if(e[i].hasClass("vjs-menu-button-popup")&&!e[i].hasClass("vjs-hidden")){e[i].on("keyup",function(e){if(t.indexOf(e.key)>=0){r.controlBar.addClass("vjs-control-bar-visible")}})}}});if(r.controlBar){var C=r.controlBar.el(),x,R=function(){var e=t.activeElement;if(x!==e){x=e;r.controlBar.toggleClass("vjs-focus-within",C.contains(e))}},M=function(){C.removeEventListener("focus",R,true);C.removeEventListener("blur",R,true)};C.addEventListener("focus",R,true);C.addEventListener("blur",R,true);r.on("dispose",M);r.controlBar.on("dispose",M)}}var j=function(){return(new Date).toISOString().split("T")[0]+":"+r.bcAnalytics.client.getSession()};r.ready(function(){S.perf.mark("bcInitEnd");S.perf.measure("bcInit","bcInitStart","bcInitEnd")});if(i.autoplay){r.ready(function(){var e=function(){r.removeClass("vjs-waiting-for-autoplay")};var t=function(){if(!r.autoplay()){return}var t=r.play();if(t===undefined){e()}else{t.then(e,e)}};var i=["canplay","error","durationchange"];var n=function(a){if(a.type==="error"||a.type==="canplay"){r.off(i,n)}if(a.type==="error"){return e()}if(a.type==="durationchange"&&r.duration()===Infinity&&!f.browser.IS_ANY_SAFARI){t();r.off(i,n)}if(a.type==="canplay"){t()}};if(!r.currentSrc()&&!w){e()}else if(r.readyState()===4){t()}else{r.one(i,n)}})}var N={bcAnalytics:{applicationId:g,mr:Boolean(e.bc_isManagedRelease),referrer:E.referrer,usage:E.usage},contextmenuUI:{content:[{label:r.localize("Player Information"),listener:function(){r.playerInfo.modal.open()}},{href:"https://www.brightcove.com/en/why-brightcove?utm_type=player",label:"About Brightcove"}]},resizeTextTracks:{iframe:v},urlparams:{iframe:v,time:L}};var B=["eme","chromecastReceiver","vr","pip","qualityMenu","ima3","FreeWheelPlugin","ssai","bcPlaylistUi"];function F(e,t){var i=N[e]||{};if(!r.hasPlugin(e)){f.log.error('Plugin "'+e+'" is missing. Please check your player configuration.');return}if(r.usingPlugin(e)){return}var a=f.mergeOptions(i,t);if(B.indexOf(e)!==-1){n.push(e);if(e==="bcPlaylistUi"){n.push(e+(a.horizontal?"-horz":"-vert"));if(a.repeat){n.push(e+"-repeat")}if(a.shuffle){n.push(e+"-shuffle")}}}try{r[e](a)}catch(t){f.log.error('Unable to initialize "'+e+'" plugin:',t)}}F("proxyTracks");F("perSourceBehaviors");F("seekEvents");F("contextmenu");F("contextmenuUI");F("playerInfo");F("urlparams");F("resizeTextTracks");F("bcAnalytics",{accountId:"679256133001",embedId:"default",platformVersion:"6.35.2",playerId:"NkgrDczuol",playerName:"NSF Main"});F("errors",{});F("catalog",{accountId:"679256133001",policyKey:"BCpkADawqM21HbeBw6nR5QHCsB4Ukw1D42mN9LgQ6o0VmXCV8Ny2whysqw8vDiKOFeJczkqqWcmjokhMylavASERPbjuAqXsWWBFA6iyL_-3lHu5E36pvXyDYhg"});F("touchActive");F("qualityMenu",{useResolutionLabels:true});F("social",{buttonParent:"shelf",description:"",offset:"",removeDirect:true,services:{facebook:true,google:false,linkedin:false,pinterest:false,tumblr:true,twitter:true},title:"",url:""});r.on("vjs-contextmenu",function(){if(r.playerInfo.modal){r.playerInfo.modal.close()}});r.ready(function(){r.playerInfo.modal.on("modalfill",function(){var e=j();var i=r.playerInfo.modal.$(".vjs-pi-section--player tbody");if(!e||!i){return}var n=t.createElement("tr");var a=t.createElement("tr");n.innerHTML="<td>"+r.localize("Session ID")+"</td> <td>"+e+"</td>";i.appendChild(n);a.innerHTML="<td>"+r.localize("Player Element ID")+"</td> <td>"+r.id()+"</td>";i.appendChild(a)})});r.errorDisplay.on("modalfill",function(){var e=j();var t=r.errorDisplay.$(".vjs-errors-content-container");if(!e||!t){return}t.appendChild(f.dom.createEl("div",{className:"vjs-errors-ref-id",innerHTML:"<b>"+r.localize("Session ID:")+"</b> "+e+" "+"<b>"+r.localize("Player Element ID:")+"</b> "+r.id()}))});var q={embedHasPoster:!!h,embedHasSources:d,embedHasTracks:c,adConfigId:U,deliveryConfigId:D};w=r.catalog.autoFindAndLoadMedia(q);if(w&&w.type==="video"){if(/^[\d]+$/.test(w.id)){r.mediainfo.id=w.id}else{r.mediainfo.referenceId=r.mediainfo.reference_id=w.id}}(function(){var e,t=parseInt(null,10),i=false;r.playlist();if(t===t&&isFinite(t)&&t>=0){r.playlist.autoadvance(t)}})();if(typeof bcShimDestripeTime!=="undefined"){if(bcShimDestripeTime>1){n.push("sdt-"+(Math.log(bcShimDestripeTime)/Math.LN10).toFixed(1))}else{n.push("sdt-0.0")}}r.requestAnimationFrame(function(){var e=t.querySelector(".bc-wrap");r.addClass("vjs-plugins-ready");if(e){e.style.opacity=0}});r.on(["mouseenter","ended","touchend"],function(){r.removeClass("not-hover")});r.on("mouseleave",function(){r.addClass("not-hover");if(!r.controlBar||!r.controlBar.el()){return}if(r.controlBar.hasClass("vjs-control-bar-visible")){r.controlBar.removeClass("vjs-control-bar-visible")}});n.forEach(function(e){r.trigger({type:"usage",name:e})});r.ready(function(){if(r.bcinfo&&r.bcinfo.PLAYER_LOADER||e.brightcovePlayerLoader){r.trigger({type:"usage",name:"player-loader"})}if(r.bcinfo&&r.bcinfo.REACT_PLAYER_LOADER||e.BrightcoveReactPlayerLoader){r.trigger({type:"usage",name:"react-player-loader"})}})};f.hookOnce("beforesetup",R);f.hookOnce("setup",M);return f.apply(null,arguments)};Object.defineProperty(A,"usingAdBlocker",{enumerable:true,value:k});c.restoreFirstVideojs();return p.decorateInitializer(A)}(window,document);e(document.querySelector("video-js"))})();;</script> <script>(function(p){p.mark&&p.mark('bcParseEnd');p.measure&&p.measure('bcParse','bcParseStart','bcParseEnd')})(window.performance||{})</script> </body></html>