1(function(e,t){if(typeof define==="function"&&define.amd){define("bc",[],function(){var i=t.apply(this,arguments);e.videojs.log.warn("DEPRECATION: Using the default named RequireJS module in the Brightcove Player is deprecated. See: https://support.brightcove.com/requirejs-and-brightcove-player#Future_implementation");return i})}else if(typeof exports==="object"){module.exports=t()}else{e.bc=t(e)}})(this,function(e){var t='@charset "UTF-8";.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,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7
1DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) 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"}
1.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 .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\\f121"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\\f122"}.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}
1.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.vjs-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;
1left: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.6666666667em}.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:-.3333333333em;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-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .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-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-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.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{width:5em;height:3em;margin-right:0}.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-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.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{left
1:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:10em;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{transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.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;
1-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%{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:"\uf10d";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:" \uf11d";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}
1.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}',i='.bc-player-OIWvHjhhx_default *,.bc-player-OIWvHjhhx_default :after,.bc-player-OIWvHjhhx_default :before{box-sizing:inherit;font-size:inherit;color:inherit;line-height:inherit}.bc-player-OIWvHjhhx_default{width:300px;height:150px;font-size:14px;overflow:hidden}.bc-player-OIWvHjhhx_default.vjs-fluid,.bc-player-OIWvHjhhx_default.vjs-fluid.vjs-16-9{padding-top:56.25%}.bc-player-OIWvHjhhx_default.vjs-fluid.vjs-4-3{padding-top:75%}.bc-player-OIWvHjhhx_default.vjs-fill{width:100%;height:100%}.bc-iframe,.bc-iframe body,.bc-player-OIWvHjhhx_default,.bc-player-OIWvHjhhx_default .vjs-poster{background-color:#151B17}.bc-iframe,.bc-iframe .bc-player-OIWvHjhhx_default,.bc-iframe body{margin:0;width:100%;height:100%;overflow:hidden}.bc-player-OIWvHjhhx_default.vjs-fullscreen,.bc-player-OIWvHjhhx_default.vjs-fullscreen .vjs-tech{width:100%!important;height:100%!important}.bc-player-OIWvHjhhx_default .vjs-track-setting select{color:#000;background-color:#fff}.bc-player-OIWvHjhhx_default .vjs-audio-button .vjs-menu-item,.bc-player-OIWvHjhhx_default .vjs-chapters-button .vjs-menu-item,.bc-player-OIWvHjhhx_default .vjs-descriptions-button .vjs-menu-item,.bc-player-OIWvHjhhx_default .vjs-subs-caps-button .vjs-menu-item{text-transform:none}.bc-player-OIWvHjhhx_default.vjs-waiting-for-autoplay .vjs-big-play-button{opacity:0}.bc-player-OIWvHjhhx_default .vjs-progress-control .vjs-mouse-display{z-index:2}/*! @name @brightcove/player-core @version 0.13.0 @license UNLICENSED */.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}.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}
1.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.2.0 @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}.bc-player-OIWvHjhhx_default .vjs-control-bar{background-color:rgba(0,0,0,.45);color:#fff}.bc-player-OIWvHjhhx_default .vjs-control{color:inherit}.bc-player-OIWvHjhhx_default .vjs-mouse-display:after,.bc-player-OIWvHjhhx_default .vjs-play-progress:after{border-radius:0}.bc-player-OIWvHjhhx_default .vjs-menu-button-inline:hover,.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-menu-button-inline{width:8.35em}.bc-player-OIWvHjhhx_default .vjs-control:focus:before,.bc-player-OIWvHjhhx_default .vjs-control:hover:before{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff}.bc-player-OIWvHjhhx_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-OIWvHjhhx_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-OIWvHjhhx_default .vjs-time-control.vjs-time-divider{width:14px}.bc-player-OIWvHjhhx_default .vjs-time-control.vjs-time-divider div{width:100%;text-align:center}.bc-player-OIWvHjhhx_default .vjs-time-control.vjs-current-time{margin-left:1em}.bc-player-OIWvHjhhx_default .vjs-time-control .vjs-current-time-display,.bc-player-OIWvHjhhx_default .vjs-time-control .vjs-duration-display{width:100%}.bc-player-OIWvHjhhx_default .vjs-time-control .vjs-current-time-display{text-align:right}.bc-player-OIWvHjhhx_default .vjs-time-control .vjs-duration-display{text-align:left}.bc-player-OIWvHjhhx_default .vjs-remaining-time{display:none}.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-time-control.vjs-remaining-time{display:none}.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-OIWvHjhhx_default .vjs-play-progress,.bc-player-OIWvHjhhx_default .vjs-volume-level{background-color:#d52484}.bc-player-OIWvHjhhx_default.vjs-ad-playing .vjs-play-progress,.bc-player-OIWvHjhhx_default.vjs-ad-playing .vjs-volume-level{background-color:#ffe400}.bc-player-OIWvHjhhx_default .vjs-play-progress:before,.bc-player-OIWvHjhhx_default .vjs-volume-level:before{display:none}.bc-player-OIWvHjhhx_default .vjs-volume-level:after{display:none}.bc-player-OIWvHjhhx_default .vjs-progress-control{position:absolute;
1left:0;right:0;width:100%;height:1.5em;top:-1.5em}.bc-player-OIWvHjhhx_default .vjs-progress-control .vjs-load-progress,.bc-player-OIWvHjhhx_default .vjs-progress-control .vjs-play-progress,.bc-player-OIWvHjhhx_default .vjs-progress-control .vjs-progress-holder{height:100%}.bc-player-OIWvHjhhx_default .vjs-progress-control .vjs-progress-holder{margin:0}.bc-player-OIWvHjhhx_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-OIWvHjhhx_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-OIWvHjhhx_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-OIWvHjhhx_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-OIWvHjhhx_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-OIWvHjhhx_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-OIWvHjhhx_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar,.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-progress-control,.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-volume-vertical,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-volume-vertical,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-volume-vertical,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-menu,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-OIWvHjhhx_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu-item,.bc-player-OIWvHjhhx_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu{opacity:1}.bc-player-OIWvHjhhx_default.vjs-live .vjs-live-control{margin-left:1em}.bc-player-OIWvHjhhx_default.vjs-live .vjs-time-control.vjs-current-time,.bc-player-OIWvHjhhx_default.vjs-live .vjs-time-control.vjs-duration,.bc-player-OIWvHjhhx_default.vjs-live .vjs-time-control.vjs-time-divider{display:none}.bc-player-OIWvHjhhx_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;
1-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-OIWvHjhhx_default .vjs-big-play-button:active,.bc-player-OIWvHjhhx_default .vjs-big-play-button:focus,.bc-player-OIWvHjhhx_default:active .vjs-big-play-button,.bc-player-OIWvHjhhx_default:hover .vjs-big-play-button{background-color:#d52484}.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu{left:-3em}.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:transparent;width:12em;left:-1.5em;padding-bottom:.5em}.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item,.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-title{background-color:#151B17;margin:.3em 0;padding:.5em;border-radius:.3em}.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected{background-color:#d52484}.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:active,.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:focus,.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.vjs-ad-playing .vjs-mouse-display,.bc-player-OIWvHjhhx_default.vjs-ad-playing .vjs-mouse-display:after{display:none}.bc-player-OIWvHjhhx_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-OIWvHjhhx_default.vjs-ad-playing .vjs-picture-in-picture-control{display:none}.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-spacer{display:table-cell}.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-OIWvHjhhx_default.vjs-no-flex .vjs-remaining-time{display:none}.vjs-mouse.bc-player-OIWvHjhhx_default .vjs-control-bar{font-size:10px}.vjs-mouse.bc-player-OIWvHjhhx_default .vjs-progress-control{height:.5em;top:-.5em}.vjs-mouse.bc-player-OIWvHjhhx_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-OIWvHjhhx_default select{width:inherit}.bc-player-OIWvHjhhx_default.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.bc-player-OIWvHjhhx_default.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:block}.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-glow .vjs-big-play-button:active,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-glow .vjs-big-play-button:focus,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-glow:active .vjs-big-play-button,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-glow:hover .vjs-big-play-button{box-shadow:0 0 15px 3px #fff;background-color:rgba(0,0,0,.45)}.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-darken .vjs-big-play-button:active,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-darken .vjs-big-play-button:focus,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-darken:active .vjs-big-play-button,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-hover-darken:hover .vjs-big-play-button{background-color:rgba(0,0,0,.85)}.bc-player-OIWvHjhhx_default.vjs-play-button-shape-square .vjs-big-play-button{border-radius:11px;height:2em;width:2em;margin-left:-1em;margin-top:-1em}.bc-player-OIWvHjhhx_default.vjs-play-button-shape-rectangle .vjs-big-play-button{border-radius:21px;height:2em;width:3em;margin-left:-1.5em;margin-top:-1em}.bc-player-OIWvHjhhx_default.vjs-play-button-position-top-left .vjs-big-play-button{margin:0;left:17px;top:17px}.bc-player-OIWvHjhhx_default.vjs-play-button-position-top-right .vjs-big-play-button{margin:0;right:17px;left:auto;top:17px}.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-position-top-left .vjs-dock-shelf,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-position-top-left .vjs-dock-text,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-position-top-right .vjs-dock-shelf,.bc-player-OIWvHjhhx_default.video-js.vjs-play-button-position-top-right .vjs-dock-text{display:none}.bc-player-OIWvHjhhx_default .vjs-big-play-button,.bc-player-OIWvHjhhx_default .vjs-control-bar{background-color:rgba(0,0,0,0)}.bc-player-OIWvHjhhx_default .vjs-big-play-button,.bc-player-OIWvHjhhx_default .vjs-control-bar{color:#fff}.bc-iframe .vjs-playlist-sidebar .vjs-playlist-show-hide button:hover,.bc-player-OIWvHjhhx_default .vjs-big-play-button:active,.bc-player-OIWvHjhhx_default .vjs-big-play-button:focus,.bc-player-OIWvHjhhx_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected,.bc-player-OIWvHjhhx_default .vjs-play-progress,.bc-player-OIWvHjhhx_default .vjs-volume-level,.bc-player-OIWvHjhhx_default:active .vjs-big-play-button,.bc-player-OIWvHjhhx_default:hover .vjs-big-play-button{background-color:rgba(0,0,0,0)}',r="bc-style-OIWvHjhhx-default",n,a="bc-style-vjs",s,o,l,u,c=document.querySelector("head"),d=c.firstChild,f=function(e,t){var i=document.createElement("style");i.type="text/css";i.appendChild(document.createTextNode(e));if(t){c.insertBefore(i,t)}else{c.appendChild(i)}return i};o=function(e,t){var i=undefined;var r=e.define;var n=[];var a=function(){var t=e.navigator.userAgent.match(/applewebkit\/(\d*).*Version\/(\d*.\d*)/i);return l.browser.IS_ANDROID&&l.browser.ANDROID_VERSION<5&&t&&t[2]>0};var s=e.videojs;e.VIDEOJS_NO_DYNAMIC_STYLE=true;var o=function(i,r){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i;r=r&&r.hasOwnProperty("default")?r["default"]:r;var n="0.13.0";var a=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function s(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function o(e,t){return t={exports:{}},e(t,t.exports),t.exports}var l=o(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i){if(Object.prototype.hasOwnProperty.call(i,r)){e[r]=i[r]}}}return e};return t.apply(this,arguments)}
1e.exports=t});var u=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"});var c=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,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,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,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,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,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,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,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,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,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,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,55,167,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,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,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,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,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,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,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,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,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,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,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,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,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,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,55,167,128,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,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,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,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,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,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,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,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function d(e){return Object.assign({muted:false,timeout:250,inline:false},e)}function f(e,t){var i=e.muted,r=e.timeout,n=e.inline;var a=t(),s=a.element,o=a.source;var l=void 0;var u=void 0;var c=void 0;s.muted=i;if(i===true){s.setAttribute("muted","muted")}if(n===true){s.setAttribute("playsinline","playsinline")}s.src=o;return new Promise(function(e){l=s.play();u=setTimeout(function(){c(false,new Error("Timeout "+r+" ms has been reached"))},r);c=function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;clearTimeout(u);e({result:i,error:r})};if(l!==undefined){l.then(function(){return c(true)}
vendor: 5,148 bytes, line 1
1).catch(function(e){return c(false,e)})}else{c(true)}})}function h(e){e=d(e);return f(e,function(){return{element:t.createElement("video"),source:URL.createObjectURL(c)}})}function p(e){e=d(e);return f(e,function(){return{element:t.createElement("audio"),source:URL.createObjectURL(u)}})}var v={audio:p,video:h};var m=o(function(i,r){(function(e,t){i.exports=t()})(a,function(){function i(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function r(e){return typeof e==="function"}var n=void 0;if(Array.isArray){n=Array.isArray}else{n=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}var o=n;var l=0;var u=void 0;var c=void 0;var d=function e(t,i){k[l]=t;k[l+1]=i;l+=2;if(l===2){if(c){c(E)}else{C()}}};function f(e){c=e}function h(e){d=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 u!=="undefined"){return function(){u(E)}}return j()}function T(){var e=0;var i=new m(E);var r=t.createTextNode("");i.observe(r,{characterData:true});return function(){r.data=e=++e%2}}function S(){var e=new MessageChannel;e.port1.onmessage=E;return function(){return e.port2.postMessage(0)}}function j(){var e=setTimeout;return function(){return e(E,1)}}var k=new Array(1e3);function E(){for(var e=0;e<l;e+=2){var t=k[e];var i=k[e+1];t(i);k[e]=undefined;k[e+1]=undefined}l=0}function w(){try{var e=Function("return this")().require("vertx");u=e.runOnLoop||e.runOnContext;return b()}catch(e){return j()}}var C=void 0;if(g){C=_()}else if(m){C=T()}else if(y){C=S()}else if(p===undefined&&typeof s==="function"){C=w()}else{C=j()}function I(e,t){var i=this;var r=new this.constructor(O);if(r[x]===undefined){Q(r)}var n=i._state;if(n){var a=arguments[n-1];d(function(){return Y(n,r,a,i._result)})}else{z(i,r,e,t)}return r}function A(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e}var i=new t(O);H(i,e);return i}var x=Math.random().toString(36).substring(2);function O(){}var P=void 0;var D=1;var R=2;function L(){return new TypeError("You cannot resolve a promise with itself")}function N(){return new TypeError("A promises callback cannot return that same promise.")}function U(e,t,i,r){try{e.call(t,i,r)}catch(e){return e}}function M(e,t,i){d(function(e){var r=false;var n=U(i,t,function(i){if(r){return}r=true;if(t!==i){H(e,i)}else{q(e,i)}},function(t){if(r){return}r=true;W(e,t)},"Settle: "+(e._label||" unknown promise"));if(!r&&n){r=true;W(e,n)}},e)}function B(e,t){if(t._state===D){q(e,t._result)}else if(t._state===R){W(e,t._result)}else{z(t,undefined,function(t){return H(e,t)},function(t){return W(e,t)})}}function F(e,t,i){if(t.constructor===e.constructor&&i===I&&t.constructor.resolve===A){B(e,t)}else{if(i===undefined){q(e,t)}else if(r(i)){M(e,t,i)}else{q(e,t)}}}function H(e,t){if(e===t){W(e,L())}else if(i(t)){var r=void 0;try{r=t.then}catch(t){W(e,t);return}F(e,t,r)}else{q(e,t)}}function V(e){if(e._onerror){e._onerror(e._result)}G(e)}function q(e,t){if(e._state!==P){return}e._result=t;e._state=D;if(e._subscribers.length!==0){d(G,e)}}function W(e,t){if(e._state!==P){return}e._state=R;e._result=t;d(V,e)}function z(e,t,i,r){var n=e._subscribers;var a=n.length;e._onerror=null;n[a]=t;n[a+D]=i;n[a+R]=r;if(a===0&&e._state){d(G,e)}}function G(e){var t=e._subscribers;var i=e._state;if(t.length===0){return}var r=void 0,n=void 0,a=e._result;for(var s=0;s<t.length;s+=3){r=t[s];n=t[s+i];if(r){Y(i,r,n,a)}else{n(a)}}e._subscribers.length=0}function Y(e,t,i,n){var a=r(i),s=void 0,o=void 0,l=true;if(a){try{s=i(n)}catch(e){l=false;o=e}if(t===s){W(t,N());return}}else{s=n}if(t._state!==P);else if(a&&l){H(t,s)}else if(l===false){W(t,o)}else if(e===D){q(t,s)}else if(e===R){W(t,s)}}function K(e,t){try{t(function t(i){H(e,i)},function t(i){W(e,i)})}catch(t){W(e,t)}}var X=0;function J(){return X++}function Q(e){e[x]=X++;e._state=undefined;e._result=undefined;e._subscribers=[]}function Z(){return new Error("Array Methods must be provided an Array")}var $=function(){function e(e,t){this._instanceConstructor=e;this.promise=new e(O);if(!this.promise[x]){Q(this.promise)}if(o(t)){this.length=t.length;this._remaining=t.length;this._result=new Array(this.length);if(this.length===0){q(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(t);if(this._remaining===0){q(this.promise,this._result)}}}else{W(this.promise,Z())}}e.prototype._enumerate=function e(t){for(var i=0;this._state===P&&i<t.length;i++){this._eachEntry(t[i],i)}};e.prototype._eachEntry=function e(t,i){var r=this._instanceConstructor;var n=r.resolve;if(n===A){var a=void 0;var s=void 0;var o=false;try{a=t.then}catch(e){o=true;s=e}if(a===I&&t._state!==P){this._settledAt(t._state,i,t._result)}else if(typeof a!=="function"){this._remaining--;this._result[i]=t}else if(r===ae){var l=new r(O);if(o){W(l,s)}else{F(l,t,a)}this._willSettleAt(l,i)}
vendor: 2,284 bytes, line 1
1else{this._willSettleAt(new r(function(e){return e(t)}),i)}}else{this._willSettleAt(n(t),i)}};e.prototype._settledAt=function e(t,i,r){var n=this.promise;if(n._state===P){this._remaining--;if(t===R){W(n,r)}else{this._result[i]=r}}if(this._remaining===0){q(n,this._result)}};e.prototype._willSettleAt=function e(t,i){var r=this;z(t,undefined,function(e){return r._settledAt(D,i,e)},function(e){return r._settledAt(R,i,e)})};return e}();function ee(e){return new $(this,e).promise}function te(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(i,r){var n=e.length;for(var a=0;a<n;a++){t.resolve(e[a]).then(i,r)}})}}function ie(e){var t=this;var i=new t(O);W(i,e);return i}function re(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ae=function(){function e(t){this[x]=J();this._result=this._state=undefined;this._subscribers=[];if(O!==t){typeof t!=="function"&&re();this instanceof e?K(this,t):ne()}}e.prototype.catch=function e(t){return this.then(null,t)};e.prototype.finally=function e(t){var i=this;var n=i.constructor;if(r(t)){return i.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})}return i.then(t,t)};return e}();ae.prototype.then=I;ae.all=ee;ae.race=te;ae.resolve=A;ae.reject=ie;ae._setScheduler=f;ae._setAsap=h;ae._asap=d;function se(){var e=void 0;if(typeof a!=="undefined"){e=a}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 i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if(i==="[object Promise]"&&!t.cast){return}}e.Promise=ae}ae.polyfill=se;ae.Promise=ae;return ae})});var g=r.performance;var y={};["memory","navigation","timing"].forEach(function(e){y[e]=g&&g[e]||{}});["clearMarks","clearMeasures","clearResourceTimings","getEntries","getEntriesByName","getEntriesByType","mark","measure","now","setRe
1sourceTimingBufferSize","toJSON"].forEach(function(e){y[e]=function(){if(g&&g[e]){return g[e].apply(g,arguments)}}});function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var b=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function T(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function S(e,t,i,r){t=t||"&";i=i||"=";if(e===null){e=undefined}if(typeof e==="object"){return j(k(e),function(r){var n=encodeURIComponent(T(r))+i;if(b(e[r])){return j(e[r],function(e){return n+encodeURIComponent(T(e))}).join(t)}else{return n+encodeURIComponent(T(e[r]))}}).join(t)}if(!r)return"";return encodeURIComponent(T(r))+i+encodeURIComponent(T(e))}function j(e,t){if(e.map)return e.map(t);var i=[];for(var r=0;r<e.length;r++){i.push(t(e[r],r))}return i}var k=Object.keys||function(e){var t=[];for(var i in e){if(Object.prototype.hasOwnProperty.call(e,i))t.push(i)}return t};function E(e,t,i,r){t=t||"&";i=i||"=";var n={};if(typeof e!=="string"||e.length===0){return n}var a=/\+/g;e=e.split(t);var s=1e3;if(r&&typeof r.maxKeys==="number"){s=r.maxKeys}var o=e.length;if(s>0&&o>s){o=s}for(var l=0;l<o;++l){var u=e[l].replace(a,"%20"),c=u.indexOf(i),d,f,h,p;if(c>=0){d=u.substr(0,c);f=u.substr(c+1)}else{d=u;f=""}h=decodeURIComponent(d);p=decodeURIComponent(f);if(!_(n,h)){n[h]=p}else if(b(n[h])){n[h].push(p)}else{n[h]=[n[h],p]}}return n}var w={encode:S,stringify:S,decode:E,parse:E};function C(e){if(e===void 0){e=r&&r.location||{}}return l({hash:w.parse((e.hash||"#").substr(1)),search:w.parse((e.search||"?").substr(1))},w)}var I={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 A={perf:y,Promise:m,qs:C,assign:function e(){return l.apply(void 0,arguments)},get:function e(t,i,r){var n=t;var a=i.split(".");if(!n){return r}for(var s=0;s<a.length;s++){var o=a[s];if(n[o]===undefined){return r}if(s+1<a.length){n=n[o]}else{return n[o]}}},withoutNilValues:function e(t){var i=t;if(I.isArr(t)){i=t.filter(function(e){return!I.isNil(e)}).map(A.withoutNilValues)}else if(I.isObj(t)){i={};Object.keys(t).forEach(function(e){if(!I.isNil(t[e])){i[e]=A.withoutNilValues(t[e])}})}return i},debounce:function e(t,i,n,a){if(a===void 0){a=r}var s;return function(){var e=this;var r=arguments;var o=function i(){s=null;o=null;if(!n){t.apply(e,r)}};if(!s&&n){t.apply(e,r)}a.clearTimeout(s);s=a.setTimeout(o,i)}},throttle:function e(t,i){var r=Date.now();return function(){var e=Date.now();if(e-r>=i){t.apply(void 0,arguments);r=e}}}};A.assign(A,I);A.VERSION="n/a";var x={};var O=[{inline:false,muted:false},{inline:true,muted:false},{inline:false,muted:true},{inline:true,muted:true}];function P(e){var t=e.filter(function(e){return e.passed})[0];if(!t){return{always:false,sometimes:false,never:true,inline:false,muted:false}}var i=t.inline,r=t.muted;var n=!i&&!r;return{always:n,sometimes:!n,never:false,inline:i,muted:r}}function D(e){var t;if(e.IE_VERSION){t={always:true,sometimes:false,never:false,inline:false,muted:false}}if(e.ANDROID_VERSION||e.IS_IOS){t={always:false,sometimes:true,never:false,inline:false,muted:true};if(e.IS_IPHONE){t.inline=true}}if(t){return A.Promise.resolve(t)}}function R(e,t){if(e!=="video"&&e!=="audio"){throw new Error("invalid autoplay type: "+e)}if(x[e]){return x[e]}var i=D(t.browser);if(i){x[e]=i;return i}var r=O.map(function(t){return v[e](t).then(function(e){var i=e.result;return l({passed:i},t)})});x[e]=A.Promise.all(r).then(function(e){return P(e)});return x[e]}var L=3;var N=50;var U=function e(t){var n=i.body;var a=i.createElement("div");a.className="pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text_ads_2 text-ads text-ad-links";a.innerHTML=" ";a.setAttribute("style","height:10px!important;font-size:20px;color:transparent;position:absolute;bottom:0;left:-10000px");var s=0;var o=function e(){s++;var i=a.offsetHeight===0||!n.contains(a)||a.style.display==="none"||a.style.visibility==="hidden";if(i||s===L){if(a.parentNode){a.parentNode.removeChild(a)}return t(i)}r.setTimeout(e,N)};n.appendChild(a);o()};var M=null;var B;function F(e){if(e||!B){B=new m(function(e){if(i.readyState==="complete"||i.readyState!=="loading"&&!i.documentElement.doScroll){U(e)}else{i.addEventListener("DOMContentLoaded",function(){U(e)})}})}return B.then(function(e){M=e;return e})}Object.defineProperties(F,{VERSION:{enumerable:true,value:"n/a"},lastResult:{enumerable:true,get:function e(){return M}},mightBe:{enumerable:true,get:function e(){return M!==false}},mightNotBe:{enumerable:true,get:function e(){return M!==true}}});var H=function e(t){var i=t.registerPlugin||t.plugin;i("urlparams",function(e){e=e||{};var i=function e(t){var i=0,r;t=(t||"").replace(/^\s+|\s+$/g,"");if(!t||!/^(\d+h)?(\d+m)?(\d+s)?$/.test(t)){return-1}r=t.match(/^(\d+)h/);if(r){i+=parseFloat(r[1])*3600;t=t.replace(/^(\d+)h/,"")}r=t.match(/^(\d+)m/);if(r){i+=parseFloat(r[1])*60;t=t.replace(/^(\d+)m/,"")}r=t.match(/^(\d+)s/);if(r){i+=parseFloat(r[1])}return i},r=.9,n=function e(t,i){var n=t-i;if(isNaN(n)){return false}return Math.abs(n)<r},a=function e(t){s.ready(function(){if(s.networkState()===2){t()}else{s.one("loadedmetadata",function(){s.setTimeout(t,0)})}})},s=this,o=A.qs(),l=o.hash.t||o.search.t,u;if(typeof e.time==="number"){u=e.time}else{u=i(e.time)}if(l){if(/^[\d]+$/.test(l)){u=Number(l)}else{u=i(l)}if(!e.iframe&&u!==-1){t.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,i,r=false,o=function e(){if(r||n(s.currentTime(),u)){r=true;l()}else{s.currentTime(u);i=s.setTimeout(e,t)}},l=function e(){s.clearTimeout(i);s.off("timeupdate",e);if(!r){s.currentTime(u)}};s.on("timeupdate",l);a(o)})()}if(o.hash.captions!==undefined||o.search.captions!==undefined){(function(){var e=o.hash.captions||o.search.captions;s.one("play",function(){var t=s.textTracks(),i,r;if(t){for(r=0;r<t.length;r++){i=t[r];if(i.language===e){i.mode="showing";break}}}})})()}})};function V(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var q=V;function W(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var z=W;var G={activeCues:null,cues:null,id:"",inBandMetadataTrackDispatchType:undefined,kind:"metadata",label:"",language:"",mode:"",oncuechange:undefined};var Y=["activeCues","cues","id","inBandMetadataTrackDispatchType","kind","label","language"];var K=["mode"];var X=function e(t,i){if(t==="media"&&i.kind==="metadata"&&i.label==="media-cues"){return true}if(t==="id3"&&typeof i.inBandMetadataTrackDispatchType==="string"&&i.inBandMetadataTrackDispatchType.trim().length>0){return true}return false};var J=function e(t){var i=function(e){z(i,e);function i(i,r,n){var a;if(n===void 0){n=function e(){}}a=e.call(this)||this;var s=q(a);s.player_=i;s.reTriggerEvent_=t.bind(s,s.reTriggerEvent_);s.update_=t.bind(s,s.update_);s.type_=r;s.logger_=n;
1Y.concat(K).forEach(function(e){var t={get:function t(){return s.track_&&s.track_[e]||G[e]},enumerable:true};if(K.indexOf(e)!==-1){t.set=function(t){if(!s.track_){return}s.track_[e]=t}}Object.defineProperty(s,e,t)});s.update_();var o=i.textTracks();var l=function e(t){if(!s.track_){s.update_(t)}else if(s.track_.mode!=="hidden"){s.track_.mode="hidden";s.logger_("timeupdate -> type:"+s.type_+(s.track_?",mode:"+s.track_.mode:"")+" -> track was set to hidden")}};["addtrack","removetrack"].forEach(function(e){return o.addEventListener(e,s.update_)});s.player_.on("timeupdate",l);return s||q(a)}var r=i.prototype;r.addCue=function e(){var t=this;var i=arguments;if(!this.track_){this.one("trackexists",function(){return t.addCue.apply(t,i)});return}return this.track_.addCue.apply(this.track_,i)};r.removeCue=function e(){var t=this;var i=arguments;if(!this.track_){return this.one("trackexists",function(){return t.removeCue.apply(t,i)})}return this.track_.removeCue.apply(this.track_,i)};r.reTriggerEvent_=function e(t){this.trigger(t)};r.update_=function e(t){if(t===void 0){t={}}var i;if(t.type==="removetrack"&&t.track&&t.track===this.track_){i=null}else if(t.type==="addtrack"&&t.track&&!this.track_&&X(this.type_,t.track)){i=t.track}else{var r=this.player_.textTracks();var n=r.length;while(n--){if(X(this.type_,r[n])){i=r[n];break}}}this.logger_("update -> type:"+this.type_+", mode:"+(i?i.mode:"?")+" -> event:"+(t.type||"constructor"));if(this.track_===i){this.logger_("update -> type:"+this.type_+", mode:"+(i?i.mode:"?")+" -> "+(i?"already proxied":"no track to proxy"));return}if(this.track_){this.track_.removeEventListener("cuechange",this.reTriggerEvent_)}this.track_=i;if(!this.track_){this.logger_("update -> type:"+this.type_+", mode:"+(i?i.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:"+(i?i.mode:"?")+" -> track exists")};return i}(t.EventTarget);i.prototype.allowedEvents_={cuechange:"cuechange"};return i};var Q=function e(t){var i=J(t);var r={id3CuePointsTrack:function e(t){var r=this.proxyTracks_.id3;if(!r){r=this.proxyTracks_.id3=new i(this,"id3",t)}return r},mediaCuePointsTrack:function e(t){var r=this.proxyTracks_.media;if(r){return r}r=this.proxyTracks_.media=new i(this,"media",t);if(r.track_){return r}this.addTextTrack("metadata","media-cues");r.update_();return r}};function a(e){var i=this;if(e===void 0){e={}}this.proxyTracks_={};var n=t.createLogger("proxyTracks");if(!e.debug){n=function e(){}}n("initialized");Object.keys(r).forEach(function(e){i[e]=function(){return r[e].call(i,n)}});this.ready(function(){Object.keys(r).forEach(function(t){var r=i[t]();if(e.debug){r.on("cuechange",function(){for(var e=0;e<r.activeCues.length;e++){var t=r.activeCues[e];n(r.type_+" -> cuechange -> activeCues["+e+"]: "+(t.value&&t.value.key||t.frame&&t.frame.id))}})}})})}t.registerPlugin("proxyTracks",a);a.VERSION=n};var Z={verbose:false,maxSavedSeekEvents:10,debounceTimeout:1e3,playbackRateTolerance:1.5,stableTimeUpdate
1Count:3,minInterval:1};var $=function e(t){t.trigger("seek")};var ee=function e(t){var i=function e(i){var r=t.mergeOptions(Z,i);var n;var a=false;var s;var o;var l;var u;var c=0;var d=[];var f=0;var h={};var p={};var v=r.verbose?function(){var e;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}return(e=t.log).call.apply(e,[t,"seek-events:"].concat(r))}:function(){};var m=function e(){h.seek=this.seekEvents.last().seekEnd;a=false;v("event seekStart: ",this.seekEvents.last().seekStart);v("event seekEnd: ",this.seekEvents.last().seekEnd)};var g=function e(){v("stable");this.seekEvents.stable=true};var y=function e(){v("unstable");this.seekEvents.stable=false};var _=function e(t){h.seek=this.currentTime();h.clock=t.timeStamp||Date.now();p.seek=h.seek;p.clock=h.clock};var b=A.debounce($,r.debounceTimeout);var T=function e(t){s=this.currentTime();o=t.timeStamp||+new Date;l=s-p.seek;if(o===p.clock||s===h.seek){return}u=Math.abs(l)/(Math.abs(o-p.clock)*.001);if(u/this.playbackRate()>this.seekEvents.playbackRateTolerance){if(Math.abs(s-h.seek)>=this.seekEvents.minInterval){this.trigger("unstable");c=0;if(!a){f=Number(h.seek)}d.push({timeStamp:o,seekStart:f,seekEnd:s,seekInterval:s-f});if(d.length>r.maxSavedSeekEvents){d.shift()}a=true;b(this)}}else{c++;v(s+": "+c);if(c>
1=this.seekEvents.stableTimeUpdateCount&&!this.seekEvents.stable&&!a){this.trigger("stable")}h.seek=s}p.seek=s;p.clock=o};this.seekEvents={stableTimeUpdateCount:r.stableTimeUpdateCount,playbackRateTolerance:r.playbackRateTolerance,debounceTimeout:r.debounceTimeout,minInterval:r.minInterval,stable:false,enabled:function e(){return n},enable:t.bind(this,function(){if(n){return}n=true;h.seek=0;h.clock=Date.now();p.seek=0;p.clock=h.clock;this.on("seek",m);this.on("stable",g);this.on("unstable",y);this.on(["loadstart","playing","adplaying"],_);this.on(["timeupdate","adtimeupdate"],T)}),disable:t.bind(this,function(){if(!n){return}n=false;this.off("seek",m);this.off("stable",g);this.off("unstable",y);this.off(["loadstart","playing","adplaying"],_);this.off(["timeupdate","adtimeupdate"],T)}),last:function e(){return d[d.length-1]},all:function e(){return d}};this.seekEvents.enable()};var r=t.registerPlugin||t.plugin;i.VERSION=n;r("seekEvents",i)};var te=["eme","chromecastReceiver","vr","pip","qualityMenu","ima3","FreeWheelPlugin","ssai","bcPlaylistUi","bcGa","bcAa","bcTealium","bcGtm"];var ie=function e(t,n,a){var s=a.settings;var o=a.environment;var l=o.queryString;var u={};var c={bcAnalytics:{applicationId:s.applicationId,mr:Boolean(r.bc_isManagedRelease),referrer:l.referrer,usage:l.usage}};if(s.debugger!==false){var d=[{label:n.localize("Player Information"),listener:function e(){return n.usingPlugin("playerInfo")&&n.playerInfo.modal.open()}}];if(s.debugger.brightcoveBranding!==false){d.push({href:"https://www.brightcove.com/en/why-brightcove?utm_type=player",label:n.localize("About Brightcove")})}c.contextmenuUI={content:d}}var f=function e(i,r){if(r===void 0){r={}}var a=c[i]||{};if(!n.hasPlugin(i)){t.log.error('Plugin "'+i+'" is missing. Please check your player configuration.');return}if(n.usingPlugin(i)){return}var s=t.mergeOptions(a,r);if(te.indexOf(i)!==-1){n.trigger({type:"usage",name:i});if(i==="bcPlaylistUi"){n.trigger({type:"usage",name:""+i+(s.horizontal?"-horz":"-vert")});if(s.repeat){n.trigger({type:"usage",name:i+"-repeat"})}if(s.shuffle){n.trigger({type:"usage",name:i+"-shuffle"})}}}try{n[i](s)}catch(e){t.log.error('Unable to initialize "'+i+'" plugin:',e)}};if(s.usingAdFailover){n.trigger({type:"usage",name:"ad-failover"});var h=n.usingAdBlocker.mightBe?s.serverSideAdPlugin:s.clientSideAdPlugin,p=h.name,v=h.options;f(p,v)}s.plugins.forEach(function(e){var t=e.autoInit,i=e.name,r=e.options;if(!t){return}f(i,r)});var m=s.media,g=s.videoCloud;var y=m&&!!(m.sources||m.length&&m[0].sources);if(g&&g.policy_key&&!y){var _={embedHasPoster:s.embedState.poster,embedHasSources:s.embedState.sources,embedHasTracks:s.embedState.tracks,adConfigId:s.adConfigId,deliveryConfigId:s.deliveryConfigId};if(g.playlist){n.trigger({type:"usage",name:"catalog-playlist"});_.playlistId=g.playlist}if(g.video){n.trigger({type:"usage",name:"catalog-video"});_.videoId=g.video}if(g.search){n.trigger({type:"usage",name:"catalog-search"});_.search=g.search}if(g.sequence){n.trigger({type:"usage",name:"catalog-sequence"});_.sequence=g.sequence}var b=u.catalogMedia=n.catalog.autoFindAndLoadMedia(_);if(b&&b.type==="video"){if(/^[\d]+$/.test(b.id)){n.mediainfo.id=b.id}else{n.mediainfo.referenceId=n.mediainfo.reference_id=b.id}}}if(n.usingPlugin("bcAnalytics")){var T=function e(){return(new Date).toISOString().split("T")[0]+":"+n.bcAnalytics.client.getSession()};n.ready(function(){A.perf.mark("bcInitEnd");A.perf.measure("bcInit","bcInitStart","bcInitEnd");if(n.usingPlugin("playerInfo")){n.playerInfo.modal.on("modalfill",function(){var e=T();var t=n.playerInfo.modal.$(".vjs-pi-section--player tbody");if(!e||!t){return}var r=i.createElement("tr");var a=i.createElement("tr");r.innerHTML="<td>"+n.localize("Session ID")+"</td> <td>"+e+"</td>";t.appendChild(r);a.innerHTML="<td>"+n.localize("Player Element ID")+"</td> <td>"+n.id()+"</td>";t.appendChild(a)})}});if(n.usingPlugin("errors")){n.errorDisplay.on("modalfill",function(){var e=T();var i=n.errorDisplay.$(".vjs-errors-content-container");if(!e||!i){return}i.appendChild(t.dom.createEl("div",{className:"vjs-errors-ref-id",innerHTML:"<b>"+n.localize("Session ID:")+"</b> "+e+" "+"<b>"+n.localize("Player Element ID:")+"</b> "+n.id()}))})}}if(n.usingPlugin("playerInfo")){n.on("vjs-contextmenu",function(){if(n.playerInfo.modal){n.playerInfo.modal.close()}})}if(n.hasPlugin("dock")){var S=m&&(m[0]&&m[0].title||m.title)||"";var j=m&&(m[0]&&m[0].description||m.description)||"";var k=function e(){if(n.controls()){n.dock({title:n.mediainfo&&n.mediainfo.name||S,description:n.mediainfo&&n.mediainfo.description||j})}};k();n.on("loadedmetadata",k)}return u};var re=function e(t){var i=t.registerPlugin||t.plugin;i("touchActive",function(){if(!t.browser.TOUCH_ENABLED){return}var e=this;var i=false;var r=function t(){if(!i){e.userActive(false)}};e.one("play",function(){var t=e.options_.inactivityTimeout>0?e.options_.inactivityTimeout:5e3;e.el().className+=" vjs-user-active";e.one(["click","tap"],function(){i=true});e.setTimeout(r,t)})})};var ne=A.get;var ae="unknown";
1var se=function e(t){var i=t.getComponent("ModalDialog");var n=t.dom;var a={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 s=function e(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}return"<tr>"+i.map(function(e){return"<td>"+e+"</td>"}).join("")+"</tr>"};var o=function(e){z(i,e);function i(){return e.apply(this,arguments)||this}var o=i.prototype;o.buildCSSClass=function t(){return"vjs-player-info-modal "+e.prototype.buildCSSClass.call(this)};o.dataForPlugins_=function e(){var i=this;return Object.keys(a).filter(t.getPlugin).sort().map(function(e){var r=i.player();return{active:r.usingPlugin(e),displayName:a[e],version:t.getPluginVersion(e)||ne(r,e+".VERSION",ae)}})};o.dataForSource_=function e(){var t=this.player();var i=t.tech_.hls,r=t.mediainfo;var n={mediainfo:r,tech:t.techName_,type:t.currentType()};if(!i){return n}var a=ne(i,"playlists",{media:function e(){}}).media();n.hls={bandwidth:ne(i,"stats.bandwidth",ae),mediaBytesTransferred:ne(i,"stats.mediaBytesTransferred",ae),mediaTransferDuration:ne(i,"stats.mediaTransferDuration",ae),mediaRequests:ne(i,"stats.mediaRequests",ae)};if(a){n.hls.rendition={height:ne(a,"attributes.RESOLUTION.height",ae),width:ne(a,"attributes.RESOLUTION.width",ae)}}return n};o.data=function e(){var t=this.player();var i=n.getAttributes(t.el());var a=ne(t,"bcinfo.accountId",ne(i,"data-account",ae));var s=ne(t,"bcinfo.playerId",ne(i,"data-player",ae));var o=ne(t,"bcinfo.embedId",ne(i,"data-embed",ae));var l=ne(t,"bcinfo.applicationId",ne(i,"data-application-id",""));var u=ne(r,"bc."+s+"_"+o+".VERSION",ne(r,"bc.VERSION",ae));var c=ne(r,"bc."+s+"_"+o+".videojs.VERSION",ne(r,"videojs.VERSION",ae));return{player:{accountId:a,playerId:s,embedId:o,applicationId:l,playerVersion:u,videojsVersion:c},plugins:this.dataForPlugins_(),source:this.dataForSource_()}};o.contentForPlugins_=function e(t){var i=this;var r=('\n <tr>\n <td colspan="3">'+this.localize("No plugins available.")+"</td>\n </tr>\n ").trim();if(t.plugins.length){r=t.plugins.map(function(e){return s(e.displayName,e.version,e.active?i.localize("yes"):i.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>"+r+"</tbody>\n </table>\n ").trim()};o.contentForSource_=function e(t){var i=["<table><tbody>",s(this.localize("Current Playback Tech"),t.source.tech),s(this.localize("Current Media Type"),t.source.type)];if(t.source.mediainfo){i.push(s(this.localize("Video Name"),t.source.mediainfo.name),s(this.localize("Video ID"),t.source.mediainfo.id))}if(t.source.hls){i.push(s(this.localize("Current Bandwidth"),t.source.hls.bandwidth),s(this.localize("Media Bytes Transferred"),t.source.hls.mediaBytesTransferred),s(this.localize("Media Requests"),t.source.hls.mediaRequests),s(this.localize("Media Transfer Duration"),t.source.hls.mediaTransferDuration));if(t.source.hls.rendition){i.push(s(this.localize("Rendition Width"),t.source.hls.rendition.width),s(this.localize("Rendition Height"),t.source.hls.rendition.height))}}return i.concat("</tbody></table>").join("")};o.content=function e(){var t=this.data();return[n.createEl("h1",{innerHTML:this.localize("Player Information")}),n.createEl("div",{className:"vjs-pi-section vjs-pi-section--player",innerHTML:["<h2>"+this.localize("General")+"</h2>","<table><tbody>",s(this.localize("Brightcove Player Version"),t.player.playerVersion),s(this.localize("Video.js Version"),t.player.videojsVersion),s(this.localize("Account ID"),t.player.accountId),s(this.localize("Player ID"),t.player.playerId),s(this.localize("Embed ID"),t.player.embedId),s(this.localize("Application ID"),t.player.applicationId),"</tbody></table>"].join("")}),n.createEl("div",{className:"vjs-pi-section vjs-pi-section--plugins",innerHTML:["<h2>"+this.localize("Plugins")+"</h2>",this.contentForPlugins_(t)].join("")}),n.createEl("div",{className:"vjs-pi-section vjs-pi-section--source",innerHTML:["<h2>"+this.localize("Source")+"</h2>",this.contentForSource_(t)].join("")})]};return i}(i);t.registerComponent("PlayerInfoModal",o);return o};var oe=function e(t){se(t);function i(){var e=this;
1if(this.playerInfo.modal){this.playerInfo.modal.dispose()}this.playerInfo=function(){i.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})})}t.registerPlugin("playerInfo",i);i.VERSION=n};var le=function e(t){var i=function e(t,i){if(typeof t.usingPlugin==="function"){return t.usingPlugin(i)}return!!t[i]};var r=function e(t){t.postrollFinished=false;t.postrollTimedOut=false;t.sawNoPostrollEvent=false};var a=function e(t){if(!i(t,"ads")){return false}var r=t.endscreenState_;if(r.sawNoPostrollEvent){return false}return!r.postrollFinished&&!r.postrollTimedOut};var s=function e(t){if(!i(t,"playlist")){return false}var r=t.playlist;var n=r();if(r.autoadvance_.delay!==0||!n.length){return false}return r.repeat()||r.currentItem()!==n.length-1};var o=function e(){var t=this;if(this.endscreenState_){return}var i=this.endscreenState_={};var n=function e(){t.trigger("endscreen")};r(i);this.on("adstart",function(){var e=t.ended();i.postrollFinished=!e});this.on("adend",function(){i.postrollFinished=t.ended()});this.on("adtimeout",function(){i.postrollTimedOut=t.ended()});this.on(["endscreen","loadstart"],function(){t.off("adend",n);r(i)});this.on("nopostroll",function(){i.sawNoPostrollEvent=true});this.on("ended",function(){if(s(t)){return}if(a(t)){t.one("adend",n);return}n()})};o.VERSION=n;if(t.registerPlugin){if(!t.getPlugin("endscreen")){t.registerPlugin("endscreen",o)}}else{t.plugin("endscreen",o)}};var ue="bc-style-vjs";var ce="vjs-waiting-for-autoplay";function de(e,t,r){var n=e.classNames;if(!t&&!r&&t!==0&&r!==0){return}var a=i.querySelector("."+n.playerInstanceDimensions);if(!a){a=i.createElement("style");a.className=n.playerInstanceDimensions;var s=i.querySelector("."+n.playerStyle)||i.querySelector("."+ue);if(s){s.parentNode.insertBefore(a,s.nextSibling)}else{i.head.appendChild(a)}}else if(a.innerText){if(!t&&t!==0){var o=/width:(\d+)px;/g.exec(a.innerText);if(o&&o[1]){t=parseInt(o[1],10)}}else if(!r&&r!==0){var l=/height:(\d+)px;/g.exec(a.innerText);if(l&&l[1]){r=parseInt(l[1],10)}}}var u="."+n.playerInstance+"{";if(t||t===0){u+="width:"+parseInt(t,10)+"px;"}if(r||r===0){u+="height:"+parseInt(r,10)+"px;"}u+="}";a.innerText=u}function fe(e,t,i,r){var n=t.settings,a=t.environment;var s=n.embedId,o=n.playerId;var l=a.isInBcFrame,u=a.queryString,c=a.urlHash;var d="bc-player-"+o+"_"+s;var f=d+"-index-"+n.playerIndex;n.classNames={player:d,playerStyle:"bc-style-"+o+"-"+s,playerInstance:f,playerInstanceDimensions:f+"-video-dimensions"};n.embedState={loop:i.hasAttribute("loop"),muted:i.hasAttribute("muted"),playsinline:i.hasAttribute("playsinline"),poster:i.hasAttribute("poster"),sources:!!i.querySelector("source"),tracks:!!i.querySelector("track")};if(i.hasAttribute("data-vttjs")&&A.isNonEmptyStr(i.getAttribute("data-vttjs"))){r["vtt.js"]=i.getAttribute("data-vttjs")}else if(u.vttjs&&A.isNonEmptyStr(u.vttjs)){r["vtt.js"]=u.vttjs}else if(r.hasOwnProperty("vtt.js")||r.hasOwnProperty("vttjs")){r["vtt.js"]=r["vtt.js"]||r.vttjs}else if(n["vtt.js"]||n.vttjs){r["vtt.js"]=n["vtt.js"]||n.vttjs}else{r["vtt.js"]="https://vjs.zencdn.net/vttjs/0.12.5/vtt.global.min.js"}if(n.playButton){var h=n.playButton,p=h.hover,v=h.shape,m=h.position;if(p==="glow"){e.dom.addClass(i,"vjs-play-button-hover-glow")}else if(p==="darken"){e.dom.addClass(i,"vjs-play-button-hover-darken")}if(v==="square"){e.dom.addClass(i,"vjs-play-button-shape-square")}else if(v==="rectangle"){e.dom.addClass(i,"vjs-play-button-shape-rectangle")}if(m==="topRight"){e.dom.addClass(i,"vjs-play-button-position-top-right")}else if(m==="topLeft"){e.dom.addClass(i,"vjs-play-button-position-top-left")}}if(u.crossorigin!==undefined||n.media&&n.media.tracks&&e.browser.IS_ANY_SAFARI){n.crossorigin=true}if(n.crossorigin){i.setAttribute("crossorigin","anonymous")}var g=c.t||u.t||i.getAttribute("data-start-time");if(/^[\d]+$/.test(g)){n.startTime=Number(g)}else if(/^(\d+h)?(\d+m)?(\d+s)?$/.test(g)){n.startTime=g}var y=u.adConfigId;var _=i.getAttribute("data-ad-config-id");if(A.isNonEmptyStr(y)){n.adConfigId=y}else if(A.isNonEmptyStr(_)){n.adConfigId=_}
1if(typeof n.adConfigId==="string"){n.adConfigId=n.adConfigId.trim()}if(!A.isNonEmptyStr(n.adConfigId)){n.adConfigId=null}if(n.usingAdFailover&&!F.mightBe){n.adConfigId=null}var b=u.deliveryConfigId;var T=i.getAttribute("data-delivery-config-id");if(A.isNonEmptyStr(b)){n.deliveryConfigId=b}else if(A.isNonEmptyStr(T)){n.deliveryConfigId=T}if(typeof n.deliveryConfigId==="string"){n.deliveryConfigId=n.deliveryConfigId.trim()}if(!A.isNonEmptyStr(n.deliveryConfigId)){n.deliveryConfigId=null}n.applicationId=u.applicationId||i.getAttribute("data-application-id")||n.applicationId;var S=A.qs();if(i.hasAttribute("autoplay")){r.autoplay=true}else if(S.hash.hasOwnProperty("autoplay")||S.search.hasOwnProperty("autoplay")){r.autoplay=S.hash.autoplay||S.search.autoplay||true;if(!l){e.log.warn("DEPRECATION: Using the `autoplay` query parameter or URL hash value to request autoplay for advanced, in-page embeds is deprecated and will be removed in Brightcove Player 7. Please use the player configuration or Video.js option instead!")}}else if(!r.hasOwnProperty("autoplay")){r.autoplay=n.autoplay||false}if(r.autoplay){e.dom.addClass(i,ce)}if(u.preload){r.preload=u.preload}else if(!r.hasOwnProperty("preload")&&n.preload){r.preload=n.preload}r.height=i.getAttribute("height")||undefined;r.width=i.getAttribute("width")||undefined;if(!l&&i&&(r.width||r.height)){de(n,r.width,r.height)}["loop","muted","playsinline"].forEach(function(e){if(u[e]!==undefined||n[e]||n.embedState[e]||r[e]){r[e]=true}else{r[e]=false}});if(r.playsinline){i.setAttribute("playsinline","playsinline")}if(r.muted){i.setAttribute("muted","muted");i.muted=true}if(u.language){r.language=u.language}else if(!r.hasOwnProperty("language")&&n.language){r.language=n.language}if(n.media&&n.media.poster&&n.media.poster.highres&&!i.poster){if(/(https?:)?\/\//.test(n.media.poster.highres)){r.poster=n.media.poster.highres}else{r.poster=t.environment.scriptBaseUrl+"/"+n.media.poster.highres}if(e.browser.IS_IPHONE){i.poster=r.poster}}if(n.media&&n.media.tracks){n.media.tracks.forEach(function(t){i.appendChild(e.dom.createEl("track",{},{default:t.default?t.default:"",label:t.label?t.label:"",kind:"captions",src:t.src,srclang:t.srclang}))})}r.runtime_=t;if(!(e.browser.IS_ANY_SAFARI||e.browser.IS_IOS)){r.html5=r.html5||{};r.html5.nativeCaptions=false}if(n.flash){r.flash=n.flash}if(n.hls!==false){if(!r.flash){r.flash={}}if(!r.flash.swf){r.flash.swf=n.playersCDN+"/videojs-flashls-source-handler/1.4.8/video-js.swf"}}if(n.hls){e.options.hls=n.hls}if(typeof e.options.hls!=="object"){e.options.hls={}}if(e.browser.IS_ANDROID&&e.options.hls.enableLowInitialPlaylist===undefined){e.options.hls.enableLowInitialPlaylist=true}if(e.options.hls.overrideNative===undefined&&!e.browser.IS_ANY_SAFARI){e.options.hls.overrideNative=true}return r}function he(e,t,r,n){var a=r.options_;var s=t.settings,o=t.environment;var l=s.accountId,u=s.applicationId,c=s.css,d=s.embedId,f=s.playerId;var h;r.mediainfo={accountId:l,account_id:l};r.bcinfo={accountId:l,applicationId:u,css:c,embedId:d,playerId:f,scriptUrl:o.scriptUrl,scriptBaseUrl:o.scriptBaseUrl};Object.defineProperty(r,"usingAdBlocker",{enumerable:true,value:F});Object.defineProperty(r,"getAutoplayConditions",{enumerable:true,value:function e(t){return n.getAutoplayConditions(t)}});F().then(function(e){if(e){r.trigger({type:"usage",name:"using-ad-blocker"})}});r.addClass(s.classNames.player);r.addClass(s.classNames.playerInstance);var p=e.bind(r,r.dimension);r.dimension=function(e,t){if(e==="width"){de(s,t,null)}else if(e==="height"){de(s,null,t)}return p(e,t)};r.ready(function(){if(!a.autoplay){return}function t(){r.removeClass(ce)}function i(){if(!r.autoplay()){r.removeClass(ce);return}var e=r.play();if(e===undefined){t()}else{e.then(t,t)}}var n=["canplay","error","durationchange"];function s(a){if(a.type==="error"){t();r.off(n,s);return}if(a.type==="durationchange"&&r.duration()===Infinity&&!e.browser.IS_ANY_SAFARI){i();r.off(n,s);return}if(a.type==="canplay"){i();r.off(n,s)}}if(!r.currentSrc()&&!h){t()}else if(r.readyState()===4){i()}else{r.one(n,s)}});if(s.fullscreenControl===false&&r.controls()){r.on("loadedmetadata",function(){if(!r.controlBar){return}var e=r.controlBar.children();if(!e||!e.length){return}for(var t=e.length-1;t>0;t--){if(e[t].hasClass("vjs-menu-button-popup")&&!e[t].hasClass("vjs-hidden")){e[t].addClass("vjs-menu-popup-last-visible");break}}})}if(e.browser.IS_IPHONE){r.on("fullscreenchange",function(){var e=r.$(".vjs-tech");if(e.hasAttribute("controls")){e.removeAttribute("controls")}});if(s.embedState.playsinline&&s.embedState.muted){r.addClass("vjs-iphone")}}if(e.browser.IS_IOS&&s.embedState.muted){r.addClass("vjs-ios")}if(r.controls()){r.one("play",function(){if(!r.controlBar||!r.controls()){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 v=r.controlBar.el();var m;var g=function e(){var t=i.activeElement;if(m!==t){m=t;r.controlBar.toggleClass("vjs-focus-within",v.contains(t))}};var y=function e(){v.removeEventListener("focus",g,true);v.removeEventListener("blur",g,true)};v.addEventListener("focus",g,true);v.addEventListener("blur",g,true);r.on("dispose",y);r.controlBar.on("dispose",y)}}var _=[{name:"proxyTracks",register:Q},{name:"seekEvents",register:ee},{name:"touchActive",register:re},{name:"urlparams",register:H,opts:{iframe:o.isInBcFrame,time:s.startTime}},{name:"playerInfo",register:oe},{name:"endscreen",register:le}];_.forEach(function(t){var i=t.name,n=t.opts,a=t.register;if(!r.hasPlugin(i)){a(e)}if(!r.usingPlugin(i)){r[i](n)}});ie(e,r,t);r.on("dispose",function(){a.runtime_=null})}function pe(e,t,i){var r=e.videojs;var n=-1;return function a(s){var o=r.getPlayer(s);if(o){o.trigger({type:"usage",name:"bc-used-as-getter"});return o}n++;var l=e.getRuntime({playerIndex:n});r.hookOnce("beforesetup",function(e,i){i=fe(r,l,e,i);if(A.isFn(t)){return t(r,l,e,i)}return i});r.hookOnce("setup",function(t){he(r,l,t,e);if(A.isFn(i)){i(r,l,t)}});return r.apply(void 0,arguments)}}var ve=["audioTracks","textTracks","videoTracks","remoteTextTracks","addTextTrack","addRemoteTextTrack","removeRemoteTextTrack","scrubbing","ended"];var me=["handleKeyDown"];var ge=function e(t,i){var r=function e(t){return function(e){if(e.isAdPlayerPatched_){return}var i=e.prototype;e.isAdPlayerPatched_=true;Object.defineProperty(i,"fsApi_",{get:function e(){return this.options_&&this.options_.contentPlayer&&this.options_.contentPlayer.fsApi_}});ve.forEach(function(e){if(!(e in i)){i[e]=function(){}}});me.forEach(function(e){if(!i.hasOwnProperty(e)){i[e]=function(){}}});Object.defineProperty(t,"AdPlayer",{configurable:true,enumerable:true,get:function t(){return e},set:function e(){}});return e}};var n=function e(i){if(!i){Object.defineProperty(t,"ima3",{configurable:true,enumerable:true,get:function e(){},set:function i(r){e(r);Object.defineProperty(t,"ima3",{value:r})}});return}var n=r(i);if(!i.AdPlayer){Object.defineProperty(i,"AdPlayer",{configurable:true,enumerable:true,get:function e(){},set:n});return}n(i.AdPlayer)};if(t.ima3){n(t.ima3)}else{i.one("beforepluginsetup:ima3",function(){n(t.ima3)})}};var ye={accountId:"",adConfigId:"",applicationId:"",playsinline:false,loop:false,muted:false,autoplay:false,crossorigin:false,css:{},plugins:[],debugger:{},deliveryConfigId:"",embedId:"default",misconfiguredWithMultipleAdPlugins:false,playerId:"default",skin:"luna",usingAdFailover:false,version:"0.0.0"};var _e=function(){function e(t,i){if(t===void 0){t={}}if(i===void 0){i={}}var r=e.shared.videojs;if(!r){throw new Error("missing videojs")}this.runtime={environment:r.mergeOptions(i),settings:r.mergeOptions(ye,t)};if(this.runtime.settings.misconfiguredWithMultipleAdPlugins){r.log.warn('Brightcove Player "'+this.runtime.settings.playerId+'" is mis-configured with multiple ad plugins.')}this.videojs=r;this.util=A;r.bc_=A;this.getAutoplayConditions();this.detectRuntimeEnvironment();this.setupGlobalEnv();A.perf.mark("bcAdBlockDetectStart");F().then(function(e){A.perf.mark("bcAdBlockDetectEnd");A.perf.measure("bcAdBlockDetect","bcAdBlockDetectStart","bcAdBlockDetectEnd")})}var t=e.prototype;t.getRuntime=function e(t){return this.videojs.mergeOptions(this.runtime,{settings:t})};t.getAutoplayConditions=function e(t){if(t===void 0){t="video"}var i=this.runtime.environment;if(!i.autoplay){i.autoplay={}}return R(t,this.videojs).then(function(e){i.autoplay[t]=e;return e})};t.detectRuntimeEnvironment=function e(){var t=this.videojs.dom;var n=this.runtime.environment;var a=t.hasClass(i.documentElement,"bc-iframe");var s=A.qs();n.usingRequireJs=A.isFn(r.define)&&r.define.amd&&A.isFn(r.require&&r.require.toUrl);n.isInAnyFrame=t.isInFrame();n.isInBcFrame=a;n.queryString=a?s.search:{};n.urlHash=a?s.hash:{};this.setScriptUrl();this.setScriptBaseUrl()};t.setScriptUrl=function e(){var t=this.runtime.environment;if(t.isInBcFrame){t.scriptUrl=""}else if(t.usingRequireJs){t.scriptUrl=r.require.toUrl("bc")}else if(i.currentScript){t.scriptUrl=i.currentScript.src}else{var n=i.getElementsByTagName("script");t.scriptUrl=n.length&&n[n.length-1].src||""}};t.setScriptBaseUrl=function e(){var t=this.runtime.environment;if(t.scriptUrl){t.scriptBaseUrl=t.scriptUrl.split("/").slice(0,-1).join("/")}else{t.scriptBaseUrl="."}};t.safeSetGlobal=function e(t,i){if(!A.isNil(r[t])){return this.videojs.log.warn("setting window."+t+" would overwrite an existing global, skipping")}r[t]=i};t.setupGlobalEnv=function e(){var t=this;var i=this.videojs;var r=this.runtime.environment;var n=r.queryStringToWindow;if(!n||!r.isInBcFrame){return}var a=i.mergeOptions(r.queryString);if(n.target){this.safeSetGlobal(n.target,a)}
1if(Array.isArray(n.globals)){n.globals.forEach(function(e){t.safeSetGlobal(e,a[e])})}};t.createInitializer=function e(t,i){var n=this;var a=this.videojs;var s=r.bc;var o=this.runtime.settings,l=o.embedId,u=o.playerId,c=o.skin,d=o.version;var f=pe(this,t,i);f.SKIN=c;f.VERSION=d;f.videojs=a;f[u+"_"+l]=f;if(s){Object.keys(s).forEach(function(e){var t=s[e];if(typeof t==="function"&&typeof t.videojs==="function"){f[e]=t;delete s[e]}})}Object.defineProperty(f,"usingAdBlocker",{enumerable:true,value:F});Object.defineProperty(f,"getAutoplayConditions",{enumerable:true,value:function e(t){return n.getAutoplayConditions(t)}});r.bc=f;return f};e.dedupeVideojs=function t(i,n){var a=i;e.shared.firstVideojs=n||i;if(n&&n.VERSION===i.VERSION){a=n}else if(r.bc){var s=Object.keys(r.bc);for(var o=0;o<s.length;o++){var l=s[o];var u=r.bc[l];if(typeof u==="function"&&typeof u.videojs==="function"){if(u.videojs.VERSION===i.VERSION){a=u.videojs;break}}}}r.videojs=a;e.shared.videojs=a;return a};e.restoreFirstVideojs=function t(){r.videojs=e.shared.firstVideojs};t.patchOldIma3=function e(t,i){ge(t,i)};return e}();_e.defaultSettings=ye;_e.shared={};_e.VERSION=n;return _e}(t,e);(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("global/window"),require("global/document")):typeof i==="function"&&i.amd?i(["global/window","global/document"],t):(e=e||self,e.videojs=t(e.window,e.document))})(this,function(t,i){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;var r="7.7.5";var n=[];var a=function e(i,r){return function(e,a,s){var o=r.levels[a];var l=new RegExp("^("+o+")$");if(e!=="log"){s.unshift(e.toUpperCase()+":")}s.unshift(i+":");if(n){n.push([].concat(s));var u=n.length-1e3;n.splice(0,u>0?u:0)}if(!t.console){return}var c=t.console[e];if(!c&&e==="debug"){c=t.console.info||t.console.log}if(!c||!o||!l.test(e)){return}c[Array.isArray(s)?"apply":"call"](t.console,s)}};function s(e){var t="info";var i;var r=function e(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++){n[a]=arguments[a]}i("log",t,n)};i=a(e,r);r.createLogger=function(t){return s(e+": "+t)};r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t};r.level=function(e){if(typeof e==="string"){if(!r.levels.hasOwnProperty(e)){throw new Error('"'+e+'" in not a valid log level')}t=e}return t};r.history=function(){return n?[].concat(n):[]};r.history.filter=function(e){return(n||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})};r.history.clear=function(){if(n){n.length=0}};r.history.disable=function(){if(n!==null){n.length=0;n=null}};r.history.enable=function(){if(n===null){n=[]}};r.error=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}return i("error",t,r)};r.warn=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}return i("warn",t,r)};r.debug=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}return i("debug",t,r)};return r}var o=s("VIDEOJS");var l=o.createLogger;function u(e,t){return t={exports:{}},e(t,t.exports),t.exports}var c=u(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i){if(Object.prototype.hasOwnProperty.call(i,r)){e[r]=i[r]}}}return e};return t.apply(this,arguments)}e.exports=t});var d=Object.prototype.toString;var f=function e(t){return m(t)?Object.keys(t):[]};function h(e,t){f(e).forEach(function(i){return t(e[i],i)})}function p(e,t,i){if(i===void 0){i=0}return f(e).reduce(function(i,r){return t(i,e[r],r)},i)}function v(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++){i[r-1]=arguments[r]}if(Object.assign){return c.apply(void 0,[e].concat(i))}i.forEach(function(t){if(!t){return}h(t,function(t,i){e[i]=t})});return e}function m(e){return!!e&&typeof e==="object"}function g(e){return m(e)&&d.call(e)==="[object Object]"&&e.constructor===Object}function y(e,i){if(!e||!i){return""}if(typeof t.getComputedStyle==="function"){var r=t.getComputedStyle(e);return r?r.getPropertyValue(i)||r[i]:""}return""}function _(e){return typeof e==="string"&&Boolean(e.trim())}function b(e){if(e.indexOf(" ")>=0){throw new Error("class has illegal whitespace characters")}}function T(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function S(){return i===t.document}function j(e){return m(e)&&e.nodeType===1}function k(){try{return t.parent!==t.self}catch(e){return true}}function E(e){return function(t,r){if(!_(t)){return i[e](null)}if(_(r)){r=i.querySelector(r)}var n=j(r)?r:i;return n[e]&&n[e](t)}}function w(e,t,r,n){if(e===void 0){e="div"}if(t===void 0){t={}}if(r===void 0){r={}}var a=i.createElement(e);Object.getOwnPropertyNames(t).forEach(function(e){var i=t[e];if(e.indexOf("aria-")!==-1||e==="role"||e==="type"){o.warn("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 "+e+" to "+i+"."));a.setAttribute(e,i)}else if(e==="textContent"){C(a,i)}else if(a[e]!==i){a[e]=i}});Object.getOwnPropertyNames(r).forEach(function(e){a.setAttribute(e,r[e])});if(n){G(a,n)}return a}function C(e,t){if(typeof e.textContent==="undefined"){e.innerText=t}else{e.textContent=t}return e}function I(e,t){if(t.firstChild){t.insertBefore(e,t.firstChild)}else{t.appendChild(e)}}function A(e,t){b(t);if(e.classList){return e.classList.contains(t)}return T(t).test(e.className)}function x(e,t){if(e.classList){e.classList.add(t)}else if(!A(e,t)){e.className=(e.className+" "+t).trim()}return e}function O(e,t){if(e.classList){e.classList.remove(t)}else{b(t);e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")}return e}function P(e,t,i){var r=A(e,t);if(typeof i==="function"){i=i(e,t)}if(typeof i!=="boolean"){i=!r}if(i===r){return}if(i){x(e,t)}else{O(e,t)}return e}function D(e,t){Object.getOwnPropertyNames(t).forEach(function(i){var r=t[i];if(r===null||typeof r==="undefined"||r===false){e.removeAttribute(i)}else{e.setAttribute(i,r===true?"":r)}})}function R(e){var t={};var i=","+"autoplay,controls,playsinline,loop,muted,default,defaultMuted"+",";if(e&&e.attributes&&e.attributes.length>0){var r=e.attributes;for(var n=r.length-1;n>=0;n--){var a=r[n].name;var s=r[n].value;if(typeof e[a]==="boolean"||i.indexOf(","+a+",")!==-1){s=s!==null?true:false}t[a]=s}}return t}function L(e,t){return e.getAttribute(t)}function N(e,t,i){e.setAttribute(t,i)}function U(e,t){e.removeAttribute(t)}function M(){i.body.focus();i.onselectstart=function(){return false}}function B(){i.onselectstart=function(){return true}}function F(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect();var i={};["bottom","height","left","right","top","width"].forEach(function(e){if(t[e]!==undefined){i[e]=t[e]}});if(!i.height){i.height=parseFloat(y(e,"height"))}if(!i.width){i.width=parseFloat(y(e,"width"))}return i}}function H(e){var r;if(e.getBoundingClientRect&&e.parentNode){r=e.getBoundingClientRect()}if(!r){return{left:0,top:0}}var n=i.documentElement;var a=i.body;var s=n.clientLeft||a.clientLeft||0;var o=t.pageXOffset||a.scrollLeft;var l=r.left+o-s;var u=n.clientTop||a.clientTop||0;var c=t.pageYOffset||a.scrollTop;var d=r.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function V(e,t){var i={};var r=H(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=r.top;var o=r.left;var l=t.pageY;var u=t.pageX;if(t.changedTouches){u=t.changedTouches[0].pageX;l=t.changedTouches[0].pageY}i.y=Math.max(0,Math.min(1,(s-l+a)/a));i.x=Math.max(0,Math.min(1,(u-o)/n));return i}function q(e){return m(e)&&e.nodeType===3}function W(e){while(e.firstChild){e.removeChild(e.firstChild)}return e}function z(e){if(typeof e==="function"){e=e()}return(Array.isArray(e)?e:[e]).map(function(e){if(typeof e==="function"){e=e()}if(j(e)||q(e)){return e}if(typeof e==="string"&&/\S/.test(e)){return i.createTextNode(e)}}).filter(function(e){return e})}function G(e,t){z(t).forEach(function(t){return e.appendChild(t)});return e}function Y(e,t){return G(W(e),t)}function K(e){if(e.button===undefined&&e.buttons===undefined){return true}if(e.button===0&&e.buttons===undefined){return true}if(e.type==="mouseup"&&e.button===0&&e.buttons===0){return true}if(e.button!==0||e.buttons!==1){return false}return true}var X=E("querySelector");var J=E("querySelectorAll");var Q=Object.freeze({isReal:S,isEl:j,isInFrame:k,createEl:w,textContent:C,prependTo:I,hasClass:A,addClass:x,removeClass:O,toggleClass:P,setAttributes:D,getAttributes:R,getAttribute:L,setAttribute:N,removeAttribute:U,blockTextSelection:M,unblockTextSelection:B,getBoundingClientRect:F,findPosition:H,getPointerPosition:V,isTextNode:q,emptyEl:W,normalizeContent:z,appendContent:G,insertContent:Y,isSingleLeftClick:K,$:X,$$:J});var Z=false;var $;var ee=function e(){if(!S()||$.options.autoSetup===false){return}var t=Array.prototype.slice.call(i.getElementsByTagName("video"));var r=Array.prototype.slice.call(i.getElementsByTagName("audio"));var n=Array.prototype.slice.call(i.getElementsByTagName("video-js"));var a=t.concat(r,n);if(a&&a.length>0){for(var s=0,o=a.length;s<o;s++){var l=a[s];if(l&&l.getAttribute){if(l.player===undefined){var u=l.getAttribute("data-setup");if(u!==null){$(l)}}}else{te(1);break}}}else if(!Z){te(1)}};function te(e,i){if(i){$=i}t.setTimeout(ee,e)}function ie(){Z=true;t.removeEventListener("load",ie)}
1if(S()){if(i.readyState==="complete"){ie()}else{t.addEventListener("load",ie)}}var re=function e(t){var r=i.createElement("style");r.className=t;return r};var ne=function e(t,i){if(t.styleSheet){t.styleSheet.cssText=i}else{t.textContent=i}};var ae=3;var se=ae;function oe(){return se++}var le;if(!t.WeakMap){le=function(){function e(){this.vdata="vdata"+Math.floor(t.performance&&t.performance.now()||Date.now());this.data={}}var i=e.prototype;i.set=function e(t,i){var r=t[this.vdata]||oe();if(!t[this.vdata]){t[this.vdata]=r}this.data[r]=i;return this};i.get=function e(t){var i=t[this.vdata];if(i){return this.data[i]}o("We have no data for this element",t);return undefined};i.has=function e(t){var i=t[this.vdata];return i in this.data};i["delete"]=function e(t){var i=t[this.vdata];if(i){delete this.data[i];delete t[this.vdata]}};return e}()}var ue=t.WeakMap?new WeakMap:new le;function ce(e,t){if(!ue.has(e)){return}var i=ue.get(e);if(i.handlers[t].length===0){delete i.handlers[t];if(e.removeEventListener){e.removeEventListener(t,i.dispatcher,false)}else if(e.detachEvent){e.detachEvent("on"+t,i.dispatcher)}}if(Object.getOwnPropertyNames(i.handlers).length<=0){delete i.handlers;delete i.dispatcher;delete i.disabled}if(Object.getOwnPropertyNames(i).length===0){ue["delete"](e)}}function de(e,t,i,r){i.forEach(function(i){e(t,i,r)})}function fe(e){if(e.fixed_){return e}function r(){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||i}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=r};e.isPropagationStopped=n;e.stopImmediatePropagation=function(){if(a.stopImmediatePropagation){a.stopImmediatePropagation()}e.isImmediatePropagationStopped=r;e.stopPropagation()};e.isImmediatePropagationStopped=n;if(e.clientX!==null&&e.clientX!==undefined){var o=i.documentElement;var l=i.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0);e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.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}}e.fixed_=true;return e}var he;var pe=function e(){if(typeof he!=="boolean"){he=false;try{var i=Object.defineProperty({},"passive",{get:function e(){he=true}});t.addEventListener("test",null,i);t.removeEventListener("test",null,i)}catch(e){}}return he};var ve=["touchstart","touchmove"];function me(e,t,i){if(Array.isArray(t)){return de(me,e,t,i)}if(!ue.has(e)){ue.set(e,{})}var r=ue.get(e);if(!r.handlers){r.handlers={}}if(!r.handlers[t]){r.handlers[t]=[]}if(!i.guid){i.guid=oe()}r.handlers[t].push(i);if(!r.dispatcher){r.disabled=false;r.dispatcher=function(t,i){if(r.disabled){return}t=fe(t);var n=r.handlers[t.type];if(n){var a=n.slice(0);for(var s=0,l=a.length;s<l;s++){if(t.isImmediatePropagationStopped()){break}else{try{a[s].call(e,t,i)}catch(e){o.error(e)}}}}}}if(r.handlers[t].length===1){if(e.addEventListener){var n=false;if(pe()&&ve.indexOf(t)>-1){n={passive:true}}e.addEventListener(t,r.dispatcher,n)}else if(e.attachEvent){e.attachEvent("on"+t,r.dispatcher)}}}function ge(e,t,i){if(!ue.has(e)){return}var r=ue.get(e);if(!r.handlers){return}if(Array.isArray(t)){return de(ge,e,t,i)}var n=function e(t,i){r.handlers[i]=[];ce(t,i)};if(t===undefined){for(var a in r.handlers){if(Object.prototype.hasOwnProperty.call(r.handlers||{},a)){n(e,a)}}return}var s=r.handlers[t];if(!s){return}if(!i){n(e,t);return}if(i.guid){for(var o=0;o<s.length;o++){if(s[o].guid===i.guid){s.splice(o--,1)}}}ce(e,t)}function ye(e,t,i){var r=ue.has(e)?ue.get(e):{};var n=e.parentNode||e.ownerDocument;if(typeof t==="string"){t={type:t,target:e}}else if(!t.target){t.target=e}t=fe(t);if(r.dispatcher){r.dispatcher.call(e,t,i)}if(n&&!t.isPropagationStopped()&&t.bubbles===true){ye.call(null,n,t,i)}else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){if(!ue.has(t.target)){ue.set(t.target,{})}var a=ue.get(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 _e(e,t,i){if(Array.isArray(t)){return de(_e,e,t,i)}var r=function r(){ge(e,t,r);i.apply(this,arguments)};r.guid=i.guid=i.guid||oe();me(e,t,r)}function be(e,t,i){var r=function r(){ge(e,t,r);i.apply(this,arguments)};r.guid=i.guid=i.guid||oe();me(e,t,r)}var Te=Object.freeze({fixEvent:fe,on:me,off:ge,trigger:ye,one:_e,any:be});var Se=30;var je=function e(t,i,r){if(!i.guid){i.guid=oe()}var n=i.bind(t);n.guid=r?r+"_"+i.guid:i.guid;return n};var ke=function e(i,r){var n=t.performance.now();var a=function e(){var a=t.performance.now();if(a-n>=r){i.apply(void 0,arguments);n=a}};return a};var Ee=function e(i,r,n,a){if(a===void 0){a=t}var s;var o=function e(){a.clearTimeout(s);s=null};var l=function e(){var t=this;var o=arguments;var l=function e(){s=null;l=null;if(!n){i.apply(t,o)}};if(!s&&n){i.apply(t,o)}a.clearTimeout(s);s=a.setTimeout(l,r)};l.cancel=o;return l};var we=function e(){};we.prototype.allowedEvents_={};we.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){};me(this,e,t);this.addEventListener=i};we.prototype.addEventListener=we.prototype.on;we.prototype.off=function(e,t){ge(this,e,t)};we.prototype.removeEventListener=we.prototype.off;we.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){};_e(this,e,t);this.addEventListener=i};we.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){};be(this,e,t);this.addEventListener=i};we.prototype.trigger=function(e){var t=e.type||e;if(typeof e==="string"){e={type:t}}e=fe(e);if(this.allowedEvents_[t]&&this["on"+t]){this["on"+t](e)}ye(this,e)};we.prototype.dispatchEvent=we.prototype.trigger;var Ce;we.prototype.queueTrigger=function(e){var i=this;if(!Ce){Ce=new Map}
1var r=e.type||e;var n=Ce.get(this);if(!n){n=new Map;Ce.set(this,n)}var a=n.get(r);n["delete"](r);t.clearTimeout(a);var s=t.setTimeout(function(){if(n.size===0){n=null;Ce["delete"](i)}i.trigger(e)},0);n.set(r,s)};var Ie=function e(t){return t instanceof we||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return typeof t[e]==="function"})};var Ae=function e(t,i){if(Ie(t)){i()}else{if(!t.eventedCallbacks){t.eventedCallbacks=[]}t.eventedCallbacks.push(i)}};var xe=function e(t){return typeof t==="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length};var Oe=function e(t){if(!t.nodeName&&!Ie(t)){throw new Error("Invalid target; must be a DOM node or evented object.")}};var Pe=function e(t){if(!xe(t)){throw new Error("Invalid event type; must be a non-empty string or array.")}};var De=function e(t){if(typeof t!=="function"){throw new Error("Invalid listener; must be a function.")}};var Re=function e(t,i){var r=i.length<3||i[0]===t||i[0]===t.eventBusEl_;var n;var a;var s;if(r){n=t.eventBusEl_;if(i.length>=3){i.shift()}a=i[0];s=i[1]}else{n=i[0];a=i[1];s=i[2]}Oe(n);Pe(a);De(s);s=je(t,s);return{isTargetingSelf:r,target:n,type:a,listener:s}};var Le=function e(t,i,r,n){Oe(t);if(t.nodeName){Te[i](t,r,n)}else{t[i](r,n)}};var Ne={on:function e(){var t=this;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}var a=Re(this,r),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;Le(o,"on",l,u);if(!s){var c=function e(){return t.off(o,l,u)};c.guid=u.guid;var d=function e(){return t.off("dispose",c)};d.guid=u.guid;Le(this,"on","dispose",c);Le(o,"on","dispose",d)}},one:function e(){var t=this;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}var a=Re(this,r),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;if(s){Le(o,"one",l,u)}else{var c=function e(){t.off(o,l,e);for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}u.apply(null,r)};c.guid=u.guid;Le(o,"one",l,c)}},any:function e(){var t=this;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}var a=Re(this,r),s=a.isTargetingSelf,o=a.target,l=a.type,u=a.listener;if(s){Le(o,"any",l,u)}else{var c=function e(){t.off(o,l,e);for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n]}u.apply(null,r)};c.guid=u.guid;Le(o,"any",l,c)}},off:function e(t,i,r){if(!t||xe(t)){ge(this.eventBusEl_,t,i)}else{var n=t;var a=i;Oe(n);Pe(a);De(r);r=je(this,r);this.off("dispose",r);if(n.nodeName){ge(n,a,r);ge(n,"dispose",r)}else if(Ie(n)){n.off(a,r);n.off("dispose",r)}}},trigger:function e(t,i){return ye(this.eventBusEl_,t,i)}};function Ue(e,i){if(i===void 0){i={}}var r=i,n=r.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_=w("span",{className:"vjs-event-bus"})}v(e,Ne);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 Me={state:{},setState:function e(t){var i=this;if(typeof t==="function"){t=t()}var r;h(t,function(e,t){if(i.state[t]!==e){r=r||{};r[t]={from:i.state[t],to:e}}i.state[t]=e});if(r&&Ie(this)){this.trigger({changes:r,type:"statechanged"})}return r}};function Be(e,t){v(e,Me);e.state=v({},e.state,t);if(typeof e.handleStateChanged==="function"&&Ie(e)){e.on("statechanged",e.handleStateChanged)}return e}var Fe=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toLowerCase()})};var He=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toUpperCase()})};var Ve=function e(t,i){return He(t)===He(i)};function qe(){var e={};for(var t=arguments.length,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}i.forEach(function(t){if(!t){return}h(t,function(t,i){if(!g(t)){e[i]=t;return}if(!g(e[i])){e[i]={}}e[i]=qe(e[i],t)})});return e}var We=function(){function e(e,i,r){if(!e&&this.play){this.player_=e=this}else{this.player_=e}this.isDisposed_=false;this.parentComponent_=null;this.options_=qe({},this.options_);i=this.options_=qe(this.options_,i);this.id_=i.id||i.el&&i.el.id;if(!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+oe()}this.name_=i.name||null;if(i.el){this.el_=i.el}else if(i.createEl!==false){this.el_=this.createEl()}if(i.evented!==false){Ue(this,{eventBusKey:this.el_?"el_":null})}Be(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};var a;if(!t.Set){a=function(){function e(){this.set_={}}var t=e.prototype;t.has=function e(t){return t in this.set_};t["delete"]=function e(t){var i=this.has(t);delete this.set_[t];return i};t.add=function e(t){this.set_[t]=1;return this};t.forEach=function e(t,i){for(var r in this.set_){t.call(i,r,r,this)}};return e}()}this.setTimeoutIds_=t.Set?new Set:new a;this.setIntervalIds_=t.Set?new Set:new a;this.rafIds_=t.Set?new Set:new a;this.clearingTimersOnDispose_=false;if(i.initChildren!==false){this.initChildren()}this.ready(r);if(i.reportTouchActivity!==false){this.enableTouchActivity()}}var i=e.prototype;i.dispose=function e(){if(this.isDisposed_){return}this.trigger({type:"dispose",bubbles:false});this.isDisposed_=true;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_)}if(ue.has(this.el_)){ue["delete"](this.el_)}this.el_=null}this.player_=null};i.isDisposed=function e(){return Boolean(this.isDisposed_)};i.player=function e(){return this.player_};i.options=function e(t){if(!t){return this.options_}this.options_=qe(this.options_,t);return this.options_};i.el=function e(){return this.el_};i.createEl=function e(t,i,r){return w(t,i,r)};i.localize=function e(t,i,r){if(r===void 0){r=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 l=a&&a[o];var u=r;if(s&&s[t]){u=s[t]}else if(l&&l[t]){u=l[t]}if(i){u=u.replace(/\{(\d+)\}/g,function(e,t){var r=i[t-1];var n=r;if(typeof r==="undefined"){n=e}return n})}return u};i.contentEl=function e(){return this.contentEl_||this.el_};i.id=function e(){return this.id_};i.name=function e(){return this.name_};i.children=function e(){return this.children_};i.getChildById=function e(t){return this.childIndex_[t]};i.getChild=function e(t){if(!t){return}return this.childNameIndex_[t]};i.addChild=function t(i,r,n){if(r===void 0){r={}}if(n===void 0){n=this.children_.length}var a;var s;
1if(typeof i==="string"){s=He(i);var o=r.componentClass||s;r.name=s;var l=e.getComponent(o);if(!l){throw new Error("Component "+o+" does not exist")}if(typeof l!=="function"){return null}a=new l(this.player_||this,r)}else{a=i}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&&He(a.name());if(s){this.childNameIndex_[s]=a;this.childNameIndex_[Fe(s)]=a}if(typeof a.el==="function"&&a.el()){var u=null;if(this.children_[n+1]&&this.children_[n+1].el_){u=this.children_[n+1].el_}this.contentEl().insertBefore(a.el(),u)}return a};i.removeChild=function e(t){if(typeof t==="string"){t=this.getChild(t)}if(!t||!this.children_){return}var i=false;for(var r=this.children_.length-1;r>=0;r--){if(this.children_[r]===t){i=true;this.children_.splice(r,1);break}}if(!i){return}t.parentComponent_=null;this.childIndex_[t.id()]=null;this.childNameIndex_[He(t.name())]=null;this.childNameIndex_[Fe(t.name())]=null;var n=t.el();if(n&&n.parentNode===this.contentEl()){this.contentEl().removeChild(t.el())}};i.initChildren=function t(){var i=this;var r=this.options_.children;if(r){var n=this.options_;var a=function e(t){var r=t.name;var a=t.opts;if(n[r]!==undefined){a=n[r]}if(a===false){return}if(a===true){a={}}a.playerOptions=i.options_.playerOptions;var s=i.addChild(r,a);if(s){i[r]=s}};var s;var o=e.getComponent("Tech");if(Array.isArray(r)){s=r}else{s=Object.keys(r)}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=r[t]||i.options_[t]||{}}else{t=e.name;n=e}return{name:t,opts:n}}).filter(function(t){var i=e.getComponent(t.opts.componentClass||He(t.name));return i&&!o.isTech(i)}).forEach(a)}};i.buildCSSClass=function e(){return""};i.ready=function e(t,i){if(i===void 0){i=false}if(!t){return}if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(t);return}if(i){t.call(this)}else{this.setTimeout(t,1)}};i.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)};i.$=function e(t,i){return X(t,i||this.contentEl())};i.$$=function e(t,i){return J(t,i||this.contentEl())};i.hasClass=function e(t){return A(this.el_,t)};i.addClass=function e(t){x(this.el_,t)};i.removeClass=function e(t){O(this.el_,t)};i.toggleClass=function e(t,i){P(this.el_,t,i)};i.show=function e(){this.removeClass("vjs-hidden")};i.hide=function e(){this.addClass("vjs-hidden")};i.lockShowing=function e(){this.addClass("vjs-lock-showing")};i.unlockShowing=function e(){this.removeClass("vjs-lock-showing")};i.getAttribute=function e(t){return L(this.el_,t)};i.setAttribute=function e(t,i){N(this.el_,t,i)};i.removeAttribute=function e(t){U(this.el_,t)};i.width=function e(t,i){return this.dimension("width",t,i)};i.height=function e(t,i){return this.dimension("height",t,i)};i.dimensions=function e(t,i){this.width(t,true);this.height(i)};i.dimension=function e(t,i,r){if(i!==undefined){if(i===null||i!==i){i=0}if((""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1){this.el_.style[t]=i}else if(i==="auto"){this.el_.style[t]=""}else{this.el_.style[t]=i+"px"}if(!r){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"+He(t)],10)};i.currentDimension=function e(t){var i=0;if(t!=="width"&&t!=="height"){throw new Error("currentDimension only accepts width or height value")}i=y(this.el_,t);i=parseFloat(i);if(i===0||isNaN(i)){var r="offset"+He(t);i=this.el_[r]}return i};i.currentDimensions=function e(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};i.currentWidth=function e(){return this.currentDimension("width")};i.currentHeight=function e(){return this.currentDimension("height")};i.focus=function e(){this.el_.focus()};i.blur=function e(){this.el_.blur()};i.handleKeyDown=function e(t){if(this.player_){t.stopPropagation();this.player_.handleKeyDown(t)}};i.handleKeyPress=function e(t){this.handleKeyDown(t)};i.emitTapEvents=function e(){var i=0;var r=null;var n=10;var a=200;var s;this.on("touchstart",function(e){if(e.touches.length===1){r={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};i=t.performance.now();s=true}});this.on("touchmove",function(e){if(e.touches.length>1){s=false}else if(r){var t=e.touches[0].pageX-r.pageX;var i=e.touches[0].pageY-r.pageY;var a=Math.sqrt(t*t+i*i);if(a>n){s=false}}});var o=function e(){s=false};this.on("touchleave",o);this.on("touchcancel",o);this.on("touchend",function(e){r=null;if(s===true){var n=t.performance.now()-i;if(n<a){e.preventDefault();this.trigger("tap")}}})};i.enableTouchActivity=function e(){if(!this.player()||!this.player().reportUserActivity){return}var t=je(this.player(),this.player().reportUserActivity);var i;this.on("touchstart",function(){t();this.clearInterval(i);i=this.setInterval(t,250)});var r=function e(r){t();this.clearInterval(i)};this.on("touchmove",t);this.on("touchend",r);this.on("touchcancel",r)};i.setTimeout=function e(i,r){var n=this;var a;i=je(this,i);this.clearTimersOnDispose_();a=t.setTimeout(function(){if(n.setTimeoutIds_.has(a)){n.setTimeoutIds_["delete"](a)}i()},r);this.setTimeoutIds_.add(a);return a};i.clearTimeout=function e(i){if(this.setTimeoutIds_.has(i)){this.setTimeoutIds_["delete"](i);t.clearTimeout(i)}return i};i.setInterval=function e(i,r){i=je(this,i);this.clearTimersOnDispose_();var n=t.setInterval(i,r);this.setIntervalIds_.add(n);return n};i.clearInterval=function e(i){if(this.setIntervalIds_.has(i)){this.setIntervalIds_["delete"](i);t.clearInterval(i)}return i};i.requestAnimationFrame=function e(i){var r=this;if(!this.supportsRaf_){return this.setTimeout(i,1e3/60)}this.clearTimersOnDispose_();var n;i=je(this,i);n=t.requestAnimationFrame(function(){if(r.rafIds_.has(n)){r.rafIds_["delete"](n)}i()});this.rafIds_.add(n);return n};i.cancelAnimationFrame=function e(i){if(!this.supportsRaf_){return this.clearTimeout(i)}if(this.rafIds_.has(i)){this.rafIds_["delete"](i);t.cancelAnimationFrame(i)}return i};i.clearTimersOnDispose_=function e(){var t=this;if(this.clearingTimersOnDispose_){return}this.clearingTimersOnDispose_=true;this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
1h(function(e){var i=e[0],r=e[1];t[i].forEach(t[r],t)});t.clearingTimersOnDispose_=false})};e.registerComponent=function t(i,r){if(typeof i!=="string"||!i){throw new Error('Illegal component name, "'+i+'"; must be a non-empty string.')}var n=e.getComponent("Tech");var a=n&&n.isTech(r);var s=e===r||e.prototype.isPrototypeOf(r.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, "'+i+'"; '+o+".")}i=He(i);if(!e.components_){e.components_={}}var l=e.getComponent("Player");if(i==="Player"&&l&&l.players){var u=l.players;var c=Object.keys(u);if(u&&c.length>0&&c.map(function(e){return u[e]}).every(Boolean)){throw new Error("Can not register Player component after player has been created.")}}e.components_[i]=r;e.components_[Fe(i)]=r;return r};e.getComponent=function t(i){if(!i||!e.components_){return}return e.components_[i]};return e}();We.prototype.supportsRaf_=typeof t.requestAnimationFrame==="function"&&typeof t.cancelAnimationFrame==="function";We.registerComponent("Component",We);function ze(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var Ge=ze;function Ye(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var Ke=Ye;var Xe=t.navigator&&t.navigator.userAgent||"";var Je=/AppleWebKit\/([\d.]+)/i.exec(Xe);var Qe=Je?parseFloat(Je.pop()):null;var Ze=/iPod/i.test(Xe);var $e=function(){var e=Xe.match(/OS (\d+)_/i);if(e&&e[1]){return e[1]}return null}();var et=/Android/i.test(Xe);var tt=function(){var e=Xe.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e){return null}var t=e[1]&&parseFloat(e[1]);var i=e[2]&&parseFloat(e[2]);if(t&&i){return parseFloat(e[1]+"."+e[2])}else if(t){return t}return null}();var it=et&&tt<5&&Qe<537;var rt=/Firefox/i.test(Xe);var nt=/Edge/i.test(Xe);var at=!nt&&(/Chrome/i.test(Xe)||/CriOS/i.test(Xe));var st=function(){var e=Xe.match(/(Chrome|CriOS)\/(\d+)/);if(e&&e[2]){return parseFloat(e[2])}return null}();var ot=function(){var e=/MSIE\s(\d+)\.\d/.exec(Xe);var t=e&&parseFloat(e[1]);if(!t&&/Trident\/7.0/i.test(Xe)&&/rv:11.0/.test(Xe)){t=11}return t}();var lt=/Safari/i.test(Xe)&&!at&&!et&&!nt;var ut=/Windows/i.test(Xe);var ct=S()&&("ontouchstart"in t||t.navigator.maxTouchPoints||t.DocumentTouch&&t.document instanceof t.DocumentTouch);var dt=/iPad/i.test(Xe)||lt&&ct&&!/iPhone/i.test(Xe);var ft=/iPhone/i.test(Xe)&&!dt;var ht=ft||dt||Ze;var pt=(lt||ht)&&!at;var vt=Object.freeze({IS_IPOD:Ze,IOS_VERSION:$e,IS_ANDROID:et,ANDROID_VERSION:tt,IS_NATIVE_ANDROID:it,IS_FIREFOX:rt,IS_EDGE:nt,IS_CHROME:at,CHROME_VERSION:st,IE_VERSION:ot,IS_SAFARI:lt,IS_WINDOWS:ut,TOUCH_ENABLED:ct,IS_IPAD:dt,IS_IPHONE:ft,IS_IOS:ht,IS_ANY_SAFARI:pt});function mt(e,t,i){if(typeof t!=="number"||t<0||t>i){throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}}function gt(e,t,i,r){mt(e,r,i.length-1);return i[r][t]}function yt(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:gt.bind(null,"start",0,e),end:gt.bind(null,"end",1,e)}}function _t(e,t){if(Array.isArray(e)){return yt(e)}else if(e===undefined||t===undefined){return yt()}return yt([[e,t]])}function bt(e,t){var i=0;var r;var n;if(!t){return 0}if(!e||!e.length){e=_t(0,0)}for(var a=0;a<e.length;a++){r=e.start(a);n=e.end(a);if(n>t){n=t}i+=n-r}return i/t}var Tt={prefixed:true};var St=[["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 jt=St[0];var kt;for(var Et=0;Et<St.length;Et++){if(St[Et][1]in i){kt=St[Et];break}}if(kt){for(var wt=0;wt<kt.length;wt++){Tt[jt[wt]]=kt[wt]}Tt.prefixed=kt[0]!==jt[0]}function Ct(e){if(e instanceof Ct){return e}
1if(typeof e==="number"){this.code=e}else if(typeof e==="string"){this.message=e}else if(m(e)){if(typeof e.code==="number"){this.code=e.code}v(this,e)}if(!this.message){this.message=Ct.defaultMessages[this.code]||""}}Ct.prototype.code=0;Ct.prototype.message="";Ct.prototype.status=null;Ct.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Ct.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 It=0;It<Ct.errorTypes.length;It++){Ct[Ct.errorTypes[It]]=It;Ct.prototype[Ct.errorTypes[It]]=It}var At=xt;function xt(e,t){var i;var r=null;try{i=JSON.parse(e,t)}catch(e){r=e}return[r,i]}function Ot(e){return e!==undefined&&e!==null&&typeof e.then==="function"}function Pt(e){if(Ot(e)){e.then(null,function(e){})}}var Dt=function e(t){var i=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,i,r){if(t[i]){e[i]=t[i]}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 i};var Rt=function e(t){var i=t.$$("track");var r=Array.prototype.map.call(i,function(e){return e.track});var n=Array.prototype.map.call(i,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 r.indexOf(e)===-1}).map(Dt))};var Lt=function e(t,i){t.forEach(function(e){var t=i.addRemoteTextTrack(e).track;if(!e.src&&e.cues){e.cues.forEach(function(e){return t.addCue(e)})}});return i.textTracks()};var Nt={textTracksToJson:Rt,jsonToTextTracks:Lt,trackToJson_:Dt};var Ut=u(function(e,t){function i(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 i=String(e);var a=r[i.toLowerCase()];if(a)return a;var a=n[i.toLowerCase()];if(a)return a;if(i.length===1)return i.charCodeAt(0);return undefined}i.isEventKey=function e(t,i){if(t&&"object"===typeof t){var a=t.which||t.keyCode||t.charCode;if(a===null||a===undefined){return false}if(typeof i==="string"){var s=r[i.toLowerCase()];if(s){return s===a}var s=n[i.toLowerCase()];if(s){return s===a}}else if(typeof i==="number"){return i===a}return false}};t=e.exports=i;var r=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++){r[String.fromCharCode(a)]=a-32}for(var a=48;a<58;a++){r[a-48]=a}for(a=1;a<13;a++){r["f"+a]=a+111}for(a=0;a<10;a++){r["numpad "+a]=a+96}var s=t.names=t.title={};for(a in r){s[r[a]]=a}for(var o in n){r[o]=n[o]}});var Mt=Ut.code;var Bt=Ut.codes;var Ft=Ut.aliases;var Ht=Ut.names;var Vt=Ut.title;var qt="vjs-modal-dialog";var Wt=function(e){Ke(r,e);function r(t,i){var r;r=e.call(this,t,i)||this;r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=false;r.closeable(!r.options_.uncloseable);r.content(r.options_.content);r.contentEl_=w("div",{className:qt+"-content"},{role:"document"});r.descEl_=w("p",{className:qt+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")});C(r.descEl_,r.description());r.el_.appendChild(r.descEl_);r.el_.appendChild(r.contentEl_);return r}var n=r.prototype;n.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"})};n.dispose=function t(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;e.prototype.dispose.call(this)};n.buildCSSClass=function t(){return qt+" vjs-hidden "+e.prototype.buildCSSClass.call(this)};n.label=function e(){return this.localize(this.options_.label||"Modal Window")};n.description=function e(){var t=this.options_.description||this.localize("This is a modal window.");
1if(this.closeable()){t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")}return t};n.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}};n.opened=function e(t){if(typeof t==="boolean"){this[t?"open":"close"]()}return this.opened_};n.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()}};n.closeable=function e(t){if(typeof t==="boolean"){var e=this.closeable_=!!t;var i=this.getChild("closeButton");if(e&&!i){var r=this.contentEl_;this.contentEl_=this.el_;i=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=r;this.on(i,"close",this.close)}if(!e&&i){this.off(i,"close",this.close);this.removeChild(i);i.dispose()}}return this.closeable_};n.fill=function e(){this.fillWith(this.content())};n.fillWith=function e(t){var i=this.contentEl();var r=i.parentNode;var n=i.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=true;r.removeChild(i);this.empty();Y(i,t);this.trigger("modalfill");if(n){r.insertBefore(i,n)}else{r.appendChild(i)}var a=this.getChild("closeButton");if(a){r.appendChild(a.el_)}};n.empty=function e(){this.trigger("beforemodalempty");W(this.contentEl());this.trigger("modalempty")};n.content=function e(t){if(typeof t!=="undefined"){this.content_=t}return this.content_};n.conditionalFocus_=function e(){var t=i.activeElement;var r=this.player_.el_;this.previouslyActiveEl_=null;if(r.contains(t)||r===t){this.previouslyActiveEl_=t;this.focus()}};n.conditionalBlur_=function e(){if(this.previouslyActiveEl_){this.previouslyActiveEl_.focus();this.previouslyActiveEl_=null}};n.handleKeyDown=function e(t){t.stopPropagation();if(Ut.isEventKey(t,"Escape")&&this.closeable()){t.preventDefault();this.close();return}if(!Ut.isEventKey(t,"Tab")){return}var r=this.focusableEls_();var n=this.el_.querySelector(":focus");var a;for(var s=0;s<r.length;s++){if(n===r[s]){a=s;break}}if(i.activeElement===this.el_){a=0}if(t.shiftKey&&a===0){r[r.length-1].focus();t.preventDefault()}else if(!t.shiftKey&&a===r.length-1){r[0].focus();t.preventDefault()}};n.focusableEls_=function e(){var i=this.el_.querySelectorAll("*");return Array.prototype.filter.call(i,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 r}(We);Wt.prototype.options_={pauseOnOpen:true,temporary:true};We.registerComponent("ModalDialog",Wt);var zt=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t=[]}i=e.call(this)||this;i.tracks_=[];Object.defineProperty(Ge(i),"length",{get:function e(){return this.tracks_.length}});for(var r=0;r<t.length;r++){i.addTrack(t[r])}return i}var i=t.prototype;i.addTrack=function e(t){var i=this.tracks_.length;if(!(""+i in this)){Object.defineProperty(this,i,{get:function e(){return this.tracks_[i]}})}if(this.tracks_.indexOf(t)===-1){this.tracks_.push(t);this.trigger({track:t,type:"addtrack",target:this})}};i.removeTrack=function e(t){var i;for(var r=0,n=this.length;r<n;r++){if(this[r]===t){i=this[r];if(i.off){i.off()}this.tracks_.splice(r,1);break}}if(!i){return}this.trigger({track:i,type:"removetrack",target:this})};i.getTrackById=function e(t){var i=null;for(var r=0,n=this.length;r<n;r++){var a=this[r];if(a.id===t){i=a;break}}return i};return t}(we);zt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Gt in zt.prototype.allowedEvents_){zt.prototype["on"+Gt]=null}var Yt=function e(t,i){for(var r=0;r<t.length;r++){if(!Object.keys(t[r]).length||i.id===t[r].id){continue}t[r].enabled=false}};var Kt=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t=[]}for(var r=t.length-1;r>=0;r--){if(t[r].enabled){Yt(t,t[r]);break}}i=e.call(this,t)||this;i.changing_=false;return i}var i=t.prototype;i.addTrack=function t(i){var r=this;if(i.enabled){Yt(this,i)}e.prototype.addTrack.call(this,i);if(!i.addEventListener){return}i.enabledChange_=function(){if(r.changing_){return}r.changing_=true;Yt(r,i);r.changing_=false;r.trigger("change")};i.addEventListener("enabledchange",i.enabledChange_)};i.removeTrack=function t(i){e.prototype.removeTrack.call(this,i);if(i.removeEventListener&&i.enabledChange_){i.removeEventListener("enabledchange",i.enabledChange_);i.enabledChange_=null}};return t}(zt);var Xt=function e(t,i){for(var r=0;r<t.length;r++){if(!Object.keys(t[r]).length||i.id===t[r].id){continue}t[r].selected=false}};var Jt=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t=[]}for(var r=t.length-1;r>=0;
1r--){if(t[r].selected){Xt(t,t[r]);break}}i=e.call(this,t)||this;i.changing_=false;Object.defineProperty(Ge(i),"selectedIndex",{get:function e(){for(var t=0;t<this.length;t++){if(this[t].selected){return t}}return-1},set:function e(){}});return i}var i=t.prototype;i.addTrack=function t(i){var r=this;if(i.selected){Xt(this,i)}e.prototype.addTrack.call(this,i);if(!i.addEventListener){return}i.selectedChange_=function(){if(r.changing_){return}r.changing_=true;Xt(r,i);r.changing_=false;r.trigger("change")};i.addEventListener("selectedchange",i.selectedChange_)};i.removeTrack=function t(i){e.prototype.removeTrack.call(this,i);if(i.removeEventListener&&i.selectedChange_){i.removeEventListener("selectedchange",i.selectedChange_);i.selectedChange_=null}};return t}(zt);var Qt=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.addTrack=function t(i){var r=this;e.prototype.addTrack.call(this,i);if(!this.queueChange_){this.queueChange_=function(){return r.queueTrigger("change")}}if(!this.triggerSelectedlanguagechange){this.triggerSelectedlanguagechange_=function(){return r.trigger("selectedlanguagechange")}}i.addEventListener("modechange",this.queueChange_);var n=["metadata","chapters"];if(n.indexOf(i.kind)===-1){i.addEventListener("modechange",this.triggerSelectedlanguagechange_)}};i.removeTrack=function t(i){e.prototype.removeTrack.call(this,i);if(i.removeEventListener){if(this.queueChange_){i.removeEventListener("modechange",this.queueChange_)}if(this.selectedlanguagechange_){i.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}};return t}(zt);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,i=e.length;t<i;t++){this.addTrackElement_(e[t])}}var t=e.prototype;t.addTrackElement_=function e(t){var i=this.trackElements_.length;if(!(""+i in this)){Object.defineProperty(this,i,{get:function e(){return this.trackElements_[i]}})}if(this.trackElements_.indexOf(t)===-1){this.trackElements_.push(t)}};t.getTrackElementByTrack_=function e(t){var i;for(var r=0,n=this.trackElements_.length;r<n;r++){if(t===this.trackElements_[r].track){i=this.trackElements_[r];break}}return i};t.removeTrackElement_=function e(t){for(var i=0,r=this.trackElements_.length;i<r;
1i++){if(t===this.trackElements_[i]){if(this.trackElements_[i].track&&typeof this.trackElements_[i].track.off==="function"){this.trackElements_[i].track.off()}if(typeof this.trackElements_[i].off==="function"){this.trackElements_[i].off()}this.trackElements_.splice(i,1);break}}};return e}();var $t=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 i=this.length||0;var r=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(i<n){r=i;for(;r<n;r++){a.call(this,r)}}};t.getCueById=function e(t){var i=null;for(var r=0,n=this.length;r<n;r++){var a=this[r];if(a.id===t){i=a;break}}return i};return e}();var ei={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"};var ti={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"};var ii={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};var ri={disabled:"disabled",hidden:"hidden",showing:"showing"};var ni=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t={}}i=e.call(this)||this;var r={id:t.id||"vjs_track_"+oe(),kind:t.kind||"",label:t.label||"",language:t.language||""};var n=function e(t){Object.defineProperty(Ge(i),t,{get:function e(){return r[t]},set:function e(){}})};for(var a in r){n(a)}return i}return t}(we);var ai=function e(r){var n=["protocol","hostname","port","pathname","search","hash","host"];var a=i.createElement("a");a.href=r;var s=a.host===""&&a.protocol!=="file:";var o;if(s){o=i.createElement("div");o.innerHTML='<a href="'+r+'"></a>';a=o.firstChild;o.setAttribute("style","display:none; position:absolute;");i.body.appendChild(o)}var l={};for(var u=0;u<n.length;u++){l[n[u]]=a[n[u]]}if(l.protocol==="http:"){l.host=l.host.replace(/:80$/,"")}if(l.protocol==="https:"){l.host=l.host.replace(/:443$/,"")}if(!l.protocol){l.protocol=t.location.protocol}if(s){i.body.removeChild(o)}return l};var si=function e(t){if(!t.match(/^https?:\/\//)){var r=i.createElement("div");r.innerHTML='<a href="'+t+'">x</a>';t=r.firstChild.href}return t};var oi=function e(t){if(typeof t==="string"){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/;var r=i.exec(t);if(r){return r.pop().toLowerCase()}}return""};var li=function e(i,r){if(r===void 0){r=t.location}var n=ai(i);var a=n.protocol===":"?r.protocol:n.protocol;var s=a+n.host!==r.protocol+r.host;return s};var ui=Object.freeze({parseUrl:ai,getAbsoluteURL:si,getFileExtension:oi,isCrossOrigin:li});var ci=fi;var di=Object.prototype.toString;function fi(t){var i=di.call(t);return i==="[object Function]"||typeof t==="function"&&i!=="[object RegExp]"||typeof e!=="undefined"&&(t===e.setTimeout||t===e.alert||t===e.confirm||t===e.prompt)}var hi=function e(t){var i={};if(!t){return i}t.trim().split("\n").forEach(function(e){var t=e.indexOf(":");var r=e.slice(0,t).trim().toLowerCase();var n=e.slice(t+1).trim();if(typeof i[r]==="undefined"){i[r]=n}else if(Array.isArray(i[r])){i[r].push(n)}else{i[r]=[i[r],n]}});return i};var pi=_i;var vi=_i;
1_i.XMLHttpRequest=t.XMLHttpRequest||Si;_i.XDomainRequest="withCredentials"in new _i.XMLHttpRequest?_i.XMLHttpRequest:t.XDomainRequest;mi(["get","put","post","patch","head","delete"],function(e){_i[e==="delete"?"del":e]=function(t,i,r){i=yi(t,i,r);i.method=e.toUpperCase();return bi(i)}});function mi(e,t){for(var i=0;i<e.length;i++){t(e[i])}}function gi(e){for(var t in e){if(e.hasOwnProperty(t))return false}return true}function yi(e,t,i){var r=e;if(ci(t)){i=t;if(typeof e==="string"){r={uri:e}}}else{r=c({},t,{uri:e})}r.callback=i;return r}function _i(e,t,i){t=yi(e,t,i);return bi(t)}function bi(e){if(typeof e.callback==="undefined"){throw new Error("callback argument missing")}var t=false;var i=function i(r,n,a){if(!t){t=true;e.callback(r,n,a)}};function r(){if(o.readyState===4){setTimeout(s,0)}}function n(){var e=undefined;if(o.response){e=o.response}else{e=o.responseText||Ti(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 i(e,g)}function s(){if(u)return;var t;clearTimeout(m);if(e.useXDR&&o.status===undefined){t=200}else{t=o.status===1223?204:o.status}var r=g;var a=null;if(t!==0){r={body:n(),statusCode:t,method:d,headers:{},url:c,rawRequest:o};if(o.getAllResponseHeaders){r.headers=hi(o.getAllResponseHeaders())}}else{a=new Error("Internal XMLHttpRequest Error")}return i(a,r,r.body)}var o=e.xhr||null;if(!o){if(e.cors||e.useXDR){o=new _i.XDomainRequest}else{o=new _i.XMLHttpRequest}}var l;var u;var c=o.url=e.uri||e.url;var d=o.method=e.method||"GET";var f=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:d,url:c,rawRequest:o};if("json"in e&&e.json!==false){v=true;h["accept"]||h["Accept"]||(h["Accept"]="application/json");if(d!=="GET"&&d!=="HEAD"){h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json");f=JSON.stringify(e.json===true?f:e.json)}}o.onreadystatechange=r;o.onload=s;o.onerror=a;o.onprogress=function(){};o.onabort=function(){u=true};o.ontimeout=a;o.open(d,c,!p,e.username,e.password);if(!p){o.withCredentials=!!e.withCredentials}if(!p&&e.timeout>0){m=setTimeout(function(){if(u)return;u=true;o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";a(e)},e.timeout)}if(o.setRequestHeader){for(l in h){if(h.hasOwnProperty(l)){o.setRequestHeader(l,h[l])}}}else if(e.headers&&!gi(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(f||null);return o}function Ti(e){try{if(e.responseType==="document"){return e.responseXML}var t=e.responseXML&&e.responseXML.documentElement.nodeName==="parsererror";if(e.responseType===""&&!t){return e.responseXML}}catch(e){}return null}function Si(){}pi["default"]=vi;var ji=function e(i,r){var n=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder());var a=[];n.oncue=function(e){r.addCue(e)};n.onparsingerror=function(e){a.push(e)};n.onflush=function(){r.trigger({type:"loadeddata",target:r})};n.parse(i);if(a.length>0){if(t.console&&t.console.groupCollapsed){t.console.groupCollapsed("Text Track parsing errors for "+r.src)}a.forEach(function(e){return o.error(e)});if(t.console&&t.console.groupEnd){t.console.groupEnd()}}n.flush()};var ki=function e(i,r){var n={uri:i};var a=li(i);if(a){n.cors=a}pi(n,je(this,function(e,i,n){if(e){return o.error(e,i)}r.loaded_=true;if(typeof t.WebVTT!=="function"){if(r.tech_){r.tech_.any(["vttjsloaded","vttjserror"],function(e){if(e.type==="vttjserror"){o.error("vttjs failed to load, stopping trying to process "+r.src);return}return ji(n,r)})}}else{ji(n,r)}}))};var Ei=function(e){Ke(i,e);function i(t){var i;if(t===void 0){t={}}if(!t.tech){throw new Error("A tech was not provided.")}var r=qe(t,{kind:ii[t.kind]||"subtitles",language:t.language||t.srclang||""});var n=ri[r.mode]||"disabled";var a=r["default"];if(r.kind==="metadata"||r.kind==="chapters"){n="hidden"}i=e.call(this,r)||this;i.tech_=r.tech;i.cues_=[];i.activeCues_=[];i.preload_=i.tech_.preloadTextTracks!==false;var s=new $t(i.cues_);var o=new $t(i.activeCues_);var l=false;var u=je(Ge(i),function(){this.activeCues=this.activeCues;if(l){this.trigger("cuechange");l=false}});if(n!=="disabled"){i.tech_.ready(function(){i.tech_.on("timeupdate",u)},true)}Object.defineProperties(Ge(i),{default:{get:function e(){return a}
1,set:function e(){}},mode:{get:function e(){return n},set:function e(t){var i=this;if(!ri[t]){return}n=t;if(!this.preload_&&n!=="disabled"&&this.cues.length===0){ki(this.src,this)}if(n!=="disabled"){this.tech_.ready(function(){i.tech_.on("timeupdate",u)},true)}else{this.tech_.off("timeupdate",u)}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 i=[];for(var r=0,n=this.cues.length;r<n;r++){var a=this.cues[r];if(a.startTime<=t&&a.endTime>=t){i.push(a)}else if(a.startTime===a.endTime&&a.startTime<=t&&a.startTime+.5>=t){i.push(a)}}l=false;if(i.length!==this.activeCues_.length){l=true}else{for(var s=0;s<i.length;s++){if(this.activeCues_.indexOf(i[s])===-1){l=true}}}this.activeCues_=i;o.setCues_(this.activeCues_);return o},set:function e(){}}});if(r.src){i.src=r.src;if(!i.preload_){i.loaded_=true}if(i.preload_||a||r.kind!=="subtitles"&&r.kind!=="captions"){ki(i.src,Ge(i))}}else{i.loaded_=true}return i}var r=i.prototype;r.addCue=function e(i){var r=i;if(t.vttjs&&!(i instanceof t.vttjs.VTTCue)){r=new t.vttjs.VTTCue(i.startTime,i.endTime,i.text);for(var n in i){if(!(n in r)){r[n]=i[n]}}r.id=i.id;r.originalCue_=i}var a=this.tech_.textTracks();for(var s=0;s<a.length;s++){if(a[s]!==this){a[s].removeCue(r)}}this.cues_.push(r);this.cues.setCues_(this.cues_)};r.removeCue=function e(t){var i=this.cues_.length;while(i--){var r=this.cues_[i];if(r===t||r.originalCue_&&r.originalCue_===t){this.cues_.splice(i,1);this.cues.setCues_(this.cues_);break}}};return i}(ni);Ei.prototype.allowedEvents_={cuechange:"cuechange"};var wi=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t={}}var r=qe(t,{kind:ti[t.kind]||""});i=e.call(this,r)||this;var n=false;Object.defineProperty(Ge(i),"enabled",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("enabledchange")}});if(r.enabled){i.enabled=r.enabled}i.loaded_=true;return i}return t}(ni);var Ci=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t={}}var r=qe(t,{kind:ei[t.kind]||""});i=e.call(this,r)||this;var n=false;Object.defineProperty(Ge(i),"selected",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("selectedchange")}});if(r.selected){i.selected=r.selected}return i}return t}(ni);var Ii=0;var Ai=1;var xi=2;var Oi=3;var Pi=function(e){Ke(t,e);function t(t){var i;if(t===void 0){t={}}i=e.call(this)||this;var r;var n=new Ei(t);i.kind=n.kind;i.src=n.src;i.srclang=n.language;i.label=n.label;i["default"]=n["default"];Object.defineProperties(Ge(i),{readyState:{get:function e(){return r}},track:{get:function e(){return n}}});r=Ii;n.addEventListener("loadeddata",function(){r=xi;i.trigger({type:"load",target:Ge(i)})});return i}return t}(we);Pi.prototype.allowedEvents_={load:"load"};Pi.NONE=Ii;Pi.LOADING=Ai;Pi.LOADED=xi;Pi.ERROR=Oi;var Di={audio:{ListClass:Kt,TrackClass:wi,capitalName:"Audio"},video:{ListClass:Jt,TrackClass:Ci,capitalName:"Video"},text:{ListClass:Qt,TrackClass:Ei,capitalName:"Text"}};Object.keys(Di).forEach(function(e){Di[e].getterName=e+"Tracks";Di[e].privateName=e+"Tracks_"});var Ri={remoteText:{ListClass:Qt,TrackClass:Ei,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Zt,TrackClass:Pi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};var Li=c({},Di,Ri);Ri.names=Object.keys(Ri);Di.names=Object.keys(Di);Li.names=[].concat(Ri.names).concat(Di.names);var Ni={};function Ui(e,t,i,r,n){if(n===void 0){n={}}var a=e.textTracks();n.kind=t;if(i){n.label=i}if(r){n.language=r}n.tech=e;var s=new Li.text.TrackClass(n);a.addTrack(s);return s}var Mi=function(e){Ke(r,e);function r(t,i){var r;if(t===void 0){t={}}if(i===void 0){i=function e(){}}t.reportTouchActivity=false;r=e.call(this,null,t,i)||this;r.hasStarted_=false;r.on("playing",function(){this.hasStarted_=true});r.on("loadstart",function(){this.hasStarted_=false});
1Li.names.forEach(function(e){var i=Li[e];if(t&&t[i.getterName]){r[i.privateName]=t[i.getterName]}});if(!r.featuresProgressEvents){r.manualProgressOn()}if(!r.featuresTimeupdateEvents){r.manualTimeUpdatesOn()}["Text","Audio","Video"].forEach(function(e){if(t["native"+e+"Tracks"]===false){r["featuresNative"+e+"Tracks"]=false}});if(t.nativeCaptions===false||t.nativeTextTracks===false){r.featuresNativeTextTracks=false}else if(t.nativeCaptions===true||t.nativeTextTracks===true){r.featuresNativeTextTracks=true}if(!r.featuresNativeTextTracks){r.emulateTextTracks()}r.preloadTextTracks=t.preloadTextTracks!==false;r.autoRemoteTextTracks_=new Li.text.ListClass;r.initTrackListeners();if(!t.nativeControlsForTouch){r.emitTapEvents()}if(r.constructor){r.name_=r.constructor.name||"Unknown Tech"}return r}var n=r.prototype;n.triggerSourceset=function e(t){var i=this;if(!this.isReady_){this.one("ready",function(){return i.setTimeout(function(){return i.triggerSourceset(t)},1)})}this.trigger({src:t,type:"sourceset"})};n.manualProgressOn=function e(){this.on("durationchange",this.onDurationChange);this.manualProgress=true;this.one("ready",this.trackProgress)};n.manualProgressOff=function e(){this.manualProgress=false;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)};n.trackProgress=function e(t){this.stopTrackingProgress();this.progressInterval=this.setInterval(je(this,function(){var e=this.bufferedPercent();if(this.bufferedPercent_!==e){this.trigger("progress")}this.bufferedPercent_=e;if(e===1){this.stopTrackingProgress()}}),500)};n.onDurationChange=function e(t){this.duration_=this.duration()};n.buffered=function e(){return _t(0,0)};n.bufferedPercent=function e(){return bt(this.buffered(),this.duration_)};n.stopTrackingProgress=function e(){this.clearInterval(this.progressInterval)};n.manualTimeUpdatesOn=function e(){this.manualTimeUpdates=true;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)};n.manualTimeUpdatesOff=function e(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};n.trackCurrentTime=function e(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})},250)};n.stopTrackingCurrentTime=function e(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})};n.dispose=function t(){this.clearTracks(Di.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}e.prototype.dispose.call(this)};n.clearTracks=function e(t){var i=this;t=[].concat(t);t.forEach(function(e){var t=i[e+"Tracks"]()||[];var r=t.length;while(r--){var n=t[r];if(e==="text"){i.removeRemoteTextTrack(n)}t.removeTrack(n)}})};n.cleanupAutoTextTracks=function e(){var t=this.autoRemoteTextTracks_||[];var i=t.length;while(i--){var r=t[i];this.removeRemoteTextTrack(r)}};n.reset=function e(){};n.error=function e(t){if(t!==undefined){this.error_=new Ct(t);this.trigger("error")}return this.error_};n.played=function e(){if(this.hasStarted_){return _t(0,0)}return _t()};n.setCurrentTime=function e(){if(this.manualTimeUpdates){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})}};n.initTrackListeners=function e(){var t=this;Di.names.forEach(function(e){var i=Di[e];var r=function i(){t.trigger(e+"trackchange")};var n=t[i.getterName]();n.addEventListener("removetrack",r);n.addEventListener("addtrack",r);t.on("dispose",function(){n.removeEventListener("removetrack",r);n.removeEventListener("addtrack",r)})})};n.addWebVttScript_=function e(){var r=this;if(t.WebVTT){return}if(i.body.contains(this.el())){if(!this.options_["vtt.js"]&&g(Ni)&&Object.keys(Ni).length>0){this.trigger("vttjsloaded");return}var n=i.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";n.onload=function(){r.trigger("vttjsloaded")};n.onerror=function(){r.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_)}};n.emulateTextTracks=function e(){var t=this;var i=this.textTracks();var r=this.remoteTextTracks();var n=function e(t){return i.addTrack(t.track)};var a=function e(t){return i.removeTrack(t.track)};r.on("addtrack",n);r.on("removetrack",a);this.addWebVttScript_();var s=function e(){return t.trigger("texttrackchange")};var o=function e(){s();for(var t=0;t<i.length;t++){var r=i[t];r.removeEventListener("cuechange",s);if(r.mode==="showing"){r.addEventListener("cuechange",s)}}};o();i.addEventListener("change",o);i.addEventListener("addtrack",o);i.addEventListener("removetrack",o);this.on("dispose",function(){r.off("addtrack",n);r.off("removetrack",a);i.removeEventListener("change",o);i.removeEventListener("addtrack",o);i.removeEventListener("removetrack",o);for(var e=0;e<i.length;e++){var t=i[e];t.removeEventListener("cuechange",s)}})};n.addTextTrack=function e(t,i,r){if(!t){throw new Error("TextTrack kind is required but was not provided")}return Ui(this,t,i,r)};n.createRemoteTextTrack=function e(t){var i=qe(t,{tech:this});return new Ri.remoteTextEl.TrackClass(i)};n.addRemoteTextTrack=function e(t,i){var r=this;if(t===void 0){t={}}var n=this.createRemoteTextTrack(t);if(i!==true&&i!==false){o.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js');i=true}this.remoteTextTrackEls().addTrackElement_(n);this.remoteTextTracks().addTrack(n.track);if(i!==true){this.ready(function(){return r.autoRemoteTextTracks_.addTrack(n.track)})}return n};n.removeRemoteTextTrack=function e(t){var i=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(i);this.remoteTextTracks().removeTrack(t);this.autoRemoteTextTracks_.removeTrack(t)};n.getVideoPlaybackQuality=function e(){return{}};n.requestPictureInPicture=function e(){var i=this.options_.Promise||t.Promise;if(i){return i.reject()}};n.setPoster=function e(){};n.playsinline=function e(){};n.setPlaysinline=function e(){};n.overrideNativeAudioTracks=function e(){};n.overrideNativeVideoTracks=function e(){};n.canPlayType=function e(){return""};r.canPlayType=function e(){return""};r.canPlaySource=function e(t,i){return r.canPlayType(t.type)};r.isTech=function e(t){return t.prototype instanceof r||t instanceof r||t===r};r.registerTech=function e(t,i){if(!r.techs_){r.techs_={}}if(!r.isTech(i)){throw new Error("Tech "+t+" must be a Tech")}if(!r.canPlayType){throw new Error("Techs must have a static canPlayType method on them")}if(!r.canPlaySource){throw new Error("Techs must have a static canPlaySource method on them")}t=He(t);r.techs_[t]=i;r.techs_[Fe(t)]=i;
1if(t!=="Tech"){r.defaultTechOrder_.push(t)}return i};r.getTech=function e(i){if(!i){return}if(r.techs_&&r.techs_[i]){return r.techs_[i]}i=He(i);if(t&&t.videojs&&t.videojs[i]){o.warn("The "+i+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)");return t.videojs[i]}};return r}(We);Li.names.forEach(function(e){var t=Li[e];Mi.prototype[t.getterName]=function(){this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});Mi.prototype.featuresVolumeControl=true;Mi.prototype.featuresMuteControl=true;Mi.prototype.featuresFullscreenResize=false;Mi.prototype.featuresPlaybackRate=false;Mi.prototype.featuresProgressEvents=false;Mi.prototype.featuresSourceset=false;Mi.prototype.featuresTimeupdateEvents=false;Mi.prototype.featuresNativeTextTracks=false;Mi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var r=e.sourceHandlers;if(!r){r=e.sourceHandlers=[]}if(i===undefined){i=r.length}r.splice(i,0,t)};e.canPlayType=function(t){var i=e.sourceHandlers||[];var r;for(var n=0;n<i.length;n++){r=i[n].canPlayType(t);if(r){return r}}return""};e.selectSourceHandler=function(t,i){var r=e.sourceHandlers||[];var n;for(var a=0;a<r.length;a++){n=r[a].canHandleSource(t,i);if(n){return r[a]}}return null};e.canPlaySource=function(t,i){var r=e.selectSourceHandler(t,i);if(r){return r.canHandleSource(t,i)}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 i=e.selectSourceHandler(t,this.options_);if(!i){if(e.nativeSourceHandler){i=e.nativeSourceHandler}else{o.error("No source handler found for the current source.")}}this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);if(i!==e.nativeSourceHandler){this.currentSource_=t}this.sourceHandler_=i.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}}};We.registerComponent("Tech",Mi);Mi.registerTech("Tech",Mi);Mi.defaultTechOrder_=[];var Bi={};var Fi={};var Hi={};function Vi(e,t){Bi[e]=Bi[e]||[];Bi[e].push(t)}function qi(e,t,i){e.setTimeout(function(){return tr(t,Bi[t.type],i,e)},1)}function Wi(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function zi(e,t,i){return e.reduceRight(Qi(i),t[i]())}function Gi(e,t,i,r){return t[i](e.reduce(Qi(i),r))}function Yi(e,t,i,r){if(r===void 0){r=null}var n="call"+He(i);var a=e.reduce(Qi(n),r);var s=a===Hi;var o=s?null:t[i](a);Zi(e,i,o,s);return o}var Ki={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1};var Xi={setCurrentTime:1,setMuted:1,setVolume:1};var Ji={play:1,pause:1};function Qi(e){return function(t,i){if(t===Hi){return Hi}if(i[e]){return i[e](t)}return t}}function Zi(e,t,i,r){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a[t]){a[t](r,i)}}}function $i(e){Fi[e.id()]=null}function er(e,t){var i=Fi[e.id()];var r=null;if(i===undefined||i===null){r=t(e);Fi[e.id()]=[[t,r]];return r}for(var n=0;n<i.length;n++){var a=i[n],s=a[0],o=a[1];if(s!==t){continue}r=o}if(r===null){r=t(e);i.push([t,r])}return r}function tr(e,t,i,r,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],l=s.slice(1);if(typeof o==="string"){tr(e,Bi[o],i,r,n,a)}else if(o){var u=er(r,o);if(!u.setSource){n.push(u);return tr(e,l,i,r,n,a)}u.setSource(v({},e),function(t,s){if(t){return tr(e,l,i,r,n,a)}n.push(u);tr(s,e.type===s.type?l:Bi[s.type],i,r,n,a)})}else if(l.length){tr(e,l,i,r,n,a)}else if(a){i(e,n)}else{tr(e,Bi["*"],i,r,n,true)}}var ir={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",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 rr=function e(t){if(t===void 0){t=""}var i=oi(t);var r=ir[i.toLowerCase()];return r||""};var nr=function e(t,i){if(!i){return""}if(t.cache_.source.src===i&&t.cache_.source.type){return t.cache_.source.type}var r=t.cache_.sources.filter(function(e){return e.src===i});if(r.length){return r[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===i){return s.type}}return rr(i)};var ar=function e(t){if(Array.isArray(t)){var i=[];t.forEach(function(t){t=e(t);if(Array.isArray(t)){i=i.concat(t)}else if(m(t)){i.push(t)}});t=i}else if(typeof t==="string"&&t.trim()){t=[sr({src:t})]}
1else if(m(t)&&typeof t.src==="string"&&t.src&&t.src.trim()){t=[sr(t)]}else{t=[]}return t};function sr(e){if(!e.type){var t=rr(e.src);if(t){e.type=t}}return e}var or=function(e){Ke(t,e);function t(t,i,r){var n;var a=qe({createEl:false},i);n=e.call(this,t,a,r)||this;if(!i.playerOptions.sources||i.playerOptions.sources.length===0){for(var s=0,o=i.playerOptions.techOrder;s<o.length;s++){var l=He(o[s]);var u=Mi.getTech(l);if(!l){u=We.getComponent(l)}if(u&&u.isSupported()){t.loadTech_(l);break}}}else{t.src(i.playerOptions.sources)}return n}return t}(We);We.registerComponent("MediaLoader",or);var lr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.emitTapEvents();r.enable();return r}var i=t.prototype;i.createEl=function t(i,r,n){if(i===void 0){i="div"}if(r===void 0){r={}}if(n===void 0){n={}}r=v({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},r);if(i==="button"){o.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead.")}n=v({role:"button"},n);this.tabIndex_=r.tabIndex;var a=e.prototype.createEl.call(this,i,r,n);this.createControlTextEl(a);return a};i.dispose=function t(){this.controlTextEl_=null;e.prototype.dispose.call(this)};i.createControlTextEl=function e(t){this.controlTextEl_=w("span",{className:"vjs-control-text"},{"aria-live":"polite"});if(t){t.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,t);return this.controlTextEl_};i.controlText=function e(t,i){if(i===void 0){i=this.el()}if(t===undefined){return this.controlText_||"Need Text"}var r=this.localize(t);this.controlText_=t;C(this.controlTextEl_,r);if(!this.nonIconControl){i.setAttribute("title",r)}};i.buildCSSClass=function t(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)};i.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)}};i.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("mouseover",this.handleMouseOver);this.off("mouseout",this.handleMouseOut);this.off(["tap","click"],this.handleClick);this.off("keydown",this.handleKeyDown)};i.handleClick=function e(t){if(this.options_.clickHandler){this.options_.clickHandler.call(this,arguments)}};i.handleKeyDown=function t(i){if(Ut.isEventKey(i,"Space")||Ut.isEventKey(i,"Enter")){i.preventDefault();i.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,i)}};return t}(We);We.registerComponent("ClickableComponent",lr);var ur=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update();t.on("posterchange",je(Ge(r),r.update));return r}var i=t.prototype;i.dispose=function t(){this.player().off("posterchange",this.update);e.prototype.dispose.call(this)};i.createEl=function e(){var t=w("div",{className:"vjs-poster",tabIndex:-1});return t};i.update=function e(t){var i=this.player().poster();this.setSrc(i);if(i){this.show()}else{this.hide()}};i.setSrc=function e(t){var i="";if(t){i='url("'+t+'")'}this.el_.style.backgroundImage=i};i.handleClick=function e(t){if(!this.player_.controls()){return}if(this.player_.tech(true)){this.player_.tech(true).focus()}if(this.player_.paused()){Pt(this.player_.play())}else{this.player_.pause()}};return t}(lr);We.registerComponent("PosterImage",ur);var cr="#222";var dr="#ccc";var fr={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 hr(e,t){var i;if(e.length===4){i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}else if(e.length===7){i=e.slice(1)}else{throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.")}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function pr(e,t,i){try{e.style[t]=i}catch(e){return}}var vr=function(e){Ke(i,e);function i(i,r,n){var a;a=e.call(this,i,r,n)||this;var s=je(Ge(a),a.updateDisplay);i.on("loadstart",je(Ge(a),a.toggleDisplay));i.on("texttrackchange",s);i.on("loadedmetadata",je(Ge(a),a.preselectTrack));i.ready(je(Ge(a),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks){this.hide();return}i.on("fullscreenchange",s);i.on("playerresize",s);t.addEventListener("orientationchange",s);i.on("dispose",function(){return t.removeEventListener("orientationchange",s)});var e=this.options_.playerOptions.tracks||[];for(var r=0;r<e.length;r++){this.player_.addRemoteTextTrack(e[r],true)}this.preselectTrack()}));return a}var r=i.prototype;r.preselectTrack=function e(){var t={captions:1,subtitles:1};var i=this.player_.textTracks();var r=this.player_.cache_.selectedLanguage;var n;var a;var s;for(var o=0;o<i.length;o++){var l=i[o];if(r&&r.enabled&&r.language&&r.language===l.language&&l.kind in t){if(l.kind===r.kind){s=l}else if(!s){s=l}}else if(r&&!r.enabled){s=null;n=null;a=null}else if(l["default"]){if(l.kind==="descriptions"&&!n){n=l}else if(l.kind in t&&!a){a=l}}}if(s){s.mode="showing"}else if(a){a.mode="showing"}else if(n){n.mode="showing"}};r.toggleDisplay=function e(){if(this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks){this.hide()}else{this.show()}};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})};r.clearDisplay=function e(){if(typeof t.WebVTT==="function"){t.WebVTT.processCues(t,[],this.el_)}};r.updateDisplay=function e(){var t=this.player_.textTracks();var i=this.options_.allowMultipleShowingTracks;this.clearDisplay();if(i){var r=[];for(var n=0;n<t.length;++n){var a=t[n];if(a.mode!=="showing"){continue}r.push(a)}this.updateForTrack(r);return}var s=null;var o=null;var l=t.length;while(l--){var u=t[l];if(u.mode==="showing"){if(u.kind==="descriptions"){s=u}else{o=u}}}if(o){if(this.getAttribute("aria-live")!=="off"){this.setAttribute("aria-live","off")}this.updateForTrack(o)}else if(s){if(this.getAttribute("aria-live")!=="assertive"){this.setAttribute("aria-live","assertive")}this.updateForTrack(s)}};r.updateDisplayState=function e(i){var r=this.player_.textTrackSettings.getValues();var n=i.activeCues;var a=n.length;while(a--){var s=n[a];if(!s){continue}var o=s.displayState;if(r.color){o.firstChild.style.color=r.color}if(r.textOpacity){pr(o.firstChild,"color",hr(r.color||"#fff",r.textOpacity))}if(r.backgroundColor){o.firstChild.style.backgroundColor=r.backgroundColor}if(r.backgroundOpacity){pr(o.firstChild,"backgroundColor",hr(r.backgroundColor||"#000",r.backgroundOpacity))}if(r.windowColor){if(r.windowOpacity){pr(o,"backgroundColor",hr(r.windowColor,r.windowOpacity))}
1else{o.style.backgroundColor=r.windowColor}}if(r.edgeStyle){if(r.edgeStyle==="dropshadow"){o.firstChild.style.textShadow="2px 2px 3px "+cr+", 2px 2px 4px "+cr+", 2px 2px 5px "+cr}else if(r.edgeStyle==="raised"){o.firstChild.style.textShadow="1px 1px "+cr+", 2px 2px "+cr+", 3px 3px "+cr}else if(r.edgeStyle==="depressed"){o.firstChild.style.textShadow="1px 1px "+dr+", 0 1px "+dr+", -1px -1px "+cr+", 0 -1px "+cr}else if(r.edgeStyle==="uniform"){o.firstChild.style.textShadow="0 0 4px "+cr+", 0 0 4px "+cr+", 0 0 4px "+cr+", 0 0 4px "+cr}}if(r.fontPercent&&r.fontPercent!==1){var l=t.parseFloat(o.style.fontSize);o.style.fontSize=l*r.fontPercent+"px";o.style.height="auto";o.style.top="auto";o.style.bottom="2px"}if(r.fontFamily&&r.fontFamily!=="default"){if(r.fontFamily==="small-caps"){o.firstChild.style.fontVariant="small-caps"}else{o.firstChild.style.fontFamily=fr[r.fontFamily]}}}};r.updateForTrack=function e(i){if(!Array.isArray(i)){i=[i]}if(typeof t.WebVTT!=="function"||i.every(function(e){return!e.activeCues})){return}var r=[];for(var n=0;n<i.length;++n){var a=i[n];for(var s=0;s<a.activeCues.length;++s){r.push(a.activeCues[s])}}t.WebVTT.processCues(t,r,this.el_);for(var o=0;o<i.length;++o){var l=i[o];for(var u=0;u<l.activeCues.length;++u){var c=l.activeCues[u].displayState;x(c,"vjs-text-track-cue");x(c,"vjs-text-track-cue-"+(l.language?l.language:o))}if(this.player_.textTrackSettings){this.updateDisplayState(l)}}};return i}(We);We.registerComponent("TextTrackDisplay",vr);var mr=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){var i=this.player_.isAudio();var r=this.localize(i?"Audio Player":"Video Player");var n=w("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[r])});var a=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});a.appendChild(n);return a};return t}(We);We.registerComponent("LoadingSpinner",mr);var gr=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function e(t,i,r){if(i===void 0){i={}}if(r===void 0){r={}}t="button";i=v({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},i);r=v({type:"button"},r);var n=We.prototype.createEl.call(this,t,i,r);this.createControlTextEl(n);return n};i.addChild=function e(t,i){if(i===void 0){i={}}var r=this.constructor.name;o.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead.");return We.prototype.addChild.call(this,t,i)};i.enable=function t(){e.prototype.enable.call(this);this.el_.removeAttribute("disabled")};i.disable=function t(){e.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};i.handleKeyDown=function t(i){if(Ut.isEventKey(i,"Space")||Ut.isEventKey(i,"Enter")){i.stopPropagation();return}e.prototype.handleKeyDown.call(this,i)};return t}(lr);We.registerComponent("Button",gr);var yr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.mouseused_=false;r.on("mousedown",r.handleMouseDown);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-big-play-button"};i.handleClick=function e(t){var i=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var r=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;Pt(i);if(this.player_.tech(true)&&!((ot||nt)&&r)){this.player_.tech(true).focus()}return}var n=this.player_.getChild("controlBar");var a=n&&n.getChild("playToggle");if(!a){this.player_.tech(true).focus();return}var s=function e(){return a.focus()};if(Ot(i)){i.then(s,function(){})}else{this.setTimeout(s,1)}};i.handleKeyDown=function t(i){this.mouseused_=false;e.prototype.handleKeyDown.call(this,i)};i.handleMouseDown=function e(t){this.mouseused_=true};return t}(gr);yr.prototype.controlText_="Play Video";We.registerComponent("BigPlayButton",yr);var _r=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.controlText(i&&i.controlText||r.localize("Close"));return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)};i.handleClick=function e(t){this.trigger({type:"close",bubbles:false})};i.handleKeyDown=function t(i){if(Ut.isEventKey(i,"Esc")){i.preventDefault();i.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,i)}};return t}(gr);We.registerComponent("CloseButton",_r);var br=function(e){Ke(t,e);function t(t,i){var r;if(i===void 0){i={}}r=e.call(this,t,i)||this;i.replay=i.replay===undefined||i.replay;r.on(t,"play",r.handlePlay);r.on(t,"pause",r.handlePause);
1if(i.replay){r.on(t,"ended",r.handleEnded)}return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)};i.handleClick=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};i.handleSeeked=function e(t){this.removeClass("vjs-ended");if(this.player_.paused()){this.handlePause(t)}else{this.handlePlay(t)}};i.handlePlay=function e(t){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")};i.handlePause=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};i.handleEnded=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)};return t}(gr);br.prototype.controlText_="Play";We.registerComponent("PlayToggle",br);var Tr=function e(t,i){t=t<0?0:t;var r=Math.floor(t%60);var n=Math.floor(t/60%60);var a=Math.floor(t/3600);var s=Math.floor(i/60%60);var o=Math.floor(i/3600);if(isNaN(t)||t===Infinity){a=n=r="-"}a=a>0||o>0?a+":":"";n=((a||s>=10)&&n<10?"0"+n:n)+":";r=r<10?"0"+r:r;return a+n+r};var Sr=Tr;function jr(e){Sr=e}function kr(){Sr=Tr}function Er(e,t){if(t===void 0){t=e}return Sr(e,t)}var wr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,["timeupdate","ended"],r.updateContent);r.updateTextNode_();return r}var r=t.prototype;r.createEl=function t(){var i=this.buildCSSClass();var r=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"\xa0</span>"});this.contentEl_=w("span",{className:i+"-display"},{"aria-live":"off",role:"presentation"});r.appendChild(this.contentEl_);return r};r.dispose=function t(){this.contentEl_=null;this.textNode_=null;e.prototype.dispose.call(this)};r.updateTextNode_=function e(t){var r=this;if(t===void 0){t=0}t=Er(t);if(this.formattedTime_===t){return}this.formattedTime_=t;this.requestAnimationFrame(function(){if(!r.contentEl_){return}var e=r.textNode_;r.textNode_=i.createTextNode(r.formattedTime_);if(!r.textNode_){return}if(e){r.contentEl_.replaceChild(r.textNode_,e)}else{r.contentEl_.appendChild(r.textNode_)}})};r.updateContent=function e(t){};return t}(We);wr.prototype.labelText_="Time";wr.prototype.controlText_="Time";We.registerComponent("TimeDisplay",wr);var Cr=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-current-time"};i.updateContent=function e(t){var i;if(this.player_.ended()){i=this.player_.duration()}else{i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}this.updateTextNode_(i)};return t}(wr);Cr.prototype.labelText_="Current Time";Cr.prototype.controlText_="Current Time";We.registerComponent("CurrentTimeDisplay",Cr);var Ir=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"durationchange",r.updateContent);r.on(t,"loadstart",r.updateContent);r.on(t,"loadedmetadata",r.updateContent);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-duration"};i.updateContent=function e(t){var i=this.player_.duration();this.updateTextNode_(i)};return t}(wr);Ir.prototype.labelText_="Duration";Ir.prototype.controlText_="Duration";We.registerComponent("DurationDisplay",Ir);var Ar=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.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}(We);We.registerComponent("TimeDivider",Ar);var xr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"durationchange",r.updateContent);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-remaining-time"};i.createEl=function t(){var i=e.prototype.createEl.call(this);i.insertBefore(w("span",{},{"aria-hidden":true},"-"),this.contentEl_);return i};i.updateContent=function e(t){if(typeof this.player_.duration()!=="number"){return}var i;if(this.player_.ended()){i=0}else if(this.player_.remainingTimeDisplay){i=this.player_.remainingTimeDisplay()}else{i=this.player_.remainingTime()}this.updateTextNode_(i)};return t}(wr);xr.prototype.labelText_="Remaining Time";xr.prototype.controlText_="Remaining Time";We.registerComponent("RemainingTimeDisplay",xr);var Or=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.updateShowing();r.on(r.player(),"durationchange",r.updateShowing);return r}var i=t.prototype;i.createEl=function t(){var i=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=w("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"\xa0</span>"+this.localize("LIVE")},{"aria-live":"off"});i.appendChild(this.contentEl_);return i};i.dispose=function t(){this.contentEl_=null;e.prototype.dispose.call(this)};i.updateShowing=function e(t){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return t}(We);We.registerComponent("LiveDisplay",Or);var Pr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.updateLiveEdgeStatus();if(r.player_.liveTracker){r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus)}return r}var i=t.prototype;i.createEl=function t(){var i=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.textEl_=w("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"});i.appendChild(this.textEl_);return i};i.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")}
1else{this.setAttribute("aria-disabled",false);this.removeClass("vjs-at-live-edge");this.controlText("Seek to live, currently behind live")}};i.handleClick=function e(){this.player_.liveTracker.seekToLiveEdge()};i.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}(gr);Pr.prototype.controlText_="Seek to live, currently playing live";We.registerComponent("SeekToLive",Pr);var Dr=function e(t,i,r){t=Number(t);return Math.min(r,Math.max(i,isNaN(t)?i:t))};var Rr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.bar=r.getChild(r.options_.barName);r.vertical(!!r.options_.vertical);r.enable();return r}var i=t.prototype;i.enabled=function e(){return this.enabled_};i.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};i.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};i.createEl=function t(i,r,n){if(r===void 0){r={}}if(n===void 0){n={}}r.className=r.className+" vjs-slider";r=v({tabIndex:0},r);n=v({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n);return e.prototype.createEl.call(this,i,r,n)};i.handleMouseDown=function e(t){var i=this.bar.el_.ownerDocument;if(t.type==="mousedown"){t.preventDefault()}if(t.type==="touchstart"&&!at){t.preventDefault()}M();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(i,"mousemove",this.handleMouseMove);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchmove",this.handleMouseMove);this.on(i,"touchend",this.handleMouseUp);this.handleMouseMove(t)};i.handleMouseMove=function e(t){};i.handleMouseUp=function e(){var t=this.bar.el_.ownerDocument;B();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()};i.update=function e(){var t=this;if(!this.el_||!this.bar){return}var i=this.getProgress();if(i===this.progress_){return i}this.progress_=i;this.requestAnimationFrame(function(){var e=t.vertical()?"height":"width";t.bar.el().style[e]=(i*100).toFixed(2)+"%"});return i};i.getProgress=function e(){return Number(Dr(this.getPercent(),0,1).toFixed(4))};i.calculateDistance=function e(t){var i=V(this.el_,t);if(this.vertical()){return i.y}return i.x};i.handleKeyDown=function t(i){if(Ut.isEventKey(i,"Left")||Ut.isEventKey(i,"Down")){i.preventDefault();i.stopPropagation();this.stepBack()}else if(Ut.isEventKey(i,"Right")||Ut.isEventKey(i,"Up")){i.preventDefault();i.stopPropagation();this.stepForward()}else{e.prototype.handleKeyDown.call(this,i)}};i.handleClick=function e(t){t.stopPropagation();t.preventDefault()};i.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}(We);We.registerComponent("Slider",Rr);var Lr=function e(t,i){return Dr(t/i*100,0,100).toFixed(2)+"%"};var Nr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.partEls_=[];r.on(t,"progress",r.update);return r}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});var n=w("span",{className:"vjs-control-text"});var a=w("span",{textContent:this.localize("Loaded")});var s=i.createTextNode(": ");this.percentageEl_=w("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"});r.appendChild(n);n.appendChild(a);n.appendChild(s);n.appendChild(this.percentageEl_);return r};r.dispose=function t(){this.partEls_=null;this.percentageEl_=null;e.prototype.dispose.call(this)};r.update=function e(t){var i=this;this.requestAnimationFrame(function(){var e=i.player_.liveTracker;var t=i.player_.buffered();var r=e&&e.isLive()?e.seekableEnd():i.player_.duration();var n=i.player_.bufferedEnd();var a=i.partEls_;var s=Lr(n,r);if(i.percent_!==s){i.el_.style.width=s;C(i.percentageEl_,s);i.percent_=s}for(var o=0;o<t.length;o++){var l=t.start(o);var u=t.end(o);var c=a[o];if(!c){c=i.el_.appendChild(w());a[o]=c}if(c.dataset.start===l&&c.dataset.end===u){continue}c.dataset.start=l;c.dataset.end=u;c.style.left=Lr(l,n);c.style.width=Lr(u-l,n)}for(var d=a.length;d>t.length;d--){i.el_.removeChild(a[d-1])}a.length=t.length})};return t}(We);We.registerComponent("LoadProgressBar",Nr);var Ur=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update=ke(je(Ge(r),r.update),Se);return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};i.update=function e(t,i,r){var n=F(this.el_);var a=F(this.player_.el());
1var s=t.width*i;if(!a||!n){return}var o=t.left-a.left+s;var l=t.width-s+(a.right-t.right);var u=n.width/2;if(o<u){u+=u-o}else if(l<u){u=l}if(u<0){u=0}else if(u>n.width){u=n.width}this.el_.style.right="-"+u+"px";this.write(r)};i.write=function e(t){C(this.el_,t)};i.updateTime=function e(t,i,r,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 l=o-i*o;e=(l<1?"":"-")+Er(l,o)}else{e=Er(r,s)}a.update(t,i,e);if(n){n()}})};return t}(We);We.registerComponent("TimeTooltip",Ur);var Mr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update=ke(je(Ge(r),r.update),Se);return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};i.update=function e(t,i){var r=this.getChild("timeTooltip");if(!r){return}var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();r.updateTime(t,i,n)};return t}(We);Mr.prototype.options_={children:[]};if(!ht&&!et){Mr.prototype.options_.children.push("timeTooltip")}We.registerComponent("PlayProgressBar",Mr);var Br=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update=ke(je(Ge(r),r.update),Se);return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};i.update=function e(t,i){var r=this;var n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(t,i,n,function(){r.el_.style.left=t.width*i+"px"})};return t}(We);Br.prototype.options_={children:["timeTooltip"]};We.registerComponent("MouseTimeDisplay",Br);var Fr=5;var Hr=12;var Vr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.setEventHandlers_();return r}var r=t.prototype;r.setEventHandlers_=function e(){this.update_=je(this,this.update);this.update=ke(this.update_,Se);this.on(this.player_,["ended","durationchange","timeupdate"],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 i&&"visibilityState"in i){this.on(i,"visibilitychange",this.toggleVisibility_)}};r.toggleVisibility_=function e(t){if(i.hidden){this.disableInterval_(t)}else{this.enableInterval_();this.update()}};r.enableInterval_=function e(){if(this.updateInterval){return}this.updateInterval=this.setInterval(this.update,Se)};r.disableInterval_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t.type!=="ended"){return}if(!this.updateInterval){return}this.clearInterval(this.updateInterval);this.updateInterval=null};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};r.update=function t(i){var r=this;var n=e.prototype.update.call(this);this.requestAnimationFrame(function(){var e=r.player_.ended()?r.player_.duration():r.getCurrentTime_();var t=r.player_.liveTracker;var i=r.player_.duration();if(t&&t.isLive()){i=r.player_.liveTracker.liveCurrentTime()}if(r.percent_!==n){r.el_.setAttribute("aria-valuenow",(n*100).toFixed(2));r.percent_=n}if(r.currentTime_!==e||r.duration_!==i){r.el_.setAttribute("aria-valuetext",r.localize("progress bar timing: currentTime={1} duration={2}",[Er(e,i),Er(i,i)],"{1} of {2}"));r.currentTime_=e;r.duration_=i}if(r.bar){r.bar.update(F(r.el()),r.getProgress())}});return n};r.getCurrentTime_=function e(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};r.getPercent=function e(){var t=this.getCurrentTime_();var i;var r=this.player_.liveTracker;if(r&&r.isLive()){i=(t-r.seekableStart())/r.liveWindow();if(r.atLiveEdge()){i=1}}else{i=t/this.player_.duration()}return i};r.handleMouseDown=function t(i){if(!K(i)){return}i.stopPropagation();this.player_.scrubbing(true);this.videoWasPlaying=!this.player_.paused();this.player_.pause();e.prototype.handleMouseDown.call(this,i)};r.handleMouseMove=function e(t){if(!K(t)){return}var i;var r=this.calculateDistance(t);var n=this.player_.liveTracker;if(!n||!n.isLive()){i=r*this.player_.duration();if(i===this.player_.duration()){i=i-.1}}else{var a=n.seekableStart();var s=n.liveCurrentTime();i=a+r*n.liveWindow();if(i>=s){i=s}if(i<=a){i=a+.1}if(i===Infinity){return}}this.player_.currentTime(i)};r.enable=function t(){e.prototype.enable.call(this);var i=this.getChild("mouseTimeDisplay");if(!i){return}i.show()};r.disable=function t(){e.prototype.disable.call(this);var i=this.getChild("mouseTimeDisplay");if(!i){return}i.hide()};r.handleMouseUp=function t(i){e.prototype.handleMouseUp.call(this,i);if(i){i.stopPropagation()}this.player_.scrubbing(false);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:true});if(this.videoWasPlaying){Pt(this.player_.play())}else{this.update_()}};r.stepForward=function e(){this.player_.currentTime(this.player_.currentTime()+Fr)};r.stepBack=function e(){this.player_.currentTime(this.player_.currentTime()-Fr)};r.handleAction=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};r.handleKeyDown=function t(i){if(Ut.isEventKey(i,"Space")||Ut.isEventKey(i,"Enter")){i.preventDefault();i.stopPropagation();this.handleAction(i)}else if(Ut.isEventKey(i,"Home")){i.preventDefault();i.stopPropagation();this.player_.currentTime(0)}else if(Ut.isEventKey(i,"End")){i.preventDefault();i.stopPropagation();this.player_.currentTime(this.player_.duration())}else if(/^[0-9]$/.test(Ut(i))){i.preventDefault();i.stopPropagation();var r=(Ut.codes[Ut(i)]-Ut.codes["0"])*10/100;this.player_.currentTime(this.player_.duration()*r)}else if(Ut.isEventKey(i,"PgDn")){i.preventDefault();i.stopPropagation();this.player_.currentTime(this.player_.currentTime()-Fr*Hr)}else if(Ut.isEventKey(i,"PgUp")){i.preventDefault();i.stopPropagation();this.player_.currentTime(this.player_.currentTime()+Fr*Hr)}else{e.prototype.handleKeyDown.call(this,i)}};return t}(Rr);Vr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};if(!ht&&!et){Vr.prototype.options_.children.splice(1,0,"mouseTimeDisplay")}We.registerComponent("SeekBar",Vr);var qr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.handleMouseMove=ke(je(Ge(r),r.handleMouseMove),Se);r.throttledHandleMouseSeek=ke(je(Ge(r),r.handleMouseSeek),Se);r.enable();return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};i.handleMouseMove=function e(t){var i=this.getChild("seekBar");if(!i){return}var r=i.getChild("playProgressBar");var n=i.getChild("mouseTimeDisplay");if(!r&&!n){return}var a=i.el();var s=F(a);var o=V(a,t).x;o=Dr(0,1,o);if(n){n.update(s,o)}if(r){r.update(s,i.getProgress())}};i.handleMouseSeek=function e(t){var i=this.getChild("seekBar");if(i){i.handleMouseMove(t)}};i.enabled=function e(){return this.enabled_};
1i.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};i.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};i.handleMouseDown=function e(t){var i=this.el_.ownerDocument;var r=this.getChild("seekBar");if(r){r.handleMouseDown(t)}this.on(i,"mousemove",this.throttledHandleMouseSeek);this.on(i,"touchmove",this.throttledHandleMouseSeek);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchend",this.handleMouseUp)};i.handleMouseUp=function e(t){var i=this.el_.ownerDocument;var r=this.getChild("seekBar");if(r){r.handleMouseUp(t)}this.off(i,"mousemove",this.throttledHandleMouseSeek);this.off(i,"touchmove",this.throttledHandleMouseSeek);this.off(i,"mouseup",this.handleMouseUp);this.off(i,"touchend",this.handleMouseUp)};return t}(We);qr.prototype.options_={children:["seekBar"]};We.registerComponent("ProgressControl",qr);var Wr=function(e){Ke(t,e);function t(t,r){var n;n=e.call(this,t,r)||this;n.on(t,["enterpictureinpicture","leavepictureinpicture"],n.handlePictureInPictureChange);if(!i.pictureInPictureEnabled){n.disable()}return n}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)};r.handlePictureInPictureChange=function e(t){if(this.player_.isInPictureInPicture()){this.controlText("Exit Picture-in-Picture")}else{this.controlText("Picture-in-Picture")}};r.handleClick=function e(t){if(!this.player_.isInPictureInPicture()){this.player_.requestPictureInPicture()}else{this.player_.exitPictureInPicture()}};return t}(gr);Wr.prototype.controlText_="Picture-in-Picture";We.registerComponent("PictureInPictureToggle",Wr);var zr=function(e){Ke(t,e);function t(t,r){var n;n=e.call(this,t,r)||this;n.on(t,"fullscreenchange",n.handleFullscreenChange);if(i[t.fsApi_.fullscreenEnabled]===false){n.disable()}return n}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)};r.handleFullscreenChange=function e(t){if(this.player_.isFullscreen()){this.controlText("Non-Fullscreen")}else{this.controlText("Fullscreen")}};r.handleClick=function e(t){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return t}(gr);zr.prototype.controlText_="Fullscreen";We.registerComponent("FullscreenToggle",zr);var Gr=function e(t,i){if(i.tech_&&!i.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}t.on(i,"loadstart",function(){if(!i.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var Yr=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};return t}(We);We.registerComponent("VolumeLevel",Yr);var Kr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on("slideractive",r.updateLastVolume_);r.on(t,"volumechange",r.updateARIAAttributes);t.ready(function(){return r.updateARIAAttributes()});return r}var i=t.prototype;i.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"})};i.handleMouseDown=function t(i){if(!K(i)){return}e.prototype.handleMouseDown.call(this,i)};i.handleMouseMove=function e(t){if(!K(t)){return}this.checkMuted();this.player_.volume(this.calculateDistance(t))};i.checkMuted=function e(){if(this.player_.muted()){this.player_.muted(false)}};i.getPercent=function e(){if(this.player_.muted()){return 0}return this.player_.volume()};i.stepForward=function e(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};i.stepBack=function e(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};i.updateARIAAttributes=function e(t){var i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i);this.el_.setAttribute("aria-valuetext",i+"%")};i.volumeAsPercentage_=function e(){return Math.round(this.player_.volume()*100)};i.updateLastVolume_=function e(){var t=this;var i=this.player_.volume();this.one("sliderinactive",function(){if(t.player_.volume()===0){t.player_.lastVolume_(i)}})};return t}(Rr);Kr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};Kr.prototype.playerEvent="volumechange";
1We.registerComponent("VolumeBar",Kr);var Xr=function(e){Ke(t,e);function t(t,i){var r;if(i===void 0){i={}}i.vertical=i.vertical||false;if(typeof i.volumeBar==="undefined"||g(i.volumeBar)){i.volumeBar=i.volumeBar||{};i.volumeBar.vertical=i.vertical}r=e.call(this,t,i)||this;Gr(Ge(r),t);r.throttledHandleMouseMove=ke(je(Ge(r),r.handleMouseMove),Se);r.on("mousedown",r.handleMouseDown);r.on("touchstart",r.handleMouseDown);r.on(r.volumeBar,["focus","slideractive"],function(){r.volumeBar.addClass("vjs-slider-active");r.addClass("vjs-slider-active");r.trigger("slideractive")});r.on(r.volumeBar,["blur","sliderinactive"],function(){r.volumeBar.removeClass("vjs-slider-active");r.removeClass("vjs-slider-active");r.trigger("sliderinactive")});return r}var i=t.prototype;i.createEl=function t(){var i="vjs-volume-horizontal";if(this.options_.vertical){i="vjs-volume-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+i})};i.handleMouseDown=function e(t){var i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove);this.on(i,"touchmove",this.throttledHandleMouseMove);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchend",this.handleMouseUp)};i.handleMouseUp=function e(t){var i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove);this.off(i,"touchmove",this.throttledHandleMouseMove);this.off(i,"mouseup",this.handleMouseUp);this.off(i,"touchend",this.handleMouseUp)};i.handleMouseMove=function e(t){this.volumeBar.handleMouseMove(t)};return t}(We);Xr.prototype.options_={children:["volumeBar"]};We.registerComponent("VolumeControl",Xr);var Jr=function e(t,i){if(i.tech_&&!i.tech_.featuresMuteControl){t.addClass("vjs-hidden")}t.on(i,"loadstart",function(){if(!i.tech_.featuresMuteControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var Qr=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;Jr(Ge(r),t);r.on(t,["loadstart","volumechange"],r.update);return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)};i.handleClick=function e(t){var i=this.player_.volume();var r=this.player_.lastVolume_();if(i===0){var n=r<.1?.1:r;this.player_.volume(n);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};i.update=function e(t){this.updateIcon_();this.updateControlText_()};i.updateIcon_=function e(){var t=this.player_.volume();var i=3;if(ht&&this.player_.tech_&&this.player_.tech_.el_){this.player_.muted(this.player_.tech_.el_.muted)}if(t===0||this.player_.muted()){i=0}else if(t<.33){i=1}else if(t<.67){i=2}for(var r=0;r<4;r++){O(this.el_,"vjs-vol-"+r)}x(this.el_,"vjs-vol-"+i)};i.updateControlText_=function e(){var t=this.player_.muted()||this.player_.volume()===0;var i=t?"Unmute":"Mute";if(this.controlText()!==i){this.controlText(i)}};return t}(gr);Qr.prototype.controlText_="Mute";We.registerComponent("MuteToggle",Qr);var Zr=function(e){Ke(t,e);function t(t,i){var r;if(i===void 0){i={}}if(typeof i.inline!=="undefined"){i.inline=i.inline}else{i.inline=true}if(typeof i.volumeControl==="undefined"||g(i.volumeControl)){i.volumeControl=i.volumeControl||{};i.volumeControl.vertical=!i.inline}r=e.call(this,t,i)||this;r.on(t,["loadstart"],r.volumePanelState_);r.on(r.muteToggle,"keyup",r.handleKeyPress);r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp);r.on("keydown",r.handleKeyPress);r.on("mouseover",r.handleMouseOver);r.on("mouseout",r.handleMouseOut);r.on(r.volumeControl,["slideractive"],r.sliderActive_);r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_);return r}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 i="vjs-volume-panel-horizontal";if(!this.options_.inline){i="vjs-volume-panel-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+i})};r.dispose=function t(){this.handleMouseOut();e.prototype.dispose.call(this)};r.handleVolumeControlKeyUp=function e(t){if(Ut.isEventKey(t,"Esc")){this.muteToggle.focus()}};r.handleMouseOver=function e(t){this.addClass("vjs-hover");
1me(i,"keyup",je(this,this.handleKeyPress))};r.handleMouseOut=function e(t){this.removeClass("vjs-hover");ge(i,"keyup",je(this,this.handleKeyPress))};r.handleKeyPress=function e(t){if(Ut.isEventKey(t,"Esc")){this.handleMouseOut()}};return t}(We);Zr.prototype.options_={children:["muteToggle","volumeControl"]};We.registerComponent("VolumePanel",Zr);var $r=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;if(i){r.menuButton_=i.menuButton}r.focusedChild_=-1;r.on("keydown",r.handleKeyDown);r.boundHandleBlur_=je(Ge(r),r.handleBlur);r.boundHandleTapClick_=je(Ge(r),r.handleTapClick);return r}var r=t.prototype;r.addEventListenerForItem=function e(t){if(!(t instanceof We)){return}this.on(t,"blur",this.boundHandleBlur_);this.on(t,["tap","click"],this.boundHandleTapClick_)};r.removeEventListenerForItem=function e(t){if(!(t instanceof We)){return}this.off(t,"blur",this.boundHandleBlur_);this.off(t,["tap","click"],this.boundHandleTapClick_)};r.removeChild=function t(i){if(typeof i==="string"){i=this.getChild(i)}this.removeEventListenerForItem(i);e.prototype.removeChild.call(this,i)};r.addItem=function e(t){var i=this.addChild(t);if(i){this.addEventListenerForItem(i)}};r.createEl=function t(){var i=this.options_.contentElType||"ul";this.contentEl_=w(i,{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var r=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});r.appendChild(this.contentEl_);me(r,"click",function(e){e.preventDefault();e.stopImmediatePropagation()});return r};r.dispose=function t(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;e.prototype.dispose.call(this)};r.handleBlur=function e(t){var r=t.relatedTarget||i.activeElement;if(!this.children().some(function(e){return e.el()===r})){var n=this.menuButton_;if(n&&n.buttonPressed_&&r!==n.el().firstChild){n.unpressButton()}}};r.handleTapClick=function e(t){if(this.menuButton_){this.menuButton_.unpressButton();var i=this.children();if(!Array.isArray(i)){return}var r=i.filter(function(e){return e.el()===t.target})[0];if(!r){return}if(r.name()!=="CaptionSettingsMenuItem"){this.menuButton_.focus()}}};r.handleKeyDown=function e(t){if(Ut.isEventKey(t,"Left")||Ut.isEventKey(t,"Down")){t.preventDefault();t.stopPropagation();this.stepForward()}else if(Ut.isEventKey(t,"Right")||Ut.isEventKey(t,"Up")){t.preventDefault();t.stopPropagation();this.stepBack()}};r.stepForward=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_+1}this.focus(t)};r.stepBack=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_-1}this.focus(t)};r.focus=function e(t){if(t===void 0){t=0}var i=this.children().slice();var r=i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className);if(r){i.shift()}if(i.length>0){if(t<0){t=0}else if(t>=i.length){t=i.length-1}this.focusedChild_=t;i[t].el_.focus()}};return t}(We);We.registerComponent("Menu",$r);var en=function(e){Ke(t,e);function t(t,r){var n;if(r===void 0){r={}}n=e.call(this,t,r)||this;n.menuButton_=new gr(t,r);n.menuButton_.controlText(n.controlText_);n.menuButton_.el_.setAttribute("aria-haspopup","true");var a=gr.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+a;n.menuButton_.removeClass("vjs-control");n.addChild(n.menuButton_);n.update();n.enabled_=true;n.on(n.menuButton_,"tap",n.handleClick);n.on(n.menuButton_,"click",n.handleClick);n.on(n.menuButton_,"keydown",n.handleKeyDown);n.on(n.menuButton_,"mouseenter",function(){n.addClass("vjs-hover");n.menu.show();me(i,"keyup",je(Ge(n),n.handleMenuKeyUp))});n.on("mouseleave",n.handleMouseLeave);n.on("keydown",n.handleSubmenuKeyDown);return n}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 $r(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var i=w("li",{className:"vjs-menu-title",innerHTML:He(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var r=new We(this.player_,{el:i});t.addItem(r)}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 i="vjs-menu-button";if(this.options_.inline===true){i+="-inline"}else{i+="-popup"}var r=gr.prototype.buildCSSClass();return"vjs-menu-button "+i+" "+r+" "+e.prototype.buildCSSClass.call(this)};r.buildCSSClass=function t(){var i="vjs-menu-button";if(this.options_.inline===true){i+="-inline"}else{i+="-popup"}return"vjs-menu-button "+i+" "+e.prototype.buildCSSClass.call(this)};r.controlText=function e(t,i){if(i===void 0){i=this.menuButton_.el()}return this.menuButton_.controlText(t,i)};r.dispose=function t(){this.handleMouseLeave();e.prototype.dispose.call(this)};r.handleClick=function e(t){if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};r.handleMouseLeave=function e(t){this.removeClass("vjs-hover");
1ge(i,"keyup",je(this,this.handleMenuKeyUp))};r.focus=function e(){this.menuButton_.focus()};r.blur=function e(){this.menuButton_.blur()};r.handleKeyDown=function e(t){if(Ut.isEventKey(t,"Esc")||Ut.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Ut.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}else if(Ut.isEventKey(t,"Up")||Ut.isEventKey(t,"Down")){if(!this.buttonPressed_){t.preventDefault();this.pressButton()}}};r.handleMenuKeyUp=function e(t){if(Ut.isEventKey(t,"Esc")||Ut.isEventKey(t,"Tab")){this.removeClass("vjs-hover")}};r.handleSubmenuKeyPress=function e(t){this.handleSubmenuKeyDown(t)};r.handleSubmenuKeyDown=function e(t){if(Ut.isEventKey(t,"Esc")||Ut.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!Ut.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(ht&&k()){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}(We);We.registerComponent("MenuButton",en);var tn=function(e){Ke(t,e);function t(t,i){var r;var n=i.tracks;r=e.call(this,t,i)||this;if(r.items.length<=1){r.hide()}if(!n){return Ge(r)}var a=je(Ge(r),r.update);n.addEventListener("removetrack",a);n.addEventListener("addtrack",a);r.player_.on("ready",a);r.player_.on("dispose",function(){n.removeEventListener("removetrack",a);n.removeEventListener("addtrack",a)});return r}return t}(en);We.registerComponent("TrackButton",tn);var rn=["Tab","Esc","Up","Down","Right","Left"];var nn=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.selectable=i.selectable;r.isSelected_=i.selected||false;r.multiSelectable=i.multiSelectable;r.selected(r.isSelected_);if(r.selectable){if(r.multiSelectable){r.el_.setAttribute("role","menuitemcheckbox")}else{r.el_.setAttribute("role","menuitemradio")}}else{r.el_.setAttribute("role","menuitem")}return r}var i=t.prototype;i.createEl=function t(i,r,n){this.nonIconControl=true;return e.prototype.createEl.call(this,"li",v({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},r),n)};i.handleKeyDown=function t(i){if(!rn.some(function(e){return Ut.isEventKey(i,e)})){e.prototype.handleKeyDown.call(this,i)}};i.handleClick=function e(t){this.selected(true)};i.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}(lr);We.registerComponent("MenuItem",nn);var an=function(e){Ke(r,e);function r(r,n){var a;var s=n.track;var o=r.textTracks();n.label=s.label||s.language||"Unknown";n.selected=s.mode==="showing";a=e.call(this,r,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,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}a.handleTracksChange.apply(Ge(a),i)};var u=function e(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}a.handleSelectedLanguageChange.apply(Ge(a),i)};r.on(["loadstart","texttrackchange"],l);o.addEventListener("change",l);o.addEventListener("selectedlanguagechange",u);a.on("dispose",function(){r.off(["loadstart","texttrackchange"],l);o.removeEventListener("change",l);o.removeEventListener("selectedlanguagechange",u)});if(o.onchange===undefined){var c;a.on(["tap","click"],function(){if(typeof t.Event!=="object"){try{c=new t.Event("change")}catch(e){}}if(!c){c=i.createEvent("Event");c.initEvent("change",true,true)}o.dispatchEvent(c)})}a.handleTracksChange();return a}var n=r.prototype;n.handleClick=function t(i){var r=this.track;var n=this.player_.textTracks();e.prototype.handleClick.call(this,i);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===r){if(s.mode!=="showing"){s.mode="showing"}}else if(s.mode!=="disabled"){s.mode="disabled"}}};n.handleTracksChange=function e(t){var i=this.track.mode==="showing";if(i!==this.isSelected_){this.selected(i)}};n.handleSelectedLanguageChange=function e(t){if(this.track.mode==="showing"){var i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind){return}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind}}};n.dispose=function t(){this.track=null;e.prototype.dispose.call(this)};return r}(nn);We.registerComponent("TextTrackMenuItem",an);var sn=function(e){Ke(t,e);function t(t,i){i.track={player:t,kind:i.kind,kinds:i.kinds,default:false,mode:"disabled"};if(!i.kinds){i.kinds=[i.kind]}if(i.label){i.track.label=i.label}else{i.track.label=i.kinds.join(" and ")+" off"}i.selectable=true;i.multiSelectable=false;return e.call(this,t,i)||this}var i=t.prototype;i.handleTracksChange=function e(t){var i=this.player().textTracks();var r=true;for(var n=0,a=i.length;n<a;n++){var s=i[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){r=false;break}}if(r!==this.isSelected_){this.selected(r)}};i.handleSelectedLanguageChange=function e(t){var i=this.player().textTracks();var r=true;for(var n=0,a=i.length;n<a;n++){var s=i[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){r=false;break}}if(r){this.player_.cache_.selectedLanguage={enabled:false}}};return t}(an);We.registerComponent("OffTextTrackMenuItem",sn);var on=function(e){Ke(t,e);function t(t,i){if(i===void 0){i={}}i.tracks=t.textTracks();return e.call(this,t,i)||this}var i=t.prototype;i.createItems=function e(t,i){if(t===void 0){t=[]}if(i===void 0){i=an}var r;if(this.label_){r=this.label_+" off"}t.push(new sn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r}));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 i(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}(tn);We.registerComponent("TextTrackButton",on);var ln=function(e){Ke(t,e);function t(t,i){var r;var n=i.track;var a=i.cue;var s=t.currentTime();i.selectable=true;i.multiSelectable=false;i.label=a.text;i.selected=a.startTime<=s&&s<a.endTime;r=e.call(this,t,i)||this;r.track=n;r.cue=a;n.addEventListener("cuechange",je(Ge(r),r.update));return r}var i=t.prototype;i.handleClick=function t(i){e.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)};i.update=function e(t){var i=this.cue;var r=this.player_.currentTime();this.selected(i.startTime<=r&&r<i.endTime)};return t}(nn);We.registerComponent("ChaptersTrackMenuItem",ln);var un=function(e){Ke(t,e);function t(t,i,r){return e.call(this,t,i,r)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)};i.update=function t(i){if(!this.track_||i&&(i.type==="addtrack"||i.type==="removetrack")){this.setTrack(this.findChapter
1sTrack())}e.prototype.update.call(this)};i.setTrack=function e(t){if(this.track_===t){return}if(!this.updateHandler_){this.updateHandler_=this.update.bind(this)}if(this.track_){var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(i){i.removeEventListener("load",this.updateHandler_)}this.track_=null}this.track_=t;if(this.track_){this.track_.mode="hidden";var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(r){r.addEventListener("load",this.updateHandler_)}}};i.findChaptersTrack=function e(){var t=this.player_.textTracks()||[];for(var i=t.length-1;i>=0;i--){var r=t[i];if(r.kind===this.kind_){return r}}};i.getMenuCaption=function e(){if(this.track_&&this.track_.label){return this.track_.label}return this.localize(He(this.kind_))};i.createMenu=function t(){this.options_.title=this.getMenuCaption();return e.prototype.createMenu.call(this)};i.createItems=function e(){var t=[];if(!this.track_){return t}var i=this.track_.cues;if(!i){return t}for(var r=0,n=i.length;r<n;r++){var a=i[r];var s=new ln(this.player_,{track:this.track_,cue:a});t.push(s)}return t};return t}(on);un.prototype.kind_="chapters";un.prototype.controlText_="Chapters";We.registerComponent("ChaptersButton",un);var cn=function(e){Ke(t,e);function t(t,i,r){var n;n=e.call(this,t,i,r)||this;var a=t.textTracks();var s=je(Ge(n),n.handleTracksChange);a.addEventListener("change",s);n.on("dispose",function(){a.removeEventListener("change",s)});return n}var i=t.prototype;i.handleTracksChange=function e(t){var i=this.player().textTracks();var r=false;for(var n=0,a=i.length;n<a;n++){var s=i[n];if(s.kind!==this.kind_&&s.mode==="showing"){r=true;break}}if(r){this.disable()}else{this.enable()}};i.buildCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(on);cn.prototype.kind_="descriptions";cn.prototype.controlText_="Descriptions";We.registerComponent("DescriptionsButton",cn);var dn=function(e){Ke(t,e);function t(t,i,r){return e.call(this,t,i,r)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(on);dn.prototype.kind_="subtitles";dn.prototype.controlText_="Subtitles";We.registerComponent("SubtitlesButton",dn);var fn=function(e){Ke(t,e);function t(t,i){var r;i.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:false,default:false,mode:"disabled"};i.selectable=false;i.name="CaptionSettingsMenuItem";r=e.call(this,t,i)||this;r.addClass("vjs-texttrack-settings");r.controlText(", opens "+i.kind+" settings dialog");return r}var i=t.prototype;i.handleClick=function e(t){this.player().getChild("textTrackSettings").open()};return t}(an);We.registerComponent("CaptionSettingsMenuItem",fn);var hn=function(e){Ke(t,e);function t(t,i,r){return e.call(this,t,i,r)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)};i.createItems=function t(){var i=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){i.push(new fn(this.player_,{kind:this.kind_}));this.hideThreshold_+=1}return e.prototype.createItems.call(this,i)};return t}(on);hn.prototype.kind_="captions";hn.prototype.controlText_="Captions";We.registerComponent("CaptionsButton",hn);var pn=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(i,r,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,i,v({innerHTML:a},r),n);return s};return t}(an);We.registerComponent("SubsCapsMenuItem",pn);var vn=function(e){Ke(t,e);function t(t,i){var r;if(i===void 0){i={}}r=e.call(this,t,i)||this;r.label_="subtitles";if(["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1){r.label_="captions"}r.menuButton_.controlText(He(r.label_));return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)};i.createItems=function t(){var i=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){i.push(new fn(this.player_,{kind:this.label_}));this.hideThreshold_+=1}i=e.prototype.createItems.call(this,i,pn);return i};return t}(on);vn.prototype.kinds_=["captions","subtitles"];vn.prototype.controlText_="Subtitles";We.registerComponent("SubsCapsButton",vn);var mn=function(e){Ke(t,e);function t(t,i){var r;var n=i.track;var a=t.audioTracks();i.label=n.label||n.language||"Unknown";i.selected=n.enabled;r=e.call(this,t,i)||this;r.track=n;r.addClass("vjs-"+n.kind+"-menu-item");var s=function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++){i[n]=arguments[n]}r.handleTracksChange.apply(Ge(r),i)};a.addEventListener("change",s);r.on("dispose",function(){a.removeEventListener("change",s)});return r}var i=t.prototype;i.createEl=function t(i,r,n){var a='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);
1if(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,i,v({innerHTML:a},r),n);return s};i.handleClick=function t(i){var r=this.player_.audioTracks();e.prototype.handleClick.call(this,i);for(var n=0;n<r.length;n++){var a=r[n];a.enabled=a===this.track}};i.handleTracksChange=function e(t){this.selected(this.track.enabled)};return t}(nn);We.registerComponent("AudioTrackMenuItem",mn);var gn=function(e){Ke(t,e);function t(t,i){if(i===void 0){i={}}i.tracks=t.audioTracks();return e.call(this,t,i)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)};i.createItems=function e(t){if(t===void 0){t=[]}this.hideThreshold_=1;var i=this.player_.audioTracks();for(var r=0;r<i.length;r++){var n=i[r];t.push(new mn(this.player_,{track:n,selectable:true,multiSelectable:false}))}return t};return t}(tn);gn.prototype.controlText_="Audio Track";We.registerComponent("AudioTrackButton",gn);var yn=function(e){Ke(t,e);function t(t,i){var r;var n=i.rate;var a=parseFloat(n,10);i.label=n;i.selected=a===1;i.selectable=true;i.multiSelectable=false;r=e.call(this,t,i)||this;r.label=n;r.rate=a;r.on(t,"ratechange",r.update);return r}var i=t.prototype;i.handleClick=function t(i){e.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};i.update=function e(t){this.selected(this.player().playbackRate()===this.rate)};return t}(nn);yn.prototype.contentElType="button";We.registerComponent("PlaybackRateMenuItem",yn);var _n=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.updateVisibility();r.updateLabel();r.on(t,"loadstart",r.updateVisibility);r.on(t,"ratechange",r.updateLabel);return r}var i=t.prototype;i.createEl=function t(){var i=e.prototype.createEl.call(this);this.labelEl_=w("div",{className:"vjs-playback-rate-value",innerHTML:"1x"});i.appendChild(this.labelEl_);return i};i.dispose=function t(){this.labelEl_=null;e.prototype.dispose.call(this)};i.buildCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)};i.buildWrapperCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)};i.createMenu=function e(){var t=new $r(this.player());var i=this.playbackRates();if(i){for(var r=i.length-1;r>=0;r--){t.addChild(new yn(this.player(),{rate:i[r]+"x"}))}}return t};i.updateARIAAttributes=function e(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};i.handleClick=function e(t){var i=this.player().playbackRate();var r=this.playbackRates();var n=r[0];for(var a=0;a<r.length;a++){if(r[a]>i){n=r[a];break}}this.player().playbackRate(n)};i.playbackRates=function e(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates};i.playbackRateSupported=function e(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0};i.updateVisibility=function e(t){if(this.playbackRateSupported()){this.removeClass("vjs-hidden")}else{this.addClass("vjs-hidden")}};i.updateLabel=function e(t){if(this.playbackRateSupported()){this.labelEl_.innerHTML=this.player().playbackRate()+"x"}};return t}(en);_n.prototype.controlText_="Playback Rate";We.registerComponent("PlaybackRateMenuButton",_n);var bn=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})};return t}(We);We.registerComponent("Spacer",bn);var Tn=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)};i.createEl=function t(){var i=e.prototype.createEl.call(this,{className:this.buildCSSClass()});i.innerHTML="\xa0";return i};return t}(bn);We.registerComponent("CustomControlSpacer",Tn);var Sn=function(e){Ke(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};return t}(We);Sn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};if("exitPictureInPicture"in i){Sn.prototype.options_.children.splice(Sn.prototype.options_.children.length-1,0,"pictureInPictureToggle")}We.registerComponent("ControlBar",Sn);var jn=function(e){Ke(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"error",r.open);return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)};i.content=function e(){var t=this.player().error();return t?this.localize(t.message):""};return t}(Wt);jn.prototype.options_=c({}
1,Wt.prototype.options_,{pauseOnOpen:false,fillAlways:true,temporary:false,uncloseable:true});We.registerComponent("ErrorDisplay",jn);var kn="vjs-text-track-settings";var En=["#000","Black"];var wn=["#00F","Blue"];var Cn=["#0FF","Cyan"];var In=["#0F0","Green"];var An=["#F0F","Magenta"];var xn=["#F00","Red"];var On=["#FFF","White"];var Pn=["#FF0","Yellow"];var Dn=["1","Opaque"];var Rn=["0.5","Semi-Transparent"];var Ln=["0","Transparent"];var Nn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[En,On,xn,In,wn,Pn,An,Cn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Dn,Rn,Ln]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[On,En,xn,In,wn,Pn,An,Cn]},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:[Dn,Rn]},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:[Ln,Rn,Dn]}};Nn.windowColor.options=Nn.backgroundColor.options;function Un(e,t){if(t){e=t(e)}if(e&&e!=="none"){return e}}function Mn(e,t){var i=e.options[e.options.selectedIndex].value;return Un(i,t)}function Bn(e,t,i){if(!t){return}for(var r=0;r<e.options.length;r++){if(Un(e.options[r].value,i)===t){e.selectedIndex=r;break}}}var Fn=function(e){Ke(i,e);function i(t,i){var r;i.temporary=false;r=e.call(this,t,i)||this;r.updateDisplay=je(Ge(r),r.updateDisplay);r.fill();r.hasBeenOpened_=r.hasBeenFilled_=true;r.endDialog=w("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")});r.el().appendChild(r.endDialog);r.setDefaults();if(i.persistTextTrackSettings===undefined){r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings}r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings();r.close()});r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults();r.updateDisplay()});h(Nn,function(e){r.on(r.$(e.selector),"change",r.updateDisplay)});if(r.options_.persistTextTrackSettings){r.restoreSettings()}return r}var r=i.prototype;r.dispose=function t(){this.endDialog=null;e.prototype.dispose.call(this)};r.createElSelect_=function e(t,i,r){var n=this;if(i===void 0){i=""}if(r===void 0){r="label"}var a=Nn[t];var s=a.id.replace("%s",this.id_);var o=[i,s].join(" ").trim();return["<"+r+' id="'+s+'" class="'+(r==="label"?"vjs-label":"")+'">',this.localize(a.label),"</"+r+">",'<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("")};r.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("")};r.createElBgColor_=function e(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">
1',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")};r.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("")};r.createElColors_=function e(){return w("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})};r.createElFont_=function e(){return w("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("")})};r.createElControls_=function e(){var t=this.localize("restore all settings to the default values");return w("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("")})};r.content=function e(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};r.label=function e(){return this.localize("Caption Settings Dialog")};r.description=function e(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")};r.buildCSSClass=function t(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};r.getValues=function e(){var t=this;return p(Nn,function(e,i,r){var n=Mn(t.$(i.selector),i.parser);if(n!==undefined){e[r]=n}return e},{})};r.setValues=function e(t){var i=this;h(Nn,function(e,r){Bn(i.$(e.selector),t[r],e.parser)})};r.setDefaults=function e(){var t=this;h(Nn,function(e){var i=e.hasOwnProperty("default")?e["default"]:0;t.$(e.selector).selectedIndex=i})};r.restoreSettings=function e(){var i;try{i=JSON.parse(t.localStorage.getItem(kn))}catch(e){o.warn(e)}if(i){this.setValues(i)}};r.saveSettings=function e(){if(!this.options_.persistTextTrackSettings){return}var i=this.getValues();try{if(Object.keys(i).length){t.localStorage.setItem(kn,JSON.stringify(i))}else{t.localStorage.removeItem(kn)}}catch(e){o.warn(e)}};r.updateDisplay=function e(){var t=this.player_.getChild("textTrackDisplay");if(t){t.updateDisplay()}};r.conditionalBlur_=function e(){this.previouslyActiveEl_=null;var t=this.player_.controlBar;var i=t&&t.subsCapsButton;var r=t&&t.captionsButton;if(i){i.focus()}else if(r){r.focus()}};return i}(Wt);We.registerComponent("TextTrackSettings",Fn);var Hn=function(e){Ke(i,e);function i(i,r){var n;var a=r.ResizeObserver||t.ResizeObserver;if(r.ResizeObserver===null){a=false}var s=qe({createEl:!a,reportTouchActivity:false},r);n=e.call(this,i,s)||this;n.ResizeObserver=r.ResizeObserver||t.ResizeObserver;n.loadListener_=null;n.resizeObserver_=null;n.debouncedHandler_=Ee(function(){n.resizeHandler()},100,false,Ge(n));if(a){n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_);n.resizeObserver_.observe(i.el())}else{n.loadListener_=function(){if(!n.el_||!n.el_.contentWindow){return}var e=n.debouncedHandler_;var t=n.unloadListener_=function(){ge(this,"resize",e);ge(this,"unload",t);t=null};me(n.el_.contentWindow,"unload",t);me(n.el_.contentWindow,"resize",e)};n.one("load",n.loadListener_)}return n}var r=i.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})};r.resizeHandler=function e(){if(!this.player_||!this.player_.trigger){return}this.player_.trigger("playerresize")};r.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 i}(We);We.registerComponent("ResizeManager",Hn);var Vn=function e(t){var i=Math.floor(t.length/2);
1var r=[].concat(t).sort(function(e,t){return e-t});return t.length%2!==0?r[i]:(r[i-1]+r[i])/2};var qn=function(e){Ke(t,e);function t(t,r){var n;var a=qe({createEl:false},r);n=e.call(this,t,a)||this;n.reset_();n.on(n.player_,"durationchange",n.handleDurationchange);if(ot&&"hidden"in i&&"visibilityState"in i){n.on(i,"visibilitychange",n.handleVisibilityChange)}return n}var r=t.prototype;r.handleVisibilityChange=function e(){if(this.player_.duration()!==Infinity){return}if(i.hidden){this.stopTracking()}else{this.startTracking()}};r.isBehind_=function e(){if(!this.timeupdateSeen_){return false}var t=this.liveCurrentTime();var i=this.player_.currentTime();var r=this.seekableIncrement_*2+.07;return t!==Infinity&&t-r>=i};r.trackLive_=function e(){this.pastSeekEnd_=this.pastSeekEnd_;var t=this.player_.seekable();if(!t||!t.length){return}var i=this.seekableEnd();if(i!==this.lastSeekEnd_){if(this.lastSeekEnd_){this.seekableIncrementList_=this.seekableIncrementList_.slice(-11);this.seekableIncrementList_.push(Math.abs(i-this.lastSeekEnd_));if(this.seekableIncrementList_.length>3){this.seekableIncrement_=Vn(this.seekableIncrementList_)}}this.pastSeekEnd_=0;this.lastSeekEnd_=i;this.trigger("seekableendchange")}if(this.pastSeekEnd()>this.seekableIncrement_*1.5){this.pastSeekEnd_=0}else{this.pastSeekEnd_=this.pastSeekEnd()+.03}if(this.isBehind_()!==this.behindLiveEdge()){this.behindLiveEdge_=this.isBehind_();this.trigger("liveedgechange")}};r.handleDurationchange=function e(){if(this.player_.duration()===Infinity){this.startTracking()}else{this.stopTracking()}};r.startTracking=function e(){var t=this;if(this.isTracking()){return}if(!this.timeupdateSeen_){this.timeupdateSeen_=this.player_.hasStarted()}this.trackingInterval_=this.setInterval(this.trackLive_,Se);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)}};r.handlePlay=function e(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)};r.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.seekableIncrementList_=[];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}};r.stopTracking=function e(){if(!this.isTracking()){return}this.reset_()};r.seekableEnd=function e(){var t=this.player_.seekable();var i=[];var r=t?t.length:0;while(r--){i.push(t.end(r))}return i.length?i.sort()[i.length-1]:Infinity};r.seekableStart=function e(){var t=this.player_.seekable();var i=[];var r=t?t.length:0;while(r--){i.push(t.start(r))}return i.length?i.sort()[0]:0};r.liveWindow=function e(){var t=this.liveCurrentTime();if(t===Infinity){return Infinity}return t-this.seekableStart()};r.isLive=function e(){return this.isTracking()};r.atLiveEdge=function e(){return!this.behindLiveEdge()};r.liveCurrentTime=function e(){return this.pastSeekEnd()+this.seekableEnd()};r.pastSeekEnd=function e(){return this.pastSeekEnd_};r.behindLiveEdge=function e(){return this.behindLiveEdge_};r.isTracking=function e(){return typeof this.trackingInterval_==="number"};r.seekToLiveEdge=function e(){if(this.atLiveEdge()){return}this.player_.currentTime(this.liveCurrentTime());if(this.player_.paused()){this.player_.play()}};r.dispose=function t(){this.stopTracking();e.prototype.dispose.call(this)};return t}(We);We.registerComponent("LiveTracker",qn);var Wn=function e(t){var i=t.el();if(i.hasAttribute("src")){t.triggerSourceset(i.src);return true}var r=t.$$("source");var n=[];var a="";if(!r.length){return false}for(var s=0;s<r.length;s++){var o=r[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 zn=Object.defineProperty({},"innerHTML",{get:function e(){return this.cloneNode(true).innerHTML},set:function e(r){var n=i.createElement(this.nodeName.toLowerCase());n.innerHTML=r;var a=i.createDocumentFragment();while(n.childNodes.length){a.appendChild(n.childNodes[0])}this.innerText="";t.Element.prototype.appendChild.call(this,a);return this.innerHTML}});var Gn=function e(t,i){var r={};for(var n=0;n<t.length;n++){r=Object.getOwnPropertyDescriptor(t[n],i);if(r&&r.set&&r.get){break}}r.enumerable=true;r.configurable=true;return r};var Yn=function e(i){return Gn([i.el(),t.HTMLMediaElement.prototype,t.Element.prototype,zn],"innerHTML")};var Kn=function e(t){var i=t.el();if(i.resetSourceWatch_){return}var r={};var n=Yn(t);var a=function e(r){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}var s=r.apply(i,n);Wn(t);return s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){if(!i[e]){return}r[e]=i[e];i[e]=a(r[e])});Object.defineProperty(i,"innerHTML",qe(n,{set:a(n.set)}));i.resetSourceWatch_=function(){i.resetSourceWatch_=null;Object.keys(r).forEach(function(e){i[e]=r[e]});Object.defineProperty(i,"innerHTML",n)};t.one("sourceset",i.resetSourceWatch_)};var Xn=Object.defineProperty({},"src",{get:function e(){if(this.hasAttribute("src")){return si(t.Element.prototype.getAttribute.call(this,"src"))}return""},set:function e(i){t.Element.prototype.setAttribute.call(this,"src",i);return i}});var Jn=function e(i){return Gn([i.el(),t.HTMLMediaElement.prototype,Xn],"src")};var Qn=function e(t){if(!t.featuresSourceset){return}var i=t.el();if(i.resetSourceset_){return}var r=Jn(t);var n=i.setAttribute;var a=i.load;Object.defineProperty(i,"src",qe(r,{set:function e(n){var a=r.set.call(i,n);t.triggerSourceset(i.src);return a}}));i.setAttribute=function(e,r){var a=n.call(i,e,r);if(/src/i.test(e)){t.triggerSourceset(i.src)}return a};i.load=function(){var e=a.call(i);if(!Wn(t)){t.triggerSourceset("");Kn(t)}return e};if(i.currentSrc){t.triggerSourceset(i.currentSrc)}else if(!Wn(t)){Kn(t)}i.resetSourceset_=function(){i.resetSourceset_=null;i.load=a;i.setAttribute=n;Object.defineProperty(i,"src",r);
1if(i.resetSourceWatch_){i.resetSourceWatch_()}}};var Zn=function e(t,i,r,n){if(n===void 0){n=true}var a=function e(r){return Object.defineProperty(t,i,{value:r,enumerable:true,writable:true})};var s={configurable:true,enumerable:true,get:function e(){var t=r();a(t);return t}};if(n){s.set=a}return Object.defineProperty(t,i,s)};var $n=function(e){Ke(r,e);function r(t,i){var r;r=e.call(this,t,i)||this;var n=t.source;var a=false;if(n&&(r.el_.currentSrc!==n.src||t.tag&&t.tag.initNetworkState_===3)){r.setSource(n)}else{r.handleLateInit_(r.el_)}if(t.enableSourceset){r.setupSourcesetHandling_()}if(r.el_.hasChildNodes()){var s=r.el_.childNodes;var l=s.length;var u=[];while(l--){var c=s[l];var d=c.nodeName.toLowerCase();if(d==="track"){if(!r.featuresNativeTextTracks){u.push(c)}else{r.remoteTextTrackEls().addTrackElement_(c);r.remoteTextTracks().addTrack(c.track);r.textTracks().addTrack(c.track);if(!a&&!r.el_.hasAttribute("crossorigin")&&li(c.src)){a=true}}}}for(var f=0;f<u.length;f++){r.el_.removeChild(u[f])}}r.proxyNativeTracks_();if(r.featuresNativeTextTracks&&a){o.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n"+"This may prevent text tracks from loading.")}r.restoreMetadataTracksInIOSNativePlayer_();if((ct||ft||it)&&t.nativeControlsForTouch===true){r.setControls(true)}r.proxyWebkitFullscreen_();r.triggerReady();return r}var n=r.prototype;n.dispose=function t(){if(this.el_&&this.el_.resetSourceset_){this.el_.resetSourceset_()}r.disposeMediaElement(this.el_);this.options_=null;e.prototype.dispose.call(this)};n.setupSourcesetHandling_=function e(){Qn(this)};n.restoreMetadataTracksInIOSNativePlayer_=function e(){var t=this.textTracks();var i;var r=function e(){i=[];for(var r=0;r<t.length;r++){var n=t[r];if(n.kind==="metadata"){i.push({track:n,storedMode:n.mode})}}};r();t.addEventListener("change",r);this.on("dispose",function(){return t.removeEventListener("change",r)});var n=function e(){for(var r=0;r<i.length;r++){var n=i[r];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",r);t.removeEventListener("change",n);t.addEventListener("change",n)});this.on("webkitendfullscreen",function(){t.removeEventListener("change",r);t.addEventListener("change",r);t.removeEventListener("change",n)})};n.overrideNative_=function e(t,i){var r=this;if(i!==this["featuresNative"+t+"Tracks"]){return}var n=t.toLowerCase();if(this[n+"TracksListeners_"]){Object.keys(this[n+"TracksListeners_"]).forEach(function(e){var t=r.el()[n+"Tracks"];t.removeEventListener(e,r[n+"TracksListeners_"][e])})}this["featuresNative"+t+"Tracks"]=!i;this[n+"TracksListeners_"]=null;this.proxyNativeTracksForType_(n)};n.overrideNativeAudioTracks=function e(t){this.overrideNative_("Audio",t)};n.overrideNativeVideoTracks=function e(t){this.overrideNative_("Video",t)};n.proxyNativeTracksForType_=function e(t){var i=this;var r=Di[t];var n=this.el()[r.getterName];var a=this[r.getterName]();if(!this["featuresNative"+r.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 i=0;i<a.length;i++){var r=false;for(var s=0;s<n.length;s++){if(n[s]===a[i]){r=true;break}}if(!r){t.push(a[i])}}while(t.length){a.removeTrack(t.shift())}};this[r.getterName+"Listeners_"]=s;Object.keys(s).forEach(function(e){var t=s[e];n.addEventListener(e,t);i.on("dispose",function(i){return n.removeEventListener(e,t)})});this.on("loadstart",o);this.on("dispose",function(e){return i.off("loadstart",o)})};n.proxyNativeTracks_=function e(){var t=this;Di.names.forEach(function(e){t.proxyNativeTracksForType_(e)})};n.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)}r.disposeMediaElement(t);t=n}else{t=i.createElement("video");var a=this.options_.tag&&R(this.options_.tag);var s=qe({},a);if(!ct||this.options_.nativeControlsForTouch!==true){delete s.controls}D(t,v(s,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}if(typeof this.options_.preload!=="undefined"){N(t,"preload",this.options_.preload)}var o=["loop","muted","playsinline","autoplay"];for(var l=0;l<o.length;l++){var u=o[l];var c=this.options_[u];if(typeof c!=="undefined"){if(c){N(t,u,u)}else{U(t,u)}t[u]=c}}return t};n.handleLateInit_=function e(t){if(t.networkState===0||t.networkState===3){return}if(t.readyState===0){var i=false;var r=function e(){i=true};this.on("loadstart",r);var n=function e(){if(!i){this.trigger("loadstart")}};this.on("loadedmetadata",n);this.ready(function(){this.off("loadstart",r);this.off("loadedmetadata",n);if(!i){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)})};n.setCurrentTime=function e(t){try{this.el_.currentTime=t}catch(e){o(e,"Video is not ready. (Video.js)")}};n.duration=function e(){var t=this;if(this.el_.duration===Infinity&&et&&at&&this.el_.currentTime===0){var i=function e(){if(t.el_.currentTime>0){if(t.el_.duration===Infinity){t.trigger("durationchange")}t.off("timeupdate",e)}};this.on("timeupdate",i);return NaN}return this.el_.duration||NaN};n.width=function e(){return this.el_.offsetWidth};n.height=function e(){return this.el_.offsetHeight};n.proxyWebkitFullscreen_=function e(){var t=this;if(!("webkitDisplayingFullscreen"in this.el_)){return}var i=function e(){this.trigger("fullscreenchange",{isFullscreen:false})};var r=function e(){if("webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"){this.one("webkitendfullscreen",i);this.trigger("fullscreenchange",{isFullscreen:true})}};this.on("webkitbeginfullscreen",r);this.on("dispose",function(){t.off("webkitbeginfullscreen",r);t.off("webkitendfullscreen",i)})};n.supportsFullScreen=function e(){if(typeof this.el_.webkitEnterFullScreen==="function"){var i=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(i)||!/Chrome|Mac OS X 10.5/.test(i)){return true}}return false};n.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()}};n.exitFullScreen=function e(){this.el_.webkitExitFullScreen()};n.requestPictureInPicture=function e(){return this.el_.requestPictureInPicture()};n.src=function e(t){if(t===undefined){return this.el_.src}this.setSrc(t)};n.reset=function e(){r.resetMediaElement(this.el_)};n.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.currentSrc};n.setControls=function e(t){this.el_.controls=!!t};n.addTextTrack=function t(i,r,n){if(!this.featuresNativeTextTracks){return e.prototype.addTextTrack.call(this,i,r,n)}return this.el_.addTextTrack(i,r,n)};n.createRemoteTextTrack=function t(r){if(!this.featuresNativeTextTracks){return e.prototype.createRemoteTextTrack.call(this,r)}var n=i.createElement("track");if(r.kind){n.kind=r.kind}if(r.label){n.label=r.label}if(r.language||r.srclang){n.srclang=r.language||r.srclang}if(r["default"]){n["default"]=r["default"]}if(r.id){n.id=r.id}if(r.src){n.src=r.src}return n};n.addRemoteTextTrack=function t(i,r){var n=e.prototype.addRemoteTextTrack.call(this,i,r);if(this.featuresNativeTextTracks){this.el().appendChild(n)}return n};n.removeRemoteTextTrack=function t(i){e.prototype.removeRemoteTextTrack.call(this,i);if(this.featuresNativeTextTracks){var r=this.$$("track");var n=r.length;while(n--){if(i===r[n]||i===r[n].track){this.el().removeChild(r[n])}}}};n.getVideoPlaybackQuality=function e(){if(typeof this.el().getVideoPlaybackQuality==="function"){return this.el().getVideoPlaybackQuality()}var i={};if(typeof this.el().webkitDroppedFrameCount!=="undefined"&&typeof this.el().webkitDecodedFrameCount!=="undefined"){i.droppedVideoFrames=this.el().webkitDroppedFrameCount;i.totalVideoFrames=this.el().webkitDecodedFrameCount}if(t.performance&&typeof t.performance.now==="function"){i.creationTime=t.performance.now()}else if(t.performance&&t.performance.timing&&typeof t.performance.timing.navigationStart==="number"){i.creationTime=t.Date.now()-t.performance.timing.navigationStart}return i};return r}(Mi);Zn($n,"TEST_VID",function(){if(!S()){return}var e=i.createElement("video");var t=i.createElement("track");t.kind="captions";t.srclang="en";t.label="English";e.appendChild(t);return e});$n.isSupported=function(){try{$n.TEST_VID.volume=.5}catch(e){return false}return!!($n.TEST_VID&&$n.TEST_VID.canPlayType)};$n.canPlayType=function(e){return $n.TEST_VID.canPlayType(e)};$n.canPlaySource=function(e,t){return $n.canPlayType(e.type)};$n.canControlVolume=function(){try{var e=$n.TEST_VID.volume;$n.TEST_VID.volume=e/2+.1;return e!==$n.TEST_VID.volume}catch(e){return false}};$n.canMuteVolume=function(){try{var e=$n.TEST_VID.muted;$n.TEST_VID.muted=!e;if($n.TEST_VID.muted){N($n.TEST_VID,"muted","muted")}else{U($n.TEST_VID,"muted","muted")}return e!==$n.TEST_VID.muted}catch(e){return false}};$n.canControlPlaybackRate=function(){if(et&&at&&st<58){return false}try{var e=$n.TEST_VID.playbackRate;$n.TEST_VID.playbackRate=e/2+.1;return e!==$n.TEST_VID.playbackRate}catch(e){return false}};$n.canOverrideAttributes=function(){try{var e=function e(){};Object.defineProperty(i.createElement("video"),"src",{get:e,set:e});Object.defineProperty(i.createElement("audio"),"src",{get:e,set:e});Object.defineProperty(i.createElement("video"),"innerHTML",{get:e,set:e});Object.defineProperty(i.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return false}return true};$n.supportsNativeTextTracks=function(){return pt||ht&&at};$n.supportsNativeVideoTracks=function(){return!!($n.TEST_VID&&$n.TEST_VID.videoTracks)};$n.supportsNativeAudioTracks=function(){return!!($n.TEST_VID&&$n.TEST_VID.audioTracks)};$n.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
1h(function(e){var t=e[0],i=e[1];Zn($n.prototype,t,function(){return $n[i]()},true)});$n.prototype.movingMediaElementInDOM=!ht;$n.prototype.featuresFullscreenResize=true;$n.prototype.featuresProgressEvents=true;$n.prototype.featuresTimeupdateEvents=true;var ea;$n.patchCanPlayType=function(){if(tt>=4&&!rt&&!at){ea=$n.TEST_VID&&$n.TEST_VID.constructor.prototype.canPlayType;$n.TEST_VID.constructor.prototype.canPlayType=function(e){var t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;if(e&&t.test(e)){return"maybe"}return ea.call(this,e)}}};$n.unpatchCanPlayType=function(){var e=$n.TEST_VID.constructor.prototype.canPlayType;if(ea){$n.TEST_VID.constructor.prototype.canPlayType=ea}return e};$n.patchCanPlayType();$n.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){}})()}};$n.resetMediaElement=function(e){if(!e){return}var t=e.querySelectorAll("source");var i=t.length;while(i--){e.removeChild(t[i])}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){$n.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){$n.prototype["set"+He(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){$n.prototype[e]=function(){return this.el_[e]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){$n.prototype["set"+He(e)]=function(t){this.el_[e]=t}});["pause","load","play"].forEach(function(e){$n.prototype[e]=function(){return this.el_[e]()}});Mi.withSourceHandlers($n);$n.nativeSourceHandler={};$n.nativeSourceHandler.canPlayType=function(e){try{return $n.TEST_VID.canPlayType(e)}catch(e){return""}};$n.nativeSourceHandler.canHandleSource=function(e,t){if(e.type){return $n.nativeSourceHandler.canPlayType(e.type)}else if(e.src){var i=oi(e.src);return $n.nativeSourceHandler.canPlayType("video/"+i)}return""};$n.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)};$n.nativeSourceHandler.dispose=function(){};$n.registerSourceHandler($n.nativeSourceHandler);Mi.registerTech("Html5",$n);var ta=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"];var ia={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"};var ra=["tiny","xsmall","small","medium","large","xlarge","huge"];var na={};ra.forEach(function(e){var t=e.charAt(0)==="x"?"x-"+e.substring(1):e;na[e]="vjs-layout-"+t});var aa={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity};var sa=function(e){Ke(n,e);function n(t,a,s){var o;t.id=t.id||a.id||"vjs_video_"+oe();a=v(n.getTagSettings(t),a);a.initChildren=false;a.createEl=false;a.evented=false;a.reportTouchActivity=false;if(!a.language){if(typeof t.closest==="function"){var u=t.closest("[lang]");if(u&&u.getAttribute){a.language=u.getAttribute("lang")}}else{var c=t;while(c&&c.nodeType===1){if(R(c).hasOwnProperty("lang")){a.language=c.getAttribute("lang");break}c=c.parentNode}}}o=e.call(this,null,a,s)||this;o.boundDocumentFullscreenChange_=je(Ge(o),o.documentFullscreenChange_);o.boundFullWindowOnEscKey_=je(Ge(o),o.fullWindowOnEscKey);o.isFullscreen_=false;o.log=l(o.id_);o.fsApi_=Tt;o.isPosterFromTech_=false;o.queuedCallbacks_=[];o.isReady_=false;o.hasStarted_=false;o.userActive_=false;if(!o.options_||!o.options_.techOrder||!o.options_.techOrder.length){throw new Error("No techOrder specified. Did you overwrite "+"videojs.options instead of just changing the "+"properties you want to override?")}o.tag=t;o.tagAttributes=t&&R(t);o.language(o.options_.language);if(a.languages){var d={};
1Object.getOwnPropertyNames(a.languages).forEach(function(e){d[e.toLowerCase()]=a.languages[e]});o.languages_=d}else{o.languages_=n.prototype.options_.languages}o.resetCache_();o.poster_=a.poster||"";o.controls_=!!a.controls;t.controls=false;t.removeAttribute("controls");o.changingSrc_=false;o.playCallbacks_=[];o.playTerminatedQueue_=[];if(t.hasAttribute("autoplay")){o.autoplay(true)}else{o.autoplay(o.options_.autoplay)}if(a.plugins){Object.keys(a.plugins).forEach(function(e){if(typeof o[e]!=="function"){throw new Error('plugin "'+e+'" does not exist')}})}o.scrubbing_=false;o.el_=o.createEl();Ue(Ge(o),{eventBusKey:"el_"});if(o.fsApi_.requestFullscreen){me(i,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_);o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)}if(o.fluid_){o.on("playerreset",o.updateStyleEl_)}var f=qe(o.options_);if(a.plugins){Object.keys(a.plugins).forEach(function(e){o[e](a.plugins[e])})}o.options_.playerOptions=f;o.middleware_=[];o.initChildren();o.isAudio(t.nodeName.toLowerCase()==="audio");if(o.controls()){o.addClass("vjs-controls-enabled")}else{o.addClass("vjs-controls-disabled")}o.el_.setAttribute("role","region");if(o.isAudio()){o.el_.setAttribute("aria-label",o.localize("Audio Player"))}else{o.el_.setAttribute("aria-label",o.localize("Video Player"))}if(o.isAudio()){o.addClass("vjs-audio")}if(o.flexNotSupported_()){o.addClass("vjs-no-flex")}if(ct){o.addClass("vjs-touch-enabled")}if(!ht){o.addClass("vjs-workinghover")}n.players[o.id_]=Ge(o);var h=r.split(".")[0];o.addClass("vjs-v"+h);o.userActive(true);o.reportUserActivity();o.one("play",o.listenForUserActivity_);o.on("stageclick",o.handleStageClick_);o.on("keydown",o.handleKeyDown);o.breakpoints(o.options_.breakpoints);o.responsive(o.options_.responsive);return o}var a=n.prototype;a.dispose=function t(){var r=this;this.trigger("dispose");this.off("dispose");ge(i,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);ge(i,"keydown",this.boundFullWindowOnEscKey_);if(this.styleEl_&&this.styleEl_.parentNode){this.styleEl_.parentNode.removeChild(this.styleEl_);this.styleEl_=null}n.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}$i(this);Li.names.forEach(function(e){var t=Li[e];var i=r[t.getterName]();if(i&&i.off){i.off()}});e.prototype.dispose.call(this)};a.createEl=function r(){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 l=R(n);if(o){a=this.el_=n;n=this.tag=i.createElement("video");while(a.children.length){n.appendChild(a.firstChild)}if(!A(a,"video-js")){x(a,"video-js")}a.appendChild(n);s=this.playerElIngest_=a;Object.keys(a).forEach(function(e){try{n[e]=a[e]}catch(e){}})}n.setAttribute("tabindex","-1");l.tabindex="-1";if(ot||at&&ut){n.setAttribute("role","application");l.role="application"}n.removeAttribute("width");n.removeAttribute("height");if("width"in l){delete l.width}if("height"in l){delete l.height}Object.getOwnPropertyNames(l).forEach(function(e){if(!(o&&e==="class")){a.setAttribute(e,l[e])}if(o){n.setAttribute(e,l[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_=re("vjs-styles-dimensions");var u=X(".vjs-styles-defaults");var c=X("head");c.insertBefore(this.styleEl_,u?u.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 d=n.getElementsByTagName("a");for(var f=0;f<d.length;f++){var h=d.item(f);x(h,"vjs-hidden");h.setAttribute("hidden","hidden")}n.initNetworkState_=n.networkState;if(n.parentNode&&!s){n.parentNode.insertBefore(a,n)}I(n,a);this.children_.unshift(n);this.el_.setAttribute("lang",this.language_);this.el_=a;return a};a.width=function e(t){return this.dimension("width",t)};a.height=function e(t){return this.dimension("height",t)};a.dimension=function e(t,i){var r=t+"_";if(i===undefined){return this[r]||0}if(i===""||i==="auto"){this[r]=undefined;this.updateStyleEl_();return}var n=parseFloat(i);if(isNaN(n)){o.error('Improper value "'+i+'" supplied for for '+t);return}this[r]=n;this.updateStyleEl_()};a.fluid=function e(t){if(t===undefined){return!!this.fluid_}this.fluid_=!!t;if(Ie(this)){this.off("playerreset",this.updateStyleEl_)}if(t){this.addClass("vjs-fluid");this.fill(false);Ae(function(){this.on("playerreset",this.updateStyleEl_)})}else{this.removeClass("vjs-fluid")}this.updateStyleEl_()};a.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")}};a.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_()};a.updateStyleEl_=function e(){if(t.VIDEOJS_NO_DYNAMIC_STYLE===true){var i=typeof this.width_==="number"?this.width_:this.options_.width;var r=typeof this.height_==="number"?this.height_:this.options_.height;var n=this.tech_&&this.tech_.el();if(n){if(i>=0){n.width=i}if(r>=0){n.height=r}}return}var a;var s;var o;var l;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 u=o.split(":");var c=u[1]/u[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())){l="dimensions-"+this.id()}else{l=this.id()+"-dimensions"}this.addClass(l);
1ne(this.styleEl_,"\n ."+l+" {\n width: "+a+"px;\n height: "+s+"px;\n }\n\n ."+l+".vjs-fluid {\n padding-top: "+c*100+"%;\n }\n ")};a.loadTech_=function e(t,i){var r=this;if(this.tech_){this.unloadTech_()}var n=He(t);var a=t.charAt(0).toLowerCase()+t.slice(1);if(n!=="Html5"&&this.tag){Mi.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:i,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,Promise:this.options_.Promise};Li.names.forEach(function(e){var t=Li[e];o[t.getterName]=r[t.privateName]});v(o,this.options_[n]);v(o,this.options_[a]);v(o,this.options_[t.toLowerCase()]);if(this.tag){o.tag=this.tag}if(i&&i.src===this.cache_.src&&this.cache_.currentTime>0){o.startTime=this.cache_.currentTime}var l=Mi.getTech(t);if(!l){throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'")}this.tech_=new l(o);this.tech_.ready(je(this,this.handleTechReady_),true);Nt.jsonToTextTracks(this.textTracksJson_||[],this.tech_);ta.forEach(function(e){r.on(r.tech_,e,r["handleTech"+He(e)+"_"])});Object.keys(ia).forEach(function(e){r.on(r.tech_,e,function(t){if(r.tech_.playbackRate()===0&&r.tech_.seeking()){r.queuedCallbacks_.push({callback:r["handleTech"+ia[e]+"_"].bind(r),event:t});return}r["handleTech"+ia[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_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_);this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_);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)){I(this.tech_.el(),this.el())}if(this.tag){this.tag.player=null;this.tag=null}};a.unloadTech_=function e(){var t=this;Li.names.forEach(function(e){var i=Li[e];t[i.privateName]=t[i.getterName]()});this.textTracksJson_=Nt.textTracksToJson(this.tech_);this.isReady_=false;this.tech_.dispose();this.tech_=false;if(this.isPosterFromTech_){this.poster_="";this.trigger("posterchange")}this.isPosterFromTech_=false};a.tech=function e(t){if(t===undefined){o.warn("Using the tech directly can be dangerous. I hope you know
1what you're doing.\n"+"See https://github.com/videojs/video.js/issues/2617 for more info.\n")}return this.tech_};a.addTechControlsListeners_=function e(){this.removeTechControlsListeners_();this.on(this.tech_,"mouseup",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_)};a.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_,"mouseup",this.handleTechClick_);this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)};a.handleTechReady_=function e(){this.triggerReady();if(this.cache_.volume){this.techCall_("setVolume",this.cache_.volume)}this.handleTechPosterChange_();this.handleTechDurationChange_()};a.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())};a.manualAutoplay_=function e(t){var i=this;if(!this.tech_||typeof t!=="string"){return}var r=function e(){var t=i.muted();i.muted(true);var r=function e(){i.muted(t)};i.playTerminatedQueue_.push(r);var n=i.play();if(!Ot(n)){return}return n["catch"](r)};var n;if(t==="any"&&this.muted()!==true){n=this.play();if(Ot(n)){n=n["catch"](r)}}else if(t==="muted"&&this.muted()!==true){n=r()}else{n=this.play()}if(!Ot(n)){return}return n.then(function(){i.trigger({type:"autoplay-success",autoplay:t})})["catch"](function(e){i.trigger({type:"autoplay-failure",autoplay:t})})};a.updateSourceCaches_=function e(t){if(t===void 0){t=""}var i=t;var r="";if(typeof i!=="string"){i=t.src;r=t.type}this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];if(i&&!r){r=nr(this,i)}this.cache_.source=qe({},t,{src:i,type:r});var n=this.cache_.sources.filter(function(e){return e.src&&e.src===i});var a=[];var s=this.$$("source");var o=[];for(var l=0;l<s.length;l++){var u=R(s[l]);a.push(u);if(u.src&&u.src===i){o.push(u.src)}}if(o.length&&!n.length){this.cache_.sources=a}else if(!n.length){this.cache_.sources=[this.cache_.source]}this.cache_.src=i};a.handleTechSourceset_=function e(t){var i=this;if(!this.changingSrc_){var r=function e(t){return i.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){r=function e(){}}}r(a);if(!t.src){this.tech_.any(["sourceset","loadstart"],function(e){if(e.type==="sourceset"){return}var t=i.techGet("currentSrc");i.lastSource_.tech=t;i.updateSourceCaches_(t)})}}this.lastSource_={player:this.currentSource().src,tech:t.src};this.trigger({src:t.src,type:"sourceset"})};a.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")}};a.handleTechPlay_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(true);this.trigger("play")};a.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")};a.handleTechWaiting_=function e(){var t=this;this.addClass("vjs-waiting");this.trigger("waiting");var i=this.currentTime();var r=function e(){if(i!==t.currentTime()){t.removeClass("vjs-waiting");t.off("timeupdate",e)}};this.on("timeupdate",r)};a.handleTechCanPlay_=function e(){this.removeClass("vjs-waiting");this.trigger("canplay")};a.handleTechCanPlayThrough_=function e(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};a.handleTechPlaying_=function e(){this.removeClass("vjs-waiting");this.trigger("playing")};a.handleTechSeeking_=function e(){this.addClass("vjs-seeking");this.trigger("seeking")};a.handleTechSeeked_=function e(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")};a.handleTechFirstPlay_=function e(){if(this.options_.starttime){o.warn("Passing the `starttime` option to the player will be deprecated
1in 6.0");this.currentTime(this.options_.starttime)}this.addClass("vjs-has-started");this.trigger("firstplay")};a.handleTechPause_=function e(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")};a.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")};a.handleTechDurationChange_=function e(){this.duration(this.techGet_("duration"))};a.handleTechClick_=function e(t){if(!K(t)){return}if(!this.controls_){return}if(this.paused()){Pt(this.play())}else{this.pause()}};a.handleTechDoubleClick_=function e(t){if(!this.controls_){return}var i=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)});if(!i){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()}}}};a.handleTechTap_=function e(){this.userActive(!this.userActive())};a.handleTechTouchStart_=function e(){this.userWasActive=this.userActive()};a.handleTechTouchMove_=function e(){if(this.userWasActive){this.reportUserActivity()}};a.handleTechTouchEnd_=function e(t){t.preventDefault()};a.handleStageClick_=function e(){this.reportUserActivity()};a.toggleFullscreenClass_=function e(){if(this.isFullscreen()){this.addClass("vjs-fullscreen")}else{this.removeClass("vjs-fullscreen")}};a.documentFullscreenChange_=function e(t){var r=t.target.player;if(r&&r!==this){return}var n=this.el();var a=i[this.fsApi_.fullscreenElement]===n;if(!a&&n.matches){a=n.matches(":"+this.fsApi_.fullscreen)}else if(!a&&n.msMatchesSelector){a=n.msMatchesSelector(":"+this.fsApi_.fullscreen)}this.isFullscreen(a)};a.handleTechFullscreenChange_=function e(t,i){if(i){this.isFullscreen(i.isFullscreen)}};a.togglePictureInPictureClass_=function e(){if(this.isInPictureInPicture()){this.addClass("vjs-picture-in-picture")}else{this.removeClass("vjs-picture-in-picture")}};a.handleTechEnterPictureInPicture_=function e(t){this.isInPictureInPicture(true)};a.handleTechLeavePictureInPicture_=function e(t){this.isInPictureInPicture(false)};a.handleTechError_=function e(){var t=this.tech_.error();this.error(t)};a.handleTechTextData_=function e(){var t=null;if(arguments.length>1){t=arguments[1]}this.trigger("textdata",t)};a.getCache=function e(){return this.cache_};a.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}};a.techCall_=function e(t,i){this.ready(function(){if(t in Xi){return Gi(this.middleware_,this.tech_,t,i)}else if(t in Ji){return Yi(this.middleware_,this.tech_,t,i)}try{if(this.tech_){this.tech_[t](i)}}catch(e){o(e);throw e}},true)};a.techGet_=function e(t){if(!this.tech_||!this.tech_.isReady_){return}if(t in Ki){return zi(this.middleware_,this.tech_,t)}else if(t in Ji){return Yi(this.middleware_,this.tech_,t)}try{return this.tech_[t]()}catch(e){if(this.tech_[t]===undefined){o("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e);throw e}if(e.name==="TypeError"){o("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e);this.tech_.isReady_=false;throw e}o(e);throw e}};a.play=function e(){var i=this;var r=this.options_.Promise||t.Promise;if(r){return new r(function(e){i.play_(e)})}return this.play_()};a.play_=function e(t){var i=this;if(t===void 0){t=Pt}this.playCallbacks_.push(t);var r=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_){this.off(["ready","loadstart"],this.waitToPlay_);this.waitToPlay_=null}if(!this.isReady_||!r){this.waitToPlay_=function(e){i.play_()};this.one(["ready","loadstart"],this.waitToPlay_);if(!r&&(pt||ht)){this.load()}return}var n=this.techGet_("play");
1if(n===null){this.runPlayTerminatedQueue_()}else{this.runPlayCallbacks_(n)}};a.runPlayTerminatedQueue_=function e(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];t.forEach(function(e){e()})};a.runPlayCallbacks_=function e(t){var i=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];i.forEach(function(e){e(t)})};a.pause=function e(){this.techCall_("pause")};a.paused=function e(){return this.techGet_("paused")===false?false:true};a.played=function e(){return this.techGet_("played")||_t(0,0)};a.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")}};a.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};a.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")}}};a.remainingTime=function e(){return this.duration()-this.currentTime()};a.remainingTimeDisplay=function e(){return Math.floor(this.duration())-Math.floor(this.currentTime())};a.buffered=function e(){var e=this.techGet_("buffered");if(!e||!e.length){e=_t(0,0)}return e};a.bufferedPercent=function e(){return bt(this.buffered(),this.duration())};a.bufferedEnd=function e(){var t=this.buffered();var i=this.duration();var r=t.end(t.length-1);if(r>i){r=i}return r};a.volume=function e(t){var i;if(t!==undefined){i=Math.max(0,Math.min(1,parseFloat(t)));this.cache_.volume=i;this.techCall_("setVolume",i);if(i>0){this.lastVolume_(i)}return}i=parseFloat(this.techGet_("volume"));return isNaN(i)?1:i};a.muted=function e(t){if(t!==undefined){this.techCall_("setMuted",t);return}return this.techGet_("muted")||false};a.defaultMuted=function e(t){if(t!==undefined){return this.techCall_("setDefaultMuted",t)}return this.techGet_("defaultMuted")||false};a.lastVolume_=function e(t){if(t!==undefined&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume};a.supportsFullScreen=function e(){return this.techGet_("supportsFullScreen")||false};a.isFullscreen=function e(t){if(t!==undefined){var i=this.isFullscreen_;this.isFullscreen_=Boolean(t);if(this.isFullscreen_!==i&&this.fsApi_.prefixed){this.trigger("fullscreenchange")}this.toggleFullscreenClass_();return}return this.isFullscreen_};a.requestFullscreen=function e(t){var i=this;var r;if(!this.fsApi_.prefixed){r=this.options_.fullscreen&&this.options_.fullscreen.options||{};if(t!==undefined){r=t}}if(this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](r);if(n){n.then(function(){return i.isFullscreen(true)},function(){return i.isFullscreen(false)})}return n}else if(this.tech_.supportsFullScreen()){this.techCall_("enterFullScreen")}else{this.enterFullWindow()}};a.exitFullscreen=function e(){var t=this;if(this.fsApi_.requestFullscreen){var r=i[this.fsApi_.exitFullscreen]();if(r){r.then(function(){return t.isFullscreen(false)})}return r}else if(this.tech_.supportsFullScreen()){this.techCall_("exitFullScreen")}else{this.exitFullWindow()}};a.enterFullWindow=function e(){this.isFullscreen(true);this.isFullWindow=true;this.docOrigOverflow=i.documentElement.style.overflow;me(i,"keydown",this.boundFullWindowOnEscKey_);i.documentElement.style.overflow="hidden";x(i.body,"vjs-full-window");this.trigger("enterFullWindow")};a.fullWindowOnEscKey=function e(t){if(Ut.isEventKey(t,"Esc")){if(this.isFullscreen()===true){this.exitFullscreen()}else{this.exitFullWindow()}}};a.exitFullWindow=function e(){this.isFullscreen(false);this.isFullWindow=false;ge(i,"keydown",this.boundFullWindowOnEscKey_);i.documentElement.style.overflow=this.docOrigOverflow;O(i.body,"vjs-full-window");this.trigger("exitFullWindow")};a.isInPictureInPicture=function e(t){if(t!==undefined){this.isInPictureInPicture_=!!t;this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_};a.requestPictureInPicture=function e(){if("pictureInPictureEnabled"in i){return this.techGet_("requestPictureInPicture")}};a.exitPictureInPicture=function e(){if("pictureInPictureEnabled"in i){return i.exitPictureInPicture()}};a.handleKeyDown=function e(t){var i=this.options_.userActions;if(!i||!i.hotkeys){return}var r=function e(t){var i=t.tagName.toLowerCase();if(t.isContentEditable){return true}var r=["button","checkbox","hidden","radio","reset","submit"];if(i==="input"){return r.indexOf(t.type)===-1}var n=["textarea"];return n.indexOf(i)!==-1};if(r(this.el_.ownerDocument.activeElement)){return}if(typeof i.hotkeys==="function"){i.hotkeys.call(this,t)}else{this.handleHotkeys(t)}};a.handleHotkeys=function e(t){var r=this.options_.userActions?this.options_.userActions.hotkeys:{};var n=r.fullscreenKey,a=n===void 0?function(e){return Ut.isEventKey(e,"f")}:n,s=r.muteKey,o=s===void 0?function(e){return Ut.isEventKey(e,"m")}:s,l=r.playPauseKey,u=l===void 0?function(e){return Ut.isEventKey(e,"k")||Ut.isEventKey(e,"Space")}:l;if(a.call(this,t)){t.preventDefault();t.stopPropagation();var c=We.getComponent("FullscreenToggle");if(i[this.fsApi_.fullscreenEnabled]!==false){c.prototype.handleClick.call(this,t)}}else if(o.call(this,t)){t.preventDefault();t.stopPropagation();var d=We.getComponent("MuteToggle");d.prototype.handleClick.call(this,t)}else if(u.call(this,t)){t.preventDefault();t.stopPropagation();var f=We.getComponent("PlayToggle");f.prototype.handleClick.call(this,t)}};a.canPlayType=function e(t){var i;for(var r=0,n=this.options_.techOrder;r<n.length;r++){var a=n[r];var s=Mi.getTech(a);if(!s){s=We.getComponent(a)}if(!s){o.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');continue}if(s.isSupported()){i=s.canPlayType(t);if(i){return i}}}return""};a.selectSource=function e(t){var i=this;var r=this.options_.techOrder.map(function(e){return[e,Mi.getTech(e)]}).filter(function(e){var t=e[0],i=e[1];if(i){return i.isSupported()}o.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.');return false});var n=function e(t,i,r){var n;
1t.some(function(e){return i.some(function(t){n=r(e,t);if(n){return true}})});return n};var a;var s=function e(t){return function(e,i){return t(i,e)}};var l=function e(t,r){var n=t[0],a=t[1];if(a.canPlaySource(r,i.options_[n.toLowerCase()])){return{source:r,tech:n}}};if(this.options_.sourceOrder){a=n(t,r,s(l))}else{a=n(r,t,l)}return a||false};a.src=function e(t){var i=this;if(typeof t==="undefined"){return this.cache_.src||""}var r=ar(t);if(!r.length){this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);return}this.changingSrc_=true;this.cache_.sources=r;this.updateSourceCaches_(r[0]);qi(this,r[0],function(e,t){i.middleware_=t;i.cache_.sources=r;i.updateSourceCaches_(e);var n=i.src_(e);if(n){if(r.length>1){return i.src(r.slice(1))}i.changingSrc_=false;i.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);i.triggerReady();return}Wi(t,i.tech_)})};a.src_=function e(t){var i=this;var r=this.selectSource([t]);if(!r){return true}if(!Ve(r.tech,this.techName_)){this.changingSrc_=true;this.loadTech_(r.tech,r.source);this.tech_.ready(function(){i.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};a.load=function e(){this.techCall_("load")};a.reset=function e(){var i=this;var r=this.options_.Promise||t.Promise;if(this.paused()||!r){this.doReset_()}else{var n=this.play();Pt(n.then(function(){return i.doReset_()}))}};a.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(Ie(this)){this.trigger("playerreset")}};a.resetControlBarUI_=function e(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()};a.resetProgressBar_=function e(){this.currentTime(0);var t=this.controlBar,i=t.durationDisplay,r=t.remainingTimeDisplay;if(i){i.updateContent()}if(r){r.updateContent()}};a.resetPlaybackRate_=function e(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()};a.resetVolumeBar_=function e(){this.volume(1);this.trigger("volumechange")};a.currentSources=function e(){var t=this.currentSource();var i=[];if(Object.keys(t).length!==0){i.push(t)}return this.cache_.sources||i};a.currentSource=function e(){return this.cache_.source||{}};a.currentSrc=function e(){return this.currentSource()&&this.currentSource().src||""};a.currentType=function e(){return this.currentSource()&&this.currentSource().type||""};a.preload=function e(t){if(t!==undefined){this.techCall_("setPreload",t);this.options_.preload=t;return}return this.techGet_("preload")};a.autoplay=function e(t){if(t===undefined){return this.options_.autoplay||false}var i;if(typeof t==="string"&&/(any|play|muted)/.test(t)){this.options_.autoplay=t;this.manualAutoplay_(t);i=false}else if(!t){this.options_.autoplay=false}else{this.options_.autoplay=true}i=typeof i==="undefined"?this.options_.autoplay:i;if(this.tech_){this.techCall_("setAutoplay",i)}};a.playsinline=function e(t){if(t!==undefined){this.techCall_("setPlaysinline",t);this.options_.playsinline=t;return this}return this.techGet_("playsinline")};a.loop=function e(t){if(t!==undefined){this.techCall_("setLoop",t);this.options_.loop=t;return}return this.techGet_("loop")};a.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")};a.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")}}};a.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");
1if(!this.usingNativeControls()){this.addTechControlsListeners_()}}else{this.removeClass("vjs-controls-enabled");this.addClass("vjs-controls-disabled");this.trigger("controlsdisabled");if(!this.usingNativeControls()){this.removeTechControlsListeners_()}}};a.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")}};a.error=function e(t){if(t===undefined){return this.error_||null}if(this.options_.suppressNotSupportedError&&t&&t.code===4){var i=function e(){this.error(t)};this.options_.suppressNotSupportedError=false;this.any(["click","touchstart"],i);this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(t===null){this.error_=t;this.removeClass("vjs-error");if(this.errorDisplay){this.errorDisplay.close()}return}this.error_=new Ct(t);this.addClass("vjs-error");o.error("(CODE:"+this.error_.code+" "+Ct.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error");return};a.reportUserActivity=function e(t){this.userActivity_=true};a.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")};a.listenForUserActivity_=function e(){var t;var i;var r;var n=je(this,this.reportUserActivity);var a=function e(t){if(t.screenX!==i||t.screenY!==r){i=t.screenX;r=t.screenY;n()}};var s=function e(){n();this.clearInterval(t);t=this.setInterval(n,250)};var o=function e(i){n();this.clearInterval(t)};this.on("mousedown",s);this.on("mousemove",a);this.on("mouseup",o);this.on("mouseleave",o);var l=this.getChild("controlBar");if(l&&!ht&&!et){l.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout;this.player().options_.inactivityTimeout=0});l.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})}this.on("keydown",n);this.on("keyup",n);var u;this.setInterval(function(){if(!this.userActivity_){return}this.userActivity_=false;this.userActive(true);this.clearTimeout(u);var e=this.options_.inactivityTimeout;if(e<=0){return}u=this.setTimeout(function(){if(!this.userActivity_){this.userActive(false)}},e)},250)};a.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};a.defaultPlaybackRate=function e(t){if(t!==undefined){return this.techCall_("setDefaultPlaybackRate",t)}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_("defaultPlaybackRate")}return 1};a.isAudio=function e(t){if(t!==undefined){this.isAudio_=!!t;return}return!!this.isAudio_};a.addTextTrack=function e(t,i,r){if(this.tech_){return this.tech_.addTextTrack(t,i,r)}};a.addRemoteTextTrack=function e(t,i){if(this.tech_){return this.tech_.addRemoteTextTrack(t,i)}};a.removeRemoteTextTrack=function e(t){if(t===void 0){t={}}var i=t,r=i.track;if(!r){r=t}if(this.tech_){return this.tech_.removeRemoteTextTrack(r)}};a.getVideoPlaybackQuality=function e(){return this.techGet_("getVideoPlaybackQuality")};a.videoWidth=function e(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};a.videoHeight=function e(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};a.language=function e(t){if(t===undefined){return this.language_}this.language_=String(t).toLowerCase()};a.languages=function e(){return qe(n.prototype.options_.languages,this.languages_)};a.toJSON=function e(){var t=qe(this.options_);var i=t.tracks;t.tracks=[];for(var r=0;r<i.length;r++){var n=i[r];n=qe(n);n.player=undefined;t.tracks[r]=n}return t};a.createModal=function e(t,i){var r=this;i=i||{};i.content=t||"";var n=new Wt(this,i);this.addChild(n);n.on("dispose",function(){r.removeChild(n)});n.open();return n};a.updateCurrentBreakpoint_=function e(){if(!this.responsive()){return}var t=this.currentBreakpoint();var i=this.currentWidth();for(var r=0;r<ra.length;r++){var n=ra[r];var a=this.breakpoints_[n];if(i<=a){if(t===n){return}if(t){this.removeClass(na[t])}this.addClass(na[n]);this.breakpoint_=n;break}}};a.removeCurrentBreakpoint_=function e(){var t=this.currentBreakpointClass();this.breakpoint_="";if(t){this.removeClass(t)}};a.breakpoints=function e(t){if(t===undefined){return v(this.breakpoints_)}this.breakpoint_="";this.breakpoints_=v({},aa,t);this.updateCurrentBreakpoint_();return v(this.breakpoints_)};a.responsive=function e(t){if(t===undefined){return this.responsive_}t=Boolean(t);var i=this.responsive_;if(t===i){return}this.responsive_=t;if(t){this.on("playerresize",this.updateCurrentBreakpoint_);this.updateCurrentBreakpoint_()}else{this.off("playerresize",this.updateCurrentBreakpoint_);this.removeCurrentBreakpoint_()}return t};a.currentBreakpoint=function e(){return this.breakpoint_};a.currentBreakpointClass=function e(){return na[this.breakpoint_]||""};a.loadMedia=function e(t,i){var r=this;if(!t||typeof t!=="object"){return}this.reset();this.cache_.media=qe(t);var n=this.cache_.media,a=n.artwork,s=n.poster,o=n.src,l=n.textTracks;
1if(!a&&s){this.cache_.media.artwork=[{src:s,type:rr(s)}]}if(o){this.src(o)}if(s){this.poster(s)}if(Array.isArray(l)){l.forEach(function(e){return r.addRemoteTextTrack(e,false)})}this.ready(i)};a.getMedia=function e(){if(!this.cache_.media){var t=this.poster();var i=this.currentSources();var r=Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}});var n={src:i,textTracks:r};if(t){n.poster=t;n.artwork=[{src:n.poster,type:rr(n.poster)}]}return n}return qe(this.cache_.media)};n.getTagSettings=function e(t){var i={sources:[],tracks:[]};var r=R(t);var n=r["data-setup"];if(A(t,"vjs-fill")){r.fill=true}if(A(t,"vjs-fluid")){r.fluid=true}if(n!==null){var a=At(n||"{}"),s=a[0],l=a[1];if(s){o.error(s)}v(r,l)}v(i,r);if(t.hasChildNodes()){var u=t.childNodes;for(var c=0,d=u.length;c<d;c++){var f=u[c];var h=f.nodeName.toLowerCase();if(h==="source"){i.sources.push(R(f))}else if(h==="track"){i.tracks.push(R(f))}}}return i};a.flexNotSupported_=function e(){var t=i.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)};return n}(We);Li.names.forEach(function(e){var t=Li[e];sa.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]}});sa.players={};var oa=t.navigator;sa.prototype.options_={techOrder:Mi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:false,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:oa&&(oa.languages&&oa.languages[0]||oa.userLanguage||oa.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:false};["ended","seeking","seekable","networkState","readyState"].forEach(function(e){sa.prototype[e]=function(){return this.techGet_(e)}});ta.forEach(function(e){sa.prototype["handleTech"+He(e)+"_"]=function(){return this.trigger(e)}});We.registerComponent("Player",sa);var la=u(function(e){function t(i,r){e.exports=t=Object.setPrototypeOf||function e(t,i){t.__proto__=i;return t};return t(i,r)}e.exports=t});var ua=u(function(e){function t(){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 i(r,n,a){if(t()){e.exports=i=Reflect.construct}else{e.exports=i=function e(t,i,r){var n=[null];n.push.apply(n,i);var a=Function.bind.apply(t,n);var s=new a;if(r)la(s,r.prototype);return s}}return i.apply(null,arguments)}e.exports=i});var ca="plugin";var da="activePlugins_";var fa={};var ha=function e(t){return fa.hasOwnProperty(t)};var pa=function e(t){return ha(t)?fa[t]:undefined};var va=function e(t,i){t[da]=t[da]||{};t[da][i]=true};var ma=function e(t,i,r){var n=(r?"before":"")+"pluginsetup";t.trigger(n,i);t.trigger(n+":"+i.name,i)};var ga=function e(t,i){var r=function e(){ma(this,{name:t,plugin:i,instance:null},true);var r=i.apply(this,arguments);va(this,t);ma(this,{name:t,plugin:i,instance:r});return r};
1Object.keys(i).forEach(function(e){r[e]=i[e]});return r};var ya=function e(t,i){i.prototype.name=t;return function(){ma(this,{name:t,plugin:i,instance:null},true);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}var a=ua(i,[this].concat(r));this[t]=function(){return a};ma(this,a.getEventHash());return a}};var _a=function(){function e(t){if(this.constructor===e){throw new Error("Plugin must be sub-classed; not directly instantiated.")}this.player=t;Ue(this);delete this.trigger;Be(this,this.constructor.defaultState);va(t,this.name);this.dispose=je(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,i){if(i===void 0){i={}}return ye(this.eventBusEl_,t,this.getEventHash(i))};t.handleStateChanged=function e(t){};t.dispose=function e(){var t=this.name,i=this.player;this.trigger("dispose");this.off();i.off("dispose",this.dispose);i[da][t]=false;this.player=this.state=null;i[t]=ya(t,fa[t])};e.isBasic=function t(i){var r=typeof i==="string"?pa(i):i;return typeof r==="function"&&!e.prototype.isPrototypeOf(r.prototype)};e.registerPlugin=function t(i,r){if(typeof i!=="string"){throw new Error('Illegal plugin name, "'+i+'", must be a string, was '+typeof i+".")}if(ha(i)){o.warn('A plugin named "'+i+'" already exists. You may want to avoid re-registering plugins!')}else if(sa.prototype.hasOwnProperty(i)){throw new Error('Illegal plugin name, "'+i+'", cannot share a name with an existing player method!')}if(typeof r!=="function"){throw new Error('Illegal plugin for "'+i+'", must be a function, was '+typeof r+".")}fa[i]=r;if(i!==ca){if(e.isBasic(r)){sa.prototype[i]=ga(i,r)}else{sa.prototype[i]=ya(i,r)}}return r};e.deregisterPlugin=function e(t){if(t===ca){throw new Error("Cannot de-register base plugin.")}if(ha(t)){delete fa[t];delete sa.prototype[t]}};e.getPlugins=function e(t){if(t===void 0){t=Object.keys(fa)}var i;t.forEach(function(e){var t=pa(e);if(t){i=i||{};i[e]=t}});return i};e.getPluginVersion=function e(t){var i=pa(t);return i&&i.VERSION||""};return e}();_a.getPlugin=pa;_a.BASE_PLUGIN_NAME=ca;_a.registerPlugin(ca,_a);sa.prototype.usingPlugin=function(e){return!!this[da]&&this[da][e]===true};sa.prototype.hasPlugin=function(e){return!!ha(e)};function ba(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)la(e,t)}var Ta=ba;var Sa=function e(t,i){if(i===void 0){i={}}var r=function e(){t.apply(this,arguments)};var n={};if(typeof i==="object"){if(i.constructor!==Object.prototype.constructor){r=i.constructor}n=i}else if(typeof i==="function"){r=i}Ta(r,t);if(t){r.super_=t}for(var a in n){if(n.hasOwnProperty(a)){r.prototype[a]=n[a]}}return r};var ja=function e(t){return t.indexOf("#")===0?t.slice(1):t};function ka(e,t,i){var r=ka.getPlayer(e);if(r){if(t){o.warn('Player "'+e+'" is already initialised. Options will not be applied.')}if(i){r.ready(i)}return r}var n=typeof e==="string"?X("#"+ja(e)):e;if(!j(n)){throw new TypeError("The element or ID supplied is not valid. (videojs)")}if(!n.ownerDocument.defaultView||!n.ownerDocument.body.contains(n)){o.warn("The element supplied is not included in the DOM")}t=t||{};ka.hooks("beforesetup").forEach(function(e){var i=e(n,qe(t));if(!m(i)||Array.isArray(i)){o.error("please return an object in beforesetup hooks");return}t=qe(t,i)});var a=We.getComponent("Player");r=new a(n,t,i);ka.hooks("setup").forEach(function(e){return e(r)});return r}ka.hooks_={};ka.hooks=function(e,t){ka.hooks_[e]=ka.hooks_[e]||[];if(t){ka.hooks_[e]=ka.hooks_[e].concat(t)}return ka.hooks_[e]};ka.hook=function(e,t){ka.hooks(e,t)};ka.hookOnce=function(e,t){ka.hooks(e,[].concat(t).map(function(t){var i=function i(){ka.removeHook(e,i);return t.apply(void 0,arguments)};return i}))};ka.removeHook=function(e,t){var i=ka.hooks(e).indexOf(t);if(i<=-1){return false}ka.hooks_[e]=ka.hooks_[e].slice();ka.hooks_[e].splice(i,1);return true};if(t.VIDEOJS_NO_DYNAMIC_STYLE!==true&&S()){var Ea=X(".vjs-styles-defaults");if(!Ea){Ea=re("vjs-styles-defaults");var wa=X("head");if(wa){wa.insertBefore(Ea,wa.firstChild)}ne(Ea,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}te(1,ka);ka.VERSION=r;ka.options=sa.prototype.options_;ka.getPlayers=function(){return sa.players};ka.getPlayer=function(e){var t=sa.players;var i;if(typeof e==="string"){var r=ja(e);var n=t[r];
1if(n){return n}i=X("#"+r)}else{i=e}if(j(i)){var a=i,s=a.player,o=a.playerId;if(s||t[o]){return s||t[o]}}};ka.getAllPlayers=function(){return Object.keys(sa.players).map(function(e){return sa.players[e]}).filter(Boolean)};ka.players=sa.players;ka.getComponent=We.getComponent;ka.registerComponent=function(e,t){if(Mi.isTech(t)){o.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")}We.registerComponent.call(We,e,t)};ka.getTech=Mi.getTech;ka.registerTech=Mi.registerTech;ka.use=Vi;Object.defineProperty(ka,"middleware",{value:{},writeable:false,enumerable:true});Object.defineProperty(ka.middleware,"TERMINATOR",{value:Hi,writeable:false,enumerable:true});ka.browser=vt;ka.TOUCH_ENABLED=ct;ka.extend=Sa;ka.mergeOptions=qe;ka.bind=je;ka.registerPlugin=_a.registerPlugin;ka.deregisterPlugin=_a.deregisterPlugin;ka.plugin=function(e,t){o.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");return _a.registerPlugin(e,t)};ka.getPlugins=_a.getPlugins;ka.getPlugin=_a.getPlugin;ka.getPluginVersion=_a.getPluginVersion;ka.addLanguage=function(e,t){var i;e=(""+e).toLowerCase();ka.options.languages=qe(ka.options.languages,(i={},i[e]=t,i));return ka.options.languages[e]};ka.log=o;ka.createLogger=l;ka.createTimeRange=ka.createTimeRanges=_t;ka.formatTime=Er;ka.setFormatTime=jr;ka.resetFormatTime=kr;ka.parseUrl=ai;ka.isCrossOrigin=li;ka.EventTarget=we;ka.on=me;ka.one=_e;ka.off=ge;ka.trigger=ye;ka.xhr=pi;ka.TextTrack=Ei;ka.AudioTrack=wi;ka.VideoTrack=Ci;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){ka[e]=function(){o.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead");return Q[e].apply(null,arguments)}});ka.computedStyle=y;ka.dom=Q;ka.url=ui;ka.defineLazyProperty=Zn;return ka});var l=o.dedupeVideojs(e.videojs,s);var u=new o({accountId:"5737985377001",adConfigId:"",autoplay:"muted",css:{controlBarColor:"rgba(0, 0, 0, 0)",controlColor:"rgb(255, 255, 255)",progressColor:"rgba(0, 0, 0, 0)"},embedId:"default",media:{poster:{}},playButton:{position:"center",shape:"circle"},plugins:[{name:"perSourceBehaviors",autoInit:true},{name:"contextmenu",autoInit:true},{name:"contextmenuUI",autoInit:true},{name:"bcAnalytics",autoInit:true,options:{accountId:"5737985377001",embedId:"default",platformVersion:"6.40.3",playerId:"OIWvHjhhx",playerName:"Homepage"}},{name:"errors",autoInit:true,options:{}},{name:"catalog",autoInit:true,options:{accountId:"5737985377001",policyKey:"BCpkADawqM0PqfELZD-xxj918Ow3bB5ENgHlgOGdO2m4OoUibc2lcx-hOQkBRxs5_JidDDCAq_mMK84NK_wDU--1GEKCHHkRxHa5QBydJ0W6qJn9yV4tue5DBNgPA9RMu7hpr76PgXzwmRv3"}},{name:"playlist",autoInit:false}],playerId:"OIWvHjhhx",videoCloud:{policy_key:"BCpkADawqM0PqfELZD-xxj918Ow3bB5ENgHlgOGdO2m4OoUibc2lcx-hOQkBRxs5_JidDDCAq_mMK84NK_wDU--1GEKCHHkRxHa5QBydJ0W6qJn9yV4tue5DBNgPA9RMu7hpr76PgXzwmRv3"},skin:"luna",playersCDN:"//players.brightcove.net",version:"6.40.3"},{});var c=u.util;if(!l.getTech("flash")){(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof i==="function"&&i.amd?i(["video.js"],t):e.videojsFlash=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var i="5.4.1";var r="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 i=e.search(/&(?!\w+=)/);var r=void 0;if(i!==-1){r=i+1}else{i=r=e.lastIndexOf("/")+1;if(i===0){i=r=e.length}}t.connection=e.substring(0,i);t.stream=e.substring(r,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,i){var r=e.rtmpSourceHandler.canPlayType(t.type);if(r){return r}if(e.isStreamingSrc(t.src)){return"maybe"}return""};e.rtmpSourceHandler.handleSource=function(t,i,r){var n=e.streamToParts(t.src);
1i.setRtmpConnection(n.connection);i.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 l=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 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 d=t.getComponent("Tech");var f=t.dom;var h=t.url;var p=t.createTimeRange;var v=t.mergeOptions;var m=o&&o.navigator||{};var g=function(e){u(t,e);function t(i,r){l(this,t);var n=c(this,e.call(this,i,r));if(i.source){n.ready(function(){this.setSource(i.source)},true)}if(i.startTime){n.ready(function(){this.load();this.play();this.currentTime(i.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 r=this.options_;if(!r.swf){r.swf="https://vjs.zencdn.net/swf/"+i+"/video-js.swf"}var n=r.techId;var a=v({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:r.autoplay,preload:r.preload,loop:r.loop,muted:r.muted},r.flashVars);var s=v({wmode:"opaque",bgcolor:"#000000"},r.params);var o=v({id:n,name:n,class:"vjs-tech"},r.attributes);this.el_=t.embed(r.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 i=this;t=h.getAbsoluteURL(t);this.el_.vjs_src(t);if(this.autoplay()){this.setTimeout(function(){return i.play()},0)}};t.prototype.seeking=function e(){return this.lastSeekTarget_!==undefined};t.prototype.setCurrentTime=function t(i){var r=this.seekable();if(r.length){i=i>r.start(0)?i:r.start(0);i=i<r.end(r.length-1)?i:r.end(r.length-1);this.lastSeekTarget_=i;this.trigger("seeking");this.el_.vjs_setProperty("currentTime",i);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}(d);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 j=0;j<y.length;j++){S(y[j]);T(y[j])}for(var k=0;k<_.length;k++){S(_[k])}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};d.withSourceHandlers(g);g.nativeSourceHandler={};g.nativeSourceHandler.canPlayType=function(e){if(e in g.formats){return"maybe"}return""};g.nativeSourceHandler.canHandleSource=function(e,t){var i=void 0;function r(e){var t=h.getFileExtension(e);if(t){return"video/"+t}return""}if(!e.type){i=r(e.src)}else{i=e.type.replace(/;.*/,"").toLowerCase()}return g.nativeSourceHandler.canPlayType(i)};g.nativeSourceHandler.handleSource=function(e,t,i){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=f.$("#"+e);var i=t&&t.tech;if(i&&i.el()){g.checkReady(i)}};g.checkReady=function(e){if(!e.el()){return}
1if(e.el().vjs_getProperty){e.triggerReady()}else{this.setTimeout(function(){g.checkReady(e)},50)}};g.onEvent=function(e,t){var i=f.$("#"+e).tech;var r=Array.prototype.slice.call(arguments,2);i.setTimeout(function(){i.trigger(t,r)},1)};g.onError=function(e,t){var i=f.$("#"+e).tech;if(t==="srcnotfound"){return i.error(4)}if(typeof t==="string"){i.error("FLASH: "+t)}else{t.origin="flash";i.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,i,r){var n=g.getEmbedCode(e,t,i,r);var a=f.createEl("div",{innerHTML:n}).childNodes[0];return a};g.getEmbedCode=function(e,t,i,r){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]+"&"})}i=v({movie:e,flashvars:a,allowScriptAccess:"always",allowNetworking:"all"},i);Object.getOwnPropertyNames(i).forEach(function(e){s+='<param name="'+e+'" value="'+i[e]+'" />'});r=v({data:e,width:"100%",height:"100%"},r);Object.getOwnPropertyNames(r).forEach(function(e){o+=e+'="'+r[e]+'" '});return""+n+o+">"+s+"</object>"};n(g);if(d.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=r;return g})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("global/window"),require("video.js")):typeof i==="function"&&i.amd?i(["exports","global/window","video.js"],t):t(e.videojsFlashlsSourceHandler={},e.window,e.videojs)})(this,function(e,t,i){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;var r=function(){this.init=function(){var e={};this.on=function(t,i){if(!e[t]){e[t]=[]}e[t]=e[t].concat(i)};this.off=function(t,i){var r;if(!e[t]){return false}r=e[t].indexOf(i);e[t]=e[t].slice();e[t].splice(r,1);return r>-1};this.trigger=function(t){var i,r,n,a;i=e[t];if(!i){return}if(arguments.length===2){n=i.length;for(r=0;r<n;++r){i[r].call(this,arguments[1])}}else{a=[];r=arguments.length;for(r=1;r<arguments.length;++r){a.push(arguments[r])}n=i.length;for(r=0;r<n;++r){i[r].apply(this,a)}}};this.dispose=function(){e={}}}};r.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};r.prototype.push=function(e){this.trigger("data",e)};r.prototype.flush=function(e){this.trigger("done",e)};var n=r;var a=4,s=128;var o=function(e){var t=0,i={payloadType:-1,payloadSize:0},r=0,n=0;while(t<e.byteLength){if(e[t]===s){break}while(e[t]===255){r+=255;t++}r+=e[t++];while(e[t]===255){n+=255;t++}n+=e[t++];if(!i.payload&&r===a){i.payloadType=r;i.payloadSize=n;i.payload=e.subarray(t,t+n);break}t+=n;r=0;n=0}return i};var l=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 u=function(e,t){var i=[],r,n,a,s;if(!(t[0]&64)){return i}n=t[0]&31;for(r=0;r<n;r++){a=r*3;s={type:t[a+2]&3,pts:e};if(t[a+2]&4){s.ccData=t[a+3]<<8|t[a+4];i.push(s)}}return i};var c=function(e){var t=e.byteLength,i=[],r=1,n,a;while(r<t-2){if(e[r]===0&&e[r+1]===0&&e[r+2]===3){i.push(r+2);r+=2}else{r++}}if(i.length===0){return e}n=t-i.length;a=new Uint8Array(n);var s=0;for(r=0;r<n;s++,r++){if(s===i[0]){s++;i.shift()}a[r]=e[s]}return a};var d={parseSei:o,parseUserData:l,parseCaptionPackets:u,discardEmulationPreventionBytes:c,USER_DATA_REGISTERED_ITU_T_T35:a};var f=function(){f.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)};f.prototype=new n;f.prototype.push=function(e){var t,i,r;if(e.nalUnitType!=="sei_rbsp"){return}t=d.parseSei(e.escapedRBSP);if(t.payloadType!==d.USER_DATA_REGISTERED_ITU_T_T35){return}i=d.parseUserData(t);
1if(!i){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}r=d.parseCaptionPackets(e.pts,i);this.captionPackets_=this.captionPackets_.concat(r);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};f.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};f.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};f.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)};f.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};f.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,i,r,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}r=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);i=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=i;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(r,n)){r=(r&3)<<8;a=p(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(r,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)}r=(r&3)<<8;a=p(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(r,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(r,n)){this.column_+=n&3}else if(this.isPAC(r,n)){var s=m.indexOf(t&7968);
1if(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(r)){if(n===0){n=null}a=p(r);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 i=0;i<this.rollUpRows_;i++){this.displayed_[t-i]=this.displayed_[this.row_-i];this.displayed_[this.row_-i]=""}}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 i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)};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 i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};y.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};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 i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};var _={CaptionStream:f,Cea608Stream:y};var b=_.CaptionStream;var T={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var S=function(e,t,i){var r,n="";for(r=t;r<i;r++){n+="%"+("00"+e[r].toString(16)).slice(-2)}return n},j=function(e,t,i){return decodeURIComponent(S(e,t,i))},k=function(e,t,i){return unescape(S(e,t,i))},E=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},w={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=j(e.data,1,t);e.value=j(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=j(e.data,1,t);e.url=j(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=k(e.data,0,t);break}}e.privateData=e.data.subarray(t+1);e.data=e.privateData}},C;C=function(e){var t={debug:!!(e&&e.debug),descriptor:e&&e.descriptor},i=0,r=[],n=0,a;C.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,l,u,c;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){n=0;r.length=0}if(r.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}r.push(e);n+=e.data.byteLength;if(r.length===1){i=E(e.data.subarray(6,10));i+=10}if(n<i){return}a={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts};for(u=0;
1u<i;){a.data.set(r[0].data.subarray(0,i-u),u);u+=r[0].data.byteLength;n-=r[0].data.byteLength;r.shift()}s=10;if(a.data[5]&64){s+=4;s+=E(a.data.subarray(10,14));i-=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]);l={id:c,data:a.data.subarray(s+10,s+o+10)};l.key=l.id;if(w[l.id]){w[l.id](l);if(l.owner==="com.apple.streaming.transportStreamTimestamp"){var d=l.data,f=(d[3]&1)<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;f*=4;f+=d[7]&3;l.timeStamp=f;if(a.pts===undefined&&a.dts===undefined){a.pts=l.timeStamp;a.dts=l.timeStamp}this.trigger("timestamp",l)}}a.frames.push(l);s+=10;s+=o}while(s<i);this.trigger("data",a)}};C.prototype=new n;var I=C;var A=function e(t,i){var r={id:i.index+"",width:i.width,height:i.height,bandwidth:i.bitrate,isEnabled_:true};r.enabled=function(e){if(typeof e==="undefined"){return r.isEnabled_}if(e===r.isEnabled_){return}if(e===true||e===false){r.isEnabled_=e;t()}};return r};var x=function e(t){var i=null;var r=function e(){var r=i.filter(function(e){return e.enabled()});if(r.length===i.length||r.length===0){t.el_.vjs_setProperty("autoLevelCapping",-1);t.el_.vjs_setProperty("level",-1);return}if(r.length===1){t.el_.vjs_setProperty("level",parseInt(r[0].id,10));t.el_.vjs_setProperty("autoLevelCapping",-1);return}var n=r[r.length-1].id;t.el_.vjs_setProperty("autoLevelCapping",parseInt(n,10));t.el_.vjs_setProperty("level",-1)};return function(){if(!i){var e=t.el_.vjs_getProperty("levels");i=e.filter(function(e){return!e.audio}).map(A.bind(null,r))}return i}};var O=function e(t){var i=t.el_.vjs_getProperty("audioTracks");var r=t.audioTracks();var n=null;for(var a=0;a<r.length;a++){if(r[a].enabled){n=r[a].id;break}}if(n===null){return}for(var s=0;s<i.length;s++){if(n===i[s].title){t.el_.vjs_setProperty("audioTrack",s);return}}};var P=function e(t){var r=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=r[e.id];t.audioTracks().addTrack(new i.AudioTrack({id:s.name,enabled:a===n,language:s.lang,default:s.default_track,label:s.name}))})};var D="1.4.8";var R=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 L=function e(t,i,r){var n=t.remoteTextTracks()||[];for(var a=0;a<n.length;a++){var s=n[a];if(s.kind===i&&s.label===r){t.removeRemoteTextTrack(s)}}};var N=function e(t){var i=new Uint8Array(t.length);for(var r=0;r<t.length;r++){i[r]=t.charCodeAt(r)}return i};var U=function e(t,i,r){var n;var a;if(!r){return}if(!r.cues){return}n=r.cues.length;while(n--){a=r.cues[n];if(a.startTime<=i&&a.endTime>=t){r.removeCue(a)}}};var M=function e(t,i){if(t.length){U(0,t.start(0),i)}};var B=function e(t,i){var r=-1;for(var n=0;n<t.length;n++){if(t[n].id===i){r=n;break}}t.selectedIndex_=r;t.trigger({selectedIndex:r,type:"change"})};var F=1/30;var H=function e(t,r){var n=[];if(t&&t.length){for(var 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 V=function e(t,i){return H(t,function(e,t){return e-F<=i&&t+F>=i})};var q=function(){function e(e,t,r){var n=this;if(t.options_&&t.options_.playerId){var a=i(t.options_.playerId);if(!a.hasOwnProperty("hls")){Object.defineProperty(a,"hls",{get:function e(){i.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 I;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 i.EventTarget;this.playlists.media=function(){return n.media_()}}
1var r=e.prototype;r.src=function e(t){if(!t){return}this.tech_.setSrc(t.src)};r.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))}}};r.seekable=function e(){var t=this.tech_.el_.vjs_getProperty("seekableStart");var r=this.tech_.el_.vjs_getProperty("seekableEnd");if(r===0){return i.createTimeRange()}return i.createTimeRange(t,r)};r.media_=function e(){var t=this.tech_.el_.vjs_getProperty("levels");var i=this.tech_.el_.vjs_getProperty("level");var r;if(t.length){r={resolvedUri:t[i].url,attributes:{BANDWIDTH:t[i].bitrate,RESOLUTION:{width:t[i].width,height:t[i].height}}}}return r};r.onLoadedmetadata_=function e(){var t=this;this.representations=x(this.tech_);var r=i.players[this.tech_.options_.playerId];if(r&&r.qualityLevels){this.qualityLevels_=r.qualityLevels();this.representations().forEach(function(e){t.qualityLevels_.addQualityLevel(e)});B(this.qualityLevels_,this.tech_.el_.vjs_getProperty("level")+"")}P(this.tech_);this.tech_.audioTracks().on("change",this.onAudioTrackChanged)};r.onAudioTrackChanged=function e(){O(this.tech_)};r.onLevelSwitch_=function e(t,i){if(this.qualityLevels_){B(this.qualityLevels_,i[0].levelIndex+"")}this.playlists.trigger("mediachange");this.tech_.trigger({type:"mediachange",bubbles:true})};r.onLevelLoaded_=function e(){this.playlists.trigger("loadedplaylist")};r.onFragmentLoaded_=function e(){this.tech_.trigger("bandwidthupdate");this.captionStream_.flush()};r.onSeeking_=function e(){var t=this;U(0,Infinity,this.metadataTrack_);var i=V(this.tech_.buffered(),this.tech_.currentTime());if(!i.length){Object.keys(this.inbandTextTracks_).forEach(function(e){U(0,Infinity,t.inbandTextTracks_[e])});this.captionStream_.reset()}};r.onId3updated_=function e(i,r){var n=t.atob(r[0]);var a=N(n);var s={type:"timed-metadata",dataAlignmentIndicator:true,data:a};this.metadataStream_.push(s)};r.onMetadataStreamData_=function e(i){var r=this;if(!this.metadataTrack_){this.metadataTrack_=this.tech_.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;this.metadataTrack_.inBandMetadataTrackDispatchType="15"}M(this.tech_.buffered(),this.metadataTrack_);var n=this.tech_.currentTime();i.frames.forEach(function(e){var i=new t.VTTCue(n,n+.1,e.value||e.url||e.data||"");i.frame=e;i.value=e;R(i);r.metadataTrack_.addCue(i)});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 l=0;l<a.length;l++){s.push(a[l])}s.sort(function(e,t){return e.startTime-t.startTime});for(var u=0;u<s.length-1;u++){if(s[u].endTime!==s[u+1].startTime){s[u].endTime=s[u+1].startTime}}s[s.length-1].endTime=o}};r.onCaptionData_=function e(i,r){var n=this;r[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:N(t.atob(e.data)),nalUnitType:"sei_rbsp"})})};r.onCaptionStreamData_=function e(i){if(i){if(!this.inbandTextTracks_[i.stream]){L(this.tech_,"captions",i.stream);this.inbandTextTracks_[i.stream]=this.tech_.addRemoteTextTrack({kind:"captions",label:i.stream,id:i.stream},false).track}M(this.tech_.buffered(),this.inbandTextTracks_[i.stream]);this.inbandTextTracks_[i.stream].addCue(new t.VTTCue(i.startPts/9e4,i.endPts/9e4,i.text))}};r.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 W={};var z=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;W.canPlayType=function(e){return z.test(e)?"maybe":""};W.canHandleSource=function(e,t){return W.canPlayType(e.type)==="maybe"};W.handleSource=function(e,t,i){t.hls=new q(e,t,i);t.hls.src(e);return t.hls};i.getTech("Flash").registerSourceHandler(W,0);W.VERSION=D;e.FlashlsHandler=q;e.default=W;
1Object.defineProperty(e,"__esModule",{value:true})});(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("video.js")):typeof i==="function"&&i.amd?i(["exports","video.js"],t):t(e.videojsHttpStreaming={},e.videojs)})(this,function(i,r){"use strict";r=r&&r.hasOwnProperty("default")?r["default"]:r;var n=typeof globalThis!=="undefined"?globalThis: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=typeof n!=="undefined"?n:typeof e!=="undefined"?e:{};var l;if(typeof t!=="undefined"){l=t}else{l=o["__GLOBAL_DOCUMENT_CACHE@4"];if(!l){l=o["__GLOBAL_DOCUMENT_CACHE@4"]=s}}var u=l;var c=a(function(e,t){(function(t){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/;var r=/^([^\/?#]*)(.*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g;var s={buildAbsoluteURL:function e(t,i,n){n=n||{};t=t.trim();i=i.trim();if(!i){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(i);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return i}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var l=s.parseURL(t);if(!l){throw new Error("Error trying to parse base URL.")}if(!l.netLoc&&l.path&&l.path[0]!=="/"){var u=r.exec(l.path);l.netLoc=u[1];l.path=u[2]}if(l.netLoc&&!l.path){l.path="/"}var c={scheme:l.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){c.netLoc=l.netLoc;if(o.path[0]!=="/"){if(!o.path){c.path=l.path;if(!o.params){c.params=l.params;if(!o.query){c.query=l.query}}}else{var d=l.path;var f=d.substring(0,d.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}}}if(c.path===null){c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(c)},parseURL:function e(t){var r=i.exec(t);if(!r){return null}return{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[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 d;if(typeof e!=="undefined"){d=e}else if(typeof n!=="undefined"){d=n}else if(typeof self!=="undefined"){d=self}else{d={}}var f=d;var h=function e(t,i){if(/^[a-z]+:/i.test(i)){return i}if(!/\/\//i.test(t)){t=c.buildAbsoluteURL(f.location.href,t)}return c.buildAbsoluteURL(t,i)};var p=function e(t,i,r){if(t&&r.responseURL&&i!==r.responseURL){return r.responseURL}return i};function v(){v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i){if(Object.prototype.hasOwnProperty.call(i,r)){e[r]=i[r]}}}return e};return v.apply(this,arguments)}function m(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function g(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var y=function(){function e(){this.listeners={}}var t=e.prototype;t.on=function e(t,i){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(i)};t.off=function e(t,i){if(!this.listeners[t]){return false}var r=this.listeners[t].indexOf(i);this.listeners[t].splice(r,1);return r>-1};t.trigger=function e(t){var i=this.listeners[t];var r;var n;var a;if(!i){return}if(arguments.length===2){n=i.length;for(r=0;r<n;++r){i[r].call(this,arguments[1])}}else{a=Array.prototype.slice.call(arguments,1);n=i.length;for(r=0;r<n;++r){i[r].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 _=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.buffer="";return t}var i=t.prototype;i.push=function e(t){var i;this.buffer+=t;i=this.buffer.indexOf("\n");for(;i>-1;i=this.buffer.indexOf("\n")){this.trigger("data",this.buffer.substring(0,i));this.buffer=this.buffer.substring(i+1)}};return t}(y);var b=function e(){var t="[^=]*";var i='"[^"]*"|[^,]*';var r="(?:"+t+")=(?:"+i+")";return new RegExp("(?:^|,)("+r+")")};var T=function e(t){var i=t.split(b());var r={};var n=i.length;var a;while(n--){if(i[n]===""){continue}a=/([^=]*)=(.*)/.exec(i[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");r[a[0]]=a[1]}return r};var S=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.customParsers=[];t.tagMappers=[];return t}var i=t.prototype;i.push=function e(t){var i=this;var r;var n;
1t=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,i){var r=i(t);if(r===t){return e}return e.concat([r])},[t]);a.forEach(function(e){for(var t=0;t<i.customParsers.length;t++){if(i.customParsers[t].call(i,e)){return}}if(e.indexOf("#EXT")!==0){i.trigger("data",{type:"comment",text:e.slice(1)});return}e=e.replace("\r","");r=/^#EXTM3U/.exec(e);if(r){i.trigger("data",{type:"tag",tagType:"m3u"});return}r=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e);if(r){n={type:"tag",tagType:"inf"};if(r[1]){n.duration=parseFloat(r[1])}if(r[2]){n.title=r[2]}i.trigger("data",n);return}r=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"targetduration"};if(r[1]){n.duration=parseInt(r[1],10)}i.trigger("data",n);return}r=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"totalduration"};if(r[1]){n.duration=parseInt(r[1],10)}i.trigger("data",n);return}r=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"version"};if(r[1]){n.version=parseInt(r[1],10)}i.trigger("data",n);return}r=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"media-sequence"};if(r[1]){n.number=parseInt(r[1],10)}i.trigger("data",n);return}r=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"discontinuity-sequence"};if(r[1]){n.number=parseInt(r[1],10)}i.trigger("data",n);return}r=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e);if(r){n={type:"tag",tagType:"playlist-type"};if(r[1]){n.playlistType=r[1]}i.trigger("data",n);return}r=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e);if(r){n={type:"tag",tagType:"byterange"};if(r[1]){n.length=parseInt(r[1],10)}if(r[2]){n.offset=parseInt(r[2],10)}i.trigger("data",n);return}r=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e);if(r){n={type:"tag",tagType:"allow-cache"};if(r[1]){n.allowed=!/NO/.test(r[1])}i.trigger("data",n);return}r=/^#EXT-X-MAP:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"map"};if(r[1]){var a=T(r[1]);if(a.URI){n.uri=a.URI}if(a.BYTERANGE){var s=a.BYTERANGE.split("@"),o=s[0],l=s[1];n.byterange={};if(o){n.byterange.length=parseInt(o,10)}if(l){n.byterange.offset=parseInt(l,10)}}}i.trigger("data",n);return}r=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"stream-inf"};if(r[1]){n.attributes=T(r[1]);if(n.attributes.RESOLUTION){var u=n.attributes.RESOLUTION.split("x");var c={};if(u[0]){c.width=parseInt(u[0],10)}if(u[1]){c.height=parseInt(u[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)}}i.trigger("data",n);return}r=/^#EXT-X-MEDIA:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"media"};if(r[1]){n.attributes=T(r[1])}i.trigger("data",n);return}r=/^#EXT-X-ENDLIST/.exec(e);if(r){i.trigger("data",{type:"tag",tagType:"endlist"});return}r=/^#EXT-X-DISCONTINUITY/.exec(e);if(r){i.trigger("data",{type:"tag",tagType:"discontinuity"});return}r=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"program-date-time"};if(r[1]){n.dateTimeString=r[1];n.dateTimeObject=new Date(r[1])}i.trigger("data",n);return}r=/^#EXT-X-KEY:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"key"};if(r[1]){n.attributes=T(r[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)}}i.trigger("data",n);return}r=/^#EXT-X-START:?(.*)$/.exec(e);if(r){n={type:"tag",tagType:"start"};if(r[1]){n.attributes=T(r[1]);n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]);n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)}i.trigger("data",n);return}r=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e);if(r){n={type:"tag",tagType:"cue-out-cont"};if(r[1]){n.data=r[1]}else{n.data=""}i.trigger("data",n);return}r=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e);if(r){n={type:"tag",tagType:"cue-out"};if(r[1]){n.data=r[1]}else{n.data=""}i.trigger("data",n);return}r=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e);if(r){n={type:"tag",tagType:"cue-in"};if(r[1]){n.data=r[1]}else{n.data=""}i.trigger("data",n);return}i.trigger("data",{type:"tag",data:e.slice(4)})})};i.addParser=function e(t){var i=this;var r=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=r.exec(e);if(t){i.trigger("data",{type:"custom",data:a(e),customType:n,segment:s});return true}})};i.addTagMapper=function e(t){var i=t.expression,r=t.map;var n=function e(t){if(i.test(t)){return r(t)}return t};this.tagMappers.push(n)};return t}(y);function j(e){var t=f.atob(e||"");var i=new Uint8Array(t.length);for(var r=0;r<t.length;r++){i[r]=t.charCodeAt(r)}return i}var k=function(e){m(t,e);function t(){var t;t=e.call(this)||this;t.lineStream=new _;t.parseStream=new S;t.lineStream.pipe(t.parseStream);var i=g(t);var r=[];var n={};var a;var s;var o=function e(){};var l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};var u="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";var c=0;t.manifest={allowCache:true,discontinuityStarts:[],segments:[]};t.parseStream.on("data",function(e){var t;var d;({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=r},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.KEYFORMAT===u){var i=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(i.indexOf(e.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(e.attributes.METHOD==="SAMPLE-AES-CENC"){this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"})}if(e.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(e.attributes.KEYID&&e.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:j(e.attributes.URI.split(",")[1])}};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;c=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={};
1if(e.uri){a.uri=e.uri}if(e.byterange){a.byterange=e.byterange}},"stream-inf":function t(){this.manifest.playlists=r;this.manifest.mediaGroups=this.manifest.mediaGroups||l;if(!e.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}if(!n.attributes){n.attributes={}}v(n.attributes,e.attributes)},media:function i(){this.manifest.mediaGroups=this.manifest.mediaGroups||l;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 r=this.manifest.mediaGroups[e.attributes.TYPE];r[e.attributes["GROUP-ID"]]=r[e.attributes["GROUP-ID"]]||{};t=r[e.attributes["GROUP-ID"]];d={default:/yes/i.test(e.attributes.DEFAULT)};if(d.default){d.autoselect=true}else{d.autoselect=/yes/i.test(e.attributes.AUTOSELECT)}if(e.attributes.LANGUAGE){d.language=e.attributes.LANGUAGE}if(e.attributes.URI){d.uri=e.attributes.URI}if(e.attributes["INSTREAM-ID"]){d.instreamId=e.attributes["INSTREAM-ID"]}if(e.attributes.CHARACTERISTICS){d.characteristics=e.attributes.CHARACTERISTICS}if(e.attributes.FORCED){d.forced=/yes/i.test(e.attributes.FORCED)}t[e.attributes.NAME]=d},discontinuity:function e(){c+=1;n.discontinuity=true;this.manifest.discontinuityStarts.push(r.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(i)},uri:function t(){n.uri=e.uri;r.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=c;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(i)});return t}var i=t.prototype;i.push=function e(t){this.lineStream.push(t)};i.end=function e(){this.lineStream.push("\n")};i.addParser=function e(t){this.parseStream.addParser(t)};i.addTagMapper=function e(t){this.parseStream.addTagMapper(t)};return t}(y);var E=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var w=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,i,r){if(i)e(t.prototype,i);if(r)e(t,r);return t}}();var C=function e(t,i,r){if(t===null)t=Function.prototype;var n=Object.getOwnPropertyDescriptor(t,i);if(n===undefined){var a=Object.getPrototypeOf(t);if(a===null){return undefined}else{return e(a,i,r)}}else if("value"in n){return n.value}else{var s=n.get;if(s===undefined){return undefined}return s.call(r)}};var I=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 A=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 x=function(){function e(e,t){var i=[];var r=true;var n=false;var a=undefined;try{for(var s=e[Symbol.iterator](),o;!(r=(o=s.next()).done);r=true){i.push(o.value);if(t&&i.length===t)break}}catch(e){n=true;a=e}finally{try{if(!r&&s["return"])s["return"]()}finally{if(n)throw a}}return i}return function(t,i){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return e(t,i)}
1else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var O=r.mergeOptions,P=r.EventTarget,D=r.log;var R=function e(t,i){["AUDIO","SUBTITLES"].forEach(function(e){for(var r in t.mediaGroups[e]){for(var n in t.mediaGroups[e][r]){var a=t.mediaGroups[e][r][n];i(a,e,r,n)}}})};var L=function e(t,i,r){var n=i.slice();r=r||0;var a=Math.min(t.length,i.length+r);for(var s=r;s<a;s++){n[s-r]=O(t[s],n[s-r])}return n};var N=function e(t,i){if(!t.resolvedUri){t.resolvedUri=h(i,t.uri)}if(t.key&&!t.key.resolvedUri){t.key.resolvedUri=h(i,t.key.uri)}if(t.map&&!t.map.resolvedUri){t.map.resolvedUri=h(i,t.map.uri)}};var U=function e(t,i){var r=O(t,{});var n=r.playlists[i.id];if(!n){return null}if(n.segments&&i.segments&&n.segments.length===i.segments.length&&n.endList===i.endList&&n.mediaSequence===i.mediaSequence){return null}var a=O(n,i);if(n.segments){a.segments=L(n.segments,i.segments,i.mediaSequence-n.mediaSequence)}a.segments.forEach(function(e){N(e,a.resolvedUri)});for(var s=0;s<r.playlists.length;s++){if(r.playlists[s].id===i.id){r.playlists[s]=a}}r.playlists[i.id]=a;r.playlists[i.uri]=a;return r};var M=function e(t,i){return t+"-"+i};var B=function e(t){var i=t.playlists.length;while(i--){var r=t.playlists[i];r.resolvedUri=h(t.uri,r.uri);r.id=M(i,r.uri);t.playlists[r.id]=r;t.playlists[r.uri]=r;if(!r.attributes){r.attributes={};D.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}};var F=function e(t){R(t,function(e){if(e.uri){e.resolvedUri=h(t.uri,e.uri)}})};var H=function e(t,i){var r=t.segments[t.segments.length-1];var n=void 0;if(i&&r&&r.duration){n=r.duration*1e3}else{n=(t.targetDuration||10)*500}return n};var V=function(e){I(t,e);function t(e,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};E(this,t);var n=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var a=r.withCredentials,s=a===undefined?false:a,o=r.handleManifestRedirects,l=o===undefined?false:o;n.srcUrl=e;n.hls_=i;n.withCredentials=s;n.handleManifestRedirects=l;var u=i.options_;n.customTagParsers=u&&u.customTagParsers||[];n.customTagMappers=u&&u.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:h(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(),"HAVE_METADATA")}n.haveMetadata(n.request,n.media().uri,n.media().id)})});return n}w(t,[{key:"playlistRequestError",value:function e(t,i,r){var n=i.uri,a=i.id;this.request=null;if(r){this.state=r}this.error={playlist:this.master.playlists[a],status:t.status,message:"HLS playlist request error at URL: "+n+".",responseText:t.responseText,code:t.status>=500?4:2};this.trigger("error")}},{key:"haveMetadata",value:function e(t,i,r){var n=this;this.request=null;this.state="HAVE_METADATA";var a=new k;this.customTagParsers.forEach(function(e){return a.addParser(e)});this.customTagMappers.forEach(function(e){return a.addTagMapper(e)});a.push(t.responseText);a.end();a.manifest.uri=i;a.manifest.id=r;a.manifest.attributes=a.manifest.attributes||{};var s=U(this.master,a.manifest);this.targetDuration=a.manifest.targetDuration;if(s){this.master=s;this.media_=this.master.playlists[r]}else{this.trigger("playlistunchanged")}if(!this.media().endList){f.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=f.setTimeout(function(){n.trigger("mediaupdatetimeout")},H(this.media(),!!s))}this.trigger("loadedplaylist")}},{key:"dispose",value:function e(){this.trigger("dispose");this.stopRequest();f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.finalRenditionTimeout);this.off()}},{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,i){var r=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]}f.clearTimeout(this.finalRenditionTimeout);if(i){var n=t.targetDuration/2*1e3||5*1e3;this.finalRenditionTimeout=f.setTimeout(this.media.bind(this,t,false),n);return}var a=this.state;var s=!this.media_||t.id!==this.media_.id;if(this.master.playlists[t.id].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,i){if(!r.request){return}t.resolvedUri=p(r.handleManifestRedirects,t.resolvedUri,i);if(e){return r.playlistRequestError(r.request,t,a)}r.haveMetadata(i,t.uri,t.id);if(a==="HAVE_MASTER"){r.trigger("loadedmetadata")}else{r.trigger("mediachange")}})}},{key:"pause",value:function e(){this.stopRequest();f.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 i=this;f.clearTimeout(this.mediaUpdateTimeout);var r=this.media();if(t){var n=r?r.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=f.setTimeout(function(){return i.load()},n);return}if(!this.started){this.start();return}if(r&&!r.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,i){if(!t.request){return}t.request=null;if(e){t.error={status:i.status,message:"HLS playlist request error at URL: "+t.srcUrl+".",responseText:i.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}var r=new k;
1t.customTagParsers.forEach(function(e){return r.addParser(e)});t.customTagMappers.forEach(function(e){return r.addTagMapper(e)});r.push(i.responseText);r.end();t.state="HAVE_MASTER";t.srcUrl=p(t.handleManifestRedirects,t.srcUrl,i);r.manifest.uri=t.srcUrl;if(r.manifest.playlists){t.master=r.manifest;B(t.master);F(t.master);t.trigger("loadedplaylist");if(!t.request){t.media(r.manifest.playlists[0])}return}var n=M(0,t.srcUrl);t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:f.location.href,playlists:[{uri:t.srcUrl,id:n,resolvedUri:t.srcUrl,attributes:{}}]};t.master.playlists[n]=t.master.playlists[0];t.master.playlists[t.srcUrl]=t.master.playlists[0];t.haveMetadata(i,t.srcUrl,n);return t.trigger("loadedmetadata")})}}]);return t}(P);var q=r.createTimeRange;var W=function e(t,i){var r=0;var n=i-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:r+a.end,precise:true}}r+=a.duration;if(typeof a.start!=="undefined"){return{result:r+a.start,precise:true}}}return{result:r,precise:false}};var z=function e(t,i){var r=0;var n=void 0;var a=i-t.mediaSequence;for(;a<t.segments.length;a++){n=t.segments[a];if(typeof n.start!=="undefined"){return{result:n.start-r,precise:true}}r+=n.duration;if(typeof n.end!=="undefined"){return{result:n.end-r,precise:true}}}return{result:-1,precise:false}};var G=function e(t,i,r){var n=void 0;var a=void 0;if(typeof i==="undefined"){i=t.mediaSequence+t.segments.length}if(i<t.mediaSequence){return 0}n=W(t,i);if(n.precise){return n.result}a=z(t,i);if(a.precise){return a.result}return n.result+r};var Y=function e(t,i,r){if(!t){return 0}if(typeof r!=="number"){r=0}if(typeof i==="undefined"){if(t.totalDuration){return t.totalDuration}if(!t.endList){return f.Infinity}}return G(t,i,r)};var K=function e(t,i,r){var n=0;if(i>r){var a=[r,i];i=a[0];r=a[1]}if(i<0){for(var s=i;s<Math.min(0,r);s++){n+=t.targetDuration}i=0}for(var o=i;o<r;o++){n+=t.segments[o].duration}return n};var X=function e(t,i){if(!t.segments.length){return 0}var r=t.segments.length;var n=t.segments[r-1].duration||t.targetDuration;var a=typeof i==="number"?i:n+t.targetDuration*2;if(a===0){return r}var s=0;while(r--){s+=t.segments[r].duration;if(s>=a){break}}return Math.max(0,r)};var J=function e(t,i,r,n){if(!t||!t.segments){return null}if(t.endList){return Y(t)}if(i===null){return null}i=i||0;var a=r?X(t,n):t.segments.length;return G(t,t.mediaSequence+a,i)};var Q=function e(t,i,r){var n=true;var a=i||0;var s=J(t,i,n,r);if(s===null){return q()}return q(a,s)};var Z=function e(t){return t-Math.floor(t)===0};var $=function e(t,i){if(Z(i)){return i+t*.1}var r=i.toString().split(".")[1].length;for(var n=1;n<=r;n++){var a=Math.pow(10,n);var s=i*a;if(Z(s)||n===r){return(s+t)/a}}};var ee=$.bind(null,1);var te=$.bind(null,-1);var ie=function e(t,i,r,n){var a=void 0;var s=void 0;var o=t.segments.length;var l=i-n;if(l<0){if(r>0){for(a=r-1;a>=0;a--){s=t.segments[a];l+=te(s.duration);if(l>0){return{mediaIndex:a,startTime:n-K(t,r,a)}}}}return{mediaIndex:0,startTime:i}}if(r<0){for(a=r;a<0;a++){l-=t.targetDuration;if(l<0){return{mediaIndex:0,startTime:i}}}r=0}for(a=r;a<o;a++){s=t.segments[a];l-=ee(s.duration);if(l<0){return{mediaIndex:a,startTime:n+K(t,r,a)}}}return{mediaIndex:o-1,startTime:i}};var re=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 i=re(t);return!t.disabled&&!i};var se=function e(t){return t.disabled};var oe=function e(t){for(var i=0;i<t.segments.length;i++){if(t.segments[i].key){return true}}return false};var le=function e(t){for(var i=0;i<t.segments.length;i++){if(t.segments[i].map){return true}}return false};var ue=function e(t,i){return i.attributes&&i.attributes[t]};var ce=function e(t,i,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;
1if(!ue("BANDWIDTH",r)){return NaN}var a=t*r.attributes.BANDWIDTH;return(a-n*8)/i};var de=function e(t,i){if(t.playlists.length===1){return true}var r=i.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(function(e){if(!ae(e)){return false}return(e.attributes.BANDWIDTH||0)<r}).length===0};var fe={duration:Y,seekable:Q,safeLiveIndex:X,getMediaInfoForTime:ie,isEnabled:ae,isDisabled:se,isBlacklisted:re,isIncompatible:ne,playlistEnd:J,isAes:oe,isFmp4:le,hasAttribute:ue,estimateSegmentRequestTime:ce,isLowestEnabledRendition:de};var he=r.xhr,pe=r.mergeOptions;var ve=function e(){var t=function e(t,i){t=pe({timeout:45e3},t);var n=e.beforeRequest||r.Hls.xhr.beforeRequest;if(n&&typeof n==="function"){var a=n(t);if(a){t=a}}var s=he(t,function(e,t){var r=s.response;if(!e&&r){s.responseTime=Date.now();s.roundTripTime=s.responseTime-s.requestTime;s.bytesReceived=r.byteLength||r.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&&(r||s.responseText)))}i(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 i=void 0;var r=void 0;r=t.offset+t.length-1;i=t.offset;return"bytes="+i+"-"+r};var ge=function e(t){var i={};if(t.byterange){i.Range=me(t.byterange)}return i};function ye(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var _e=function e(t,i){if(!(t instanceof i)){throw new TypeError("Cannot call a class as a function")}};var be=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,i,r){if(i)e(t.prototype,i);if(r)e(t,r);return t}}();var Te=function e(t,i){if(typeof i!=="function"&&i!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof i)}t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(i)Object.setPrototypeOf?Object.setPrototypeOf(t,i):t.__proto__=i};var Se=function e(t,i){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return i&&(typeof i==="object"||typeof i==="function")?i:t};var je=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var i=t[0];var r=t[1];var n=i[4];var a=r[4];var s=void 0;var o=void 0;var l=void 0;var u=[];var c=[];var d=void 0;var f=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[(u[s]=s<<1^(s>>7)*283)^s]=s}for(o=l=0;!n[o];o^=d||1,l=c[l]||1){p=l^l<<1^l<<2^l<<3^l<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=u[f=u[d=u[o]]];m=h*16843009^f*65537^d*257^o*16843008;v=u[p]*257^p*16843008;for(s=0;s<4;s++){i[s][o]=v=v<<24^v>>>8;r[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){i[s]=i[s].slice(0);r[s]=r[s].slice(0)}return t};var ke=null;var Ee=function(){function e(t){_e(this,e);if(!ke){ke=je()}this._tables=[[ke[0][0].slice(),ke[0][1].slice(),ke[0][2].slice(),ke[0][3].slice(),ke[0][4].slice()],[ke[1][0].slice(),ke[1][1].slice(),ke[1][2].slice(),ke[1][3].slice(),ke[1][4].slice()]];var i=void 0;var r=void 0;var n=void 0;var a=void 0;var s=void 0;var o=this._tables[0][4];var l=this._tables[1];var u=t.length;var c=1;if(u!==4&&u!==6&&u!==8){throw new Error("Invalid aes key size")}a=t.slice(0);s=[];this._key=[a,s];for(i=u;i<4*u+28;i++){n=a[i-1];if(i%u===0||u===8&&i%u===4){n=o[n>>>24]<<24^o[n>>16&255]<<16^o[n>>8&255]<<8^o[n&255];if(i%u===0){n=n<<8^n>>>24^c<<24;c=c<<1^(c>>7)*283}}a[i]=a[i-u]^n}for(r=0;i;r++,i--){n=a[r&3?i:i-4];if(i<=4||r<4){s[r]=n}else{s[r]=l[0][o[n>>>24]]^l[1][o[n>>16&255]]^l[2][o[n>>8&255]]^l[3][o[n&255]]}}}e.prototype.decrypt=function e(t,i,r,n,a,s){var o=this._key[1];var l=t^o[0];var u=n^o[1];var c=r^o[2];var d=i^o[3];var f=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 j=y[4];for(m=0;m<v;m++){f=_[l>>>24]^b[u>>16&255]^T[c>>
18&255]^S[d&255]^o[g];h=_[u>>>24]^b[c>>16&255]^T[d>>8&255]^S[l&255]^o[g+1];p=_[c>>>24]^b[d>>16&255]^T[l>>8&255]^S[u&255]^o[g+2];d=_[d>>>24]^b[l>>16&255]^T[u>>8&255]^S[c&255]^o[g+3];g+=4;l=f;u=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=j[l>>>24]<<24^j[u>>16&255]<<16^j[c>>8&255]<<8^j[d&255]^o[g++];f=l;l=u;u=c;c=d;d=f}};return e}();var we=function(){function e(){_e(this,e);this.listeners={}}e.prototype.on=function e(t,i){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(i)};e.prototype.off=function e(t,i){if(!this.listeners[t]){return false}var r=this.listeners[t].indexOf(i);this.listeners[t].splice(r,1);return r>-1};e.prototype.trigger=function e(t){var i=this.listeners[t];if(!i){return}if(arguments.length===2){var r=i.length;for(var n=0;n<r;++n){i[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=i.length;for(var o=0;o<s;++o){i[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 Ce=function(e){Te(t,e);function t(){_e(this,t);var i=Se(this,e.call(this,we));i.jobs=[];i.delay=1;i.timeout_=null;return i}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}(we);var Ie=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var Ae=function e(t,i,r){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new Ee(Array.prototype.slice.call(i));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var l=void 0;var u=void 0;var c=void 0;var d=void 0;var f=void 0;var h=void 0;var p=void 0;var v=void 0;var m=void 0;l=r[0];u=r[1];c=r[2];d=r[3];for(m=0;m<n.length;m+=4){f=Ie(n[m]);h=Ie(n[m+1]);p=Ie(n[m+2]);v=Ie(n[m+3]);a.decrypt(f,h,p,v,o,m);o[m]=Ie(o[m]^l);o[m+1]=Ie(o[m+1]^u);o[m+2]=Ie(o[m+2]^c);o[m+3]=Ie(o[m+3]^d);l=f;u=h;c=p;d=v}return s};var xe=function(){function e(t,i,r,n){_e(this,e);var a=e.STEP;var s=new Int32Array(t.buffer);var o=new Uint8Array(t.byteLength);var l=0;this.asyncStream_=new Ce;this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),i,r,o));for(l=a;l<s.length;l+=a){r=new Uint32Array([Ie(s[l-4]),Ie(s[l-3]),Ie(s[l-2]),Ie(s[l-1])]);this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),i,r,o))}this.asyncStream_.push(function(){n(null,ye(o))})}e.prototype.decryptChunk_=function e(t,i,r,n){return function(){var e=Ae(t,i,r);n.set(e,t.byteOffset)}};be(e,null,[{key:"STEP",get:function e(){return 32e3}}]);return e}();var Oe=function e(t,i){return t.start(i)+"-"+t.end(i)};var Pe=function e(t,i){var r=t.toString(16);return"00".substring(0,2-r.length)+r+(i%2?" ":"")};var De=function e(t){if(t>=32&&t<126){return String.fromCharCode(t)}return"."};var Re=function e(t){var i={};Object.keys(t).forEach(function(e){var r=t[e];if(ArrayBuffer.isView(r)){i[e]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}}else{i[e]=r}});return i};var Le=function e(t){var i=t.byterange||{length:Infinity,offset:0};return[i.length,i.offset,t.resolvedUri].join(",")};var Ne=function e(t){return t.resolvedUri};var Ue=function e(t){var i=Array.prototype.slice.call(t);var r=16;var n="";var a=void 0;var s=void 0;for(var o=0;o<i.length/r;o++){a=i.slice(o*r,o*r+r).map(Pe).join("");s=i.slice(o*r,o*r+r).map(De).join("");n+=a+" "+s+"\n"}return n};var Me=function e(t){var i=t.bytes;return Ue(i)};var Be=function e(t){var i="";var r=void 0;for(r=0;r<t.length;r++){i+=Oe(t,r)+" "}return i};var Fe=Object.freeze({createTransferableMessage:Re,initSegmentId:Le,segmentKeyId:Ne,hexDump:Ue,tagDump:Me,textRanges:Be});var He=.25;var Ve=function e(t,i){if(!i.dateTimeObject){return null}var r=i.videoTimingInfo.transmuxerPrependedSeconds;var n=i.videoTimingInfo.transmuxedPresentationStart;var a=n+r;var s=t-a;return new Date(i.dateTimeObject.getTime()+s*1e3)};var qe=function e(t){return t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds};var We=function e(t,i){var r=void 0;try{r=new Date(t)}catch(e){return null}if(!i||!i.segments||i.segments.length===0){return null}var n=i.segments[0];if(r<n.dateTimeObject){return null}for(var a=0;a<i.segments.length-1;a++){n=i.segments[a];var s=i.segments[a+1].dateTimeObject;if(r<s){break}}var o=i.segments[i.segments.length-1];var l=o.dateTimeObject;var u=o.videoTimingInfo?qe(o.videoTimingInfo):o.duration+o.duration*He;var c=new Date(l.getTime()+u*1e3);if(r>c){return null}if(r>l){n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:fe.duration(i,i.mediaSequence+i.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"}};var ze=function e(t,i){if(!i||!i.segments||i.segments.length===0){return null}var r=0;var n=void 0;for(var a=0;a<i.segments.length;a++){n=i.segments[a];r=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration;if(t<=r){break}}var s=i.segments[i.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t){return null}if(t>r){if(t>r+s.duration*He){return null}n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}};var Ge=function e(t,i){var r=void 0;var n=void 0;try{r=new Date(t);n=new Date(i)}catch(e){}var a=r.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 i=0;i<t.segments.length;i++){var r=t.segments[i];if(!r.dateTimeObject){return false}}return true};var Ke=function e(t){var i=t.playlist,r=t.time,n=r===undefined?undefined:r,a=t.callback;if(!a){throw new Error("getProgramTime: callback must be provided")}if(!i||n===undefined){return a({message:"getProgramTime: playlist and time must be provided"})}var s=ze(n,i);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 l=Ve(n,s.segment);if(l){o.programDateTime=l.toISOString()}return a(null,o)};var Xe=function e(t){var i=t.programTime,r=t.playlist,n=t.retryCount,a=n===undefined?2:n,s=t.seekTo,o=t.pauseAfterSeek,l=o===undefined?true:o,u=t.tech,c=t.callback;if(!c){throw new Error("seekToProgramTime: callback must be provided")}if(typeof i==="undefined"||!r||!s){return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"})}if(!r.endList&&!u.hasStarted_){return c({message:"player must be playing a live stream to start buffering"})}if(!Ye(r)){return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri})}var d=We(i,r);if(!d){return c({message:i+" was not found in the stream"})}var f=d.segment;var h=Ge(f.dateTimeObject,i);if(d.type==="estimate"){if(a===0){return c({message:i+" is not buffered yet. Try again"})}s(d.estimatedStart+h);u.one("seeked",function(){e({programTime:i,playlist:r,retryCount:a-1,seekTo:s,pauseAfterSeek:l,tech:u,callback:c})});return}var p=f.start+h;var v=function e(){return c(null,u.currentTime())};u.one("seeked",v);if(l){u.pause()}s(p)};var Je=1/30;var Qe=Je*3;var Ze=function e(t,i){var n=[];var a=void 0;if(t&&t.length){for(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 $e=function e(t,i){return Ze(t,function(e,t){return e-Qe<=i&&t+Qe>=i})};var et=function e(t,i){return Ze(t,function(e){return e-Je>=i})};var tt=function e(t){if(t.length<2){return r.createTimeRanges()}var i=[];for(var n=1;n<t.length;n++){var a=t.end(n-1);var s=t.start(n);i.push([a,s])}return r.createTimeRanges(i)};var it=function e(t){var i=[];if(!t||!t.length){return""}for(var r=0;r<t.length;r++){i.push(t.start(r)+" => "+t.end(r))}return i.join(", ")};var rt=function e(t,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=t.length?t.end(t.length-1):0;return(n-i)/r};var nt=function e(t){var i=[];for(var r=0;r<t.length;r++){i.push({start:t.start(r),end:t.end(r)})}return i};var at=function e(t,i,r){var n=i.player_;if(r.captions&&r.captions.length){if(!t.inbandTextTracks_){t.inbandTextTracks_={}}
1for(var a in r.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(r.metadata&&r.metadata.length&&!t.metadataTrack_){t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;t.metadataTrack_.inBandMetadataTrackDispatchType=r.metadata.dispatchType}};var st=function e(t,i,r){var n=void 0;var a=void 0;if(!r){return}if(!r.cues){return}n=r.cues.length;while(n--){a=r.cues[n];if(a.startTime<=i&&a.endTime>=t){r.removeCue(a)}}};var ot=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 lt=function e(t){var i=void 0;if(isNaN(t)||Math.abs(t)===Infinity){i=Number.MAX_VALUE}else{i=t}return i};var ut=function e(t,i,r){var n=f.WebKitDataCue||f.VTTCue;if(i){i.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(r){var a=lt(t.mediaSource_.duration);r.forEach(function(e){var t=e.cueTime+this.timestampOffset;if(typeof t!=="number"||f.isNaN(t)||t<0||!(t<Infinity)){return}e.frames.forEach(function(e){var i=new n(t,t,e.value||e.url||e.data||"");i.frame=e;i.value=e;ot(i);this.metadataTrack_.addCue(i)},this)},t);
1if(t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){var s=t.metadataTrack_.cues;var o=[];for(var l=0;l<s.length;l++){if(s[l]){o.push(s[l])}}var u=o.reduce(function(e,t){var i=e[t.startTime]||[];i.push(t);e[t.startTime]=i;return e},{});var c=Object.keys(u).sort(function(e,t){return Number(e)-Number(t)});c.forEach(function(e,t){var i=u[e];var r=Number(c[t+1])||a;i.forEach(function(e){e.endTime=r})})}}};var ct=typeof e!=="undefined"?e:{},dt=typeof Symbol==="undefined"?"__target":Symbol(),ft="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 i(r){var n=this;if(!t){return new vt(e)}else if(vt&&!r){var a=t.toString().replace(/^function.+?{/,"").slice(0,-1),s=bt(a);this[dt]=new vt(s);Tt(this[dt],s);return this[dt]}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:ft}))}catch(i){var t=new ht;t.append(e);return pt.createObjectURL(t.getBlob(type))}}function Tt(e,t){if(!e||!t)return;var i=e.terminate;e.objURL=t;e.terminate=function(){if(e.objURL)pt.revokeObjectURL(e.objURL);i.call(e)}}var St=new mt("./transmuxer-worker.worker.js",function(e,t){var i=this;var r=function(){var e=function e(){this.init=function(){var e={};this.on=function(t,i){if(!e[t]){e[t]=[]}e[t]=e[t].concat(i)};this.off=function(t,i){var r;if(!e[t]){return false}r=e[t].indexOf(i);e[t]=e[t].slice();e[t].splice(r,1);return r>-1};this.trigger=function(t){var i,r,n,a;i=e[t];if(!i){return}if(arguments.length===2){n=i.length;for(r=0;r<n;++r){i[r].call(this,arguments[1])}}else{a=[];r=arguments.length;for(r=1;r<arguments.length;++r){a.push(arguments[r])}n=i.length;for(r=0;r<n;++r){i[r].apply(this,a)}}};this.dispose=function(){e={}}}};e.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});this.on("partialdone",function(t){e.partialFlush(t)});this.on("endedtimeline",function(t){e.endTimeline(t)});this.on("reset",function(t){e.reset(t)});return e};e.prototype.push=function(e){this.trigger("data",e)};e.prototype.flush=function(e){this.trigger("done",e)};e.prototype.partialFlush=function(e){this.trigger("partialdone",e)};e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)};e.prototype.reset=function(e){this.trigger("reset",e)};var t=e;var r=Math.pow(2,32)-1;var n,a,s,o,l,u,c,d,f,h,p,v,m,g,y,_,b,T,S,j,k,E,w,C,I,A,x,O,P,D,R,L,N,U,M,B;(function(){var e;w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],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)]}}C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);I=new Uint8Array([0,0,0,1]);x=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:x,audio:O};L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);R=new Uint8Array([0,0,0,0,0,0,0,0]);N=new Uint8Array([0,0,0,0,0,0,0,0]);U=N;M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);B=N;D=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();n=function e(t){var i=[],r=0,n,a,s;for(n=1;n<arguments.length;n++){i.push(arguments[n])}n=i.length;while(n--){r+=i[n].byteLength}a=new Uint8Array(r+8);s=new DataView(a.buffer,a.byteOffset,a.byteLength);s.setUint32(0,a.byteLength);a.set(t,4);for(n=0,r=8;n<i.length;n++){a.set(i[n],r);r+=i[n].byteLength}return a};a=function e(){return n(w.dinf,n(w.dref,L))};s=function e(t){return n(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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))};o=function e(){return n(w.ftyp,C,I,C,A)};_=function e(t){return n(w.hdlr,P[t])};l=function e(t){return n(w.mdat,t)};y=function e(t){var i=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){i[12]=t.samplerate>>>24&255;i[13]=t.samplerate>>>16&255;i[14]=t.samplerate>>>8&255;i[15]=t.samplerate&255}return n(w.mdhd,i)};g=function e(t){return n(w.mdia,y(t),_(t.type),c(t))};u=function e(t){return n(w.mfhd,new Uint8Array([0,0,0,0,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255]))};c=function e(t){return n(w.minf,t.type==="video"?n(w.vmhd,D):n(w.smhd,R),a(),T(t))};d=function e(t,i){var r=[],a=i.length;while(a--){r[a]=j(i[a])}return n.apply(null,[w.moof,u(t)].concat(r))};f=function e(t){var i=t.length,r=[];while(i--){r[i]=v(t[i])}return n.apply(null,[w.moov,p(4294967295)].concat(r).concat(h(t)))};h=function e(t){var i=t.length,r=[];while(i--){r[i]=k(t[i])}return n.apply(null,[w.mvex].concat(r))};p=function e(t){var i=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 n(w.mvhd,i)};b=function e(t){var i=t.samples||[],r=new Uint8Array(4+i.length),a,s;for(s=0;s<i.length;s++){a=i[s].flags;r[s+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return n(w.sdtp,r)};T=function e(t){return n(w.stbl,S(t),n(w.stts,B),n(w.stsc,U),n(w.stsz,M),n(w.stco,N))};(function(){var e,t;S=function i(r){return n(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),r.type==="video"?e(r):t(r))};e=function e(t){var i=t.sps||[],r=t.pps||[],a=[],s=[],o,l;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<r.length;o++){s.push((r[o].byteLength&65280)>>>8);s.push(r[o].byteLength&255);s=s.concat(Array.prototype.slice.call(r[o]))}l=[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,(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]),n(w.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length],a,[r.length],s))),n(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))];if(t.sarRatio){var u=t.sarRatio[0],c=t.sarRatio[1];l.push(n(w.pasp,new Uint8Array([(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,(c&4278190080)>>24,(c&16711680)>>16,(c&65280)>>8,c&255])))}return n.apply(null,l)};t=function e(t){return n(w.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]),s(t))}})();m=function e(t){var i=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 n(w.tkhd,i)};j=function e(t){var i,a,s,o,l,u,c;i=n(w.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]));u=Math.floor(t.baseMediaDecodeTime/(r+1));c=Math.floor(t.baseMediaDecodeTime%(r+1));a=n(w.tfdt,new Uint8Array([1,0,0,0,u>>>24&255,u>>>16&255,u>>>8&255,u&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255]));l=32+20+8+16+8+8;if(t.type==="audio"){s=E(t,l);return n(w.traf,i,a,s)}o=b(t);s=E(t,o.length+l);return n(w.traf,i,a,s,o)};v=function e(t){t.duration=t.duration||4294967295;return n(w.trak,m(t),g(t))};k=function e(t){var i=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"){i[i.length-1]=0}return n(w.trex,i)};(function(){var e,t,i;i=function e(t,i){var r=0,n=0,a=0,s=0;
1if(t.length){if(t[0].duration!==undefined){r=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,r|n|a|s,1,(t.length&4278190080)>>>24,(t.length&16711680)>>>16,(t.length&65280)>>>8,t.length&255,(i&4278190080)>>>24,(i&16711680)>>>16,(i&65280)>>>8,i&255]};t=function e(t,r){var a,s,o,l;s=t.samples||[];r+=8+12+16*s.length;a=i(s,r);for(l=0;l<s.length;l++){o=s[l];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 n(w.trun,new Uint8Array(a))};e=function e(t,r){var a,s,o,l;s=t.samples||[];r+=8+12+8*s.length;a=i(s,r);for(l=0;l<s.length;l++){o=s[l];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 n(w.trun,new Uint8Array(a))};E=function i(r,n){if(r.type==="audio"){return e(r,n)}return t(r,n)}})();var F={ftyp:o,mdat:l,moof:d,moov:f,initSegment:function e(t){var i=o(),r=f(t),n;n=new Uint8Array(i.byteLength+r.byteLength);n.set(i);n.set(r,i.byteLength);return n}};var H=function e(t){var i,r,n=[],a=[];a.byteLength=0;a.nalCount=0;a.duration=0;n.byteLength=0;for(i=0;i<t.length;i++){r=t[i];if(r.nalUnitType==="access_unit_delimiter_rbsp"){if(n.length){n.duration=r.dts-n.dts;a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n)}n=[r];n.byteLength=r.data.byteLength;n.pts=r.pts;n.dts=r.dts}else{if(r.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"){n.keyFrame=true}n.duration=r.dts-n.dts;n.byteLength+=r.data.byteLength;n.push(r)}}if(a.length&&(!n.duration||n.duration<=0)){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n);return a};var V=function e(t){var i,r,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(i=0;i<t.length;i++){r=t[i];if(r.keyFrame){if(n.length){a.push(n);a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration}n=[r];n.nalCount=r.length;n.byteLength=r.byteLength;n.pts=r.pts;n.dts=r.dts;n.duration=r.duration}else{n.duration+=r.duration;n.nalCount+=r.length;n.byteLength+=r.byteLength;n.push(r)}}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 q=function e(t){var i;if(!t[0][0].keyFrame&&t.length>1){i=t.shift();t.byteLength-=i.byteLength;t.nalCount-=i.nalCount;t[0][0].dts=i.dts;t[0][0].pts=i.pts;t[0][0].duration+=i.duration}return t};var W=function e(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}};var z=function e(t,i){var r=W();r.dataOffset=i;r.compositionTimeOffset=t.pts-t.dts;r.duration=t.duration;r.size=4*t.length;r.size+=t.byteLength;if(t.keyFrame){r.flags.dependsOn=2;r.flags.isNonSyncSample=0}return r};var G=function e(t,i){var r,n,a,s,o,l=i||0,u=[];for(r=0;r<t.length;r++){s=t[r];for(n=0;n<s.length;n++){o=s[n];a=z(o,l);l+=a.size;u.push(a)}}return u};var Y=function e(t){var i,r,n,a,s,o,l=0,u=t.byteLength,c=t.nalCount,d=u+4*c,f=new Uint8Array(d),h=new DataView(f.buffer);for(i=0;i<t.length;i++){a=t[i];for(r=0;r<a.length;r++){s=a[r];for(n=0;n<s.length;n++){o=s[n];h.setUint32(l,o.data.byteLength);l+=4;f.set(o.data,l);l+=o.data.byteLength}}}return f};var K=function e(t,i){var r,n=i||0,a=[];r=z(t,n);a.push(r);return a};var X=function e(t){var i,r,n=0,a=t.byteLength,s=t.length,o=a+4*s,l=new Uint8Array(o),u=new DataView(l.buffer);for(i=0;i<t.length;i++){r=t[i];u.setUint32(n,r.data.byteLength);n+=4;l.set(r.data,n);n+=r.data.byteLength}return l};var J={groupNalsIntoFrames:H,groupFramesIntoGops:V,extendFirstKeyFrame:q,generateSampleTable:G,concatenateNalData:Y,generateSampleTableForFrame:K,concatenateNalDataForFrame:X};var Q=[33,16,5,32,164,27];var Z=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var $=function e(t){var i=[];while(t--){i.push(0)}return i};var ee=function e(t){return Object.keys(t).reduce(function(e,i){e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[]));return e},{})};var te={96000:[Q,[227,64],$(154),[56]],88200:[Q,[231],$(170),[56]],64000:[Q,[248,192],$(240),[56]],48000:[Q,[255,192],$(268),[55,148,128],$(54),[112]],44100:[Q,[255,192],$(268),[55,163,128],$(84),[112]],32000:[Q,[255,192],$(268),[55,234],$(226),[112]],24000:[Q,[255,192],$(268),[55,255,128],$(268),[111,112],$(126),[224]],16000:[Q,[255,192],$(268),[55,255,128],$(268),[111,255],$(269),[223,108],$(195),[1,192]],12000:[Z,$(268),[3,127,248],$(268),[6,255,240],$(268),[13,255,224],$(268),[27,253,128],$(259),[56]],11025:[Z,$(268),[3,127,248],$(268),[6,255,240],$(268),[13,255,224],$(268),[27,255,192],$(268),[55,175,128],$(108),[112]],8000:[Z,$(268),[3,121,16],$(47),[7]]};var ie=ee(te);var re=9e4,ne,ae,se,oe,le,ue,ce;ne=function e(t){return t*re};ae=function e(t,i){return t*i};se=function e(t){return t/re};oe=function e(t,i){return t/i};le=function e(t,i){return ne(oe(t,i))};ue=function e(t,i){return ae(se(t),i)};ce=function e(t,i,r){return se(r?t:t-i)};var de={ONE_SECOND_IN_TS:re,secondsToVideoTs:ne,secondsToAudioTs:ae,videoTsToSeconds:se,audioTsToSeconds:oe,audioTsToVideoTs:le,videoTsToAudioTs:ue,metadataTsToSeconds:ce};var fe=function e(t){var i,r,n=0;for(i=0;i<t.length;i++){r=t[i];n+=r.data.byteLength}return n};var he=function e(t,i,r,n){var a,s=0,o=0,l=0,u=0,c,d,f;if(!i.length){return}a=de.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate);s=Math.ceil(de.ONE_SECOND_IN_TS/(t.samplerate/1024));if(r&&n){o=a-Math.max(r,n);l=Math.floor(o/s);u=l*s}if(l<1||u>de.ONE_SECOND_IN_TS/2){return}c=ie[t.samplerate];if(!c){c=i[0].data}for(d=0;d<l;d++){f=i[0];i.splice(0,0,{data:c,dts:f.dts-s,pts:f.pts-s})}t.baseMediaDecodeTime-=Math.floor(de.videoTsToAudioTs(u,t.samplerate))};var pe=function e(t,i,r){if(i.minSegmentDts>=r){return t}i.minSegmentDts=Infinity;return t.filter(function(e){if(e.dts>=r){i.minSegmentDts=Math.min(i.minSegmentDts,e.dts);i.minSegmentPts=i.minSegmentDts;return true}return false})};var ve=function e(t){var i,r,n=[];for(i=0;i<t.length;i++){r=t[i];n.push({size:r.data.byteLength,duration:1024})}return n};var me=function e(t){var i,r,n=0,a=new Uint8Array(fe(t));for(i=0;i<t.length;i++){r=t[i];a.set(r.data,n);n+=r.data.byteLength}return a};var ge={prefixWithSilence:he,trimAdtsFramesByEarliestDts:pe,generateSampleTable:ve,concatenateFrameData:me};var ye=de.ONE_SECOND_IN_TS;var _e=function e(t,i){if(typeof i.pts==="number"){if(t.timelineStartInfo.pts===undefined){t.timelineStartInfo.pts=i.pts}
1if(t.minSegmentPts===undefined){t.minSegmentPts=i.pts}else{t.minSegmentPts=Math.min(t.minSegmentPts,i.pts)}if(t.maxSegmentPts===undefined){t.maxSegmentPts=i.pts}else{t.maxSegmentPts=Math.max(t.maxSegmentPts,i.pts)}}if(typeof i.dts==="number"){if(t.timelineStartInfo.dts===undefined){t.timelineStartInfo.dts=i.dts}if(t.minSegmentDts===undefined){t.minSegmentDts=i.dts}else{t.minSegmentDts=Math.min(t.minSegmentDts,i.dts)}if(t.maxSegmentDts===undefined){t.maxSegmentDts=i.dts}else{t.maxSegmentDts=Math.max(t.maxSegmentDts,i.dts)}}};var be=function e(t){delete t.minSegmentDts;delete t.maxSegmentDts;delete t.minSegmentPts;delete t.maxSegmentPts};var Te=function e(t,i){var r,n,a=t.minSegmentDts;if(!i){a-=t.timelineStartInfo.dts}r=t.timelineStartInfo.baseMediaDecodeTime;r+=a;r=Math.max(0,r);if(t.type==="audio"){n=t.samplerate/ye;r*=n;r=Math.floor(r)}return r};var Se={clearDtsInfo:be,calculateTrackBaseMediaDecodeTime:Te,collectDtsInfo:_e};var je=4,ke=128;var Ee=function e(t){var i=0,r={payloadType:-1,payloadSize:0},n=0,a=0;while(i<t.byteLength){if(t[i]===ke){break}while(t[i]===255){n+=255;i++}n+=t[i++];while(t[i]===255){a+=255;i++}a+=t[i++];if(!r.payload&&n===je){r.payloadType=n;r.payloadSize=a;r.payload=t.subarray(i,i+a);break}i+=a;n=0;a=0}return r};var we=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 Ce=function e(t,i){var r=[],n,a,s,o;if(!(i[0]&64)){return r}a=i[0]&31;for(n=0;n<a;n++){s=n*3;o={type:i[s+2]&3,pts:t};if(i[s+2]&4){o.ccData=i[s+3]<<8|i[s+4];r.push(o)}}return r};var Ie=function e(t){var i=t.byteLength,r=[],n=1,a,s;while(n<i-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){r.push(n+2);n+=2}else{n++}}if(r.length===0){return t}a=i-r.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===r[0]){o++;r.shift()}s[n]=t[o]}return s};var Ae={parseSei:Ee,parseUserData:we,parseCaptionPackets:Ce,discardEmulationPreventionBytes:Ie,USER_DATA_REGISTERED_ITU_T_T35:je};var xe=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new Ne(0,0),new Ne(0,1),new Ne(1,0),new Ne(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("partialdone",this.trigger.bind(this,"partialdone"));e.on("done",this.trigger.bind(this,"done"))},this)};xe.prototype=new t;xe.prototype.push=function(e){var t,i,r;if(e.nalUnitType!=="sei_rbsp"){return}t=Ae.parseSei(e.escapedRBSP);if(t.payloadType!==Ae.USER_DATA_REGISTERED_ITU_T_T35){return}i=Ae.parseUserData(t);if(!i){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}r=Ae.parseCaptionPackets(e.pts,i);this.captionPackets_=this.captionPackets_.concat(r);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};xe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return e==="flush"?t.flush():t.partialFlush()},this)};xe.prototype.flushStream=function(e){if(!this.captionPackets_.length){this.flushCCStreams(e);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.flushCCStreams(e)};xe.prototype.flush=function(){return this.flushStream("flush")};xe.prototype.partialFlush=function(){return this.flushStream("partialFlush")};xe.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};xe.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)};xe.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};xe.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};xe.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var Oe={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 Pe=function e(t){if(t===null){return""}t=Oe[t]||t;return String.fromCharCode(t)};var De=14;var Re=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var Le=function e(){var t=[],i=De+1;while(i--){t.push("")}return t};var Ne=function e(t,i){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=i||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,i,r,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}r=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);i=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=i;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_=Le()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=Le()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=Le()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(r,n)){r=(r&3)<<8;a=Pe(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(r,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)}r=(r&3)<<8;a=Pe(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(r,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(r,n)){this.column_+=n&3}else if(this.isPAC(r,n)){var s=Re.indexOf(t&7968);
1if(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(r)){if(n===0){n=null}a=Pe(r);a+=Pe(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};Ne.prototype=new t;Ne.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_})}};Ne.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=Le();this.nonDisplayed_=Le();this.lastControlCode_=null;this.column_=0;this.row_=De;this.rollUpRows_=2;this.formatting_=[]};Ne.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};Ne.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};Ne.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};Ne.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};Ne.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};Ne.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};Ne.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};Ne.prototype.isNormalChar=function(e){return e>=32&&e<=127};Ne.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=De;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=Le();this.displayed_=Le()}if(t!==undefined&&t!==this.row_){for(var i=0;i<this.rollUpRows_;i++){this.displayed_[t-i]=this.displayed_[this.row_-i];this.displayed_[this.row_-i]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};Ne.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)};Ne.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)};Ne.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};Ne.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};Ne.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<De+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};Ne.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};var Ue={CaptionStream:xe,Cea608Stream:Ne};var Me={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var Be=8589934592;var Fe=4294967296;var He="shared";var Ve=function e(t,i){var r=1;if(t>i){r=-1}while(Math.abs(i-t)>Fe){t+=r*Be}return t};var qe=function e(t){var i,r;e.prototype.init.call(this);this.type_=t||He;this.push=function(e){if(this.type_!==He&&e.type!==this.type_){return}if(r===undefined){r=e.dts}e.dts=Ve(e.dts,r);e.pts=Ve(e.pts,r);i=e.dts;this.trigger("data",e)};this.flush=function(){r=i;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){r=void 0;i=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};qe.prototype=new t;var We={TimestampRolloverStream:qe,handleRollover:Ve};var ze=function e(t,i,r){var n,a="";for(n=i;n<r;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a},Ge=function e(t,i,r){return decodeURIComponent(ze(t,i,r))},Ye=function e(t,i,r){return unescape(ze(t,i,r))},Ke=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Xe={TXXX:function e(t){var i;if(t.data[0]!==3){return}for(i=1;i<t.data.length;i++){if(t.data[i]===0){t.description=Ge(t.data,1,i);t.value=Ge(t.data,i+1,t.data.length).replace(/\0*$/,"");break}}t.data=t.value},WXXX:function e(t){var i;if(t.data[0]!==3){return}for(i=1;i<t.data.length;i++){if(t.data[i]===0){t.description=Ge(t.data,1,i);t.url=Ge(t.data,i+1,t.data.length);break}}},PRIV:function e(t){var i;for(i=0;i<t.data.length;i++){if(t.data[i]===0){t.owner=Ye(t.data,0,i);break}}t.privateData=t.data.subarray(i+1);t.data=t.privateData}},Je;Je=function e(t){var i={debug:!!(t&&t.debug),descriptor:t&&t.descriptor},r=0,n=[],a=0,s;Je.prototype.init.call(this);this.dispatchType=Me.METADATA_STREAM_TYPE.toString(16);if(i.descriptor){for(s=0;s<i.descriptor.length;s++){this.dispatchType+=("00"+i.descriptor[s].toString(16)).slice(-2)}}this.push=function(e){var t,s,o,l,u,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(i.debug){console.log("Skipping unrecognized metadata packet")}return}n.push(e);a+=e.data.byteLength;if(n.length===1){r=Ke(e.data.subarray(6,10));r+=10}if(a<r){return}t={data:new Uint8Array(r),frames:[],pts:n[0].pts,dts:n[0].dts};for(u=0;
1u<r;){t.data.set(n[0].data.subarray(0,r-u),u);u+=n[0].data.byteLength;a-=n[0].data.byteLength;n.shift()}s=10;if(t.data[5]&64){s+=4;s+=Ke(t.data.subarray(10,14));r-=Ke(t.data.subarray(16,20))}do{o=Ke(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]);l={id:c,data:t.data.subarray(s+10,s+o+10)};l.key=l.id;if(Xe[l.id]){Xe[l.id](l);if(l.owner==="com.apple.streaming.transportStreamTimestamp"){var d=l.data,f=(d[3]&1)<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;f*=4;f+=d[7]&3;l.timeStamp=f;if(t.pts===undefined&&t.dts===undefined){t.pts=l.timeStamp;t.dts=l.timeStamp}this.trigger("timestamp",l)}}t.frames.push(l);s+=10;s+=o}while(s<r);this.trigger("data",t)}};Je.prototype=new t;var Qe=Je;var Ze=We.TimestampRolloverStream;var $e,et,tt;var it=188,rt=71;$e=function e(){var t=new Uint8Array(it),i=0;$e.prototype.init.call(this);this.push=function(e){var r=0,n=it,a;if(i){a=new Uint8Array(e.byteLength+i);a.set(t.subarray(0,i));a.set(e,i);i=0}else{a=e}while(n<a.byteLength){if(a[r]===rt&&a[n]===rt){this.trigger("data",a.subarray(r,n));r+=it;n+=it;continue}r++;n++}if(r<a.byteLength){t.set(a.subarray(r),0);i=a.byteLength-r}};this.flush=function(){if(i===it&&t[0]===rt){this.trigger("data",t);i=0}this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.reset=function(){i=0;this.trigger("reset")}};$e.prototype=new t;et=function e(){var t,i,r,n;et.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"){i(t.subarray(a),n)}else{r(t.subarray(a),n)}};i=function e(t,i){i.section_number=t[7];i.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];i.pmtPid=n.pmtPid};r=function e(t,i){var r,a,s,o;if(!(t[5]&1)){return}n.programMapTable={video:null,audio:null,"timed-metadata":{}};r=(t[1]&15)<<8|t[2];a=3+r-4;s=(t[10]&15)<<8|t[11];o=12+s;while(o<a){var l=t[o];var u=(t[o+1]&31)<<8|t[o+2];if(l===Me.H264_STREAM_TYPE&&n.programMapTable.video===null){n.programMapTable.video=u}else if(l===Me.ADTS_STREAM_TYPE&&n.programMapTable.audio===null){n.programMapTable.audio=u}else if(l===Me.METADATA_STREAM_TYPE){n.programMapTable["timed-metadata"][u]=l}o+=((t[o+3]&15)<<8|t[o+4])+5}i.programMapTable=n.programMapTable};this.push=function(e){var i={},r=4;i.payloadUnitStartIndicator=!!(e[1]&64);i.pid=e[1]&31;i.pid<<=8;i.pid|=e[2];if((e[3]&48)>>>4>1){r+=e[r]+1}if(i.pid===0){i.type="pat";t(e.subarray(r),i);this.trigger("data",i)}else if(i.pid===this.pmtPid){i.type="pmt";t(e.subarray(r),i);this.trigger("data",i);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([e,r,i])}else{this.processPes_(e,r,i)}};this.processPes_=function(e,t,i){if(i.pid===this.programMapTable.video){i.streamType=Me.H264_STREAM_TYPE}else if(i.pid===this.programMapTable.audio){i.streamType=Me.ADTS_STREAM_TYPE}else{i.streamType=this.programMapTable["timed-metadata"][i.pid]}i.type="pes";i.data=e.subarray(t);this.trigger("data",i)}};et.prototype=new t;et.STREAM_TYPES={h264:27,adts:15};tt=function e(){var t=this,i={data:[],size:0},r={data:[],size:0},n={data:[],size:0},a,s=function e(t,i){var r;i.packetLength=6+(t[4]<<8|t[5]);i.dataAlignmentIndicator=(t[6]&4)!==0;r=t[7];if(r&192){i.pts=(t[9]&14)<<27|(t[10]&255)<<20|(t[11]&254)<<12|(t[12]&255)<<5|(t[13]&254)>>>3;i.pts*=4;i.pts+=(t[13]&6)>>>1;i.dts=i.pts;if(r&64){i.dts=(t[14]&14)<<27|(t[15]&255)<<20|(t[16]&254)<<12|(t[17]&255)<<5|(t[18]&254)>>>3;i.dts*=4;i.dts+=(t[18]&6)>>>1}}i.data=t.subarray(9+t[8])},o=function e(i,r,n){var a=new Uint8Array(i.size),o={type:r},l=0,u=0,c=false,d;if(!i.data.length||i.size<9){return}o.trackId=i.data[0].pid;for(l=0;l<i.data.length;l++){d=i.data[l];a.set(d.data,u);u+=d.data.byteLength}s(a,o);c=r==="video"||o.packetLength<=i.size;if(n||c){i.size=0;i.data.length=0}if(c){t.trigger("data",o)}};tt.prototype.init.call(this);this.push=function(e){({pat:function e(){},pes:function t(){var a,s;switch(e.streamType){case Me.H264_STREAM_TYPE:case Me.H264_STREAM_TYPE:a=i;s="video";break;case Me.ADTS_STREAM_TYPE:a=r;s="audio";break;case Me.METADATA_STREAM_TYPE:a=n;s="timed-metadata";break;default:return}if(e.payloadUnitStartIndicator){o(a,s,true)}a.data.push(e);a.size+=e.data.byteLength},pmt:function i(){var r={type:"metadata",tracks:[]};a=e.programMapTable;if(a.video!==null){r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+a.video,codec:"avc",type:"video"})}if(a.audio!==null){r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+a.audio,codec:"adts",type:"audio"})}t.trigger("data",r)}})[e.type]()};this.reset=function(){i.size=0;i.data.length=0;r.size=0;r.data.length=0;this.trigger("reset")};this.flushStreams_=function(){o(i,"video");o(r,"audio");o(n,"timed-metadata")};this.flush=function(){this.flushStreams_();this.trigger("done")}};tt.prototype=new t;var nt={PAT_PID:0,MP2T_PACKET_LENGTH:it,TransportPacketStream:$e,TransportParseStream
1:et,ElementaryStream:tt,TimestampRolloverStream:Ze,CaptionStream:Ue.CaptionStream,Cea608Stream:Ue.Cea608Stream,MetadataStream:Qe};for(var at in Me){if(Me.hasOwnProperty(at)){nt[at]=Me[at]}}var st=nt;var ot=de.ONE_SECOND_IN_TS;var lt;var ut=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];lt=function e(t){var i,r=0;lt.prototype.init.call(this);this.push=function(e){var n=0,a,s,o,l,u,c;if(!t){r=0}if(e.type!=="audio"){return}if(i){l=i;i=new Uint8Array(l.byteLength+e.data.byteLength);i.set(l);i.set(e.data,l.byteLength)}else{i=e.data}while(n+5<i.length){if(i[n]!==255||(i[n+1]&246)!==240){n++;continue}s=(~i[n+1]&1)*2;a=(i[n+3]&3)<<11|i[n+4]<<3|(i[n+5]&224)>>5;u=((i[n+6]&3)+1)*1024;c=u*ot/ut[(i[n+2]&60)>>>2];o=n+a;if(i.byteLength<o){return}this.trigger("data",{pts:e.pts+r*c,dts:e.dts+r*c,sampleCount:u,audioobjecttype:(i[n+2]>>>6&3)+1,channelcount:(i[n+2]&1)<<2|(i[n+3]&192)>>>6,samplerate:ut[(i[n+2]&60)>>>2],samplingfrequencyindex:(i[n+2]&60)>>>2,samplesize:16,data:i.subarray(n+7+s,o)});r++;if(i.byteLength===o){i=undefined;return}i=i.subarray(o)}};this.flush=function(){r=0;this.trigger("done")};this.reset=function(){i=void 0;this.trigger("reset")};this.endTimeline=function(){i=void 0;this.trigger("endedtimeline")}};lt.prototype=new t;var ct=lt;var dt;dt=function e(t){var i=t.byteLength,r=0,n=0;this.length=function(){return 8*i};this.bitsAvailable=function(){return 8*i+n};this.loadWord=function(){var e=t.byteLength-i,a=new Uint8Array(4),s=Math.min(4,i);if(s===0){throw new Error("no bytes available")}a.set(t.subarray(e,e+s));r=new DataView(a.buffer).getUint32(0);n=s*8;i-=s};this.skipBits=function(e){var t;if(n>e){r<<=e;n-=e}else{e-=n;t=Math.floor(e/8);e-=t*8;i-=t;this.loadWord();r<<=e;n-=e}};this.readBits=function(e){var t=Math.min(n,e),a=r>>>32-t;n-=t;if(n>0){r<<=t}else if(i>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((r&2147483648>>>e)!==0){r<<=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 ft=dt;var ht,pt;var vt;pt=function e(){var t=0,i,r;pt.prototype.init.call(this);this.push=function(e){var n;if(!r){r=e.data}else{n=new Uint8Array(r.byteLength+e.data.byteLength);n.set(r);n.set(e.data,r.byteLength);r=n}var a=r.byteLength;for(;t<a-3;t++){if(r[t+2]===1){i=t+5;break}}while(i<a){switch(r[i]){case 0:if(r[i-1]!==0){i+=2;break}else if(r[i-2]!==0){i++;break}if(t+3!==i-2){this.trigger("data",r.subarray(t+3,i-2))}do{i++}while(r[i]!==1&&i<a);t=i-2;i+=3;break;case 1:if(r[i-1]!==0||r[i-2]!==0){i+=3;break}this.trigger("data",r.subarray(t+3,i-2));t=i-2;i+=3;break;default:i+=3;break}}r=r.subarray(t);i-=t;t=0};this.reset=function(){r=null;t=0;this.trigger("reset")};this.flush=function(){if(r&&r.byteLength>3){this.trigger("data",r.subarray(t+3))}r=null;t=0;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")}};pt.prototype=new t;vt={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};ht=function e(){var t=new pt,i,r,n,a,s,o,l;ht.prototype.init.call(this);i=this;this.push=function(e){if(e.type!=="video"){return}r=e.trackId;n=e.pts;a=e.dts;t.push(e)};t.on("data",function(e){var t={trackId:r,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}i.trigger("data",t)});t.on("done",function(){i.trigger("done")});t.on("partialdone",function(){i.trigger("partialdone")});t.on("reset",function(){i.trigger("reset")});t.on("endedtimeline",function(){i.trigger("endedtimeline")});this.flush=function(){t.flush()};this.partialFlush=function(){t.partialFlush()};this.reset=function(){t.reset()};this.endTimeline=function(){t.endTimeline()};l=function e(t,i){var r=8,n=8,a,s;for(a=0;a<t;a++){if(n!==0){s=i.readExpGolomb();n=(r+s+256)%256}r=n===0?r:n}};s=function e(t){var i=t.byteLength,r=[],n=1,a,s;while(n<i-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){r.push(n+2);n+=2}else{n++}}if(r.length===0){return t}a=i-r.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===r[0]){o++;r.shift()}s[n]=t[o]}return s};o=function e(t){var i=0,r=0,n=0,a=0,s=1,o,u,c,d,f,h,p,v,m,g,y,_,b,T;o=new ft(t);u=o.readUnsignedByte();d=o.readUnsignedByte();c=o.readUnsignedByte();o.skipUnsignedExpGolomb();if(vt[u]){f=o.readUnsignedExpGolomb();if(f===3){o.skipBits(1)}o.skipUnsignedExpGolomb();o.skipUnsignedExpGolomb();o.skipBits(1);if(o.readBoolean()){y=f!==3?8:12;for(T=0;T<y;T++){if(o.readBoolean()){if(T<6){l(16,o)}else{l(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()){i=o.readUnsignedExpGolomb();
1r=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:u,levelIdc:c,profileCompatibility:d,width:Math.ceil(((v+1)*16-i*2-r*2)*s),height:(2-g)*(m+1)*16-n*2-a*2,sarRatio:_}}};ht.prototype=new t;var mt={H264Stream:ht,NalByteStream:pt};var gt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var yt=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var _t=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var bt=function e(t,i,r){var n,a="";for(n=i;n<r;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var Tt=function e(t,i,r){return unescape(bt(t,i,r))};var St=function e(t,i){var r=t[i+6]<<21|t[i+7]<<14|t[i+8]<<7|t[i+9],n=t[i+5],a=(n&16)>>4;if(a){return r+20}return r+10};var jt=function e(t,i){var r=(t[i+5]&224)>>5,n=t[i+4]<<3,a=t[i+3]&3<<11;return a|n|r};var kt=function e(t,i){if(t[i]==="I".charCodeAt(0)&&t[i+1]==="D".charCodeAt(0)&&t[i+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[i]&255===255&&(t[i+1]&240)===240){return"audio"}return null};var Et=function e(t){var i=0;while(i+5<t.length){if(t[i]!==255||(t[i+1]&246)!==240){i++;continue}return gt[(t[i+2]&60)>>>2]}return null};var wt=function e(t){var i,r,n,a;i=10;if(t[5]&64){i+=4;i+=_t(t.subarray(10,14))}do{r=_t(t.subarray(i+4,i+8));if(r<1){return null}a=String.fromCharCode(t[i],t[i+1],t[i+2],t[i+3]);if(a==="PRIV"){n=t.subarray(i+10,i+r+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=Tt(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var l=n.subarray(s+1);var u=(l[3]&1)<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;u*=4;u+=l[7]&3;return u}break}}}i+=10;i+=r}while(i<t.byteLength);return null};var Ct={isLikelyAacData:yt,parseId3TagSize:St,parseAdtsSize:jt,parseType:kt,parseSampleRate:Et,parseAacTimestamp:wt};var It;It=function e(){var t=new Uint8Array,i=0;It.prototype.init.call(this);this.setTimestamp=function(e){i=e};this.push=function(e){var r=0,n=0,a,s,o,l;if(t.length){l=t.length;t=new Uint8Array(e.byteLength+l);t.set(t.subarray(0,l));t.set(e,l)}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}r=Ct.parseId3TagSize(t,n);if(n+r>t.length){break}s={type:"timed-metadata",data:t.subarray(n,n+r)};this.trigger("data",s);n+=r;continue}else if((t[n]&255)===255&&(t[n+1]&240)===240){if(t.length-n<7){break}r=Ct.parseAdtsSize(t,n);if(n+r>t.length){break}o={type:"audio",data:t.subarray(n,n+r),pts:i,dts:i};this.trigger("data",o);n+=r;continue}n++}a=t.length-n;if(a>0){t=t.subarray(n)}else{t=new Uint8Array}};this.reset=function(){t=new Uint8Array;this.trigger("reset")};this.endTimeline=function(){t=new Uint8Array;this.trigger("endedtimeline")}};It.prototype=new t;var At=It;var xt=mt.H264Stream;var Ot=Ct.isLikelyAacData;var Pt=de.ONE_SECOND_IN_TS;var Dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"];var Rt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"];var Lt,Nt,Ut,Mt;var Bt=function e(t,i){var r;if(t.length!==i.length){return false}for(r=0;r<t.length;r++){if(t[r]!==i[r]){return false}}return true};var Ft=function e(t,i,r,n,a,s){var o=r-i,l=n-i,u=a-r;return{start:{dts:t,pts:t+o},end:{dts:t+l,pts:t+u},prependedContentDuration:s,baseMediaDecodeTime:t}};Nt=function e(t,i){var r=[],n=0,a=0,s=0,o=Infinity;i=i||{};Nt.prototype.init.call(this);this.push=function(e){Se.collectDtsInfo(t,e);if(t){Dt.forEach(function(i){t[i]=e[i]})}r.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,l,u,c,d;if(r.length===0){this.trigger("done","AudioSegmentStream");return}e=ge.trimAdtsFramesByEarliestDts(r,t,a);t.baseMediaDecodeTime=Se.calculateTrackBaseMediaDecodeTime(t,i.keepOriginalTimestamps);ge.prefixWithSilence(t,e,s,o);t.samples=ge.generateSampleTable(e);u=F.mdat(ge.concatenateFrameData(e));r=[];l=F.moof(n,[t]);c=new Uint8Array(l.byteLength+u.byteLength);n++;c.set(l);c.set(u,l.byteLength);Se.clearDtsInfo(t);d=Math.ceil(Pt*1024/t.samplerate);if(e.length){this.trigger("timingInfo",{start:e[0].pts,end:e[0].pts+e.length*d})}this.trigger("data",{track:t,boxes:c});this.trigger("done","AudioSegmentStream")};this.reset=function(){Se.clearDtsInfo(t);r=[];this.trigger("reset")}};Nt.prototype=new t;Lt=function e(t,i){var r=0,n=[],a=[],s,o;i=i||{};Lt.prototype.init.call(this);delete t.minPTS;this.gopCache_=[];
1this.push=function(e){Se.collectDtsInfo(t,e);if(e.nalUnitType==="seq_parameter_set_rbsp"&&!s){s=e.config;t.sps=[e.data];Rt.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,l,u,c,d=0,f,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=J.groupNalsIntoFrames(n);o=J.groupFramesIntoGops(e);if(!o[0][0].keyFrame){s=this.getGopForFusion_(n[0],t);if(s){d=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=J.extendFirstKeyFrame(o)}}if(a.length){var p;if(i.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}Se.clearDtsInfo(t);o=p}Se.collectDtsInfo(t,o);t.samples=J.generateSampleTable(o);u=F.mdat(J.concatenateNalData(o));t.baseMediaDecodeTime=Se.calculateTrackBaseMediaDecodeTime(t,i.keepOriginalTimestamps);this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}));f=o[0];h=o[o.length-1];this.trigger("segmentTimingInfo",Ft(t.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,d));this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration});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);l=F.moof(r,[t]);c=new Uint8Array(l.byteLength+u.byteLength);r++;c.set(l);c.set(u,l.byteLength);this.trigger("data",{track:t,boxes:c});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.reset=function(){this.resetStream_();n=[];this.gopCache_.length=0;a.length=0;this.trigger("reset")};this.resetStream_=function(){Se.clearDtsInfo(t);s=undefined;o=undefined};this.getGopForFusion_=function(e){var i=45e3,r=1e4,n=Infinity,a,s,o,l,u;for(u=0;u<this.gopCache_.length;u++){l=this.gopCache_[u];o=l.gop;if(!(t.pps&&Bt(t.pps[0],l.pps[0]))||!(t.sps&&Bt(t.sps[0],l.sps[0]))){continue}if(o.dts<t.timelineStartInfo.dts){continue}a=e.dts-o.dts-o.duration;if(a>=-r&&a<=i){if(!s||n>a){s=l;n=a}}}if(s){return s.gop}return null};this.alignGopsAtStart_=function(e){var t,i,r,n,s,o,l,u;s=e.byteLength;o=e.nalCount;l=e.duration;t=i=0;while(t<a.length&&i<e.length){r=a[t];n=e[i];if(r.pts===n.pts){break}if(n.pts>r.pts){t++;continue}i++;s-=n.byteLength;o-=n.nalCount;l-=n.duration}if(i===0){return e}if(i===e.length){return null}u=e.slice(i);u.byteLength=s;u.duration=l;u.nalCount=o;u.pts=u[0].pts;u.dts=u[0].dts;return u};this.alignGopsAtEnd_=function(e){var t,i,r,n,s,o;t=a.length-1;i=e.length-1;s=null;o=false;while(t>=0&&i>=0){r=a[t];n=e[i];if(r.pts===n.pts){o=true;break}if(r.pts>n.pts){t--;continue}if(t===a.length-1){s=i}i--}if(!o&&s===null){return null}var l;if(o){l=i}else{l=s}if(l===0){return e}var u=e.slice(l);var c=u.reduce(function(e,t){e.byteLength+=t.byteLength;e.duration+=t.duration;e.nalCount+=t.nalCount;return e},{byteLength:0,duration:0,nalCount:0});u.byteLength=c.byteLength;u.duration=c.duration;u.nalCount=c.nalCount;u.pts=u[0].pts;u.dts=u[0].dts;return u};this.alignGopsWith=function(e){a=e}};Lt.prototype=new t;Mt=function e(t,i){this.numberOfTracks=0;this.metadataStream=i;t=t||{};if(typeof t.remux!=="undefined"){this.remuxTracks=!!t.remux}else{this.remuxTracks=true}if(typeof t.keepOriginalTimestamps==="boolean"){this.keepOriginalTimestamps=t.keepOriginalTimestamps}else{this.keepOriginalTimestamps=false}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;Mt.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.pendingBytes+=e.boxes.byteLength;if(e.track.type==="video"){this.videoTrack=e.track;this.pendingBoxes.push(e.boxes)}if(e.track.type==="audio"){this.audioTrack=e.track;this.pendingBoxes.unshift(e.boxes)}}};Mt.prototype=new t;Mt.prototype.flush=function(e){var t=0,i={captions:[],captionStream
1s:{},metadata:[],info:{}},r,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;Rt.forEach(function(e){i.info[e]=this.videoTrack[e]},this)}else if(this.audioTrack){s=this.audioTrack.timelineStartInfo.pts;Dt.forEach(function(e){i.info[e]=this.audioTrack[e]},this)}if(this.videoTrack||this.audioTrack){if(this.pendingTracks.length===1){i.type=this.pendingTracks[0].type}else{i.type="combined"}this.emittedTracks+=this.pendingTracks.length;a=F.initSegment(this.pendingTracks);i.initSegment=new Uint8Array(a.byteLength);i.initSegment.set(a);i.data=new Uint8Array(this.pendingBytes);for(o=0;o<this.pendingBoxes.length;o++){i.data.set(this.pendingBoxes[o],t);t+=this.pendingBoxes[o].byteLength}for(o=0;o<this.pendingCaptions.length;o++){r=this.pendingCaptions[o];r.startTime=de.metadataTsToSeconds(r.startPts,s,this.keepOriginalTimestamps);r.endTime=de.metadataTsToSeconds(r.endPts,s,this.keepOriginalTimestamps);i.captionStreams[r.stream]=true;i.captions.push(r)}for(o=0;o<this.pendingMetadata.length;o++){n=this.pendingMetadata[o];n.cueTime=de.metadataTsToSeconds(n.pts,s,this.keepOriginalTimestamps);i.metadata.push(n)}i.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",i);for(o=0;o<i.captions.length;o++){r=i.captions[o];this.trigger("caption",r)}for(o=0;o<i.metadata.length;o++){n=i.metadata[o];this.trigger("id3Frame",n)}}if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}};Mt.prototype.setRemux=function(e){this.remuxTracks=e};Ut=function e(t){var i=this,r=true,n,a;Ut.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 st.MetadataStream;e.aacStream=new At;e.audioTimestampRolloverStream=new st.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new st.TimestampRolloverStream("timed-metadata");e.adtsStream=new ct;e.coalesceStream=new Mt(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(r){if(r.type==="timed-metadata"&&!e.audioSegmentStream){a=a||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"};e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Nt(a,t);e.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}i.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})});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 st.MetadataStream;e.packetStream=new st.TransportPacketStream;e.parseStream=new st.TransportParseStream;e.elementaryStream=new st.ElementaryStream;e.timestampRolloverStream=new st.TimestampRolloverStream;e.adtsStream=new ct;e.h264Stream=new xt;e.captionStream=new st.CaptionStream;e.coalesceStream=new Mt(t,e.metadataStream);e.headOfPipeline=e.packetStream;e.packetStream.pipe(e.parseStream).pipe(e.elementaryStream).pipe(e.timestampRolloverStream);e.timestampRolloverStream.pipe(e.h264Stream);e.timestampRolloverStream.pipe(e.adtsStream);e.timestampRolloverStream.pipe(e.metadataStream).pipe(e.coalesceStream);e.h264Stream.pipe(e.captionStream).pipe(e.coalesceStream);e.elementaryStream.on("data",function(r){var s;if(r.type==="metadata"){s=r.tracks.length;while(s--){if(!n&&r.tracks[s].type==="video"){n=r.tracks[s];n.timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime}else if(!a&&r.tracks[s].type==="audio"){a=r.tracks[s];a.timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime}}if(n&&!e.videoSegmentStream){e.coalesceStream.numberOfTracks++;e.videoSegmentStream=new Lt(n,t);e.videoSegmentStream.on("timelineStartInfo",function(t){if(a){a.timelineStartInfo=t;e.audioSegmentStream.setEarliestDts(t.dts)}});e.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo"));e.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo"));e.videoSegmentStream.on("baseMediaDecodeTime",function(t){if(a){e.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}});e.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo"));e.h264Stream.pipe(e.videoSegmentStream).pipe(e.coalesceStream)}if(a&&!e.audioSegmentStream){e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new Nt(a,t);e.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}i.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));
1e.coalesceStream.on("id3Frame",function(t){t.dispatchType=e.metadataStream.dispatchType;i.trigger("id3Frame",t)});e.coalesceStream.on("caption",this.trigger.bind(this,"caption"));e.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(e){var i=this.transmuxPipeline_;if(!t.keepOriginalTimestamps){this.baseMediaDecodeTime=e}if(a){a.timelineStartInfo.dts=undefined;a.timelineStartInfo.pts=undefined;Se.clearDtsInfo(a);if(!t.keepOriginalTimestamps){a.timelineStartInfo.baseMediaDecodeTime=e}if(i.audioTimestampRolloverStream){i.audioTimestampRolloverStream.discontinuity()}}if(n){if(i.videoSegmentStream){i.videoSegmentStream.gopCache_=[]}n.timelineStartInfo.dts=undefined;n.timelineStartInfo.pts=undefined;Se.clearDtsInfo(n);i.captionStream.reset();if(!t.keepOriginalTimestamps){n.timelineStartInfo.baseMediaDecodeTime=e}}if(i.timestampRolloverStream){i.timestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(e){if(a){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)}};this.setRemux=function(e){var i=this.transmuxPipeline_;t.remux=e;if(i&&i.coalesceStream){i.coalesceStream.setRemux(e)}};this.alignGopsWith=function(e){if(n&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)}};this.push=function(e){if(r){var t=Ot(e);if(t&&this.transmuxPipeline_.type!=="aac"){this.setupAacPipeline()}else if(!t&&this.transmuxPipeline_.type!=="ts"){this.setupTsPipeline()}r=false}this.transmuxPipeline_.headOfPipeline.push(e)};this.flush=function(){r=true;this.transmuxPipeline_.headOfPipeline.flush()};this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()};this.reset=function(){if(this.transmuxPipeline_.headOfPipeline){this.transmuxPipeline_.headOfPipeline.reset()}};this.resetCaptions=function(){if(this.transmuxPipeline_.captionStream){this.transmuxPipeline_.captionStream.reset()}}};Ut.prototype=new t;var Ht={Transmuxer:Ut,VideoSegmentStream:Lt,AudioSegmentStream:Nt,AUDIO_PROPERTIES:Dt,VIDEO_PROPERTIES:Rt,generateVideoSegmentTimingInfo:Ft};var Vt=function e(t,i){if(!(t instanceof i)){throw new TypeError("Cannot call a class as a function")}};var qt=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,i,r){if(i)e(t.prototype,i);if(r)e(t,r);return t}}();var Wt=function e(t,i){i.on("data",function(e){var i=e.initSegment;e.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};var r=e.data;e.data=r.buffer;t.postMessage({action:"data",segment:e,byteOffset:r.byteOffset,byteLength:r.byteLength},[e.data])});if(i.captionStream){i.captionStream.on("data",function(e){t.postMessage({action:"caption",data:e})})}i.on("done",function(e){t.postMessage({action:"done"})});i.on("gopInfo",function(e){t.postMessage({action:"gopInfo",gopInfo:e})});i.on("videoSegmentTimingInfo",function(e){t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:e})})};var zt=function(){function e(t,i){Vt(this,e);this.options=i||{};this.self=t;this.init()}qt(e,[{key:"init",value:function e(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new Ht.Transmuxer(this.options);Wt(this.self,this.transmuxer)}},{key:"push",value:function e(t){var i=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(i)}},{key:"reset",value:function e(){this.init()}},{key:"setTimestampOffset",value:function e(t){var i=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(i*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 Gt=function e(t){t.onmessage=function(e){if(e.data.action==="init"&&e.data.options){this.messageHandlers=new zt(t,e.data.options);return}if(!this.messageHandlers){this.messageHandlers=new zt(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 Yt=new Gt(i);return Yt}()});var jt={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"};var kt=function e(t){return t.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){var r=("00"+Number(t).toString(16)).slice(-2);var n=("00"+Number(i).toString(16)).slice(-2);
1return"avc1."+r+"00"+n})})};var Et=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var i={codecCount:0};var r=void 0;i.codecCount=t.split(",").length;i.codecCount=i.codecCount||2;r=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t);if(r){i.videoCodec=r[2];i.videoObjectTypeIndicator=r[3]}i.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t);i.audioProfile=i.audioProfile&&i.audioProfile[2];return i};var wt=function e(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return kt([e])[0]})};var Ct=function e(t,i,r){return t+"/"+i+'; codecs="'+r.filter(function(e){return!!e}).join(", ")+'"'};var It=function e(t){if(t.segments&&t.segments.length&&t.segments[0].map){return"mp4"}return"mp2t"};var At=function e(t){var i=t.attributes||{};if(i.CODECS){return Et(i.CODECS)}return jt};var xt=function e(t,i){if(!t.mediaGroups.AUDIO||!i){return null}var r=t.mediaGroups.AUDIO[i];if(!r){return null}for(var n in r){var a=r[n];if(a.default&&a.playlists){return Et(a.playlists[0].attributes.CODECS).audioProfile}}return null};var Ot=function e(t,i){var n=It(i);var a=At(i);var s=i.attributes||{};var o=true;var l=false;if(!i){return[]}if(t.mediaGroups.AUDIO&&s.AUDIO){var u=t.mediaGroups.AUDIO[s.AUDIO];if(u){l=true;o=false;for(var c in u){if(!u[c].uri&&!u[c].playlists){o=true;break}}}}if(l&&!a.audioProfile){if(!o){a.audioProfile=xt(t,s.AUDIO)}if(!a.audioProfile){r.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=jt.audioProfile}}var d={};if(a.videoCodec){d.video=""+a.videoCodec+a.videoObjectTypeIndicator}if(a.audioProfile){d.audio="mp4a.40."+a.audioProfile}var f=Ct("audio",n,[d.audio]);var h=Ct("video",n,[d.video]);var p=Ct("video",n,[d.video,d.audio]);if(l){if(!o&&d.video){return[h,f]}if(!o&&!d.video){return[f,f]}return[p,f]}if(!d.video){return[f]}return[p]};var Pt=function e(t){var i={type:"",parameters:{}};var r=t.trim().split(";");i.type=r.shift().trim();r.forEach(function(e){var t=e.trim().split("=");if(t.length>1){var r=t[0].replace(/"/g,"").trim();var n=t[1].replace(/"/g,"").trim();i.parameters[r]=n}});return i};var Dt=function e(t){return/mp4a\.\d+.\d+/i.test(t)};var Rt=function e(t){return/avc1\.[\da-f]+/i.test(t)};var Lt=function e(t,i,r){if(typeof i==="undefined"||i===null||!t.length){return[]}var n=Math.ceil((i-r+3)*9e4);var a=void 0;for(a=0;a<t.length;a++){if(t[a].pts>n){break}}return t.slice(a)};var Nt=function e(t,i,r){if(!i.length){return t}if(r){return i.slice()}var n=i[0].pts;var a=0;for(a;a<t.length;a++){if(t[a].pts>=n){break}}return t.slice(0,a).concat(i)};var Ut=function e(t,i,r,n){var a=Math.ceil((i-n)*9e4);var s=Math.ceil((r-n)*9e4);var o=t.slice();var l=t.length;while(l--){if(t[l].pts<=s){break}}if(l===-1){return o}var u=l+1;while(u--){if(t[u].pts<=a){break}}u=Math.max(u,0);o.splice(u,l-u+1);return o};var Mt=function e(t,i,n){var a=null;var s=null;var o=0;var l=[];var u=[];if(!t&&!i){return r.createTimeRange()}if(!t){return i.buffered}if(!i){return t.buffered}if(n){return t.buffered}if(t.buffered.length===0&&i.buffered.length===0){return r.createTimeRange()}var c=t.buffered;var d=i.buffered;var f=c.length;while(f--){l.push({time:c.start(f),type:"start"});l.push({time:c.end(f),type:"end"})}f=d.length;while(f--){l.push({time:d.start(f),type:"start"});l.push({time:d.end(f),type:"end"})}l.sort(function(e,t){return e.time-t.time});for(f=0;f<l.length;f++){if(l[f].type==="start"){o++;if(o===2){a=l[f].time}}else if(l[f].type==="end"){o--;if(o===1){s=l[f].time}}if(a!==null&&s!==null){u.push([a,s]);a=null;s=null}}return r.createTimeRanges(u)};var Bt=9e4;var Ft=function e(t,i){var r=t.addSourceBuffer(i);var n=Object.create(null);n.updating=false;n.realBuffer_=r;var a=function e(t){if(typeof r[t]==="function"){n[t]=function(){return r[t].apply(r,arguments)}}else if(typeof n[t]==="undefined"){Object.defineProperty(n,t,{get:function e(){return r[t]},set:function e(i){return r[t]=i}})}};for(var s in r){a(s)}return n};var Ht=function(e){I(t,e);function t(e,i){E(this,t);var n=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r.EventTarget));n.timestampOffset_=0;n.pendingBuffers_=[];n.bufferUpdating_=false;n.mediaSource_=e;n.codecs_=i;n.audioCodec_=null;n.videoCodec_=null;n.audioDisabled_=false;n.appendAudioInitSegment_=true;n.gopBuffer_=[];n.timeMapping_=0;n.safeAppend_=r.browser.IE_VERSION>=11;var a={remux:false,alignGopsAtEnd:n.safeAppend_};n.codecs_.forEach(function(e){if(Dt(e)){n.audioCodec_=e}else if(Rt(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 Mt(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}});return n}w(t,[{key:"data_",value:function e(t){var i=t.data.segment;i.data=new Uint8Array(i.data,t.data.byteOffset,t.data.byteLength);i.initSegment=new Uint8Array(i.initSegment.data,i.initSegment.byteOffset,i.initSegment.byteLength);at(this,this.mediaSource_,i);this.pendingBuffers_.push(i);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 i={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};
1if(t.prependedContentDuration){i.prependedContentDuration=t.prependedContentDuration/Bt}this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})}},{key:"createRealSourceBuffers_",value:function e(){var t=this;var i=["audio","video"];i.forEach(function(e){if(!t[e+"Codec_"]){return}if(t[e+"Buffer_"]){return}var r=null;if(t.mediaSource_[e+"Buffer_"]){r=t.mediaSource_[e+"Buffer_"];r.updating=false}else{var n=e+"Codec_";var a=e+'/mp4;codecs="'+t[n]+'"';r=Ft(t.mediaSource_.nativeMediaSource_,a);t.mediaSource_[e+"Buffer_"]=r}t[e+"Buffer_"]=r;["update","updatestart","updateend"].forEach(function(n){r.addEventListener(n,function(){if(e==="audio"&&t.audioDisabled_){return}if(n==="updateend"){t[e+"Buffer_"].updating=false}var r=i.every(function(i){if(i==="audio"&&t.audioDisabled_){return true}if(e!==i&&t[i+"Buffer_"]&&t[i+"Buffer_"].updating){return false}return true});if(r){return t.trigger(n)}})})})}},{key:"appendBuffer",value:function e(t){this.bufferUpdating_=true;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var i=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:i.end(i.length-1)})}if(this.videoBuffer_){this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Lt(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_=Nt(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function e(t,i){if(this.videoBuffer_){this.videoBuffer_.updating=true;this.videoBuffer_.remove(t,i);this.gopBuffer_=Ut(this.gopBuffer_,t,i,this.timeMapping_)}if(!this.audioDisabled_&&this.audioBuffer_){this.audioBuffer_.updating=true;this.audioBuffer_.remove(t,i)}st(t,i,this.metadataTrack_);if(this.inbandTextTracks_){for(var r in this.inbandTextTracks_){st(t,i,this.inbandTextTracks_[r])}}}},{key:"processPendingSegments_",value:function e(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};if(!this.pendingBuffers_.length){this.trigger("updateend");this.bufferUpdating_=false;return}t=this.pendingBuffers_.reduce(function(e,t){var i=t.type;var r=t.data;var n=t.initSegment;e[i].segments.push(r);e[i].bytes+=r.byteLength;e[i].initSegment=n;if(t.captions){e.captions=e.captions.concat(t.captions)}if(t.info){e[i].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 i=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_)){i=true}ut(this,t.captions,t.metadata);if(!this.audioDisabled_&&this.audioBuffer_){this.concatAndAppendSegments_(t.audio,this.audioBuffer_)}this.pendingBuffers_.length=0;if(i){this.trigger("updateend")}this.bufferUpdating_=false}},{key:"concatAndAppendSegments_",value:function e(t,i){var r=0;var n=void 0;if(t.bytes){n=new Uint8Array(t.bytes);t.segments.forEach(function(e){n.set(e,r);r+=e.byteLength});try{i.updating=true;i.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}},{key:"dispose",value:function e(){this.trigger("dispose");this.off()}}]);return t}(r.EventTarget);var Vt=function(e){I(t,e);function t(){E(this,t);var e=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var i=void 0;e.nativeMediaSource_=new f.MediaSource;for(i in e.nativeMediaSource_){if(!(i in t.prototype)&&typeof e.nativeMediaSource_[i]==="function"){e[i]=e.nativeMediaSource_[i].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 r.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 i=false;var r=true;for(var n=0;n<e.player_.audioTracks().length;n++){var a=e.player_.audioTracks()[n];if(a.enabled&&a.kind!=="main"){i=true;r=false;break}}
1e.sourceBuffers.forEach(function(t,n){t.appendAudioInitSegment_=true;if(t.videoCodec_&&t.audioCodec_){t.audioDisabled_=i}else if(t.videoCodec_&&!t.audioCodec_){t.audioDisabled_=true;r=false}else if(!t.videoCodec_&&t.audioCodec_){t.audioDisabled_=n?r:!r;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 i=u.querySelector('[src="'+e.url_+'"]');if(!i){return}e.player_=r(i.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 i=lt(e.duration);for(var r=0;r<e.sourceBuffers.length;r++){var n=e.sourceBuffers[r];var a=n.metadataTrack_&&n.metadataTrack_.cues;if(a&&a.length){a[a.length-1].endTime=i}}});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}w(t,[{key:"addSeekableRange_",value:function e(t,i){var r=void 0;if(this.duration!==Infinity){r=new Error("MediaSource.addSeekableRange() can only be invoked "+"when the duration is Infinity");r.name="InvalidStateError";r.code=11;throw r}if(i>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration)){this.nativeMediaSource_.duration=i}}},{key:"addSourceBuffer",value:function e(t){var i=void 0;var r=Pt(t);if(/^(video|audio)\/mp2t$/i.test(r.type)){var n=[];if(r.parameters&&r.parameters.codecs){n=r.parameters.codecs.split(",");n=kt(n);n=n.filter(function(e){return Dt(e)||Rt(e)})}if(n.length===0){n=["avc1.4d400d","mp4a.40.2"]}i=new Ht(this,n);if(this.sourceBuffers.length!==0){this.sourceBuffers[0].createRealSourceBuffers_();i.createRealSourceBuffers_();this.sourceBuffers[0].audioDisabled_=true}}else{i=this.nativeMediaSource_.addSourceBuffer(t)}this.sourceBuffers.push(i);return i}},{key:"dispose",value:function e(){this.trigger("dispose");this.off();this.sourceBuffers.forEach(function(e){if(e.dispose){e.dispose()}});this.sourceBuffers.length=0}}]);return t}(r.EventTarget);var qt=0;r.mediaSources={};var Wt=function e(t,i){var n=r.mediaSources[t];if(n){n.trigger({type:"sourceopen",swfId:i})}else{throw new Error("Media Source not found (Video.js)")}};var zt=function e(){return!!f.MediaSource&&!!f.MediaSource.isTypeSupported&&f.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')};var Gt=function e(){this.MediaSource={open:Wt,supportsNativeMediaSources:zt};if(zt()){return new Vt}throw new Error("Cannot use create a virtual MediaSource for this video")};Gt.open=Wt;Gt.supportsNativeMediaSources=zt;var Yt={createObjectURL:function e(t){var i="blob:vjs-media-source/";var n=void 0;if(t instanceof Vt){n=f.URL.createObjectURL(t.nativeMediaSource_);t.url_=n;return n}if(!(t instanceof Vt)){n=f.URL.createObjectURL(t);t.url_=n;return n}n=i+qt;qt++;r.mediaSources[n]=t;return n}};r.MediaSource=Gt;r.URL=Yt;function Kt(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var Xt=Kt(c);var Jt=Kt(f);var Qt=function e(t,i){if(/^[a-z]+:/i.test(i)){return i}if(!/\/\//i.test(t)){t=Xt.buildAbsoluteURL(Jt.location&&Jt.location.href||"",t)}return Xt.buildAbsoluteURL(t,i)};var Zt=Qt;function $t(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var ei=$t(f);var ti=function e(t){return ei.atob?ei.atob(t):Buffer.from(t,"base64").toString("binary")};function ii(e){var t=ti(e);var i=new Uint8Array(t.length);for(var r=0;r<t.length;r++){i[r]=t.charCodeAt(r)}return i}var ri=ii;var ni=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var ai=new RegExp("[\\-\\.0-9"+ni.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");var si=new RegExp("^"+ni.source+ai.source+"*(?::"+ni.source+ai.source+"*)?$");var oi=0;var li=1;var ui=2;var ci=3;var di=4;var fi=5;var hi=6;var pi=7;function vi(){}vi.prototype={parse:function e(t,i,r){var n=this.domBuilder;n.startDocument();Si(i,i={});mi(t,i,r,n,this.errorHandler);n.endDocument()}};function mi(e,t,i,r,n){function a(e){if(e>65535){e-=65536;var t=55296+(e>>10),i=56320+(e&1023);return String.fromCharCode(t,i)}else{return String.fromCharCode(e)}}function s(e){var t=e.slice(1,-1);if(t in i){return i[t]}else if(t.charAt(0)==="#"){return a(parseInt(t.substr(1).replace("x","0x")))}
1else{n.error("entity not found:"+e);return e}}function o(t){if(t>v){var i=e.substring(v,t).replace(/&#?\w+;/g,s);f&&l(v);r.characters(i,0,t-v);v=t}}function l(t,i){while(t>=c&&(i=d.exec(e))){u=i.index;c=u+i[0].length;f.lineNumber++}f.columnNumber=t-u+1}var u=0;var c=0;var d=/.*(?:\r\n?|\n)|.*$/g;var f=r.locator;var h=[{currentNSMap:t}];var p={};var v=0;while(true){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var g=r.doc;var y=g.createTextNode(e.substr(v));g.appendChild(y);r.currentElement=y}return}if(m>v){o(m)}switch(e.charAt(m+1)){case"/":var _=e.indexOf(">",m+3);var b=e.substring(m+2,_);var T=h.pop();if(_<0){b=e.substring(m+2).replace(/[\s<].*/,"");n.error("end tag name: "+b+" is not complete:"+T.tagName);_=m+1+b.length}else if(b.match(/\s</)){b=b.replace(/[\s<].*/,"");n.error("end tag name: "+b+" maybe not complete");_=m+1+b.length}var S=T.localNSMap;var j=T.tagName==b;var k=j||T.tagName&&T.tagName.toLowerCase()==b.toLowerCase();if(k){r.endElement(T.uri,T.localName,b);if(S){for(var E in S){r.endPrefixMapping(E)}}if(!j){n.fatalError("end tag name: "+b+" is not match the current start tagName:"+T.tagName)}}else{h.push(T)}_++;break;case"?":f&&l(m);_=ki(e,m,r);break;case"!":f&&l(m);_=ji(e,m,r,n);break;default:f&&l(m);var w=new Ei;var C=h[h.length-1].currentNSMap;var _=yi(e,m,w,C,s,n);var I=w.length;if(!w.closed&&Ti(e,_,w.tagName,p)){w.closed=true;if(!i.nbsp){n.warning("unclosed xml attribute")}}if(f&&I){var A=gi(f,{});for(var x=0;x<I;x++){var O=w[x];l(O.offset);O.locator=gi(f,{})}r.locator=A;if(_i(w,r,C)){h.push(w)}r.locator=f}else{if(_i(w,r,C)){h.push(w)}}if(w.uri==="http://www.w3.org/1999/xhtml"&&!w.closed){_=bi(e,_,w.tagName,s,r)}else{_++}}}catch(e){n.error("element parse error: "+e);_=-1}if(_>v){v=_}else{o(Math.max(m,v)+1)}}}function gi(e,t){t.lineNumber=e.lineNumber;t.columnNumber=e.columnNumber;return t}function yi(e,t,i,r,n,a){var s;var o;var l=++t;var u=oi;while(true){var c=e.charAt(l);switch(c){case"=":if(u===li){s=e.slice(t,l);u=ci}else if(u===ui){u=ci}else{throw new Error("attribute equal must after attrName")}break;case"'":case'"':if(u===ci||u===li){if(u===li){a.warning('attribute value must after "="');s=e.slice(t,l)}t=l+1;l=e.indexOf(c,t);if(l>0){o=e.slice(t,l).replace(/&#?\w+;/g,n);i.add(s,o,t-1);u=fi}else{throw new Error("attribute value no end '"+c+"' match")}}else if(u==di){o=e.slice(t,l).replace(/&#?\w+;/g,n);i.add(s,o,t);a.warning('attribute "'+s+'" missed start quot('+c+")!!");t=l+1;u=fi}else{throw new Error('attribute value must after "="')}break;case"/":switch(u){case oi:i.setTagName(e.slice(t,l));case fi:case hi:case pi:u=pi;i.closed=true;case di:case li:case ui:break;default:throw new Error("attribute invalid close char('/')")}break;case"":a.error("unexpected end of input");if(u==oi){i.setTagName(e.slice(t,l))}return l;case">":switch(u){case oi:i.setTagName(e.slice(t,l));case fi:case hi:case pi:break;case di:case li:o=e.slice(t,l);if(o.slice(-1)==="/"){i.closed=true;o=o.slice(0,-1)}case ui:if(u===ui){o=s}if(u==di){a.warning('attribute "'+o+'" missed quot(")!!');i.add(s,o.replace(/&#?\w+;/g,n),t)}else{if(r[""]!=="http://www.w3.org/1999/xhtml"||!o.match(/^(?:disabled|checked|selected)$/i)){a.warning('attribute "'+o+'" missed value!! "'+o+'" instead!!')}i.add(o,o,t)}break;case ci:throw new Error("attribute value missed!!")}return l;case"\x80":c=" ";default:if(c<=" "){switch(u){case oi:i.setTagName(e.slice(t,l));u=hi;break;case li:s=e.slice(t,l);u=ui;break;case di:var o=e.slice(t,l).replace(/&#?\w+;/g,n);a.warning('attribute "'+o+'" missed quot(")!!');i.add(s,o,t);case fi:u=hi;break}}else{switch(u){case ui:var d=i.tagName;if(r[""]!=="http://www.w3.org/1999/xhtml"||!s.match(/^(?:disabled|checked|selected)$/i)){a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!')}i.add(s,s,t);t=l;u=li;break;case fi:a.warning('attribute space is required"'+s+'"!!');case hi:u=li;t=l;break;case ci:u=di;t=l;break;case pi:throw new Error("elements closed character '/' and '>' must be connected to")}}}l++}}function _i(e,t,i){var r=e.tagName;var n=null;var a=e.length;while(a--){var s=e[a];var o=s.qName;var l=s.value;var u=o.indexOf(":");if(u>0){var c=s.prefix=o.slice(0,u);var d=o.slice(u+1);var f=c==="xmlns"&&d}else{d=o;c=null;f=o==="xmlns"&&""}s.localName=d;if(f!==false){if(n==null){n={};Si(i,i={})}i[f]=n[f]=l;s.uri="http://www.w3.org/2000/xmlns/";t.startPrefixMapping(f,l)}}var a=e.length;while(a--){s=e[a];var c=s.prefix;if(c){if(c==="xml"){s.uri="http://www.w3.org/XML/1998/namespace"}if(c!=="xmlns"){s.uri=i[c||""]}
1}}var u=r.indexOf(":");if(u>0){c=e.prefix=r.slice(0,u);d=e.localName=r.slice(u+1)}else{c=null;d=e.localName=r}var h=e.uri=i[c||""];t.startElement(h,d,r,e);if(e.closed){t.endElement(h,d,r);if(n){for(c in n){t.endPrefixMapping(c)}}}else{e.currentNSMap=i;e.localNSMap=n;return true}}function bi(e,t,i,r,n){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t);var s=e.substring(t+1,a);if(/[&<]/.test(s)){if(/^script$/i.test(i)){n.characters(s,0,s.length);return a}s=s.replace(/&#?\w+;/g,r);n.characters(s,0,s.length);return a}}return t+1}function Ti(e,t,i,r){var n=r[i];if(n==null){n=e.lastIndexOf("</"+i+">");if(n<t){n=e.lastIndexOf("</"+i)}r[i]=n}return n<t}function Si(e,t){for(var i in e){t[i]=e[i]}}function ji(e,t,i,r){var n=e.charAt(t+2);switch(n){case"-":if(e.charAt(t+3)==="-"){var a=e.indexOf("--\x3e",t+4);if(a>t){i.comment(e,t+4,a-t-4);return a+3}else{r.error("Unclosed comment");return-1}}else{return-1}default:if(e.substr(t+3,6)=="CDATA["){var a=e.indexOf("]]>",t+9);i.startCDATA();i.characters(e,t+9,a-t-9);i.endCDATA();return a+3}var s=Ci(e,t);var o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var l=s[1][0];var u=o>3&&/^public$/i.test(s[2][0])&&s[3][0];var c=o>4&&s[4][0];var d=s[o-1];i.startDTD(l,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2"));i.endDTD();return d.index+d[0].length}}return-1}function ki(e,t,i){var r=e.indexOf("?>",t);if(r){var n=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(n){var a=n[0].length;i.processingInstruction(n[1],n[2]);return r+2}else{return-1}}return-1}function Ei(e){}Ei.prototype={setTagName:function e(t){if(!si.test(t)){throw new Error("invalid tagName:"+t)}this.tagName=t},add:function e(t,i,r){if(!si.test(t)){throw new Error("invalid attribute:"+t)}this[this.length++]={qName:t,value:i,offset:r}},length:0,getLocalName:function e(t){return this[t].localName},getLocator:function e(t){return this[t].locator},getQName:function e(t){return this[t].qName},getURI:function e(t){return this[t].uri},getValue:function e(t){return this[t].value}};function wi(e,t){e.__proto__=t;return e}if(!(wi({},wi.prototype)instanceof wi)){wi=function e(t,i){function r(){}r.prototype=i;r=new r;for(i in t){r[i]=t[i]}return r}}function Ci(e,t){var i;var r=[];var n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;n.lastIndex=t;n.exec(e);while(i=n.exec(e)){r.push(i);if(i[1])return r}}var Ii=vi;var Ai={XMLReader:Ii};function xi(e,t){for(var i in e){t[i]=e[i]}}function Oi(e,t){var i=e.prototype;if(Object.create){var r=Object.create(t.prototype);i.__proto__=r}if(!(i instanceof t)){var n=function e(){};n.prototype=t.prototype;n=new n;xi(i,n);e.prototype=i=n}if(i.constructor!=e){if(typeof e!="function"){console.error("unknow Class:"+e)}i.constructor=e}}var Pi="http://www.w3.org/1999/xhtml";var Di={};var Ri=Di.ELEMENT_NODE=1;var Li=Di.ATTRIBUTE_NODE=2;var Ni=Di.TEXT_NODE=3;var Ui=Di.CDATA_SECTION_NODE=4;var Mi=Di.ENTITY_REFERENCE_NODE=5;var Bi=Di.ENTITY_NODE=6;var Fi=Di.PROCESSING_INSTRUCTION_NODE=7;var Hi=Di.COMMENT_NODE=8;var Vi=Di.DOCUMENT_NODE=9;var qi=Di.DOCUMENT_TYPE_NODE=10;var Wi=Di.DOCUMENT_FRAGMENT_NODE=11;var zi=Di.NOTATION_NODE=12;var Gi={};var Yi={};var Ki=Gi.INDEX_SIZE_ERR=(Yi[1]="Index size error",1);var Xi=Gi.DOMSTRING_SIZE_ERR=(Yi[2]="DOMString size error",2);var Ji=Gi.HIERARCHY_REQUEST_ERR=(Yi[3]="Hierarchy request error",3);var Qi=Gi.WRONG_DOCUMENT_ERR=(Yi[4]="Wrong document",4);var Zi=Gi.INVALID_CHARACTER_ERR=(Yi[5]="Invalid character",5);var $i=Gi.NO_DATA_ALLOWED_ERR=(Yi[6]="No data allowed",6);var er=Gi.NO_MODIFICATION_ALLOWED_ERR=(Yi[7]="No modification allowed",7);var tr=Gi.NOT_FOUND_ERR=(Yi[8]="Not found",8);var ir=Gi.NOT_SUPPORTED_ERR=(Yi[9]="Not supported",9);var rr=Gi.INUSE_ATTRIBUTE_ERR=(Yi[10]="Attribute in use",10);var nr=Gi.INVALID_STATE_ERR=(Yi[11]="Invalid state",11);var ar=Gi.SYNTAX_ERR=(Yi[12]="Syntax error",12);var sr=Gi.INVALID_MODIFICATION_ERR=(Yi[13]="Invalid modification",13);var or=Gi.NAMESPACE_ERR=(Yi[14]="Invalid namespace",14);var lr=Gi.INVALID_ACCESS_ERR=(Yi[15]="Invalid access",15);function ur(e,t){if(t instanceof Error){var i=t}else{i=this;Error.call(this,Yi[e]);this.message=Yi[e];if(Error.captureStackTrace)Error.captureStackTrace(this,ur)}i.code=e;if(t)this.message=this.message+": "+t;return i}ur.prototype=Error.prototype;xi(Gi,ur);function cr(){}cr.prototype={length:0,item:function e(t){return this[t]||null},toString:function e(t,i){for(var r=[],n=0;n<this.length;n++){qr(this[n],r,t,i)}return r.join("")}};function dr(e,t){this._node=e;this._refresh=t;fr(this)}function fr(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);Gr(e,"length",i.length);xi(i,e);e._inc=t}}dr.prototype.item=function(e){fr(this);return this[e]};Oi(dr,cr);function hr(){}function pr(e,t){var i=e.length;while(i--){if(e[i]===t){return i}}}function vr(e,t,i,r){if(r){t[pr(t,r)]=i}else{t[t.length++]=i}if(e){i.ownerElement=e;var n=e.ownerDocument;if(n){r&&jr(n,e,r);Sr(n,e,i)}}}function mr(e,t,i){var r=pr(t,i);if(r>=0){var n=t.length-1;while(r<n){t[r]=t[++r]}t.length=n;if(e){var a=e.ownerDocument;if(a){jr(a,e,i);i.ownerElement=null}}}else{throw ur(tr,new Error(e.tagName+"@"+i))}}hr.prototype={length:0,item:cr.prototype.item,getNamedItem:function e(t){var i=this.length;while(i--){var r=this[i];if(r.nodeName==t){return r}}},setNamedItem:function e(t){var i=t.ownerElement;if(i&&i!=this._ownerElement){throw new ur(rr)}var r=this.getNamedItem(t.nodeName);vr(this._ownerElement,this,t,r);return r},setNamedItemNS:function e(t){var i=t.ownerElement,r;if(i&&i!=this._ownerElement){throw new ur(rr)}r=this.getNamedItemNS(t.namespaceURI,t.localName);vr(this._ownerElement,this,t,r);return r},removeNamedItem:function e(t){var i=this.getNamedItem(t);mr(this._ownerElement,this,i);return i},removeNamedItemNS:function e(t,i){var r=this.getNamedItemNS(t,i);mr(this._ownerElement,this,r);return r},getNamedItemNS:function e(t,i){var r=this.length;while(r--){var n=this[r];if(n.localName==i&&n.namespaceURI==t){return n}}return null}};function gr(e){this._features={};if(e){for(var t in e){this._features=e[t]}}}gr.prototype={hasFeature:function e(t,i){var r=this._features[t.toLowerCase()];if(r&&(!i||i in r)){return true}else{return false}},createDocument:function e(t,i,r){var n=new Tr;n.implementation=this;n.childNodes=new cr;n.doctype=r;if(r){n.appendChild(r)}if(i){var a=n.createElementNS(t,i);n.appendChild(a)}return n},createDocumentType:function e(t,i,r){var n=new Rr;n.name=t;n.nodeName=t;n.publicId=i;n.systemId=r;return n}};function yr(){}yr.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function e(t,i){return wr(this,t,i)},replaceChild:function e(t,i){this.insertBefore(t,i);if(i){this.removeChild(i)}},removeChild:function e(t){return Er(this,t)},appendChild:function e(t){return this.insertBefore(t,null)},hasChildNodes:function e(){return this.firstChild!=null},cloneNode:function e(t){return zr(this.ownerDocument||this,this,t)},normalize:function e(){var t=this.firstChild;while(t){var i=t.nextSibling;if(i&&i.nodeType==Ni&&t.nodeType==Ni){this.removeChild(i);t.appendData(i.data)}else{t.normalize();t=i}}},isSupported:function e(t,i){return this.ownerDocument.implementation.hasFeature(t,i)},hasAttributes:function e(){return this.attributes.length>0},lookupPrefix:function e(t){var i=this;while(i){var r=i._nsMap;if(r){for(var n in r){if(r[n]==t){return n}}}i=i.nodeType==Li?i.ownerDocument:i.parentNode}return null},lookupNamespaceURI:function e(t){var i=this;while(i){var r=i._nsMap;if(r){if(t in r){return r[t]}}i=i.nodeType==Li?i.ownerDocument:i.parentNode}return null},isDefaultNamespace:function e(t){var i=this.lookupPrefix(t);return i==null}};function _r(e){return e=="<"&&"<"||e==">"&&">"||e=="&"&&"&"||e=='"'&&"""||"&#"+e.charCodeAt()+";"}xi(Di,yr);xi(Di,yr.prototype);function br(e,t){if(t(e)){return true}
1if(e=e.firstChild){do{if(br(e,t)){return true}}while(e=e.nextSibling)}}function Tr(){}function Sr(e,t,i){e&&e._inc++;var r=i.namespaceURI;if(r=="http://www.w3.org/2000/xmlns/"){t._nsMap[i.prefix?i.localName:""]=i.value}}function jr(e,t,i,r){e&&e._inc++;var n=i.namespaceURI;if(n=="http://www.w3.org/2000/xmlns/"){delete t._nsMap[i.prefix?i.localName:""]}}function kr(e,t,i){if(e&&e._inc){e._inc++;var r=t.childNodes;if(i){r[r.length++]=i}else{var n=t.firstChild;var a=0;while(n){r[a++]=n;n=n.nextSibling}r.length=a}}}function Er(e,t){var i=t.previousSibling;var r=t.nextSibling;if(i){i.nextSibling=r}else{e.firstChild=r}if(r){r.previousSibling=i}else{e.lastChild=i}kr(e.ownerDocument,e);return t}function wr(e,t,i){var r=t.parentNode;if(r){r.removeChild(t)}if(t.nodeType===Wi){var n=t.firstChild;if(n==null){return t}var a=t.lastChild}else{n=a=t}var s=i?i.previousSibling:e.lastChild;n.previousSibling=s;a.nextSibling=i;if(s){s.nextSibling=n}else{e.firstChild=n}if(i==null){e.lastChild=a}else{i.previousSibling=a}do{n.parentNode=e}while(n!==a&&(n=n.nextSibling));kr(e.ownerDocument||e,e);if(t.nodeType==Wi){t.firstChild=t.lastChild=null}return t}function Cr(e,t){var i=t.parentNode;if(i){var r=e.lastChild;i.removeChild(t);var r=e.lastChild}var r=e.lastChild;t.parentNode=e;t.previousSibling=r;t.nextSibling=null;if(r){r.nextSibling=t}else{e.firstChild=t}e.lastChild=t;kr(e.ownerDocument,e,t);return t}Tr.prototype={nodeName:"#document",nodeType:Vi,doctype:null,documentElement:null,_inc:1,insertBefore:function e(t,i){if(t.nodeType==Wi){var r=t.firstChild;while(r){var n=r.nextSibling;this.insertBefore(r,i);r=n}return t}if(this.documentElement==null&&t.nodeType==Ri){this.documentElement=t}return wr(this,t,i),t.ownerDocument=this,t},removeChild:function e(t){if(this.documentElement==t){this.documentElement=null}return Er(this,t)},importNode:function e(t,i){return Wr(this,t,i)},getElementById:function e(t){var i=null;br(this.documentElement,function(e){if(e.nodeType==Ri){if(e.getAttribute("id")==t){i=e;return true}}});return i},createElement:function e(t){var i=new Ir;i.ownerDocument=this;i.nodeName=t;i.tagName=t;i.childNodes=new cr;var r=i.attributes=new hr;r._ownerElement=i;return i},createDocumentFragment:function e(){var t=new Mr;t.ownerDocument=this;t.childNodes=new cr;return t},createTextNode:function e(t){var i=new Or;i.ownerDocument=this;i.appendData(t);return i},createComment:function e(t){var i=new Pr;i.ownerDocument=this;i.appendData(t);return i},createCDATASection:function e(t){var i=new Dr;i.ownerDocument=this;i.appendData(t);return i},createProcessingInstruction:function e(t,i){var r=new Br;r.ownerDocument=this;r.tagName=r.target=t;r.nodeValue=r.data=i;return r},createAttribute:function e(t){var i=new Ar;i.ownerDocument=this;i.name=t;i.nodeName=t;i.localName=t;i.specified=true;return i},createEntityReference:function e(t){var i=new Ur;i.ownerDocument=this;i.nodeName=t;return i},createElementNS:function e(t,i){var r=new Ir;var n=i.split(":");var a=r.attributes=new hr;r.childNodes=new cr;r.ownerDocument=this;r.nodeName=i;r.tagName=i;r.namespaceURI=t;if(n.length==2){r.prefix=n[0];r.localName=n[1]}else{r.localName=i}a._ownerElement=r;return r},createAttributeNS:function e(t,i){var r=new Ar;var n=i.split(":");r.ownerDocument=this;r.nodeName=i;r.name=i;r.namespaceURI=t;r.specified=true;if(n.length==2){r.prefix=n[0];r.localName=n[1]}else{r.localName=i}return r}};Oi(Tr,yr);function Ir(){this._nsMap={}}Ir.prototype={nodeType:Ri,hasAttribute:function e(t){return this.getAttributeNode(t)!=null},getAttribute:function e(t){var i=this.getAttributeNode(t);return i&&i.value||""},getAttributeNode:function e(t){return this.attributes.getNamedItem(t)},setAttribute:function e(t,i){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+i;this.setAttributeNode(r)},removeAttribute:function e(t){var i=this.getAttributeNode(t);i&&this.removeAttributeNode(i)},appendChild:function e(t){if(t.nodeType===Wi){return this.insertBefore(t,null)}else{return Cr(this,t)}},setAttributeNode:function e(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function e(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function e(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function e(t,i){var r=this.getAttributeNodeNS(t,i);r&&this.removeAttributeNode(r)},hasAttributeNS:function e(t,i){return this.getAttributeNodeNS(t,i)!=null},getAttributeNS:function e(t,i){var r=this.getAttributeNodeNS(t,i);return r&&r.value||""},setAttributeNS:function e(t,i,r){var n=this.ownerDocument.createAttributeNS(t,i);n.value=n.nodeValue=""+r;this.setAttributeNode(n)},getAttributeNodeNS:function e(t,i){return this.attributes.getNamedItemNS(t,i)},getElementsByTagName:function e(t){return new dr(this,function(e){var i=[];br(e,function(r){if(r!==e&&r.nodeType==Ri&&(t==="*"||r.tagName==t)){i.push(r)}});return i})},getElementsByTagNameNS:function e(t,i){return new dr(this,function(e){var r=[];br(e,function(n){if(n!==e&&n.nodeType===Ri&&(t==="*"||n.namespaceURI===t)&&(i==="*"||n.localName==i)){r.push(n)}});return r})}};Tr.prototype.getElementsByTagName=Ir.prototype.getElementsByTagName;Tr.prototype.getElementsByTagNameNS=Ir.prototype.getElementsByTagNameNS;Oi(Ir,yr);function Ar(){}Ar.prototype.nodeType=Li;Oi(Ar,yr);function xr(){}xr.prototype={data:"",substringData:function e(t,i){return this.data.substring(t,t+i)},appendData:function e(t){t=this.data+t;this.nodeValue=this.data=t;this.length=t.length},insertData:function e(t,i){this.replaceData(t,0,i)},appendChild:function e(t){throw new Error(Yi[Ji])},deleteData:function e(t,i){this.replaceData(t,i,"")},replaceData:function e(t,i,r){var n=this.data.substring(0,t);var a=this.data.substring(t+i);r=n+r+a;this.nodeValue=this.data=r;this.length=r.length}};Oi(xr,yr);function Or(){}Or.prototype={nodeName:"#text",nodeType:Ni,splitText:function e(t){var i=this.data;var r=i.substring(t);i=i.substring(0,t);this.data=this.nodeValue=i;this.length=i.length;var n=this.ownerDocument.createTextNode(r);if(this.parentNode){this.parentNode.insertBefore(n,this.nextSibling)}return n}};Oi(Or,xr);function Pr(){}Pr.prototype={nodeName:"#comment",nodeType:Hi};Oi(Pr,xr);function Dr(){}Dr.prototype={nodeName:"#cdata-section",nodeType:Ui};Oi(Dr,xr);function Rr(){}Rr.prototype.nodeType=qi;Oi(Rr,yr);function Lr(){}Lr.prototype.nodeType=zi;Oi(Lr,yr);function Nr(){}Nr.prototype.nodeType=Bi;Oi(Nr,yr);function Ur(){}Ur.prototype.nodeType=Mi;Oi(Ur,yr);function Mr(){}Mr.prototype.nodeName="#document-fragment";Mr.prototype.nodeType=Wi;Oi(Mr,yr);function Br(){}Br.prototype.nodeType=Fi;Oi(Br,yr);function Fr(){}Fr.prototype.serializeToString=function(e,t,i){return Hr.call(e,t,i)};yr.prototype.toString=Hr;function Hr(e,t){var i=[];var r=this.nodeType==9?this.documentElement:this;var n=r.prefix;
1var a=r.namespaceURI;if(a&&n==null){var n=r.lookupPrefix(a);if(n==null){var s=[{namespace:a,prefix:null}]}}qr(this,i,e,t,s);return i.join("")}function Vr(e,t,i){var r=e.prefix||"";var n=e.namespaceURI;if(!r&&!n){return false}if(r==="xml"&&n==="http://www.w3.org/XML/1998/namespace"||n=="http://www.w3.org/2000/xmlns/"){return false}var a=i.length;while(a--){var s=i[a];if(s.prefix==r){return s.namespace!=n}}return true}function qr(e,t,i,r,n){if(r){e=r(e);if(e){if(typeof e=="string"){t.push(e);return}}else{return}}switch(e.nodeType){case Ri:if(!n)n=[];var a=n.length;var s=e.attributes;var o=s.length;var l=e.firstChild;var u=e.tagName;i=Pi===e.namespaceURI||i;t.push("<",u);for(var c=0;c<o;c++){var d=s.item(c);if(d.prefix=="xmlns"){n.push({prefix:d.localName,namespace:d.value})}else if(d.nodeName=="xmlns"){n.push({prefix:"",namespace:d.value})}}for(var c=0;c<o;c++){var d=s.item(c);if(Vr(d,i,n)){var f=d.prefix||"";var h=d.namespaceURI;var p=f?" xmlns:"+f:" xmlns";t.push(p,'="',h,'"');n.push({prefix:f,namespace:h})}qr(d,t,i,r,n)}if(Vr(e,i,n)){var f=e.prefix||"";var h=e.namespaceURI;var p=f?" xmlns:"+f:" xmlns";t.push(p,'="',h,'"');n.push({prefix:f,namespace:h})}if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){t.push(">");if(i&&/^script$/i.test(u)){while(l){if(l.data){t.push(l.data)}else{qr(l,t,i,r,n)}l=l.nextSibling}}else{while(l){qr(l,t,i,r,n);l=l.nextSibling}}t.push("</",u,">")}else{t.push("/>")}return;case Vi:case Wi:var l=e.firstChild;while(l){qr(l,t,i,r,n);l=l.nextSibling}return;case Li:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,_r),'"');case Ni:return t.push(e.data.replace(/[<&]/g,_r));case Ui:return t.push("<![CDATA[",e.data,"]]>");case Hi:return t.push("\x3c!--",e.data,"--\x3e");case qi:var v=e.publicId;var m=e.systemId;t.push("<!DOCTYPE ",e.name);if(v){t.push(' PUBLIC "',v);if(m&&m!="."){t.push('" "',m)}t.push('">')}else if(m&&m!="."){t.push(' SYSTEM "',m,'">')}else{var g=e.internalSubset;if(g){t.push(" [",g,"]")}t.push(">")}return;case Fi:return t.push("<?",e.target," ",e.data,"?>");case Mi:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Wr(e,t,i){var r;switch(t.nodeType){case Ri:r=t.cloneNode(false);r.ownerDocument=e;case Wi:break;case Li:i=true;break}if(!r){r=t.cloneNode(false)}r.ownerDocument=e;r.parentNode=null;if(i){var n=t.firstChild;while(n){r.appendChild(Wr(e,n,i));n=n.nextSibling}}return r}function zr(e,t,i){var r=new t.constructor;for(var n in t){var a=t[n];if(typeof a!="object"){if(a!=r[n]){r[n]=a}}}if(t.childNodes){r.childNodes=new cr}r.ownerDocument=e;switch(r.nodeType){case Ri:var s=t.attributes;var o=r.attributes=new hr;var l=s.length;o._ownerElement=r;for(var u=0;u<l;u++){r.setAttributeNode(zr(e,s.item(u),true))}break;case Li:i=true}if(i){var c=t.firstChild;while(c){r.appendChild(zr(e,c,i));c=c.nextSibling}}return r}function Gr(e,t,i){e[t]=i}try{if(Object.defineProperty){var Yr=function e(t){switch(t.nodeType){case Ri:case Wi:var i=[];t=t.firstChild;while(t){if(t.nodeType!==7&&t.nodeType!==8){i.push(e(t))}t=t.nextSibling}return i.join("");default:return t.nodeValue}};Object.defineProperty(dr.prototype,"length",{get:function e(){fr(this);return this.$$length}});Object.defineProperty(yr.prototype,"textContent",{get:function e(){return Yr(this)},set:function e(t){switch(this.nodeType){case Ri:case Wi:while(this.firstChild){this.removeChild(this.firstChild)}if(t||String(t)){this.appendChild(this.ownerDocument.createTextNode(t))}break;default:this.data=t;this.value=t;this.nodeValue=t}}});Gr=function e(t,i,r){t["$$"+i]=r}}}catch(e){}var Kr=gr;var Xr=Fr;var Jr={DOMImplementation:Kr,XMLSerializer:Xr};var Qr=a(function(e,t){function i(e){this.options=e||{locator:{}}}i.prototype.parseFromString=function(e,t){var i=this.options;var a=new u;var s=i.domBuilder||new n;var o=i.errorHandler;var l=i.locator;var c=i.xmlns||{};var d={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};if(l){s.setDocumentLocator(l)}a.errorHandler=r(o,s,l);a.domBuilder=i.domBuilder||s;if(/\/x?html?$/.test(t)){d.nbsp="\xa0";d.copy="\xa9";c[""]="http://www.w3.org/1999/xhtml"}c.xml=c.xml||"http://www.w3.org/XML/1998/namespace";if(e){a.parse(e,c,d)}else{a.errorHandler.error("invalid doc source")}return s.doc};function r(e,t,i){if(!e){if(t instanceof n){return t}e=t}var r={};var a=e instanceof Function;i=i||{};function o(t){var n=e[t];if(!n&&a){n=e.length==2?function(i){e(t,i)}:e}r[t]=n&&function(e){n("[xmldom "+t+"]\t"+e+s(i))}||function(){}}o("warning");o("error");o("fatalError");return r}function n(){this.cdata=false}function a(e,t){t.lineNumber=e.lineNumber;t.columnNumber=e.columnNumber}n.prototype={startDocument:function e(){this.doc=(new c).createDocument(null,null,null);if(this.locator){this.doc.documentURI=this.locator.systemId}},startElement:function e(t,i,r,n){var s=this.doc;var o=s.createElementNS(t,r||i);var u=n.length;l(this,o);this.currentElement=o;this.locator&&a(this.locator,o);for(var c=0;c<u;c++){var t=n.getURI(c);var d=n.getValue(c);var r=n.getQName(c);var f=s.createAttributeNS(t,r);this.locator&&a(n.getLocator(c),f);f.value=f.nodeValue=d;o.setAttributeNode(f)}},endElement:function e(t,i,r){var n=this.currentElement;var a=n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function e(t,i){},endPrefixMapping:function e(t){},processingInstruction:function e(t,i){var r=this.doc.createProcessingInstruction(t,i);this.locator&&a(this.locator,r);
1l(this,r)},ignorableWhitespace:function e(t,i,r){},characters:function e(t,i,r){t=o.apply(this,arguments);if(t){if(this.cdata){var n=this.doc.createCDATASection(t)}else{var n=this.doc.createTextNode(t)}if(this.currentElement){this.currentElement.appendChild(n)}else if(/^\s*$/.test(t)){this.doc.appendChild(n)}this.locator&&a(this.locator,n)}},skippedEntity:function e(t){},endDocument:function e(){this.doc.normalize()},setDocumentLocator:function e(t){if(this.locator=t){t.lineNumber=0}},comment:function e(t,i,r){t=o.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&a(this.locator,n);l(this,n)},startCDATA:function e(){this.cdata=true},endCDATA:function e(){this.cdata=false},startDTD:function e(t,i,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var s=n.createDocumentType(t,i,r);this.locator&&a(this.locator,s);l(this,s)}},warning:function e(t){console.warn("[xmldom warning]\t"+t,s(this.locator))},error:function e(t){console.error("[xmldom error]\t"+t,s(this.locator))},fatalError:function e(t){console.error("[xmldom fatalError]\t"+t,s(this.locator));throw t}};function s(e){if(e){return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}}function o(e,t,i){if(typeof e=="string"){return e.substr(t,i)}else{if(e.length>=t+i||t){return new java.lang.String(e,t,i)+""}return e}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){n.prototype[e]=function(){return null}});function l(e,t){if(!e.currentElement){e.doc.appendChild(t)}else{e.currentElement.appendChild(t)}}var u=Ai.XMLReader;var c=t.DOMImplementation=Jr.DOMImplementation;t.XMLSerializer=Jr.XMLSerializer;t.DOMParser=i});var Zr=Qr.DOMImplementation;var $r=Qr.XMLSerializer;var en=Qr.DOMParser;var tn=function e(t){return!!t&&typeof t==="object"};var rn=function e(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}
1return i.reduce(function(t,i){Object.keys(i).forEach(function(r){if(Array.isArray(t[r])&&Array.isArray(i[r])){t[r]=t[r].concat(i[r])}else if(tn(t[r])&&tn(i[r])){t[r]=e(t[r],i[r])}else{t[r]=i[r]}});return t},{})};var nn=function e(t){return Object.keys(t).map(function(e){return t[e]})};var an=function e(t,i){var r=[];for(var n=t;n<i;n++){r.push(n)}return r};var sn=function e(t){return t.reduce(function(e,t){return e.concat(t)},[])};var on=function e(t){if(!t.length){return[]}var i=[];for(var r=0;r<t.length;r++){i.push(t[r])}return i};var ln=function e(t,i){return t.reduce(function(e,t,r){if(t[i]){e.push(r)}return e},[])};var un={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 cn=function e(t){var i=t.baseUrl,r=i===void 0?"":i,n=t.source,a=n===void 0?"":n,s=t.range,o=s===void 0?"":s,l=t.indexRange,u=l===void 0?"":l;var c={uri:a,resolvedUri:Zt(r||"",a)};if(o||u){var d=o?o:u;var f=d.split("-");var h=parseInt(f[0],10);var p=parseInt(f[1],10);c.byterange={length:p-h+1,offset:h}}return c};var dn=function e(t){var i=t.offset+t.length-1;return t.offset+"-"+i};var fn={static:function e(t){var i=t.duration,r=t.timescale,n=r===void 0?1:r,a=t.sourceDuration;return{start:0,end:Math.ceil(a/(i/n))}},dynamic:function e(t){var i=t.NOW,r=t.clientOffset,n=t.availabilityStartTime,a=t.timescale,s=a===void 0?1:a,o=t.duration,l=t.start,u=l===void 0?0:l,c=t.minimumUpdatePeriod,d=c===void 0?0:c,f=t.timeShiftBufferDepth,h=f===void 0?Infinity:f;var p=(i+r)/1e3;var v=n+u;var m=p+d;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 hn=function e(t){return function(e,i){var r=t.duration,n=t.timescale,a=n===void 0?1:n,s=t.periodIndex,o=t.startNumber,l=o===void 0?1:o;return{number:l+e,duration:r/a,timeline:s,time:i*r}}};var pn=function e(t){var i=t.type,r=i===void 0?"static":i,n=t.duration,a=t.timescale,s=a===void 0?1:a,o=t.sourceDuration;var l=fn[r](t),u=l.start,c=l.end;var d=an(u,c).map(hn(t));if(r==="static"){var f=d.length-1;d[f].duration=o-n/s*f}return d};var vn=function e(t){var i=t.baseUrl,r=t.initialization,n=r===void 0?{}:r,a=t.sourceDuration,s=t.timescale,o=s===void 0?1:s,l=t.indexRange,u=l===void 0?"":l,c=t.duration;if(!i){throw new Error(un.NO_BASE_URL)}var d=cn({baseUrl:i,source:n.sourceURL,range:n.range});var f=cn({baseUrl:i,source:i,indexRange:u});f.map=d;if(c){var h=pn(t);if(h.length){f.duration=h[0].duration;f.timeline=h[0].timeline}}else if(a){f.duration=a/o;f.timeline=0}f.number=0;return[f]};var mn=function e(t,i,r){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 l=o.offset+o.length;var u=i.timescale;var c=i.references.filter(function(e){return e.referenceType!==1});var d=[];var f=l+i.firstOffset;for(var h=0;h<c.length;h++){var p=i.references[h];var v=p.referencedSize;var m=p.subsegmentDuration;var g=f+v-1;var y=f+"-"+g;var _={baseUrl:r,timescale:u,timeline:s,periodIndex:s,duration:m,sourceDuration:a,indexRange:y};var b=vn(_)[0];if(n){b.map=n}d.push(b);f+=v}t.segments=d;return t};var gn=function e(t){var i=nn(t.reduce(function(e,t){var i=t.attributes.id+(t.attributes.lang||"");if(e[i]){var r;if(t.segments[0]){t.segments[0].discontinuity=true}(r=e[i].segments).push.apply(r,t.segments);if(t.attributes.contentProtection){e[i].attributes.contentProtection=t.attributes.contentProtection}}else{e[i]=t}return e},{}));return i.map(function(e){e.discontinuityStarts=ln(e.segments,"discontinuity");return e})};var yn=function e(t,i){if(i===void 0){i={}}if(!Object.keys(i).length){return t}for(var r in t){var n=t[r];if(!n.sidx){continue}var a=n.sidx.uri+"-"+dn(n.sidx.byterange);var s=i[a]&&i[a].sidx;if(n.sidx&&s){mn(n,s,n.sidx.resolvedUri)}}return t};var _n=function e(t){var i;var r=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(i={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:(r.type||"static")==="static",timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(r.contentProtection){s.contentProtection=r.contentProtection}if(a){s.sidx=a}return s};var bn=function e(t){var i;var r=t.attributes,n=t.segments;if(typeof n==="undefined"){n=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}];r.duration=r.sourceDuration}return{attributes:(i={NAME:r.id,BANDWIDTH:r.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:(r.type||"static")==="static",timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1}};var Tn=function e(t,i){if(i===void 0){i={}}var r;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:yn([_n(t)],i),uri:""};if(typeof r==="undefined"&&n==="main"){r=t;r.default=true}return e},{});if(!r){var a=Object.keys(n)[0];n[a].default=true}return n};var Sn=function e(t,i){if(i===void 0){i={}}return t.reduce(function(e,t){var r=t.attributes.lang||"text";if(e[r]){return e}e[r]={language:r,default:false,autoselect:false,playlists:yn([bn(t)],i),uri:""};return e},{})};var jn=function e(t){var i;var r=t.attributes,n=t.segments,a=t.sidx;var s={attributes:(i={NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:(r.type||"static")==="static",timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:n,mediaSequence:n.length?n[0].number:1};if(r.contentProtection){s.contentProtection=r.contentProtection}if(a){s.sidx=a}return s};var kn=function e(t,i){var r;if(i===void 0){i={}}if(!t.length){return{}}var n=t[0].attributes,a=n.sourceDuration,s=n.type,o=s===void 0?"static":s,l=n.suggestedPresentationDelay,u=n.minimumUpdatePeriod,c=u===void 0?0:u;var d=function e(t){var i=t.attributes;return i.mimeType==="video/mp4"||i.contentType==="video"};var f=function e(t){var i=t.attributes;return i.mimeType==="audio/mp4"||i.contentType==="audio"};var h=function e(t){var i=t.attributes;return i.mimeType==="text/vtt"||i.contentType==="text"};var p=gn(t.filter(d)).map(jn);var v=gn(t.filter(f));var m=t.filter(h);var g={allowCache:true,discontinuityStarts:[],segments:[],endList:true,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:a,playlists:yn(p,i),minimumUpdatePeriod:c*1e3};if(o==="dynamic"){g.suggestedPresentationDelay=l}if(v.length){g.mediaGroups.AUDIO.audio=Tn(v,i)}if(m.length){g.mediaGroups.SUBTITLES.subs=Sn(m,i)}return g};var En=function e(t,i,r){var n=t.NOW,a=t.clientOffset,s=t.availabilityStartTime,o=t.timescale,l=o===void 0?1:o,u=t.start,c=u===void 0?0:u,d=t.minimumUpdatePeriod,f=d===void 0?0:d;var h=(n+a)/1e3;var p=s+c;var v=h+f;var m=v-p;return Math.ceil((m*l-i)/r)};var wn=function e(t,i){var r=t.type,n=r===void 0?"static":r,a=t.minimumUpdatePeriod,s=a===void 0?0:a,o=t.media,l=o===void 0?"":o,u=t.sourceDuration,c=t.timescale,d=c===void 0?1:c,f=t.startNumber,h=f===void 0?1:f,p=t.periodIndex;var v=[];var m=-1;for(var g=0;g<i.length;g++){var y=i[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 j=g+1;if(j===i.length){if(n==="dynamic"&&s>0&&l.indexOf("$Number$")>0){S=En(t,m,_)}else{S=(u*d-m)/_}}else{S=(i[j].t-m)/_}}else{S=b+1}var k=h+v.length+S;var E=h+v.length;while(E<k){v.push({number:E,duration:_/d,time:m,timeline:p});m+=_;E++}}return v};var Cn=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g;var In=function e(t){return function(e,i,r,n){if(e==="$$"){return"$"}if(typeof t[i]==="undefined"){return e}var a=""+t[i];if(i==="RepresentationID"){return a}if(!r){n=1}else{n=parseInt(n,10)}
1if(a.length>=n){return a}return""+new Array(n-a.length+1).join("0")+a}};var An=function e(t,i){return t.replace(Cn,In(i))};var xn=function e(t,i){if(!t.duration&&!i){return[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}if(t.duration){return pn(t)}return wn(t,i)};var On=function e(t,i){var r={RepresentationID:t.id,Bandwidth:t.bandwidth||0};var n=t.initialization,a=n===void 0?{sourceURL:"",range:""}:n;var s=cn({baseUrl:t.baseUrl,source:An(a.sourceURL,r),range:a.range});var o=xn(t,i);return o.map(function(e){r.Number=e.number;r.Time=e.time;var i=An(t.media||"",r);return{uri:i,timeline:e.timeline,duration:e.duration,resolvedUri:Zt(t.baseUrl||"",i),map:s,number:e.number}})};var Pn=function e(t,i){var r=t.baseUrl,n=t.initialization,a=n===void 0?{}:n;var s=cn({baseUrl:r,source:a.sourceURL,range:a.range});var o=cn({baseUrl:r,source:i.media,range:i.mediaRange});o.map=s;return o};var Dn=function e(t,i){var r=t.duration,n=t.segmentUrls,a=n===void 0?[]:n;if(!r&&!i||r&&i){throw new Error(un.SEGMENT_TIME_UNSPECIFIED)}var s=a.map(function(e){return Pn(t,e)});var o;if(r){o=pn(t)}if(i){o=wn(t,i)}var l=o.map(function(e,t){if(s[t]){var i=s[t];i.timeline=e.timeline;i.duration=e.duration;i.number=e.number;return i}}).filter(function(e){return e});return l};var Rn=function e(t){var i=t.attributes,r=t.segmentInfo;var n;var a;if(r.template){a=On;n=rn(i,r.template)}else if(r.base){a=vn;n=rn(i,r.base)}else if(r.list){a=Dn;n=rn(i,r.list)}var s={attributes:i};if(!a){return s}var o=a(n,r.timeline);if(n.duration){var l=n,u=l.duration,c=l.timescale,d=c===void 0?1:c;n.duration=u/d}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(r.base&&n.indexRange){s.sidx=o[0];s.segments=[]}return s};var Ln=function e(t){return t.map(Rn)};var Nn=function e(t,i){return on(t.childNodes).filter(function(e){var t=e.tagName;return t===i})};var Un=function e(t){return t.textContent.trim()};var Mn=function e(t){var i=365*24*60*60;var r=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 l=o.exec(t);if(!l){return 0}var u=l.slice(1),c=u[0],d=u[1],f=u[2],h=u[3],p=u[4],v=u[5];return parseFloat(c||0)*i+parseFloat(d||0)*r+parseFloat(f||0)*n+parseFloat(h||0)*a+parseFloat(p||0)*s+parseFloat(v||0)};var Bn=function e(t){var i=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;if(i.test(t)){t+="Z"}return Date.parse(t)};var Fn={mediaPresentationDuration:function e(t){return Mn(t)},availabilityStartTime:function e(t){return Bn(t)/1e3},minimumUpdatePeriod:function e(t){return Mn(t)},suggestedPresentationDelay:function e(t){return Mn(t)},type:function e(t){return t},timeShiftBufferDepth:function e(t){return Mn(t)},start:function e(t){return Mn(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 i=parseInt(t,10);if(isNaN(i)){return Mn(t)}return i},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 Hn=function e(t){if(!(t&&t.attributes)){return{}}return on(t.attributes).reduce(function(e,t){var i=Fn[t.name]||Fn.DEFAULT;e[t.name]=i(t.value);return e},{})};var Vn={"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 qn=function e(t,i){if(!i.length){return t}return sn(t.map(function(e){return i.map(function(t){return Zt(e,Un(t))})}))};var Wn=function e(t){var i=Nn(t,"SegmentTemplate")[0];var r=Nn(t,"SegmentList")[0];var n=r&&Nn(r,"SegmentURL").map(function(e){return rn({tag:"SegmentURL"},Hn(e))});var a=Nn(t,"SegmentBase")[0];var s=r||i;var o=s&&Nn(s,"SegmentTimeline")[0];var l=r||a||i;var u=l&&Nn(l,"Initialization")[0];var c=i&&Hn(i);if(c&&u){c.initialization=u&&Hn(u)}else if(c&&c.initialization){c.initialization={sourceURL:c.initialization}}var d={template:c,timeline:o&&Nn(o,"S").map(function(e){return Hn(e)}),list:r&&rn(Hn(r),{segmentUrls:n,initialization:Hn(u)}),base:a&&rn(Hn(a),{initialization:Hn(u)})};
1Object.keys(d).forEach(function(e){if(!d[e]){delete d[e]}});return d};var zn=function e(t,i,r){return function(e){var n=Nn(e,"BaseURL");var a=qn(i,n);var s=rn(t,Hn(e));var o=Wn(e);return a.map(function(e){return{segmentInfo:rn(r,o),attributes:rn(s,{baseUrl:e})}})}};var Gn=function e(t){return t.reduce(function(e,t){var i=Hn(t);var r=Vn[i.schemeIdUri];if(r){e[r]={attributes:i};var n=Nn(t,"cenc:pssh")[0];if(n){var a=Un(n);var s=a&&ri(a);e[r].pssh=s}}return e},{})};var Yn=function e(t,i,r){return function(e){var n=Hn(e);var a=qn(i,Nn(e,"BaseURL"));var s=Nn(e,"Role")[0];var o={role:Hn(s)};var l=rn(t,n,o);var u=Gn(Nn(e,"ContentProtection"));if(Object.keys(u).length){l=rn(l,{contentProtection:u})}var c=Wn(e);var d=Nn(e,"Representation");var f=rn(r,c);return sn(d.map(zn(l,a,f)))}};var Kn=function e(t,i){return function(e,r){var n=qn(i,Nn(e,"BaseURL"));var a=Hn(e);var s=parseInt(a.id,10);var o=f.isNaN(s)?r:s;var l=rn(t,{periodIndex:o});var u=Nn(e,"AdaptationSet");var c=Wn(e);return sn(u.map(Yn(l,n,c)))}};var Xn=function e(t,i){if(i===void 0){i={}}var r=i,n=r.manifestUri,a=n===void 0?"":n,s=r.NOW,o=s===void 0?Date.now():s,l=r.clientOffset,u=l===void 0?0:l;var c=Nn(t,"Period");if(!c.length){throw new Error(un.INVALID_NUMBER_OF_PERIOD)}var d=Hn(t);var f=qn([a],Nn(t,"BaseURL"));d.sourceDuration=d.mediaPresentationDuration||0;d.NOW=o;d.clientOffset=u;return sn(c.map(Kn(d,f)))};var Jn=function e(t){if(t===""){throw new Error(un.DASH_EMPTY_MANIFEST)}var i=new en;var r=i.parseFromString(t,"application/xml");var n=r&&r.documentElement.tagName==="MPD"?r.documentElement:null;if(!n||n&&n.getElementsByTagName("parsererror").length>0){throw new Error(un.DASH_INVALID_XML)}return n};var Qn=function e(t){var i=Nn(t,"UTCTiming")[0];if(!i){return null}var r=Hn(i);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.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":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT";r.value=Date.parse(r.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(un.UNSUPPORTED_UTC_TIMING_SCHEME)}return r};var Zn=function e(t,i){if(i===void 0){i={}}return kn(Ln(Xn(Jn(t),i)),i.sidxMapping)};var $n=function e(t){return Qn(Jn(t))};var ea=function e(t){return t>>>0};var ta=function e(t){return("00"+t.toString(16)).slice(-2)};var ia={toUnsigned:ea,toHexString:ta};var ra,na,aa=ia.toUnsigned,sa=function e(t){return new Date(t*1e3-20828448e5)},oa=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]}},la=function e(t){var i="";i+=String.fromCharCode(t[0]);i+=String.fromCharCode(t[1]);i+=String.fromCharCode(t[2]);i+=String.fromCharCode(t[3]);return i},ua=function e(t,i){var r=[],n,a,s,o,l;if(!i.length){return null}for(n=0;n<t.byteLength;){a=aa(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);s=la(t.subarray(n+4,n+8));o=a>1?n+a:t.byteLength;if(s===i[0]){if(i.length===1){r.push(t.subarray(n+8,o))}else{l=e(t.subarray(n+8,o),i.slice(1));if(l.length){r=r.concat(l)}}}n=o}return r},ca=function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=[],n,a;for(n=0;n+4<t.length;n+=a){a=i.getUint32(n);n+=4;if(a<=0){r.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(t[n]&31){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+t[n]&31);break}}return r},da={avc1:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:i.getUint16(6),width:i.getUint16(24),height:i.getUint16(26),horizresolution:i.getUint16(28)+i.getUint16(30)/16,vertresolution:i.getUint16(32)+i.getUint16(34)/16,frameCount:i.getUint16(40),depth:i.getUint16(74),config:ra(t.subarray(78,t.byteLength))}},avcC:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={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,l;o=6;for(l=0;l<n;l++){s=i.getUint16(o);o+=2;r.sps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}a=t[o];o++;for(l=0;l<a;l++){s=i.getUint16(o);o+=2;r.pps.push(new Uint8Array(t.subarray(o,o+s)));o+=s}return r},btrt:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:i.getUint32(0),maxBitrate:i.getUint32(4),avgBitrate:i.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 i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={majorBrand:la(t.subarray(0,4)),minorVersion:i.getUint32(4),compatibleBrands:[]},n=8;while(n<t.byteLength){r.compatibleBrands.push(la(t.subarray(n,n+4)));n+=4}return r},dinf:function e(t){return{boxes:ra(t)}},dref:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:ra(t.subarray(8))}},hdlr:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:la(t.subarray(8,12)),name:""},n=8;for(n=24;n<t.byteLength;n++){if(t[n]===0){n++;break}r.name+=String.fromCharCode(t[n])}r.name=decodeURIComponent(escape(r.name));return r},mdat:function e(t){return{byteLength:t.byteLength,nals:ca(t)}},mdhd:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=4,n,a={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};if(a.version===1){r+=4;a.creationTime=sa(i.getUint32(r));r+=8;a.modificationTime=sa(i.getUint32(r));r+=4;a.timescale=i.getUint32(r);r+=8;a.duration=i.getUint32(r)}else{a.creationTime=sa(i.getUint32(r));r+=4;a.modificationTime=sa(i.getUint32(r));r+=4;a.timescale=i.getUint32(r);r+=4;a.duration=i.getUint32(r)}r+=4;n=i.getUint16(r);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:ra(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:ra(t)}},mp4a:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={dataReferenceIndex:i.getUint16(6),channelcount:i.getUint16(16),samplesize:i.getUint16(18),samplerate:i.getUint16(24)+i.getUint16(26)/65536};if(t.byteLength>28){r.streamDescriptor=ra(t.subarray(28))[0]}return r},moof:function e(t){return{boxes:ra(t)}},moov:function e(t){return{boxes:ra(t)}},mvex:function e(t){return{boxes:ra(t)}},mvhd:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=4,n={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){r+=4;n.creationTime=sa(i.getUint32(r));r+=8;n.modificationTime=sa(i.getUint32(r));r+=4;n.timescale=i.getUint32(r);r+=8;n.duration=i.getUint32(r)}else{n.creationTime=sa(i.getUint32(r));r+=4;n.modificationTime=sa(i.getUint32(r));r+=4;n.timescale=i.getUint32(r);r+=4;n.duration=i.getUint32(r)}r+=4;n.rate=i.getUint16(r)+i.getUint16(r+2)/16;r+=4;n.volume=i.getUint8(r)+i.getUint8(r+1)/8;r+=2;r+=2;r+=2*4;n.matrix=new Uint32Array(t.subarray(r,r+9*4));r+=9*4;r+=6*4;n.nextTrackId=i.getUint32(r);return n},pdin:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:i.getUint32(4),initialDelay:i.getUint32(8)}},sdtp:function e(t){var i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r;for(r=4;r<t.byteLength;r++){i.samples.push({dependsOn:(t[r]&48)>>4,isDependedOn:(t[r]&12)>>2,hasRedundancy:t[r]&3})}return i},sidx:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},n=i.getUint16(22),a;for(a=24;n;a+=12,n--){r.references.push({referenceType:(t[a]&128)>>>7,referencedSize:i.getUint32(a)&2147483647,subsegmentDuration:i.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:i.getUint32(a+8)&268435455})}return r},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:ra(t)}},stco:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},n=i.getUint32(4),a;for(a=8;n;a+=4,n--){r.chunkOffsets.push(i.getUint32(a))}return r},stsc:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=i.getUint32(4),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]},a;for(a=8;r;
1a+=12,r--){n.sampleToChunks.push({firstChunk:i.getUint32(a),samplesPerChunk:i.getUint32(a+4),sampleDescriptionIndex:i.getUint32(a+8)})}return n},stsd:function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:ra(t.subarray(8))}},stsz:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]},n;for(n=12;n<t.byteLength;n+=4){r.entries.push(i.getUint32(n))}return r},stts:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},n=i.getUint32(4),a;for(a=8;n;a+=8,n--){r.timeToSamples.push({sampleCount:i.getUint32(a),sampleDelta:i.getUint32(a+4)})}return r},styp:function e(t){return da.ftyp(t)},tfdt:function e(t){var i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:aa(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};if(i.version===1){i.baseMediaDecodeTime*=Math.pow(2,32);i.baseMediaDecodeTime+=aa(t[8]<<24|t[9]<<16|t[10]<<8|t[11])}return i},tfhd:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},n=r.flags[2]&1,a=r.flags[2]&2,s=r.flags[2]&8,o=r.flags[2]&16,l=r.flags[2]&32,u=r.flags[0]&65536,c=r.flags[0]&131072,d;d=8;if(n){d+=4;r.baseDataOffset=i.getUint32(12);d+=4}if(a){r.sampleDescriptionIndex=i.getUint32(d);d+=4}if(s){r.defaultSampleDuration=i.getUint32(d);d+=4}if(o){r.defaultSampleSize=i.getUint32(d);d+=4}if(l){r.defaultSampleFlags=i.getUint32(d)}if(u){r.durationIsEmpty=true}if(!n&&c){r.baseDataOffsetIsMoof=true}return r},tkhd:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=4,n={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};if(n.version===1){r+=4;n.creationTime=sa(i.getUint32(r));r+=8;n.modificationTime=sa(i.getUint32(r));r+=4;n.trackId=i.getUint32(r);r+=4;r+=8;n.duration=i.getUint32(r)}else{n.creationTime=sa(i.getUint32(r));r+=4;n.modificationTime=sa(i.getUint32(r));r+=4;n.trackId=i.getUint32(r);r+=4;r+=4;n.duration=i.getUint32(r)}r+=4;r+=2*4;n.layer=i.getUint16(r);r+=2;n.alternateGroup=i.getUint16(r);r+=2;n.volume=i.getUint8(r)+i.getUint8(r+1)/8;r+=2;r+=2;n.matrix=new Uint32Array(t.subarray(r,r+9*4));r+=9*4;n.width=i.getUint16(r)+i.getUint16(r+2)/16;r+=4;n.height=i.getUint16(r)+i.getUint16(r+2)/16;return n},traf:function e(t){return{boxes:ra(t)}},trak:function e(t){return{boxes:ra(t)}},trex:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4),defaultSampleDescriptionIndex:i.getUint32(8),defaultSampleDuration:i.getUint32(12),defaultSampleSize:i.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:i.getUint16(22)}},trun:function e(t){var i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.flags[2]&1,a=i.flags[2]&4,s=i.flags[1]&1,o=i.flags[1]&2,l=i.flags[1]&4,u=i.flags[1]&8,c=r.getUint32(4),d=8,f;if(n){i.dataOffset=r.getInt32(d);d+=4}if(a&&c){f={flags:oa(t.subarray(d,d+4))};d+=4;if(s){f.duration=r.getUint32(d);d+=4}if(o){f.size=r.getUint32(d);d+=4}if(u){f.compositionTimeOffset=r.getUint32(d);d+=4}i.samples.push(f);c--}while(c--){f={};if(s){f.duration=r.getUint32(d);d+=4}if(o){f.size=r.getUint32(d);d+=4}if(l){f.flags=oa(t.subarray(d,d+4));d+=4}if(u){f.compositionTimeOffset=r.getUint32(d);d+=4}i.samples.push(f)}return i},"url ":function e(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function e(t){var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:i.getUint16(4),opcolor:new Uint16Array([i.getUint16(6),i.getUint16(8),i.getUint16(10)])}}};ra=function e(t){var i=0,r=[],n,a,s,o,l;var u=new ArrayBuffer(t.length);var c=new Uint8Array(u);for(var d=0;d<t.length;++d){c[d]=t[d]}n=new DataView(u);while(i<t.byteLength){a=n.getUint32(i);s=la(t.subarray(i+4,i+8));o=a>1?i+a:t.byteLength;l=(da[s]||function(e){return{data:e}})(t.subarray(i+8,o));l.size=a;l.type=s;r.push(l);i=o}return r};na=function e(t,i){var r;i=i||0;r=new Array(i*2+1).join(" ");return t.map(function(e,t){return r+e.type+"\n"+Object.keys(e).filter(function(e){return e!=="type"&&e!=="boxes"}).map(function(t){var i=r+" "+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 i+"<>"}if(a.length===1){return i+"<"+a.join("").slice(1)+">"}return i+"<\n"+a.map(function(e){return r+" "+e}).join("\n")+"\n"+r+" >"}return i+JSON.stringify(n,null,2).split("\n").map(function(e,t){if(t===0){return e}return r+" "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+na(e.boxes,i+1):"")}).join("\n")};var fa={inspect:ra,textify:na,parseType:la,findBox:ua,parseTraf:da.traf,parseTfdt:da.tfdt,parseHdlr:da.hdlr,parseTfhd:da.tfhd,parseTrun:da.trun,parseSidx:da.sidx};var ha=r.EventTarget,pa=r.mergeOptions;var va=function e(t,i){var r=void 0;var n=pa(t,{duration:i.duration,minimumUpdatePeriod:i.minimumUpdatePeriod});for(var a=0;a<i.playlists.length;a++){var s=U(n,i.playlists[a]);if(s){n=s}else{r=true}}R(i,function(e,t,i,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id;var o=U(n,e.playlists[0]);if(o){n=o;n.mediaGroups[t][i][a].playlists[0]=n.playlists[s];r=false}}});if(r){return null}return n};var ma=function e(t){var i=t.byterange.offset+t.byterange.length-1;return t.uri+"-"+t.byterange.offset+"-"+i};var ga=function e(t,i){var r=Boolean(!t.map&&!i.map);var n=r||Boolean(t.map&&i.map&&t.map.byterange.offset===i.map.byterange.offset&&t.map.byterange.length===i.map.byterange.length);return n&&t.uri===i.uri&&t.byterange.offset===i.byterange.offset&&t.byterange.length===i.byterange.length};var ya=function e(t,i){var r={};for(var n in t){var a=t[n];var s=a.sidx;if(s){var o=ma(s);if(!i[o]){break}var l=i[o].sidxInfo;if(ga(l,s)){r[o]=i[o]}}}return r};var _a=function e(t,i,r,n){var a=Zn(t,{manifestUri:i,clientOffset:r});var s=ya(a.playlists,n);var o=s;R(a,function(e,t,i,r){if(e.playlists&&e.playlists.length){var a=e.playlists;o=pa(o,ya(a,n))}});return o};var ba=function e(t,i,n,a,s){var o={uri:p(a.handleManifestRedirects,t.resolvedUri),byterange:t.byterange,playlist:i};var l=r.mergeOptions(o,{responseType:"arraybuffer",headers:ge(o)});
1return n(l,s)};var Ta=function(e){I(t,e);function t(e,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];E(this,t);var a=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var s=r.withCredentials,o=s===undefined?false:s,l=r.handleManifestRedirects,u=l===undefined?false:l;a.hls_=i;a.withCredentials=o;a.handleManifestRedirects=u;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().id)});a.state="HAVE_NOTHING";a.loadedPlaylists_={};if(typeof e==="string"){a.srcUrl=e;a.sidxMapping_={};return A(a)}a.setupChildLoader(n,e);return a}w(t,[{key:"setupChildLoader",value:function e(t,i){this.masterPlaylistLoader_=t;this.childPlaylist_=i}},{key:"dispose",value:function e(){this.trigger("dispose");this.stopRequest();this.loadedPlaylists_={};f.clearTimeout(this.minimumUpdatePeriodTimeout_);f.clearTimeout(this.mediaRequest_);f.clearTimeout(this.mediaUpdateTimeout);this.off()}},{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,i,r,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(r){a.state=r}a.trigger("error");return n(i,null)}var o=new Uint8Array(s.response);var l=fa.parseSidx(o.subarray(8));return n(i,l)}}},{key:"media",value:function e(t){var i=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}var r=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.id!==this.media_.id;if(n&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].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_=f.setTimeout(this.haveMetadata.bind(this,{startingState:r,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=ma(t.sidx);s[o]={sidxInfo:t.sidx};this.request=ba(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,a,r,function(e,n){if(!e||!n){throw new Error("failed to request sidx")}s[o].sidx=n;i.haveMetadata({startingState:r,playlist:e.playlists[t.id]})}))}},{key:"haveMetadata",value:function e(t){var i=t.startingState,r=t.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[r.id]=r;this.mediaRequest_=null;this.refreshMedia_(r.id);if(i==="HAVE_MASTER"){this.trigger("loadedmetadata")}else{this.trigger("mediachange")}}},{key:"pause",value:function e(){this.stopRequest();f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.minimumUpdatePeriodTimeout_);if(this.state==="HAVE_NOTHING"){this.started=false}}},{key:"load",value:function e(t){var i=this;f.clearTimeout(this.mediaUpdateTimeout);f.clearTimeout(this.minimumUpdatePeriodTimeout_);var r=this.media();if(t){var n=r?r.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=f.setTimeout(function(){return i.load()},n);return}if(!this.started){this.start();return}if(r&&!r.endList){this.trigger("mediaupdatetimeout")}else{this.trigger("loadedplaylist")}}},{key:"parseMasterXml",value:function e(){var t=Zn(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});t.uri=this.srcUrl;for(var i=0;i<t.playlists.length;i++){var r="placeholder-uri-"+i;t.playlists[i].uri=r}R(t,function(e,i,r,n){if(e.playlists&&e.playlists.length){var a="placeholder-uri-"+i+"-"+r+"-"+n;var s=M(0,a);e.playlists[0].uri=a;e.playlists[0].id=s;t.playlists[s]=e.playlists[0];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_=f.setTimeout(this.haveMaster_.bind(this),0);return}this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,i){if(!t.request){return}t.request=null;if(e){t.error={status:i.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=i.responseText;if(i.responseHeaders&&i.responseHeaders.date){t.masterLoaded_=Date.parse(i.responseHeaders.date)}else{t.masterLoaded_=Date.now()}t.srcUrl=p(t.handleManifestRedirects,t.srcUrl,i);t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))})}},{key:"syncClientServerClock_",value:function e(t){var i=this;var r=$n(this.masterXml_);if(r===null){this.clientOffset_=this.masterLoaded_-Date.now();return t()}if(r.method==="DIRECT"){this.clientOffset_=r.value-Date.now();return t()}this.request=this.hls_.xhr({uri:h(this.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},function(e,n){if(!i.request){return}if(e){i.clientOffset_=i.masterLoaded_-Date.now();return t()}var a=void 0;if(r.method==="HEAD"){if(!n.responseHeaders||!n.responseHeaders.date){a=i.masterLoaded_}else{a=Date.parse(n.responseHeaders.date)}}else{a=Date.parse(n.responseText)}i.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_=f.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,i){if(!t.request){return}t.request=null;if(e){t.error={status:i.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2};if(t.state==="HAVE_NOTHING"){t.started=false}return t.trigger("error")}t.masterXml_=i.responseText;t.sidxMapping_=_a(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);var r=t.parseMasterXml();var n=va(t.master,r);var a=t.media().sidx;if(n){if(a){var s=ma(a);if(!t.sidxMapping_[s]){var o=t.media();t.request=ba(o.sidx,o,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(o,r,t.state,function(e,i){if(!e||!i){throw new Error("failed to request sidx on minimumUpdatePeriod")}t.sidxMapping_[s].sidx=i;t.minimumUpdatePeriodTimeout_=f.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod);t.refreshMedia_(t.media().id);return}))}}else{t.master=n}}t.minimumUpdatePeriodTimeout_=f.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)})}},{key:"refreshMedia_",value:function e(t){var i=this;if(!t){throw new Error("refreshMedia_ must take a media id")}var r=void 0;var n=void 0;if(this.masterPlaylistLoader_){r=this.masterPlaylistLoader_.master;n=this.masterPlaylistLoader_.parseMasterXml()}else{r=this.master;n=this.parseMasterXml()}var a=va(r,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=f.setTimeout(function(){i.trigger("mediaupdatetimeout")},H(this.media(),!!a))}this.trigger("loadedplaylist")}}]);return t}(ha);var Sa=function e(t){if(r.log.debug){return r.log.debug.bind(r,"VHS:",t+" >")}return function(){}};function ja(){}var ka=function(){function e(t,i,r,n){E(this,e);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=t;this.processedAppend_=false;this.type_=r;this.mimeType_=i;this.logger_=Sa("SourceUpdater["+r+"]["+i+"]");if(t.readyState==="closed"){t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,i,n))}else{this.createSourceBuffer_(i,n)}}w(e,[{key:"createSourceBuffer_",value:function e(t,i){var r=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t);this.logger_("created SourceBuffer");if(i){i.trigger("sourcebufferadded");if(this.mediaSource.sourceBuffers.length<2){i.on("sourcebufferadded",function(){r.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 ["+it(t.buffered())+"]");if(e){e()}t.runCallback_()};this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_);this.runCallback_()}},{key:"abort",value:function e(t){var i=this;if(this.processedAppend_){this.queueCallback_(function(){i.sourceBuffer_.abort()},t)}}},{key:"appendBuffer",value:function e(t,i){var r=this;this.processedAppend_=true;this.queueCallback_(function(){if(t.videoSegmentTimingInfoCallback){r.sourceBuffer_.addEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}r.sourceBuffer_.appendBuffer(t.bytes)},function(){if(t.videoSegmentTimingInfoCallback){r.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",t.videoSegmentTimingInfoCallback)}i()})}},{key:"buffered",value:function e(){if(!this.sourceBuffer_){return r.createTimeRanges()}return this.sourceBuffer_.buffered}},{key:"remove",value:function e(t,i){var r=this;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:ja;if(this.processedAppend_){this.queueCallback_(function(){r.logger_("remove ["+t+" => "+i+"]");r.sourceBuffer_.removing=true;r.sourceBuffer_.remove(t,i)},n)}}},{key:"updating",value:function e(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==ja}},{key:"timestampOffset",value:function e(t){var i=this;if(typeof t!=="undefined"){this.queueCallback_(function(){i.sourceBuffer_.timestampOffset=t;i.runCallback_()});this.timestampOffset_=t}return this.timestampOffset_}},{key:"queueCallback_",value:function e(t,i){this.callbacks_.push([t.bind(this),i]);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 i=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",i)}else{i()}}}]);return e}();var Ea={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 wa=ia.toUnsigned;var Ca=ia.toHexString;var Ia,Aa,xa,Oa,Pa;Ia=function e(t){var i={},r=fa.findBox(t,["moov","trak"]);return r.reduce(function(e,t){var i,r,n,a,s;i=fa.findBox(t,["tkhd"])[0];if(!i){return null}r=i[0];n=r===0?12:20;a=wa(i[n]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]);s=fa.findBox(t,["mdia","mdhd"])[0];if(!s){return null}r=s[0];n=r===0?12:20;e[a]=wa(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]);return e},i)};Aa=function e(t,i){var r,n,a;r=fa.findBox(i,["moof","traf"]);n=[].concat.apply([],r.map(function(e){return fa.findBox(e,["tfhd"]).map(function(i){var r,n,a;r=wa(i[4]<<24|i[5]<<16|i[6]<<8|i[7]);n=t[r]||9e4;a=fa.findBox(e,["tfdt"]).map(function(e){var t,i;t=e[0];i=wa(e[4]<<24|e[5]<<16|e[6]<<8|e[7]);if(t===1){i*=Math.pow(2,32);i+=wa(e[8]<<24|e[9]<<16|e[10]<<8|e[11])}return i})[0];a=a||Infinity;return a/n})}
1));a=Math.min.apply(null,n);return isFinite(a)?a:0};xa=function e(t,i){var r=fa.findBox(i,["moof","traf"]);var n=0;var a=0;var s;if(r&&r.length){var o=fa.parseTraf(r[0]);for(var l=0;l<o.boxes.length;l++){if(o.boxes[l].type==="tfhd"){s=o.boxes[l].trackId}else if(o.boxes[l].type==="tfdt"){n=o.boxes[l].baseMediaDecodeTime}else if(o.boxes[l].type==="trun"&&o.boxes[l].samples.length){a=o.boxes[l].samples[0].compositionTimeOffset||0}}}var u=t[s]||9e4;return(n+a)/u};Oa=function e(t){var i=fa.findBox(t,["moov","trak"]);var r=[];i.forEach(function(e){var t=fa.findBox(e,["mdia","hdlr"]);var i=fa.findBox(e,["tkhd"]);t.forEach(function(e,t){var n=fa.parseType(e.subarray(8,12));var a=i[t];var s;var o;var l;if(n==="vide"){s=new DataView(a.buffer,a.byteOffset,a.byteLength);o=s.getUint8(0);l=o===0?s.getUint32(12):s.getUint32(20);r.push(l)}})});return r};Pa=function e(t){var i=fa.findBox(t,["moov","trak"]);var r=[];i.forEach(function(e){var t={};var i=fa.findBox(e,["tkhd"])[0];var n,a;if(i){n=new DataView(i.buffer,i.byteOffset,i.byteLength);a=n.getUint8(0);t.id=a===0?n.getUint32(12):n.getUint32(20)}var s=fa.findBox(e,["mdia","hdlr"])[0];if(s){var o=fa.parseType(s.subarray(8,12));if(o==="vide"){t.type="video"}else if(o==="soun"){t.type="audio"}else{t.type=o}}var l=fa.findBox(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);t.codec=fa.parseType(u.subarray(4,8));var c=fa.findBox(u,[t.codec])[0];var d,f;if(c){if(/^[a-z]vc[1-9]$/i.test(t.codec)){d=c.subarray(78);f=fa.parseType(d.subarray(4,8));if(f==="avcC"&&d.length>11){t.codec+=".";t.codec+=Ca(d[9]);t.codec+=Ca(d[10]);t.codec+=Ca(d[11])}else{t.codec="avc1.4d400d"}}else if(/^mp4[a,v]$/i.test(t.codec)){d=c.subarray(28);f=fa.parseType(d.subarray(4,8));if(f==="esds"&&d.length>20&&d[19]!==0){t.codec+="."+Ca(d[19]);t.codec+="."+Ca(d[20]>>>2&63).replace(/^0/,"")}else{t.codec="mp4a.40.2"}}else{}}}var h=fa.findBox(e,["mdia","mdhd"])[0];if(h&&i){var p=a===0?12:20;t.timescale=wa(h[p]<<24|h[p+1]<<16|h[p+2]<<8|h[p+3])}r.push(t)});return r};var Da={findBox:fa.findBox,parseType:fa.parseType,timescale:Ia,startTime:Aa,compositionStartTime:xa,videoTrackIds:Oa,tracks:Pa};var Ra={FAILURE:2,TIMEOUT:-101,ABORTED:-102};var La=function e(t){t.forEach(function(e){e.abort()})};var Na=function e(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}};var Ua=function e(t){var i=t.target;var r=Date.now()-i.requestTime;var n={bandwidth:Infinity,bytesReceived:0,roundTripTime:r||0};n.bytesReceived=t.loaded;n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3);return n};var Ma=function e(t,i){if(i.timedout){return{status:i.status,message:"HLS request timed-out at URL: "+i.uri,code:Ra.TIMEOUT,xhr:i}}if(i.aborted){return{status:i.status,message:"HLS request aborted at URL: "+i.uri,code:Ra.ABORTED,xhr:i}}if(t){return{status:i.status,message:"HLS request errored at URL: "+i.uri,code:Ra.FAILURE,xhr:i}}return null};var Ba=function e(t,i){return function(e,r){var n=r.response;var a=Ma(e,r);if(a){return i(a,t)}if(n.byteLength!==16){return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Ra.FAILURE,xhr:r},t)}var s=new DataView(n);t.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]);return i(null,t)}};var Fa=function e(t,i,r){return function(e,n){var a=n.response;var s=Ma(e,n);if(s){return r(s,t)}if(a.byteLength===0){return r({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:Ra.FAILURE,xhr:n},t)}t.map.bytes=new Uint8Array(n.response);if(i&&!i.isInitialized()){i.init()}t.map.timescales=Da.timescale(t.map.bytes);t.map.videoTrackIds=Da.videoTrackIds(t.map.bytes);return r(null,t)}};var Ha=function e(t,i,r){return function(e,n){var a=n.response;var s=Ma(e,n);var o=void 0;if(s){return r(s,t)}if(a.byteLength===0){return r({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:Ra.FAILURE,xhr:n},t)}t.stats=Na(n);if(t.key){t.encryptedBytes=new Uint8Array(n.response)}else{t.bytes=new Uint8Array(n.response)}if(i&&t.map&&t.map.bytes){if(!i.isInitialized()){i.init()}o=i.parse(t.bytes,t.map.videoTrackIds,t.map.timescales);
1if(o&&o.captions){t.captionStreams=o.captionStreams;t.fmp4Captions=o.captions}}return r(null,t)}};var Va=function e(t,i,r){var n=function e(n){if(n.data.source===i.requestId){t.removeEventListener("message",e);var a=n.data.decrypted;i.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength);return r(null,i)}};t.addEventListener("message",n);var a=void 0;if(i.key.bytes.slice){a=i.key.bytes.slice()}else{a=new Uint32Array(Array.prototype.slice.call(i.key.bytes))}t.postMessage(Re({source:i.requestId,encrypted:i.encryptedBytes,key:a,iv:i.key.iv}),[i.encryptedBytes.buffer,a.buffer])};var qa=function e(t,i,r){var n=0;var a=false;return function(e,s){if(a){return}if(e){a=true;La(t);return r(e,s)}n+=1;if(n===t.length){s.endOfAllRequests=Date.now();if(s.encryptedBytes){return Va(i,s,r)}return r(null,s)}}};var Wa=function e(t,i){return function(e){t.stats=r.mergeOptions(t.stats,Ua(e));if(!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived){t.stats.firstBytesReceivedAt=Date.now()}return i(e,t)}};var za=function e(t,i,n,a,s,o,l){var u=[];var c=qa(u,n,l);if(s.key&&!s.key.bytes){var d=r.mergeOptions(i,{uri:s.key.resolvedUri,responseType:"arraybuffer"});var f=Ba(s,c);var h=t(d,f);u.push(h)}if(s.map&&!s.map.bytes){var p=r.mergeOptions(i,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:ge(s.map)});var v=Fa(s,a,c);var m=t(p,v);u.push(m)}var g=r.mergeOptions(i,{uri:s.resolvedUri,responseType:"arraybuffer",headers:ge(s)});var y=Ha(s,a,c);var _=t(g,y);_.addEventListener("progress",Wa(s,o));u.push(_);return function(){return La(u)}};var Ga=function e(t,i){var r=void 0;if(!t){return""}r=f.getComputedStyle(t);if(!r){return""}return r[i]};var Ya=function e(t,i){var r=t.slice();t.sort(function(e,t){var n=i(e,t);if(n===0){return r.indexOf(e)-r.indexOf(t)}return n})};var Ka=function e(t,i){var r=void 0;var n=void 0;if(t.attributes.BANDWIDTH){r=t.attributes.BANDWIDTH}r=r||f.Number.MAX_VALUE;if(i.attributes.BANDWIDTH){n=i.attributes.BANDWIDTH}n=n||f.Number.MAX_VALUE;return r-n};var Xa=function e(t,i){var r=void 0;var n=void 0;if(t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width){r=t.attributes.RESOLUTION.width}r=r||f.Number.MAX_VALUE;if(i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width){n=i.attributes.RESOLUTION.width}n=n||f.Number.MAX_VALUE;if(r===n&&t.attributes.BANDWIDTH&&i.attributes.BANDWIDTH){return t.attributes.BANDWIDTH-i.attributes.BANDWIDTH}return r-n};var Ja=function e(t,i,r,n,a){var s=t.playlists.map(function(e){var t=void 0;var i=void 0;var r=void 0;t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width;i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;r=e.attributes.BANDWIDTH;r=r||f.Number.MAX_VALUE;return{bandwidth:r,width:t,height:i,playlist:e}});Ya(s,function(e,t){return e.bandwidth-t.bandwidth});s=s.filter(function(e){return!fe.isIncompatible(e.playlist)});var o=s.filter(function(e){return fe.isEnabled(e.playlist)});if(!o.length){o=s.filter(function(e){return!fe.isDisabled(e.playlist)})}var l=o.filter(function(e){return e.bandwidth*Ea.BANDWIDTH_VARIANCE<i});var u=l[l.length-1];var c=l.filter(function(e){return e.bandwidth===u.bandwidth})[0];if(a===false){var d=c||o[0]||s[0];return d?d.playlist:null}var h=l.filter(function(e){return e.width&&e.height});Ya(h,function(e,t){return e.width-t.width});var p=h.filter(function(e){return e.width===r&&e.height===n});u=p[p.length-1];var v=p.filter(function(e){return e.bandwidth===u.bandwidth})[0];var m=void 0;var g=void 0;var y=void 0;if(!v){m=h.filter(function(e){return e.width>r||e.height>n});g=m.filter(function(e){return e.width===m[0].width&&e.height===m[0].height});u=g[g.length-1];y=g.filter(function(e){return e.bandwidth===u.bandwidth})[0]}var _=y||v||c||o[0]||s[0];return _?_.playlist:null};var Qa=function e(){return Ja(this.playlists.master,this.systemBandwidth,parseInt(Ga(this.tech_.el(),"width"),10),parseInt(Ga(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)};var Za=function e(t){var i=t.master,r=t.currentTime,n=t.bandwidth,a=t.duration,s=t.segmentDuration,o=t.timeUntilRebuffer,l=t.currentTimeline,u=t.syncController;var c=i.playlists.filter(function(e){return!fe.isIncompatible(e)}
1);var d=c.filter(fe.isEnabled);if(!d.length){d=c.filter(function(e){return!fe.isDisabled(e)})}var f=d.filter(fe.hasAttribute.bind(null,"BANDWIDTH"));var h=f.map(function(e){var t=u.getSyncPoint(e,a,l,r);var i=t?1:2;var c=fe.estimateSegmentRequestTime(s,n,e);var d=c*i-o;return{playlist:e,rebufferingImpact:d}});var p=h.filter(function(e){return e.rebufferingImpact<=0});Ya(p,function(e,t){return Ka(t.playlist,e.playlist)});if(p.length){return p[0]}Ya(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact});return h[0]||null};var $a=function e(){var t=this.playlists.master.playlists.filter(fe.isEnabled);Ya(t,function(e,t){return Ka(e,t)});var i=t.filter(function(e){return Et(e.attributes.CODECS).videoCodec});return i[0]||null};var es=function e(t,i,r){for(var n in r){if(!t[n]){i.trigger({type:"usage",name:"hls-608"});var a=i.textTracks().getTrackById(n);if(a){t[n]=a}else{t[n]=i.addRemoteTextTrack({kind:"captions",id:n,label:n},false).track}}}};var ts=function t(i){var r=i.inbandTextTracks,n=i.captionArray,a=i.timestampOffset;if(!n){return}var s=e.WebKitDataCue||e.VTTCue;n.forEach(function(e){var t=e.stream;var i=e.startTime;var n=e.endTime;if(!r[t]){return}i+=a;n+=a;r[t].addCue(new s(i,n,e.text))})};var is=4,rs=128;var ns=function e(t){var i=0,r={payloadType:-1,payloadSize:0},n=0,a=0;while(i<t.byteLength){if(t[i]===rs){break}while(t[i]===255){n+=255;i++}n+=t[i++];while(t[i]===255){a+=255;i++}a+=t[i++];if(!r.payload&&n===is){r.payloadType=n;r.payloadSize=a;r.payload=t.subarray(i,i+a);break}i+=a;n=0;a=0}return r};var as=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 ss=function e(t,i){var r=[],n,a,s,o;if(!(i[0]&64)){return r}a=i[0]&31;for(n=0;n<a;n++){s=n*3;o={type:i[s+2]&3,pts:t};if(i[s+2]&4){o.ccData=i[s+3]<<8|i[s+4];r.push(o)}}return r};var os=function e(t){var i=t.byteLength,r=[],n=1,a,s;while(n<i-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){r.push(n+2);n+=2}else{n++}}if(r.length===0){return t}a=i-r.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===r[0]){o++;r.shift()}s[n]=t[o]}return s};var ls={parseSei:ns,parseUserData:as,parseCaptionPackets:ss,discardEmulationPreventionBytes:os,USER_DATA_REGISTERED_ITU_T_T35:is};var us=function e(){this.init=function(){var e={};this.on=function(t,i){if(!e[t]){e[t]=[]}e[t]=e[t].concat(i)};this.off=function(t,i){var r;if(!e[t]){return false}r=e[t].indexOf(i);e[t]=e[t].slice();e[t].splice(r,1);return r>-1};this.trigger=function(t){var i,r,n,a;i=e[t];if(!i){return}if(arguments.length===2){n=i.length;for(r=0;r<n;++r){i[r].call(this,arguments[1])}}else{a=[];r=arguments.length;for(r=1;r<arguments.length;++r){a.push(arguments[r])}n=i.length;for(r=0;r<n;++r){i[r].apply(this,a)}}};this.dispose=function(){e={}}}};us.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});this.on("partialdone",function(t){e.partialFlush(t)});this.on("endedtimeline",function(t){e.endTimeline(t)});this.on("reset",function(t){e.reset(t)});return e};us.prototype.push=function(e){this.trigger("data",e)};us.prototype.flush=function(e){this.trigger("done",e)};us.prototype.partialFlush=function(e){this.trigger("partialdone",e)};us.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)};us.prototype.reset=function(e){this.trigger("reset",e)};var cs=us;var ds=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new gs(0,0),new gs(0,1),new gs(1,0),new gs(1,1)];this.reset();this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data"));e.on("partialdone",this.trigger.bind(this,"partialdone"));e.on("done",this.trigger.bind(this,"done"))},this)};ds.prototype=new cs;ds.prototype.push=function(e){var t,i,r;if(e.nalUnitType!=="sei_rbsp"){return}t=ls.parseSei(e.escapedRBSP);if(t.payloadType!==ls.USER_DATA_REGISTERED_ITU_T_T35){return}i=ls.parseUserData(t);if(!i){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}r=ls.parseCaptionPackets(e.pts,i);this.captionPackets_=this.captionPackets_.concat(r);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};
1ds.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return e==="flush"?t.flush():t.partialFlush()},this)};ds.prototype.flushStream=function(e){if(!this.captionPackets_.length){this.flushCCStreams(e);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.flushCCStreams(e)};ds.prototype.flush=function(){return this.flushStream("flush")};ds.prototype.partialFlush=function(){return this.flushStream("partialFlush")};ds.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};ds.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)};ds.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};ds.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};ds.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};var fs={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 hs=function e(t){if(t===null){return""}t=fs[t]||t;return String.fromCharCode(t)};var ps=14;var vs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var ms=function e(){var t=[],i=ps+1;while(i--){t.push("")}return t};var gs=function e(t,i){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=i||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,i,r,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}r=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);i=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=i;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_=ms()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=ms()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=ms()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(r,n)){r=(r&3)<<8;a=hs(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(r,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)}r=(r&3)<<8;a=hs(r|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(r,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(r,n)){this.column_+=n&3}else if(this.isPAC(r,n)){var s=vs.indexOf(t&7968);
1if(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(r)){if(n===0){n=null}a=hs(r);a+=hs(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};gs.prototype=new cs;gs.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_})}};gs.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=ms();this.nonDisplayed_=ms();this.lastControlCode_=null;this.column_=0;this.row_=ps;this.rollUpRows_=2;this.formatting_=[]};gs.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};gs.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};gs.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};gs.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};gs.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};gs.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};gs.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};gs.prototype.isNormalChar=function(e){return e>=32&&e<=127};gs.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=ps;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=ms();this.displayed_=ms()}if(t!==undefined&&t!==this.row_){for(var i=0;i<this.rollUpRows_;i++){this.displayed_[t-i]=this.displayed_[this.row_-i];this.displayed_[this.row_-i]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};gs.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)};gs.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)};gs.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};gs.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};gs.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<ps+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};gs.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};var ys={CaptionStream:ds,Cea608Stream:gs};var _s=ls.discardEmulationPreventionBytes;var bs=ys.CaptionStream;var Ts=function e(t,i){var r=t;for(var n=0;n<i.length;n++){var a=i[n];if(r<a.size){return a}r-=a.size}return null};var Ss=function e(t,i,r){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),a=[],s,o,l,u;for(o=0;o+4<t.length;o+=l){l=n.getUint32(o);o+=4;if(l<=0){continue}switch(t[o]&31){case 6:var c=t.subarray(o+1,o+1+l);var d=Ts(o,i);s={nalUnitType:"sei_rbsp",size:l,data:c,escapedRBSP:_s(c),trackId:r};if(d){s.pts=d.pts;s.dts=d.dts;u=d}else{s.pts=u.pts;s.dts=u.dts}a.push(s);break;default:break}}return a};var js=function e(t,i,r){var n=i;var a=r.defaultSampleDuration||0;var s=r.defaultSampleSize||0;var o=r.trackId;var l=[];t.forEach(function(e){var t=fa.parseTrun(e);var i=t.samples;
1i.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});l=l.concat(i)});return l};var ks=function e(t,i){var r=Da.findBox(t,["moof","traf"]);var n=Da.findBox(t,["mdat"]);var a={};var s=[];n.forEach(function(e,t){var i=r[t];s.push({mdat:e,traf:i})});s.forEach(function(e){var t=e.mdat;var r=e.traf;var n=Da.findBox(r,["tfhd"]);var s=fa.parseTfhd(n[0]);var o=s.trackId;var l=Da.findBox(r,["tfdt"]);var u=l.length>0?fa.parseTfdt(l[0]).baseMediaDecodeTime:0;var c=Da.findBox(r,["trun"]);var d;var f;if(i===o&&c.length>0){d=js(c,u,s);f=Ss(t,d,o);if(!a[o]){a[o]=[]}a[o]=a[o].concat(f)}});return a};var Es=function e(t,i,r){var n;if(i===null){return null}n=ks(t,i);return{seiNals:n[i],timescale:r}};var ws=function e(){var t=false;var i;var r;var n;var a;var s;var o;this.isInitialized=function(){return t};this.init=function(e){i=new bs;t=true;o=e?e.isPartial:false;i.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,i){var o;if(!this.isInitialized()){return null}else if(!t||!i){return null}else if(this.isNewInit(t,i)){n=t[0];a=i[n]}else if(n===null||!a){r.push(e);return null}while(r.length>0){var l=r.shift();this.parse(l,t,i)}o=Es(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){i.push(e)})};this.flushStream=function(){if(!this.isInitialized()){return null}if(!o){i.flush()}else{i.partialFlush()}};this.clearParsedCaptions=function(){s.captions=[];s.captionStreams={}};this.resetCaptionStream=function(){if(!this.isInitialized()){return null}i.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){r=[];n=null;a=null;if(!s){s={captions:[],captionStreams:{}}}else{this.clearParsedCaptions()}this.resetCaptionStream()};this.reset()};var Cs=ws;var Is=500;var As=function e(t,i,r){if(!t||!i){return false}var n=t.segments;var a=r===n.length;return t.endList&&i.readyState==="open"&&a};var xs=function e(t){return typeof t==="number"&&isFinite(t)};var Os=function e(t,i,r){if(t!=="main"||!i||!r){return null}if(!r.containsAudio&&!r.containsVideo){return"Neither audio nor video found in segment."}if(i.containsVideo&&!r.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(!i.containsVideo&&r.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 Ps=function e(t,i,r){var n=i-30;if(t.length){n=Math.max(n,t.start(0))}var a=i-r;return Math.min(a,n)};var Ds=function e(t){var i=t.segment,r=i.start,n=i.end,a=t.playlist,s=a.mediaSequence,o=a.id,l=a.segments,u=l===undefined?[]:l,c=t.mediaIndex,d=t.timeline;return["appending ["+c+"] of ["+s+", "+(s+u.length)+"] from playlist ["+o+"]","["+r+" => "+n+"] in timeline ["+d+"]"].join(" ")};var Rs=function(e){I(t,e);function t(e){E(this,t);var i=A(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")}i.bandwidth=e.bandwidth;i.throughput={rate:0,count:0};i.roundTrip=NaN;i.resetStats_();i.mediaIndex=null;i.hasPlayed_=e.hasPlayed;i.currentTime_=e.currentTime;i.seekable_=e.seekable;i.seeking_=e.seeking;i.duration_=e.duration;i.mediaSource_=e.mediaSource;i.hls_=e.hls;i.loaderType_=e.loaderType;i.startingMedia_=void 0;i.segmentMetadataTrack_=e.segmentMetadataTrack;i.goalBufferLength_=e.goalBufferLength;i.sourceType_=e.sourceType;i.inbandTextTracks_=e.inbandTextTracks;i.state_="INIT";i.checkBufferTimeout_=null;i.error_=void 0;i.currentTimeline_=-1;i.pendingSegment_=null;i.mimeType_=null;i.sourceUpdater_=null;i.xhrOptions_=null;i.activeInitSegmentId_=null;i.initSegments_={};
1i.cacheEncryptionKeys_=e.cacheEncryptionKeys;i.keyCache_={};if(i.loaderType_==="main"){i.captionParser_=new Cs}else{i.captionParser_=null}i.decrypter_=e.decrypter;i.syncController_=e.syncController;i.syncPoint_={segmentIndex:0,time:0};i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")};i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_);i.mediaSource_.addEventListener("sourceopen",function(){return i.ended_=false});i.fetchAtBuffer_=false;i.logger_=Sa("SegmentLoader["+i.loaderType_+"]");Object.defineProperty(i,"state",{get:function e(){return this.state_},set:function e(t){if(t!==this.state_){this.logger_(this.state_+" -> "+t);this.state_=t}}});return i}w(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.trigger("dispose");this.state="DISPOSED";this.pause();this.abort_();if(this.sourceUpdater_){this.sourceUpdater_.dispose()}this.resetStats_();if(this.captionParser_){this.captionParser_.reset()}if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_)}if(this.syncController_&&this.triggerSyncInfoUpdate_){this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_)}this.off()}},{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 r.createTimeRanges()}return this.sourceUpdater_.buffered()}},{key:"initSegment",value:function e(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var r=Le(t);var n=this.initSegments_[r];if(i&&!n&&t.bytes){this.initSegments_[r]=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 i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var r=Ne(t);var n=this.keyCache_[r];if(this.cacheEncryptionKeys_&&i&&!n&&t.bytes){this.keyCache_[r]=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 ka(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_);this.resetEverything();return this.monitorBuffer_()}},{key:"playlist",value:function e(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!t){return}var r=this.playlist_;var n=this.pendingSegment_;this.playlist_=t;this.xhrOptions_=i;if(this.state==="INIT"){t.syncInfo={mediaSequence:t.mediaSequence,time:0}}var a=null;if(r){if(r.id){a=r.id}else if(r.uri){a=r.uri}}this.logger_("playlist update ["+a+" => "+(t.id||t.uri)+"]");this.trigger("syncinfoupdate");if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!r||r.uri!==t.uri){if(this.mediaIndex!==null){this.resyncLoader()}return}var s=t.mediaSequence-r.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(r,t)}},{key:"pause",value:function e(){if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null}}},{key:"paused",value:function e(){return this.checkBufferTimeout_===null}},{key:"mimeType",value:function e(t,i){if(this.mimeType_){return}this.mimeType_=t;this.sourceBufferEmitter_=i;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}}},{key:"resetEverything",value:function e(t){this.ended_=false;this.resetLoader();this.remove(0,Infinity,t);
1if(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,i,r){if(i===Infinity){i=this.duration_()}if(this.sourceUpdater_){this.sourceUpdater_.remove(t,i,r)}st(t,i,this.segmentMetadataTrack_);if(this.inbandTextTracks_){for(var n in this.inbandTextTracks_){st(t,i,this.inbandTextTracks_[n])}}}},{key:"monitorBuffer_",value:function e(){if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=f.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function e(){if(this.state==="READY"){this.fillBuffer_()}if(this.checkBufferTimeout_){f.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=f.setTimeout(this.monitorBufferTick_.bind(this),Is)}},{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 i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.playlist_;return As(i,this.mediaSource_,t)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function e(t,i,r,n,a,s){var o=0;var l=void 0;if(t.length){o=t.end(t.length-1)}var u=Math.max(0,o-a);if(!i.segments.length){return null}if(u>=this.goalBufferLength_()){return null}if(!n&&u>=1){return null}if(s===null){r=this.getSyncSegmentCandidate_(i);return this.generateSegmentInfo_(i,r,null,true)}if(r!==null){var c=i.segments[r];l=o;return this.generateSegmentInfo_(i,r+1,l,false)}if(this.fetchAtBuffer_){var d=fe.getMediaInfoForTime(i,o,s.segmentIndex,s.time);r=d.mediaIndex;l=d.startTime}else{var f=fe.getMediaInfoForTime(i,a,s.segmentIndex,s.time);r=f.mediaIndex;l=f.startTime}return this.generateSegmentInfo_(i,r,l,false)}},{key:"getSyncSegmentCandidate_",value:function e(t){var i=this;if(this.currentTimeline_===-1){return 0}var r=t.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===i.currentTimeline_});if(r.length){return r[Math.min(r.length-1,1)].segmentIndex}return Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function e(t,i,r,n){if(i<0||i>=t.segments.length){return null}var a=t.segments[i];return{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:i,isSyncRequest:n,startOfSegment:r,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 i=this.currentTime_();var r=t.bandwidth;var n=this.pendingSegment_.duration;var a=fe.estimateSegmentRequestTime(n,r,this.playlist_,t.bytesReceived);var s=rt(this.buffered_(),i,this.hls_.tech_.playbackRate())-1;if(a<=s){return false}var o=Za({master:this.hls_.playlists.master,currentTime:i,bandwidth:r,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o){return}var l=a-s;var u=l-o.rebufferingImpact;var c=.5;if(s<=Je){c=1}if(!o.playlist||o.playlist.uri===this.playlist_.uri||u<c){return false}this.bandwidth=o.playlist.attributes.BANDWIDTH*Ea.BANDWIDTH_VARIANCE+1;this.abort();this.trigger("earlyabort");return true}},{key:"handleProgress_",value:function e(t,i){if(!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId||this.abortRequestEarly_(i.stats)){return}this.trigger("progress")}},{key:"loadSegment_",value:function e(t){this.state="WAITING";this.pendingSegment_=t;this.trimBackBuffer_(t);t.abortRequests=za(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 i=Ps(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);if(i>0){this.remove(0,i)}}},{key:"createSimplifiedSegmentObj_",value:function e(t){var i=t.segment;var r={resolvedUri:i.resolvedUri,byterange:i.byterange,requestId:t.requestId};if(i.key){var n=i.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);r.key=this.segmentKey(i.key);r.key.iv=n}if(i.map){r.map=this.initSegment(i.map)}return r}},{key:"segmentRequestFinished_",value:function e(t,i){this.mediaRequests+=1;if(i.stats){this.mediaBytesTransferred+=i.stats.bytesReceived;this.mediaTransferDuration+=i.stats.roundTripTime}if(!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(i.requestId!==this.pendingSegment_.requestId){return}if(t){this.pendingSegment_=null;this.state="READY";if(t.code===Ra.ABORTED){this.mediaRequestsAborted+=1;return}this.pause();if(t.code===Ra.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=i.stats.bandwidth;this.roundTrip=i.stats.roundTripTime;if(i.map){i.map=this.initSegment(i.map,true)}if(i.key){this.segmentKey(i.key,true)}this.processSegmentResponse_(i)}},{key:"processSegmentResponse_",value:function e(t){var i=this.pendingSegment_;i.bytes=t.bytes;if(t.map){i.segment.map.bytes=t.map.bytes}i.endOfAllRequests=t.endOfAllRequests;if(t.fmp4Captions){es(this.inbandTextTracks_,this.hls_.tech_,t.captionStream
1s);ts({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 i=this.pendingSegment_;var r=i.segment;var n=this.syncController_.probeSegmentInfo(i);if(typeof this.startingMedia_==="undefined"&&n&&(n.containsAudio||n.containsVideo)){this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo}}var a=Os(this.loaderType_,this.startingMedia_,n);if(a){this.error({message:a,blacklistDuration:Infinity});this.trigger("error");return}if(i.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}if(i.timestampOffset!==null&&i.timestampOffset!==this.sourceUpdater_.timestampOffset()){if(n&&n.segmentTimestampInfo){var s=n.segmentTimestampInfo[0].ptsTime;var o=n.segmentTimestampInfo[0].dtsTime;i.timestampOffset-=s-o}this.sourceUpdater_.timestampOffset(i.timestampOffset);this.trigger("timestampoffset")}var l=this.syncController_.mappingForTimeline(i.timeline);if(l!==null){this.trigger({type:"segmenttimemapping",mapping:l})}this.state="APPENDING";if(r.map){var u=Le(r.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==u){var c=this.initSegment(r.map);this.sourceUpdater_.appendBuffer({bytes:c.bytes},function(){t.activeInitSegmentId_=u})}}i.byteLength=i.bytes.byteLength;if(typeof r.start==="number"&&typeof r.end==="number"){this.mediaSecondsLoaded+=r.end-r.start}else{this.mediaSecondsLoaded+=r.duration}this.logger_(Ds(i));this.sourceUpdater_.appendBuffer({bytes:i.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,i.requestId)},this.handleUpdateEnd_.bind(this))}},{key:"handleVideoSegmentTimingInfo_",value:function e(t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId){return}var r=this.pendingSegment_.segment;if(!r.videoTimingInfo){r.videoTimingInfo={}}r.videoTimingInfo.transmuxerPrependedSeconds=i.videoSegmentTimingInfo.prependedContentDuration||0;r.videoTimingInfo.transmuxedPresentationStart=i.videoSegmentTimingInfo.start.presentation;r.videoTimingInfo.transmuxedPresentationEnd=i.videoSegmentTimingInfo.end.presentation;r.videoTimingInfo.baseMediaDecodeTime=i.videoSegmentTimingInfo.baseMediaDecodeTime}},{key:"handleUpdateEnd_",value:function e(){if(!this.pendingSegment_){this.state="READY";if(!this.paused()){this.monitorBuffer_()}return}var t=this.pendingSegment_;var i=t.segment;var r=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(i.end&&this.currentTime_()-i.end>t.playlist.targetDuration*3){this.resetEverything();return}if(r){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 i=this.throughput.rate;var r=Date.now()-t.endOfAllRequests+1;var n=Math.floor(t.byteLength/r*8*1e3);this.throughput.rate+=(n-i)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function e(t){if(!this.segmentMetadataTrack_){return}var i=t.segment;var r=i.start;var n=i.end;if(!xs(r)||!xs(n)){return}st(r,n,this.segmentMetadataTrack_);var a=f.WebKitDataCue||f.VTTCue;var s={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.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.id,start:r,end:n};var o=JSON.stringify(s);var l=new a(r,n,o);l.value=s;this.segmentMetadataTrack_.addCue(l)}}]);return t}(r.EventTarget);var Ls=function e(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))};var Ns=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)}));var Us=function(e){I(t,e);function t(e){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};E(this,t);var r=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));r.mediaSource_=null;r.subtitlesTrack_=null;r.featuresNativeTextTracks_=e.featuresNativeTextTracks;return r}w(t,[{key:"buffered_",value:function e(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length){return r.createTimeRanges()}var t=this.subtitlesTrack_.cues;var i=t[0].startTime;var n=t[t.length-1].startTime;return r.createTimeRanges([[i,n]])}},{key:"initSegment",value:function e(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!t){return null}var r=Le(t);var n=this.initSegments_[r];if(i&&!n&&t.bytes){var a=Ns.byteLength+t.bytes.byteLength;var s=new Uint8Array(a);s.set(t.bytes);s.set(Ns,t.bytes.byteLength);this.initSegments_[r]=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,i){st(t,i,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 i=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);i=this.skipEmptySegments_(i);if(!i){return}if(this.syncController_.timestampOffsetForTimeline(i.timeline)===null){var r=function e(){t.state="READY";if(!t.paused()){t.monitorBuffer_()}};this.syncController_.one("timestampoffset",r);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(i)}},{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 i=this.pendingSegment_;var r=i.segment;if(typeof f.WebVTT!=="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=void 0;
1var 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}r.requested=true;try{this.parseVTTCues_(i)}catch(e){this.error({message:e.message});this.state="READY";this.pause();return this.trigger("error")}this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_);if(i.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}i.byteLength=i.bytes.byteLength;this.mediaSecondsLoaded+=r.duration;if(i.cues.length){this.remove(i.cues[0].endTime,i.cues[i.cues.length-1].endTime)}i.cues.forEach(function(e){t.subtitlesTrack_.addCue(t.featuresNativeTextTracks_?new f.VTTCue(e.startTime,e.endTime,e.text):e)});this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function e(t){var i=void 0;var n=false;if(typeof f.TextDecoder==="function"){i=new f.TextDecoder("utf8")}else{i=f.WebVTT.StringDecoder();n=true}var a=new f.WebVTT.Parser(f,f.vttjs,i);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){r.log.warn("Error encountered when parsing cues: "+e.message)};if(t.segment.map){var s=t.segment.map.bytes;if(n){s=Ls(s)}a.parse(s)}var o=t.bytes;if(n){o=Ls(o)}a.parse(o);a.flush()}},{key:"updateTimeMapping_",value:function e(t,i,r){var n=t.segment;if(!i){return}if(!t.cues.length){n.empty=true;return}var a=t.timestampmap;var s=a.MPEGTS/9e4-a.LOCAL+i.mapping;t.cues.forEach(function(e){e.startTime+=s;e.endTime+=s});if(!r.syncInfo){var o=t.cues[0].startTime;var l=t.cues[t.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+t.mediaIndex,time:Math.min(o,l-n.duration)}}}}]);return t}(Rs);var Ms=function e(t,i){var r=t.cues;for(var n=0;n<r.length;n++){var a=r[n];if(i>=a.adStartTime&&i<=a.adEndTime){return a}}return null};var Bs=function e(t,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!t.segments){return}var n=r;var a=void 0;for(var s=0;s<t.segments.length;s++){var o=t.segments[s];if(!a){a=Ms(i,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 f.VTTCue(n,n+o.duration,o.cueOut);a.adStartTime=n;a.adEndTime=n+parseFloat(o.cueOut);i.addCue(a)}if("cueOutCont"in o){var l=void 0;var u=void 0;var c=o.cueOutCont.split("/").map(parseFloat);var d=x(c,2);l=d[0];u=d[1];a=new f.VTTCue(n,n+o.duration,"");a.adStartTime=n-l;a.adEndTime=a.adStartTime+u;i.addCue(a)}}n+=o.duration}};var Fs={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var Hs=8589934592;var Vs=4294967296;var qs="shared";var Ws=function e(t,i){var r=1;if(t>i){r=-1}while(Math.abs(i-t)>Vs){t+=r*Hs}return t};var zs=function e(t){var i,r;e.prototype.init.call(this);this.type_=t||qs;this.push=function(e){if(this.type_!==qs&&e.type!==this.type_){return}if(r===undefined){r=e.dts}e.dts=Ws(e.dts,r);e.pts=Ws(e.pts,r);i=e.dts;this.trigger("data",e)};this.flush=function(){r=i;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){r=void 0;i=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};zs.prototype=new cs;var Gs={TimestampRolloverStream:zs,handleRollover:Ws};var Ys=function e(t){var i=t[1]&31;i<<=8;i|=t[2];return i};var Ks=function e(t){return!!(t[1]&64)};var Xs=function e(t){var i=0;if((t[3]&48)>>>4>1){i+=t[4]+1}return i};var Js=function e(t,i){var r=Ys(t);if(r===0){return"pat"}else if(r===i){return"pmt"}else if(i){return"pes"}return null};var Qs=function e(t){var i=Ks(t);var r=4+Xs(t);if(i){r+=t[r]+1}return(t[r+10]&31)<<8|t[r+11]};var Zs=function e(t){var i={};var r=Ks(t);var n=4+Xs(t);if(r){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 l=12+o;while(l<s){var u=n+l;i[(t[u+1]&31)<<8|t[u+2]]=t[u];l+=((t[u+3]&15)<<8|t[u+4])+5}return i};var $s=function e(t,i){var r=Ys(t);var n=i[r];switch(n){case Fs.H264_STREAM_TYPE:return"video";case Fs.ADTS_STREAM_TYPE:return"audio";case Fs.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}};var eo=function e(t){var i=Ks(t);if(!i){return null}var r=4+Xs(t);if(r>=t.byteLength){return null}var n=null;var a;a=t[r+7];if(a&192){n={};n.pts=(t[r+9]&14)<<27|(t[r+10]&255)<<20|(t[r+11]&254)<<12|(t[r+12]&255)<<5|(t[r+13]&254)>>>3;n.pts*=4;n.pts+=(t[r+13]&6)>>>1;n.dts=n.pts;if(a&64){n.dts=(t[r+14]&14)<<27|(t[r+15]&255)<<20|(t[r+16]&254)<<12|(t[r+17]&255)<<5|(t[r+18]&254)>>>3;n.dts*=4;n.dts+=(t[r+18]&6)>>>1}}return n};var to=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 io=function e(t){var i=4+Xs(t);var r=t.subarray(i);var n=0;var a=0;var s=false;var o;for(;a<r.byteLength-3;a++){if(r[a+2]===1){n=a+5;break}}while(n<r.byteLength){switch(r[n]){case 0:if(r[n-1]!==0){n+=2;break}else if(r[n-2]!==0){n++;break}if(a+3!==n-2){o=to(r[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}do{n++}while(r[n]!==1&&n<r.length);a=n-2;n+=3;break;case 1:if(r[n-1]!==0||r[n-2]!==0){n+=3;break}o=to(r[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}a=n-2;n+=3;break;default:n+=3;break}}r=r.subarray(a);n-=a;a=0;if(r&&r.byteLength>3){o=to(r[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}return s};var ro={parseType:Js,parsePat:Qs,parsePmt:Zs,parsePayloadUnitStartIndicator:Ks,parsePesType:$s,parsePesTime:eo,videoPacketContainsKeyFrame:io};var no=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var ao=function e(t){if(t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)){return true}return false};var so=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var oo=function e(t,i,r){var n,a="";for(n=i;n<r;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var lo=function e(t,i,r){return unescape(oo(t,i,r))};var uo=function e(t,i){var r=t[i+6]<<21|t[i+7]<<14|t[i+8]<<7|t[i+9],n=t[i+5],a=(n&16)>>4;if(a){return r+20}return r+10};var co=function e(t,i){var r=(t[i+5]&224)>>5,n=t[i+4]<<3,a=t[i+3]&3<<11;return a|n|r};var fo=function e(t,i){if(t[i]==="I".charCodeAt(0)&&t[i+1]==="D".charCodeAt(0)&&t[i+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[i]&255===255&&(t[i+1]&240)===240){return"audio"}return null};var ho=function e(t){var i=0;while(i+5<t.length){if(t[i]!==255||(t[i+1]&246)!==240){i++;continue}return no[(t[i+2]&60)>>>2]}return null};var po=function e(t){var i,r,n,a;i=10;if(t[5]&64){i+=4;i+=so(t.subarray(10,14))}do{r=so(t.subarray(i+4,i+8));if(r<1){return null}a=String.fromCharCode(t[i],t[i+1],t[i+2],t[i+3]);if(a==="PRIV"){n=t.subarray(i+10,i+r+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=lo(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var l=n.subarray(s+1);var u=(l[3]&1)<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;u*=4;u+=l[7]&3;return u}break}}}i+=10;i+=r}while(i<t.byteLength);return null};var vo={isLikelyAacData:ao,parseId3TagSize:uo,parseAdtsSize:co,parseType:fo,parseSampleRate:ho,parseAacTimestamp:po};var mo=9e4,go,yo,_o,bo,To,So,jo;go=function e(t){return t*mo};yo=function e(t,i){return t*i};_o=function e(t){return t/mo};bo=function e(t,i){return t/i};To=function e(t,i){return go(bo(t,i))};
1So=function e(t,i){return yo(_o(t),i)};jo=function e(t,i,r){return _o(r?t:t-i)};var ko={ONE_SECOND_IN_TS:mo,secondsToVideoTs:go,secondsToAudioTs:yo,videoTsToSeconds:_o,audioTsToSeconds:bo,audioTsToVideoTs:To,videoTsToAudioTs:So,metadataTsToSeconds:jo};var Eo=Gs.handleRollover;var wo={};wo.ts=ro;wo.aac=vo;var Co=ko.ONE_SECOND_IN_TS;var Io=188,Ao=71;var xo=function e(t,i){var r=0,n=Io,a,s;while(n<t.byteLength){if(t[r]===Ao&&t[n]===Ao){a=t.subarray(r,n);s=wo.ts.parseType(a,i.pid);switch(s){case"pat":if(!i.pid){i.pid=wo.ts.parsePat(a)}break;case"pmt":if(!i.table){i.table=wo.ts.parsePmt(a)}break;default:break}if(i.pid&&i.table){return}r+=Io;n+=Io;continue}r++;n++}};var Oo=function e(t,i,r){var n=0,a=Io,s,o,l,u,c;var d=false;while(a<=t.byteLength){if(t[n]===Ao&&(t[a]===Ao||a===t.byteLength)){s=t.subarray(n,a);o=wo.ts.parseType(s,i.pid);switch(o){case"pes":l=wo.ts.parsePesType(s,i.table);u=wo.ts.parsePayloadUnitStartIndicator(s);if(l==="audio"&&u){c=wo.ts.parsePesTime(s);if(c){c.type="audio";r.audio.push(c);d=true}}break;default:break}if(d){break}n+=Io;a+=Io;continue}n++;a++}a=t.byteLength;n=a-Io;d=false;while(n>=0){if(t[n]===Ao&&(t[a]===Ao||a===t.byteLength)){s=t.subarray(n,a);o=wo.ts.parseType(s,i.pid);switch(o){case"pes":l=wo.ts.parsePesType(s,i.table);u=wo.ts.parsePayloadUnitStartIndicator(s);if(l==="audio"&&u){c=wo.ts.parsePesTime(s);if(c){c.type="audio";r.audio.push(c);d=true}}break;default:break}if(d){break}n-=Io;a-=Io;continue}n--;a--}};var Po=function e(t,i,r){var n=0,a=Io,s,o,l,u,c,d,f,h;var p=false;var v={data:[],size:0};while(a<t.byteLength){if(t[n]===Ao&&t[a]===Ao){s=t.subarray(n,a);o=wo.ts.parseType(s,i.pid);switch(o){case"pes":l=wo.ts.parsePesType(s,i.table);u=wo.ts.parsePayloadUnitStartIndicator(s);if(l==="video"){if(u&&!p){c=wo.ts.parsePesTime(s);if(c){c.type="video";r.video.push(c);p=true}}if(!r.firstKeyFrame){if(u){if(v.size!==0){d=new Uint8Array(v.size);f=0;while(v.data.length){h=v.data.shift();d.set(h,f);f+=h.byteLength}if(wo.ts.videoPacketContainsKeyFrame(d)){var m=wo.ts.parsePesTime(d);if(m){r.firstKeyFrame=m;r.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&&r.firstKeyFrame){break}n+=Io;a+=Io;continue}n++;a++}a=t.byteLength;n=a-Io;p=false;while(n>=0){if(t[n]===Ao&&t[a]===Ao){s=t.subarray(n,a);o=wo.ts.parseType(s,i.pid);switch(o){case"pes":l=wo.ts.parsePesType(s,i.table);u=wo.ts.parsePayloadUnitStartIndicator(s);if(l==="video"&&u){c=wo.ts.parsePesTime(s);if(c){c.type="video";r.video.push(c);p=true}}break;default:break}if(p){break}n-=Io;a-=Io;continue}n--;a--}};var Do=function e(t,i){if(t.audio&&t.audio.length){var r=i;if(typeof r==="undefined"){r=t.audio[0].dts}t.audio.forEach(function(e){e.dts=Eo(e.dts,r);e.pts=Eo(e.pts,r);e.dtsTime=e.dts/Co;e.ptsTime=e.pts/Co})}if(t.video&&t.video.length){var n=i;if(typeof n==="undefined"){n=t.video[0].dts}t.video.forEach(function(e){e.dts=Eo(e.dts,n);e.pts=Eo(e.pts,n);e.dtsTime=e.dts/Co;e.ptsTime=e.pts/Co});if(t.firstKeyFrame){var a=t.firstKeyFrame;a.dts=Eo(a.dts,n);a.pts=Eo(a.pts,n);a.dtsTime=a.dts/Co;a.ptsTime=a.dts/Co}}};var Ro=function e(t){var i=false,r=0,n=null,a=null,s=0,o=0,l;while(t.length-o>=3){var u=wo.aac.parseType(t,o);switch(u){case"timed-metadata":if(t.length-o<10){i=true;break}s=wo.aac.parseId3TagSize(t,o);if(s>t.length){i=true;break}if(a===null){l=t.subarray(o,o+s);a=wo.aac.parseAacTimestamp(l)}o+=s;break;case"audio":if(t.length-o<7){i=true;break}s=wo.aac.parseAdtsSize(t,o);if(s>t.length){i=true;break}if(n===null){l=t.subarray(o,o+s);n=wo.aac.parseSampleRate(l)}r++;o+=s;break;default:o++;break}if(i){return null}}if(n===null||a===null){return null}var c=Co/n;var d={audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+r*1024*c,pts:a+r*1024*c}]};return d};var Lo=function e(t){var i={pid:null,table:null};var r={};xo(t,i);for(var n in i.table){if(i.table.hasOwnProperty(n)){var a=i.table[n];switch(a){case Fs.H264_STREAM_TYPE:r.video=[];Po(t,i,r);if(r.video.length===0){delete r.video}break;case Fs.ADTS_STREAM_TYPE:r.audio=[];Oo(t,i,r);if(r.audio.length===0){delete r.audio}break;default:break}}}return r};var No=function e(t,i){var r=wo.aac.isLikelyAacData(t);var n;if(r){n=Ro(t)}else{n=Lo(t)}if(!n||!n.audio&&!n.video){return null}Do(n,i);return n};var Uo={inspect:No,parseAudioPes_:Oo};var Mo=Uo.inspect;var Bo=[{name:"VOD",run:function e(t,i,r,n,a){if(r!==Infinity){var s={time:0,segmentIndex:0};return s}return null}},{name:"ProgramDateTime",run:function e(t,i,r,n,a){if(!t.datetimeToDisplayTime){return null}var s=i.segments||[];var o=null;var l=null;a=a||0;for(var u=0;u<s.length;u++){var c=s[u];if(c.dateTimeObject){var d=c.dateTimeObject.getTime()/1e3;var f=d+t.datetimeToDisplayTime;var h=Math.abs(a-f);if(l!==null&&(h===0||l<h)){break}l=h;o={time:f,segmentIndex:u}}}return o}},{name:"Segment",run:function e(t,i,r,n,a){var s=i.segments||[];var o=null;var l=null;a=a||0;for(var u=0;u<s.length;u++){var c=s[u];if(c.timeline===n&&typeof c.start!=="undefined"){var d=Math.abs(a-c.start);if(l!==null&&l<d){break}if(!o||l===null||l>=d){l=d;o={time:c.start,segmentIndex:u}}}}return o}},{name:"Discontinuity",run:function e(t,i,r,n,a){var s=null;a=a||0;if(i.discontinuityStarts&&i.discontinuityStarts.length){var o=null;for(var l=0;l<i.discontinuityStarts.length;l++){var u=i.discontinuityStarts[l];var c=i.discontinuitySequence+l+1;var d=t.discontinuities[c];if(d){var f=Math.abs(a-d.time);if(o!==null&&o<f){break}if(!s||o===null||o>=f){o=f;s={time:d.time,segmentIndex:u}}}}}return s}},{name:"Playlist",run:function e(t,i,r,n,a){if(i.syncInfo){var s={time:i.syncInfo.time,segmentIndex:i.syncInfo.mediaSequence-i.mediaSequence};return s}return null}}];var Fo=function(e){I(t,e);function t(){E(this,t);var e=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.inspectCache_=undefined;e.timelines=[];e.discontinuities=[];e.datetimeToDisplayTime=null;e.logger_=Sa("SyncController");return e}w(t,[{key:"getSyncPoint",value:function e(t,i,r,n){var a=this.runStrategies_(t,i,r,n);if(!a.length){return null}return this.selectSyncPoint_(a,{key:"time",value:n})}},{key:"getExpiredTime",value:function e(t,i){if(!t||!t.segments){return null}var r=this.runStrategies_(t,i,t.discontinuitySequence,0);if(!r.length){return null}var n=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});if(n.segmentIndex>0){n.time*=-1}return Math.abs(n.time+K(t,n.segmentIndex,0))}},{key:"runStrategies_",value:function e(t,i,r,n){var a=[];for(var s=0;s<Bo.length;s++){var o=Bo[s];var l=o.run(this,t,i,r,n);if(l){l.strategy=o.name;a.push({strategy:o.name,syncPoint:l})}}return a}},{key:"selectSyncPoint_",value:function e(t,i){var r=t[0].syncPoint;var n=Math.abs(t[0].syncPoint[i.key]-i.value);var a=t[0].strategy;for(var s=1;s<t.length;s++){var o=Math.abs(t[s].syncPoint[i.key]-i.value);if(o<n){n=o;r=t[s].syncPoint;a=t[s].strategy}}this.logger_("syncPoint for ["+i.key+": "+i.value+"] chosen with strategy"+(" ["+a+"]: [time:"+r.time+",")+(" segmentIndex:"+r.segmentIndex+"]"));return r}},{key:"saveExpiredSegmentInfo",value:function e(t,i){var r=i.mediaSequence-t.mediaSequence;for(var n=r-1;n>=0;n--){var a=t.segments[n];if(a&&typeof a.start!=="undefined"){i.syncInfo={mediaSequence:t.mediaSequence+n,time:a.start};
1this.logger_("playlist refresh sync: [time:"+i.syncInfo.time+","+(" mediaSequence: "+i.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 i=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-i}}},{key:"reset",value:function e(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function e(t){var i=t.segment;var r=t.playlist;var n=void 0;if(i.map){n=this.probeMp4Segment_(t)}else{n=this.probeTsSegment_(t)}if(n){if(this.calculateSegmentTimeMapping_(t,n)){this.saveDiscontinuitySyncInfo_(t);if(!r.syncInfo){r.syncInfo={mediaSequence:r.mediaSequence+t.mediaIndex,time:i.start}}}}return n}},{key:"probeMp4Segment_",value:function e(t){var i=t.segment;var r=Da.timescale(i.map.bytes);var n=Da.compositionStartTime(r,t.bytes);if(t.timestampOffset!==null){t.timestampOffset-=n}return{start:n,end:n+i.duration}}},{key:"probeTsSegment_",value:function e(t){var i=Mo(t.bytes,this.inspectCache_);var r=void 0;var n=void 0;var a=void 0;if(!i){return null}if(i.video&&i.video.length===2){this.inspectCache_=i.video[1].dts;r=i.video[0].dtsTime;n=i.video[1].dtsTime;a=i.video}else if(i.audio&&i.audio.length===2){this.inspectCache_=i.audio[1].dts;r=i.audio[0].dtsTime;n=i.audio[1].dtsTime;a=i.audio}var s={segmentTimestampInfo:a,start:r,end:n,containsVideo:i.video&&i.video.length===2,containsAudio:i.audio&&i.audio.length===2};return s}},{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,i){var r=t.segment;var n=this.timelines[t.timeline];if(t.timestampOffset!==null){n={time:t.startOfSegment,mapping:t.startOfSegment-i.start};this.timelines[t.timeline]=n;this.trigger("timestampoffset");this.logger_("time mapping for timeline "+t.timeline+": "+("[time: "+n.time+"] [mapping: "+n.mapping+"]"));r.start=t.startOfSegment;r.end=i.end+n.mapping}else if(n){r.start=i.start+n.mapping;r.end=i.end+n.mapping}else{return false}return true}},{key:"saveDiscontinuitySyncInfo_",value:function e(t){var i=t.playlist;var r=t.segment;if(r.discontinuity){this.discontinuities[r.timeline]={time:r.start,accuracy:0}}else if(i.discontinuityStarts&&i.discontinuityStarts.length){for(var n=0;n<i.discontinuityStarts.length;n++){var a=i.discontinuityStarts[n];var s=i.discontinuitySequence+n+1;var o=a-t.mediaIndex;var l=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>l){var u=void 0;if(o<0){u=r.start-K(i,t.mediaIndex,a)}else{u=r.end+K(i,t.mediaIndex+1,a)}this.discontinuities[s]={time:u,accuracy:l}}}}}},{key:"dispose",value:function e(){this.trigger("dispose");this.off()}}]);return t}(r.EventTarget);var Ho=new mt("./decrypter-worker.worker.js",function(e,t){var i=this;var r=function(){function e(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var t=function e(t,i){if(!(t instanceof i)){throw new TypeError("Cannot call a class as a function")}};var r=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,i,r){if(i)e(t.prototype,i);if(r)e(t,r);return t}}();var n=function e(t,i){if(typeof i!=="function"&&i!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof i)}t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(i)Object.setPrototypeOf?Object.setPrototypeOf(t,i):t.__proto__=i};var a=function e(t,i){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return i&&(typeof i==="object"||typeof i==="function")?i:t};var s=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var i=t[0];var r=t[1];var n=i[4];var a=r[4];var s=void 0;var o=void 0;var l=void 0;var u=[];var c=[];var d=void 0;var f=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[(u[s]=s<<1^(s>>7)*283)^s]=s}for(o=l=0;!n[o];o^=d||1,l=c[l]||1){p=l^l<<1^l<<2^l<<3^l<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=u[f=u[d=u[o]]];m=h*16843009^f*65537^d*257^o*16843008;v=u[p]*257^p*16843008;for(s=0;s<4;s++){i[s][o]=v=v<<24^v>>>8;r[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){i[s]=i[s].slice(0);r[s]=r[s].slice(0)}return t};var o=null;var l=function(){function e(i){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 r=void 0;var n=void 0;var a=void 0;var l=void 0;var u=void 0;var c=this._tables[0][4];var d=this._tables[1];var f=i.length;var h=1;if(f!==4&&f!==6&&f!==8){throw new Error("Invalid aes key size")}l=i.slice(0);u=[];this._key=[l,u];for(r=f;r<4*f+28;r++){a=l[r-1];if(r%f===0||f===8&&r%f===4){a=c[a>>>24]<<24^c[a>>16&255]<<16^c[a>>8&255]<<8^c[a&255];if(r%f===0){a=a<<8^a>>>24^h<<24;h=h<<1^(h>>7)*283}}l[r]=l[r-f]^a}for(n=0;r;n++,r--){a=l[n&3?r:r-4];if(r<=4||n<4){u[n]=a}else{u[n]=d[0][c[a>>>24]]^d[1][c[a>>16&255]]^d[2][c[a>>8&255]]^d[3][c[a&255]]}}}e.prototype.decrypt=function e(t,i,r,n,a,s){var o=this._key[1];var l=t^o[0];var u=n^o[1];var c=r^o[2];var d=i^o[3];var f=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 j=y[4];for(m=0;m<v;m++){f=_[l>>>24]^b[u>>16&255]^T[c>>
18&255]^S[d&255]^o[g];h=_[u>>>24]^b[c>>16&255]^T[d>>8&255]^S[l&255]^o[g+1];p=_[c>>>24]^b[d>>16&255]^T[l>>8&255]^S[u&255]^o[g+2];d=_[d>>>24]^b[l>>16&255]^T[u>>8&255]^S[c&255]^o[g+3];g+=4;l=f;u=h;c=p}for(m=0;m<4;m++){a[(3&-m)+s]=j[l>>>24]<<24^j[u>>16&255]<<16^j[c>>8&255]<<8^j[d&255]^o[g++];f=l;l=u;u=c;c=d;d=f}};return e}();var u=function(){function e(){t(this,e);this.listeners={}}e.prototype.on=function e(t,i){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(i)};e.prototype.off=function e(t,i){if(!this.listeners[t]){return false}var r=this.listeners[t].indexOf(i);this.listeners[t].splice(r,1);return r>-1};e.prototype.trigger=function e(t){var i=this.listeners[t];if(!i){return}if(arguments.length===2){var r=i.length;for(var n=0;n<r;++n){i[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=i.length;for(var o=0;o<s;++o){i[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(i,e);function i(){t(this,i);var r=a(this,e.call(this,u));r.jobs=[];r.delay=1;r.timeout_=null;return r}i.prototype.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};i.prototype.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return i}(u);var d=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var f=function e(t,i,r){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new l(Array.prototype.slice.call(i));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var u=void 0;var c=void 0;var f=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;u=r[0];c=r[1];f=r[2];h=r[3];for(y=0;y<n.length;y+=4){p=d(n[y]);v=d(n[y+1]);m=d(n[y+2]);g=d(n[y+3]);a.decrypt(p,v,m,g,o,y);o[y]=d(o[y]^u);o[y+1]=d(o[y+1]^c);o[y+2]=d(o[y+2]^f);o[y+3]=d(o[y+3]^h);u=p;c=v;f=m;h=g}return s};var h=function(){function i(r,n,a,s){t(this,i);var o=i.STEP;var l=new Int32Array(r.buffer);var u=new Uint8Array(r.byteLength);var f=0;this.asyncStream_=new c;this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+o),n,a,u));for(f=o;f<l.length;f+=o){a=new Uint32Array([d(l[f-4]),d(l[f-3]),d(l[f-2]),d(l[f-1])]);this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+o),n,a,u))}this.asyncStream_.push(function(){s(null,e(u))})}i.prototype.decryptChunk_=function e(t,i,r,n){return function(){var e=f(t,i,r);n.set(e,t.byteOffset)}};r(i,null,[{key:"STEP",get:function e(){return 32e3}}]);return i}();var p=function e(t){var i={};Object.keys(t).forEach(function(e){var r=t[e];if(ArrayBuffer.isView(r)){i[e]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}}else{i[e]=r}});return i};var v=function e(t){t.onmessage=function(e){var i=e.data;var r=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength);var n=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4);var a=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new h(r,n,a,function(e,r){t.postMessage(p({source:i.source,decrypted:r}),[r.buffer])})}};var m=new v(i);return m}()});var Vo=function e(t){var i=t.default?"main":"alternative";if(t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0){i="main-desc"}return i};var qo=function e(t,i){t.abort();t.pause();if(i&&i.activePlaylistLoader){i.activePlaylistLoader.pause();i.activePlaylistLoader=null}};var Wo=function e(t,i){i.activePlaylistLoader=t;t.load()};var zo=function e(t,i){return function(){var e=i.segmentLoaders,r=e[t],n=e.main,a=i.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var l=a.activePlaylistLoader;qo(r,a);if(!o){return}if(!o.playlistLoader){if(l){n.resetEverything()}return}r.resyncLoader();Wo(o.playlistLoader,a)}};var Go=function e(t,i){return function(){var e=i.segmentLoaders,r=e[t],n=e.main,a=i.mediaTypes[t];var s=a.activeTrack();var o=a.activeGroup(s);var l=a.activePlaylistLoader;qo(r,a);if(!o){return}if(!o.playlistLoader){n.resetEverything();return}if(l===o.playlistLoader){Wo(o.playlistLoader,a);return}if(r.track){r.track(s)}r.resetEverything();Wo(o.playlistLoader,a)}};var Yo={AUDIO:function e(t,i){return function(){var e=i.segmentLoaders[t],n=i.mediaTypes[t],a=i.blackl
1istCurrentPlaylist;qo(e,n);var s=n.activeTrack();var o=n.activeGroup();var l=(o.filter(function(e){return e.default})[0]||o[0]).id;var u=n.tracks[l];if(s===u){a({message:"Problem encountered loading the default audio track."});return}r.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]===u}n.onTrackChanged()}},SUBTITLES:function e(t,i){return function(){var e=i.segmentLoaders[t],n=i.mediaTypes[t];r.log.warn("Problem encountered loading the subtitle track."+"Disabling subtitle track.");qo(e,n);var a=n.activeTrack();if(a){a.mode="disabled"}n.onTrackChanged()}}};var Ko={AUDIO:function e(t,i,r){if(!i){return}var n=r.tech,a=r.requestOptions,s=r.segmentLoaders[t];i.on("loadedmetadata",function(){var e=i.media();s.playlist(e,a);if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});i.on("loadedplaylist",function(){s.playlist(i.media(),a);if(!n.paused()){s.load()}});i.on("error",Yo[t](t,r))},SUBTITLES:function e(t,i,r){var n=r.tech,a=r.requestOptions,s=r.segmentLoaders[t],o=r.mediaTypes[t];i.on("loadedmetadata",function(){var e=i.media();s.playlist(e,a);s.track(o.activeTrack());if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});i.on("loadedplaylist",function(){s.playlist(i.media(),a);if(!n.paused()){s.load()}});i.on("error",Yo[t](t,r))}};var Xo={AUDIO:function e(t,i){var n=i.hls,a=i.sourceType,s=i.segmentLoaders[t],o=i.requestOptions,l=i.master.mediaGroups,u=i.mediaTypes[t],c=u.groups,d=u.tracks,f=i.masterPlaylistLoader;if(!l[t]||Object.keys(l[t]).length===0){l[t]={main:{default:{default:true}}}}for(var h in l[t]){if(!c[h]){c[h]=[]}for(var p in l[t][h]){var v=l[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 Ta(v.playlists[0],n,o,f)}else{m=null}v=r.mergeOptions({id:p,playlistLoader:m},v);Ko[t](t,v.playlistLoader,i);c[h].push(v);if(typeof d[p]==="undefined"){var g=new r.AudioTrack({id:p,kind:Vo(v),enabled:false,language:v.language,default:v.default,label:p});d[p]=g}}}s.on("error",Yo[t](t,i))},SUBTITLES:function e(t,i){var n=i.tech,a=i.hls,s=i.sourceType,o=i.segmentLoaders[t],l=i.requestOptions,u=i.master.mediaGroups,c=i.mediaTypes[t],d=c.groups,f=c.tracks,h=i.masterPlaylistLoader;for(var p in u[t]){if(!d[p]){d[p]=[]}for(var v in u[t][p]){if(u[t][p][v].forced){continue}var m=u[t][p][v];var g=void 0;if(s==="hls"){g=new V(m.resolvedUri,a,l)}else if(s==="dash"){g=new Ta(m.playlists[0],a,l,h)}m=r.mergeOptions({id:v,playlistLoader:g},m);Ko[t](t,m.playlistLoader,i);d[p].push(m);if(typeof f[v]==="undefined"){var y=n.addRemoteTextTrack({id:v,kind:"subtitles",default:m.default&&m.autoselect,language:m.language,label:v},false).track;f[v]=y}}}o.on("error",Yo[t](t,i))},"CLOSED-CAPTIONS":function e(t,i){var n=i.tech,a=i.master.mediaGroups,s=i.mediaTypes[t],o=s.groups,l=s.tracks;for(var u in a[t]){if(!o[u]){o[u]=[]}for(var c in a[t][u]){var d=a[t][u][c];if(!d.instreamId.match(/CC\d/)){continue}o[u].push(r.mergeOptions({id:c},d));if(typeof l[c]==="undefined"){var f=n.addRemoteTextTrack({id:d.instreamId,
1kind:"captions",default:d.default&&d.autoselect,language:d.language,label:c},false).track;l[c]=f}}}}};var Jo=function e(t,i){return function(e){var r=i.masterPlaylistLoader,n=i.mediaTypes[t].groups;var a=r.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 Qo={AUDIO:function e(t,i){return function(){var e=i.mediaTypes[t].tracks;for(var r in e){if(e[r].enabled){return e[r]}}return null}},SUBTITLES:function e(t,i){return function(){var e=i.mediaTypes[t].tracks;for(var r in e){if(e[r].mode==="showing"||e[r].mode==="hidden"){return e[r]}}return null}}};var Zo=function e(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Xo[e](e,t)});var i=t.mediaTypes,r=t.masterPlaylistLoader,n=t.tech,a=t.hls;["AUDIO","SUBTITLES"].forEach(function(e){i[e].activeGroup=Jo(e,t);i[e].activeTrack=Qo[e](e,t);i[e].onGroupChanged=zo(e,t);i[e].onTrackChanged=Go(e,t)});var s=i.AUDIO.activeGroup();var o=(s.filter(function(e){return e.default})[0]||s[0]).id;i.AUDIO.tracks[o].enabled=true;i.AUDIO.onTrackChanged();r.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return i[e].onGroupChanged()})});var l=function e(){i.AUDIO.onTrackChanged();n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",l);n.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged);a.on("dispose",function(){n.audioTracks().removeEventListener("change",l);n.remoteTextTracks().removeEventListener("change",i.SUBTITLES.onTrackChanged)});n.clearTracks("audio");for(var u in i.AUDIO.tracks){n.audioTracks().addTrack(i.AUDIO.tracks[u])}};var $o=function e(){var t={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ja,activeTrack:ja,onGroupChanged:ja,onTrackChanged:ja}});return t};var el=60*2;var tl=void 0;var il=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"];var rl=function e(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]};var nl=function(e){I(t,e);function t(e){E(this,t);var i=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));var n=e.url,a=e.handleManifestRedirects,s=e.withCredentials,o=e.tech,l=e.bandwidth,u=e.externHls,c=e.useCueTags,d=e.blacklistDuration,f=e.enableLowInitialPlaylist,h=e.sourceType,p=e.seekTo,v=e.cacheEncryptionKeys;if(!n){throw new Error("A non-empty playlist URL is required")}tl=u;i.withCredentials=s;i.tech_=o;i.hls_=o.hls;i.seekTo_=p;i.sourceType_=h;i.useCueTags_=c;i.blacklistDuration=d;i.enableLowInitialPlaylist=f;if(i.useCueTags_){i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues");i.cueTagsTrack_.inBandMetadataTrackDispatchType=""}i.requestOptions_={withCredentials:s,handleManifestRedirects:a,timeout:null};i.mediaTypes_=$o();i.mediaSource=new r.MediaSource;i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_.bind(i));i.seekable_=r.createTimeRanges();i.hasPlayed_=false;i.syncController_=new Fo(e);i.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},false).track;i.decrypter_=new Ho;i.inbandTextTracks_={};var m={hls:i.hls_,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function e(){return i.seekable()},seeking:function e(){return i.tech_.seeking()},duration:function e(){return i.mediaSource.duration},hasPlayed:function e(){return i.hasPlayed_},goalBufferLength:function e(){return i.goalBufferLength()},bandwidth:l,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:v};i.masterPlaylistLoader_=i.sourceType_==="dash"?new Ta(n,i.hls_,i.requestOptions_):new V(n,i.hls_,i.requestOptions_);i.setupMasterPlaylistLoaderListeners_();i.mainSegmentLoader_=new Rs(r.mergeOptions(m,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),e);i.audioSegmentLoader_=new Rs(r.mergeOptions(m,{loaderType:"audio"}),e);i.subtitleSegmentLoader_=new Us(r.mergeOptions(m,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),e);i.setupSegmentLoaderListeners_();il.forEach(function(e){i[e+"_"]=rl.bind(i,e)});i.logger_=Sa("MPC");i.masterPlaylistLoader_.load();return i}w(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function e(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=t.masterPlaylistLoader_.media();var i=e.targetDuration*1.5*1e3;if(de(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=i}if(e.endList&&t.tech_.preload()!=="none"){t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load()}Zo({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){r.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 i=void 0;if(t.enableLowInitialPlaylist){i=t.selectInitialPlaylist()}if(!i){i=t.selectPlaylist()}t.initialMedia_=i;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 r=function e(){var i=t.seekable();if(i.length!==0){t.mediaSource.addSeekableRange_(i.start(0),i.end(0))}};if(t.duration()!==Infinity){var n=function e(){if(t.duration()===Infinity){r()}else{t.tech_.one("durationchange",e)}};t.tech_.one("durationchange",n)}else{r()}}});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 i=e.targetDuration*1.5*1e3;if(de(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=i}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 i=t.stuckAtPlaylistEnd_(e);if(i){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,i){var r=t.mediaGroups||{};var n=true;var a=Object.keys(r.AUDIO);for(var s in r.AUDIO){for(var o in r.AUDIO[s]){var l=r.AUDIO[s][o];if(!l.uri){n=false}}}if(n){this.tech_.trigger({type:"usage",name:"hls-demuxed"})}if(Object.keys(r.SUBTITLES).length){this.tech_.trigger({type:"usage",name:"hls-webvtt"})}if(tl.Playlist.isAes(i)){this.tech_.trigger({type:"usage",name:"hls-aes"})}if(tl.Playlist.isFmp4(i)){this.tech_.trigger({type:"usage",name:"hls-fmp4"})}if(a.length&&Object.keys(r.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 i=t.masterPlaylistLoader_.media();var r=t.tech_.buffered();var n=r.length?r.end(r.length-1)-t.tech_.currentTime():0;var a=t.bufferLowWaterLine();if(!i.endList||t.duration()<Ea.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<i.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."},el)});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 i=this.selectPlaylist();if(i===this.masterPlaylistLoader_.media()){return}this.masterPlaylistLoader_.media(i);this.mainSegmentLoader_.resetEverything(function(){if(r.browser.IE_VERSION||r.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();
1if(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 i=this.masterPlaylistLoader_.media();if(!i||this.tech_.paused()||this.hasPlayed_){return false}if(!i.endList){var n=this.seekable();if(!n.length){return false}if(r.browser.IE_VERSION&&this.tech_.readyState()===0){this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.seekTo_(n.end(0));t.hasPlayed_=true});return false}this.trigger("firstplay");this.seekTo_(n.end(0))}this.hasPlayed_=true;this.load();return true}},{key:"handleSourceOpen_",value:function e(){try{this.setupSourceBuffers_()}catch(e){r.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){r.log.warn("Failed to call media source endOfStream",e)}}},{key:"stuckAtPlaylistEnd_",value:function e(t){var i=this.seekable();if(!i.length){return false}var r=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(r===null){return false}var n=tl.Playlist.playlistEnd(t,r);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 i=arguments[1];var n=void 0;var a=void 0;n=t.playlist||this.masterPlaylistLoader_.media();
1i=i||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){r.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){r.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()+i*1e3;this.tech_.trigger("blacklistplaylist");this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});a=this.selectPlaylist();r.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 i=$e(this.tech_.buffered(),t);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0}if(!this.masterPlaylistLoader_.media().segments){return 0}if(i&&i.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 tl.Playlist.duration(this.masterPlaylistLoader_.media())}},{key:"seekable",value:function e(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function e(){var t=void 0;if(!this.masterPlaylistLoader_){return}var i=this.masterPlaylistLoader_.media();if(!i){return}var n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(n===null){return}var a=this.masterPlaylistLoader_.master.suggestedPresentationDelay;var s=tl.Playlist.seekable(i,n,a);if(s.length===0){return}if(this.mediaTypes_.AUDIO.activePlaylistLoader){i=this.mediaTypes_.AUDIO.activePlaylistLoader.media();n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(n===null){return}t=tl.Playlist.seekable(i,n,a);if(t.length===0){return}}var o=void 0;var l=void 0;if(this.seekable_&&this.seekable_.length){o=this.seekable_.end(0);l=this.seekable_.start(0)}if(!t){this.seekable_=s}else if(t.start(0)>s.end(0)||s.start(0)>t.end(0)){this.seekable_=s}else{this.seekable_=r.createTimeRanges([[t.start(0)>s.start(0)?t.start(0):s.start(0),t.end(0)<s.end(0)?t.end(0):s.end(0)]])}if(this.seekable_&&this.seekable_.length){if(this.seekable_.end(0)===o&&this.seekable_.start(0)===l){return}}this.logger_("seekable updated ["+it(this.seekable_)+"]");this.tech_.trigger("seekablechanged")}},{key:"updateDuration",value:function e(){var t=this;var i=this.mediaSource.duration;var n=tl.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){r.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(i!==n){if(this.mediaSource.readyState!=="open"){this.mediaSource.addEventListener("sourceopen",s)}else{s()}}}},{key:"dispose",value:function e(){var t=this;this.trigger("dispose");this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();["AUDIO","SUBTITLES"].forEach(function(e){var i=t.mediaTypes_[e].groups;for(var r in i){i[r].forEach(function(e){if(e.playlistLoader){e.playlistLoader.dispose()}})}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose();this.off();if(this.mediaSource.dispose){this.mediaSource.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 i=void 0;if(!t||this.mediaSource.readyState!=="open"){return}i=Ot(this.masterPlaylistLoader_.master,t);if(i.length<1){this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri;return this.mediaSource.endOfStream("decode")}this.configureLoaderMimeTypes_(i);this.excludeIncompatibleVariants_(t)}},{key:"configureLoaderMimeTypes_",value:function e(t){var i=t.length>1&&t[0].indexOf(",")===-1&&t[0]!==t[1]?new r.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],i);if(t[1]){this.audioSegmentLoader_.mimeType(t[1],i)}}},{key:"excludeUnsupportedVariants_",value:function e(){this.master().playlists.forEac
1h(function(e){if(e.attributes.CODECS&&f.MediaSource&&f.MediaSource.isTypeSupported&&!f.MediaSource.isTypeSupported('video/mp4; codecs="'+wt(e.attributes.CODECS)+'"')){e.excludeUntil=Infinity}})}},{key:"excludeIncompatibleVariants_",value:function e(t){var i=2;var r=null;var n=void 0;if(t.attributes.CODECS){n=Et(t.attributes.CODECS);r=n.videoCodec;i=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!==i){e.excludeUntil=Infinity}if(t.videoCodec!==r){e.excludeUntil=Infinity}})}},{key:"updateAdCues_",value:function e(t){var i=0;var r=this.seekable();if(r.length){i=r.start(0)}Bs(t,this.cueTagsTrack_,i)}},{key:"goalBufferLength",value:function e(){var t=this.tech_.currentTime();var i=Ea.GOAL_BUFFER_LENGTH;var r=Ea.GOAL_BUFFER_LENGTH_RATE;var n=Math.max(i,Ea.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+t*r,n)}},{key:"bufferLowWaterLine",value:function e(){var t=this.tech_.currentTime();var i=Ea.BUFFER_LOW_WATER_LINE;var r=Ea.BUFFER_LOW_WATER_LINE_RATE;var n=Math.max(i,Ea.MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+t*r,n)}}]);return t}(r.EventTarget);var al=function e(t,i,r){return function(e){var n=t.master.playlists[i];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){r();if(e){t.trigger("renditionenabled")}else{t.trigger("renditiondisabled")}}return e}};var sl=function e(t,i,r){E(this,e);var n=t.masterPlaylistController_,a=t.options_.smoothQualityChange;var s=a?"smooth":"fast";var o=n[s+"QualityChange_"].bind(n);if(i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION;this.width=l.width;this.height=l.height}this.bandwidth=i.attributes.BANDWIDTH;this.id=r;this.enabled=al(t.playlists,i.id,o)};var ol=function e(t){var i=t.playlists;t.representations=function(){if(!i||!i.master||!i.master.playlists){return[]}return i.master.playlists.filter(function(e){return!ne(e)}).map(function(e,i){return new sl(t,e,e.id)})}};var ll=["seeking","seeked","pause","playing","error"];var ul=function(){function e(t){var i=this;E(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_=Sa("PlaybackWatcher");this.logger_("initialize");var r=function e(){return i.monitorCurrentTime_()};var n=function e(){return i.techWaiting_()};var a=function e(){return i.cancelTimer_()};var s=function e(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",s);this.tech_.on("waiting",n);this.tech_.on(ll,a);this.tech_.on("canplay",r);this.dispose=function(){i.logger_("dispose");i.tech_.off("seekablechanged",s);i.tech_.off("waiting",n);i.tech_.off(ll,a);i.tech_.off("canplay",r);if(i.checkCurrentTimeTimeout_){f.clearTimeout(i.checkCurrentTimeTimeout_)}i.cancelTimer_()}}w(e,[{key:"monitorCurrentTime_",value:function e(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){f.clearTimeout(this.checkCurrentTimeTimeout_)}this.checkCurrentTimeTimeout_=f.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 i=this.tech_.buffered();if(this.lastRecordedTime===t&&(!i.length||t+Qe>=i.end(i.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 i=this.seekable();var r=this.tech_.currentTime();var n=this.afterSeekableWindow_(i,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);var a=void 0;if(n){var s=i.end(i.length-1);a=s}if(this.beforeSeekableWindow_(i,r)){var o=i.start(0);a=o+Qe}if(typeof a!=="undefined"){this.logger_("Trying to seek outside of seekable at time "+r+" with "+("seekable range "+it(i)+". 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 i=this.tech_.buffered();var r=$e(i,t);if(r.length&&t+3<=r.end(0)){this.cancelTimer_();this.seekTo(t);this.logger_("Stopped at "+t+" while inside a buffered region "+("["+r.start(0)+" -> "+r.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 i=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()){return true}if(this.tech_.seeking()||this.timer_!==null){return true}
1if(this.beforeSeekableWindow_(t,i)){var r=t.end(t.length-1);this.logger_("Fell out of live window at time "+i+". Seeking to "+("live point (seekable end) "+r));this.cancelTimer_();this.seekTo(r);this.tech_.trigger({type:"usage",name:"hls-live-resync"});return true}var n=this.tech_.buffered();var a=et(n,i);if(this.videoUnderflow_(a,n,i)){this.cancelTimer_();this.seekTo(i);this.tech_.trigger({type:"usage",name:"hls-video-underflow"});return true}if(a.length>0){var s=a.start(0)-i;this.logger_("Stopped at "+i+", setting timer for "+s+", seeking "+("to "+a.start(0)));this.timer_=setTimeout(this.skipTheGap_.bind(this),s*1e3,i);return true}return false}},{key:"afterSeekableWindow_",value:function e(t,i,r){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=!r.endList;if(s&&n){a=t.end(t.length-1)+r.targetDuration*3}if(i>a){return true}return false}},{key:"beforeSeekableWindow_",value:function e(t,i){if(t.length&&t.start(0)>0&&i<t.start(0)-Qe){return true}return false}},{key:"videoUnderflow_",value:function e(t,i,r){if(t.length===0){var n=this.gapFromVideoUnderflow_(i,r);if(n){this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". "+("Seeking to current time "+r));return true}}return false}},{key:"skipTheGap_",value:function e(t){var i=this.tech_.buffered();var r=this.tech_.currentTime();var n=et(i,r);this.cancelTimer_();if(n.length===0||r!==t){return}this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",t,"nextRange start:",n.start(0));this.seekTo(n.start(0)+Je);this.tech_.trigger({type:"usage",name:"hls-gap-skip"})}},{key:"gapFromVideoUnderflow_",value:function e(t,i){var r=tt(t);for(var n=0;n<r.length;n++){var a=r.start(n);var s=r.end(n);if(i-a<4&&i-a>2){return{start:a,end:s}}}return null}}]);return e}();var cl={errorInterval:30,getSource:function e(t){var i=this.tech({IWillNotUseThisInPlugins:true});var r=i.currentSource_;return t(r)}};var dl=function e(t,i){var n=0;var a=0;var s=r.mergeOptions(cl,i);t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function e(){if(a){t.currentTime(a)}};var l=function e(i){if(i===null||i===undefined){return}a=t.duration()!==Infinity&&t.currentTime()||0;t.one("loadedmetadata",o);t.src(i);t.trigger({type:"usage",name:"hls-error-reload"});t.play()};var u=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"){r.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}n=Date.now();return s.getSource.call(t,l)};var c=function e(){t.off("loadedmetadata",o);t.off("error",u);t.off("dispose",e)};var d=function i(r){c();e(t,r)};t.on("error",u);t.on("dispose",c);t.reloadSourceOnError=d};var fl=function e(t){dl(this,t)};var hl="1.12.3";r.use("*",function(e){return{setSource:function e(t,i){i(null,t)},setCurrentTime:function t(i){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(i)}return i},play:function t(){if(e.vhs&&e.currentSource().src===e.vhs.source_.src){e.vhs.setCurrentTime(e.tech_.currentTime())}}}});var pl={PlaylistLoader:V,Playlist:fe,Decrypter:xe,AsyncStream:Ce,decrypt:Ae,utils:Fe,STANDARD_PLAYLIST_SELECTOR:Qa,INITIAL_PLAYLIST_SELECTOR:$a,comparePlaylistBandwidth:Ka,comparePlaylistResolution:Xa,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(pl,e,{get:function t(){r.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");return Ea[e]},set:function t(i){r.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing");if(typeof i!=="number"||i<0){r.log.warn("value of Hls."+e+" must be greater than or equal to 0");return}Ea[e]=i}})});var vl="videojs-vhs";var ml=function e(t){var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;if(i.test(t)){return"hls"}var r=/^application\/dash\+xml/i;
1if(r.test(t)){return"dash"}return null};var gl=function e(t,i){var r=i.media();var n=-1;for(var a=0;a<t.length;a++){if(t[a].id===r.id){n=a;break}}t.selectedIndex_=n;t.trigger({selectedIndex:n,type:"change"})};var yl=function e(t,i){i.representations().forEach(function(e){t.addQualityLevel(e)});gl(t,i.playlists)};pl.canPlaySource=function(){return r.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var _l=function e(t,i,n){if(!t){return t}var a=void 0;var s=void 0;if(n.mimeType_){a=i.mimeType_;s=n.mimeType_}else{var o=Pt(i.mimeType_);var l=o.parameters.codecs.split(",");var u=void 0;var c=void 0;l.forEach(function(e){e=e.trim();if(Dt(e)){u=e}else if(Rt(e)){c=e}});a=o.type+'; codecs="'+c+'"';s=o.type.replace("video","audio")+'; codecs="'+u+'"'}var d={};var f=i.playlist_;for(var h in t){d[h]={audioContentType:s,videoContentType:a};if(f.contentProtection&&f.contentProtection[h]&&f.contentProtection[h].pssh){d[h].pssh=f.contentProtection[h].pssh}if(typeof t[h]==="string"){d[h].url=t[h]}}return r.mergeOptions(t,d)};var bl=function e(t){var i=t.masterPlaylistController_.mainSegmentLoader_;var n=t.masterPlaylistController_.audioSegmentLoader_;var a=r.players[t.tech_.options_.playerId];if(a.eme){var s=_l(t.source_.keySystems,i,n);if(s){a.currentSource().keySystems=s;if(!(r.browser.IE_VERSION===11)&&a.eme.initializeMediaKeys){a.eme.initializeMediaKeys()}}}};var Tl=function t(){if(!e.localStorage){return null}var i=e.localStorage.getItem(vl);if(!i){return null}try{return JSON.parse(i)}catch(e){return null}};var Sl=function t(i){if(!e.localStorage){return false}var n=Tl();n=n?r.mergeOptions(n,i):i;try{e.localStorage.setItem(vl,JSON.stringify(n))}catch(e){return false}return n};pl.supportsNativeHls=function(){var e=u.createElement("video");if(!r.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))})}();pl.supportsNativeDash=function(){if(!r.getTech("Html5").isSupported()){return false}return/maybe|probably/i.test(u.createElement("video").canPlayType("application/dash+xml"))}();pl.supportsTypeNatively=function(e){if(e==="hls"){return pl.supportsNativeHls}if(e==="dash"){return pl.supportsNativeDash}return false};pl.isSupported=function(){return r.log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var jl=r.getComponent("Component");var kl=function(e){I(t,e);function t(e,i,n){E(this,t);var a=A(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i,n.hls));if(i.options_&&i.options_.playerId){var s=r(i.options_.playerId);if(!s.hasOwnProperty("hls")){Object.defineProperty(s,"hls",{get:function e(){r.log.warn("player.hls is deprecated. Use player.tech().hls instead.");i.trigger({type:"usage",name:"hls-player-access"});return a},configurable:true})}s.vhs=a;s.dash=a;a.player_=s}a.tech_=i;a.source_=e;a.stats={};a.setOptions_();if(a.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks){i.overrideNativeAudioTracks(true);i.overrideNativeVideoTracks(true)}else if(a.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks)){throw new Error("Overriding native HLS requires emulated tracks. "+"See https://git.io/vMpjB")}a.on(u,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=u.fullscreenElement||u.webkitFullscreenElement||u.mozFullScreenElement||u.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}w(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 i=Tl();if(i&&i.bandwidth){this.options_.bandwidth=i.bandwidth;this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})}if(i&&i.throughput){this.options_.throughput=i.throughput;this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"})}}}if(typeof this.options_.bandwidth!=="number"){this.options_.bandwidth=Ea.INITIAL_BANDWIDTH}this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ea.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,i){var n=this;if(!t){return}this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=pl;this.options_.sourceType=ml(i);this.options_.seekTo=function(e){n.tech_.setCurrentTime(e);n.setCurrentTime(e)};this.masterPlaylistController_=new nl(this.options_);this.playbackWatcher_=new ul(r.mergeOptions(this.options_,{seekable:function e(){return n.seekable()},media:function e(){return n.masterPlaylistController_.media()}}));this.masterPlaylistController_.on("error",function(){var e=r.players[n.tech_.options_.playerId];e.error(n.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):pl.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=pl.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}
1,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 i=void 0;if(this.throughput>0){i=1/this.throughput}else{i=0}var r=Math.floor(1/(t+i));return r},set:function e(){r.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){Sl({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}});this.masterPlaylistController_.on("selectedinitialmedia",function(){ol(n);bl(n)});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});this.setupQualityLevels_();if(!this.tech_.el()){return}this.tech_.src(r.URL.createObjectURL(this.masterPlaylistController_.mediaSource))}},{key:"setupQualityLevels_",value:function e(){var t=this;var i=r.players[this.tech_.options_.playerId];if(!i||!i.qualityLevels||this.qualityLevels_){return}this.qualityLevels_=i.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){yl(t.qualityLevels_,t)});this.playlists.on("mediachange",function(){gl(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()}
1if(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}C(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function e(t,i){return Ke({playlist:this.masterPlaylistController_.media(),time:t,callback:i})}},{key:"seekToProgramTime",value:function e(t,i){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:2;return Xe({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}}]);return t}(jl);var El={name:"videojs-http-streaming",VERSION:hl,canHandleSource:function e(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=r.mergeOptions(r.options,i);return El.canPlayType(t.type,n)},handleSource:function e(t,i){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=r.mergeOptions(r.options,n);i.hls=new kl(t,i,a);i.hls.xhr=ve();i.hls.src(t.src,t.type);return i.hls},canPlayType:function e(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=r.mergeOptions(r.options,i),a=n.hls.overrideNative;var s=ml(t);var o=s&&(!pl.supportsTypeNatively(s)||a);return o?"maybe":""}};if(typeof r.MediaSource==="undefined"||typeof r.URL==="undefined"){r.MediaSource=Gt;r.URL=Yt}if(Gt.supportsNativeMediaSources()){r.getTech("Html5").registerSourceHandler(El,0)}r.HlsHandler=kl;r.HlsSourceHandler=El;r.Hls=pl;if(!r.use){r.registerComponent("Hls",pl)}r.options.hls=r.options.hls||{};if(r.registerPlugin){r.registerPlugin("reloadSourceOnError",fl)}else{r.plugin("reloadSourceOnError",fl)}i.LOCAL_STORAGE_KEY=vl;i.Hls=pl;i.HlsHandler=kl;i.HlsSourceHandler=El;i.emeKeySystems=_l;i.simpleTypeFromSourceType=ml;Object.defineProperty(i,"__esModule",{value:true})});(function(){if(l.getPlugin("perSourceBehaviors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof i==="function"&&i.amd?i(["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 i=e.getTech("Html5");var r=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 l=function e(t){return t.usingPlugin("ads")&&typeof t.ads.inAdBreak==="function"};var u=function e(t,i){if(!t.usingPlugin("ads")){return false}if(l(t)){return t.ads.isInAdMode()&&i.type!=="loadstart"}return o(t.ads.state)};var c=function r(){var s=this;var o=[];var l;var c=false;var d;var f=true;var h=function t(i){return function(t,r){var n=this;if(this.perSourceBehaviors.disabled()){return}var a=arguments.length===2;var s=this.currentSrc();var l=[t];var u=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||i){n.off.apply(n,l)}if(!t){u.apply(void 0,arguments)}};c.guid=u.guid;if(!a){l.push(r)}l.push(c);o.push(l);return this.on.apply(this,l)}};this.perSourceBehaviors={disable:e.bind(this,function e(){this.clearTimeout(d);d=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 f},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()||d||u(s,e)){return}if(f&&a.indexOf(e.type)>-1){f=false;s.trigger("sourceunstable")}var t=[];var r=function e(i){return t.push({time:Date.now(),event:i})};r(e);s.on(i.Events,r);d=s.setTimeout(function(){var e=s.currentSrc();f=true;d=null;s.off(i.Events,r);if(e&&e!==l){o.forEach(function(e){return s.off.apply(s,e)});o.length=0;s.trigger("sourcechanged",{interimEvents:t,from:l,to:e});l=e}},1)})};c.VERSION=t;r("perSourceBehaviors",c);return c})})();
1(function(){if(l.getPlugin("contextmenu")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof i==="function"&&i.amd?i(["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 i=e.registerPlugin||e.plugin;var r={cancel:true,sensitivity:10,wait:500,disabled:false};var n="vjs-contextmenu";function a(e,t){if(e.contextmenu.options.disabled){return e}var i={target:e,type:n};["clientX","clientY","pageX","pageY","screenX","screenY"].forEach(function(e){i[e]=t[e]});return e.trigger(i)}function s(e){var t=this.contextmenu.current;if(!t){return}var i=this.contextmenu.options.wait;if(e.type==="touchend"&&Number(new Date)-t.time>=i){a(this,e)}this.contextmenu.current=null}function o(e){var t=this.contextmenu.current;if(!t){return}var i=e.touches[0];var r=this.contextmenu.options.sensitivity;if(i.screenX-t.screenX>r||i.screenY-t.screenY>r){this.contextmenu.current=null}}function l(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 u(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",l)}function c(t){var i=this;this.contextmenu.options=e.mergeOptions(r,t);this.contextmenu.VERSION="__VERSION__";this.on("contextmenu",u);this.on(["touchcancel","touchend"],s);this.on("touchmove",o);this.on("touchstart",l);this.ready(function(){return i.addClass(n)})}i("contextmenu",c);c.VERSION=t;return c})})();(function(){if(l.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 i==="function"&&i.amd?i(["video.js","global/document","global/window"],t):e.videojsContextmenuUi=t(e.videojs,e.document,e.window)})(this,function(e,t,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;function r(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){r(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;n.handleClick=function t(r){var n=this;e.prototype.handleClick.call(this);this.options_.listener();i.setTimeout(function(){n.player().contextmenuUI.menu.dispose()},1)};return t}(a);var o=e.getComponent("Menu");var l=e.dom||e;var u=function(t){r(a,t);function a(r,a){var o;o=t.call(this,r,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 i.open(t.href)}}o.addItem(new s(r,{label:t.label,listener:e.bind(r,n)}))});return o}var o=a.prototype;o.createEl=function e(){var i=t.prototype.createEl.call(this);l.addClass(i,"vjs-contextmenu-ui-menu");i.style.left=this.options_.position.left+"px";i.style.top=this.options_.position.top+"px";return i};return a}(o);function c(e){var r;if(e.getBoundingClientRect&&e.parentNode){r=e.getBoundingClientRect()}if(!r){return{left:0,top:0}}var n=t.documentElement;var a=t.body;var s=n.clientLeft||a.clientLeft||0;var o=i.pageXOffset||a.scrollLeft;var l=r.left+o-s;var u=n.clientTop||a.clientTop||0;var c=i.pageYOffset||a.scrollTop;var d=r.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function d(e,t){var i={};var r=c(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=r.top;var o=r.left;var l=t.pageY;var u=t.pageX;if(t.changedTouches){u=t.changedTouches[0].pageX;l=t.changedTouches[0].pageY}i.y=Math.max(0,Math.min(1,(s-l+a)/a));i.x=Math.max(0,Math.min(1,(u-o)/n));return i}var f="5.2.0";
1function h(e){return e.hasOwnProperty("contextmenuUI")&&e.contextmenuUI.hasOwnProperty("menu")&&e.contextmenuUI.menu.el()}function p(e){var t=e.tagName.toLowerCase();return t==="input"||t==="textarea"}function v(e,t){return{left:Math.round(t.width*e.x),top:Math.round(t.height-t.height*e.y)}}function m(i){var r=this;if(h(this)){this.contextmenuUI.menu.dispose();return}if(this.contextmenuUI.options_.excludeElements(i.target)){return}var n=d(this.el(),i);var a=this.el().getBoundingClientRect();var s=v(n,a);var o=e.browser.IS_FIREFOX?t.documentElement:t;i.preventDefault();var l=this.contextmenuUI.menu=new u(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!");l.dispose()};l.on("dispose",function(){e.off(o,["click","tap"],l.dispose);r.removeChild(l);delete r.contextmenuUI.menu});this.addChild(l);var c=l.el_.getBoundingClientRect();var f=t.body.getBoundingClientRect();if(this.contextmenuUI.keepInside||c.right>f.width||c.bottom>f.height){l.el_.style.left=Math.floor(Math.min(s.left,this.player_.currentWidth()-l.currentWidth()))+"px";l.el_.style.top=Math.floor(Math.min(s.top,this.player_.currentHeight()-l.currentHeight()))+"px"}e.on(o,["click","tap"],l.dispose)}function g(t){var i=this;var r={keepInside:true,excludeElements:p};t=e.mergeOptions(r,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(){g.apply(this,arguments)};n.onContextMenu=e.bind(this,m);n.content=t.content;n.keepInside=t.keepInside;n.options_=t;n.VERSION=f;this.on("contextmenu",n.onContextMenu);this.ready(function(){return i.addClass("vjs-contextmenu-ui")})}e.registerPlugin("contextmenuUI",g);g.VERSION=f;return g})})();(function(){if(l.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 i==="function"&&i.amd?i(["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,i,r){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;r=r&&r.hasOwnProperty("default")?r["default"]:r;var n=function(e,t,i){if(i===void 0){i={}}t.forEach(function(t){if(e[t]!==undefined){i[t]=e[t]}});return i};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(r.isObj(o)){a=i.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,i){return t+"x"+i};var l={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 u={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=u.hasOwnProperty(t)?u[t]:t;if(!this.data_.hasOwnProperty(t)){throw new Error('"'+t+'" is not a known QosBuffer key')}for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++){r[n-1]=arguments[n]}this["append"+s(t)+"_"].apply(this,r)};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 l=0;l<a.length;l++){if(!this.data_.hasOwnProperty(a[l])){throw new Error('"'+a[l]+'" is not a known QosBuffer key')}}var u=a.map(function(e){return t["flush"+s(e)+"_"]()});var c=i.mergeOptions.apply(i,u);var d=r.qs().stringify(c).length;if(d>3e3&&c["qos.bitrates"]){c["qos.bitrates"]=JSON.stringify({bitrates:[],playlists:[],rendered:[],throughput:[]})}return c};c.appendBitrates_=function e(t){var i=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){i.data_.bitrates[e].push([Date.now(),t[e]])})};c.appendMr_=function e(t){this.data_.mr=t?1:null};c.appendPerformance_=function t(i){var a=this;var s=e.performance;if(r.isNil(s)){return}Object.keys(l).forEach(function(e){if(!r.isNil(s[e])){a.data_.performance[e]=n(s[e],l[e])}});if(r.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=i?r.qs().parse(i).directedMigration==="true":false}};c.appendFrames_=function e(t){this.data_.frames={dropped:t.droppedVideoFrames,corrupted:t.corruptedVideoFrames,total:t.totalVideoFrames}};c.appendPlayer_=function t(i,r){if(r===void 0){r=Date.now()}this.data_.player.dimensions.push([r,o(i.width,i.height),o(i.computedWidth,i.c
1omputedHeight)]);this.data_.player.pixelratio.push([r,e.devicePixelRatio]);this.data_.player.screendimensions.push([r,o(e.screen.width,e.screen.height)])};c.appendEvents_=function e(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}this.data_.events.push({type:i.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 i={};if(t.bitrates.length||t.playlists.length||t.rendered.length||t.throughput.length){i["qos.bitrates"]=JSON.stringify(t)}t.bitrates.length=0;t.playlists.length=0;t.rendered.length=0;t.throughput.length=0;return i};c.flushEvents_=function e(){var t=this.data_.events;var i={};t.forEach(function(e){var t=e.time,r=e.type;var n="qos.events."+r;if(Array.isArray(i[n])){i[n].push(t)}else if(i.hasOwnProperty(n)){i[n]=[i[n],t]}else{i[n]=t}});Object.keys(i).forEach(function(e){if(Array.isArray(i[e])){i[e]=JSON.stringify(i[e])}});t.length=0;return i};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 i={};Object.keys(t).forEach(function(e){var r=t[e];if(r.length){i["qos.player."+e]=JSON.stringify(r);r.length=0}});return i};c.flushContent_=function e(){return a(this.data_.content,["qos","content"])};return t}();var d=["ad-playback","ads-ready?","postroll?","preroll?"];var f=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 d.indexOf(t)>-1};var v=function e(t){return t.usingPlugin("ads")&&r.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,i){if(v(i)&&t&&t.type==="loadstart"){return true}return!m(i)};var y=function e(t){var i={};if(t.ima3){var a=t.ima3.currentAdEventInfo;i.plugin="ima3";if(r.isFn(t.ima3)){return i}i.pluginVersion=t.ima3.VERSION||t.ima3.version;i.adTech=t.ima3.adTech;i.requestMode=t.ima3.settings.requestMode;i.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"],i);var s=a.creativeIndex;if(s&&s.length){i.firstPlayedAdIndex=s[0]}i.startedInAdPod=a.started;i.completedInAdPod=a.completed}}else if(t.FreeWheelPlugin){i.plugin="freewheel";if(r.isFn(t.FreeWheelPlugin)){return i}i.pluginVersion=t.FreeWheelPlugin.VERSION||t.FreeWheelPlugin.getVersion()}return i};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,i,r){var n=t.currentAdSequence_;var a=["ads-loading","ads-ad-started","ads-ad-ended"];if(i==="ads-request"){_(n)}else if(i==="adstart"||i==="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(i==="adend"){n.hasAdBreakStarted=false}if(a.indexOf(i)>-1){n[i][n.adBreakIndex].push(r)}else if(i==="ads-request"||i==="ads-response-received"){n[i]=r}};var S="sendBeacon"in e.navigator;var j=e.Set;var k="lbu";var E=4e3;var w=new j;["account","domain","event","player"].forEach(function(e){return w.add(e)});var C=new j;["account","catalog_url","destination","domain","dropped_frames","error_code","event","feature","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 C.add(e)});var I=function e(t,i){return Math.floor(t)+".."+(Math.floor(i)-1)};var A=function e(t){var i=2166136261;var r=i;for(var n=0;n<t.length;++n){r^=t.charCodeAt(n);r*=16777619}return r>>>0};var x=function e(t,i){var n=r.qs();
1Object.keys(i).forEach(function(e){if(r.isNil(i[e])){delete i[e]}});var a=t+"?"+n.stringify(i);if(a.length<=E){return a}Object.keys(i).forEach(function(e){if(!C.has(e)){delete i[e]}});i.usage=k;return t+"?"+n.stringify(i)};var O=function e(t,i,r,n,a){var s=i-t;if(a!==undefined&&a<i){s-=a-t}else if(r!==undefined&&n!==undefined){if(r<t){r=t}if(n>i){n=i}s-=n-r}return s};var P=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}var s=i.mergeOptions.apply(i,[t.params||{}].concat(n));delete t.params;return s};var D=function e(t,i){var n=t.mediainfo;var a=n&&n.duration||t.duration();if(n){if(i.video===undefined){i.video=n.id}if(i.video_name===undefined){i.video_name=n.name}}if(r.isNum(a)&&i.video_duration===undefined){i.video_duration=Math.floor(a);if(i.video_duration<1||i.video_duration===Infinity){i.video_duration=null}}return i};var R=function e(t,i){var r=t.preload();if(typeof r!=="string"){r=t.el().getAttribute("preload")}if(typeof r==="string"&&r.length===0){r="auto"}if(r){i.preload=r}};var L=function(){function a(e,t,i,r){if(r===void 0){r={}}this.baseUrl_=i;this.logger_=r.logger;this.history_=t;this.currentAdSequence_=b();this.player_=e;this.metrics_=[];this.eventCount_=0;this.streamCount_=-1;this.user(r.user||null);this.device(r.device||null);this.corpCommsApp(r.corpCommsApp||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(i.mergeOptions)};s.resetTimesOf=function e(){this.timeOfImpression=null;this.timeOfView=null};s.defaultParams=function e(t){if(t){t=r.isFn(t)?t():t;this.defaultParams_=i.mergeOptions(this.defaultParams_,t)}return this.defaultParams_};s.getSession=function e(){return this.defaultParams_.session};s.user=function e(t){if(t===null||r.isNonEmptyStr(t)||r.isNum(t)){this.user_=t}return this.user_};s.corpCommsApp=function e(t){if(t===null||r.isNonEmptyStr(t)||r.isNum(t)){this.corpCommsApp_=t}return this.corpCommsApp_};s.device=function e(t){if(t===null||r.isNonEmptyStr(t)||r.isNum(t)){this.device_=t}return this.device_};s.send=function n(a,s){var o;if(a===void 0){a={}}if(s===void 0){s={}}if(this.user()){a.user=A(this.user())}if(this.corpCommsApp()){a.application=this.corpCommsApp();a.user=this.user()||this.device()}if(r.isNil(a.time)){a.time=Date.now()}s.qos=Array.isArray(s.qos)?s.qos:[];s.qos.push("mr");a=i.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}w.forEach(function(e){if(r.isNil(a[e])){throw new Error('the "'+e+'" param is required')}});var l=x(this.baseUrl_,a);if(s.useSendBeaconOnly){if(S){e.navigator.sendBeacon(l)}else{return null}}else{var u=t.createElement("img");u.src=l}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:l}};s.sendCatalog_=function e(t,i){if(i===void 0){i={}}var r=i,n=r.error,a=r.xhr;if(n&&a){n.status=a.status}if(n){t.error=JSON.stringify(n)}return this.send(t,i)};s.sendVideoImpression=function e(t){if(t===void 0){t={}}var n=P(t,{event:"video_impression"});var a=y(this.player_);if(Object.keys(a).length>0){n.web_ad_info=JSON.stringify(a)}var s=r.isNonEmptyStr(this.player_.currentSrc());if(!s||this.timeOfImpression){return null}if(i.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();R(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 i=P(t,{event:"video_view"});var n=r.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 l=a.first("play");
1if(s){i.load_time_ms=s-this.timeOfImpression}i.start_time_ms=O(l||o,i.time,a.first("adstart",true),a.first("adend",true),a.first("adtimeout",true));D(this.player_,i);if(this.player_.usingPlugin("pluginDev")){i.feature="iris"}t.streamCount=this.streamCount_;var u=this.send(i,t);if(u){this.timeOfView=Number(u.params.time)}return u};s.sendVideoEngagement=function e(t,i,n){if(n===void 0){n={}}var a=P(n,{event:"video_engagement"});var s=i.buffered,o=i.duration,l=i.playbackEndTime,u=i.height,c=i.mediainfo,d=i.playbackRate,f=i.rebufferingCount,h=i.rendition,p=i.playbackStartTime,v=i.rangeStart,m=i.rangeEnd,g=i.stats,y=i.width;var _=l-p;n.qos=n.qos||["bitrates","events","player","frames"];t.length=t.end-t.start;a.player_height=u;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(!r.isNil(g.mediaRequests)){a.media_requests=g.mediaRequests}if(!r.isNil(g.mediaTransferDuration)){a.media_transfer_duration=g.mediaTransferDuration}if(!r.isNil(g.mediaBytesTransferred)){a.media_bytes_transferred=g.mediaBytesTransferred}if(!r.isNil(g.bandwidth)){a.measured_bps=g.bandwidth}if(!r.isNil(g.mediaSecondsLoaded)){a.media_seconds_loaded=g.mediaSecondsLoaded}}var b=_/d*1e3;var T=t.end-t.start;var S=100;var j=Math.floor((T-b)/S)*S/1e3;if(f>0){a.rebuffering_count=f}if(j>0){a.rebuffering_seconds=j}if(s){var k=0;for(var E=0;E<s.length;E++){var w=s.start(E);var C=s.end(E);if(l>=w&&l<=C){k=C-l;break}}a.forward_buffer_seconds=k}if(_<1&&!a.rebuffering_seconds){return null}var A=this.history_.filter(function(e){return e.name==="licenserequestattempted"&&e.time>=t.start&&e.time<t.end});if(A.length){a.license_request_attempts=A.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"]=I(p,l);a.range=v+".."+m}return this.send(a,n)};s.sendVideoComplete=function e(t){if(t===void 0){t={}}var i=P(t,{event:"video_complete"});D(this.player_,i);t.streamCount=this.streamCount_;return this.send(i,t)};s.sendError=function e(t){if(t===void 0){t={}}var i=this.player_.error();if(!i){return null}var n=P(t,{event:"error"});var a=r.isFn(this.player_.errors)&&r.isFn(this.player_.errors.getAll)&&this.player_.errors.getAll()||{unknown:{type:"MEDIA_ERR_UNKNOWN"}};if(i&&a.hasOwnProperty(String(i.code))){n.error_code=a[String(i.code)].type}else if(i.type!==undefined){n.error_code=i.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,i){if(i===void 0){i={}}var r=P(i,{event:"catalog_request",url:t});return this.sendCatalog_(r,i)};s.sendCatalogRequestError=function e(t,i){if(i===void 0){i={}}var r=P(i,{event:"catalog_request_error",url:t});if(i.error){i.error=n(i.error,["code","message","type"])}return this.sendCatalog_(r,i)};s.sendCatalogResponse=function e(t,i){if(i===void 0){i={}}var r=P(i,{event:"catalog_response",url:t});r.time=Date.now();r.response_time_ms=r.time-this.history_.last("catalog_request");return this.sendCatalog_(r,i)};s.sendAdEnd=function e(t){if(t===void 0){t={}}var i=y(this.player_);var r=this.currentAdSequence_["ads-ad-started"];var n=this.currentAdSequence_.adBreakIndex;if(i.plugin!==undefined){if(i.adType==="preroll"&&r.length>0&&r[0].length>0){var a=this.history_.first("play",true);i.prerollDelay=r[0][0]-a;i.firstPlayInSession=a}i.adsRequest=this.currentAdSequence_["ads-request"];i.adsResponseReceived=this.currentAdSequence_["ads-response-received"];i.adsLoading=this.currentAdSequence_["ads-loading"][n];i.adsAdStarted=this.currentAdSequence_["ads-ad-started"][n];i.adsAdEnded=this.currentAdSequence_["ads-ad-ended"][n]}else{i.plugin="unknown"}var s={event:"ad_end",web_ad_info:JSON.stringify(i)};t.streamCount=this.streamCount_;return this.send(D(this.player_,P(t,s)),t)};s.sendAdHardTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(D(this.player_,P(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_,P(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_,P(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_,P(t,{event:"play_request"})),t)};s.sendPlayerInit=function e(t){if(t===void 0){t={}}return this.send(P(t,{event:"player_init"}),t)};s.sendPlayerLoad=function e(t){if(t===void 0){t={}}return this.send(P(t,{event:"player_load"}),t)};return a}();var N=function(e){var t=e.bcAnalyticsLogger&&e.bcAnalyticsLogger();var i=function e(){return t&&t.add.apply(t,arguments)};return i};function U(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var M=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 i=e[e.length-1];if(t!==i){e.push(t)}return e},[])};var F=function e(t){return t.reduce(function(e,t){var i=e[e.length-1];if(i){if(i.end+1===t){i.end=t}else{e.push({start:t,end:t})}}else{e.push({start:t,end:t})}return e},[])};var H=function e(t){return t.map(function(e){var t=e.start,i=e.end;var r=i-t;if(r>0){return{start:t,end:i-1,remainder:i}}return{start:t,end:i,remainder:i}})};var V=function e(t){var i=[];var r=t.shift()||{},n=r.start,a=r.end,s=r.remainder;while(M(n)&&M(a)&&M(s)&&n===a&&n===s){var o=t.shift()||{};n=o.start;a=o.end;s=o.remainder}if(t.length===0){i.push(s)}for(var l=0;l<t.length;l++){var u=t[l],c=u.start,d=u.end,f=u.remainder;for(var h=c;h<=(f||d);h++){i.push(h)}}return{start:n,end:a,remainders:i,ranges:t.length}};var q=function e(t){return V(H(F(B(t))))};var W=1;function z(){return W++}var G=[];var Y=function e(t,i,r,n,a){if(a===void 0){a=true}var s=[].concat(r).sort();if(i!=="removeEventListener"){t.off(s,n)}
1else{s.forEach(function(e){t.removeEventListener(e,n)})}if(!a){return}var o=G.length;var l=function e(){var i=G[o];if(i.context===t&&(i.fn.guid===n.guid||i.fn===n)&&s.every(function(e,t){return i.events[t]})){G.splice(o,1);return"break"}};while(o--){var u=l();if(u==="break")break}};var K=function e(){var t=G.length;while(t--){var i=G.shift(),r=i.context,n=i.mode,a=i.events,s=i.fn;var o="off";if(n==="addEventListener"){o="removeEventListener"}Y(r,o,a,s,false)}};var X=function e(t,i,r,n){var a=[].concat(r).sort();var s={events:a,fn:n,mode:i,context:t};if(i==="one"||i==="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,i=new Array(t),r=0;r<t;r++){i[r]=arguments[r]}return n.apply(this,i)};if(!n.guid){n.guid=z()}s.fn.guid=n.guid}G.push(s);if(i==="addEventListener"){s.events.forEach(function(e){s.context.addEventListener(e,s.fn)})}else{s.context[s.mode](s.events,s.fn)}};var J=function e(){var t=G.slice(0);K();t.forEach(function(e){var t=e.context,i=e.mode,r=e.events,n=e.fn;X(t,i,r,n)})};var Q=1e4;var Z=function e(t){return Boolean(t.onceux&&t.onceux.currentTime&&t.onceux.timeline)};var $=function(e){U(t,e);function t(t,i){var r;r=e.call(this)||this;r.player_=t;r.logger_=i;r.stateBySrc_={};r.lastStateRecord_=0;
1r.disposed_=false;return r}var r=t.prototype;r.logger=function e(){};r.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 i=this.player_.tech_&&this.player_.tech_.hls;this.stateBySrc_[t].stats=i&&i.stats||null;return this.stateBySrc_[t]};r.clearStateBySrc=function e(t){if(t===void 0){t=this.player_.currentSrc()}delete this.stateBySrc_[t]};r.recordState=function e(){var t=this.player_;var i=this.stateBySrc();i.mediainfo=t.mediainfo;i.playbackEndTime=t.currentTime();i.times.push(i.playbackEndTime);if(Z(t)){i.duration=t.onceux.timeline.contentDuration}else{i.duration=t.duration()}i.buffered=t.buffered();i.playbackRate=t.playbackRate()};r.isTracking=function e(){return!!this.timerId_};r.start=function e(t){var i=this;if(t===void 0){t={}}if(this.disposed_){return}var r=t,n=r.reason,a=r.src;if(!a){a=this.player_.currentSrc()}var s=this.stateBySrc(a);s.playbackStartTime=s.playbackEndTime=this.player_.currentTime();if(Z(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 i.stop({src:a,reason:"engagement timer fired"})},Q);return this};r.prepareState_=function e(t){var r=this.player_;var n=this.stateBySrc(t);n.height=Math.round(r.currentHeight());n.width=Math.round(r.currentWidth());var a=r.tech_&&r.tech_.hls;if(a&&a.playlists&&a.playlists.media()){var s=a.playlists.media();var o=n.rendition={url:s.resolvedUri,mimeType:r.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=r.getVideoPlaybackQuality();if(n.mediainfo){var l={};Object.keys(n.mediainfo).forEach(function(e){if(!/_/.test(e)){l[e]=n.mediainfo[e]}});n.mediainfo=l}n.times.push(r.currentTime());var u=q(n.times),c=u.start,d=u.end,f=u.remainders,h=u.ranges;n.times=f;return i.mergeOptions({rangeExtras:h,rangeStart:c,rangeEnd:d},n)};r.stop=function e(t){var i=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 r=this.stateBySrc(t.src);var n=(r.duration-r.playbackEndTime)*1e3;if(!this.player_.ended()&&n<1500){this.timerId_=true;X(this.player_,"one","ended",function(){i.recordState();i.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};r.dispose=function e(){this.disposed_=true;this.stop({ignoreAdState:true,reason:"player disposed"});this.off();return this};return t}(i.EventTarget);var ee=["progress","seeking","suspend","timeupdate"];var te=["seek","stable","unstable"];var ie=["adend","adscanceled","adserror","adskip","adsready","adstart","adtimeout","contentplayback","contentupdate","nopostroll","nopreroll","readyforpreroll"];var re=[].concat(i.getTech("Html5").Events);var ne=re.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 le=function(){function e(e){this.logger_=e;this.events_=[]}var t=e.prototype;t.add=function e(t,r,n){if(r===void 0){r=Date.now()}var a=i.mergeOptions(n,{name:t,time:r});this.events_.push(a);return r};t.record=function e(t,i){var r=Date.now();this.add(t,r,{adState:f(i),isInAdState:m(i),networkState:se[i.networkState()],readyState:oe[i.readyState()]});return r};t.reset=function e(){this.events_.length=0};t.filter=function e(t){if(!r.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,i){for(var r=0;r<this.events_.length;r++){var n=this.events_[r];if(!i&&n.isInAdState){continue}if(n.name===t){return n.time}}};t.last=function e(t,i){var r=this.events_.length;while(r--){var n=this.events_[r];if(!i&&n.isInAdState){continue}if(n.name===t){return n.time}}};return e}();var ue=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.9.1";var de={production:"https://metrics.brightcove.com/v2/tracker",qa:"https://metrics.juju.qa.brightcove.com/v2/tracker",staging:"https://metrics.juju.staging.brightcove.com/v2/tracker"};
1var fe=function e(t,i,n){Object.keys(n).forEach(function(e){i[e]=String(i[e]||"");if(e==="accountId"&&!r.isNonEmptyStr(i[e])){i[e]=String(i.account||"")}if(!r.isNonEmptyStr(i[e])){i[e]=t.getAttribute("data-"+n[e])||""}});return i};var he=function t(i,n){var a=fe(i.el(),n,{accountId:"account",applicationId:"application-id",embedId:"embed",playerId:"player",playerName:"name",usage:"usage"}),s=a.accountId,o=a.applicationId,l=a.embedId,u=a.playerId;if(!r.isNonEmptyStr(n.player)){if(e.location.hostname==="players.api.brightcove.com"){n.player="players.api.brightcove.com/"+u+"_"+l;return}n.player="players.brightcove.com/"+s+"/"+u+"_"+l;if(o){n.player+="/"+o}}if(o){if(r.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(r){if(typeof r==="boolean"){i.log.warn("The __iframe__ option should only be used in tests!");return r}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 l=false;var u={};a=i.mergeOptions(a);a.env=de.hasOwnProperty(a.env)?a.env:"production";he(this,a);var c=N(this);var d=new $(this,c);var p=new le(c);var y=new ue;var _=r.isNonEmptyStr(a.usage)?a.usage.split(","):[];_.forEach(function(e){y.put(e)});var b=new L(this,p,r.isNonEmptyStr(a.analyticsUrl)?a.analyticsUrl:de[a.env],{logger:c,user:a.user,corpCommsApp:a.corpCommsApp,device:a.device});b.defaultParams(function(){var i={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__)){i.destination=t.referrer;if(r.isNonEmptyStr(a.referrer)){i.source=a.referrer}else{try{i.source=e.parent.document.referrer}catch(e){i.source=null}}}return i});X(this,"on","pluginsetup:ads",J);this.bcAnalytics={client:b,engager:d,history:p,settings:a,VERSION:ce};X(this,"on","usage",function(e){if(!e.name){return i.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)});var S=function e(){y.put("unload");d.stop({fromUnload:true,ignoreAdState:true,reason:"unload called"})};X(e,"addEventListener","unload",S);var j=function e(t){if(!g(t,s)){return}var i=p.first("loadstart",v(s));var r=p.first("play");var n=p.last("playing");if((r||n)&&!d.isTracking()&&!s.paused()){d.start({period:{start:r||n},reason:"workflow detected that it is playing"})}if(b.timeOfImpression&&b.timeOfView){return}u.workflow=u.workflow||s.setTimeout(function(){u.workflow=null;i=p.first("loadstart",v(s));r=p.first("play");n=p.last("playing");if((i||r)&&!b.timeOfImpression){b.sendVideoImpression({params:{time:Math.min(i||Infinity,r||Infinity)}})}if(i&&n&&!b.timeOfView){b.sendVideoView({params:{time:n}})}},1)};d.on("engagement",function(t){var i=t.engagement,r=i.fromUnload,n=i.ignoreAdState,a=i.period,o=i.state;var l=m(s);var u={useSendBeaconOnly:r,params:{time:a.end}};if(o.rangeExtras>=2){y.put("disco-engmnt")}var c=y.peek();if(c&&c.length){u.params.usage=c.map(e.encodeURIComponent).sort().join(",")}if(!l||n){b.qos.append("frames",o.videoPlaybackQuality);if(b.sendVideoEngagement(a,o,u)&&!s.paused()){if(l){return}y.flush();d.start({reason:"sent engagement and still playing"})}}});X(this,"on","dispose",function(){K();y.put("disposed");d.dispose()});X(this,"on",ne.concat(ie,te).concat("sourceunstable"),function(e){p.record(e.type,s)});X(this,"on",ne.concat("ads-ad-started"),function(e){b.qos.append("event",m(s)?"ad":"content",e.type)});X(this,"on",["loadedmetadata","resize"],function(){b.qos.append("player",pe(s))});X(this,"on","fullscreenchange",function(){var e=Date.now();u.fullscreen=s.setTimeout(function(){u.fullscreen=null;b.qos.append("player",pe(s),e)},500)});X(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})}});X(this,"on","ready",function(){X(s.tech_,"on","usage",function(e){if(!e.name){return i.log.warn("Ignored usage event without a `name` parameter")}y.put(e.name)}
1);X(s.tech_,"on","bandwidthupdate",function(){b.qos.append("bitrate",{bitrates:s.tech_.hls.bandwidth,throughput:Math.round(s.tech_.hls.throughput)})});X(s.tech_,"on","liveresync",function(){s.trigger({type:"usage",name:"hls-live-resync"})});X(s.tech_,"on","videounderflow",function(){s.trigger({type:"usage",name:"hls-video-underflow"})});X(s.tech_,"on","licenserequestattempted",function(){p.add("licenserequestattempted")});X(s,"on","loadedmetadata",function(){var e=s.textTracks();for(var t=0;t<e.length;t++){if(e[t].label==="segment-metadata"){(function(){var i=e[t];var r=void 0;X(i,"addEventListener","cuechange",function(){var e=i.activeCues[0];if(e){var t=s.tech_.hls.playlists.master.playlists[e.value.playlist];if(r!==t.uri){r=t.uri;if(t.attributes&&t.attributes.BANDWIDTH){b.qos.append("bitrate",{rendered:t.attributes.BANDWIDTH})}}}})})()}}})});X(this,"on","waiting",function(e){if(!l&&!m(s)){d.stateBySrc().rebufferingCount++}});X(this,"on","sourcechanged",function(e,t){var i=t.interimEvents;var r=i[0].event;var n=function e(){if(!l&&!m(s)){d.recordState()}};if(t.from){d.stop({reason:"changing sources",period:{end:i[0].time},ignoreAdState:true,src:t.from});d.clearStateBySrc(t.from)}o=false;l=false;b.resetTimesOf();p.reset();i.forEach(function(e){return p.add(e.event.type,e.time)});j();X(s,"onPerSrc","timeupdate",n);X(s,"onePerSrc","sourceunstable",function(){if(f(s)==="content-resuming"){return}var e=s.currentSrc();d.stop({ignoreAdState:true,reason:"sourceunstable",src:e});if(!m(s)){Y(s,"off","timeupdate",n)}});X(s,"onPerSrc",["loadstart","play","playing"],j);X(s,"onPerSrc",["pause","ratechange"],function(e){if(!l&&!m(s)&&!s.ended()){d.stop({reason:'saw "'+e.type+'"'});if(s.paused()){X(s,"onePerSrc","playing",function(){d.start({reason:"playback began after a pause"})})}else if(e.type==="ratechange"){u.ratechange=s.setTimeout(function(){u.ratechange=null;d.start({reason:"the playback rate changed"})},1)}}});X(s,"onPerSrc","unstable",function(){if(!l&&!m(s)){l=true;d.stop({reason:"seeking"})}});X(s,"onPerSrc","seek",function(){if(l&&!m(s)){l=false;d.start({reason:"stopped seeking"})}});X(s,"onePerSrc","adstart",function(){if(!h(s)){b.sendVideoImpression({params:{time:p.last("adstart",true)-100}})}});X(s,"onPerSrc","adstart",function(){o=s.ended();d.stop({ignoreAdState:true,period:{end:p.last("adstart",true)},reason:"saw adstart"})});X(s,"onePerSrc","adend",function(){if(!s.paused()&&!s.ended()){j()}});X(s,"onPerSrc","adend",function(){if(!o){d.start({reason:'saw "adend"'})}});X(s,"onePerSrc","ended",function(){d.stop({reason:"end of content"});b.sendVideoComplete()})});X(this,"on","catalog_request",function(e){p.record(e.type,s);b.sendCatalogRequest(e.url)});X(this,"on","catalog_request_error",function(e){p.record(e.type,s);b.sendCatalogRequestError(e.url,{error:e.error,xhr:e.response})});X(this,"on","catalog_response",function(e){p.record(e.type,s);b.sendCatalogResponse(e.url,{xhr:e.response})});X(this,"on","play",function(e){if(m(s)){return}var t={params:{time:Date.now()}};if(s.perSourceBehaviors.isSrcStable()){b.sendPlayRequest(t)}else{X(s,"one","sourcechanged",function(){b.sendPlayRequest(t)})}});X(this,"on","error",function(){if(!m(s)){b.sendError()}});X(this,"on","adstart",function(e){b.sendAdStart();u.perSrcDisable=s.setTimeout(function(){u.perSrcDisable=null;s.perSourceBehaviors.disable()},1)});X(this,"on","adend",function(e){b.sendAdEnd();if(u.perSrcDisable){s.clearTimeout(u.perSrcDisable)}else{s.perSourceBehaviors.enable()}});X(this,"on","adtimeout",function(){b.sendAdTimeout()});X(this,"on","ad-hard-timeout",function(){b.sendAdHardTimeout()});X(this,"on",ae,function(e){T(b,e.type,Date.now())});b.qos.append("mr",a.mr);b.sendPlayerInit();b.sendError();X(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 i=function e(){s.trigger({type:"usage",name:"document-"+t.visibilityState})};
1X(t,"addEventListener","visibilitychange",i)}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(i.registerPlugin){i.registerPlugin("bcAnalytics",me)}else{i.plugin("bcAnalytics",me)}return me})})();(function(){if(l.getPlugin("errors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document")):typeof i==="function"&&i.amd?i(["video.js","global/document"],t):(e=e||self,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 i="4.3.2";var r=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 l;var u;var c;var d=[];var f=function t(i){o.errors=e.mergeOptions(o.errors,i);Object.keys(o.errors).forEach(function(e){var t=o.errors[e];if(!t.type){t.type=e}})};f();var h=function e(){a.clearTimeout(u);if(c){c=false;a.removeClass("vjs-waiting")}u=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}c=true;a.addClass("vjs-waiting")},1e3);a.clearTimeout(l);l=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(d.length){t=d.shift();a.off(t[0],t[1])}a.clearTimeout(l);a.clearTimeout(u)};var v=function e(t,i){var r=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()}}i.call(this)};a.on(t,r);d.push([t,r])};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 i(){var n="";var s=a.error();var l=t.createElement("div");var u="";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&&r&&!r.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 d=a.getChild("errorDisplay");l.className="vjs-errors-dialog";l.id="vjs-errors-dialog";u='<div class="vjs-errors-content-container">\n <h2 class="vjs-errors-headline">'+this.localize(s.headline)+'</h2>\n <div class="vjs-errors-code"><b>'+this.localize("Error Code")+":</b> "+(s.type||s.code)+"</div>
1\n "+n+"\n </div>";var f=d.closeable(!("dismiss"in s)||s.dismiss);if(f){u+='<div class="vjs-errors-ok-button-container">\n <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n </div>";l.innerHTML=u;d.fillWith(l);d.contentEl().firstChild.appendChild(d.getChild("closeButton").el());var h=d.el().querySelector(".vjs-errors-ok-button");a.on(h,"click",function(){d.close()})}else{l.innerHTML=u;d.fillWith(l)}if(a.currentWidth()<=600||a.currentHeight()<=250){d.addClass("vjs-xs")}d.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(i){_();n(a,e.mergeOptions(s,i))};b.extend=function(e){return f(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","contenterror","error"],y);a.ready(function(){a.addClass("vjs-errors")});if(!a.paused()){m()}b.VERSION=i;a.errors=b};var l=function t(i){o(this,e.mergeOptions(s,i))};["extend","getAll"].forEach(function(t){l[t]=function(){e.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}});l.VERSION=i;a("errors",l);return l})})();(function(){if(l.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 i==="function"&&i.amd?i(["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,i,r){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;r=r&&r.hasOwnProperty("default")?r["default"]:r;var n="3.32.3";var a="video";var s="playlist";var o="search";var l="lazySequence";var u="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:l}];var d=function e(t,i,r){for(var n=0;n<c.length;n++){var a=c[n];var o=a[t];if(i[o]){var l={id:i[o],type:a.type};if(l.type===s){l.playlistVideoId=r}return l}}};var f=function i(r,n,a){var s=n.options_;var u=Boolean(n.el().ownerDocument.querySelector(".bc-iframe"));var f=t.qs();a=a?f.parse(a):f.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!!r[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=u&&d("query",a,a.playlistVideoId)||d("attr",s,s["data-playlist-video-id"]||a.playlistVideoId)||d("config",r,a.playlistVideoId||r.playlistVideoId);if(!h){return}
1if(typeof h.id==="string"&&(h.type===o||h.type===l)){var p=h.id;try{h.id=JSON.parse(p)}catch(t){if(h.type===l){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 i=r[e];if(!t.isNonEmptyStr(i)){return}if(t.isObj(h.id)){h.id[e]=i}else if(Array.isArray(h.id)){h.id.forEach(function(t){t[e]=i})}else{h[e]=r[e]}});return h};var h=function e(i){if(!t.isFn(i.errors)||!t.isFn(i.errors.extend)){return}i.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."},VIDEO_CLOUD_ERR_TOKEN_REQUIRED:{headline:"A JWT is required, but was not provided."},VIDEO_CLOUD_ERR_TOKEN_INVALID:{headline:"The JWT provided did not pass validation."},VIDEO_CLOUD_ERR_SERVER:{headline:"There was a server error that prevented playback."}})};var p={400:{AD_CONFIG_NOT_FOUND:"VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND"},401:{TOKEN_REQUIRED:"VIDEO_CLOUD_ERR_TOKEN_REQUIRED",TOKEN_VALIDATION:"VIDEO_CLOUD_ERR_TOKEN_INVALID"},403:{ACCESS_DENIED:{DOMAIN:"PLAYER_ERR_DOMAIN_RESTRICTED",CLIENT_IP:"PLAYER_ERR_IP_RESTRICTED",CLIENT_GEO:"PLAYER_ERR_GEO_RESTRICTED",OFFERS:"PLAYER_ERR_OFFER_RESTRICTED",TAGS:"PLAYER_ERR_TAG_RESTRICTED"},VIDEO_NOT_PLAYABLE:"VIDEO_CLOUD_ERR_NOT_PLAYABLE",PLAYLIST_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",PLAYLIST_NOT_FOUND:"VIDEO_CLOUD_ERR_RESOURCE_NOT_FOUND"},500:{SERVER_ERROR:"VIDEO_CLOUD_ERR_SERVER"},502:{SERVER_ERROR:"VIDEO_CLOUD_ERR_SERVER",VIDEO_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",VIDEO_URLS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",PLAYLIST_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",ACCOUNT_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",PLAYBACK_RIGHT_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",LICENSE_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",OFFERS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER",RIGHTS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_SERVER"},503:{SERVICE_UNAVAILABLE:"VIDEO_CLOUD_ERR_SERVER"},504:{SERVER_TIMEOUT:"VIDEO_CLOUD_ERR_SERVER"}};var v=function e(i,r){var n=r.shift();if(t.isNonEmptyStr(i[n])){return i[n]}if(!n||!i[n]){return"unknown"}return e(i[n],r)};var m=function e(t,i){i=Array.isArray(i)?i[0]:i||{};return{code:v(p,[t,i.error_code,i.error_subcode])}};var g=function t(i,r,n){if(n.embedHasPoster){i.poster=r.options_.poster}if(n.embedHasSources){i.sources=r.options_.sources}if(n.embedHasTracks){i.textTracks=r.options_.tracks}if(i.textTracks&&i.textTracks.length>0&&e.browser.IS_ANY_SAFARI){r.$(".vjs-tech").setAttribute("crossorigin","anonymous")}return i};var y=function e(t,i){return function(e,r){if(e){e.data=r;t.catalog.error=e;t.error(m(e.status,r));return t.trigger("bc-catalog-error")}t.ready(function(){return t.catalog.load(i(r))})}};var _=function t(i,r,n){if(i===a){return y(r,function(e){return g(e,r,n)})}return y(r,function(t){var a=g({},r,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&&i===s){for(var l=0;l<t.length;l++){if(t[l].id===n.playlistVideoId||"ref:"+t[l].referenceId===n.playlistVideoId){t.startingIndex=l;break}}}return t})};var b=function e(){return Number.MAX_SAFE_INTEGER||Math.pow(2,53)-2};var T=function e(t,i){var r=t.cuePoints;var n=r[i];var a;for(i++;i<r.length;i++){if(r[i].time>n.time){a=r[i];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 i=t.remoteTextTracks();if(i){var r=i.length;while(r--){t.removeRemoteTextTrack(i[r])}}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 j=function e(t,r){S(t);if(!r.cuePoints){return}var n=t.mediaCuePointsTrack();var a=i.VTTCue||i.vttjs&&i.vttjs.VTTCue||i.TextTrackCue;for(var s=0;s<r.cuePoints.length;s++){var o=r.cuePoints[s];var l=new a(o.startTime,o.endTime,o.type);l.originalCuePoint=o;n.addCue(l)}n.mode="hidden"};var k=function e(t,i,r){var n=0;for(;n<t.length;n++){if(i(t[n])){return t[n]}}return r};function E(e){var t=E.windowLocationProtocol();var i=function e(i){return i.src&&i.src.indexOf(t)===0};if(e&&e.length&&e.length>0){return k(e,i,e[0]).src}}E.windowLocationProtocol=function(){return i.location.protocol};var w=function e(t,i){return"https://"+t+".api."+(i?i+".":"")+"brightcove.com/playback/v1/"};var C={production:{papi:w("edge"),epa:w("edge-auth")},qa:{papi:w("edge","qa"),epa:w("edge-auth","qa")},staging:{papi:w("edge","staging"),epa:w("edge-auth","staging")}};var I=function e(t){return i.encodeURIComponent(t)};var A=function e(t){return typeof t==="string"&&/^BCpk/.test(t)};var x=function e(i){var r={ad_config_id:"adConfigId",config_id:"deliveryConfigId"};var n=["ad_config_id","config_id","tveToken"];if(i.type!==a){n.push("limit");n.push("offset")}if(i.type===o){n.push("q");n.push("sort")}var s={};
1n.forEach(function(e){var t=r[e]||e;if(i[t]){s[e]=i[t]}});var l=t.qs().stringify(s);return l?"?"+l:""};var O=function e(i){var r=i.accountId,n=i.env,a=i.type;if(!n){n="production"}var l;if(t.isNonEmptyStr(i.baseUrl)){l=i.baseUrl}else if(A(i.policyKey)){l=C[n].papi}else{l=C[n].epa}if(l.slice(-1)==="/"){l=l.slice(0,-1)}var c;c=l+"/accounts/"+I(r)+"/"+(a===s?"playlists":"videos");if(a!==o){c+="/"+I(i.id)}if(a===u){c+="/related"}c+=x(i);return c};var P=function i(r,n,l){if(l===void 0){l=function e(){}}var c=n.accountId,d=n.deliveryConfigId,f=n.adConfigId,h=n.id,p=n.bcovAuthToken,v=n.policyKey,m=n.q,g=n.type;if(!c||!g){return l(new Error("accountId and type are required"))}if(g===o&&!m){return l(new Error("q is required when performing a search"))}else if(g!==o&&!h){return l(new Error("id is required when getting a video or playlist"))}var y=O(n);var _=function e(i,n){r.trigger(t.assign({type:"catalog_"+i,accountId:c,deliveryConfigId:d,adConfigId:f,playlistId:g===s?h:undefined,related:g===u?h:undefined,search:g===o?m:undefined,url:y,videoId:g===a?h:undefined},n))};var b=function e(t,i,r){return _("request_error",{error:t,response:i,body:r})};_("request");var T={};if(A(v)){T.Accept="application/json;pk="+v}else if(p){T.Authorization="Bearer "+p}var S=e.xhr({headers:T,json:true,url:y},function(e,t,i){if(e){b(e,S,i);return l(e,i)}if(S.status>=400){b(new Error("Request Failed"),S,i);return l(S,i)}_("response",{response:S});l(null,i)});var j=S.onabort.bind(S);S.onabort=function(){var e=new Error("Request Aborted");j();b(e,S,null);return l(e,null)};return S};var D=function e(){var t=i.GestureEvent;return!!(t&&i.WebKitMediaKeys&&i.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4"))};var R=function t(){return i.navigator.requestMediaKeySystemAccess&&!e.browser.IS_IOS&&(e.browser.IS_FIREFOX||e.browser.IS_CHROME)};var L=function e(t){return t==="application/vnd.apple.mpegurl"||t==="application/x-mpegURL"};var N=function t(i){var r=e.parseUrl(i);return r.hostname.indexOf("boltdns.net")!==-1&&r.pathname.indexOf("/aes128/")!==-1};var U=function e(t){return t.isSecureContext||!/^http:/.test(t.location.href)};var M={isSafariWithFairplaySupport:D,isBrowserWithWidevineSupport:R,isHlsType:L,isBoltEncryptedHls:N,preferHttps:U};var B="https://fps.brightcove.com/v1/application_certificate";var F="com.apple.fps.1_0";var H=function e(t){return i.btoa(String.fromCharCode.apply(null,t))};var V=function e(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))};var q=function e(t){var i=t.source,r=t.publisherId,n=t.applicationId;var a=i.key_systems[F].certificate_url;if(a){return a}if(n&&r){return B+"/"+r+"/"+n}return null};var W=function t(i,r){var n=q({source:i.source,publisherId:i.publisherId,applicationId:i.applicationId});e.xhr({uri:n,responseType:"arraybuffer"},function(e,t,i){if(e){r(e);return}r(null,new Uint8Array(i))})};var z=function e(t,i){return V(i).split("//")[1]};var G=function t(i){return function(t,r,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:i,method:"POST",responseType:"arraybuffer",json:{publisher_id:t.publisherId,application_id:t.applicationId,key_id:r.split("/")[3],server_playback_context:H(n)},headers:s},function(e,t,i){if(e){a(e);return}if(t.statusCode>=400&&t.statusCode<=599){a({});return}a(null,i)})}};var Y={getCertificateUri:q,getCertificate:W,getContentId:z,createGetLicenseFunc:G,base64EncodeUint8Array:H,FAIRPLAY_KEY_SYSTEM:F};var K=function e(t){if(t===void 0){t=[]}return t.filter(function(e){return e.keySystems&&e.keySystems[Y.FAIRPLAY_KEY_SYSTEM]})};var X=function e(t,i,r){var n=K(i);if(!n.length||!t.eme){r();return}var a=t.eme.options||{};var s=0;var o=[];var l={};var u=function e(t){var i=n[t];var u=Y.getCertificateUri({source:i,publisherId:a.publisherId,applicationId:a.applicationId});if(!u){return"continue"}if(l[u]){l[u].push(i);return"continue"}s++;l[u]=[i];i.keySystems[Y.FAIRPLAY_KEY_SYSTEM].getCertificate({source:i,publisherId:a.publisherId,applicationId:a.applicationId},function(e,t){if(e){o.push({message:"Unable to resolve FairPlay certificate",error:e})}else{var i=l[u];for(var n=0;n<i.length;n++){var a=i[n];a.keySystems[Y.FAIRPLAY_KEY_SYSTEM].getCertificate=function(e,i){i(null,t)}}}s--;
1if(!s){if(o.length){r(o);return}r()}})};for(var c=0;c<n.length;c++){var d=u(c);if(d==="continue")continue}};var J=function e(t){if(!M.isHlsType(t.type)||!t.key_systems||!t.key_systems[Y.FAIRPLAY_KEY_SYSTEM]){return null}var i=t.key_systems[Y.FAIRPLAY_KEY_SYSTEM];var r=i.key_request_url;var n={};n[Y.FAIRPLAY_KEY_SYSTEM]={getCertificate:Y.getCertificate,getLicense:Y.createGetLicenseFunc(r),getContentId:Y.getContentId};return n};var Q=function e(t){return J(t)};var Z={getKeySystemOptions:Q,getFairPlaySources:K,resolveFairPlayCertificates:X};var $=function e(t,i){i=i||t&&t.mediainfo||{};return t&&t.hasPlugin&&t.hasPlugin("vr")&&i&&i.projection};var ee=50*1024*1024;var te=3*1024*1024;var ie=.5*1024*1024;var re={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 ne={1:3,2:3.2,3:4.2,4:5,5:6,6:7,7:8};var ae=function e(t,i){return i.type==="application/vnd.apple.mpegurl"&&i.key_systems&&M.isSafariWithFairplaySupport()&&t.eme&&t.eme.options};var se=function e(t,i){return i.type==="application/vnd.apple.mpegurl"&&i.key_systems&&M.isBrowserWithWidevineSupport()&&t.eme&&t.eme.options};var oe=function t(i,r,n){if(!r.src){return 9999}if(r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&(r.key_systems["com.apple.fps.1_0"]&&!ae(n,r)||r.key_systems["com.widevine.alpha"]&&!se(n,r))){return 9999}if(r.profiles&&r.profiles.match(/hbbtv/i)){return 9999}if(e.browser.IS_IOS&&r.type==="application/vnd.apple.mpegurl"&&ne[r.ext_x_version]>parseFloat(e.browser.IOS_VERSION)){return 9999}i=i[/^[^:]*/.exec(r.src)];if(!i){return 9999}return i[r.type]||9999};var le=function t(i,r,n,a){var s=ue.preferHttps()?re.https:re.http;var o;var l;if($(i,r)){o=ee}else if(e.browser.IS_IOS||e.browser.IS_ANDROID){o=ie}else{o=te}if(ue.preferMp4(i,r)){s=s.preferMp4}else if(ue.supportsNativeHls()){s=s.nativeHls}else{s=s.noNativeHls}l=oe(s,n,i)-oe(s,a,i);if(l){return l}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){l=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){l=n.ext_x_version?-1:1}}return l};function ue(i,r,n){if(n===void 0){n={}}var a=r.sources||[];var s=[];var o=n,l=o.bcovAuthToken;if(l&&!t.isNonEmptyStr(l)){e.log.error("The bcovAuthToken catalog property must be a string");l=null}for(var u=0;u<a.length;u++){var c=a[u];if(l&&c.key_systems){c.emeHeaders={"BCOV-Auth":l}}if(c.src&&c.container==="MP4"){c.type="video/mp4"}else if(c.src&&(c.container==="M2TS"||M.isHlsType(c.type))){c.type="application/vnd.apple.mpegurl";if(ae(i,c)){c.keySystems=Z.getKeySystemOptions(c)}if(M.isBoltEncryptedHls(c.src)&&l){if(c.vmap&&i.hasPlugin("ssai")){c.bcovAuthToken=l}else{var d=e.parseUrl(c.src);var f="bcov_auth="+l;if(!d.search){f="?"+f}else if(!(d.search[d.search.length-1]==="&")){f="&"+f}c.src+=f}}}s.push(c)}return s.sort(le.bind(null,i,r))}ue.supportsNativeHls=function(){var t=r.createElement("video");var i=e.options.hls&&e.options.hls.overrideNative;if(t&&t.canPlayType){return!i&&/probably|maybe/i.test(t.canPlayType("application/vnd.apple.mpegurl"))}return false};ue.preferHttps=function(){return M.preferHttps(i)};ue.preferMp4=function(t,i){return e.browser.IS_ANDROID&&e.browser.ANDROID_VERSION<5||$(t,i)};var ce={};var de=function e(i,r,n){var a=t.assign({},ce);
1if(i&&!t.isObj(i)){a.id=i}else{t.assign(a,i);if(t.isObj(i.id)){t.assign(a,i.id);if(!i.id.hasOwnProperty("id")){delete a.id}}}if(typeof r==="string"){a.type=r}if(a.type===o){if(!a.q){a.q=a.id}delete a.id}if(typeof i.deliveryConfigId==="string"){a.deliveryConfigId=i.deliveryConfigId}if(typeof n==="string"){a.adConfigId=n}if((a.type===s||a.type===o)&&a.limit===undefined){a.limit="100"}return a};var fe=function e(i){if(i===null){ce={}}else{t.assign(ce,i)}};var he=function e(i){return t.isObj(ce)&&ce[i]||undefined};var pe=/([A-Za-z0-9])_([A-Za-z0-9])/g;var ve=function e(t){return t.replace(pe,function(e,t,i){return t+i.toUpperCase()})};var me=function t(i){var r=e.mergeOptions(i);Object.keys(r).filter(function(e){return e.match(pe)}).forEach(function(e){r[ve(e)]=r[e]});return r};var ge=function e(t,i){if(!i){return}t.mediainfo=me(i);var n=Boolean(t.el().ownerDocument.querySelector(".bc-iframe"));var a=t.mediainfo.name;if(n&&a){r.title=a}};var ye=function e(t,i){if(!i){return}t.playlistinfo=me(i);delete t.playlistinfo.videos};var _e=function e(t,i){return(t.type==="application/vnd.apple.mpegurl"||t.type==="application/dash+xml")&&i.toLowerCase()==="html5"};function be(i){var r=this;var n={accountId:r.options_["data-account"],policyKey:r.options_["data-policy-key"],bcovAuthToken:r.options_["data-bcov-auth-token"]};var u=Object.keys(n).reduce(function(e,t){if(n[t]){e[t]=n[t]}return e},{});["accountId","baseUrl","bcovAuthToken","env","policyKey"].forEach(function(e){if(i.hasOwnProperty(e)){u[e]=i[e]}});fe(u);h(r);r.on("loadstart",function(){if(!t.isFn(r.playlist)||!r.playlist()||!r.playlist().length){return}ge(r,r.playlist()[r.playlist.indexOf(r.currentSrc())])});r.on("dispose",function(){return S(r)});var c=function t(i,n){var a=Z.getFairPlaySources(i);if(!a.length){n();return}Z.resolveFairPlayCertificates(r,a,function(t){if(t){e.log("Unable to resolve FairPlay certificates",t)}n()})};var d=function t(i){if(!r.hasPlugin||!r.hasPlugin("ssai")||!i){return i}return i.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 i=function e(){var i=false;ge(r,t);if($(r)){var n=r.el().querySelector("video");n.setAttribute("crossorigin","anonymous")}r.el().setAttribute("data-video-id",t.id);r.poster(t.poster);if(t.sources){for(var a=0;a<t.sources.length;a++){if(t.sources[a].vmap!==undefined){i=true;break}}}if(i&&r.onceux!==undefined){r.onceux.loadSourcesFromCatalog(t.sources)}else{if(i){t.sources=d(t.sources)}r.src(t.sources)}j(r,t);if(t.textTracks){for(var s=0;s<t.textTracks.length;s++){r.addRemoteTextTrack(t.textTracks[s])}}};c(t.sources,i)};var v=function e(t){var i=function e(){r.on("beforeplaylistitem",function(e,t){return j(r,t)});for(var i=0;i<t.length;i++){t[i].sources=d(t[i].sources)}var n=t.startingIndex||0;ge(r,t[n]);ye(r,r.catalog.data);if($(r)){var a=r.el().querySelector("video");a.setAttribute("crossorigin","anonymous")}r.playlist(t,n)};var n=t.filter(function(e){return e.sources}).reduce(function(e,t){return e.concat(t.sources)},[]);c(n,i)};var g=function e(t,n){var a;var s=me(t);if(s.sources){s.rawSources_=s.sources;s.sources=(i.getSources||ue)(r,s,n);a=r.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&&_e(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 l=0;l<s.cuePoints.length;l++){T(s,l)}}return s};r.catalog={transformCatalogError:m,transformVideoResponse:g,mediaCuePointsTrack:function t(){if(!r.catalog.mediaCuePointsTrack.hasWarned_){e.log.warn("player.catalog.mediaCuePointsTrack() is deprecated, please use player.mediaCuePointsTrack() instead!");r.catalog.mediaCuePointsTrack.hasWarned_=true}return r.mediaCuePointsTrack()},get:function e(i,n){i=de(i);if(r.catalog.tveToken){i.tveToken=r.catalog.tveToken}r.catalog.loading++;var s;var l=new t.Promise(function(e,t){s=P(r,i,function(n,s){r.catalog.loading--;if(i.type===o&&s&&(!s.videos||!s.videos.length)){n=new Error("No videos returned from search")}if(n){n.data=s;r.catalog.error=n;return t(n)}if(!s){return e(null)}r.catalog.data=s;var l={};if(i.bcovAuthToken){l.bcovAuthToken=i.bcovAuthToken}if(i.type===a){r.catalog.sources=s.sources;r.catalog.poster=s.poster;return e(g(s,l))}var u=s.videos.filter(function(e){return!e.hasOwnProperty("errors")}).map(function(e){return g(e,l)});if(u.length){return e(u)}return t(new Error("No videos returned from playlist"))})});if(!t.isFn(n)){return l}l.then(function(e){n(null,e)}).catch(function(e){n(e,e.data)});return s},getVideo:function e(t,i,r){if(i===void 0){i=function e(){}}return this.get(de(t,a,r),i)},getSequence:function t(i,n,a){var s=this;if(n===void 0){n=function e(){}}if(!Array.isArray(i)){i=[i]}i=i.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(!i.length){n(new Error("No valid sequences"),null);return}var o=i.length;var l=new Array(i.length);return i.map(function(t,u){return s.get(de(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]}l[u]=s}if(o===0){r.catalog.data=l;var c=l.reduce(function(e,t){return t&&e.concat(t)},[]);if(!c.length){n(new Error("No data was loaded for the sequence "+JSON.stringify(i),null))}else{n(null,c)}}},a)})},getLazySequence:function e(t,i,n){var a=this;if(i===void 0){i=function e(){}}if(!Array.isArray(t)){t=[t]}var s=function e(i){return a.getSequence(t.shift(),function(r,n){if((r||!n)&&t&&t.length){return e(i)}i(r,n)},n)};var o=function e(){if(!t.length){r.off("playlistitem",e);return}var i=r.playlist;var n=i.currentIndex&&i.currentIndex()||i.currentItem&&i.currentItem()||0;var a=i.lastIndex&&i.lastIndex()||i().length-1||0;if(n!==a){return}s(function(e,t){if(e||!t){return}r.playlist(r.playlist().concat(t),n)})};r.on("playlistitem",o);return s(i)},getSearch:function e(t,i,r){if(i===void 0){i=function e(){}}return this.get(de(t,o,r),i)},getPlaylist:function e(t,i,r){if(i===void 0){i=function e(){}}return this.get(de(t,s,r),i)},load:function e(t){if(Array.isArray(t)){v(t)}else{p(t)}},autoFindAndLoadMedia:function e(t){var i=f(t,r);
1if(!i){return}t.playlistVideoId=i.playlistVideoId;var n=_(i.type,r,t);if(i.type===l){this.getLazySequence(i.id,n)}else{this.get(de(i),n)}return i},setBcovAuthToken:function i(r){if(r!==null&&!t.isNonEmptyStr(r)){e.log.warn("Authorization Token must be a valid string or null");return}fe({bcovAuthToken:r})},setPolicyKey:function i(r){if(r!==null&&!t.isNonEmptyStr(r)){e.log.warn("Policy key must be a valid string or null");return}fe({policyKey:r})},getCatalogParamDefault_:function e(t){return he(t)},loading:0}}e.registerPlugin("catalog",be);be.VERSION=n;return be})})();(function(){if(l.getPlugin("playlist")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof i==="function"&&i.amd?i(["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 i=function e(t){var i=t.playlist.autoadvance_;if(i.timeout){t.clearTimeout(i.timeout)}if(i.trigger){t.off("ended",i.trigger)}i.timeout=null;i.trigger=null};var r=function e(r,n){i(r);if(!t(n)){r.playlist.autoadvance_.delay=null;return}r.playlist.autoadvance_.delay=n;r.playlist.autoadvance_.trigger=function(){var t=function t(){return e(r,n)};r.one("play",t);r.playlist.autoadvance_.timeout=r.setTimeout(function(){i(r);r.off("play",t);r.playlist.next()},n*1e3)};r.one("ended",r.playlist.autoadvance_.trigger)};var n=function e(t){var i=t.remoteTextTracks();var r=i&&i.length||0;while(r--){t.removeRemoteTextTrack(i[r])}};var a=function e(t,i){var a=!t.paused()||t.ended();t.trigger("beforeplaylistitem",i.originalValue||i);if(i.playlistItemId_){t.playlist.currentPlaylistItemId_=i.playlistItemId_}t.poster(i.poster||"");t.src(i.sources);n(t);t.ready(function(){(i.textTracks||[]).forEach(t.addRemoteTextTrack.bind(t));t.trigger("playlistitem",i.originalValue||i);if(a){var e=t.play();if(typeof e!=="undefined"&&typeof e.then==="function"){e.then(null,function(e){})}}r(t,t.playlist.autoadvance_.delay)});return t};var s=function e(t){return!!t&&typeof t==="object"};var o=function e(t){var i=[];var r;t.forEach(function(e){if(!s(e)){r=Object(e);r.originalValue=e}else{r=e}i.push(r)});return i};var l=function e(t){var i=1;t.forEach(function(e){e.playlistItemId_=i++})};var u=function e(t,i){for(var r=0;r<t.length;r++){if(t[r].playlistItemId_===i){return r}}return-1};var c=function e(t,i){var r=t;var n=i;if(typeof t==="object"){r=t.src}if(typeof i==="object"){n=i.src}if(/^\/\//.test(r)){n=n.slice(n.indexOf("//"))}if(/^\/\//.test(n)){r=r.slice(r.indexOf("//"))}return r===n};var d=function e(t,i){for(var r=0;r<t.length;r++){var n=t[r].sources;if(Array.isArray(n)){for(var a=0;a<n.length;a++){var s=n[a];if(s&&c(s,i)){return r}}}}return-1};var f=function e(t){var i=-1;var r=t.length-1;while(++i<t.length){var n=i+Math.floor(Math.random()*(r-i+1));var a=t[n];t[n]=t[i];t[i]=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,i){if(i===void 0){i=0}if(p){throw new Error("do not call playlist() during a playlist change")}if(Array.isArray(e)){var r=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)}l(h);p=true;t.trigger({type:"duringplaylistchange",nextIndex:i,nextPlaylist:n,previousIndex:v.currentIndex_,previousPlaylist:r||[]});p=false;if(i!==-1){v.currentItem(i)}if(r){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){i(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 i=u(h,v.currentPlaylistItemId_);var r=h[i];if(r&&Array.isArray(r.sources)&&d([r],t)>-1){v.currentIndex_=i;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 d(h,e)}var t=Array.isArray(e)?e:e.sources;for(var i=0;i<t.length;i++){var r=t[i];if(typeof r==="string"){return d(h,r)}else if(r.src){return d(h,r.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}
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){r(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 i=e===void 0?{}:e,r=i.rest;var n=0;var a=h;if(r){n=v.currentIndex_+1;a=h.slice(n)}if(a.length<=1){return}f(a);if(r){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,i){h(this,t,i)};v("playlist",m);m.VERSION=p;return m})})();var d=function(e,t,i,r){var n=t.environment;var s=n.queryString;var o=n.isInBcFrame;c.perf.mark("bcInitStart");r=r||{};r.inactivityTimeout=5e3;if(e.browser.TOUCH_ENABLED){r.inactivityTimeout=0}r=e.mergeOptions(r,{nativeControlsForTouch:a(),controls:o?true:i.hasAttribute("controls"),persistTextTrackSettings:true,responsive:true,liveui:true,sourceOrder:true,controlBar:{},userActions:{hotkeys:{}}});embedVttjs=i.getAttribute("data-vttjs")||s.vttjs;if(embedVttjs&&c.isNonEmptyStr(embedVttjs)){r["vtt.js"]=embedVttjs}return r};var f=function(i,r,a){var s=a.options_;var o=r.settings;var l=r.environment;var c=l.queryString;var d=l.isInBcFrame;var f;u.patchOldIma3(i,a);a.one("beforepluginsetup:ads",function(){a.controlBar.removeChild("pictureInPictureToggle");i.getComponent("Component").prototype.fsApi_=a.fsApi_});if(!i.browser.TOUCH_ENABLED){a.addClass("vjs-mouse");if(d){i.dom.addClass(t.documentElement,"vjs-mouse")}}else if(i.browser.IS_IPHONE){a.addClass("vjs-native")}a.on("dispose",function(){a=s=null;n=[];h.videojs.log.history.clear()});(function(){var e,t=parseInt(undefined,10),i=false;a.playlist();if(t===t&&isFinite(t)&&t>=0){a.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")}}a.requestAnimationFrame(function(){var e=t.querySelector(".bc-wrap");a.addClass("vjs-plugins-ready");if(e){e.style.opacity=0}});a.on(["mouseenter","ended","touchend"],function(){a.removeClass("not-hover")});a.on("mouseleave",function(){a.addClass("not-hover");if(!a.controlBar||!a.controlBar.el()){return}if(a.controlBar.hasClass("vjs-control-bar-visible")){a.controlBar.removeClass("vjs-control-bar-visible")}});n.forEach(function(e){a.trigger({type:"usage",name:e})});a.ready(function(){if(a.bcinfo&&a.bcinfo.PLAYER_LOADER||e.brightcovePlayerLoader){a.trigger({type:"usage",name:"player-loader"})}if(a.bcinfo&&a.bcinfo.REACT_PLAYER_LOADER||e.BrightcoveReactPlayerLoader){a.trigger({type:"usage",name:"react-player-loader"})}})};var h=u.createInitializer(d,f);o.restoreFirstVideojs();return h}(window,document);if(typeof t!=="undefined"){s=document.querySelector("#"+a);if(s){(function(){var e=function(e){return(e||"0.0.0").split(".").map(function(e){return Number(e)})};var t=e(s.getAttribute("data-vjs-version"));var i=e(o.videojs.VERSION);if(i[0]>t[0]||i[0]===t[0]&&i[1]>t[1]||i[0]===t[0]&&i[1]===t[1]&&i[2]>t[2]){s.parentNode.removeChild(s);s=null;d=c.firstChild}})()}if(!s){s=f(t,d);s.id=a;s.setAttribute("data-vjs-version",o.videojs.VERSION)}d=s.nextSibling}if(typeof i!=="undefined"){n=document.querySelector("."+r);if(!n){n=f(i,d);n.className=r}}function h(){var e=[].concat(Array.prototype.slice.call(document.querySelectorAll("video")),Array.prototype.slice.call(document.querySelectorAll("video-js")));for(u=0;u<e.length;u++){l=e[u];if(l.getAttribute("data-player")==="OIWvHjhhx"&&l.getAttribute("data-embed")==="default"){if(o.videojs.getPlayer(l)){o.videojs.log("Ignoring already initialized player");continue}o(l)}}}h();return o
vendor: 3 bytes, line 1
1});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.