CINXE.COM

<!DOCTYPE html> <html lang="" class="bc-iframe"> <head> <meta charset="utf-8"> <title></title> <meta name="viewport" content="user-scalable=0, width=device-width, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <link rel="icon" href="data:;base64,iVBORw0KGgo="> <style id="bc-style-vjs"> @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/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/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"}.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-1-1,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-fluid{width:100%;max-width:100%}.video-js.vjs-1-1:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-fluid:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs){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!important;visibility:visible!important}.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}.js-focus-visible .vjs-menu :not(.vjs-selected):focus:not(.focus-visible),.video-js .vjs-menu :not(.vjs-selected):focus:not(:focus-visible){background:0 0}.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;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-audio-only-mode .vjs-control-bar,.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;pointer-events:none;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-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.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}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.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 :not(.vjs-visible-text)>.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:-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;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.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}.video-js .vjs-volume-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-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.vjs-no-flex .vjs-volume-control .vjs-mouse-display{z-index:0}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.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,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster{display:block}.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{align-items:center;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-controls-disabled .vjs-text-track-display,.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-controls-disabled video::-webkit-media-text-track-display,.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-audio-only-mode .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control{display:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{100%{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}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.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:"";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.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:" ";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto;width:initial}.video-js.vjs-layout-tiny .vjs-progress-control,.video-js.vjs-layout-x-small .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer{width:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0 24px}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px 0}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px 0;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible){outline:0}.video-js :focus:not(:focus-visible){outline:0} </style> <style class="bc-style-default-default"> .bc-player-default_default *,.bc-player-default_default :after,.bc-player-default_default :before{box-sizing:inherit;font-size:inherit;color:inherit;line-height:inherit}.bc-player-default_default{width:300px;height:150px;font-size:14px;overflow:hidden}.bc-player-default_default.vjs-fluid.vjs-16-9:not(.vjs-audio-only-mode),.bc-player-default_default.vjs-fluid:not(.vjs-audio-only-mode){padding-top:56.25%}.bc-player-default_default.vjs-fluid.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.bc-player-default_default.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.bc-iframe,.bc-iframe body,.bc-player-default_default,.bc-player-default_default .vjs-poster{background-color:#151B17}.bc-iframe,.bc-iframe .bc-player-default_default,.bc-iframe body{margin:0;width:100%;height:100%;overflow:hidden}.bc-player-default_default.vjs-fullscreen,.bc-player-default_default.vjs-fullscreen .vjs-tech{width:100%!important;height:100%!important}.bc-player-default_default .vjs-track-setting select{color:#000;background-color:#fff}.bc-player-default_default .vjs-audio-button .vjs-menu-item,.bc-player-default_default .vjs-chapters-button .vjs-menu-item,.bc-player-default_default .vjs-descriptions-button .vjs-menu-item,.bc-player-default_default .vjs-subs-caps-button .vjs-menu-item{text-transform:none}.bc-player-default_default.vjs-waiting-for-autoplay .vjs-big-play-button{opacity:0}.bc-player-default_default .vjs-progress-control .vjs-mouse-display{z-index:2}/*! @name @brightcove/player-core @version 0.31.2 @license UNLICENSED */.vjs-modal-dialog.vjs-player-info-modal{background:rgba(0,0,0,.9)}.vjs-modal-dialog.vjs-player-info-modal .vjs-modal-dialog-content{overflow:auto;display:grid;grid-template-columns:1fr 1fr;grid-gap:1em}@media screen and (max-width:640px){.vjs-modal-dialog.vjs-player-info-modal .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-modal-dialog.vjs-player-info-modal h2{font-size:1.1667em;margin:0 0 .4286em}.vjs-modal-dialog.vjs-player-info-modal table{border-bottom:1px solid #333;border-collapse:collapse;border-top:1px solid #333;margin-bottom:1.5em;width:100%}.vjs-modal-dialog.vjs-player-info-modal table.vjs-two td,.vjs-modal-dialog.vjs-player-info-modal table.vjs-two th{width:50%}.vjs-modal-dialog.vjs-player-info-modal table.vjs-three td,.vjs-modal-dialog.vjs-player-info-modal table.vjs-three th{width:33.333%}.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 #333;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}.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-default_default .vjs-control-bar{background-color:rgba(0,0,0,.6);color:#fff}.bc-player-default_default .vjs-control{color:inherit}.bc-player-default_default .vjs-mouse-display:after,.bc-player-default_default .vjs-play-progress:after{border-radius:0}.bc-player-default_default .vjs-menu-button-inline:hover,.bc-player-default_default.vjs-no-flex .vjs-menu-button-inline{width:8.35em}.bc-player-default_default .vjs-control:focus:before,.bc-player-default_default .vjs-control:hover:before{text-shadow:0 0 1em #fff,0 0 1em #fff,0 0 1em #fff}.bc-player-default_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-default_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-default_default .vjs-time-control.vjs-time-divider{width:14px}.bc-player-default_default .vjs-time-control.vjs-time-divider div{width:100%;text-align:center}.bc-player-default_default .vjs-time-control.vjs-current-time{margin-left:1em}.bc-player-default_default .vjs-time-control .vjs-current-time-display,.bc-player-default_default .vjs-time-control .vjs-duration-display{width:100%}.bc-player-default_default .vjs-time-control .vjs-current-time-display{text-align:right}.bc-player-default_default .vjs-time-control .vjs-duration-display{text-align:left}.bc-player-default_default .vjs-remaining-time{display:none}.bc-player-default_default.vjs-no-flex .vjs-time-control.vjs-remaining-time{display:none}.bc-player-default_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-default_default .vjs-play-progress,.bc-player-default_default .vjs-volume-level{background-color:#08088c}.bc-player-default_default.vjs-ad-playing .vjs-play-progress,.bc-player-default_default.vjs-ad-playing .vjs-volume-level{background-color:#ffe400}.bc-player-default_default .vjs-play-progress:before,.bc-player-default_default .vjs-volume-level:before{display:none}.bc-player-default_default .vjs-volume-level:after{display:none}.bc-player-default_default .vjs-progress-control{position:absolute;left:0;right:0;width:100%;height:1.5em;top:-1.5em}.bc-player-default_default .vjs-progress-control .vjs-load-progress,.bc-player-default_default .vjs-progress-control .vjs-play-progress,.bc-player-default_default .vjs-progress-control .vjs-progress-holder{height:100%}.bc-player-default_default .vjs-progress-control .vjs-progress-holder{margin:0}.bc-player-default_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-default_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-default_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-default_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-default_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-default_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-default_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar,.bc-player-default_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-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active:not(.vjs-audio-only-mode) .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive:not(.vjs-audio-only-mode) .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active:not(.vjs-audio-only-mode) .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive:not(.vjs-audio-only-mode) .vjs-progress-control,.bc-player-default_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive:not(.vjs-audio-only-mode) .vjs-progress-control,.bc-player-default_default.vjs-has-started.vjs-playing.vjs-user-inactive:not(.vjs-audio-only-mode) .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-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active.vjs-fullscreen .vjs-progress-control,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control,.bc-player-default_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-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-volume-vertical,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-volume-vertical,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-volume-vertical,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-default_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-menu,.bc-player-default_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-volume-vertical,.bc-player-default_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-menu,.bc-player-default_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-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar-visible .vjs-menu,.bc-player-default_default.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu,.bc-player-default_default.vjs-has-started.vjs-paused.vjs-ad-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu-item,.bc-player-default_default.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar-visible .vjs-menu{opacity:1}.bc-player-default_default.vjs-live .vjs-live-control{margin-left:1em}.bc-player-default_default.vjs-live .vjs-time-control.vjs-current-time,.bc-player-default_default.vjs-live .vjs-time-control.vjs-duration,.bc-player-default_default.vjs-live .vjs-time-control.vjs-time-divider{display:none}.bc-player-default_default .vjs-big-play-button{top:50%;left:50%;margin-left:-1em;margin-top:-1em;width:2em;height:2em;line-height:2em;border:none;border-radius:50%;font-size:3.5em;background-color:rgba(0,0,0,.45);color:#fff;-webkit-transition:border-color .4s,outline .4s,background-color .4s;-moz-transition:border-color .4s,outline .4s,background-color .4s;-ms-transition:border-color .4s,outline .4s,background-color .4s;-o-transition:border-color .4s,outline .4s,background-color .4s;transition:border-color .4s,outline .4s,background-color .4s}.bc-player-default_default .vjs-big-play-button:active,.bc-player-default_default .vjs-big-play-button:focus,.bc-player-default_default:active .vjs-big-play-button,.bc-player-default_default:hover .vjs-big-play-button{background-color:#08088c}.bc-player-default_default .vjs-menu-button-popup .vjs-menu{left:-3em}.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:transparent;width:12em;left:-1.5em;padding-bottom:.5em}.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item,.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-title{background-color:#151B17;margin:.3em 0;padding:.5em;border-radius:.3em}.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected{background-color:#08088c;color:#fff}.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:active,.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item:focus,.bc-player-default_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-default_default.vjs-ad-playing .vjs-mouse-display,.bc-player-default_default.vjs-ad-playing .vjs-mouse-display:after{display:none}.bc-player-default_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-default_default.vjs-ad-playing .vjs-picture-in-picture-control{display:none}.bc-player-default_default.vjs-no-flex .vjs-spacer{display:table-cell}.bc-player-default_default.vjs-no-flex .vjs-time-control{display:table-cell;width:4em}.bc-player-default_default.vjs-no-flex .vjs-remaining-time{display:none}.vjs-mouse.bc-player-default_default .vjs-control-bar{font-size:10px}.vjs-mouse.bc-player-default_default .vjs-progress-control{height:.5em;top:-.5em}.vjs-mouse.bc-player-default_default .vjs-progress-control:hover{height:1.5em;top:-1.5em}.bc-player-default_default select{width:inherit}.bc-player-default_default.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.bc-player-default_default.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:block}.bc-player-default_default.video-js.vjs-play-button-hover-glow .vjs-big-play-button:active,.bc-player-default_default.video-js.vjs-play-button-hover-glow .vjs-big-play-button:focus,.bc-player-default_default.video-js.vjs-play-button-hover-glow:active .vjs-big-play-button,.bc-player-default_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-default_default.video-js.vjs-play-button-hover-darken .vjs-big-play-button:active,.bc-player-default_default.video-js.vjs-play-button-hover-darken .vjs-big-play-button:focus,.bc-player-default_default.video-js.vjs-play-button-hover-darken:active .vjs-big-play-button,.bc-player-default_default.video-js.vjs-play-button-hover-darken:hover .vjs-big-play-button{background-color:rgba(0,0,0,.85)}.bc-player-default_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-default_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-default_default.vjs-play-button-position-top-left .vjs-big-play-button{margin:0;left:17px;top:17px}.bc-player-default_default.vjs-play-button-position-top-right .vjs-big-play-button{margin:0;right:17px;left:auto;top:17px}.bc-player-default_default.video-js.vjs-play-button-position-top-left .vjs-dock-shelf,.bc-player-default_default.video-js.vjs-play-button-position-top-left .vjs-dock-text,.bc-player-default_default.video-js.vjs-play-button-position-top-right .vjs-dock-shelf,.bc-player-default_default.video-js.vjs-play-button-position-top-right .vjs-dock-text{display:none}.bc-player-default_default .vjs-big-play-button,.bc-player-default_default .vjs-big-play-state.vjs-play-control.vjs-control,.bc-player-default_default .vjs-control-bar{background-color:rgba(0,0,0,.45)}.bc-player-default_default .vjs-big-play-button,.bc-player-default_default .vjs-big-play-state,.bc-player-default_default .vjs-control-bar{color:#fff}.bc-iframe .vjs-playlist-sidebar .vjs-playlist-show-hide button:hover,.bc-player-default_default .vjs-big-play-button:active,.bc-player-default_default .vjs-big-play-button:focus,.bc-player-default_default .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected,.bc-player-default_default .vjs-play-progress,.bc-player-default_default .vjs-volume-level,.bc-player-default_default:active .vjs-big-play-button,.bc-player-default_default:hover .vjs-big-play-button{background-color:#08088C}.bc-player-default_default.vjs-audio-mode.vjs-has-started.vjs-focus-within.video-js.video-js.video-js .vjs-control-bar,.bc-player-default_default.vjs-audio-mode.vjs-has-started.vjs-user-active.video-js.video-js.video-js .vjs-control-bar:not(.vjs-focus-within),.bc-player-default_default.vjs-audio-mode.vjs-has-started.vjs-user-inactive.video-js.video-js.video-js .vjs-control-bar{opacity:1;visibility:visible;transform:none}.bc-player-default_default.vjs-audio-only-mode .vjs-poster{display:none}.bc-player-default_default.vjs-audio-only-mode .vjs-progress-control{height:1.5em;top:-1.5em}.vjs-bumper-video .vjs-play-progress.vjs-play-progress-resetting{transition:width 0s linear}.vjs-bumper-video .vjs-dock-text{display:none} </style> </head> <body><video-js data-account="1050259881001" data-player="default" data-embed="default" data-application-id="" class="video-js vjs-default-skin" > </video-js> <script>(function(p){p.mark&&p.mark('bcParseStart')})(window.performance||{})</script> <script>(function(){var e=function(e,t){var r=undefined;var i=e.define;var n=e.videojs;e.VIDEOJS_NO_DYNAMIC_STYLE=true;var a=function(r){"use strict";function i(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var n=i(r);var a="0.31.2";function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return o(e,t===undefined||t===null?r.path:t)}},e(r,r.exports),r.exports}function o(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var u=s(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e},e.exports.__esModule=true,e.exports["default"]=e.exports;return t.apply(this,arguments)}e.exports=t,e.exports.__esModule=true,e.exports["default"]=e.exports});var l=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 d=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 c(e){return u({muted:false,timeout:250,inline:false},e)}function f(e,t){var r=e.muted,i=e.timeout,n=e.inline;var a=t(),s=a.element,o=a.source;var u=void 0;var l=void 0;var d=void 0;s.muted=r;if(r===true){s.setAttribute("muted","muted")}if(n===true){s.setAttribute("playsinline","playsinline")}s.src=o;return new Promise(function(e){u=s.play();l=setTimeout(function(){d(false,new Error("Timeout "+i+" ms has been reached"))},i);d=function t(r){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;s.remove();s.srcObject=null;clearTimeout(l);e({result:r,error:i})};if(u!==undefined){u.then(function(){return d(true)}).catch(function(e){return d(false,e)})}else{d(true)}})}function h(e){e=c(e);return f(e,function(){return{element:t.createElement("video"),source:URL.createObjectURL(d)}})}function p(e){e=c(e);return f(e,function(){return{element:t.createElement("audio"),source:URL.createObjectURL(l)}})}var v={audio:p,video:h};function m(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}function g(e){return typeof e==="function"}var y;if(Array.isArray){y=Array.isArray}else{y=function e(t){return Object.prototype.toString.call(t)==="[object Array]"}}var _=y;var b=0;var T;var S;var E=function e(t,r){M[b]=t;M[b+1]=r;b+=2;if(b===2){if(S){S(U)}else{F()}}};function I(e){S=e}function C(e){E=e}var k=typeof e!=="undefined"?e:undefined;var w=k||{};var A=w.MutationObserver||w.WebKitMutationObserver;var P=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var O=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function x(){return function(){return process.nextTick(U)}}function D(){if(typeof T!=="undefined"){return function(){T(U)}}return N()}function L(){var e=0;var r=new A(U);var i=t.createTextNode("");r.observe(i,{characterData:true});return function(){i.data=e=++e%2}}function R(){var e=new MessageChannel;e.port1.onmessage=U;return function(){return e.port2.postMessage(0)}}function N(){var e=setTimeout;return function(){return e(U,1)}}var M=new Array(1e3);function U(){for(var e=0;e<b;e+=2){var t=M[e];var r=M[e+1];t(r);M[e]=undefined;M[e+1]=undefined}b=0}function B(){try{var e=Function("return this")().require("vertx");T=e.runOnLoop||e.runOnContext;return D()}catch(e){return N()}}var F;if(P){F=x()}else if(A){F=L()}else if(O){F=R()}else if(k===undefined&&typeof require==="function"){F=B()}else{F=N()}function j(e,t){var r=this;var i=new this.constructor(H);if(i[q]===undefined){le(i)}var n=r._state;if(n){var a=arguments[n-1];E(function(){return ae(n,i,a,r._result)})}else{ie(r,i,e,t)}return i}function V(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e}var r=new t(H);Z(r,e);return r}var q=Math.random().toString(36).substring(2);function H(){}var W=void 0;var G=1;var K=2;function Y(){return new TypeError("You cannot resolve a promise with itself")}function z(){return new TypeError("A promises callback cannot return that same promise.")}function X(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}function Q(e,t,r){E(function(e){var i=false;var n=X(r,t,function(r){if(i){return}i=true;if(t!==r){Z(e,r)}else{te(e,r)}},function(t){if(i){return}i=true;re(e,t)},"Settle: "+(e._label||" unknown promise"));if(!i&&n){i=true;re(e,n)}},e)}function $(e,t){if(t._state===G){te(e,t._result)}else if(t._state===K){re(e,t._result)}else{ie(t,undefined,function(t){return Z(e,t)},function(t){return re(e,t)})}}function J(e,t,r){if(t.constructor===e.constructor&&r===j&&t.constructor.resolve===V){$(e,t)}else{if(r===undefined){te(e,t)}else if(g(r)){Q(e,t,r)}else{te(e,t)}}}function Z(e,t){if(e===t){re(e,Y())}else if(m(t)){var r;try{r=t.then}catch(t){re(e,t);return}J(e,t,r)}else{te(e,t)}}function ee(e){if(e._onerror){e._onerror(e._result)}ne(e)}function te(e,t){if(e._state!==W){return}e._result=t;e._state=G;if(e._subscribers.length!==0){E(ne,e)}}function re(e,t){if(e._state!==W){return}e._state=K;e._result=t;E(ee,e)}function ie(e,t,r,i){var n=e._subscribers;var a=n.length;e._onerror=null;n[a]=t;n[a+G]=r;n[a+K]=i;if(a===0&&e._state){E(ne,e)}}function ne(e){var t=e._subscribers;var r=e._state;if(t.length===0){return}var i,n,a=e._result;for(var s=0;s<t.length;s+=3){i=t[s];n=t[s+r];if(i){ae(r,i,n,a)}else{n(a)}}e._subscribers.length=0}function ae(e,t,r,i){var n=g(r),a,s,o=true;if(n){try{a=r(i)}catch(e){o=false;s=e}if(t===a){re(t,z());return}}else{a=i}if(t._state!==W);else if(n&&o){Z(t,a)}else if(o===false){re(t,s)}else if(e===G){te(t,a)}else if(e===K){re(t,a)}}function se(e,t){try{t(function t(r){Z(e,r)},function t(r){re(e,r)})}catch(t){re(e,t)}}var oe=0;function ue(){return oe++}function le(e){e[q]=oe++;e._state=undefined;e._result=undefined;e._subscribers=[]}function de(){return new Error("Array Methods must be provided an Array")}var ce=function(){function e(e,t){this._instanceConstructor=e;this.promise=new e(H);if(!this.promise[q]){le(this.promise)}if(_(t)){this.length=t.length;this._remaining=t.length;this._result=new Array(this.length);if(this.length===0){te(this.promise,this._result)}else{this.length=this.length||0;this._enumerate(t);if(this._remaining===0){te(this.promise,this._result)}}}else{re(this.promise,de())}}var t=e.prototype;t._enumerate=function e(t){for(var r=0;this._state===W&&r<t.length;r++){this._eachEntry(t[r],r)}};t._eachEntry=function e(t,r){var i=this._instanceConstructor;var n=i.resolve;if(n===V){var a;var s;var o=false;try{a=t.then}catch(e){o=true;s=e}if(a===j&&t._state!==W){this._settledAt(t._state,r,t._result)}else if(typeof a!=="function"){this._remaining--;this._result[r]=t}else if(i===ge){var u=new i(H);if(o){re(u,s)}else{J(u,t,a)}this._willSettleAt(u,r)}else{this._willSettleAt(new i(function(e){return e(t)}),r)}}else{this._willSettleAt(n(t),r)}};t._settledAt=function e(t,r,i){var n=this.promise;if(n._state===W){this._remaining--;if(t===K){re(n,i)}else{this._result[r]=i}}if(this._remaining===0){te(n,this._result)}};t._willSettleAt=function e(t,r){var i=this;ie(t,undefined,function(e){return i._settledAt(G,r,e)},function(e){return i._settledAt(K,r,e)})};return e}();function fe(e){return new ce(this,e).promise}function he(e){var t=this;if(!_(e)){return new t(function(e,t){return t(new TypeError("You must pass an array to race."))})}else{return new t(function(r,i){var n=e.length;for(var a=0;a<n;a++){t.resolve(e[a]).then(r,i)}})}}function pe(e){var t=this;var r=new t(H);re(r,e);return r}function ve(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function me(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ge=function(){function e(t){this[q]=ue();this._result=this._state=undefined;this._subscribers=[];if(H!==t){typeof t!=="function"&&ve();this instanceof e?se(this,t):me()}}var t=e.prototype;t.catch=function e(t){return this.then(null,t)};t.finally=function e(t){var r=this;var i=r.constructor;if(g(t)){return r.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})})}return r.then(t,t)};return e}();ge.prototype.then=j;ge.all=fe;ge.race=he;ge.resolve=V;ge.reject=pe;ge._setScheduler=I;ge._setAsap=C;ge._asap=E;function ye(){var e;if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if(r==="[object Promise]"&&!t.cast){return}}e.Promise=ge}ge.polyfill=ye;ge.Promise=ge;var _e=e.performance;var be={};["memory","navigation","timing"].forEach(function(e){be[e]=_e&&_e[e]||{}});["clearMarks","clearMeasures","clearResourceTimings","getEntries","getEntriesByName","getEntriesByType","mark","measure","now","setResourceTimingBufferSize","toJSON"].forEach(function(e){be[e]=function(){if(_e&&_e[e]){return _e[e].apply(_e,arguments)}}});function Te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Se=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function Ee(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function Ie(e,t,r,i){t=t||"&";r=r||"=";if(e===null){e=undefined}if(typeof e==="object"){return Ce(ke(e),function(i){var n=encodeURIComponent(Ee(i))+r;if(Se(e[i])){return Ce(e[i],function(e){return n+encodeURIComponent(Ee(e))}).join(t)}else{return n+encodeURIComponent(Ee(e[i]))}}).join(t)}if(!i)return"";return encodeURIComponent(Ee(i))+r+encodeURIComponent(Ee(e))}function Ce(e,t){if(e.map)return e.map(t);var r=[];for(var i=0;i<e.length;i++){r.push(t(e[i],i))}return r}var ke=Object.keys||function(e){var t=[];for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t.push(r)}return t};function we(e,t,r,i){t=t||"&";r=r||"=";var n={};if(typeof e!=="string"||e.length===0){return n}var a=/\+/g;e=e.split(t);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var o=e.length;if(s>0&&o>s){o=s}for(var u=0;u<o;++u){var l=e[u].replace(a,"%20"),d=l.indexOf(r),c,f,h,p;if(d>=0){c=l.substr(0,d);f=l.substr(d+1)}else{c=l;f=""}h=decodeURIComponent(c);p=decodeURIComponent(f);if(!Te(n,h)){n[h]=p}else if(Se(n[h])){n[h].push(p)}else{n[h]=[n[h],p]}}return n}var Ae={encode:Ie,stringify:Ie,decode:we,parse:we};function Pe(t){if(t===void 0){t=e&&e.location||{}}var r;var i;try{r=Ae.parse((t.hash||"#").substr(1))}catch(e){r={}}try{i=Ae.parse((t.search||"?").substr(1))}catch(e){i={}}return u({hash:r,search:i},Ae)}var Oe={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 xe=function e(t,r){if(t){var i=Number(t.substring(0,t.indexOf(".")));if(i){return i>=r}n["default"].log.warn("Plugin VERSION string format does not conform to semantic versioning standards and cannot be checked.")}return false};var De={perf:be,Promise:ge,qs:Pe,isValidVersion:xe,assign:function e(){return u.apply(void 0,arguments)},get:function e(t,r,i){var n=t;var a=r.split(".");if(!n){return i}for(var s=0;s<a.length;s++){var o=a[s];if(n[o]===undefined){return i}if(s+1<a.length){n=n[o]}else{return n[o]}}},withoutNilValues:function e(t){var r=t;if(Oe.isArr(t)){r=t.filter(function(e){return!Oe.isNil(e)}).map(De.withoutNilValues)}else if(Oe.isObj(t)){r={};Object.keys(t).forEach(function(e){if(!Oe.isNil(t[e])){r[e]=De.withoutNilValues(t[e])}})}return r},debounce:function t(r,i,n,a){if(a===void 0){a=e}var s;return function(){var e=this;var t=arguments;var o=function i(){s=null;o=null;if(!n){r.apply(e,t)}};if(!s&&n){r.apply(e,t)}a.clearTimeout(s);s=a.setTimeout(o,i)}},throttle:function e(t,r){var i=Date.now();return function(){var e=Date.now();if(e-i>=r){t.apply(void 0,arguments);i=e}}}};De.assign(De,Oe);De.VERSION="n/a";var Le=[{inline:false,muted:false},{inline:true,muted:false},{inline:false,muted:true},{inline:true,muted:true}];function Re(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 r=t.inline,i=t.muted;var n=!r&&!i;return{always:n,sometimes:!n,never:false,inline:r,muted:i}}function Ne(t){var r;if(t.IE_VERSION||e.cast&&e.cast.receiver){r={always:true,sometimes:false,never:false,inline:false,muted:false}}if(t.ANDROID_VERSION||t.IS_IOS){r={always:false,sometimes:true,never:false,inline:false,muted:true};if(t.IS_IPHONE){r.inline=true}}if(r){return De.Promise.resolve(r)}}function Me(e,t){if(e!=="video"&&e!=="audio"){throw new Error("invalid autoplay type: "+e)}var r=Ne(t.browser);if(r){return r}var i=Le.map(function(t){return v[e](t).then(function(e){var r=e.result;return u({passed:r},t)})});return De.Promise.all(i).then(function(e){return Re(e)})}var Ue="bc-style-vjs";function Be(r,i,n){var a=r.classNames;if(!i&&!n&&i!==0&&n!==0){return}var s=t.querySelector("."+a.playerInstanceDimensions);if(!s){s=t.createElement("style");s.className=a.playerInstanceDimensions;var o=t.querySelector("."+a.playerStyle)||t.querySelector("."+Ue);if(o){o.parentNode.insertBefore(s,o.nextSibling)}else{t.head.appendChild(s)}}else if(s.innerText){if(!i&&i!==0){var u=/width:(\d+)px;/g.exec(s.innerText);if(u&&u[1]){i=e.parseInt(u[1],10)}}else if(!n&&n!==0){var l=/height:(\d+)px;/g.exec(s.innerText);if(l&&l[1]){n=e.parseInt(l[1],10)}}}var d="."+a.playerInstance+"{";if(i||i===0){d+="width:"+e.parseInt(i,10)+"px;"}if(n||n===0){d+="height:"+e.parseInt(n,10)+"px;"}d+="}";s.innerText=d}var Fe=3;var je=50;var Ve=function r(i){var n=t.body;var a=t.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="&nbsp;";a.setAttribute("style","height:10px!important;font-size:20px;color:transparent;position:absolute;bottom:0;left:-10000px");var s=0;var o=function t(){s++;var r=a.offsetHeight===0||!n.contains(a)||a.style.display==="none"||a.style.visibility==="hidden";if(r||s===Fe){if(a.parentNode){a.parentNode.removeChild(a)}return i(r)}e.setTimeout(t,je)};n.appendChild(a);o()};var qe=null;var He;function We(e){if(e||!He){He=new ge(function(e){if(t.readyState==="complete"||t.readyState!=="loading"&&!t.documentElement.doScroll){Ve(e)}else{t.addEventListener("DOMContentLoaded",function(){Ve(e)})}})}return He.then(function(e){qe=e;return e})}Object.defineProperties(We,{VERSION:{enumerable:true,value:"n/a"},lastResult:{enumerable:true,get:function e(){return qe}},mightBe:{enumerable:true,get:function e(){return qe!==false}},mightNotBe:{enumerable:true,get:function e(){return qe!==true}}});var Ge=function t(r){var i=e.matchMedia("(hover)");var n=true;if(i.media!=="not all"){n=i.matches}return n||r.browser.IS_FIREFOX&&r.browser.IS_WINDOWS};var Ke="vjs-waiting-for-autoplay";function Ye(e,t,r,i){return e.hasAttribute("data-debug")||t.debug!==undefined||r.debug||i.debug}function ze(r,i,n,a){var s=i.settings,o=i.environment;var u=s.embedId,l=s.playerId;var d=o.isInBcFrame,c=o.queryString,f=o.urlHash;var h="bc-player-"+l+"_"+u;var p=h+"-index-"+s.playerIndex;De.perf.mark("bcInitStart");s.classNames={player:h,playerStyle:"bc-style-"+l+"-"+u,playerInstance:p,playerInstanceDimensions:p+"-video-dimensions"};s.embedState={controls:n.hasAttribute("controls")||n.hasAttribute("data-controls"),loop:n.hasAttribute("loop"),muted:n.hasAttribute("muted"),playsinline:n.hasAttribute("playsinline"),poster:n.hasAttribute("poster"),sources:!!n.querySelector("source"),tracks:!!n.querySelector("track")};a.debug=Ye(n,c,a,s);if(n.hasAttribute("data-vttjs")&&De.isNonEmptyStr(n.getAttribute("data-vttjs"))){a["vtt.js"]=n.getAttribute("data-vttjs")}else if(c.vttjs&&De.isNonEmptyStr(c.vttjs)){a["vtt.js"]=c.vttjs}else if(a.hasOwnProperty("vtt.js")||a.hasOwnProperty("vttjs")){a["vtt.js"]=a["vtt.js"]||a.vttjs}else if(s["vtt.js"]||s.vttjs){a["vtt.js"]=s["vtt.js"]||s.vttjs}else{a["vtt.js"]="https://vjs.zencdn.net/vttjs/0.15.3/vtt.global.min.js"}if(s.playButton){var v=s.playButton,m=v.hover,g=v.shape,y=v.position;if(m==="glow"){r.dom.addClass(n,"vjs-play-button-hover-glow")}else if(m==="darken"){r.dom.addClass(n,"vjs-play-button-hover-darken")}if(g==="square"){r.dom.addClass(n,"vjs-play-button-shape-square")}else if(g==="rectangle"){r.dom.addClass(n,"vjs-play-button-shape-rectangle")}if(y==="topRight"){r.dom.addClass(n,"vjs-play-button-position-top-right")}else if(y==="topLeft"){r.dom.addClass(n,"vjs-play-button-position-top-left")}}if(c.crossorigin!==undefined||s.media&&s.media.tracks&&r.browser.IS_ANY_SAFARI){s.crossorigin=true}if(s.crossorigin){n.setAttribute("crossorigin","anonymous")}if(s.audioPosterMode){a.audioPosterMode=s.audioPosterMode}if(s.audioOnlyMode){a.audioOnlyMode=s.audioOnlyMode}var _=f.t||c.t||n.getAttribute("data-start-time");if(/^[\d]+$/.test(_)){s.startTime=Number(_)}else if(/^(\d+h)?(\d+m)?(\d+s)?$/.test(_)){s.startTime=_}var b=c.adConfigId;var T=n.getAttribute("data-ad-config-id");if(De.isNonEmptyStr(b)){s.adConfigId=b}else if(De.isNonEmptyStr(T)){s.adConfigId=T}if(typeof s.adConfigId==="string"){s.adConfigId=s.adConfigId.trim()}if(!De.isNonEmptyStr(s.adConfigId)){s.adConfigId=null}if(s.usingAdFailover&&!We.mightBe){s.adConfigId=null}var S=c.deliveryConfigId;var E=n.getAttribute("data-delivery-config-id");if(De.isNonEmptyStr(S)){s.deliveryConfigId=S}else if(De.isNonEmptyStr(E)){s.deliveryConfigId=E}if(typeof s.deliveryConfigId==="string"){s.deliveryConfigId=s.deliveryConfigId.trim()}if(!De.isNonEmptyStr(s.deliveryConfigId)){s.deliveryConfigId=null}s.applicationId=c.applicationId||n.getAttribute("data-application-id")||s.applicationId;var I=De.qs();if(n.hasAttribute("autoplay")){a.autoplay=true}else if(I.hash.hasOwnProperty("autoplay")||I.search.hasOwnProperty("autoplay")){a.autoplay=I.hash.autoplay||I.search.autoplay||true;if(!d){r.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(!a.hasOwnProperty("autoplay")){a.autoplay=s.autoplay||false}if(a.autoplay){r.dom.addClass(n,Ke)}if(c.preload){a.preload=c.preload}else if(!a.hasOwnProperty("preload")&&s.preload){a.preload=s.preload}a.height=n.getAttribute("height")||undefined;a.width=n.getAttribute("width")||undefined;if(!d&&n&&(a.width||a.height)){Be(s,a.width,a.height)}["loop","muted","playsinline"].forEach(function(e){if(c[e]!==undefined||s[e]||s.embedState[e]||a[e]){a[e]=true}else{a[e]=false}});if(a.autoplay){a.playsinline=true}if(a.playsinline){n.setAttribute("playsinline","playsinline")}if(a.muted){n.setAttribute("muted","muted");n.muted=true}if(d){if(c.language){a.language=c.language}else if(De.isNonEmptyStr(t.documentElement.lang)){a.language=t.documentElement.lang}else{a.language=e.navigator.language}t.documentElement.lang=a.language}else if(n.hasAttribute("language")){a.language=n.getAttribute("language");r.log.warn("Use of the language attribute on the video embed is invalid. Please use the lang attribute instead.")}else if(!a.hasOwnProperty("language")&&De.isNonEmptyStr(s.language)){a.language=s.language}var C=n.getAttribute("data-bumper-id");var k=c.bumperId;var w=s.videoCloud?s.videoCloud.bumper:undefined;if(C||k||w){s.videoCloud=s.videoCloud||{};s.videoCloud.bumper=w&&typeof w==="object"?w:{};var A=C||k||w.id||w;if(typeof A==="string"){s.videoCloud.bumper.id=A}else{r.log.error("Bumper id must be a string")}}var P=s.media;if(P&&P.poster&&P.poster.highres&&!n.poster){if(/(https?:)?\/\//.test(P.poster.highres)){a.poster=P.poster.highres}else{a.poster=i.environment.scriptBaseUrl+"/"+P.poster.highres}if(r.browser.IS_IPHONE){n.poster=a.poster}}if(P&&P.tracks){P.tracks.forEach(function(e){n.appendChild(r.dom.createEl("track",{},{default:e.default?e.default:"",label:e.label?e.label:"",kind:"captions",src:e.src,srclang:e.srclang}))})}if(P&&P.src){a.sources=[P.src]}else if(P&&P.sources){a.sources=P.sources}a.runtime_=i;a.html5=a.html5||{};if(!(r.browser.IS_ANY_SAFARI||r.browser.IS_IOS)){a.html5.nativeCaptions=false}if(s.vhs!==false){if(!a.flash){a.flash={}}if(!a.flash.swf){a.flash.swf=s.playersCDN+"/videojs-flashls-source-handler/1.4.8/video-js.swf"}}r.options.vhs=r.options.vhs||{};a.html5=a.html5||{};a.html5.vhs=a.html5.vhs||{};if(s.vhs&&typeof s.vhs==="object"){a.html5.vhs=s.vhs}if(r.browser.IS_ANDROID&&(r.options.vhs.enableLowInitialPlaylist===undefined||a.html5.vhs.enableLowInitialPlaylist===undefined)){a.html5.vhs.enableLowInitialPlaylist=true}if(!r.browser.IS_ANY_SAFARI&&r.options.vhs.overrideNative===undefined&&a.html5.vhs.overrideNative===undefined){a.html5.vhs.overrideNative=true}if(r.options.vhs.experimentalLLHLS===undefined&&a.html5.vhs.experimentalLLHLS===undefined){a.html5.vhs.experimentalLLHLS=true}a.html5.initialBandwidth=typeof a.html5.initialBandwidth==="number"?a.html5.initialBandwidth:s.initialBandwidth;a.inactivityTimeout=5e3;if(!Ge(r)){a.inactivityTimeout=0}a.controls=d?true:s.embedState.controls;a.persistTextTrackSettings=true;a.sourceOrder=true;a.userActions={hotkeys:{}};if(s.fullscreenControl===false){a.userActions.doubleClick=false}var O=i.environment.userAgent.match(/applewebkit\/(\d*).*Version\/(\d*.\d*)/i);a.nativeControlsForTouch=r.browser.IS_ANDROID&&r.browser.ANDROID_VERSION<5&&O&&O[2]>0;var x=r.getPluginVersion("ima3");a.normalizeAutoplay=x?De.isValidVersion(x,4):true;["controlBar","flash","liveui","playbackRates","responsive","suppressNotSupportedError","techOrder"].forEach(function(e){if(s.hasOwnProperty(e)){a[e]=s[e]}});return a}var Xe=function e(t){var r=t.registerPlugin||t.plugin;r("urlparams",function(e){e=e||{};var r=function e(t){var r=0,i;t=(t||"").replace(/^\s+|\s+$/g,"");if(!t||!/^(\d+h)?(\d+m)?(\d+s)?$/.test(t)){return-1}i=t.match(/^(\d+)h/);if(i){r+=parseFloat(i[1])*3600;t=t.replace(/^(\d+)h/,"")}i=t.match(/^(\d+)m/);if(i){r+=parseFloat(i[1])*60;t=t.replace(/^(\d+)m/,"")}i=t.match(/^(\d+)s/);if(i){r+=parseFloat(i[1])}return r},i=.9,n=function e(t,r){var n=t-r;if(isNaN(n)){return false}return Math.abs(n)<i},a=function e(t){s.ready(function(){if(s.networkState()===2){t()}else{s.one("loadedmetadata",function(){s.setTimeout(t,0)})}})},s=this,o=De.qs(),u=o.hash.t||o.search.t,l;if(typeof e.time==="number"){l=e.time}else{l=r(e.time)}if(u){if(/^[\d]+$/.test(u)){l=Number(u)}else{l=r(u)}if(!e.iframe&&l!==-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(l>0){(function(){var t=e.delay||250,r,i=false,o=function e(){if(i||n(s.currentTime(),l)){i=true;u()}else{s.one("canplay",function(){s.currentTime(l)});r=s.setTimeout(e,t)}},u=function e(){s.clearTimeout(r);s.off("timeupdate",e);if(!i){s.currentTime(l)}};s.on("timeupdate",u);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(),r,i;if(t){for(i=0;i<t.length;i++){r=t[i];if(r.language===e){r.mode="showing";break}}}})})()}})};var Qe=s(function(e){function t(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}e.exports=t,e.exports.__esModule=true,e.exports["default"]=e.exports});var $e=s(function(e){function t(r,i){e.exports=t=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t},e.exports.__esModule=true,e.exports["default"]=e.exports;return t(r,i)}e.exports=t,e.exports.__esModule=true,e.exports["default"]=e.exports});var Je=s(function(e){function t(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;$e(e,t)}e.exports=t,e.exports.__esModule=true,e.exports["default"]=e.exports});var Ze={activeCues:null,cues:null,id:"",inBandMetadataTrackDispatchType:undefined,kind:"metadata",label:"",language:"",mode:"",oncuechange:undefined};var et=["activeCues","cues","id","inBandMetadataTrackDispatchType","kind","label","language"];var tt=["mode"];var rt=function e(t,r){if(t==="media"&&r.kind==="metadata"&&r.label==="media-cues"){return true}if(t==="id3"&&typeof r.inBandMetadataTrackDispatchType==="string"&&r.inBandMetadataTrackDispatchType.trim().length>0){return true}return false};var it=function e(t){var r=function(e){Je(r,e);function r(r,i,n){var a;if(n===void 0){n=function e(){}}a=e.call(this)||this;var s=Qe(a);s.player_=r;s.reTriggerEvent_=t.bind(s,s.reTriggerEvent_);s.update_=t.bind(s,s.update_);s.type_=i;s.logger_=n;et.concat(tt).forEach(function(e){var t={get:function t(){return s.track_&&s.track_[e]||Ze[e]},enumerable:true};if(tt.indexOf(e)!==-1){t.set=function(t){if(!s.track_){return}s.track_[e]=t}}Object.defineProperty(s,e,t)});s.update_();var o=r.textTracks();var u=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",u);return s||Qe(a)}var i=r.prototype;i.addCue=function e(){var t=this;var r=arguments;if(!this.track_){this.one("trackexists",function(){return t.addCue.apply(t,r)});return}return this.track_.addCue.apply(this.track_,r)};i.removeCue=function e(){var t=this;var r=arguments;if(!this.track_){return this.one("trackexists",function(){return t.removeCue.apply(t,r)})}return this.track_.removeCue.apply(this.track_,r)};i.reTriggerEvent_=function e(t){this.trigger(t)};i.update_=function e(t){var r=this;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_&&rt(this.type_,t.track)){i=t.track}else{var n=this.player_.textTracks();var a=n.length;while(a--){if(rt(this.type_,n[a])){i=n[a];break}}}var s=function e(){if(t.type==="timeupdate"){return}r.logger_.apply(r,arguments)};s("update -> type:"+this.type_+", mode:"+(i?i.mode:"?")+" -> event:"+(t.type||"constructor"));if(this.track_===i){s("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_){s("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");s("update -> type:"+this.type_+", mode:"+(i?i.mode:"?")+" -> track exists")};return r}(t.EventTarget);r.prototype.allowedEvents_={cuechange:"cuechange"};return r};var nt=function e(t){var r=it(t);var i={id3CuePointsTrack:function e(t){var i=this.proxyTracks_.id3;if(!i){i=this.proxyTracks_.id3=new r(this,"id3",t)}return i},mediaCuePointsTrack:function e(t){var i=this.proxyTracks_.media;if(i){return i}i=this.proxyTracks_.media=new r(this,"media",t);if(i.track_){return i}this.addTextTrack("metadata","media-cues");i.update_();return i}};function n(e){var r=this;if(e===void 0){e={}}this.proxyTracks_={};var n=t.createLogger("proxyTracks");if(!e.debug){n=function e(){}}n("initialized");Object.keys(i).forEach(function(e){r[e]=function(){return i[e].call(r,n)}});this.ready(function(){Object.keys(i).forEach(function(t){var i=r[t]();if(e.debug){i.on("cuechange",function(){for(var e=0;e<i.activeCues.length;e++){var t=i.activeCues[e];n(i.type_+" -> cuechange -> activeCues["+e+"]: "+(t.value&&t.value.key||t.frame&&t.frame.id))}})}})})}t.registerPlugin("proxyTracks",n);n.VERSION=a};var at=function e(t,r){var i=t.encryptedWatcher().encryptedSeen();if(!r||!i||r.code!==-2||t.currentTime()>.1){return r}var n;var a=t.currentSource();if(!t.hasPlugin("eme")){n="DRM/EME plugin is not included!"}else if(t.hasPlugin("eme")&&!t.usingPlugin("eme")){n="DRM/EME plugin is included but not initialized!"}else if(!a.keySystems||!Object.keys(a.keySystems).length){n="DRM (keySystems) was not provided!"}if(n){return{code:5,message:"DRM configuration issue prevented playback: "+n}}return r};var st=function e(t){var r=t.getPlugin("plugin");var i=function(e){Je(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.player_=t;i.reset();i.handleEncrypted_=i.handleEncrypted_.bind(Qe(i));i.reset=i.reset.bind(Qe(i));i.player_.ready(function(){i.player_.tech_.on("encrypted",i.handleEncrypted_);i.player_.tech_.on("webkitneedkey",i.handleEncrypted_);i.player_.tech_.on("msneedkey",i.handleEncrypted_);i.player_.tech_.on("loadstart",i.reset)},true);return i}var r=t.prototype;r.handleEncrypted_=function e(){this.encryptedSeen_=true};r.encryptedSeen=function e(){return this.encryptedSeen_};r.reset=function e(){this.encryptedSeen_=false};r.dispose=function e(){this.reset();this.player_.tech_.off("encrypted",this.handleEncrypted_);this.player_.tech_.off("webkitneedkey",this.handleEncrypted_);this.player_.tech_.off("msneedkey",this.handleEncrypted_);this.player_.tech_.off("loadstart",this.reset)};return t}(r);var n=t.hooks("beforeerror");if(n.indexOf(at)===-1){t.hook("beforeerror",at)}t.registerPlugin("encryptedWatcher",i)};var ot={verbose:false,maxSavedSeekEvents:10,debounceTimeout:1e3,playbackRateTolerance:1.5,stableTimeUpdateCount:3,minInterval:1};var ut=function e(t){if(t.isDisposed_){return}t.trigger("seek")};var lt=function e(t){var r=function e(r){var i=t.mergeOptions(ot,r);var n;var a=false;var s;var o;var u;var l;var d=0;var c=[];var f=0;var h={};var p={};var v=i.verbose?function(){var e;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}return(e=t.log).call.apply(e,[t,"seek-events:"].concat(i))}: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=De.debounce(ut,i.debounceTimeout);var T=function e(t){s=this.currentTime();o=t.timeStamp||+new Date;u=s-p.seek;if(o===p.clock||s===h.seek){return}l=Math.abs(u)/(Math.abs(o-p.clock)*.001);if(l/this.playbackRate()>this.seekEvents.playbackRateTolerance){if(Math.abs(s-h.seek)>=this.seekEvents.minInterval){this.trigger("unstable");d=0;if(!a){f=Number(h.seek)}c.push({timeStamp:o,seekStart:f,seekEnd:s,seekInterval:s-f});if(c.length>i.maxSavedSeekEvents){c.shift()}a=true;b(this)}}else{d++;if(d>=this.seekEvents.stableTimeUpdateCount&&!this.seekEvents.stable&&!a){this.trigger("stable")}h.seek=s}p.seek=s;p.clock=o};this.seekEvents={stableTimeUpdateCount:i.stableTimeUpdateCount,playbackRateTolerance:i.playbackRateTolerance,debounceTimeout:i.debounceTimeout,minInterval:i.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 c[c.length-1]},all:function e(){return c}};this.seekEvents.enable()};var i=t.registerPlugin||t.plugin;r.VERSION=a;i("seekEvents",r)};var dt=new e.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"});var ct=URL.createObjectURL(dt);var ft=["perSourceBehaviors","contextmenu","contextmenuUI","bcAnalytics","errors","catalog","playerInfo","dock","plugin","reloadSourceOnError","playlist","endscreen","proxyTracks","seekEvents","touchActive","urlparams","encryptedWatcher"];var ht=function r(i,n,a){var s=a.settings;var o=a.environment;var l=o.queryString;var d={};var c=Boolean(n.options_.debug);var f={bcAnalytics:{applicationId:s.applicationId,mr:Boolean(e.bc_isManagedRelease),referrer:l.referrer,usage:l.usage,verbose:c},chromecastReceiver:{debug:c},contextmenu:{cancel:false},ima3:{debugContribAds:c},ssai:{debug:c},vr:{debug:c}};n.on("pluginsetup",function(e,t){var r=t.name;if(ft.indexOf(r)!==-1){return}n.trigger({type:"usage",name:r+"!"+i.getPluginVersion(r)})});if(s.contextMenu!==false){var h=s.contextMenu||{};var p=[{label:n.localize("Player Information"),listener:function e(){return n.usingPlugin("playerInfo")&&n.playerInfo.modal.open()}}];if(h.brightcoveBranding!==false){p.push({href:"https://www.brightcove.com/en/why-brightcove?utm_type=player",label:n.localize("About Brightcove")})}f.contextmenuUI={content:p}}var v=function e(t,r){if(r===void 0){r={}}var a=f[t]||{};if(!n.hasPlugin(t)){i.log.error('Plugin "'+t+'" is missing. Please check your player configuration.');return}if(n.usingPlugin(t)){return}var s=i.mergeOptions(a,r);try{n[t](s)}catch(e){i.log.error('Unable to initialize "'+t+'" plugin:',e)}};if(s.usingAdFailover&&s.usingIMAPrerollWithSSAI){i.log.warn("Ad failover is not compatible with SSAI and client-side preroll. "+"Please configure only one. This player will use ad failover behavior.");delete s.usingIMAPrerollWithSSAI}if(s.usingAdFailover){n.trigger({type:"usage",name:"ad-failover"});var m=n.usingAdBlocker.mightBe?s.serverSideAdPlugin:s.clientSideAdPlugin,g=m.name,y=m.options;v(g,y)}else if(s.usingIMAPrerollWithSSAI){if(e.bc.disposedAfterPreroll_){var _=s.serverSideAdPlugin.name;var b=s.serverSideAdPlugin.options;var T=s.clientSideAdPlugin.name;i.deregisterPlugin(T);i.registerPlugin(_,e.bc.ssaiPluginCache_);v(_,b)}else{n.trigger({type:"usage",name:"ssai-with-ima-preroll"});var S=s.clientSideAdPlugin.name;var E=s.clientSideAdPlugin.options;var I=s.serverSideAdPlugin.name;e.bc.ssaiPluginCache_=i.getPlugin("ssai");i.deregisterPlugin(I);v(S,E);var C=n.tagAttributes;n.one(["adend","adtimeout","adserror"],function(r){n.one("playing",function(){var i=n.volume();var a=n.muted();if(r.type==="adend"){if(n.ima3&&n.ima3.adPlayer){i=n.ima3.adPlayer.volume();a=n.ima3.adPlayer.muted()}else{i=n.ima3.player.volume();a=n.ima3.player.muted()}}var s=n.el();var o=s.parentNode;var u=t.createElement("div");u.setAttribute("id","bc-player-placeholder");o.replaceChild(u,s);n.dispose();e.bc.disposedAfterPreroll_=true;var l=t.createElement("video-js");Object.keys(C).forEach(function(e){l.setAttribute(e,C[e])});o.replaceChild(l,u);var d=e.bc(C.id);d.bigPlayButton.hide();d.ready(function(){d.one("playing",function(){e.bc.disposedAfterPreroll_=false});var t=d.play();if(t.then){t.catch(function(){d.bigPlayButton.show()})}d.volume(i);d.muted(a)})})})}}s.plugins.forEach(function(e){var t=e.autoInit,r=e.name,i=e.options,n=i===void 0?{}:i;if(!t){return}var a=s.videoCloud&&s.videoCloud.bumper;if(r==="catalog"&&a&&a.id){var o=a.showControls,l=a.progressBarColor,d=a.preventSeeking;o=o&&Boolean(o)||true;l=l;d=Boolean(d);n.bumper=u(a,{showControls:o,progressBarColor:l,preventSeeking:d})}v(r,n)});var k=s.media,w=s.videoCloud;var A=k&&!!(k.sources||k.length&&k[0].sources);if(w&&w.policyKey&&!A){var P={embedHasPoster:s.embedState.poster,embedHasSources:s.embedState.sources,embedHasTracks:s.embedState.tracks,adConfigId:s.adConfigId,deliveryConfigId:s.deliveryConfigId,bumper:s.videoCloud&&s.videoCloud.bumper};if(w.playlist){n.trigger({type:"usage",name:"catalog-playlist"});P.playlistId=w.playlist}if(w.video){n.trigger({type:"usage",name:"catalog-video"});P.videoId=w.video}if(w.search){n.trigger({type:"usage",name:"catalog-search"});P.search=w.search}if(w.sequence){n.trigger({type:"usage",name:"catalog-sequence"});P.sequence=w.sequence}var O;if(s.usingIMAPrerollWithSSAI&&!e.bc.disposedAfterPreroll_){n.src({src:ct,type:"video/mp4"})}else if(w.autoLoad!==false){O=d.catalogMedia=n.catalog.autoFindAndLoadMedia(P)}if(O&&O.type==="video"){if(/^[\d]+$/.test(O.id)){n.mediainfo.id=O.id}else{n.mediainfo.referenceId=n.mediainfo.reference_id=O.id}}n.on("loadstart",function(){if(n.language()&&n.catalog.getMetadata({lang:n.language()})){n.trigger({type:"usage",name:"variant:"+n.language()})}})}if(n.usingPlugin("bcAnalytics")){var x=function e(){return(new Date).toISOString().split("T")[0]+":"+n.bcAnalytics.client.getSession()};n.ready(function(){De.perf.mark("bcInitEnd");De.perf.measure("bcInit","bcInitStart","bcInitEnd");if(n.usingPlugin("playerInfo")){n.playerInfo.modal.on("modalfill",function(){var e=x();var r=n.playerInfo.modal.$(".vjs-pi-section--player tbody");if(!e||!r){return}var i=t.createElement("tr");var a=t.createElement("tr");i.innerHTML="<td>"+n.localize("Session ID")+"</td> <td>"+e+"</td>";r.appendChild(i);a.innerHTML="<td>"+n.localize("Player Element ID")+"</td> <td>"+n.id()+"</td>";r.appendChild(a)})}});if(n.usingPlugin("errors")){n.errorDisplay.on("modalfill",function(){var e=x();var t=n.errorDisplay.$(".vjs-errors-content-container");if(!e||!t){return}t.appendChild(i.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 D=k&&(k[0]&&k[0].title||k.title)||"";var L=k&&(k[0]&&k[0].description||k.description)||"";var R=function e(){if(n.controls()){var t=n.mediainfo;var r=n.language()||"";var i;if(n.usingPlugin("catalog")){i=n.catalog.getMetadata({lang:r});if(!i){i=n.catalog.getMetadata({lang:r.substring(0,2)})}}n.dock({title:i&&i.name||t&&t.name||D,description:i&&i.description||t&&t.description||L})}};R();n.on(["loadstart","loadedmetadata","languagechange"],R)}return d};var pt=function e(t){var r=t.registerPlugin||t.plugin;r("touchActive",function(){if(!t.browser.TOUCH_ENABLED){return}var e=this;var r=false;var i=function t(){if(!r){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(){r=true});e.setTimeout(i,t)})})};var vt={"com.widevine.alpha":"Widevine","com.microsoft.playready":"PlayReady","com.apple.fps":"FairPlay"};var mt={'video/ogg; codecs="theora"':"Ogg",'video/mp4; codecs="avc1.42E01E"':"H.264",'video/mp4; codecs="hvc1"':"HEVC",'video/webm; codecs="vp8, vorbis"':"WebM",'video/webm; codecs="vp9"':"VP9",'application/x-mpegURL; codecs="avc1.42E01E"':"HLS","application/dash+xml":"DASH",'video/mp4; codecs="mp4a.40.2"':"AAC",'video/mp4; codecs="mp4a.6B"':"MP3",'video/mp4; codecs="ac-3"':"Dolby Digital/AC-3",'video/mp4; codecs="mp4a.a6"':"Dolby Digital Plus/EC-3/E-AC-3"};var gt=t.createElement("video");var yt={eme:Object.keys(vt).reduce(function(e,t){e[t]={name:vt[t],persistentState:false,support:false};return e},{support:Boolean(e.navigator.requestMediaKeySystemAccess||e.MSMediaKeys&&e.MSMediaKeys.isTypeSupported||e.WebKitMediaKeys&&e.WebKitMediaKeys.isTypeSupported)}),formats:Object.keys(mt).reduce(function(e,t){var r=mt[t];var i=gt.canPlayType(t);if(i){i=i.charAt(0).toUpperCase()+i.slice(1)}else{i="Not supported"}e[r]=i;return e},{}),mse:"MediaSource"in e};gt=null;if(!e.navigator.requestMediaKeySystemAccess){var _t=e.MSMediaKeys&&e.MSMediaKeys.isTypeSupported||e.WebKitMediaKeys&&e.WebKitMediaKeys.isTypeSupported||function(){return false};e.navigator.requestMediaKeySystemAccess=function(t,r){var i;var n;e.setTimeout(function(){var e=r.some(function(e){var r=[];if(e.audioCapabilities){r=r.concat(e.audioCapabilities)}if(e.videoCapabilities){r=r.concat(e.videoCapabilities)}return r.some(function(e){return!_t(t,e.contentType)})});if(e){n()}else{i()}});return{then:function e(t){i=t;return this},catch:function e(t){n=t;return this}}}}var bt={"com.widevine.alpha":{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"',robustness:"SW_SECURE_CRYPTO"}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"',robustness:"SW_SECURE_CRYPTO"}]},"com.microsoft.playready":{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]},"com.apple.fps":{initDataTypes:["sinf"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}};var Tt=function t(r,i){if(i===void 0){i={}}Object.keys(bt).forEach(function(t){var n=JSON.parse(JSON.stringify(bt[t]));if(i.persistentState){n.persistentState=i.persistentState}var a=function e(i){yt.eme[t][r]=false};try{e.navigator.requestMediaKeySystemAccess(t,[n]).then(function(){yt.eme[t][r]=true}).catch(a)}catch(e){a()}})};Tt("support");Tt("persistentState",{persistentState:"required"});function St(e){return e.mergeOptions(yt)}var Et=De.get;var It="unknown";var Ct=function t(r){var i=r.getComponent("ModalDialog");var n=r.dom;var a={adonly:"Ad-Only",ampSupport:"AMP Support",bcAa:"Adobe Analytics",bcGa:"Google Analytics",bcGtm:"Google Tag Manager",bcPlaylistUi:"Brightcove Playlist UI",bcTealium:"Tealium",chromecastReceiver:"Chromecast Receiver",customEndscreen:"Custom Endscreen",dash:"DASH",eme:"DRM",dvrux:"Live DVRUX",FreeWheelPlugin:"FreeWheel",ima3:"IMA3",kollective:"Kollective",onceux:"OnceUX",pip:"Picture-in-Picture",qualityMenu:"Quality Menu",social:"Social",ssai:"SSAI",thumbnails:"Thumbnails",vr:"VR"};var s=function e(t,r){if(r===void 0){r="vjs-two"}return n.createEl("table",{className:r},{},n.createEl("tbody",{},{},t))};var o=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}var a=r.map(function(e){return n.createEl("td",{},{},String(e))});return n.createEl("tr",{},{},a)};var u=function(t){Je(i,t);function i(){return t.apply(this,arguments)||this}var u=i.prototype;u.buildCSSClass=function e(){return"vjs-player-info-modal "+t.prototype.buildCSSClass.call(this)};u.dataForPlugins_=function e(){var t=this;return Object.keys(a).filter(r.getPlugin).sort().map(function(e){var i=t.player();var n=r.getPluginVersion(e)||Et(i,e+".VERSION",It);if(e==="eme"&&n===It&&r.drm&&r.drm.VERSION){n=r.drm.VERSION}return{active:i.usingPlugin(e),displayName:a[e],version:n}})};u.dataForSource_=function e(){var t=this.player();var r=t.currentSource()||{};var i=t.tech(true);return{keySystem:i?i.el().keySystem:null,mediainfo:t.mediainfo,tech:t.techName_,type:r.type,url:r.src}};u.dataForVhs_=function e(){var t=this.player();var r=t.tech(true);var i=r?r.vhs:null;if(!i){return null}var n={bandwidth:Et(i,"stats.bandwidth",It),mediaBytesTransferred:Et(i,"stats.mediaBytesTransferred",It),mediaTransferDuration:Et(i,"stats.mediaTransferDuration",It),mediaRequests:Et(i,"stats.mediaRequests",It),versions:i.version()};var a=Et(i,"playlists",{media:function e(){}}).media();if(a){n.rendition={height:Et(a,"attributes.RESOLUTION.height",It),width:Et(a,"attributes.RESOLUTION.width",It)}}return n};u.data=function t(){var i=this.player();var a=n.getAttributes(i.el());var s=Et(i,"bcinfo.accountId",Et(a,"data-account",It));var o=Et(i,"bcinfo.playerId",Et(a,"data-player",It));var u=Et(i,"bcinfo.embedId",Et(a,"data-embed",It));var l=Et(i,"bcinfo.applicationId",Et(a,"data-application-id","-"));var d=Et(e,"bc."+o+"_"+u+".VERSION",Et(e,"bc.VERSION",It));var c=Et(e,"bc."+o+"_"+u+".videojs.VERSION",Et(e,"videojs.VERSION",It));return{capabilities:St(r),player:{accountId:s,playerId:o,embedId:u,applicationId:l,playerVersion:d,videojsVersion:c,language:i.language()},plugins:this.dataForPlugins_(),source:this.dataForSource_(),vhs:this.dataForVhs_()}};u.contentForPlayer_=function e(t){var r=t.player;var i=[o("Brightcove Player Version",r.playerVersion),o("Video.js Version",r.videojsVersion),o("Account ID",r.accountId),o("Player ID",r.playerId),o("Embed ID",r.embedId),o("Application ID",r.applicationId)];return s(i)};u.contentForPlugins_=function e(t){var r=t.plugins.map(function(e){return o(e.displayName,e.version,e.active?"Yes":"No")});if(!r.length){r.push(n.createEl("tr",{innerHTML:'<td colspan="3">No plugins available.</td>'}))}var i=s(r);var a=n.createEl("thead",{innerHTML:"\n <tr>\n <th>Name</th>\n <th>Version</th>\n <th>Active?</th>\n </tr>\n ".trim()});i.insertBefore(a,i.querySelector("tbody"));return i};u.contentForSource_=function e(t){var r=t.source,i=r.keySystem,n=r.mediainfo,a=r.type;var u=[o("Current Media Type",a),o("DRM Key System",i||"n/a")];if(n){if(n.id){u.push(o("Video ID",n.id))}if(n.name){u.push(o("Video Name",n.name))}}return s(u)};u.contentForVhs_=function e(t){var r=t.vhs;var i=[];if(r){if(De.isObj(r.versions)){i.push(n.createEl("tr",{innerHTML:'<td colspan="2"><b>Library Versions</b></td>'}));Object.keys(r.versions).forEach(function(e){i.push(o(e,r.versions[e]))})}i.push(n.createEl("tr",{innerHTML:'<td colspan="2"><b>Statistics</b></td>'}),o("Current Bandwidth",r.bandwidth),o("Media Bytes Transferred",r.mediaBytesTransferred),o("Media Requests",r.mediaRequests),o("Media Transfer Duration",r.mediaTransferDuration));if(r.rendition){i.push(o("Rendition Width",r.rendition.width),o("Rendition Height",r.rendition.height))}}else{i.push(n.createEl("tr",{innerHTML:'<td colspan="2">Using native playback engine.</td>'}))}return s(i)};u.contentForCapabilities_=function e(t){var r=t.capabilities,i=r.eme,n=r.mse;var a=[o("Media Source Extensions",n?"Yes":"No"),o("Encrypted Media Extensions",i.support?"Yes":"No")];Object.keys(i).forEach(function(e){if(e==="support"){return}var t=i[e],r=t.name,n=t.persistentState,s=t.support;a.push(o(r,s?"Yes":"No"));if(s){a.push(o(r+" with persistentState",n?"Yes":"No"))}});return s(a)};u.contentForFormats_=function e(t){var r=t.capabilities.formats;var i=Object.keys(r).map(function(e){return o(e,r[e])});return s(i)};u.content=function e(){var t=this.data();return[n.createEl("div",{className:"vjs-pi-section"},{},[n.createEl("h2",{},{},"Player Information"),this.contentForPlayer_(t),n.createEl("h2",{},{},"Media Information"),this.contentForSource_(t),n.createEl("h2",{},{},"Player Plugins"),this.contentForPlugins_(t)]),n.createEl("div",{className:"vjs-pi-section"},{},[n.createEl("h2",{},{},"Playback Engine"),this.contentForVhs_(t),n.createEl("h2",{},{},"Device Capabilities"),this.contentForCapabilities_(t),n.createEl("h2",{},{},"Device Format Support"),this.contentForFormats_(t)])]};return i}(i);r.registerComponent("PlayerInfoModal",u);return u};var kt=function e(t){Ct(t);function r(){var e=this;if(this.playerInfo.modal){this.playerInfo.modal.dispose()}this.playerInfo=function(){r.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",r);r.VERSION=a};var wt=function e(t){var r=function e(t,r){if(typeof t.usingPlugin==="function"){return t.usingPlugin(r)}return!!t[r]};var i=function e(t){t.postrollFinished=false;t.postrollTimedOut=false;t.sawNoPostrollEvent=false};var n=function e(t){if(!r(t,"ads")){return false}var i=t.endscreenState_;if(i.sawNoPostrollEvent){return false}return!i.postrollFinished&&!i.postrollTimedOut};var s=function e(t){if(!r(t,"playlist")){return false}var i=t.playlist;var n=i();if(i.autoadvance_.delay!==0||!n.length){return false}return i.repeat()||i.currentItem()!==n.length-1};var o=function e(){var t=this;if(this.endscreenState_){return}var r=this.endscreenState_={};var a=function e(){t.trigger("endscreen")};i(r);this.on("adstart",function(){var e=t.ended();if(t.ads.adType==="postroll"){r.isPostroll=true}r.postrollFinished=!e});this.on("adend",function(){r.postrollFinished=t.ended()});this.on("adtimeout",function(){r.postrollTimedOut=t.ended()});this.on(["endscreen","loadstart"],function(){t.off("adend",a);i(r)});this.on("nopostroll",function(){r.sawNoPostrollEvent=true});this.on("ended",function(){if(s(t)){return}if(n(t)){t.one("adend",function(){if(r.isPostroll){a()}});return}a()})};o.VERSION=a;if(t.registerPlugin){if(!t.getPlugin("endscreen")){t.registerPlugin("endscreen",o)}}else{t.plugin("endscreen",o)}};var At=["audioTracks","textTracks","videoTracks","remoteTextTracks","addTextTrack","addRemoteTextTrack","removeRemoteTextTrack","scrubbing","ended"];var Pt=["handleKeyDown"];var Ot=function e(t,r){var i=function e(t){return function(e){if(e.isAdPlayerPatched_){return}var r=e.prototype;e.isAdPlayerPatched_=true;Object.defineProperty(r,"fsApi_",{get:function e(){return this.options_&&this.options_.contentPlayer&&this.options_.contentPlayer.fsApi_}});At.forEach(function(e){if(!(e in r)){r[e]=function(){}}});Pt.forEach(function(e){if(!r.hasOwnProperty(e)){r[e]=function(){}}});Object.defineProperty(t,"AdPlayer",{configurable:true,enumerable:true,get:function t(){return e},set:function e(){}});return e}};var n=function e(r){if(!r){Object.defineProperty(t,"ima3",{configurable:true,enumerable:true,get:function e(){},set:function r(i){e(i);Object.defineProperty(t,"ima3",{value:i})}});return}var n=i(r);if(!r.AdPlayer){Object.defineProperty(r,"AdPlayer",{configurable:true,enumerable:true,get:function e(){},set:n});return}n(r.AdPlayer)};if(t.ima3){n(t.ima3)}else{r.one("beforepluginsetup:ima3",function(){n(t.ima3)})}};var xt="vjs-waiting-for-autoplay";function Dt(e,r,i,n){var a=i.options_;var s=r.settings,o=r.environment;var u=s.accountId,l=s.applicationId,d=s.css,c=s.embedId,f=s.playerId;var h;i.mediainfo={accountId:u,account_id:u};i.bcinfo={accountId:u,applicationId:l,css:d,embedId:c,playerId:f,scriptUrl:o.scriptUrl,scriptBaseUrl:o.scriptBaseUrl};Object.defineProperty(i,"usingAdBlocker",{enumerable:true,value:We});Object.defineProperty(i,"getAutoplayConditions",{enumerable:true,value:function e(t){return n.getAutoplayConditions(t)}});Object.defineProperty(i,"getAccountId",{enumerable:true,value:function e(){return n.runtime.settings.accountId}});if(r.settings.allowAccountOverride){Object.defineProperty(i,"setAccountId",{enumerable:true,value:function t(r){if(De.isNil(r)){e.log.warn("account ID must be a string or number");return}n.runtime.settings.accountId=r;this.bcinfo.accountId=r;this.mediainfo.accountId=this.mediainfo.account_id=r}})}We().then(function(e){if(e){i.trigger({type:"usage",name:"using-ad-blocker"})}});i.addClass(s.classNames.player);i.addClass(s.classNames.playerInstance);var p=e.bind(i,i.dimension);i.dimension=function(e,t){if(e==="width"){Be(s,t,null)}else if(e==="height"){Be(s,null,t)}return p(e,t)};i.ready(function(){if(!a.autoplay){return}function e(){i.removeClass(xt)}if(!i.currentSrc()&&!h){e()}else{i.any(["autoplay-success","autoplay-failure","error"],e)}});if(s.fullscreenControl===false&&i.controls()){i.on("canplay",function(){if(!i.controlBar){return}var e=i.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){i.on("fullscreenchange",function(){var e=i.$(".vjs-tech");if(e.hasAttribute("controls")){e.removeAttribute("controls")}});if(s.embedState.playsinline&&s.embedState.muted){i.addClass("vjs-iphone")}}if(a.autoplay&&e.browser.IS_IOS&&e.browser.IS_ANY_SAFARI){var v=i.$(".vjs-tech");if(!v.autoplay){v.autoplay=true}}if(e.browser.IS_IOS&&s.embedState.muted){i.addClass("vjs-ios")}if(i.controls()){i.one("play",function(){if(!i.controlBar||!i.controls()){return}var e=i.controlBar.children();if(!e||!e.length){return}var t=["Enter","ArrowDown","ArrowUp","Up","Down"," ","Spacebar"];for(var r=0;r<e.length;r++){if(e[r].hasClass("vjs-menu-button-popup")&&!e[r].hasClass("vjs-hidden")){e[r].on("keyup",function(e){if(t.indexOf(e.key)>=0){i.controlBar.addClass("vjs-control-bar-visible")}})}}});if(i.controlBar){var m=i.controlBar.el();var g;var y=function e(){var r=t.activeElement;if(g!==r){g=r;i.controlBar.toggleClass("vjs-focus-within",m.contains(r))}};var _=function e(){m.removeEventListener("focus",y,true);m.removeEventListener("blur",y,true)};m.addEventListener("focus",y,true);m.addEventListener("blur",y,true);i.on("dispose",_);i.controlBar.on("dispose",_)}}Ot(e,i);i.one("beforepluginsetup:ads",function(){var t=i.getChild("controlBar");if(t){t.removeChild("pictureInPictureToggle")}e.getComponent("Component").prototype.fsApi_=i.fsApi_});if(!e.browser.TOUCH_ENABLED){i.addClass("vjs-mouse");if(o.isInBcFrame){e.dom.addClass(t.documentElement,"vjs-mouse")}}else if(e.browser.IS_IPHONE){i.addClass("vjs-native")}i.requestAnimationFrame(function(){var e=t.querySelector(".bc-wrap");i.addClass("vjs-plugins-ready");if(e){e.style.opacity=0}});i.on(["mouseenter","ended","touchend"],function(){i.removeClass("not-hover")});i.on("mouseleave",function(){i.addClass("not-hover");if(!i.controlBar||!i.controlBar.el()){return}if(i.controlBar.hasClass("vjs-control-bar-visible")){i.controlBar.removeClass("vjs-control-bar-visible")}});if(!e.browser.IS_ANY_SAFARI){i.one("loadeddata",function(){if(i.language()!==undefined&&i.catalog&&i.catalog.getMetadata().variants!==undefined){var e=i.language()||"";var t=i.textTracks();if(t){var r=Array.prototype.filter.call(t,function(e){return(e.kind==="captions"||e.kind==="subtitles")&&e.mode==="showing"});var n;var a;if(!r.length){for(a=0;a<t.length;a++){n=t[a];if((n.kind==="captions"||n.kind==="subtitles")&&n.language.toLowerCase()===e.toLowerCase()){n.mode="showing";return}}for(a=0;a<t.length;a++){n=t[a];if((n.kind==="captions"||n.kind==="subtitles")&&n.language.toLowerCase()===e.substring(0,2).toLowerCase()){n.mode="showing";return}}}}}})}var b;var T=function e(t){if(t){i.addClass("vjs-audio-mode")}else{i.removeClass("vjs-audio-mode")}};var S=function e(t){var r=i.getChild("PosterImage").el_.style;var n=function e(){var t=i.getChild("ControlBar");var n=t&&t.currentHeight();r.paddingBottom=n+"px";r.backgroundOrigin="content-box"};if(t){i.one("play",n)}else{i.off("play",n);r.paddingBottom="";r.backgroundOrigin=""}};i.on("loadedmetadata",function(){var e=i.currentSource().type.includes("audio");var t=i.audioPosterMode();var r=i.audioOnlyMode();if(!s.audioPosterMode&&!s.audioOnlyMode&&e&&!b||!t&&!r&&e&&b){i.audioPosterMode(true)}else if(!e&&t&&b){i.audioPosterMode(false)}b=true});i.on("audiopostermodechange",function(){var e=i.audioPosterMode();var t=i.audioOnlyMode();if(e){S(true);T(true)}else if(!t&&!e){S(false);T(false)}});i.on("audioonlymodechange",function(){var e=i.audioPosterMode();var t=i.audioOnlyMode();if(t){var r=i.currentHeight();var n=i.getChild("ControlBar");var a=n&&n.getChild("ProgressControl");var s=a?a.currentHeight():0;T(true);i.height(r+s)}else if(!t&&!e){T(false)}});if(s.videoCloud&&s.videoCloud.bumper){var E=i.getChild("ControlBar");var I=E.getChild("ProgressControl");var C=s.videoCloud.bumper;i.on("bumper-play",function(){if(C.preventSeeking){I.disable()}var e=E.getChild("NextButton");if(e){e.hide()}i.addClass("vjs-bumper-video")});i.on("bumper-ended",function(){if(C.preventSeeking){I.enable()}var e=E.getChild("NextButton");if(e){e.show()}i.removeClass("vjs-bumper-video")})}var k=o.bcShimDestripeTime;if(k!==undefined){if(k>1){i.trigger({type:"usage",name:"sdt-"+(Math.log(k)/Math.LN10).toFixed(1)})}else{i.trigger({type:"usage",name:"sdt-0.0"})}}i.ready(function(){if(i.bcinfo&&i.bcinfo.PLAYER_LOADER||o.brightcovePlayerLoader){i.trigger({type:"usage",name:"player-loader"})}if(i.bcinfo&&i.bcinfo.REACT_PLAYER_LOADER||o.BrightcoveReactPlayerLoader){i.trigger({type:"usage",name:"react-player-loader"})}});if(i.options_.debug){i.log.level("debug");i.log.history.enable()}else{i.log.level("off");i.log.history.disable()}var w=[{name:"proxyTracks",register:nt,opts:{debug:i.options_.debug}},{name:"seekEvents",register:lt,opts:{verbose:i.options_.debug}},{name:"touchActive",register:pt},{name:"urlparams",register:Xe,opts:{iframe:o.isInBcFrame,time:s.startTime}},{name:"playerInfo",register:kt},{name:"endscreen",register:wt},{name:"encryptedWatcher",register:st}];w.forEach(function(t){var r=t.name,n=t.opts,a=t.register;if(!i.hasPlugin(r)){a(e)}if(!i.usingPlugin(r)){i[r](n)}});var A=ht(e,i,r);h=A.catalogMedia;i.on("dispose",function(){i=a.runtime_=null;e.log.history.clear()})}function Lt(e,t,r){var i=e.videojs;var n=-1;return function a(s){var o=i.getPlayer(s);if(o){o.trigger({type:"usage",name:"bc-used-as-getter"});return o}n++;var u=e.getRuntime({playerIndex:n});i.hookOnce("beforesetup",function(e,r){r=ze(i,u,e,r);if(De.isFn(t)){return t(i,u,e,r)}return r});i.hookOnce("setup",function(t){Dt(i,u,t,e);if(De.isFn(r)){r(i,u,t)}});return i.apply(void 0,arguments)}}var Rt={accountId:"",adConfigId:"",applicationId:"",playsinline:false,loop:false,muted:false,autoplay:false,crossorigin:false,css:{},plugins:[],debug:false,contextMenu:{},deliveryConfigId:"",embedId:"default",misconfiguredWithMultipleAdPlugins:false,playerId:"default",skin:"luna",usingAdFailover:false,usingIMAPrerollWithSSAI:false,version:"0.0.0",videoCloud:null};var Nt={brightcovePlayerLoader:e.brightcovePlayerLoader,BrightcoveReactPlayerLoader:e.BrightcoveReactPlayerLoader,bcShimDestripeTime:e.bcShimDestripeTime,userAgent:e.navigator.userAgent};var Mt=function(){function r(e,t){if(e===void 0){e={}}if(t===void 0){t={}}var i=r.shared.videojs;if(!i){throw new Error("missing videojs")}this.runtime={environment:i.mergeOptions(Nt,t),settings:i.mergeOptions(Rt,e)};if(this.runtime.settings.misconfiguredWithMultipleAdPlugins){i.log.warn('Brightcove Player "'+this.runtime.settings.playerId+'" is mis-configured with multiple ad plugins.')}this.videojs=i;this.util=De;i.bc_=De;this.detectRuntimeEnvironment();this.setupGlobalEnv();De.perf.mark("bcAdBlockDetectStart");We().then(function(e){De.perf.mark("bcAdBlockDetectEnd");De.perf.measure("bcAdBlockDetect","bcAdBlockDetectStart","bcAdBlockDetectEnd")})}var i=r.prototype;i.getRuntime=function e(t){return this.videojs.mergeOptions(this.runtime,{settings:t})};i.getAutoplayConditions=function e(t){if(t===void 0){t="video"}var r=this.runtime.environment;if(!r.autoplay){r.autoplay={}}return Me(t,this.videojs).then(function(e){r.autoplay[t]=e;return e})};i.detectRuntimeEnvironment=function r(){var i=this.videojs.dom;var n=this.runtime.environment;var a=i.hasClass(t.documentElement,"bc-iframe");var s=De.qs();n.usingRequireJs=De.isFn(e.define)&&e.define.amd&&De.isFn(e.require&&e.require.toUrl);n.isInAnyFrame=i.isInFrame();n.isInBcFrame=a;n.queryString=a?s.search:{};n.urlHash=a?s.hash:{};this.setScriptUrl();this.setScriptBaseUrl()};i.setScriptUrl=function r(){var i=this.runtime.environment;if(i.isInBcFrame){i.scriptUrl=""}else if(i.usingRequireJs){i.scriptUrl=e.require.toUrl("bc")}else if(t.currentScript){i.scriptUrl=t.currentScript.src}else{var n=t.getElementsByTagName("script");i.scriptUrl=n.length&&n[n.length-1].src||""}};i.setScriptBaseUrl=function e(){var t=this.runtime.environment;if(t.scriptUrl){t.scriptBaseUrl=t.scriptUrl.split("/").slice(0,-1).join("/")}else{t.scriptBaseUrl="."}};i.safeSetGlobal=function t(r,i){if(!De.isNil(e[r])){return this.videojs.log.warn("setting window."+r+" would overwrite an existing global, skipping")}e[r]=i};i.setupGlobalEnv=function e(){var t=this;var r=this.videojs;var i=this.runtime.environment;var n=i.queryStringToWindow;if(!n||!i.isInBcFrame){return}var a=r.mergeOptions(i.queryString);if(n.target){this.safeSetGlobal(n.target,a)}if(Array.isArray(n.globals)){n.globals.forEach(function(e){t.safeSetGlobal(e,a[e])})}};i.createInitializer=function t(r,i){var n=this;var a=this.videojs;var s=e,o=s.bc;var u=this.runtime.settings,l=u.embedId,d=u.playerId,c=u.skin,f=u.version;var h=Lt(this,r,i);h.SKIN=c;h.VERSION=f;h.videojs=a;h[d+"_"+l]=h;if(o){Object.keys(o).forEach(function(e){var t=o[e];if(typeof t==="function"&&typeof t.videojs==="function"){h[e]=t;delete o[e]}})}Object.defineProperty(h,"usingAdBlocker",{enumerable:true,value:We});Object.defineProperty(h,"getAutoplayConditions",{enumerable:true,value:function e(t){return n.getAutoplayConditions(t)}});e.bc=h;return h};r.dedupeVideojs=function t(i,n){var a=i;r.shared.firstVideojs=n||i;if(n&&n.VERSION===i.VERSION){a=n}else if(e.bc){var s=Object.keys(e.bc);for(var o=0;o<s.length;o++){var u=s[o];var l=e.bc[u];if(typeof l==="function"&&typeof l.videojs==="function"){if(l.videojs.VERSION===i.VERSION){a=l.videojs;break}}}}e.videojs=a;r.shared.videojs=a;return a};r.restoreFirstVideojs=function t(){e.videojs=r.shared.firstVideojs};return r}();Mt.defaultSettings=Rt;Mt.shared={};Mt.VERSION=a;return Mt}(s);(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t():typeof r==="function"&&r.amd?r(t):(e=typeof globalThis!=="undefined"?globalThis:e||self,e.videojs=t())})(this,function(){"use strict";var r="7.20.3";var i={};var n=function e(t,r){i[t]=i[t]||[];if(r){i[t]=i[t].concat(r)}return i[t]};var a=function e(t,r){n(t,r)};var s=function e(t,r){var a=n(t).indexOf(r);if(a<=-1){return false}i[t]=i[t].slice();i[t].splice(a,1);return true};var o=function e(t,r){n(t,[].concat(r).map(function(e){var r=function r(){s(t,r);return e.apply(void 0,arguments)};return r}))};var u={prefixed:true};var l=[["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 d=l[0];var c;for(var f=0;f<l.length;f++){if(l[f][1]in t){c=l[f];break}}if(c){for(var h=0;h<c.length;h++){u[d[h]]=c[h]}u.prefixed=c[0]!==d[0]}var p=[];var v=function t(r,i){return function(t,n,a){var s=i.levels[n];var o=new RegExp("^("+s+")$");if(t!=="log"){a.unshift(t.toUpperCase()+":")}a.unshift(r+":");if(p){p.push([].concat(a));var u=p.length-1e3;p.splice(0,u>0?u:0)}if(!e.console){return}var l=e.console[t];if(!l&&t==="debug"){l=e.console.info||e.console.log}if(!l||!s||!o.test(t)){return}l[Array.isArray(a)?"apply":"call"](e.console,a)}};function m(e){var t="info";var r;var i=function e(){for(var i=arguments.length,n=new Array(i),a=0;a<i;a++){n[a]=arguments[a]}r("log",t,n)};r=v(e,i);i.createLogger=function(t){return m(e+": "+t)};i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t};i.level=function(e){if(typeof e==="string"){if(!i.levels.hasOwnProperty(e)){throw new Error('"'+e+'" in not a valid log level')}t=e}return t};i.history=function(){return p?[].concat(p):[]};i.history.filter=function(e){return(p||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})};i.history.clear=function(){if(p){p.length=0}};i.history.disable=function(){if(p!==null){p.length=0;p=null}};i.history.enable=function(){if(p===null){p=[]}};i.error=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("error",t,i)};i.warn=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("warn",t,i)};i.debug=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}return r("debug",t,i)};return i}var g=m("VIDEOJS");var y=g.createLogger;var _=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function b(e,t){return t={exports:{}},e(t,t.exports),t.exports}var T=b(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};return t.apply(this,arguments)}e.exports=t});var S=Object.prototype.toString;var E=function e(t){return w(t)?Object.keys(t):[]};function I(e,t){E(e).forEach(function(r){return t(e[r],r)})}function C(e,t,r){if(r===void 0){r=0}return E(e).reduce(function(r,i){return t(r,e[i],i)},r)}function k(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}if(Object.assign){return T.apply(void 0,[e].concat(r))}r.forEach(function(t){if(!t){return}I(t,function(t,r){e[r]=t})});return e}function w(e){return!!e&&typeof e==="object"}function A(e){return w(e)&&S.call(e)==="[object Object]"&&e.constructor===Object}function P(t,r){if(!t||!r){return""}if(typeof e.getComputedStyle==="function"){var i;try{i=e.getComputedStyle(t)}catch(e){return""}return i?i.getPropertyValue(r)||i[r]:""}return""}var O=e.navigator&&e.navigator.userAgent||"";var x=/AppleWebKit\/([\d.]+)/i.exec(O);var D=x?parseFloat(x.pop()):null;var L=/iPod/i.test(O);var R=function(){var e=O.match(/OS (\d+)_/i);if(e&&e[1]){return e[1]}return null}();var N=/Android/i.test(O);var M=function(){var e=O.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e){return null}var t=e[1]&&parseFloat(e[1]);var r=e[2]&&parseFloat(e[2]);if(t&&r){return parseFloat(e[1]+"."+e[2])}else if(t){return t}return null}();var U=N&&M<5&&D<537;var B=/Firefox/i.test(O);var F=/Edg/i.test(O);var j=!F&&(/Chrome/i.test(O)||/CriOS/i.test(O));var V=function(){var e=O.match(/(Chrome|CriOS)\/(\d+)/);if(e&&e[2]){return parseFloat(e[2])}return null}();var q=function(){var e=/MSIE\s(\d+)\.\d/.exec(O);var t=e&&parseFloat(e[1]);if(!t&&/Trident\/7.0/i.test(O)&&/rv:11.0/.test(O)){t=11}return t}();var H=/Safari/i.test(O)&&!j&&!N&&!F;var W=/Windows/i.test(O);var G=Boolean(ee()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch));var K=/iPad/i.test(O)||H&&G&&!/iPhone/i.test(O);var Y=/iPhone/i.test(O)&&!K;var z=Y||K||L;var X=(H||z)&&!j;var Q=Object.freeze({__proto__:null,IS_IPOD:L,IOS_VERSION:R,IS_ANDROID:N,ANDROID_VERSION:M,IS_NATIVE_ANDROID:U,IS_FIREFOX:B,IS_EDGE:F,IS_CHROME:j,CHROME_VERSION:V,IE_VERSION:q,IS_SAFARI:H,IS_WINDOWS:W,TOUCH_ENABLED:G,IS_IPAD:K,IS_IPHONE:Y,IS_IOS:z,IS_ANY_SAFARI:X});function $(e){return typeof e==="string"&&Boolean(e.trim())}function J(e){if(e.indexOf(" ")>=0){throw new Error("class has illegal whitespace characters")}}function Z(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function ee(){return t===e.document}function te(e){return w(e)&&e.nodeType===1}function re(){try{return e.parent!==e.self}catch(e){return true}}function ie(e){return function(r,i){if(!$(r)){return t[e](null)}if($(i)){i=t.querySelector(i)}var n=te(i)?i:t;return n[e]&&n[e](r)}}function ne(e,r,i,n){if(e===void 0){e="div"}if(r===void 0){r={}}if(i===void 0){i={}}var a=t.createElement(e);Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e];if(e.indexOf("aria-")!==-1||e==="role"||e==="type"){g.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 "+t+"."));a.setAttribute(e,t)}else if(e==="textContent"){ae(a,t)}else if(a[e]!==t||e==="tabIndex"){a[e]=t}});Object.getOwnPropertyNames(i).forEach(function(e){a.setAttribute(e,i[e])});if(n){Ie(a,n)}return a}function ae(e,t){if(typeof e.textContent==="undefined"){e.innerText=t}else{e.textContent=t}return e}function se(e,t){if(t.firstChild){t.insertBefore(e,t.firstChild)}else{t.appendChild(e)}}function oe(e,t){J(t);if(e.classList){return e.classList.contains(t)}return Z(t).test(e.className)}function ue(e,t){if(e.classList){e.classList.add(t)}else if(!oe(e,t)){e.className=(e.className+" "+t).trim()}return e}function le(e,t){if(!e){g.warn("removeClass was called with an element that doesn't exist");return null}if(e.classList){e.classList.remove(t)}else{J(t);e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")}return e}function de(e,t,r){var i=oe(e,t);if(typeof r==="function"){r=r(e,t)}if(typeof r!=="boolean"){r=!i}if(r===i){return}if(r){ue(e,t)}else{le(e,t)}return e}function ce(e,t){Object.getOwnPropertyNames(t).forEach(function(r){var i=t[r];if(i===null||typeof i==="undefined"||i===false){e.removeAttribute(r)}else{e.setAttribute(r,i===true?"":i)}})}function fe(e){var t={};var r=","+"autoplay,controls,playsinline,loop,muted,default,defaultMuted"+",";if(e&&e.attributes&&e.attributes.length>0){var i=e.attributes;for(var n=i.length-1;n>=0;n--){var a=i[n].name;var s=i[n].value;if(typeof e[a]==="boolean"||r.indexOf(","+a+",")!==-1){s=s!==null?true:false}t[a]=s}}return t}function he(e,t){return e.getAttribute(t)}function pe(e,t,r){e.setAttribute(t,r)}function ve(e,t){e.removeAttribute(t)}function me(){t.body.focus();t.onselectstart=function(){return false}}function ge(){t.onselectstart=function(){return true}}function ye(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect();var r={};["bottom","height","left","right","top","width"].forEach(function(e){if(t[e]!==undefined){r[e]=t[e]}});if(!r.height){r.height=parseFloat(P(e,"height"))}if(!r.width){r.width=parseFloat(P(e,"width"))}return r}}function _e(e){if(!e||e&&!e.offsetParent){return{left:0,top:0,width:0,height:0}}var r=e.offsetWidth;var i=e.offsetHeight;var n=0;var a=0;while(e.offsetParent&&e!==t[u.fullscreenElement]){n+=e.offsetLeft;a+=e.offsetTop;e=e.offsetParent}return{left:n,top:a,width:r,height:i}}function be(e,t){var r={x:0,y:0};if(z){var i=e;while(i&&i.nodeName.toLowerCase()!=="html"){var n=P(i,"transform");if(/^matrix/.test(n)){var a=n.slice(7,-1).split(/,\s/).map(Number);r.x+=a[4];r.y+=a[5]}else if(/^matrix3d/.test(n)){var s=n.slice(9,-1).split(/,\s/).map(Number);r.x+=s[12];r.y+=s[13]}i=i.parentNode}}var o={};var u=_e(t.target);var l=_e(e);var d=l.width;var c=l.height;var f=t.offsetY-(l.top-u.top);var h=t.offsetX-(l.left-u.left);if(t.changedTouches){h=t.changedTouches[0].pageX-l.left;f=t.changedTouches[0].pageY+l.top;if(z){h-=r.x;f-=r.y}}o.y=1-Math.max(0,Math.min(1,f/c));o.x=Math.max(0,Math.min(1,h/d));return o}function Te(e){return w(e)&&e.nodeType===3}function Se(e){while(e.firstChild){e.removeChild(e.firstChild)}return e}function Ee(e){if(typeof e==="function"){e=e()}return(Array.isArray(e)?e:[e]).map(function(e){if(typeof e==="function"){e=e()}if(te(e)||Te(e)){return e}if(typeof e==="string"&&/\S/.test(e)){return t.createTextNode(e)}}).filter(function(e){return e})}function Ie(e,t){Ee(t).forEach(function(t){return e.appendChild(t)});return e}function Ce(e,t){return Ie(Se(e),t)}function ke(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 we=ie("querySelector");var Ae=ie("querySelectorAll");var Pe=Object.freeze({__proto__:null,isReal:ee,isEl:te,isInFrame:re,createEl:ne,textContent:ae,prependTo:se,hasClass:oe,addClass:ue,removeClass:le,toggleClass:de,setAttributes:ce,getAttributes:fe,getAttribute:he,setAttribute:pe,removeAttribute:ve,blockTextSelection:me,unblockTextSelection:ge,getBoundingClientRect:ye,findPosition:_e,getPointerPosition:be,isTextNode:Te,emptyEl:Se,normalizeContent:Ee,appendContent:Ie,insertContent:Ce,isSingleLeftClick:ke,$:we,$$:Ae});var Oe=false;var xe;var De=function e(){if(xe.options.autoSetup===false){return}var r=Array.prototype.slice.call(t.getElementsByTagName("video"));var i=Array.prototype.slice.call(t.getElementsByTagName("audio"));var n=Array.prototype.slice.call(t.getElementsByTagName("video-js"));var a=r.concat(i,n);if(a&&a.length>0){for(var s=0,o=a.length;s<o;s++){var u=a[s];if(u&&u.getAttribute){if(u.player===undefined){var l=u.getAttribute("data-setup");if(l!==null){xe(u)}}}else{Le(1);break}}}else if(!Oe){Le(1)}};function Le(t,r){if(!ee()){return}if(r){xe=r}e.setTimeout(De,t)}function Re(){Oe=true;e.removeEventListener("load",Re)}if(ee()){if(t.readyState==="complete"){Re()}else{e.addEventListener("load",Re)}}var Ne=function e(r){var i=t.createElement("style");i.className=r;return i};var Me=function e(t,r){if(t.styleSheet){t.styleSheet.cssText=r}else{t.textContent=r}};var Ue=3;var Be=Ue;function Fe(){return Be++}var je;if(!e.WeakMap){je=function(){function t(){this.vdata="vdata"+Math.floor(e.performance&&e.performance.now()||Date.now());this.data={}}var r=t.prototype;r.set=function e(t,r){var i=t[this.vdata]||Fe();if(!t[this.vdata]){t[this.vdata]=i}this.data[i]=r;return this};r.get=function e(t){var r=t[this.vdata];if(r){return this.data[r]}g("We have no data for this element",t);return undefined};r.has=function e(t){var r=t[this.vdata];return r in this.data};r["delete"]=function e(t){var r=t[this.vdata];if(r){delete this.data[r];delete t[this.vdata]}};return t}()}var Ve=e.WeakMap?new WeakMap:new je;function qe(e,t){if(!Ve.has(e)){return}var r=Ve.get(e);if(r.handlers[t].length===0){delete r.handlers[t];if(e.removeEventListener){e.removeEventListener(t,r.dispatcher,false)}else if(e.detachEvent){e.detachEvent("on"+t,r.dispatcher)}}if(Object.getOwnPropertyNames(r.handlers).length<=0){delete r.handlers;delete r.dispatcher;delete r.disabled}if(Object.getOwnPropertyNames(r).length===0){Ve["delete"](e)}}function He(e,t,r,i){r.forEach(function(r){e(t,r,i)})}function We(r){if(r.fixed_){return r}function i(){return true}function n(){return false}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){var a=r||e.event;r={};for(var s in a){if(s!=="layerX"&&s!=="layerY"&&s!=="keyLocation"&&s!=="webkitMovementX"&&s!=="webkitMovementY"&&s!=="path"){if(!(s==="returnValue"&&a.preventDefault)){r[s]=a[s]}}}if(!r.target){r.target=r.srcElement||t}if(!r.relatedTarget){r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement}r.preventDefault=function(){if(a.preventDefault){a.preventDefault()}r.returnValue=false;a.returnValue=false;r.defaultPrevented=true};r.defaultPrevented=false;r.stopPropagation=function(){if(a.stopPropagation){a.stopPropagation()}r.cancelBubble=true;a.cancelBubble=true;r.isPropagationStopped=i};r.isPropagationStopped=n;r.stopImmediatePropagation=function(){if(a.stopImmediatePropagation){a.stopImmediatePropagation()}r.isImmediatePropagationStopped=i;r.stopPropagation()};r.isImmediatePropagationStopped=n;if(r.clientX!==null&&r.clientX!==undefined){var o=t.documentElement;var u=t.body;r.pageX=r.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0);r.pageY=r.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}r.which=r.charCode||r.keyCode;if(r.button!==null&&r.button!==undefined){r.button=r.button&1?0:r.button&4?1:r.button&2?2:0}}r.fixed_=true;return r}var Ge;var Ke=function t(){if(typeof Ge!=="boolean"){Ge=false;try{var r=Object.defineProperty({},"passive",{get:function e(){Ge=true}});e.addEventListener("test",null,r);e.removeEventListener("test",null,r)}catch(e){}}return Ge};var Ye=["touchstart","touchmove"];function ze(e,t,r){if(Array.isArray(t)){return He(ze,e,t,r)}if(!Ve.has(e)){Ve.set(e,{})}var i=Ve.get(e);if(!i.handlers){i.handlers={}}if(!i.handlers[t]){i.handlers[t]=[]}if(!r.guid){r.guid=Fe()}i.handlers[t].push(r);if(!i.dispatcher){i.disabled=false;i.dispatcher=function(t,r){if(i.disabled){return}t=We(t);var n=i.handlers[t.type];if(n){var a=n.slice(0);for(var s=0,o=a.length;s<o;s++){if(t.isImmediatePropagationStopped()){break}else{try{a[s].call(e,t,r)}catch(e){g.error(e)}}}}}}if(i.handlers[t].length===1){if(e.addEventListener){var n=false;if(Ke()&&Ye.indexOf(t)>-1){n={passive:true}}e.addEventListener(t,i.dispatcher,n)}else if(e.attachEvent){e.attachEvent("on"+t,i.dispatcher)}}}function Xe(e,t,r){if(!Ve.has(e)){return}var i=Ve.get(e);if(!i.handlers){return}if(Array.isArray(t)){return He(Xe,e,t,r)}var n=function e(t,r){i.handlers[r]=[];qe(t,r)};if(t===undefined){for(var a in i.handlers){if(Object.prototype.hasOwnProperty.call(i.handlers||{},a)){n(e,a)}}return}var s=i.handlers[t];if(!s){return}if(!r){n(e,t);return}if(r.guid){for(var o=0;o<s.length;o++){if(s[o].guid===r.guid){s.splice(o--,1)}}}qe(e,t)}function Qe(e,t,r){var i=Ve.has(e)?Ve.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=We(t);if(i.dispatcher){i.dispatcher.call(e,t,r)}if(n&&!t.isPropagationStopped()&&t.bubbles===true){Qe.call(null,n,t,r)}else if(!n&&!t.defaultPrevented&&t.target&&t.target[t.type]){if(!Ve.has(t.target)){Ve.set(t.target,{})}var a=Ve.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,r){if(Array.isArray(t)){return He($e,e,t,r)}var i=function i(){Xe(e,t,i);r.apply(this,arguments)};i.guid=r.guid=r.guid||Fe();ze(e,t,i)}function Je(e,t,r){var i=function i(){Xe(e,t,i);r.apply(this,arguments)};i.guid=r.guid=r.guid||Fe();ze(e,t,i)}var Ze=Object.freeze({__proto__:null,fixEvent:We,on:ze,off:Xe,trigger:Qe,one:$e,any:Je});var et=30;var tt=function e(t,r,i){if(!r.guid){r.guid=Fe()}var n=r.bind(t);n.guid=i?i+"_"+r.guid:r.guid;return n};var rt=function t(r,i){var n=e.performance.now();var a=function t(){var a=e.performance.now();if(a-n>=i){r.apply(void 0,arguments);n=a}};return a};var it=function t(r,i,n,a){if(a===void 0){a=e}var s;var o=function e(){a.clearTimeout(s);s=null};var u=function e(){var t=this;var o=arguments;var u=function e(){s=null;u=null;if(!n){r.apply(t,o)}};if(!s&&n){r.apply(t,o)}a.clearTimeout(s);s=a.setTimeout(u,i)};u.cancel=o;return u};var nt=function e(){};nt.prototype.allowedEvents_={};nt.prototype.on=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};ze(this,e,t);this.addEventListener=r};nt.prototype.addEventListener=nt.prototype.on;nt.prototype.off=function(e,t){Xe(this,e,t)};nt.prototype.removeEventListener=nt.prototype.off;nt.prototype.one=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};$e(this,e,t);this.addEventListener=r};nt.prototype.any=function(e,t){var r=this.addEventListener;this.addEventListener=function(){};Je(this,e,t);this.addEventListener=r};nt.prototype.trigger=function(e){var t=e.type||e;if(typeof e==="string"){e={type:t}}e=We(e);if(this.allowedEvents_[t]&&this["on"+t]){this["on"+t](e)}Qe(this,e)};nt.prototype.dispatchEvent=nt.prototype.trigger;var at;nt.prototype.queueTrigger=function(t){var r=this;if(!at){at=new Map}var i=t.type||t;var n=at.get(this);if(!n){n=new Map;at.set(this,n)}var a=n.get(i);n["delete"](i);e.clearTimeout(a);var s=e.setTimeout(function(){if(n.size===0){n=null;at["delete"](r)}r.trigger(t)},0);n.set(i,s)};var st=function e(t){if(typeof t.name==="function"){return t.name()}if(typeof t.name==="string"){return t.name}if(t.name_){return t.name_}if(t.constructor&&t.constructor.name){return t.constructor.name}return typeof t};var ot=function e(t){return t instanceof nt||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return typeof t[e]==="function"})};var ut=function e(t,r){if(ot(t)){r()}else{if(!t.eventedCallbacks){t.eventedCallbacks=[]}t.eventedCallbacks.push(r)}};var lt=function e(t){return typeof t==="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length};var dt=function e(t,r,i){if(!t||!t.nodeName&&!ot(t)){throw new Error("Invalid target for "+st(r)+"#"+i+"; must be a DOM node or evented object.")}};var ct=function e(t,r,i){if(!lt(t)){throw new Error("Invalid event type for "+st(r)+"#"+i+"; must be a non-empty string or array.")}};var ft=function e(t,r,i){if(typeof t!=="function"){throw new Error("Invalid listener for "+st(r)+"#"+i+"; must be a function.")}};var ht=function e(t,r,i){var n=r.length<3||r[0]===t||r[0]===t.eventBusEl_;var a;var s;var o;if(n){a=t.eventBusEl_;if(r.length>=3){r.shift()}s=r[0];o=r[1]}else{a=r[0];s=r[1];o=r[2]}dt(a,t,i);ct(s,t,i);ft(o,t,i);o=tt(t,o);return{isTargetingSelf:n,target:a,type:s,listener:o}};var pt=function e(t,r,i,n){dt(t,t,r);if(t.nodeName){Ze[r](t,i,n)}else{t[r](i,n)}};var vt={on:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=ht(this,i,"on"),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;pt(o,"on",u,l);if(!s){var d=function e(){return t.off(o,u,l)};d.guid=l.guid;var c=function e(){return t.off("dispose",d)};c.guid=l.guid;pt(this,"on","dispose",d);pt(o,"on","dispose",c)}},one:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=ht(this,i,"one"),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;if(s){pt(o,"one",u,l)}else{var d=function e(){t.off(o,u,e);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}l.apply(null,i)};d.guid=l.guid;pt(o,"one",u,d)}},any:function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}var a=ht(this,i,"any"),s=a.isTargetingSelf,o=a.target,u=a.type,l=a.listener;if(s){pt(o,"any",u,l)}else{var d=function e(){t.off(o,u,e);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}l.apply(null,i)};d.guid=l.guid;pt(o,"any",u,d)}},off:function e(t,r,i){if(!t||lt(t)){Xe(this.eventBusEl_,t,r)}else{var n=t;var a=r;dt(n,this,"off");ct(a,this,"off");ft(i,this,"off");i=tt(this,i);this.off("dispose",i);if(n.nodeName){Xe(n,a,i);Xe(n,"dispose",i)}else if(ot(n)){n.off(a,i);n.off("dispose",i)}}},trigger:function e(t,r){dt(this.eventBusEl_,this,"trigger");var i=t&&typeof t!=="string"?t.type:t;if(!lt(i)){var n="Invalid event type for "+st(this)+"#trigger; "+"must be a non-empty string or object with a type key that has a non-empty value.";if(t){(this.log||g).error(n)}else{throw new Error(n)}}return Qe(this.eventBusEl_,t,r)}};function mt(t,r){if(r===void 0){r={}}var i=r,n=i.eventBusKey;if(n){if(!t[n].nodeName){throw new Error('The eventBusKey "'+n+'" does not refer to an element.')}t.eventBusEl_=t[n]}else{t.eventBusEl_=ne("span",{className:"vjs-event-bus"})}k(t,vt);if(t.eventedCallbacks){t.eventedCallbacks.forEach(function(e){e()})}t.on("dispose",function(){t.off();[t,t.el_,t.eventBusEl_].forEach(function(e){if(e&&Ve.has(e)){Ve["delete"](e)}});e.setTimeout(function(){t.eventBusEl_=null},0)});return t}var gt={state:{},setState:function e(t){var r=this;if(typeof t==="function"){t=t()}var i;I(t,function(e,t){if(r.state[t]!==e){i=i||{};i[t]={from:r.state[t],to:e}}r.state[t]=e});if(i&&ot(this)){this.trigger({changes:i,type:"statechanged"})}return i}};function yt(e,t){k(e,gt);e.state=k({},e.state,t);if(typeof e.handleStateChanged==="function"&&ot(e)){e.on("statechanged",e.handleStateChanged)}return e}var _t=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toLowerCase()})};var bt=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toUpperCase()})};var Tt=function e(t,r){return bt(t)===bt(r)};function St(){var e={};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}r.forEach(function(t){if(!t){return}I(t,function(t,r){if(!A(t)){e[r]=t;return}if(!A(e[r])){e[r]={}}e[r]=St(e[r],t)})});return e}var Et=function(){function e(){this.map_={}}var t=e.prototype;t.has=function e(t){return t in this.map_};t["delete"]=function e(t){var r=this.has(t);delete this.map_[t];return r};t.set=function e(t,r){this.map_[t]=r;return this};t.forEach=function e(t,r){for(var i in this.map_){t.call(r,this.map_[i],i,this)}};return e}();var It=e.Map?e.Map:Et;var Ct=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 r=this.has(t);delete this.set_[t];return r};t.add=function e(t){this.set_[t]=1;return this};t.forEach=function e(t,r){for(var i in this.set_){t.call(r,i,i,this)}};return e}();var kt=e.Set?e.Set:Ct;var wt=b(function(e,t){function r(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;if(t)e=t}if("number"===typeof e)return s[e];var r=String(e);var a=i[r.toLowerCase()];if(a)return a;var a=n[r.toLowerCase()];if(a)return a;if(r.length===1)return r.charCodeAt(0);return undefined}r.isEventKey=function e(t,r){if(t&&"object"===typeof t){var a=t.which||t.keyCode||t.charCode;if(a===null||a===undefined){return false}if(typeof r==="string"){var s=i[r.toLowerCase()];if(s){return s===a}var s=n[r.toLowerCase()];if(s){return s===a}}else if(typeof r==="number"){return r===a}return false}};t=e.exports=r;var i=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};var n=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++){i[String.fromCharCode(a)]=a-32}for(var a=48;a<58;a++){i[a-48]=a}for(a=1;a<13;a++){i["f"+a]=a+111}for(a=0;a<10;a++){i["numpad "+a]=a+96}var s=t.names=t.title={};for(a in i){s[i[a]]=a}for(var o in n){i[o]=n[o]}});wt.code;wt.codes;wt.aliases;wt.names;wt.title;var At=function(){function t(e,t,r){var i=this;if(!e&&this.play){this.player_=e=this}else{this.player_=e}this.isDisposed_=false;this.parentComponent_=null;this.options_=St({},this.options_);t=this.options_=St(this.options_,t);this.id_=t.id||t.el&&t.el.id;if(!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+Fe()}this.name_=t.name||null;if(t.el){this.el_=t.el}else if(t.createEl!==false){this.el_=this.createEl()}if(t.className&&this.el_){t.className.split(" ").forEach(function(e){return i.addClass(e)})}if(t.evented!==false){mt(this,{eventBusKey:this.el_?"el_":null});this.handleLanguagechange=this.handleLanguagechange.bind(this);this.on(this.player_,"languagechange",this.handleLanguagechange)}yt(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};this.setTimeoutIds_=new kt;this.setIntervalIds_=new kt;this.rafIds_=new kt;this.namedRafs_=new It;this.clearingTimersOnDispose_=false;if(t.initChildren!==false){this.initChildren()}this.ready(r);if(t.reportTouchActivity!==false){this.enableTouchActivity()}}var r=t.prototype;r.dispose=function e(t){if(t===void 0){t={}}if(this.isDisposed_){return}if(this.readyQueue_){this.readyQueue_.length=0}this.trigger({type:"dispose",bubbles:false});this.isDisposed_=true;if(this.children_){for(var r=this.children_.length-1;r>=0;r--){if(this.children_[r].dispose){this.children_[r].dispose()}}}this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.parentComponent_=null;if(this.el_){if(this.el_.parentNode){if(t.restoreEl){this.el_.parentNode.replaceChild(t.restoreEl,this.el_)}else{this.el_.parentNode.removeChild(this.el_)}}this.el_=null}this.player_=null};r.isDisposed=function e(){return Boolean(this.isDisposed_)};r.player=function e(){return this.player_};r.options=function e(t){if(!t){return this.options_}this.options_=St(this.options_,t);return this.options_};r.el=function e(){return this.el_};r.createEl=function e(t,r,i){return ne(t,r,i)};r.localize=function e(t,r,i){if(i===void 0){i=t}var n=this.player_.language&&this.player_.language();var a=this.player_.languages&&this.player_.languages();var s=a&&a[n];var o=n&&n.split("-")[0];var u=a&&a[o];var l=i;if(s&&s[t]){l=s[t]}else if(u&&u[t]){l=u[t]}if(r){l=l.replace(/\{(\d+)\}/g,function(e,t){var i=r[t-1];var n=i;if(typeof i==="undefined"){n=e}return n})}return l};r.handleLanguagechange=function e(){};r.contentEl=function e(){return this.contentEl_||this.el_};r.id=function e(){return this.id_};r.name=function e(){return this.name_};r.children=function e(){return this.children_};r.getChildById=function e(t){return this.childIndex_[t]};r.getChild=function e(t){if(!t){return}return this.childNameIndex_[t]};r.getDescendant=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}r=r.reduce(function(e,t){return e.concat(t)},[]);var n=this;for(var a=0;a<r.length;a++){n=n.getChild(r[a]);if(!n||!n.getChild){return}}return n};r.addChild=function e(r,i,n){if(i===void 0){i={}}if(n===void 0){n=this.children_.length}var a;var s;if(typeof r==="string"){s=bt(r);var o=i.componentClass||s;i.name=s;var u=t.getComponent(o);if(!u){throw new Error("Component "+o+" does not exist")}if(typeof u!=="function"){return null}a=new u(this.player_||this,i)}else{a=r}if(a.parentComponent_){a.parentComponent_.removeChild(a)}this.children_.splice(n,0,a);a.parentComponent_=this;if(typeof a.id==="function"){this.childIndex_[a.id()]=a}s=s||a.name&&bt(a.name());if(s){this.childNameIndex_[s]=a;this.childNameIndex_[_t(s)]=a}if(typeof a.el==="function"&&a.el()){var l=null;if(this.children_[n+1]){if(this.children_[n+1].el_){l=this.children_[n+1].el_}else if(te(this.children_[n+1])){l=this.children_[n+1]}}this.contentEl().insertBefore(a.el(),l)}return a};r.removeChild=function e(t){if(typeof t==="string"){t=this.getChild(t)}if(!t||!this.children_){return}var r=false;for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i]===t){r=true;this.children_.splice(i,1);break}}if(!r){return}t.parentComponent_=null;this.childIndex_[t.id()]=null;this.childNameIndex_[bt(t.name())]=null;this.childNameIndex_[_t(t.name())]=null;var n=t.el();if(n&&n.parentNode===this.contentEl()){this.contentEl().removeChild(t.el())}};r.initChildren=function e(){var r=this;var i=this.options_.children;if(i){var n=this.options_;var a=function e(t){var i=t.name;var a=t.opts;if(n[i]!==undefined){a=n[i]}if(a===false){return}if(a===true){a={}}a.playerOptions=r.options_.playerOptions;var s=r.addChild(i,a);if(s){r[i]=s}};var s;var o=t.getComponent("Tech");if(Array.isArray(i)){s=i}else{s=Object.keys(i)}s.concat(Object.keys(this.options_).filter(function(e){return!s.some(function(t){if(typeof t==="string"){return e===t}return e===t.name})})).map(function(e){var t;var n;if(typeof e==="string"){t=e;n=i[t]||r.options_[t]||{}}else{t=e.name;n=e}return{name:t,opts:n}}).filter(function(e){var r=t.getComponent(e.opts.componentClass||bt(e.name));return r&&!o.isTech(r)}).forEach(a)}};r.buildCSSClass=function e(){return""};r.ready=function e(t,r){if(r===void 0){r=false}if(!t){return}if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(t);return}if(r){t.call(this)}else{this.setTimeout(t,1)}};r.triggerReady=function e(){this.isReady_=true;this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[];if(e&&e.length>0){e.forEach(function(e){e.call(this)},this)}this.trigger("ready")},1)};r.$=function e(t,r){return we(t,r||this.contentEl())};r.$$=function e(t,r){return Ae(t,r||this.contentEl())};r.hasClass=function e(t){return oe(this.el_,t)};r.addClass=function e(t){ue(this.el_,t)};r.removeClass=function e(t){le(this.el_,t)};r.toggleClass=function e(t,r){de(this.el_,t,r)};r.show=function e(){this.removeClass("vjs-hidden")};r.hide=function e(){this.addClass("vjs-hidden")};r.lockShowing=function e(){this.addClass("vjs-lock-showing")};r.unlockShowing=function e(){this.removeClass("vjs-lock-showing")};r.getAttribute=function e(t){return he(this.el_,t)};r.setAttribute=function e(t,r){pe(this.el_,t,r)};r.removeAttribute=function e(t){ve(this.el_,t)};r.width=function e(t,r){return this.dimension("width",t,r)};r.height=function e(t,r){return this.dimension("height",t,r)};r.dimensions=function e(t,r){this.width(t,true);this.height(r)};r.dimension=function e(t,r,i){if(r!==undefined){if(r===null||r!==r){r=0}if((""+r).indexOf("%")!==-1||(""+r).indexOf("px")!==-1){this.el_.style[t]=r}else if(r==="auto"){this.el_.style[t]=""}else{this.el_.style[t]=r+"px"}if(!i){this.trigger("componentresize")}return}if(!this.el_){return 0}var n=this.el_.style[t];var a=n.indexOf("px");if(a!==-1){return parseInt(n.slice(0,a),10)}return parseInt(this.el_["offset"+bt(t)],10)};r.currentDimension=function e(t){var r=0;if(t!=="width"&&t!=="height"){throw new Error("currentDimension only accepts width or height value")}r=P(this.el_,t);r=parseFloat(r);if(r===0||isNaN(r)){var i="offset"+bt(t);r=this.el_[i]}return r};r.currentDimensions=function e(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};r.currentWidth=function e(){return this.currentDimension("width")};r.currentHeight=function e(){return this.currentDimension("height")};r.focus=function e(){this.el_.focus()};r.blur=function e(){this.el_.blur()};r.handleKeyDown=function e(t){if(this.player_){if(!wt.isEventKey(t,"Tab")){t.stopPropagation()}this.player_.handleKeyDown(t)}};r.handleKeyPress=function e(t){this.handleKeyDown(t)};r.emitTapEvents=function t(){var r=0;var i=null;var n=10;var a=200;var s;this.on("touchstart",function(t){if(t.touches.length===1){i={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY};r=e.performance.now();s=true}});this.on("touchmove",function(e){if(e.touches.length>1){s=false}else if(i){var t=e.touches[0].pageX-i.pageX;var r=e.touches[0].pageY-i.pageY;var a=Math.sqrt(t*t+r*r);if(a>n){s=false}}});var o=function e(){s=false};this.on("touchleave",o);this.on("touchcancel",o);this.on("touchend",function(t){i=null;if(s===true){var n=e.performance.now()-r;if(n<a){t.preventDefault();this.trigger("tap")}}})};r.enableTouchActivity=function e(){if(!this.player()||!this.player().reportUserActivity){return}var t=tt(this.player(),this.player().reportUserActivity);var r;this.on("touchstart",function(){t();this.clearInterval(r);r=this.setInterval(t,250)});var i=function e(i){t();this.clearInterval(r)};this.on("touchmove",t);this.on("touchend",i);this.on("touchcancel",i)};r.setTimeout=function t(r,i){var n=this;var a;r=tt(this,r);this.clearTimersOnDispose_();a=e.setTimeout(function(){if(n.setTimeoutIds_.has(a)){n.setTimeoutIds_["delete"](a)}r()},i);this.setTimeoutIds_.add(a);return a};r.clearTimeout=function t(r){if(this.setTimeoutIds_.has(r)){this.setTimeoutIds_["delete"](r);e.clearTimeout(r)}return r};r.setInterval=function t(r,i){r=tt(this,r);this.clearTimersOnDispose_();var n=e.setInterval(r,i);this.setIntervalIds_.add(n);return n};r.clearInterval=function t(r){if(this.setIntervalIds_.has(r)){this.setIntervalIds_["delete"](r);e.clearInterval(r)}return r};r.requestAnimationFrame=function t(r){var i=this;if(!this.supportsRaf_){return this.setTimeout(r,1e3/60)}this.clearTimersOnDispose_();var n;r=tt(this,r);n=e.requestAnimationFrame(function(){if(i.rafIds_.has(n)){i.rafIds_["delete"](n)}r()});this.rafIds_.add(n);return n};r.requestNamedAnimationFrame=function e(t,r){var i=this;if(this.namedRafs_.has(t)){return}this.clearTimersOnDispose_();r=tt(this,r);var n=this.requestAnimationFrame(function(){r();if(i.namedRafs_.has(t)){i.namedRafs_["delete"](t)}});this.namedRafs_.set(t,n);return t};r.cancelNamedAnimationFrame=function e(t){if(!this.namedRafs_.has(t)){return}this.cancelAnimationFrame(this.namedRafs_.get(t));this.namedRafs_["delete"](t)};r.cancelAnimationFrame=function t(r){if(!this.supportsRaf_){return this.clearTimeout(r)}if(this.rafIds_.has(r)){this.rafIds_["delete"](r);e.cancelAnimationFrame(r)}return r};r.clearTimersOnDispose_=function e(){var t=this;if(this.clearingTimersOnDispose_){return}this.clearingTimersOnDispose_=true;this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var r=e[0],i=e[1];t[r].forEach(function(e,r){return t[i](r)})});t.clearingTimersOnDispose_=false})};t.registerComponent=function e(r,i){if(typeof r!=="string"||!r){throw new Error('Illegal component name, "'+r+'"; must be a non-empty string.')}var n=t.getComponent("Tech");var a=n&&n.isTech(i);var s=t===i||t.prototype.isPrototypeOf(i.prototype);if(a||!s){var o;if(a){o="techs must be registered using Tech.registerTech()"}else{o="must be a Component subclass"}throw new Error('Illegal component, "'+r+'"; '+o+".")}r=bt(r);if(!t.components_){t.components_={}}var u=t.getComponent("Player");if(r==="Player"&&u&&u.players){var l=u.players;var d=Object.keys(l);if(l&&d.length>0&&d.map(function(e){return l[e]}).every(Boolean)){throw new Error("Can not register Player component after player has been created.")}}t.components_[r]=i;t.components_[_t(r)]=i;return i};t.getComponent=function e(r){if(!r||!t.components_){return}return t.components_[r]};return t}();At.prototype.supportsRaf_=typeof e.requestAnimationFrame==="function"&&typeof e.cancelAnimationFrame==="function";At.registerComponent("Component",At);function Pt(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var Ot=Pt;function xt(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var Dt=xt;function Lt(e,t,r){if(typeof t!=="number"||t<0||t>r){throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+r+").")}}function Rt(e,t,r,i){Lt(e,i,r.length-1);return r[i][t]}function Nt(t){var r;if(t===undefined||t.length===0){r={length:0,start:function e(){throw new Error("This TimeRanges object is empty")},end:function e(){throw new Error("This TimeRanges object is empty")}}}else{r={length:t.length,start:Rt.bind(null,"start",0,t),end:Rt.bind(null,"end",1,t)}}if(e.Symbol&&e.Symbol.iterator){r[e.Symbol.iterator]=function(){return(t||[]).values()}}return r}function Mt(e,t){if(Array.isArray(e)){return Nt(e)}else if(e===undefined||t===undefined){return Nt()}return Nt([[e,t]])}function Ut(e,t){var r=0;var i;var n;if(!t){return 0}if(!e||!e.length){e=Mt(0,0)}for(var a=0;a<e.length;a++){i=e.start(a);n=e.end(a);if(n>t){n=t}r+=n-i}return r/t}function Bt(e){if(e instanceof Bt){return e}if(typeof e==="number"){this.code=e}else if(typeof e==="string"){this.message=e}else if(w(e)){if(typeof e.code==="number"){this.code=e.code}k(this,e)}if(!this.message){this.message=Bt.defaultMessages[this.code]||""}}Bt.prototype.code=0;Bt.prototype.message="";Bt.prototype.status=null;Bt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Bt.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 Ft=0;Ft<Bt.errorTypes.length;Ft++){Bt[Bt.errorTypes[Ft]]=Ft;Bt.prototype[Bt.errorTypes[Ft]]=Ft}var jt=Vt;function Vt(e,t){var r;var i=null;try{r=JSON.parse(e,t)}catch(e){i=e}return[i,r]}function qt(e){return e!==undefined&&e!==null&&typeof e.then==="function"}function Ht(e){if(qt(e)){e.then(null,function(e){})}}var Wt=function e(t){var r=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,r,i){if(t[r]){e[r]=t[r]}return e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})});return r};var Gt=function e(t){var r=t.$$("track");var i=Array.prototype.map.call(r,function(e){return e.track});var n=Array.prototype.map.call(r,function(e){var t=Wt(e.track);if(e.src){t.src=e.src}return t});return n.concat(Array.prototype.filter.call(t.textTracks(),function(e){return i.indexOf(e)===-1}).map(Wt))};var Kt=function e(t,r){t.forEach(function(e){var t=r.addRemoteTextTrack(e).track;if(!e.src&&e.cues){e.cues.forEach(function(e){return t.addCue(e)})}});return r.textTracks()};var Yt={textTracksToJson:Gt,jsonToTextTracks:Kt,trackToJson_:Wt};var zt="vjs-modal-dialog";var Xt=function(r){Dt(i,r);function i(e,t){var i;i=r.call(this,e,t)||this;i.handleKeyDown_=function(e){return i.handleKeyDown(e)};i.close_=function(e){return i.close(e)};i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=false;i.closeable(!i.options_.uncloseable);i.content(i.options_.content);i.contentEl_=ne("div",{className:zt+"-content"},{role:"document"});i.descEl_=ne("p",{className:zt+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")});ae(i.descEl_,i.description());i.el_.appendChild(i.descEl_);i.el_.appendChild(i.contentEl_);return i}var n=i.prototype;n.createEl=function e(){return r.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 e(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;r.prototype.dispose.call(this)};n.buildCSSClass=function e(){return zt+" vjs-hidden "+r.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.");if(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 r=this.getChild("closeButton");if(e&&!r){var i=this.contentEl_;this.contentEl_=this.el_;r=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=i;this.on(r,"close",this.close_)}if(!e&&r){this.off(r,"close",this.close_);this.removeChild(r);r.dispose()}}return this.closeable_};n.fill=function e(){this.fillWith(this.content())};n.fillWith=function e(t){var r=this.contentEl();var i=r.parentNode;var n=r.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=true;i.removeChild(r);this.empty();Ce(r,t);this.trigger("modalfill");if(n){i.insertBefore(r,n)}else{i.appendChild(r)}var a=this.getChild("closeButton");if(a){i.appendChild(a.el_)}};n.empty=function e(){this.trigger("beforemodalempty");Se(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 r=t.activeElement;var i=this.player_.el_;this.previouslyActiveEl_=null;if(i.contains(r)||i===r){this.previouslyActiveEl_=r;this.focus()}};n.conditionalBlur_=function e(){if(this.previouslyActiveEl_){this.previouslyActiveEl_.focus();this.previouslyActiveEl_=null}};n.handleKeyDown=function e(r){r.stopPropagation();if(wt.isEventKey(r,"Escape")&&this.closeable()){r.preventDefault();this.close();return}if(!wt.isEventKey(r,"Tab")){return}var i=this.focusableEls_();var n=this.el_.querySelector(":focus");var a;for(var s=0;s<i.length;s++){if(n===i[s]){a=s;break}}if(t.activeElement===this.el_){a=0}if(r.shiftKey&&a===0){i[i.length-1].focus();r.preventDefault()}else if(!r.shiftKey&&a===i.length-1){i[0].focus();r.preventDefault()}};n.focusableEls_=function t(){var r=this.el_.querySelectorAll("*");return Array.prototype.filter.call(r,function(t){return(t instanceof e.HTMLAnchorElement||t instanceof e.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof e.HTMLInputElement||t instanceof e.HTMLSelectElement||t instanceof e.HTMLTextAreaElement||t instanceof e.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof e.HTMLIFrameElement||t instanceof e.HTMLObjectElement||t instanceof e.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable")})};return i}(At);Xt.prototype.options_={pauseOnOpen:true,temporary:true};At.registerComponent("ModalDialog",Xt);var Qt=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t=[]}r=e.call(this)||this;r.tracks_=[];Object.defineProperty(Ot(r),"length",{get:function e(){return this.tracks_.length}});for(var i=0;i<t.length;i++){r.addTrack(t[i])}return r}var r=t.prototype;r.addTrack=function e(t){var r=this;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})}t.labelchange_=function(){r.trigger({track:t,type:"labelchange",target:r})};if(ot(t)){t.addEventListener("labelchange",t.labelchange_)}};r.removeTrack=function e(t){var r;for(var i=0,n=this.length;i<n;i++){if(this[i]===t){r=this[i];if(r.off){r.off()}this.tracks_.splice(i,1);break}}if(!r){return}this.trigger({track:r,type:"removetrack",target:this})};r.getTrackById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return t}(nt);Qt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var $t in Qt.prototype.allowedEvents_){Qt.prototype["on"+$t]=null}var Jt=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].enabled=false}};var Zt=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].enabled){Jt(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.enabled){Jt(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.enabledChange_=function(){if(i.changing_){return}i.changing_=true;Jt(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("enabledchange",r.enabledChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.enabledChange_){r.removeEventListener("enabledchange",r.enabledChange_);r.enabledChange_=null}};return t}(Qt);var er=function e(t,r){for(var i=0;i<t.length;i++){if(!Object.keys(t[i]).length||r.id===t[i].id){continue}t[i].selected=false}};var tr=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t=[]}for(var i=t.length-1;i>=0;i--){if(t[i].selected){er(t,t[i]);break}}r=e.call(this,t)||this;r.changing_=false;Object.defineProperty(Ot(r),"selectedIndex",{get:function e(){for(var t=0;t<this.length;t++){if(this[t].selected){return t}}return-1},set:function e(){}});return r}var r=t.prototype;r.addTrack=function t(r){var i=this;if(r.selected){er(this,r)}e.prototype.addTrack.call(this,r);if(!r.addEventListener){return}r.selectedChange_=function(){if(i.changing_){return}i.changing_=true;er(i,r);i.changing_=false;i.trigger("change")};r.addEventListener("selectedchange",r.selectedChange_)};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener&&r.selectedChange_){r.removeEventListener("selectedchange",r.selectedChange_);r.selectedChange_=null}};return t}(Qt);var rr=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.addTrack=function t(r){var i=this;e.prototype.addTrack.call(this,r);if(!this.queueChange_){this.queueChange_=function(){return i.queueTrigger("change")}}if(!this.triggerSelectedlanguagechange){this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}}r.addEventListener("modechange",this.queueChange_);var n=["metadata","chapters"];if(n.indexOf(r.kind)===-1){r.addEventListener("modechange",this.triggerSelectedlanguagechange_)}};r.removeTrack=function t(r){e.prototype.removeTrack.call(this,r);if(r.removeEventListener){if(this.queueChange_){r.removeEventListener("modechange",this.queueChange_)}if(this.selectedlanguagechange_){r.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}};return t}(Qt);var ir=function(){function e(e){if(e===void 0){e=[]}this.trackElements_=[];Object.defineProperty(this,"length",{get:function e(){return this.trackElements_.length}});for(var t=0,r=e.length;t<r;t++){this.addTrackElement_(e[t])}}var t=e.prototype;t.addTrackElement_=function e(t){var r=this.trackElements_.length;if(!(""+r in this)){Object.defineProperty(this,r,{get:function e(){return this.trackElements_[r]}})}if(this.trackElements_.indexOf(t)===-1){this.trackElements_.push(t)}};t.getTrackElementByTrack_=function e(t){var r;for(var i=0,n=this.trackElements_.length;i<n;i++){if(t===this.trackElements_[i].track){r=this.trackElements_[i];break}}return r};t.removeTrackElement_=function e(t){for(var r=0,i=this.trackElements_.length;r<i;r++){if(t===this.trackElements_[r]){if(this.trackElements_[r].track&&typeof this.trackElements_[r].track.off==="function"){this.trackElements_[r].track.off()}if(typeof this.trackElements_[r].off==="function"){this.trackElements_[r].off()}this.trackElements_.splice(r,1);break}}};return e}();var nr=function(){function e(t){e.prototype.setCues_.call(this,t);Object.defineProperty(this,"length",{get:function e(){return this.length_}})}var t=e.prototype;t.setCues_=function e(t){var r=this.length||0;var i=0;var n=t.length;this.cues_=t;this.length_=t.length;var a=function e(t){if(!(""+t in this)){Object.defineProperty(this,""+t,{get:function e(){return this.cues_[t]}})}};if(r<n){i=r;for(;i<n;i++){a.call(this,i)}}};t.getCueById=function e(t){var r=null;for(var i=0,n=this.length;i<n;i++){var a=this[i];if(a.id===t){r=a;break}}return r};return e}();var ar={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"};var sr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"};var or={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};var ur={disabled:"disabled",hidden:"hidden",showing:"showing"};var lr=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i={id:t.id||"vjs_track_"+Fe(),kind:t.kind||"",language:t.language||""};var n=t.label||"";var a=function e(t){Object.defineProperty(Ot(r),t,{get:function e(){return i[t]},set:function e(){}})};for(var s in i){a(s)}Object.defineProperty(Ot(r),"label",{get:function e(){return n},set:function e(t){if(t!==n){n=t;this.trigger("labelchange")}}});return r}return t}(nt);var dr=function r(i){var n=["protocol","hostname","port","pathname","search","hash","host"];var a=t.createElement("a");a.href=i;var s={};for(var o=0;o<n.length;o++){s[n[o]]=a[n[o]]}if(s.protocol==="http:"){s.host=s.host.replace(/:80$/,"")}if(s.protocol==="https:"){s.host=s.host.replace(/:443$/,"")}if(!s.protocol){s.protocol=e.location.protocol}if(!s.host){s.host=e.location.host}return s};var cr=function e(r){if(!r.match(/^https?:\/\//)){var i=t.createElement("a");i.href=r;r=i.href}return r};var fr=function e(t){if(typeof t==="string"){var r=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/;var i=r.exec(t);if(i){return i.pop().toLowerCase()}}return""};var hr=function t(r,i){if(i===void 0){i=e.location}var n=dr(r);var a=n.protocol===":"?i.protocol:n.protocol;var s=a+n.host!==i.protocol+i.host;return s};var pr=Object.freeze({__proto__:null,parseUrl:dr,getAbsoluteURL:cr,getFileExtension:fr,isCrossOrigin:hr});var vr;if(typeof e!=="undefined"){vr=e}else if(typeof _!=="undefined"){vr=_}else if(typeof self!=="undefined"){vr=self}else{vr={}}var mr=vr;var gr=_r;var yr=Object.prototype.toString;function _r(t){if(!t){return false}var r=yr.call(t);return r==="[object Function]"||typeof t==="function"&&r!=="[object RegExp]"||typeof e!=="undefined"&&(t===e.setTimeout||t===e.alert||t===e.confirm||t===e.prompt)}var br=function e(t,r){if(r===void 0){r=false}return function(e,i,n){if(e){t(e);return}if(i.statusCode>=400&&i.statusCode<=599){var a=n;if(r){if(mr.TextDecoder){var s=Tr(i.headers&&i.headers["content-type"]);try{a=new TextDecoder(s).decode(n)}catch(e){}}else{a=String.fromCharCode.apply(null,new Uint8Array(n))}}t({cause:a});return}t(null,n)}};function Tr(e){if(e===void 0){e=""}return e.toLowerCase().split(";").reduce(function(e,t){var r=t.split("="),i=r[0],n=r[1];if(i.trim()==="charset"){return n.trim()}return e},"utf-8")}var Sr=br;Pr.httpHandler=Sr;var Er=function e(t){var r={};if(!t){return r}t.trim().split("\n").forEach(function(e){var t=e.indexOf(":");var i=e.slice(0,t).trim().toLowerCase();var n=e.slice(t+1).trim();if(typeof r[i]==="undefined"){r[i]=n}else if(Array.isArray(r[i])){r[i].push(n)}else{r[i]=[r[i],n]}});return r};var Ir=Pr;var Cr=Pr;Pr.XMLHttpRequest=mr.XMLHttpRequest||Dr;Pr.XDomainRequest="withCredentials"in new Pr.XMLHttpRequest?Pr.XMLHttpRequest:mr.XDomainRequest;kr(["get","put","post","patch","head","delete"],function(e){Pr[e==="delete"?"del":e]=function(t,r,i){r=Ar(t,r,i);r.method=e.toUpperCase();return Or(r)}});function kr(e,t){for(var r=0;r<e.length;r++){t(e[r])}}function wr(e){for(var t in e){if(e.hasOwnProperty(t))return false}return true}function Ar(e,t,r){var i=e;if(gr(t)){r=t;if(typeof e==="string"){i={uri:e}}}else{i=T({},t,{uri:e})}i.callback=r;return i}function Pr(e,t,r){t=Ar(e,t,r);return Or(t)}function Or(e){if(typeof e.callback==="undefined"){throw new Error("callback argument missing")}var t=false;var r=function r(i,n,a){if(!t){t=true;e.callback(i,n,a)}};function i(){if(o.readyState===4){setTimeout(s,0)}}function n(){var e=undefined;if(o.response){e=o.response}else{e=o.responseText||xr(o)}if(v){try{e=JSON.parse(e)}catch(e){}}return e}function a(e){clearTimeout(m);if(!(e instanceof Error)){e=new Error(""+(e||"Unknown XMLHttpRequest Error"))}e.statusCode=0;return r(e,g)}function s(){if(l)return;var t;clearTimeout(m);if(e.useXDR&&o.status===undefined){t=200}else{t=o.status===1223?204:o.status}var i=g;var a=null;if(t!==0){i={body:n(),statusCode:t,method:c,headers:{},url:d,rawRequest:o};if(o.getAllResponseHeaders){i.headers=Er(o.getAllResponseHeaders())}}else{a=new Error("Internal XMLHttpRequest Error")}return r(a,i,i.body)}var o=e.xhr||null;if(!o){if(e.cors||e.useXDR){o=new Pr.XDomainRequest}else{o=new Pr.XMLHttpRequest}}var u;var l;var d=o.url=e.uri||e.url;var c=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:c,url:d,rawRequest:o};if("json"in e&&e.json!==false){v=true;h["accept"]||h["Accept"]||(h["Accept"]="application/json");if(c!=="GET"&&c!=="HEAD"){h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json");f=JSON.stringify(e.json===true?f:e.json)}}o.onreadystatechange=i;o.onload=s;o.onerror=a;o.onprogress=function(){};o.onabort=function(){l=true};o.ontimeout=a;o.open(c,d,!p,e.username,e.password);if(!p){o.withCredentials=!!e.withCredentials}if(!p&&e.timeout>0){m=setTimeout(function(){if(l)return;l=true;o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";a(e)},e.timeout)}if(o.setRequestHeader){for(u in h){if(h.hasOwnProperty(u)){o.setRequestHeader(u,h[u])}}}else if(e.headers&&!wr(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 xr(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 Dr(){}Ir["default"]=Cr;var Lr=function t(r,i){var n=new e.WebVTT.Parser(e,e.vttjs,e.WebVTT.StringDecoder());var a=[];n.oncue=function(e){i.addCue(e)};n.onparsingerror=function(e){a.push(e)};n.onflush=function(){i.trigger({type:"loadeddata",target:i})};n.parse(r);if(a.length>0){if(e.console&&e.console.groupCollapsed){e.console.groupCollapsed("Text Track parsing errors for "+i.src)}a.forEach(function(e){return g.error(e)});if(e.console&&e.console.groupEnd){e.console.groupEnd()}}n.flush()};var Rr=function t(r,i){var n={uri:r};var a=hr(r);if(a){n.cors=a}var s=i.tech_.crossOrigin()==="use-credentials";if(s){n.withCredentials=s}Ir(n,tt(this,function(t,r,n){if(t){return g.error(t,r)}i.loaded_=true;if(typeof e.WebVTT!=="function"){if(i.tech_){i.tech_.any(["vttjsloaded","vttjserror"],function(e){if(e.type==="vttjserror"){g.error("vttjs failed to load, stopping trying to process "+i.src);return}return Lr(n,i)})}}else{Lr(n,i)}}))};var Nr=function(t){Dt(r,t);function r(e){var r;if(e===void 0){e={}}if(!e.tech){throw new Error("A tech was not provided.")}var i=St(e,{kind:or[e.kind]||"subtitles",language:e.language||e.srclang||""});var n=ur[i.mode]||"disabled";var a=i["default"];if(i.kind==="metadata"||i.kind==="chapters"){n="hidden"}r=t.call(this,i)||this;r.tech_=i.tech;r.cues_=[];r.activeCues_=[];r.preload_=r.tech_.preloadTextTracks!==false;var s=new nr(r.cues_);var o=new nr(r.activeCues_);var u=false;r.timeupdateHandler=tt(Ot(r),function(e){if(e===void 0){e={}}if(this.tech_.isDisposed()){return}if(!this.tech_.isReady_){if(e.type!=="timeupdate"){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)}return}this.activeCues=this.activeCues;if(u){this.trigger("cuechange");u=false}if(e.type!=="timeupdate"){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)}});var l=function e(){r.stopTracking()};r.tech_.one("dispose",l);if(n!=="disabled"){r.startTracking()}Object.defineProperties(Ot(r),{default:{get:function e(){return a},set:function e(){}},mode:{get:function e(){return n},set:function e(t){if(!ur[t]){return}if(n===t){return}n=t;if(!this.preload_&&n!=="disabled"&&this.cues.length===0){Rr(this.src,this)}this.stopTracking();if(n!=="disabled"){this.startTracking()}this.trigger("modechange")}},cues:{get:function e(){if(!this.loaded_){return null}return s},set:function e(){}},activeCues:{get:function e(){if(!this.loaded_){return null}if(this.cues.length===0){return o}var t=this.tech_.currentTime();var r=[];for(var i=0,n=this.cues.length;i<n;i++){var a=this.cues[i];if(a.startTime<=t&&a.endTime>=t){r.push(a)}else if(a.startTime===a.endTime&&a.startTime<=t&&a.startTime+.5>=t){r.push(a)}}u=false;if(r.length!==this.activeCues_.length){u=true}else{for(var s=0;s<r.length;s++){if(this.activeCues_.indexOf(r[s])===-1){u=true}}}this.activeCues_=r;o.setCues_(this.activeCues_);return o},set:function e(){}}});if(i.src){r.src=i.src;if(!r.preload_){r.loaded_=true}if(r.preload_||i.kind!=="subtitles"&&i.kind!=="captions"){Rr(r.src,Ot(r))}}else{r.loaded_=true}return r}var i=r.prototype;i.startTracking=function e(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler);this.tech_.on("timeupdate",this.timeupdateHandler)};i.stopTracking=function e(){if(this.rvf_){this.tech_.cancelVideoFrameCallback(this.rvf_);this.rvf_=undefined}this.tech_.off("timeupdate",this.timeupdateHandler)};i.addCue=function t(r){var i=r;if(e.vttjs&&!(r instanceof e.vttjs.VTTCue)){i=new e.vttjs.VTTCue(r.startTime,r.endTime,r.text);for(var n in r){if(!(n in i)){i[n]=r[n]}}i.id=r.id;i.originalCue_=r}var a=this.tech_.textTracks();for(var s=0;s<a.length;s++){if(a[s]!==this){a[s].removeCue(i)}}this.cues_.push(i);this.cues.setCues_(this.cues_)};i.removeCue=function e(t){var r=this.cues_.length;while(r--){var i=this.cues_[r];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(r,1);this.cues.setCues_(this.cues_);break}}};return r}(lr);Nr.prototype.allowedEvents_={cuechange:"cuechange"};var Mr=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t={}}var i=St(t,{kind:sr[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(Ot(r),"enabled",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("enabledchange")}});if(i.enabled){r.enabled=i.enabled}r.loaded_=true;return r}return t}(lr);var Ur=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t={}}var i=St(t,{kind:ar[t.kind]||""});r=e.call(this,i)||this;var n=false;Object.defineProperty(Ot(r),"selected",{get:function e(){return n},set:function e(t){if(typeof t!=="boolean"||t===n){return}n=t;this.trigger("selectedchange")}});if(i.selected){r.selected=i.selected}return r}return t}(lr);var Br=0;var Fr=1;var jr=2;var Vr=3;var qr=function(e){Dt(t,e);function t(t){var r;if(t===void 0){t={}}r=e.call(this)||this;var i;var n=new Nr(t);r.kind=n.kind;r.src=n.src;r.srclang=n.language;r.label=n.label;r["default"]=n["default"];Object.defineProperties(Ot(r),{readyState:{get:function e(){return i}},track:{get:function e(){return n}}});i=Br;n.addEventListener("loadeddata",function(){i=jr;r.trigger({type:"load",target:Ot(r)})});return r}return t}(nt);qr.prototype.allowedEvents_={load:"load"};qr.NONE=Br;qr.LOADING=Fr;qr.LOADED=jr;qr.ERROR=Vr;var Hr={audio:{ListClass:Zt,TrackClass:Mr,capitalName:"Audio"},video:{ListClass:tr,TrackClass:Ur,capitalName:"Video"},text:{ListClass:rr,TrackClass:Nr,capitalName:"Text"}};Object.keys(Hr).forEach(function(e){Hr[e].getterName=e+"Tracks";Hr[e].privateName=e+"Tracks_"});var Wr={remoteText:{ListClass:rr,TrackClass:Nr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ir,TrackClass:qr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};var Gr=T({},Hr,Wr);Wr.names=Object.keys(Wr);Hr.names=Object.keys(Hr);Gr.names=[].concat(Wr.names).concat(Hr.names);var Kr={};function Yr(e,t,r,i,n){if(n===void 0){n={}}var a=e.textTracks();n.kind=t;if(r){n.label=r}if(i){n.language=i}n.tech=e;var s=new Gr.text.TrackClass(n);a.addTrack(s);return s}var zr=function(r){Dt(i,r);function i(e,t){var i;if(e===void 0){e={}}if(t===void 0){t=function e(){}}e.reportTouchActivity=false;i=r.call(this,null,e,t)||this;i.onDurationChange_=function(e){return i.onDurationChange(e)};i.trackProgress_=function(e){return i.trackProgress(e)};i.trackCurrentTime_=function(e){return i.trackCurrentTime(e)};i.stopTrackingCurrentTime_=function(e){return i.stopTrackingCurrentTime(e)};i.disposeSourceHandler_=function(e){return i.disposeSourceHandler(e)};i.queuedHanders_=new Set;i.hasStarted_=false;i.on("playing",function(){this.hasStarted_=true});i.on("loadstart",function(){this.hasStarted_=false});Gr.names.forEach(function(t){var r=Gr[t];if(e&&e[r.getterName]){i[r.privateName]=e[r.getterName]}});if(!i.featuresProgressEvents){i.manualProgressOn()}if(!i.featuresTimeupdateEvents){i.manualTimeUpdatesOn()}["Text","Audio","Video"].forEach(function(t){if(e["native"+t+"Tracks"]===false){i["featuresNative"+t+"Tracks"]=false}});if(e.nativeCaptions===false||e.nativeTextTracks===false){i.featuresNativeTextTracks=false}else if(e.nativeCaptions===true||e.nativeTextTracks===true){i.featuresNativeTextTracks=true}if(!i.featuresNativeTextTracks){i.emulateTextTracks()}i.preloadTextTracks=e.preloadTextTracks!==false;i.autoRemoteTextTracks_=new Gr.text.ListClass;i.initTrackListeners();if(!e.nativeControlsForTouch){i.emitTapEvents()}if(i.constructor){i.name_=i.constructor.name||"Unknown Tech"}return i}var n=i.prototype;n.triggerSourceset=function e(t){var r=this;if(!this.isReady_){this.one("ready",function(){return r.setTimeout(function(){return r.triggerSourceset(t)},1)})}this.trigger({src:t,type:"sourceset"})};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(tt(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 Mt(0,0)};n.bufferedPercent=function e(){return Ut(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 e(){this.clearTracks(Hr.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}r.prototype.dispose.call(this)};n.clearTracks=function e(t){var r=this;t=[].concat(t);t.forEach(function(e){var t=r[e+"Tracks"]()||[];var i=t.length;while(i--){var n=t[i];if(e==="text"){r.removeRemoteTextTrack(n)}t.removeTrack(n)}})};n.cleanupAutoTextTracks=function e(){var t=this.autoRemoteTextTracks_||[];var r=t.length;while(r--){var i=t[r];this.removeRemoteTextTrack(i)}};n.reset=function e(){};n.crossOrigin=function e(){};n.setCrossOrigin=function e(){};n.error=function e(t){if(t!==undefined){this.error_=new Bt(t);this.trigger("error")}return this.error_};n.played=function e(){if(this.hasStarted_){return Mt(0,0)}return Mt()};n.play=function e(){};n.setScrubbing=function e(){};n.scrubbing=function e(){};n.setCurrentTime=function e(){if(this.manualTimeUpdates){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})}};n.initTrackListeners=function e(){var t=this;Hr.names.forEach(function(e){var r=Hr[e];var i=function r(){t.trigger(e+"trackchange")};var n=t[r.getterName]();n.addEventListener("removetrack",i);n.addEventListener("addtrack",i);t.on("dispose",function(){n.removeEventListener("removetrack",i);n.removeEventListener("addtrack",i)})})};n.addWebVttScript_=function r(){var i=this;if(e.WebVTT){return}if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&A(Kr)&&Object.keys(Kr).length>0){this.trigger("vttjsloaded");return}var n=t.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";n.onload=function(){i.trigger("vttjsloaded")};n.onerror=function(){i.trigger("vttjserror")};this.on("dispose",function(){n.onload=null;n.onerror=null});e.WebVTT=true;this.el().parentNode.appendChild(n)}else{this.ready(this.addWebVttScript_)}};n.emulateTextTracks=function e(){var t=this;var r=this.textTracks();var i=this.remoteTextTracks();var n=function e(t){return r.addTrack(t.track)};var a=function e(t){return r.removeTrack(t.track)};i.on("addtrack",n);i.on("removetrack",a);this.addWebVttScript_();var s=function e(){return t.trigger("texttrackchange")};var o=function e(){s();for(var t=0;t<r.length;t++){var i=r[t];i.removeEventListener("cuechange",s);if(i.mode==="showing"){i.addEventListener("cuechange",s)}}};o();r.addEventListener("change",o);r.addEventListener("addtrack",o);r.addEventListener("removetrack",o);this.on("dispose",function(){i.off("addtrack",n);i.off("removetrack",a);r.removeEventListener("change",o);r.removeEventListener("addtrack",o);r.removeEventListener("removetrack",o);for(var e=0;e<r.length;e++){var t=r[e];t.removeEventListener("cuechange",s)}})};n.addTextTrack=function e(t,r,i){if(!t){throw new Error("TextTrack kind is required but was not provided")}return Yr(this,t,r,i)};n.createRemoteTextTrack=function e(t){var r=St(t,{tech:this});return new Wr.remoteTextEl.TrackClass(r)};n.addRemoteTextTrack=function e(t,r){var i=this;if(t===void 0){t={}}var n=this.createRemoteTextTrack(t);if(r!==true&&r!==false){g.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js');r=true}this.remoteTextTrackEls().addTrackElement_(n);this.remoteTextTracks().addTrack(n.track);if(r!==true){this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)})}return n};n.removeRemoteTextTrack=function e(t){var r=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(r);this.remoteTextTracks().removeTrack(t);this.autoRemoteTextTracks_.removeTrack(t)};n.getVideoPlaybackQuality=function e(){return{}};n.requestPictureInPicture=function t(){var r=this.options_.Promise||e.Promise;if(r){return r.reject()}};n.disablePictureInPicture=function e(){return true};n.setDisablePictureInPicture=function e(){};n.requestVideoFrameCallback=function e(t){var r=this;var i=Fe();if(!this.isReady_||this.paused()){this.queuedHanders_.add(i);this.one("playing",function(){if(r.queuedHanders_.has(i)){r.queuedHanders_["delete"](i);t()}})}else{this.requestNamedAnimationFrame(i,t)}return i};n.cancelVideoFrameCallback=function e(t){if(this.queuedHanders_.has(t)){this.queuedHanders_["delete"](t)}else{this.cancelNamedAnimationFrame(t)}};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""};i.canPlayType=function e(){return""};i.canPlaySource=function e(t,r){return i.canPlayType(t.type)};i.isTech=function e(t){return t.prototype instanceof i||t instanceof i||t===i};i.registerTech=function e(t,r){if(!i.techs_){i.techs_={}}if(!i.isTech(r)){throw new Error("Tech "+t+" must be a Tech")}if(!i.canPlayType){throw new Error("Techs must have a static canPlayType method on them")}if(!i.canPlaySource){throw new Error("Techs must have a static canPlaySource method on them")}t=bt(t);i.techs_[t]=r;i.techs_[_t(t)]=r;if(t!=="Tech"){i.defaultTechOrder_.push(t)}return r};i.getTech=function t(r){if(!r){return}if(i.techs_&&i.techs_[r]){return i.techs_[r]}r=bt(r);if(e&&e.videojs&&e.videojs[r]){g.warn("The "+r+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)");return e.videojs[r]}};return i}(At);Gr.names.forEach(function(e){var t=Gr[e];zr.prototype[t.getterName]=function(){this[t.privateName]=this[t.privateName]||new t.ListClass;return this[t.privateName]}});zr.prototype.featuresVolumeControl=true;zr.prototype.featuresMuteControl=true;zr.prototype.featuresFullscreenResize=false;zr.prototype.featuresPlaybackRate=false;zr.prototype.featuresProgressEvents=false;zr.prototype.featuresSourceset=false;zr.prototype.featuresTimeupdateEvents=false;zr.prototype.featuresNativeTextTracks=false;zr.prototype.featuresVideoFrameCallback=false;zr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,r){var i=e.sourceHandlers;if(!i){i=e.sourceHandlers=[]}if(r===undefined){r=i.length}i.splice(r,0,t)};e.canPlayType=function(t){var r=e.sourceHandlers||[];var i;for(var n=0;n<r.length;n++){i=r[n].canPlayType(t);if(i){return i}}return""};e.selectSourceHandler=function(t,r){var i=e.sourceHandlers||[];var n;for(var a=0;a<i.length;a++){n=i[a].canHandleSource(t,r);if(n){return i[a]}}return null};e.canPlaySource=function(t,r){var i=e.selectSourceHandler(t,r);if(i){return i.canHandleSource(t,r)}return""};var t=["seekable","seeking","duration"];t.forEach(function(e){var t=this[e];if(typeof t!=="function"){return}this[e]=function(){if(this.sourceHandler_&&this.sourceHandler_[e]){return this.sourceHandler_[e].apply(this.sourceHandler_,arguments)}return t.apply(this,arguments)}},e.prototype);e.prototype.setSource=function(t){var r=e.selectSourceHandler(t,this.options_);if(!r){if(e.nativeSourceHandler){r=e.nativeSourceHandler}else{g.error("No source handler found for the current source.")}}this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler_);if(r!==e.nativeSourceHandler){this.currentSource_=t}this.sourceHandler_=r.handleSource(t,this,this.options_);this.one("dispose",this.disposeSourceHandler_)};e.prototype.disposeSourceHandler=function(){if(this.currentSource_){this.clearTracks(["audio","video"]);this.currentSource_=null}this.cleanupAutoTextTracks();if(this.sourceHandler_){if(this.sourceHandler_.dispose){this.sourceHandler_.dispose()}this.sourceHandler_=null}}};At.registerComponent("Tech",zr);zr.registerTech("Tech",zr);zr.defaultTechOrder_=[];var Xr={};var Qr={};var $r={};function Jr(e,t){Xr[e]=Xr[e]||[];Xr[e].push(t)}function Zr(e,t,r){e.setTimeout(function(){return ci(t,Xr[t.type],r,e)},1)}function ei(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function ti(e,t,r){return e.reduceRight(oi(r),t[r]())}function ri(e,t,r,i){return t[r](e.reduce(oi(r),i))}function ii(e,t,r,i){if(i===void 0){i=null}var n="call"+bt(r);var a=e.reduce(oi(n),i);var s=a===$r;var o=s?null:t[r](a);ui(e,r,o,s);return o}var ni={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1};var ai={setCurrentTime:1,setMuted:1,setVolume:1};var si={play:1,pause:1};function oi(e){return function(t,r){if(t===$r){return $r}if(r[e]){return r[e](t)}return t}}function ui(e,t,r,i){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a[t]){a[t](i,r)}}}function li(e){Qr[e.id()]=null}function di(e,t){var r=Qr[e.id()];var i=null;if(r===undefined||r===null){i=t(e);Qr[e.id()]=[[t,i]];return i}for(var n=0;n<r.length;n++){var a=r[n],s=a[0],o=a[1];if(s!==t){continue}i=o}if(i===null){i=t(e);r.push([t,i])}return i}function ci(e,t,r,i,n,a){if(e===void 0){e={}}if(t===void 0){t=[]}if(n===void 0){n=[]}if(a===void 0){a=false}var s=t,o=s[0],u=s.slice(1);if(typeof o==="string"){ci(e,Xr[o],r,i,n,a)}else if(o){var l=di(i,o);if(!l.setSource){n.push(l);return ci(e,u,r,i,n,a)}l.setSource(k({},e),function(t,s){if(t){return ci(e,u,r,i,n,a)}n.push(l);ci(s,e.type===s.type?u:Xr[s.type],r,i,n,a)})}else if(u.length){ci(e,u,r,i,n,a)}else if(a){r(e,n)}else{ci(e,Xr["*"],r,i,n,true)}}var fi={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",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};var hi=function e(t){if(t===void 0){t=""}var r=fr(t);var i=fi[r.toLowerCase()];return i||""};var pi=function e(t,r){if(!r){return""}if(t.cache_.source.src===r&&t.cache_.source.type){return t.cache_.source.type}var i=t.cache_.sources.filter(function(e){return e.src===r});if(i.length){return i[0].type}var n=t.$$("source");for(var a=0;a<n.length;a++){var s=n[a];if(s.type&&s.src&&s.src===r){return s.type}}return hi(r)};var vi=function e(t){if(Array.isArray(t)){var r=[];t.forEach(function(t){t=e(t);if(Array.isArray(t)){r=r.concat(t)}else if(w(t)){r.push(t)}});t=r}else if(typeof t==="string"&&t.trim()){t=[mi({src:t})]}else if(w(t)&&typeof t.src==="string"&&t.src&&t.src.trim()){t=[mi(t)]}else{t=[]}return t};function mi(e){if(!e.type){var t=hi(e.src);if(t){e.type=t}}return e}var gi=function(e){Dt(t,e);function t(t,r,i){var n;var a=St({createEl:false},r);n=e.call(this,t,a,i)||this;if(!r.playerOptions.sources||r.playerOptions.sources.length===0){for(var s=0,o=r.playerOptions.techOrder;s<o.length;s++){var u=bt(o[s]);var l=zr.getTech(u);if(!u){l=At.getComponent(u)}if(l&&l.isSupported()){t.loadTech_(u);break}}}else{t.src(r.playerOptions.sources)}return n}return t}(At);At.registerComponent("MediaLoader",gi);var yi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;if(i.options_.controlText){i.controlText(i.options_.controlText)}i.handleMouseOver_=function(e){return i.handleMouseOver(e)};i.handleMouseOut_=function(e){return i.handleMouseOut(e)};i.handleClick_=function(e){return i.handleClick(e)};i.handleKeyDown_=function(e){return i.handleKeyDown(e)};i.emitTapEvents();i.enable();return i}var r=t.prototype;r.createEl=function e(t,r,i){if(t===void 0){t="div"}if(r===void 0){r={}}if(i===void 0){i={}}r=k({className:this.buildCSSClass(),tabIndex:0},r);if(t==="button"){g.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead.")}i=k({role:"button"},i);this.tabIndex_=r.tabIndex;var n=ne(t,r,i);n.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":true}));this.createControlTextEl(n);return n};r.dispose=function t(){this.controlTextEl_=null;e.prototype.dispose.call(this)};r.createControlTextEl=function e(t){this.controlTextEl_=ne("span",{className:"vjs-control-text"},{"aria-live":"polite"});if(t){t.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,t);return this.controlTextEl_};r.controlText=function e(t,r){if(r===void 0){r=this.el()}if(t===undefined){return this.controlText_||"Need Text"}var i=this.localize(t);this.controlText_=t;ae(this.controlTextEl_,i);if(!this.nonIconControl&&!this.player_.options_.noUITitleAttributes){r.setAttribute("title",i)}};r.buildCSSClass=function t(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)};r.enable=function e(){if(!this.enabled_){this.enabled_=true;this.removeClass("vjs-disabled");this.el_.setAttribute("aria-disabled","false");if(typeof this.tabIndex_!=="undefined"){this.el_.setAttribute("tabIndex",this.tabIndex_)}this.on(["tap","click"],this.handleClick_);this.on("keydown",this.handleKeyDown_)}};r.disable=function e(){this.enabled_=false;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");if(typeof this.tabIndex_!=="undefined"){this.el_.removeAttribute("tabIndex")}this.off("mouseover",this.handleMouseOver_);this.off("mouseout",this.handleMouseOut_);this.off(["tap","click"],this.handleClick_);this.off("keydown",this.handleKeyDown_)};r.handleLanguagechange=function e(){this.controlText(this.controlText_)};r.handleClick=function e(t){if(this.options_.clickHandler){this.options_.clickHandler.call(this,arguments)}};r.handleKeyDown=function t(r){if(wt.isEventKey(r,"Space")||wt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,r)}};return t}(At);At.registerComponent("ClickableComponent",yi);var _i=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update();i.update_=function(e){return i.update(e)};t.on("posterchange",i.update_);return i}var r=t.prototype;r.dispose=function t(){this.player().off("posterchange",this.update_);e.prototype.dispose.call(this)};r.createEl=function e(){var t=ne("div",{className:"vjs-poster",tabIndex:-1});return t};r.update=function e(t){var r=this.player().poster();this.setSrc(r);if(r){this.show()}else{this.hide()}};r.setSrc=function e(t){var r="";if(t){r='url("'+t+'")'}this.el_.style.backgroundImage=r};r.handleClick=function e(t){if(!this.player_.controls()){return}var r=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;if(this.player_.tech(true)&&!((q||F)&&r)){this.player_.tech(true).focus()}if(this.player_.paused()){Ht(this.player_.play())}else{this.player_.pause()}};return t}(yi);At.registerComponent("PosterImage",_i);var bi="#222";var Ti="#ccc";var Si={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 Ei(e,t){var r;if(e.length===4){r=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}else if(e.length===7){r=e.slice(1)}else{throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.")}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+t+")"}function Ii(e,t,r){try{e.style[t]=r}catch(e){return}}var Ci=function(t){Dt(r,t);function r(r,i,n){var a;a=t.call(this,r,i,n)||this;var s=function e(t){return a.updateDisplay(t)};r.on("loadstart",function(e){return a.toggleDisplay(e)});r.on("texttrackchange",s);r.on("loadedmetadata",function(e){return a.preselectTrack(e)});r.ready(tt(Ot(a),function(){if(r.tech_&&r.tech_.featuresNativeTextTracks){this.hide();return}r.on("fullscreenchange",s);r.on("playerresize",s);e.addEventListener("orientationchange",s);r.on("dispose",function(){return e.removeEventListener("orientationchange",s)});var t=this.options_.playerOptions.tracks||[];for(var i=0;i<t.length;i++){this.player_.addRemoteTextTrack(t[i],true)}this.preselectTrack()}));return a}var i=r.prototype;i.preselectTrack=function e(){var t={captions:1,subtitles:1};var r=this.player_.textTracks();var i=this.player_.cache_.selectedLanguage;var n;var a;var s;for(var o=0;o<r.length;o++){var u=r[o];if(i&&i.enabled&&i.language&&i.language===u.language&&u.kind in t){if(u.kind===i.kind){s=u}else if(!s){s=u}}else if(i&&!i.enabled){s=null;n=null;a=null}else if(u["default"]){if(u.kind==="descriptions"&&!n){n=u}else if(u.kind in t&&!a){a=u}}}if(s){s.mode="showing"}else if(a){a.mode="showing"}else if(n){n.mode="showing"}};i.toggleDisplay=function e(){if(this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks){this.hide()}else{this.show()}};i.createEl=function e(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})};i.clearDisplay=function t(){if(typeof e.WebVTT==="function"){e.WebVTT.processCues(e,[],this.el_)}};i.updateDisplay=function e(){var t=this.player_.textTracks();var r=this.options_.allowMultipleShowingTracks;this.clearDisplay();if(r){var i=[];for(var n=0;n<t.length;++n){var a=t[n];if(a.mode!=="showing"){continue}i.push(a)}this.updateForTrack(i);return}var s=null;var o=null;var u=t.length;while(u--){var l=t[u];if(l.mode==="showing"){if(l.kind==="descriptions"){s=l}else{o=l}}}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)}};i.updateDisplayState=function t(r){var i=this.player_.textTrackSettings.getValues();var n=r.activeCues;var a=n.length;while(a--){var s=n[a];if(!s){continue}var o=s.displayState;if(i.color){o.firstChild.style.color=i.color}if(i.textOpacity){Ii(o.firstChild,"color",Ei(i.color||"#fff",i.textOpacity))}if(i.backgroundColor){o.firstChild.style.backgroundColor=i.backgroundColor}if(i.backgroundOpacity){Ii(o.firstChild,"backgroundColor",Ei(i.backgroundColor||"#000",i.backgroundOpacity))}if(i.windowColor){if(i.windowOpacity){Ii(o,"backgroundColor",Ei(i.windowColor,i.windowOpacity))}else{o.style.backgroundColor=i.windowColor}}if(i.edgeStyle){if(i.edgeStyle==="dropshadow"){o.firstChild.style.textShadow="2px 2px 3px "+bi+", 2px 2px 4px "+bi+", 2px 2px 5px "+bi}else if(i.edgeStyle==="raised"){o.firstChild.style.textShadow="1px 1px "+bi+", 2px 2px "+bi+", 3px 3px "+bi}else if(i.edgeStyle==="depressed"){o.firstChild.style.textShadow="1px 1px "+Ti+", 0 1px "+Ti+", -1px -1px "+bi+", 0 -1px "+bi}else if(i.edgeStyle==="uniform"){o.firstChild.style.textShadow="0 0 4px "+bi+", 0 0 4px "+bi+", 0 0 4px "+bi+", 0 0 4px "+bi}}if(i.fontPercent&&i.fontPercent!==1){var u=e.parseFloat(o.style.fontSize);o.style.fontSize=u*i.fontPercent+"px";o.style.height="auto";o.style.top="auto"}if(i.fontFamily&&i.fontFamily!=="default"){if(i.fontFamily==="small-caps"){o.firstChild.style.fontVariant="small-caps"}else{o.firstChild.style.fontFamily=Si[i.fontFamily]}}}};i.updateForTrack=function t(r){if(!Array.isArray(r)){r=[r]}if(typeof e.WebVTT!=="function"||r.every(function(e){return!e.activeCues})){return}var i=[];for(var n=0;n<r.length;++n){var a=r[n];for(var s=0;s<a.activeCues.length;++s){i.push(a.activeCues[s])}}e.WebVTT.processCues(e,i,this.el_);for(var o=0;o<r.length;++o){var u=r[o];for(var l=0;l<u.activeCues.length;++l){var d=u.activeCues[l].displayState;ue(d,"vjs-text-track-cue");ue(d,"vjs-text-track-cue-"+(u.language?u.language:o));if(u.language){pe(d,"lang",u.language)}}if(this.player_.textTrackSettings){this.updateDisplayState(u)}}};return r}(At);At.registerComponent("TextTrackDisplay",Ci);var ki=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){var r=this.player_.isAudio();var i=this.localize(r?"Audio Player":"Video Player");var n=ne("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])});var a=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});a.appendChild(n);return a};return t}(At);At.registerComponent("LoadingSpinner",ki);var wi=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function e(t,r,i){if(r===void 0){r={}}if(i===void 0){i={}}t="button";r=k({className:this.buildCSSClass()},r);i=k({type:"button"},i);var n=ne(t,r,i);n.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":true}));this.createControlTextEl(n);return n};r.addChild=function e(t,r){if(r===void 0){r={}}var i=this.constructor.name;g.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead.");return At.prototype.addChild.call(this,t,r)};r.enable=function t(){e.prototype.enable.call(this);this.el_.removeAttribute("disabled")};r.disable=function t(){e.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};r.handleKeyDown=function t(r){if(wt.isEventKey(r,"Space")||wt.isEventKey(r,"Enter")){r.stopPropagation();return}e.prototype.handleKeyDown.call(this,r)};return t}(yi);At.registerComponent("Button",wi);var Ai=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.mouseused_=false;i.on("mousedown",function(e){return i.handleMouseDown(e)});return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-big-play-button"};r.handleClick=function e(t){var r=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;Ht(r);if(this.player_.tech(true)&&!((q||F)&&i)){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(qt(r)){r.then(s,function(){})}else{this.setTimeout(s,1)}};r.handleKeyDown=function t(r){this.mouseused_=false;e.prototype.handleKeyDown.call(this,r)};r.handleMouseDown=function e(t){this.mouseused_=true};return t}(wi);Ai.prototype.controlText_="Play Video";At.registerComponent("BigPlayButton",Ai);var Pi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.controlText(r&&r.controlText||i.localize("Close"));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){this.trigger({type:"close",bubbles:false})};r.handleKeyDown=function t(r){if(wt.isEventKey(r,"Esc")){r.preventDefault();r.stopPropagation();this.trigger("click")}else{e.prototype.handleKeyDown.call(this,r)}};return t}(wi);At.registerComponent("CloseButton",Pi);var Oi=function(e){Dt(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;r.replay=r.replay===undefined||r.replay;i.on(t,"play",function(e){return i.handlePlay(e)});i.on(t,"pause",function(e){return i.handlePause(e)});if(r.replay){i.on(t,"ended",function(e){return i.handleEnded(e)})}return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){if(this.player_.paused()){Ht(this.player_.play())}else{this.player_.pause()}};r.handleSeeked=function e(t){this.removeClass("vjs-ended");if(this.player_.paused()){this.handlePause(t)}else{this.handlePlay(t)}};r.handlePlay=function e(t){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")};r.handlePause=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};r.handleEnded=function e(t){var r=this;this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",function(e){return r.handleSeeked(e)})};return t}(wi);Oi.prototype.controlText_="Play";At.registerComponent("PlayToggle",Oi);var xi=function e(t,r){t=t<0?0:t;var i=Math.floor(t%60);var n=Math.floor(t/60%60);var a=Math.floor(t/3600);var s=Math.floor(r/60%60);var o=Math.floor(r/3600);if(isNaN(t)||t===Infinity){a=n=i="-"}a=a>0||o>0?a+":":"";n=((a||s>=10)&&n<10?"0"+n:n)+":";i=i<10?"0"+i:i;return a+n+i};var Di=xi;function Li(e){Di=e}function Ri(){Di=xi}function Ni(e,t){if(t===void 0){t=e}return Di(e,t)}var Mi=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;i.on(t,["timeupdate","ended"],function(e){return i.updateContent(e)});i.updateTextNode_();return i}var i=r.prototype;i.createEl=function t(){var r=this.buildCSSClass();var i=e.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control"});var n=ne("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});i.appendChild(n);this.contentEl_=ne("span",{className:r+"-display"},{"aria-live":"off",role:"presentation"});i.appendChild(this.contentEl_);return i};i.dispose=function t(){this.contentEl_=null;this.textNode_=null;e.prototype.dispose.call(this)};i.updateTextNode_=function e(r){var i=this;if(r===void 0){r=0}r=Ni(r);if(this.formattedTime_===r){return}this.formattedTime_=r;this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(!i.contentEl_){return}var e=i.textNode_;if(e&&i.contentEl_.firstChild!==e){e=null;g.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")}i.textNode_=t.createTextNode(i.formattedTime_);if(!i.textNode_){return}if(e){i.contentEl_.replaceChild(i.textNode_,e)}else{i.contentEl_.appendChild(i.textNode_)}})};i.updateContent=function e(t){};return r}(At);Mi.prototype.labelText_="Time";Mi.prototype.controlText_="Time";At.registerComponent("TimeDisplay",Mi);var Ui=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-current-time"};r.updateContent=function e(t){var r;if(this.player_.ended()){r=this.player_.duration()}else{r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}this.updateTextNode_(r)};return t}(Mi);Ui.prototype.labelText_="Current Time";Ui.prototype.controlText_="Current Time";At.registerComponent("CurrentTimeDisplay",Ui);var Bi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;var n=function e(t){return i.updateContent(t)};i.on(t,"durationchange",n);i.on(t,"loadstart",n);i.on(t,"loadedmetadata",n);return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-duration"};r.updateContent=function e(t){var r=this.player_.duration();this.updateTextNode_(r)};return t}(Mi);Bi.prototype.labelText_="Duration";Bi.prototype.controlText_="Duration";At.registerComponent("DurationDisplay",Bi);var Fi=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":true});var i=e.prototype.createEl.call(this,"div");var n=e.prototype.createEl.call(this,"span",{textContent:"/"});i.appendChild(n);r.appendChild(i);return r};return t}(At);At.registerComponent("TimeDivider",Fi);var ji=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"durationchange",function(e){return i.updateContent(e)});return i}var r=t.prototype;r.buildCSSClass=function e(){return"vjs-remaining-time"};r.createEl=function t(){var r=e.prototype.createEl.call(this);if(this.options_.displayNegative!==false){r.insertBefore(ne("span",{},{"aria-hidden":true},"-"),this.contentEl_)}return r};r.updateContent=function e(t){if(typeof this.player_.duration()!=="number"){return}var r;if(this.player_.ended()){r=0}else if(this.player_.remainingTimeDisplay){r=this.player_.remainingTimeDisplay()}else{r=this.player_.remainingTime()}this.updateTextNode_(r)};return t}(Mi);ji.prototype.labelText_="Remaining Time";ji.prototype.controlText_="Remaining Time";At.registerComponent("RemainingTimeDisplay",ji);var Vi=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;i.updateShowing();i.on(i.player(),"durationchange",function(e){return i.updateShowing(e)});return i}var i=r.prototype;i.createEl=function r(){var i=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=ne("div",{className:"vjs-live-display"},{"aria-live":"off"});this.contentEl_.appendChild(ne("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"}));this.contentEl_.appendChild(t.createTextNode(this.localize("LIVE")));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 r}(At);At.registerComponent("LiveDisplay",Vi);var qi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.updateLiveEdgeStatus();if(i.player_.liveTracker){i.updateLiveEdgeStatusHandler_=function(e){return i.updateLiveEdgeStatus(e)};i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)}return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.textEl_=ne("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"});r.appendChild(this.textEl_);return r};r.updateLiveEdgeStatus=function e(){if(!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()){this.setAttribute("aria-disabled",true);this.addClass("vjs-at-live-edge");this.controlText("Seek to live, currently playing live")}else{this.setAttribute("aria-disabled",false);this.removeClass("vjs-at-live-edge");this.controlText("Seek to live, currently behind live")}};r.handleClick=function e(){this.player_.liveTracker.seekToLiveEdge()};r.dispose=function t(){if(this.player_.liveTracker){this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_)}this.textEl_=null;e.prototype.dispose.call(this)};return t}(wi);qi.prototype.controlText_="Seek to live, currently playing live";At.registerComponent("SeekToLive",qi);var Hi=function e(t,r,i){t=Number(t);return Math.min(i,Math.max(r,isNaN(t)?r:t))};var Wi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.handleMouseDown_=function(e){return i.handleMouseDown(e)};i.handleMouseUp_=function(e){return i.handleMouseUp(e)};i.handleKeyDown_=function(e){return i.handleKeyDown(e)};i.handleClick_=function(e){return i.handleClick(e)};i.handleMouseMove_=function(e){return i.handleMouseMove(e)};i.update_=function(e){return i.update(e)};i.bar=i.getChild(i.options_.barName);i.vertical(!!i.options_.vertical);i.enable();return i}var r=t.prototype;r.enabled=function e(){return this.enabled_};r.enable=function e(){if(this.enabled()){return}this.on("mousedown",this.handleMouseDown_);this.on("touchstart",this.handleMouseDown_);this.on("keydown",this.handleKeyDown_);this.on("click",this.handleClick_);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)}this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=true};r.disable=function e(){if(!this.enabled()){return}var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_);this.off("touchstart",this.handleMouseDown_);this.off("keydown",this.handleKeyDown_);this.off("click",this.handleClick_);this.off(this.player_,"controlsvisible",this.update_);this.off(t,"mousemove",this.handleMouseMove_);this.off(t,"mouseup",this.handleMouseUp_);this.off(t,"touchmove",this.handleMouseMove_);this.off(t,"touchend",this.handleMouseUp_);this.removeAttribute("tabindex");this.addClass("disabled");if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)}this.enabled_=false};r.createEl=function t(r,i,n){if(i===void 0){i={}}if(n===void 0){n={}}i.className=i.className+" vjs-slider";i=k({tabIndex:0},i);n=k({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n);return e.prototype.createEl.call(this,r,i,n)};r.handleMouseDown=function e(t){var r=this.bar.el_.ownerDocument;if(t.type==="mousedown"){t.preventDefault()}if(t.type==="touchstart"&&!j){t.preventDefault()}me();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(r,"mousemove",this.handleMouseMove_);this.on(r,"mouseup",this.handleMouseUp_);this.on(r,"touchmove",this.handleMouseMove_);this.on(r,"touchend",this.handleMouseUp_);this.handleMouseMove(t,true)};r.handleMouseMove=function e(t){};r.handleMouseUp=function e(){var t=this.bar.el_.ownerDocument;ge();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(t,"mousemove",this.handleMouseMove_);this.off(t,"mouseup",this.handleMouseUp_);this.off(t,"touchmove",this.handleMouseMove_);this.off(t,"touchend",this.handleMouseUp_);this.update()};r.update=function e(){var t=this;if(!this.el_||!this.bar){return}var r=this.getProgress();if(r===this.progress_){return r}this.progress_=r;this.requestNamedAnimationFrame("Slider#update",function(){var e=t.vertical()?"height":"width";t.bar.el().style[e]=(r*100).toFixed(2)+"%"});return r};r.getProgress=function e(){return Number(Hi(this.getPercent(),0,1).toFixed(4))};r.calculateDistance=function e(t){var r=be(this.el_,t);if(this.vertical()){return r.y}return r.x};r.handleKeyDown=function t(r){if(wt.isEventKey(r,"Left")||wt.isEventKey(r,"Down")){r.preventDefault();r.stopPropagation();this.stepBack()}else if(wt.isEventKey(r,"Right")||wt.isEventKey(r,"Up")){r.preventDefault();r.stopPropagation();this.stepForward()}else{e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){t.stopPropagation();t.preventDefault()};r.vertical=function e(t){if(t===undefined){return this.vertical_||false}this.vertical_=!!t;if(this.vertical_){this.addClass("vjs-slider-vertical")}else{this.addClass("vjs-slider-horizontal")}};return t}(At);At.registerComponent("Slider",Wi);var Gi=function e(t,r){return Hi(t/r*100,0,100).toFixed(2)+"%"};var Ki=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;i.partEls_=[];i.on(t,"progress",function(e){return i.update(e)});return i}var i=r.prototype;i.createEl=function r(){var i=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});var n=ne("span",{className:"vjs-control-text"});var a=ne("span",{textContent:this.localize("Loaded")});var s=t.createTextNode(": ");this.percentageEl_=ne("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"});i.appendChild(n);n.appendChild(a);n.appendChild(s);n.appendChild(this.percentageEl_);return i};i.dispose=function t(){this.partEls_=null;this.percentageEl_=null;e.prototype.dispose.call(this)};i.update=function e(t){var r=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var e=r.player_.liveTracker;var t=r.player_.buffered();var i=e&&e.isLive()?e.seekableEnd():r.player_.duration();var n=r.player_.bufferedEnd();var a=r.partEls_;var s=Gi(n,i);if(r.percent_!==s){r.el_.style.width=s;ae(r.percentageEl_,s);r.percent_=s}for(var o=0;o<t.length;o++){var u=t.start(o);var l=t.end(o);var d=a[o];if(!d){d=r.el_.appendChild(ne());a[o]=d}if(d.dataset.start===u&&d.dataset.end===l){continue}d.dataset.start=u;d.dataset.end=l;d.style.left=Gi(u,n);d.style.width=Gi(l-u,n)}for(var c=a.length;c>t.length;c--){r.el_.removeChild(a[c-1])}a.length=t.length})};return r}(At);At.registerComponent("LoadProgressBar",Ki);var Yi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=rt(tt(Ot(i),i.update),et);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};r.update=function e(t,r,i){var n=_e(this.el_);var a=ye(this.player_.el());var s=t.width*r;if(!a||!n){return}var o=t.left-a.left+s;var u=t.width-s+(a.right-t.right);var l=n.width/2;if(o<l){l+=l-o}else if(u<l){l=u}if(l<0){l=0}else if(l>n.width){l=n.width}l=Math.round(l);this.el_.style.right="-"+l+"px";this.write(i)};r.write=function e(t){ae(this.el_,t)};r.updateTime=function e(t,r,i,n){var a=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var e;var s=a.player_.duration();if(a.player_.liveTracker&&a.player_.liveTracker.isLive()){var o=a.player_.liveTracker.liveWindow();var u=o-r*o;e=(u<1?"":"-")+Ni(u,o)}else{e=Ni(i,s)}a.update(t,r,e);if(n){n()}})};return t}(At);At.registerComponent("TimeTooltip",Yi);var zi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=rt(tt(Ot(i),i.update),et);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};r.update=function e(t,r){var i=this.getChild("timeTooltip");if(!i){return}var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,r,n)};return t}(At);zi.prototype.options_={children:[]};if(!z&&!N){zi.prototype.options_.children.push("timeTooltip")}At.registerComponent("PlayProgressBar",zi);var Xi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=rt(tt(Ot(i),i.update),et);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};r.update=function e(t,r){var i=this;var n=r*this.player_.duration();this.getChild("timeTooltip").updateTime(t,r,n,function(){i.el_.style.left=t.width*r+"px"})};return t}(At);Xi.prototype.options_={children:["timeTooltip"]};At.registerComponent("MouseTimeDisplay",Xi);var Qi=5;var $i=12;var Ji=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;i.setEventHandlers_();return i}var i=r.prototype;i.setEventHandlers_=function e(){var r=this;this.update_=tt(this,this.update);this.update=rt(this.update_,et);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.enableIntervalHandler_=function(e){return r.enableInterval_(e)};this.disableIntervalHandler_=function(e){return r.disableInterval_(e)};this.on(this.player_,["playing"],this.enableIntervalHandler_);this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_);if("hidden"in t&&"visibilityState"in t){this.on(t,"visibilitychange",this.toggleVisibility_)}};i.toggleVisibility_=function e(r){if(t.visibilityState==="hidden"){this.cancelNamedAnimationFrame("SeekBar#update");this.cancelNamedAnimationFrame("Slider#update");this.disableInterval_(r)}else{if(!this.player_.ended()&&!this.player_.paused()){this.enableInterval_()}this.update()}};i.enableInterval_=function e(){if(this.updateInterval){return}this.updateInterval=this.setInterval(this.update,et)};i.disableInterval_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&t.type!=="ended"){return}if(!this.updateInterval){return}this.clearInterval(this.updateInterval);this.updateInterval=null};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};i.update=function r(i){var n=this;if(t.visibilityState==="hidden"){return}var a=e.prototype.update.call(this);this.requestNamedAnimationFrame("SeekBar#update",function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_();var t=n.player_.liveTracker;var r=n.player_.duration();if(t&&t.isLive()){r=n.player_.liveTracker.liveCurrentTime()}if(n.percent_!==a){n.el_.setAttribute("aria-valuenow",(a*100).toFixed(2));n.percent_=a}if(n.currentTime_!==e||n.duration_!==r){n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Ni(e,r),Ni(r,r)],"{1} of {2}"));n.currentTime_=e;n.duration_=r}if(n.bar){n.bar.update(ye(n.el()),n.getProgress())}});return a};i.userSeek_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){this.player_.liveTracker.nextSeekedFromUser()}this.player_.currentTime(t)};i.getCurrentTime_=function e(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};i.getPercent=function e(){var t=this.getCurrentTime_();var r;var i=this.player_.liveTracker;if(i&&i.isLive()){r=(t-i.seekableStart())/i.liveWindow();if(i.atLiveEdge()){r=1}}else{r=t/this.player_.duration()}return r};i.handleMouseDown=function t(r){if(!ke(r)){return}r.stopPropagation();this.videoWasPlaying=!this.player_.paused();this.player_.pause();e.prototype.handleMouseDown.call(this,r)};i.handleMouseMove=function e(t,r){if(r===void 0){r=false}if(!ke(t)){return}if(!r&&!this.player_.scrubbing()){this.player_.scrubbing(true)}var i;var n=this.calculateDistance(t);var a=this.player_.liveTracker;if(!a||!a.isLive()){i=n*this.player_.duration();if(i===this.player_.duration()){i=i-.1}}else{if(n>=.99){a.seekToLiveEdge();return}var s=a.seekableStart();var o=a.liveCurrentTime();i=s+n*a.liveWindow();if(i>=o){i=o}if(i<=s){i=s+.1}if(i===Infinity){return}}this.userSeek_(i)};i.enable=function t(){e.prototype.enable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.show()};i.disable=function t(){e.prototype.disable.call(this);var r=this.getChild("mouseTimeDisplay");if(!r){return}r.hide()};i.handleMouseUp=function t(r){e.prototype.handleMouseUp.call(this,r);if(r){r.stopPropagation()}this.player_.scrubbing(false);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:true});if(this.videoWasPlaying){Ht(this.player_.play())}else{this.update_()}};i.stepForward=function e(){this.userSeek_(this.player_.currentTime()+Qi)};i.stepBack=function e(){this.userSeek_(this.player_.currentTime()-Qi)};i.handleAction=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};i.handleKeyDown=function t(r){var i=this.player_.liveTracker;if(wt.isEventKey(r,"Space")||wt.isEventKey(r,"Enter")){r.preventDefault();r.stopPropagation();this.handleAction(r)}else if(wt.isEventKey(r,"Home")){r.preventDefault();r.stopPropagation();this.userSeek_(0)}else if(wt.isEventKey(r,"End")){r.preventDefault();r.stopPropagation();if(i&&i.isLive()){this.userSeek_(i.liveCurrentTime())}else{this.userSeek_(this.player_.duration())}}else if(/^[0-9]$/.test(wt(r))){r.preventDefault();r.stopPropagation();var n=(wt.codes[wt(r)]-wt.codes["0"])*10/100;if(i&&i.isLive()){this.userSeek_(i.seekableStart()+i.liveWindow()*n)}else{this.userSeek_(this.player_.duration()*n)}}else if(wt.isEventKey(r,"PgDn")){r.preventDefault();r.stopPropagation();this.userSeek_(this.player_.currentTime()-Qi*$i)}else if(wt.isEventKey(r,"PgUp")){r.preventDefault();r.stopPropagation();this.userSeek_(this.player_.currentTime()+Qi*$i)}else{e.prototype.handleKeyDown.call(this,r)}};i.dispose=function r(){this.disableInterval_();this.off(this.player_,["ended","durationchange","timeupdate"],this.update);if(this.player_.liveTracker){this.off(this.player_.liveTracker,"liveedgechange",this.update)}this.off(this.player_,["playing"],this.enableIntervalHandler_);this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_);if("hidden"in t&&"visibilityState"in t){this.off(t,"visibilitychange",this.toggleVisibility_)}e.prototype.dispose.call(this)};return r}(Wi);Ji.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};if(!z&&!N){Ji.prototype.options_.children.splice(1,0,"mouseTimeDisplay")}At.registerComponent("SeekBar",Ji);var Zi=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.handleMouseMove=rt(tt(Ot(i),i.handleMouseMove),et);i.throttledHandleMouseSeek=rt(tt(Ot(i),i.handleMouseSeek),et);i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)};i.handleMouseDownHandler_=function(e){return i.handleMouseDown(e)};i.enable();return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};r.handleMouseMove=function e(t){var r=this.getChild("seekBar");if(!r){return}var i=r.getChild("playProgressBar");var n=r.getChild("mouseTimeDisplay");if(!i&&!n){return}var a=r.el();var s=_e(a);var o=be(a,t).x;o=Hi(o,0,1);if(n){n.update(s,o)}if(i){i.update(s,r.getProgress())}};r.handleMouseSeek=function e(t){var r=this.getChild("seekBar");if(r){r.handleMouseMove(t)}};r.enabled=function e(){return this.enabled_};r.disable=function e(){this.children().forEach(function(e){return e.disable&&e.disable()});if(!this.enabled()){return}this.off(["mousedown","touchstart"],this.handleMouseDownHandler_);this.off(this.el_,"mousemove",this.handleMouseMove);this.removeListenersAddedOnMousedownAndTouchstart();this.addClass("disabled");this.enabled_=false;if(this.player_.scrubbing()){var t=this.getChild("seekBar");this.player_.scrubbing(false);if(t.videoWasPlaying){Ht(this.player_.play())}}};r.enable=function e(){this.children().forEach(function(e){return e.enable&&e.enable()});if(this.enabled()){return}this.on(["mousedown","touchstart"],this.handleMouseDownHandler_);this.on(this.el_,"mousemove",this.handleMouseMove);this.removeClass("disabled");this.enabled_=true};r.removeListenersAddedOnMousedownAndTouchstart=function e(){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek);this.off(t,"touchmove",this.throttledHandleMouseSeek);this.off(t,"mouseup",this.handleMouseUpHandler_);this.off(t,"touchend",this.handleMouseUpHandler_)};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;var i=this.getChild("seekBar");if(i){i.handleMouseDown(t)}this.on(r,"mousemove",this.throttledHandleMouseSeek);this.on(r,"touchmove",this.throttledHandleMouseSeek);this.on(r,"mouseup",this.handleMouseUpHandler_);this.on(r,"touchend",this.handleMouseUpHandler_)};r.handleMouseUp=function e(t){var r=this.getChild("seekBar");if(r){r.handleMouseUp(t)}this.removeListenersAddedOnMousedownAndTouchstart()};return t}(At);Zi.prototype.options_={children:["seekBar"]};At.registerComponent("ProgressControl",Zi);var en=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;i.on(t,["enterpictureinpicture","leavepictureinpicture"],function(e){return i.handlePictureInPictureChange(e)});i.on(t,["disablepictureinpicturechanged","loadedmetadata"],function(e){return i.handlePictureInPictureEnabledChange(e)});i.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){var e=t.currentType().substring(0,5)==="audio";if(e||t.audioPosterMode()||t.audioOnlyMode()){if(t.isInPictureInPicture()){t.exitPictureInPicture()}i.hide()}else{i.show()}});i.disable();return i}var i=r.prototype;i.buildCSSClass=function t(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)};i.handlePictureInPictureEnabledChange=function e(){if(t.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===false){this.enable()}else{this.disable()}};i.handlePictureInPictureChange=function e(t){if(this.player_.isInPictureInPicture()){this.controlText("Exit Picture-in-Picture")}else{this.controlText("Picture-in-Picture")}this.handlePictureInPictureEnabledChange()};i.handleClick=function e(t){if(!this.player_.isInPictureInPicture()){this.player_.requestPictureInPicture()}else{this.player_.exitPictureInPicture()}};return r}(wi);en.prototype.controlText_="Picture-in-Picture";At.registerComponent("PictureInPictureToggle",en);var tn=function(e){Dt(r,e);function r(r,i){var n;n=e.call(this,r,i)||this;n.on(r,"fullscreenchange",function(e){return n.handleFullscreenChange(e)});if(t[r.fsApi_.fullscreenEnabled]===false){n.disable()}return n}var i=r.prototype;i.buildCSSClass=function t(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)};i.handleFullscreenChange=function e(t){if(this.player_.isFullscreen()){this.controlText("Non-Fullscreen")}else{this.controlText("Fullscreen")}};i.handleClick=function e(t){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return r}(wi);tn.prototype.controlText_="Fullscreen";At.registerComponent("FullscreenToggle",tn);var rn=function e(t,r){if(r.tech_&&!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var nn=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});r.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"}));return r};return t}(At);At.registerComponent("VolumeLevel",nn);var an=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=rt(tt(Ot(i),i.update),et);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})};r.update=function e(t,r,i,n){if(!i){var a=ye(this.el_);var s=ye(this.player_.el());var o=t.width*r;if(!s||!a){return}var u=t.left-s.left+o;var l=t.width-o+(s.right-t.right);var d=a.width/2;if(u<d){d+=d-u}else if(l<d){d=l}if(d<0){d=0}else if(d>a.width){d=a.width}this.el_.style.right="-"+d+"px"}this.write(n+"%")};r.write=function e(t){ae(this.el_,t)};r.updateVolume=function e(t,r,i,n,a){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){s.update(t,r,i,n.toFixed(0));if(a){a()}})};return t}(At);At.registerComponent("VolumeLevelTooltip",an);var sn=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.update=rt(tt(Ot(i),i.update),et);return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};r.update=function e(t,r,i){var n=this;var a=100*r;this.getChild("volumeLevelTooltip").updateVolume(t,r,i,a,function(){if(i){n.el_.style.bottom=t.height*r+"px"}else{n.el_.style.left=t.width*r+"px"}})};return t}(At);sn.prototype.options_={children:["volumeLevelTooltip"]};At.registerComponent("MouseVolumeLevelDisplay",sn);var on=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on("slideractive",function(e){return i.updateLastVolume_(e)});i.on(t,"volumechange",function(e){return i.updateARIAAttributes(e)});t.ready(function(){return i.updateARIAAttributes()});return i}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})};r.handleMouseDown=function t(r){if(!ke(r)){return}e.prototype.handleMouseDown.call(this,r)};r.handleMouseMove=function e(t){var r=this.getChild("mouseVolumeLevelDisplay");if(r){var i=this.el();var n=ye(i);var a=this.vertical();var s=be(i,t);s=a?s.y:s.x;s=Hi(s,0,1);r.update(n,s,a)}if(!ke(t)){return}this.checkMuted();this.player_.volume(this.calculateDistance(t))};r.checkMuted=function e(){if(this.player_.muted()){this.player_.muted(false)}};r.getPercent=function e(){if(this.player_.muted()){return 0}return this.player_.volume()};r.stepForward=function e(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};r.stepBack=function e(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};r.updateARIAAttributes=function e(t){var r=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",r);this.el_.setAttribute("aria-valuetext",r+"%")};r.volumeAsPercentage_=function e(){return Math.round(this.player_.volume()*100)};r.updateLastVolume_=function e(){var t=this;var r=this.player_.volume();this.one("sliderinactive",function(){if(t.player_.volume()===0){t.player_.lastVolume_(r)}})};return t}(Wi);on.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};if(!z&&!N){on.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay")}on.prototype.playerEvent="volumechange";At.registerComponent("VolumeBar",on);var un=function(e){Dt(t,e);function t(t,r){var i;if(r===void 0){r={}}r.vertical=r.vertical||false;if(typeof r.volumeBar==="undefined"||A(r.volumeBar)){r.volumeBar=r.volumeBar||{};r.volumeBar.vertical=r.vertical}i=e.call(this,t,r)||this;rn(Ot(i),t);i.throttledHandleMouseMove=rt(tt(Ot(i),i.handleMouseMove),et);i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)};i.on("mousedown",function(e){return i.handleMouseDown(e)});i.on("touchstart",function(e){return i.handleMouseDown(e)});i.on("mousemove",function(e){return i.handleMouseMove(e)});i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active");i.addClass("vjs-slider-active");i.trigger("slideractive")});i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active");i.removeClass("vjs-slider-active");i.trigger("sliderinactive")});return i}var r=t.prototype;r.createEl=function t(){var r="vjs-volume-horizontal";if(this.options_.vertical){r="vjs-volume-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+r})};r.handleMouseDown=function e(t){var r=this.el_.ownerDocument;this.on(r,"mousemove",this.throttledHandleMouseMove);this.on(r,"touchmove",this.throttledHandleMouseMove);this.on(r,"mouseup",this.handleMouseUpHandler_);this.on(r,"touchend",this.handleMouseUpHandler_)};r.handleMouseUp=function e(t){var r=this.el_.ownerDocument;this.off(r,"mousemove",this.throttledHandleMouseMove);this.off(r,"touchmove",this.throttledHandleMouseMove);this.off(r,"mouseup",this.handleMouseUpHandler_);this.off(r,"touchend",this.handleMouseUpHandler_)};r.handleMouseMove=function e(t){this.volumeBar.handleMouseMove(t)};return t}(At);un.prototype.options_={children:["volumeBar"]};At.registerComponent("VolumeControl",un);var ln=function e(t,r){if(r.tech_&&!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}t.on(r,"loadstart",function(){if(!r.tech_.featuresMuteControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var dn=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;ln(Ot(i),t);i.on(t,["loadstart","volumechange"],function(e){return i.update(e)});return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)};r.handleClick=function e(t){var r=this.player_.volume();var i=this.player_.lastVolume_();if(r===0){var n=i<.1?.1:i;this.player_.volume(n);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};r.update=function e(t){this.updateIcon_();this.updateControlText_()};r.updateIcon_=function e(){var t=this.player_.volume();var r=3;if(z&&this.player_.tech_&&this.player_.tech_.el_){this.player_.muted(this.player_.tech_.el_.muted)}if(t===0||this.player_.muted()){r=0}else if(t<.33){r=1}else if(t<.67){r=2}for(var i=0;i<4;i++){le(this.el_,"vjs-vol-"+i)}ue(this.el_,"vjs-vol-"+r)};r.updateControlText_=function e(){var t=this.player_.muted()||this.player_.volume()===0;var r=t?"Unmute":"Mute";if(this.controlText()!==r){this.controlText(r)}};return t}(wi);dn.prototype.controlText_="Mute";At.registerComponent("MuteToggle",dn);var cn=function(e){Dt(r,e);function r(t,r){var i;if(r===void 0){r={}}if(typeof r.inline!=="undefined"){r.inline=r.inline}else{r.inline=true}if(typeof r.volumeControl==="undefined"||A(r.volumeControl)){r.volumeControl=r.volumeControl||{};r.volumeControl.vertical=!r.inline}i=e.call(this,t,r)||this;i.handleKeyPressHandler_=function(e){return i.handleKeyPress(e)};i.on(t,["loadstart"],function(e){return i.volumePanelState_(e)});i.on(i.muteToggle,"keyup",function(e){return i.handleKeyPress(e)});i.on(i.volumeControl,"keyup",function(e){return i.handleVolumeControlKeyUp(e)});i.on("keydown",function(e){return i.handleKeyPress(e)});i.on("mouseover",function(e){return i.handleMouseOver(e)});i.on("mouseout",function(e){return i.handleMouseOut(e)});i.on(i.volumeControl,["slideractive"],i.sliderActive_);i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_);return i}var i=r.prototype;i.sliderActive_=function e(){this.addClass("vjs-slider-active")};i.sliderInactive_=function e(){this.removeClass("vjs-slider-active")};i.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")}};i.createEl=function t(){var r="vjs-volume-panel-horizontal";if(!this.options_.inline){r="vjs-volume-panel-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+r})};i.dispose=function t(){this.handleMouseOut();e.prototype.dispose.call(this)};i.handleVolumeControlKeyUp=function e(t){if(wt.isEventKey(t,"Esc")){this.muteToggle.focus()}};i.handleMouseOver=function e(r){this.addClass("vjs-hover");ze(t,"keyup",this.handleKeyPressHandler_)};i.handleMouseOut=function e(r){this.removeClass("vjs-hover");Xe(t,"keyup",this.handleKeyPressHandler_)};i.handleKeyPress=function e(t){if(wt.isEventKey(t,"Esc")){this.handleMouseOut()}};return r}(At);cn.prototype.options_={children:["muteToggle","volumeControl"]};At.registerComponent("VolumePanel",cn);var fn=function(e){Dt(r,e);function r(t,r){var i;i=e.call(this,t,r)||this;if(r){i.menuButton_=r.menuButton}i.focusedChild_=-1;i.on("keydown",function(e){return i.handleKeyDown(e)});i.boundHandleBlur_=function(e){return i.handleBlur(e)};i.boundHandleTapClick_=function(e){return i.handleTapClick(e)};return i}var i=r.prototype;i.addEventListenerForItem=function e(t){if(!(t instanceof At)){return}this.on(t,"blur",this.boundHandleBlur_);this.on(t,["tap","click"],this.boundHandleTapClick_)};i.removeEventListenerForItem=function e(t){if(!(t instanceof At)){return}this.off(t,"blur",this.boundHandleBlur_);this.off(t,["tap","click"],this.boundHandleTapClick_)};i.removeChild=function t(r){if(typeof r==="string"){r=this.getChild(r)}this.removeEventListenerForItem(r);e.prototype.removeChild.call(this,r)};i.addItem=function e(t){var r=this.addChild(t);if(r){this.addEventListenerForItem(r)}};i.createEl=function t(){var r=this.options_.contentElType||"ul";this.contentEl_=ne(r,{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});i.appendChild(this.contentEl_);ze(i,"click",function(e){e.preventDefault();e.stopImmediatePropagation()});return i};i.dispose=function t(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;e.prototype.dispose.call(this)};i.handleBlur=function e(r){var i=r.relatedTarget||t.activeElement;if(!this.children().some(function(e){return e.el()===i})){var n=this.menuButton_;if(n&&n.buttonPressed_&&i!==n.el().firstChild){n.unpressButton()}}};i.handleTapClick=function e(t){if(this.menuButton_){this.menuButton_.unpressButton();var r=this.children();if(!Array.isArray(r)){return}var i=r.filter(function(e){return e.el()===t.target})[0];if(!i){return}if(i.name()!=="CaptionSettingsMenuItem"){this.menuButton_.focus()}}};i.handleKeyDown=function e(t){if(wt.isEventKey(t,"Left")||wt.isEventKey(t,"Down")){t.preventDefault();t.stopPropagation();this.stepForward()}else if(wt.isEventKey(t,"Right")||wt.isEventKey(t,"Up")){t.preventDefault();t.stopPropagation();this.stepBack()}};i.stepForward=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_+1}this.focus(t)};i.stepBack=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_-1}this.focus(t)};i.focus=function e(t){if(t===void 0){t=0}var r=this.children().slice();var i=r.length&&r[0].hasClass("vjs-menu-title");if(i){r.shift()}if(r.length>0){if(t<0){t=0}else if(t>=r.length){t=r.length-1}this.focusedChild_=t;r[t].el_.focus()}};return r}(At);At.registerComponent("Menu",fn);var hn=function(e){Dt(r,e);function r(r,i){var n;if(i===void 0){i={}}n=e.call(this,r,i)||this;n.menuButton_=new wi(r,i);n.menuButton_.controlText(n.controlText_);n.menuButton_.el_.setAttribute("aria-haspopup","true");var a=wi.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+a;n.menuButton_.removeClass("vjs-control");n.addChild(n.menuButton_);n.update();n.enabled_=true;var s=function e(t){return n.handleClick(t)};n.handleMenuKeyUp_=function(e){return n.handleMenuKeyUp(e)};n.on(n.menuButton_,"tap",s);n.on(n.menuButton_,"click",s);n.on(n.menuButton_,"keydown",function(e){return n.handleKeyDown(e)});n.on(n.menuButton_,"mouseenter",function(){n.addClass("vjs-hover");n.menu.show();ze(t,"keyup",n.handleMenuKeyUp_)});n.on("mouseleave",function(e){return n.handleMouseLeave(e)});n.on("keydown",function(e){return n.handleSubmenuKeyDown(e)});return n}var i=r.prototype;i.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();this.menu.contentEl_.removeAttribute("role")}else{this.show();this.menu.contentEl_.setAttribute("role","menu")}};i.createMenu=function e(){var t=new fn(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var r=ne("li",{className:"vjs-menu-title",textContent:bt(this.options_.title),tabIndex:-1});var i=new At(this.player_,{el:r});t.addItem(i)}this.items=this.createItems();if(this.items){for(var n=0;n<this.items.length;n++){t.addItem(this.items[n])}}return t};i.createItems=function e(){};i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})};i.buildWrapperCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}var i=wi.prototype.buildCSSClass();return"vjs-menu-button "+r+" "+i+" "+e.prototype.buildCSSClass.call(this)};i.buildCSSClass=function t(){var r="vjs-menu-button";if(this.options_.inline===true){r+="-inline"}else{r+="-popup"}return"vjs-menu-button "+r+" "+e.prototype.buildCSSClass.call(this)};i.controlText=function e(t,r){if(r===void 0){r=this.menuButton_.el()}return this.menuButton_.controlText(t,r)};i.dispose=function t(){this.handleMouseLeave();e.prototype.dispose.call(this)};i.handleClick=function e(t){if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};i.handleMouseLeave=function e(r){this.removeClass("vjs-hover");Xe(t,"keyup",this.handleMenuKeyUp_)};i.focus=function e(){this.menuButton_.focus()};i.blur=function e(){this.menuButton_.blur()};i.handleKeyDown=function e(t){if(wt.isEventKey(t,"Esc")||wt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!wt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}else if(wt.isEventKey(t,"Up")||wt.isEventKey(t,"Down")){if(!this.buttonPressed_){t.preventDefault();this.pressButton()}}};i.handleMenuKeyUp=function e(t){if(wt.isEventKey(t,"Esc")||wt.isEventKey(t,"Tab")){this.removeClass("vjs-hover")}};i.handleSubmenuKeyPress=function e(t){this.handleSubmenuKeyDown(t)};i.handleSubmenuKeyDown=function e(t){if(wt.isEventKey(t,"Esc")||wt.isEventKey(t,"Tab")){if(this.buttonPressed_){this.unpressButton()}if(!wt.isEventKey(t,"Tab")){t.preventDefault();this.menuButton_.focus()}}};i.pressButton=function e(){if(this.enabled_){this.buttonPressed_=true;this.menu.show();this.menu.lockShowing();this.menuButton_.el_.setAttribute("aria-expanded","true");if(z&&re()){return}this.menu.focus()}};i.unpressButton=function e(){if(this.enabled_){this.buttonPressed_=false;this.menu.unlockShowing();this.menu.hide();this.menuButton_.el_.setAttribute("aria-expanded","false")}};i.disable=function e(){this.unpressButton();this.enabled_=false;this.addClass("vjs-disabled");this.menuButton_.disable()};i.enable=function e(){this.enabled_=true;this.removeClass("vjs-disabled");this.menuButton_.enable()};return r}(At);At.registerComponent("MenuButton",hn);var pn=function(e){Dt(t,e);function t(t,r){var i;var n=r.tracks;i=e.call(this,t,r)||this;if(i.items.length<=1){i.hide()}if(!n){return Ot(i)}var a=tt(Ot(i),i.update);n.addEventListener("removetrack",a);n.addEventListener("addtrack",a);n.addEventListener("labelchange",a);i.player_.on("ready",a);i.player_.on("dispose",function(){n.removeEventListener("removetrack",a);n.removeEventListener("addtrack",a);n.removeEventListener("labelchange",a)});return i}return t}(hn);At.registerComponent("TrackButton",pn);var vn=["Tab","Esc","Up","Down","Right","Left"];var mn=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.selectable=r.selectable;i.isSelected_=r.selected||false;i.multiSelectable=r.multiSelectable;i.selected(i.isSelected_);if(i.selectable){if(i.multiSelectable){i.el_.setAttribute("role","menuitemcheckbox")}else{i.el_.setAttribute("role","menuitemradio")}}else{i.el_.setAttribute("role","menuitem")}return i}var r=t.prototype;r.createEl=function t(r,i,n){this.nonIconControl=true;var a=e.prototype.createEl.call(this,"li",k({className:"vjs-menu-item",tabIndex:-1},i),n);a.replaceChild(ne("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),a.querySelector(".vjs-icon-placeholder"));return a};r.handleKeyDown=function t(r){if(!vn.some(function(e){return wt.isEventKey(r,e)})){e.prototype.handleKeyDown.call(this,r)}};r.handleClick=function e(t){this.selected(true)};r.selected=function e(t){if(this.selectable){if(t){this.addClass("vjs-selected");this.el_.setAttribute("aria-checked","true");this.controlText(", selected");this.isSelected_=true}else{this.removeClass("vjs-selected");this.el_.setAttribute("aria-checked","false");this.controlText("");this.isSelected_=false}}};return t}(yi);At.registerComponent("MenuItem",mn);var gn=function(r){Dt(i,r);function i(i,n){var a;var s=n.track;var o=i.textTracks();n.label=s.label||s.language||"Unknown";n.selected=s.mode==="showing";a=r.call(this,i,n)||this;a.track=s;a.kinds=(n.kinds||[n.kind||a.track.kind]).filter(Boolean);var u=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleTracksChange.apply(Ot(a),r)};var l=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}a.handleSelectedLanguageChange.apply(Ot(a),r)};i.on(["loadstart","texttrackchange"],u);o.addEventListener("change",u);o.addEventListener("selectedlanguagechange",l);a.on("dispose",function(){i.off(["loadstart","texttrackchange"],u);o.removeEventListener("change",u);o.removeEventListener("selectedlanguagechange",l)});if(o.onchange===undefined){var d;a.on(["tap","click"],function(){if(typeof e.Event!=="object"){try{d=new e.Event("change")}catch(e){}}if(!d){d=t.createEvent("Event");d.initEvent("change",true,true)}o.dispatchEvent(d)})}a.handleTracksChange();return a}var n=i.prototype;n.handleClick=function e(t){var i=this.track;var n=this.player_.textTracks();r.prototype.handleClick.call(this,t);if(!n){return}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds.indexOf(s.kind)===-1){continue}if(s===i){if(s.mode!=="showing"){s.mode="showing"}}else if(s.mode!=="disabled"){s.mode="disabled"}}};n.handleTracksChange=function e(t){var r=this.track.mode==="showing";if(r!==this.isSelected_){this.selected(r)}};n.handleSelectedLanguageChange=function e(t){if(this.track.mode==="showing"){var r=this.player_.cache_.selectedLanguage;if(r&&r.enabled&&r.language===this.track.language&&r.kind!==this.track.kind){return}this.player_.cache_.selectedLanguage={enabled:true,language:this.track.language,kind:this.track.kind}}};n.dispose=function e(){this.track=null;r.prototype.dispose.call(this)};return i}(mn);At.registerComponent("TextTrackMenuItem",gn);var yn=function(e){Dt(t,e);function t(t,r){r.track={player:t,kind:r.kind,kinds:r.kinds,default:false,mode:"disabled"};if(!r.kinds){r.kinds=[r.kind]}if(r.label){r.track.label=r.label}else{r.track.label=r.kinds.join(" and ")+" off"}r.selectable=true;r.multiSelectable=false;return e.call(this,t,r)||this}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i!==this.isSelected_){this.selected(i)}};r.handleSelectedLanguageChange=function e(t){var r=this.player().textTracks();var i=true;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){i=false;break}}if(i){this.player_.cache_.selectedLanguage={enabled:false}}};return t}(gn);At.registerComponent("OffTextTrackMenuItem",yn);var _n=function(e){Dt(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.textTracks();return e.call(this,t,r)||this}var r=t.prototype;r.createItems=function e(t,r){if(t===void 0){t=[]}if(r===void 0){r=gn}var i;if(this.label_){i=this.label_+" off"}t.push(new yn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i}));this.hideThreshold_+=1;var n=this.player_.textTracks();if(!Array.isArray(this.kinds_)){this.kinds_=[this.kind_]}for(var a=0;a<n.length;a++){var s=n[a];if(this.kinds_.indexOf(s.kind)>-1){var o=new r(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:true,multiSelectable:false});o.addClass("vjs-"+s.kind+"-menu-item");t.push(o)}}return t};return t}(pn);At.registerComponent("TextTrackButton",_n);var bn=function(e){Dt(t,e);function t(t,r){var i;var n=r.track;var a=r.cue;var s=t.currentTime();r.selectable=true;r.multiSelectable=false;r.label=a.text;r.selected=a.startTime<=s&&s<a.endTime;i=e.call(this,t,r)||this;i.track=n;i.cue=a;return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime)};return t}(mn);At.registerComponent("ChaptersTrackMenuItem",bn);var Tn=function(e){Dt(t,e);function t(t,r,i){var n;n=e.call(this,t,r,i)||this;n.selectCurrentItem_=function(){n.items.forEach(function(e){e.selected(n.track_.activeCues[0]===e.cue)})};return n}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)};r.update=function t(r){if(r&&r.track&&r.track.kind!=="chapters"){return}var i=this.findChaptersTrack();if(i!==this.track_){this.setTrack(i);e.prototype.update.call(this)}else if(!this.items||i&&i.cues&&i.cues.length!==this.items.length){e.prototype.update.call(this)}};r.setTrack=function e(t){if(this.track_===t){return}if(!this.updateHandler_){this.updateHandler_=this.update.bind(this)}if(this.track_){var r=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(r){r.removeEventListener("load",this.updateHandler_)}this.track_.removeEventListener("cuechange",this.selectCurrentItem_);this.track_=null}this.track_=t;if(this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);if(i){i.addEventListener("load",this.updateHandler_)}this.track_.addEventListener("cuechange",this.selectCurrentItem_)}};r.findChaptersTrack=function e(){var t=this.player_.textTracks()||[];for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.kind===this.kind_){return i}}};r.getMenuCaption=function e(){if(this.track_&&this.track_.label){return this.track_.label}return this.localize(bt(this.kind_))};r.createMenu=function t(){this.options_.title=this.getMenuCaption();return e.prototype.createMenu.call(this)};r.createItems=function e(){var t=[];if(!this.track_){return t}var r=this.track_.cues;if(!r){return t}for(var i=0,n=r.length;i<n;i++){var a=r[i];var s=new bn(this.player_,{track:this.track_,cue:a});t.push(s)}return t};return t}(_n);Tn.prototype.kind_="chapters";Tn.prototype.controlText_="Chapters";At.registerComponent("ChaptersButton",Tn);var Sn=function(e){Dt(t,e);function t(t,r,i){var n;n=e.call(this,t,r,i)||this;var a=t.textTracks();var s=tt(Ot(n),n.handleTracksChange);a.addEventListener("change",s);n.on("dispose",function(){a.removeEventListener("change",s)});return n}var r=t.prototype;r.handleTracksChange=function e(t){var r=this.player().textTracks();var i=false;for(var n=0,a=r.length;n<a;n++){var s=r[n];if(s.kind!==this.kind_&&s.mode==="showing"){i=true;break}}if(i){this.disable()}else{this.enable()}};r.buildCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(_n);Sn.prototype.kind_="descriptions";Sn.prototype.controlText_="Descriptions";At.registerComponent("DescriptionsButton",Sn);var En=function(e){Dt(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)};return t}(_n);En.prototype.kind_="subtitles";En.prototype.controlText_="Subtitles";At.registerComponent("SubtitlesButton",En);var In=function(e){Dt(t,e);function t(t,r){var i;r.track={player:t,kind:r.kind,label:r.kind+" settings",selectable:false,default:false,mode:"disabled"};r.selectable=false;r.name="CaptionSettingsMenuItem";i=e.call(this,t,r)||this;i.addClass("vjs-texttrack-settings");i.controlText(", opens "+r.kind+" settings dialog");return i}var r=t.prototype;r.handleClick=function e(t){this.player().getChild("textTrackSettings").open()};return t}(gn);At.registerComponent("CaptionSettingsMenuItem",In);var Cn=function(e){Dt(t,e);function t(t,r,i){return e.call(this,t,r,i)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new In(this.player_,{kind:this.kind_}));this.hideThreshold_+=1}return e.prototype.createItems.call(this,r)};return t}(_n);Cn.prototype.kind_="captions";Cn.prototype.controlText_="Captions";At.registerComponent("CaptionsButton",Cn);var kn=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(r,i,n){var a=e.prototype.createEl.call(this,r,i,n);var s=a.querySelector(".vjs-menu-item-text");if(this.options_.track.kind==="captions"){s.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":true}));s.appendChild(ne("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))}return a};return t}(gn);At.registerComponent("SubsCapsMenuItem",kn);var wn=function(e){Dt(t,e);function t(t,r){var i;if(r===void 0){r={}}i=e.call(this,t,r)||this;i.label_="subtitles";if(["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1){i.label_="captions"}i.menuButton_.controlText(bt(i.label_));return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function t(){var r=[];if(!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){r.push(new In(this.player_,{kind:this.label_}));this.hideThreshold_+=1}r=e.prototype.createItems.call(this,r,kn);return r};return t}(_n);wn.prototype.kinds_=["captions","subtitles"];wn.prototype.controlText_="Subtitles";At.registerComponent("SubsCapsButton",wn);var An=function(e){Dt(t,e);function t(t,r){var i;var n=r.track;var a=t.audioTracks();r.label=n.label||n.language||"Unknown";r.selected=n.enabled;i=e.call(this,t,r)||this;i.track=n;i.addClass("vjs-"+n.kind+"-menu-item");var s=function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}i.handleTracksChange.apply(Ot(i),r)};a.addEventListener("change",s);i.on("dispose",function(){a.removeEventListener("change",s)});return i}var r=t.prototype;r.createEl=function t(r,i,n){var a=e.prototype.createEl.call(this,r,i,n);var s=a.querySelector(".vjs-menu-item-text");if(this.options_.track.kind==="main-desc"){s.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":true}));s.appendChild(ne("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))}return a};r.handleClick=function t(r){e.prototype.handleClick.call(this,r);this.track.enabled=true;if(this.player_.tech_.featuresNativeAudioTracks){var i=this.player_.audioTracks();for(var n=0;n<i.length;n++){var a=i[n];if(a===this.track){continue}a.enabled=a===this.track}}};r.handleTracksChange=function e(t){this.selected(this.track.enabled)};return t}(mn);At.registerComponent("AudioTrackMenuItem",An);var Pn=function(e){Dt(t,e);function t(t,r){if(r===void 0){r={}}r.tracks=t.audioTracks();return e.call(this,t,r)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function e(t){if(t===void 0){t=[]}this.hideThreshold_=1;var r=this.player_.audioTracks();for(var i=0;i<r.length;i++){var n=r[i];t.push(new An(this.player_,{track:n,selectable:true,multiSelectable:false}))}return t};return t}(pn);Pn.prototype.controlText_="Audio Track";At.registerComponent("AudioTrackButton",Pn);var On=function(e){Dt(t,e);function t(t,r){var i;var n=r.rate;var a=parseFloat(n,10);r.label=n;r.selected=a===t.playbackRate();r.selectable=true;r.multiSelectable=false;i=e.call(this,t,r)||this;i.label=n;i.rate=a;i.on(t,"ratechange",function(e){return i.update(e)});return i}var r=t.prototype;r.handleClick=function t(r){e.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};r.update=function e(t){this.selected(this.player().playbackRate()===this.rate)};return t}(mn);On.prototype.contentElType="button";At.registerComponent("PlaybackRateMenuItem",On);var xn=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.menuButton_.el_.setAttribute("aria-describedby",i.labelElId_);i.updateVisibility();i.updateLabel();i.on(t,"loadstart",function(e){return i.updateVisibility(e)});i.on(t,"ratechange",function(e){return i.updateLabel(e)});i.on(t,"playbackrateschange",function(e){return i.handlePlaybackRateschange(e)});return i}var r=t.prototype;r.createEl=function t(){var r=e.prototype.createEl.call(this);this.labelElId_="vjs-playback-rate-value-label-"+this.id_;this.labelEl_=ne("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"});r.appendChild(this.labelEl_);return r};r.dispose=function t(){this.labelEl_=null;e.prototype.dispose.call(this)};r.buildCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)};r.buildWrapperCSSClass=function t(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)};r.createItems=function e(){var t=this.playbackRates();var r=[];for(var i=t.length-1;i>=0;i--){r.push(new On(this.player(),{rate:t[i]+"x"}))}return r};r.updateARIAAttributes=function e(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};r.handleClick=function e(t){var r=this.player().playbackRate();var i=this.playbackRates();var n=i.indexOf(r);var a=(n+1)%i.length;this.player().playbackRate(i[a])};r.handlePlaybackRateschange=function e(t){this.update()};r.playbackRates=function e(){var t=this.player();return t.playbackRates&&t.playbackRates()||[]};r.playbackRateSupported=function e(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0};r.updateVisibility=function e(t){if(this.playbackRateSupported()){this.removeClass("vjs-hidden")}else{this.addClass("vjs-hidden")}};r.updateLabel=function e(t){if(this.playbackRateSupported()){this.labelEl_.textContent=this.player().playbackRate()+"x"}};return t}(hn);xn.prototype.controlText_="Playback Rate";At.registerComponent("PlaybackRateMenuButton",xn);var Dn=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(r,i,n){if(r===void 0){r="div"}if(i===void 0){i={}}if(n===void 0){n={}}if(!i.className){i.className=this.buildCSSClass()}return e.prototype.createEl.call(this,r,i,n)};return t}(At);At.registerComponent("Spacer",Dn);var Ln=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)};r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})};return t}(Dn);At.registerComponent("CustomControlSpacer",Ln);var Rn=function(e){Dt(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;r.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};return t}(At);Rn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};if("exitPictureInPicture"in t){Rn.prototype.options_.children.splice(Rn.prototype.options_.children.length-1,0,"pictureInPictureToggle")}At.registerComponent("ControlBar",Rn);var Nn=function(e){Dt(t,e);function t(t,r){var i;i=e.call(this,t,r)||this;i.on(t,"error",function(e){return i.open(e)});return i}var r=t.prototype;r.buildCSSClass=function t(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)};r.content=function e(){var t=this.player().error();return t?this.localize(t.message):""};return t}(Xt);Nn.prototype.options_=T({},Xt.prototype.options_,{pauseOnOpen:false,fillAlways:true,temporary:false,uncloseable:true});At.registerComponent("ErrorDisplay",Nn);var Mn="vjs-text-track-settings";var Un=["#000","Black"];var Bn=["#00F","Blue"];var Fn=["#0FF","Cyan"];var jn=["#0F0","Green"];var Vn=["#F0F","Magenta"];var qn=["#F00","Red"];var Hn=["#FFF","White"];var Wn=["#FF0","Yellow"];var Gn=["1","Opaque"];var Kn=["0.5","Semi-Transparent"];var Yn=["0","Transparent"];var zn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Un,Hn,qn,jn,Bn,Wn,Vn,Fn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Gn,Kn,Yn]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Hn,Un,qn,jn,Bn,Wn,Vn,Fn]},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:[Gn,Kn]},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:[Yn,Kn,Gn]}};zn.windowColor.options=zn.backgroundColor.options;function Xn(e,t){if(t){e=t(e)}if(e&&e!=="none"){return e}}function Qn(e,t){var r=e.options[e.options.selectedIndex].value;return Xn(r,t)}function $n(e,t,r){if(!t){return}for(var i=0;i<e.options.length;i++){if(Xn(e.options[i].value,r)===t){e.selectedIndex=i;break}}}var Jn=function(t){Dt(r,t);function r(e,r){var i;r.temporary=false;i=t.call(this,e,r)||this;i.updateDisplay=i.updateDisplay.bind(Ot(i));i.fill();i.hasBeenOpened_=i.hasBeenFilled_=true;i.endDialog=ne("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")});i.el().appendChild(i.endDialog);i.setDefaults();if(r.persistTextTrackSettings===undefined){i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings}i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings();i.close()});i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults();i.updateDisplay()});I(zn,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)});if(i.options_.persistTextTrackSettings){i.restoreSettings()}return i}var i=r.prototype;i.dispose=function e(){this.endDialog=null;t.prototype.dispose.call(this)};i.createElSelect_=function e(t,r,i){var n=this;if(r===void 0){r=""}if(i===void 0){i="label"}var a=zn[t];var s=a.id.replace("%s",this.id_);var o=[r,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+(i==="label"?"vjs-label":"")+'">',this.localize(a.label),"</"+i+">",'<select aria-labelledby="'+o+'">'].concat(a.options.map(function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")};i.createElFgColor_=function e(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")};i.createElBgColor_=function e(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")};i.createElWinColor_=function e(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")};i.createElColors_=function e(){return ne("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})};i.createElFont_=function e(){return ne("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})};i.createElControls_=function e(){var t=this.localize("restore all settings to the default values");return ne("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})};i.content=function e(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};i.label=function e(){return this.localize("Caption Settings Dialog")};i.description=function e(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")};i.buildCSSClass=function e(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};i.getValues=function e(){var t=this;return C(zn,function(e,r,i){var n=Qn(t.$(r.selector),r.parser);if(n!==undefined){e[i]=n}return e},{})};i.setValues=function e(t){var r=this;I(zn,function(e,i){$n(r.$(e.selector),t[i],e.parser)})};i.setDefaults=function e(){var t=this;I(zn,function(e){var r=e.hasOwnProperty("default")?e["default"]:0;t.$(e.selector).selectedIndex=r})};i.restoreSettings=function t(){var r;try{r=JSON.parse(e.localStorage.getItem(Mn))}catch(e){g.warn(e)}if(r){this.setValues(r)}};i.saveSettings=function t(){if(!this.options_.persistTextTrackSettings){return}var r=this.getValues();try{if(Object.keys(r).length){e.localStorage.setItem(Mn,JSON.stringify(r))}else{e.localStorage.removeItem(Mn)}}catch(e){g.warn(e)}};i.updateDisplay=function e(){var t=this.player_.getChild("textTrackDisplay");if(t){t.updateDisplay()}};i.conditionalBlur_=function e(){this.previouslyActiveEl_=null;var t=this.player_.controlBar;var r=t&&t.subsCapsButton;var i=t&&t.captionsButton;if(r){r.focus()}else if(i){i.focus()}};return r}(Xt);At.registerComponent("TextTrackSettings",Jn);var Zn=function(t){Dt(r,t);function r(r,i){var n;var a=i.ResizeObserver||e.ResizeObserver;if(i.ResizeObserver===null){a=false}var s=St({createEl:!a,reportTouchActivity:false},i);n=t.call(this,r,s)||this;n.ResizeObserver=i.ResizeObserver||e.ResizeObserver;n.loadListener_=null;n.resizeObserver_=null;n.debouncedHandler_=it(function(){n.resizeHandler()},100,false,Ot(n));if(a){n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_);n.resizeObserver_.observe(r.el())}else{n.loadListener_=function(){if(!n.el_||!n.el_.contentWindow){return}var e=n.debouncedHandler_;var t=n.unloadListener_=function(){Xe(this,"resize",e);Xe(this,"unload",t);t=null};ze(n.el_.contentWindow,"unload",t);ze(n.el_.contentWindow,"resize",e)};n.one("load",n.loadListener_)}return n}var i=r.prototype;i.createEl=function e(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})};i.resizeHandler=function e(){if(!this.player_||!this.player_.trigger){return}this.player_.trigger("playerresize")};i.dispose=function e(){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;t.prototype.dispose.call(this)};return r}(At);At.registerComponent("ResizeManager",Zn);var ea={trackingThreshold:20,liveTolerance:15};var ta=function(r){Dt(i,r);function i(e,i){var n;var a=St(ea,i,{createEl:false});n=r.call(this,e,a)||this;n.handleVisibilityChange_=function(e){return n.handleVisibilityChange(e)};n.trackLiveHandler_=function(){return n.trackLive_()};n.handlePlay_=function(e){return n.handlePlay(e)};n.handleFirstTimeupdate_=function(e){return n.handleFirstTimeupdate(e)};n.handleSeeked_=function(e){return n.handleSeeked(e)};n.seekToLiveEdge_=function(e){return n.seekToLiveEdge(e)};n.reset_();n.on(n.player_,"durationchange",function(e){return n.handleDurationchange(e)});n.on(n.player_,"canplay",function(){return n.toggleTracking()});if(q&&"hidden"in t&&"visibilityState"in t){n.on(t,"visibilitychange",n.handleVisibilityChange_)}return n}var n=i.prototype;n.handleVisibilityChange=function e(){if(this.player_.duration()!==Infinity){return}if(t.hidden){this.stopTracking()}else{this.startTracking()}};n.trackLive_=function t(){var r=this.player_.seekable();if(!r||!r.length){return}var i=Number(e.performance.now().toFixed(4));var n=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i;this.pastSeekEnd_=this.pastSeekEnd()+n;var a=this.liveCurrentTime();var s=this.player_.currentTime();var o=this.player_.paused()||this.seekedBehindLive_||Math.abs(a-s)>this.options_.liveTolerance;if(!this.timeupdateSeen_||a===Infinity){o=false}if(o!==this.behindLiveEdge_){this.behindLiveEdge_=o;this.trigger("liveedgechange")}};n.handleDurationchange=function e(){this.toggleTracking()};n.toggleTracking=function e(){if(this.player_.duration()===Infinity&&this.liveWindow()>=this.options_.trackingThreshold){if(this.player_.options_.liveui){this.player_.addClass("vjs-liveui")}this.startTracking()}else{this.player_.removeClass("vjs-liveui");this.stopTracking()}};n.startTracking=function e(){if(this.isTracking()){return}if(!this.timeupdateSeen_){this.timeupdateSeen_=this.player_.hasStarted()}this.trackingInterval_=this.setInterval(this.trackLiveHandler_,et);this.trackLive_();this.on(this.player_,["play","pause"],this.trackLiveHandler_);if(!this.timeupdateSeen_){this.one(this.player_,"play",this.handlePlay_);this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)}else{this.on(this.player_,"seeked",this.handleSeeked_)}};n.handleFirstTimeupdate=function e(){this.timeupdateSeen_=true;this.on(this.player_,"seeked",this.handleSeeked_)};n.handleSeeked=function e(){var t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&t>2;this.nextSeekedFromUser_=false;this.trackLive_()};n.handlePlay=function e(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)};n.reset_=function e(){this.lastTime_=-1;this.pastSeekEnd_=0;this.lastSeekEnd_=-1;this.behindLiveEdge_=true;this.timeupdateSeen_=false;this.seekedBehindLive_=false;this.nextSeekedFromUser_=false;this.clearInterval(this.trackingInterval_);this.trackingInterval_=null;this.off(this.player_,["play","pause"],this.trackLiveHandler_);this.off(this.player_,"seeked",this.handleSeeked_);this.off(this.player_,"play",this.handlePlay_);this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_);this.off(this.player_,"timeupdate",this.seekToLiveEdge_)};n.nextSeekedFromUser=function e(){this.nextSeekedFromUser_=true};n.stopTracking=function e(){if(!this.isTracking()){return}this.reset_();this.trigger("liveedgechange")};n.seekableEnd=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.end(i))}return r.length?r.sort()[r.length-1]:Infinity};n.seekableStart=function e(){var t=this.player_.seekable();var r=[];var i=t?t.length:0;while(i--){r.push(t.start(i))}return r.length?r.sort()[0]:0};n.liveWindow=function e(){var t=this.liveCurrentTime();if(t===Infinity){return 0}return t-this.seekableStart()};n.isLive=function e(){return this.isTracking()};n.atLiveEdge=function e(){return!this.behindLiveEdge()};n.liveCurrentTime=function e(){return this.pastSeekEnd()+this.seekableEnd()};n.pastSeekEnd=function e(){var t=this.seekableEnd();if(this.lastSeekEnd_!==-1&&t!==this.lastSeekEnd_){this.pastSeekEnd_=0}this.lastSeekEnd_=t;return this.pastSeekEnd_};n.behindLiveEdge=function e(){return this.behindLiveEdge_};n.isTracking=function e(){return typeof this.trackingInterval_==="number"};n.seekToLiveEdge=function e(){this.seekedBehindLive_=false;if(this.atLiveEdge()){return}this.nextSeekedFromUser_=false;this.player_.currentTime(this.liveCurrentTime())};n.dispose=function e(){this.off(t,"visibilitychange",this.handleVisibilityChange_);this.stopTracking();r.prototype.dispose.call(this)};return i}(At);At.registerComponent("LiveTracker",ta);var ra=function e(t){var r=t.el();if(r.hasAttribute("src")){t.triggerSourceset(r.src);return true}var i=t.$$("source");var n=[];var a="";if(!i.length){return false}for(var s=0;s<i.length;s++){var o=i[s].src;if(o&&n.indexOf(o)===-1){n.push(o)}}if(!n.length){return false}if(n.length===1){a=n[0]}t.triggerSourceset(a);return true};var ia=Object.defineProperty({},"innerHTML",{get:function e(){return this.cloneNode(true).innerHTML},set:function r(i){var n=t.createElement(this.nodeName.toLowerCase());n.innerHTML=i;var a=t.createDocumentFragment();while(n.childNodes.length){a.appendChild(n.childNodes[0])}this.innerText="";e.Element.prototype.appendChild.call(this,a);return this.innerHTML}});var na=function e(t,r){var i={};for(var n=0;n<t.length;n++){i=Object.getOwnPropertyDescriptor(t[n],r);if(i&&i.set&&i.get){break}}i.enumerable=true;i.configurable=true;return i};var aa=function t(r){return na([r.el(),e.HTMLMediaElement.prototype,e.Element.prototype,ia],"innerHTML")};var sa=function e(t){var r=t.el();if(r.resetSourceWatch_){return}var i={};var n=aa(t);var a=function e(i){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}var s=i.apply(r,n);ra(t);return s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){if(!r[e]){return}i[e]=r[e];r[e]=a(i[e])});Object.defineProperty(r,"innerHTML",St(n,{set:a(n.set)}));r.resetSourceWatch_=function(){r.resetSourceWatch_=null;Object.keys(i).forEach(function(e){r[e]=i[e]});Object.defineProperty(r,"innerHTML",n)};t.one("sourceset",r.resetSourceWatch_)};var oa=Object.defineProperty({},"src",{get:function t(){if(this.hasAttribute("src")){return cr(e.Element.prototype.getAttribute.call(this,"src"))}return""},set:function t(r){e.Element.prototype.setAttribute.call(this,"src",r);return r}});var ua=function t(r){return na([r.el(),e.HTMLMediaElement.prototype,oa],"src")};var la=function e(t){if(!t.featuresSourceset){return}var r=t.el();if(r.resetSourceset_){return}var i=ua(t);var n=r.setAttribute;var a=r.load;Object.defineProperty(r,"src",St(i,{set:function e(n){var a=i.set.call(r,n);t.triggerSourceset(r.src);return a}}));r.setAttribute=function(e,i){var a=n.call(r,e,i);if(/src/i.test(e)){t.triggerSourceset(r.src)}return a};r.load=function(){var e=a.call(r);if(!ra(t)){t.triggerSourceset("");sa(t)}return e};if(r.currentSrc){t.triggerSourceset(r.currentSrc)}else if(!ra(t)){sa(t)}r.resetSourceset_=function(){r.resetSourceset_=null;r.load=a;r.setAttribute=n;Object.defineProperty(r,"src",i);if(r.resetSourceWatch_){r.resetSourceWatch_()}}};var da=function e(t,r,i,n){if(n===void 0){n=true}var a=function e(i){return Object.defineProperty(t,r,{value:i,enumerable:true,writable:true})};var s={configurable:true,enumerable:true,get:function e(){var t=i();a(t);return t}};if(n){s.set=a}return Object.defineProperty(t,r,s)};var ca=function(r){Dt(i,r);function i(e,t){var i;i=r.call(this,e,t)||this;var n=e.source;var a=false;i.featuresVideoFrameCallback=i.featuresVideoFrameCallback&&i.el_.tagName==="VIDEO";if(n&&(i.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)){i.setSource(n)}else{i.handleLateInit_(i.el_)}if(e.enableSourceset){i.setupSourcesetHandling_()}i.isScrubbing_=false;if(i.el_.hasChildNodes()){var s=i.el_.childNodes;var o=s.length;var u=[];while(o--){var l=s[o];var d=l.nodeName.toLowerCase();if(d==="track"){if(!i.featuresNativeTextTracks){u.push(l)}else{i.remoteTextTrackEls().addTrackElement_(l);i.remoteTextTracks().addTrack(l.track);i.textTracks().addTrack(l.track);if(!a&&!i.el_.hasAttribute("crossorigin")&&hr(l.src)){a=true}}}}for(var c=0;c<u.length;c++){i.el_.removeChild(u[c])}}i.proxyNativeTracks_();if(i.featuresNativeTextTracks&&a){g.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n"+"This may prevent text tracks from loading.")}i.restoreMetadataTracksInIOSNativePlayer_();if((G||Y||U)&&e.nativeControlsForTouch===true){i.setControls(true)}i.proxyWebkitFullscreen_();i.triggerReady();return i}var n=i.prototype;n.dispose=function e(){if(this.el_&&this.el_.resetSourceset_){this.el_.resetSourceset_()}i.disposeMediaElement(this.el_);this.options_=null;r.prototype.dispose.call(this)};n.setupSourcesetHandling_=function e(){la(this)};n.restoreMetadataTracksInIOSNativePlayer_=function e(){var t=this.textTracks();var r;var i=function e(){r=[];for(var i=0;i<t.length;i++){var n=t[i];if(n.kind==="metadata"){r.push({track:n,storedMode:n.mode})}}};i();t.addEventListener("change",i);this.on("dispose",function(){return t.removeEventListener("change",i)});var n=function e(){for(var i=0;i<r.length;i++){var n=r[i];if(n.track.mode==="disabled"&&n.track.mode!==n.storedMode){n.track.mode=n.storedMode}}t.removeEventListener("change",e)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",i);t.removeEventListener("change",n);t.addEventListener("change",n)});this.on("webkitendfullscreen",function(){t.removeEventListener("change",i);t.addEventListener("change",i);t.removeEventListener("change",n)})};n.overrideNative_=function e(t,r){var i=this;if(r!==this["featuresNative"+t+"Tracks"]){return}var n=t.toLowerCase();if(this[n+"TracksListeners_"]){Object.keys(this[n+"TracksListeners_"]).forEach(function(e){var t=i.el()[n+"Tracks"];t.removeEventListener(e,i[n+"TracksListeners_"][e])})}this["featuresNative"+t+"Tracks"]=!r;this[n+"TracksListeners_"]=null;this.proxyNativeTracksForType_(n)};n.overrideNativeAudioTracks=function e(t){this.overrideNative_("Audio",t)};n.overrideNativeVideoTracks=function e(t){this.overrideNative_("Video",t)};n.proxyNativeTracksForType_=function e(t){var r=this;var i=Hr[t];var n=this.el()[i.getterName];var a=this[i.getterName]();if(!this["featuresNative"+i.capitalName+"Tracks"]||!n||!n.addEventListener){return}var s={change:function e(i){var n={type:"change",target:a,currentTarget:a,srcElement:a};a.trigger(n);if(t==="text"){r[Wr.remoteText.getterName]().trigger(n)}},addtrack:function e(t){a.addTrack(t.track)},removetrack:function e(t){a.removeTrack(t.track)}};var o=function e(){var t=[];for(var r=0;r<a.length;r++){var i=false;for(var s=0;s<n.length;s++){if(n[s]===a[r]){i=true;break}}if(!i){t.push(a[r])}}while(t.length){a.removeTrack(t.shift())}};this[i.getterName+"Listeners_"]=s;Object.keys(s).forEach(function(e){var t=s[e];n.addEventListener(e,t);r.on("dispose",function(r){return n.removeEventListener(e,t)})});this.on("loadstart",o);this.on("dispose",function(e){return r.off("loadstart",o)})};n.proxyNativeTracks_=function e(){var t=this;Hr.names.forEach(function(e){t.proxyNativeTracksForType_(e)})};n.createEl=function e(){var r=this.options_.tag;if(!r||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(r){var n=r.cloneNode(true);if(r.parentNode){r.parentNode.insertBefore(n,r)}i.disposeMediaElement(r);r=n}else{r=t.createElement("video");var a=this.options_.tag&&fe(this.options_.tag);var s=St({},a);if(!G||this.options_.nativeControlsForTouch!==true){delete s.controls}ce(r,k(s,{id:this.options_.techId,class:"vjs-tech"}))}r.playerId=this.options_.playerId}if(typeof this.options_.preload!=="undefined"){pe(r,"preload",this.options_.preload)}if(this.options_.disablePictureInPicture!==undefined){r.disablePictureInPicture=this.options_.disablePictureInPicture}var o=["loop","muted","playsinline","autoplay"];for(var u=0;u<o.length;u++){var l=o[u];var d=this.options_[l];if(typeof d!=="undefined"){if(d){pe(r,l,l)}else{ve(r,l)}r[l]=d}}return r};n.handleLateInit_=function e(t){if(t.networkState===0||t.networkState===3){return}if(t.readyState===0){var r=false;var i=function e(){r=true};this.on("loadstart",i);var n=function e(){if(!r){this.trigger("loadstart")}};this.on("loadedmetadata",n);this.ready(function(){this.off("loadstart",i);this.off("loadedmetadata",n);if(!r){this.trigger("loadstart")}});return}var a=["loadstart"];a.push("loadedmetadata");if(t.readyState>=2){a.push("loadeddata")}if(t.readyState>=3){a.push("canplay")}if(t.readyState>=4){a.push("canplaythrough")}this.ready(function(){a.forEach(function(e){this.trigger(e)},this)})};n.setScrubbing=function e(t){this.isScrubbing_=t};n.scrubbing=function e(){return this.isScrubbing_};n.setCurrentTime=function e(t){try{if(this.isScrubbing_&&this.el_.fastSeek&&X){this.el_.fastSeek(t)}else{this.el_.currentTime=t}}catch(e){g(e,"Video is not ready. (Video.js)")}};n.duration=function e(){var t=this;if(this.el_.duration===Infinity&&N&&j&&this.el_.currentTime===0){var r=function e(){if(t.el_.currentTime>0){if(t.el_.duration===Infinity){t.trigger("durationchange")}t.off("timeupdate",e)}};this.on("timeupdate",r);return NaN}return this.el_.duration||NaN};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 r=function e(){this.trigger("fullscreenchange",{isFullscreen:false});if(this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()){this.el_.controls=false}};var i=function e(){if("webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"){this.one("webkitendfullscreen",r);this.trigger("fullscreenchange",{isFullscreen:true,nativeIOSFullscreen:true})}};this.on("webkitbeginfullscreen",i);this.on("dispose",function(){t.off("webkitbeginfullscreen",i);t.off("webkitendfullscreen",r)})};n.supportsFullScreen=function t(){if(typeof this.el_.webkitEnterFullScreen==="function"){var r=e.navigator&&e.navigator.userAgent||"";if(/Android/.test(r)||!/Chrome|Mac OS X 10.5/.test(r)){return true}}return false};n.enterFullScreen=function e(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA){Ht(this.el_.play());this.setTimeout(function(){t.pause();try{t.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0)}else{try{t.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}};n.exitFullScreen=function e(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()};n.requestPictureInPicture=function e(){return this.el_.requestPictureInPicture()};n.requestVideoFrameCallback=function e(t){if(this.featuresVideoFrameCallback&&!this.el_.webkitKeys){return this.el_.requestVideoFrameCallback(t)}return r.prototype.requestVideoFrameCallback.call(this,t)};n.cancelVideoFrameCallback=function e(t){if(this.featuresVideoFrameCallback&&!this.el_.webkitKeys){this.el_.cancelVideoFrameCallback(t)}else{r.prototype.cancelVideoFrameCallback.call(this,t)}};n.src=function e(t){if(t===undefined){return this.el_.src}this.setSrc(t)};n.reset=function e(){i.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 e(t,i,n){if(!this.featuresNativeTextTracks){return r.prototype.addTextTrack.call(this,t,i,n)}return this.el_.addTextTrack(t,i,n)};n.createRemoteTextTrack=function e(i){if(!this.featuresNativeTextTracks){return r.prototype.createRemoteTextTrack.call(this,i)}var n=t.createElement("track");if(i.kind){n.kind=i.kind}if(i.label){n.label=i.label}if(i.language||i.srclang){n.srclang=i.language||i.srclang}if(i["default"]){n["default"]=i["default"]}if(i.id){n.id=i.id}if(i.src){n.src=i.src}return n};n.addRemoteTextTrack=function e(t,i){var n=r.prototype.addRemoteTextTrack.call(this,t,i);if(this.featuresNativeTextTracks){this.el().appendChild(n)}return n};n.removeRemoteTextTrack=function e(t){r.prototype.removeRemoteTextTrack.call(this,t);if(this.featuresNativeTextTracks){var i=this.$$("track");var n=i.length;while(n--){if(t===i[n]||t===i[n].track){this.el().removeChild(i[n])}}}};n.getVideoPlaybackQuality=function t(){if(typeof this.el().getVideoPlaybackQuality==="function"){return this.el().getVideoPlaybackQuality()}var r={};if(typeof this.el().webkitDroppedFrameCount!=="undefined"&&typeof this.el().webkitDecodedFrameCount!=="undefined"){r.droppedVideoFrames=this.el().webkitDroppedFrameCount;r.totalVideoFrames=this.el().webkitDecodedFrameCount}if(e.performance&&typeof e.performance.now==="function"){r.creationTime=e.performance.now()}else if(e.performance&&e.performance.timing&&typeof e.performance.timing.navigationStart==="number"){r.creationTime=e.Date.now()-e.performance.timing.navigationStart}return r};return i}(zr);da(ca,"TEST_VID",function(){if(!ee()){return}var e=t.createElement("video");var r=t.createElement("track");r.kind="captions";r.srclang="en";r.label="English";e.appendChild(r);return e});ca.isSupported=function(){try{ca.TEST_VID.volume=.5}catch(e){return false}return!!(ca.TEST_VID&&ca.TEST_VID.canPlayType)};ca.canPlayType=function(e){return ca.TEST_VID.canPlayType(e)};ca.canPlaySource=function(e,t){return ca.canPlayType(e.type)};ca.canControlVolume=function(){try{var t=ca.TEST_VID.volume;ca.TEST_VID.volume=t/2+.1;var r=t!==ca.TEST_VID.volume;if(r&&z){e.setTimeout(function(){if(ca&&ca.prototype){ca.prototype.featuresVolumeControl=t!==ca.TEST_VID.volume}});return false}return r}catch(e){return false}};ca.canMuteVolume=function(){try{var e=ca.TEST_VID.muted;ca.TEST_VID.muted=!e;if(ca.TEST_VID.muted){pe(ca.TEST_VID,"muted","muted")}else{ve(ca.TEST_VID,"muted","muted")}return e!==ca.TEST_VID.muted}catch(e){return false}};ca.canControlPlaybackRate=function(){if(N&&j&&V<58){return false}try{var e=ca.TEST_VID.playbackRate;ca.TEST_VID.playbackRate=e/2+.1;return e!==ca.TEST_VID.playbackRate}catch(e){return false}};ca.canOverrideAttributes=function(){try{var e=function e(){};Object.defineProperty(t.createElement("video"),"src",{get:e,set:e});Object.defineProperty(t.createElement("audio"),"src",{get:e,set:e});Object.defineProperty(t.createElement("video"),"innerHTML",{get:e,set:e});Object.defineProperty(t.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return false}return true};ca.supportsNativeTextTracks=function(){return X||z&&j};ca.supportsNativeVideoTracks=function(){return!!(ca.TEST_VID&&ca.TEST_VID.videoTracks)};ca.supportsNativeAudioTracks=function(){return!!(ca.TEST_VID&&ca.TEST_VID.audioTracks)};ca.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(e){var t=e[0],r=e[1];da(ca.prototype,t,function(){return ca[r]()},true)});ca.prototype.featuresVolumeControl=ca.canControlVolume();ca.prototype.movingMediaElementInDOM=!z;ca.prototype.featuresFullscreenResize=true;ca.prototype.featuresProgressEvents=true;ca.prototype.featuresTimeupdateEvents=true;ca.prototype.featuresVideoFrameCallback=!!(ca.TEST_VID&&ca.TEST_VID.requestVideoFrameCallback);var fa;ca.patchCanPlayType=function(){if(M>=4&&!B&&!j){fa=ca.TEST_VID&&ca.TEST_VID.constructor.prototype.canPlayType;ca.TEST_VID.constructor.prototype.canPlayType=function(e){var t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;if(e&&t.test(e)){return"maybe"}return fa.call(this,e)}}};ca.unpatchCanPlayType=function(){var e=ca.TEST_VID.constructor.prototype.canPlayType;if(fa){ca.TEST_VID.constructor.prototype.canPlayType=fa}return e};ca.patchCanPlayType();ca.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){}})()}};ca.resetMediaElement=function(e){if(!e){return}var t=e.querySelectorAll("source");var r=t.length;while(r--){e.removeChild(t[r])}e.removeAttribute("src");if(typeof e.load==="function"){(function(){try{e.load()}catch(e){}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){ca.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){ca.prototype["set"+bt(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","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){ca.prototype[e]=function(){return this.el_[e]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(e){ca.prototype["set"+bt(e)]=function(t){this.el_[e]=t}});["pause","load","play"].forEach(function(e){ca.prototype[e]=function(){return this.el_[e]()}});zr.withSourceHandlers(ca);ca.nativeSourceHandler={};ca.nativeSourceHandler.canPlayType=function(e){try{return ca.TEST_VID.canPlayType(e)}catch(e){return""}};ca.nativeSourceHandler.canHandleSource=function(e,t){if(e.type){return ca.nativeSourceHandler.canPlayType(e.type)}else if(e.src){var r=fr(e.src);return ca.nativeSourceHandler.canPlayType("video/"+r)}return""};ca.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};ca.nativeSourceHandler.dispose=function(){};ca.registerSourceHandler(ca.nativeSourceHandler);zr.registerTech("Html5",ca);var ha=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"];var pa={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"};var va=["tiny","xsmall","small","medium","large","xlarge","huge"];var ma={};va.forEach(function(e){var t=e.charAt(0)==="x"?"x-"+e.substring(1):e;ma[e]="vjs-layout-"+t});var ga={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity};var ya=function(i){Dt(a,i);function a(e,n,s){var o;e.id=e.id||n.id||"vjs_video_"+Fe();n=k(a.getTagSettings(e),n);n.initChildren=false;n.createEl=false;n.evented=false;n.reportTouchActivity=false;if(!n.language){if(typeof e.closest==="function"){var l=e.closest("[lang]");if(l&&l.getAttribute){n.language=l.getAttribute("lang")}}else{var d=e;while(d&&d.nodeType===1){if(fe(d).hasOwnProperty("lang")){n.language=d.getAttribute("lang");break}d=d.parentNode}}}o=i.call(this,null,n,s)||this;o.boundDocumentFullscreenChange_=function(e){return o.documentFullscreenChange_(e)};o.boundFullWindowOnEscKey_=function(e){return o.fullWindowOnEscKey(e)};o.boundUpdateStyleEl_=function(e){return o.updateStyleEl_(e)};o.boundApplyInitTime_=function(e){return o.applyInitTime_(e)};o.boundUpdateCurrentBreakpoint_=function(e){return o.updateCurrentBreakpoint_(e)};o.boundHandleTechClick_=function(e){return o.handleTechClick_(e)};o.boundHandleTechDoubleClick_=function(e){return o.handleTechDoubleClick_(e)};o.boundHandleTechTouchStart_=function(e){return o.handleTechTouchStart_(e)};o.boundHandleTechTouchMove_=function(e){return o.handleTechTouchMove_(e)};o.boundHandleTechTouchEnd_=function(e){return o.handleTechTouchEnd_(e)};o.boundHandleTechTap_=function(e){return o.handleTechTap_(e)};o.isFullscreen_=false;o.log=y(o.id_);o.fsApi_=u;o.isPosterFromTech_=false;o.queuedCallbacks_=[];o.isReady_=false;o.hasStarted_=false;o.userActive_=false;o.debugEnabled_=false;o.audioOnlyMode_=false;o.audioPosterMode_=false;o.audioOnlyCache_={playerHeight:null,hiddenChildren:[]};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=e;o.tagAttributes=e&&fe(e);o.language(o.options_.language);if(n.languages){var c={};Object.getOwnPropertyNames(n.languages).forEach(function(e){c[e.toLowerCase()]=n.languages[e]});o.languages_=c}else{o.languages_=a.prototype.options_.languages}o.resetCache_();o.poster_=n.poster||"";o.controls_=!!n.controls;e.controls=false;e.removeAttribute("controls");o.changingSrc_=false;o.playCallbacks_=[];o.playTerminatedQueue_=[];if(e.hasAttribute("autoplay")){o.autoplay(true)}else{o.autoplay(o.options_.autoplay)}if(n.plugins){Object.keys(n.plugins).forEach(function(e){if(typeof o[e]!=="function"){throw new Error('plugin "'+e+'" does not exist')}})}o.scrubbing_=false;o.el_=o.createEl();mt(Ot(o),{eventBusKey:"el_"});if(o.fsApi_.requestFullscreen){ze(t,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_);o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)}if(o.fluid_){o.on(["playerreset","resize"],o.boundUpdateStyleEl_)}var f=St(o.options_);if(n.plugins){Object.keys(n.plugins).forEach(function(e){o[e](n.plugins[e])})}if(n.debug){o.debug(true)}o.options_.playerOptions=f;o.middleware_=[];o.playbackRates(n.playbackRates);o.initChildren();o.isAudio(e.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(G){o.addClass("vjs-touch-enabled")}if(!z){o.addClass("vjs-workinghover")}a.players[o.id_]=Ot(o);var h=r.split(".")[0];o.addClass("vjs-v"+h);o.userActive(true);o.reportUserActivity();o.one("play",function(e){return o.listenForUserActivity_(e)});o.on("stageclick",function(e){return o.handleStageClick_(e)});o.on("keydown",function(e){return o.handleKeyDown(e)});o.on("languagechange",function(e){return o.handleLanguagechange(e)});o.breakpoints(o.options_.breakpoints);o.responsive(o.options_.responsive);o.on("ready",function(){o.audioPosterMode(o.options_.audioPosterMode);o.audioOnlyMode(o.options_.audioOnlyMode)});return o}var s=a.prototype;s.dispose=function e(){var r=this;this.trigger("dispose");this.off("dispose");Xe(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);Xe(t,"keydown",this.boundFullWindowOnEscKey_);if(this.styleEl_&&this.styleEl_.parentNode){this.styleEl_.parentNode.removeChild(this.styleEl_);this.styleEl_=null}a.players[this.id_]=null;if(this.tag&&this.tag.player){this.tag.player=null}if(this.el_&&this.el_.player){this.el_.player=null}if(this.tech_){this.tech_.dispose();this.isPosterFromTech_=false;this.poster_=""}if(this.playerElIngest_){this.playerElIngest_=null}if(this.tag){this.tag=null}li(this);Gr.names.forEach(function(e){var t=Gr[e];var i=r[t.getterName]();if(i&&i.off){i.off()}});i.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})};s.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_=i.prototype.createEl.call(this,"div")}var u=fe(n);if(o){a=this.el_=n;n=this.tag=t.createElement("video");while(a.children.length){n.appendChild(a.firstChild)}if(!oe(a,"video-js")){ue(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");u.tabindex="-1";if(q||j&&W){n.setAttribute("role","application");u.role="application"}n.removeAttribute("width");n.removeAttribute("height");if("width"in u){delete u.width}if("height"in u){delete u.height}Object.getOwnPropertyNames(u).forEach(function(e){if(!(o&&e==="class")){a.setAttribute(e,u[e])}if(o){n.setAttribute(e,u[e])}});n.playerId=n.id;n.id+="_html5_api";n.className="vjs-tech";n.player=a.player=this;this.addClass("vjs-paused");if(e.VIDEOJS_NO_DYNAMIC_STYLE!==true){this.styleEl_=Ne("vjs-styles-dimensions");var l=we(".vjs-styles-defaults");var d=we("head");d.insertBefore(this.styleEl_,l?l.nextSibling:d.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);this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);var c=n.getElementsByTagName("a");for(var f=0;f<c.length;f++){var h=c.item(f);ue(h,"vjs-hidden");h.setAttribute("hidden","hidden")}n.initNetworkState_=n.networkState;if(n.parentNode&&!s){n.parentNode.insertBefore(a,n)}se(n,a);this.children_.unshift(n);this.el_.setAttribute("lang",this.language_);this.el_.setAttribute("translate","no");this.el_=a;return a};s.crossOrigin=function e(t){if(!t){return this.techGet_("crossOrigin")}if(t!=="anonymous"&&t!=="use-credentials"){g.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"');return}this.techCall_("setCrossOrigin",t);return};s.width=function e(t){return this.dimension("width",t)};s.height=function e(t){return this.dimension("height",t)};s.dimension=function e(t,r){var i=t+"_";if(r===undefined){return this[i]||0}if(r===""||r==="auto"){this[i]=undefined;this.updateStyleEl_();return}var n=parseFloat(r);if(isNaN(n)){g.error('Improper value "'+r+'" supplied for for '+t);return}this[i]=n;this.updateStyleEl_()};s.fluid=function e(t){var r=this;if(t===undefined){return!!this.fluid_}this.fluid_=!!t;if(ot(this)){this.off(["playerreset","resize"],this.boundUpdateStyleEl_)}if(t){this.addClass("vjs-fluid");this.fill(false);ut(this,function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)})}else{this.removeClass("vjs-fluid")}this.updateStyleEl_()};s.fill=function e(t){if(t===undefined){return!!this.fill_}this.fill_=!!t;if(t){this.addClass("vjs-fill");this.fluid(false)}else{this.removeClass("vjs-fill")}};s.aspectRatio=function e(t){if(t===undefined){return this.aspectRatio_}if(!/^\d+\:\d+$/.test(t)){throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.")}this.aspectRatio_=t;this.fluid(true);this.updateStyleEl_()};s.updateStyleEl_=function t(){if(e.VIDEOJS_NO_DYNAMIC_STYLE===true){var r=typeof this.width_==="number"?this.width_:this.options_.width;var i=typeof this.height_==="number"?this.height_:this.options_.height;var n=this.tech_&&this.tech_.el();if(n){if(r>=0){n.width=r}if(i>=0){n.height=i}}return}var a;var s;var o;var u;if(this.aspectRatio_!==undefined&&this.aspectRatio_!=="auto"){o=this.aspectRatio_}else if(this.videoWidth()>0){o=this.videoWidth()+":"+this.videoHeight()}else{o="16:9"}var l=o.split(":");var d=l[1]/l[0];if(this.width_!==undefined){a=this.width_}else if(this.height_!==undefined){a=this.height_/d}else{a=this.videoWidth()||300}if(this.height_!==undefined){s=this.height_}else{s=a*d}if(/^[^a-zA-Z]/.test(this.id())){u="dimensions-"+this.id()}else{u=this.id()+"-dimensions"}this.addClass(u);Me(this.styleEl_,"\n ."+u+" {\n width: "+a+"px;\n height: "+s+"px;\n }\n\n ."+u+".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: "+d*100+"%;\n }\n ")};s.loadTech_=function e(t,r){var i=this;if(this.tech_){this.unloadTech_()}var n=bt(t);var a=t.charAt(0).toLowerCase()+t.slice(1);if(n!=="Html5"&&this.tag){zr.getTech("Html5").disposeMediaElement(this.tag);this.tag.player=null;this.tag=null}this.techName_=n;this.isReady_=false;var s=this.autoplay();if(typeof this.autoplay()==="string"||this.autoplay()===true&&this.options_.normalizeAutoplay){s=false}var o={source:r,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+a+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,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};Gr.names.forEach(function(e){var t=Gr[e];o[t.getterName]=i[t.privateName]});k(o,this.options_[n]);k(o,this.options_[a]);k(o,this.options_[t.toLowerCase()]);if(this.tag){o.tag=this.tag}if(r&&r.src===this.cache_.src&&this.cache_.currentTime>0){o.startTime=this.cache_.currentTime}var u=zr.getTech(t);if(!u){throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'")}this.tech_=new u(o);this.tech_.ready(tt(this,this.handleTechReady_),true);Yt.jsonToTextTracks(this.textTracksJson_||[],this.tech_);ha.forEach(function(e){i.on(i.tech_,e,function(t){return i["handleTech"+bt(e)+"_"](t)})});Object.keys(pa).forEach(function(e){i.on(i.tech_,e,function(t){if(i.tech_.playbackRate()===0&&i.tech_.seeking()){i.queuedCallbacks_.push({callback:i["handleTech"+pa[e]+"_"].bind(i),event:t});return}i["handleTech"+pa[e]+"_"](t)})});this.on(this.tech_,"loadstart",function(e){return i.handleTechLoadStart_(e)});this.on(this.tech_,"sourceset",function(e){return i.handleTechSourceset_(e)});this.on(this.tech_,"waiting",function(e){return i.handleTechWaiting_(e)});this.on(this.tech_,"ended",function(e){return i.handleTechEnded_(e)});this.on(this.tech_,"seeking",function(e){return i.handleTechSeeking_(e)});this.on(this.tech_,"play",function(e){return i.handleTechPlay_(e)});this.on(this.tech_,"firstplay",function(e){return i.handleTechFirstPlay_(e)});this.on(this.tech_,"pause",function(e){return i.handleTechPause_(e)});this.on(this.tech_,"durationchange",function(e){return i.handleTechDurationChange_(e)});this.on(this.tech_,"fullscreenchange",function(e,t){return i.handleTechFullscreenChange_(e,t)});this.on(this.tech_,"fullscreenerror",function(e,t){return i.handleTechFullscreenError_(e,t)});this.on(this.tech_,"enterpictureinpicture",function(e){return i.handleTechEnterPictureInPicture_(e)});this.on(this.tech_,"leavepictureinpicture",function(e){return i.handleTechLeavePictureInPicture_(e)});this.on(this.tech_,"error",function(e){return i.handleTechError_(e)});this.on(this.tech_,"posterchange",function(e){return i.handleTechPosterChange_(e)});this.on(this.tech_,"textdata",function(e){return i.handleTechTextData_(e)});this.on(this.tech_,"ratechange",function(e){return i.handleTechRateChange_(e)});this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_);this.usingNativeControls(this.techGet_("controls"));if(this.controls()&&!this.usingNativeControls()){this.addTechControlsListeners_()}if(this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)){se(this.tech_.el(),this.el())}if(this.tag){this.tag.player=null;this.tag=null}};s.unloadTech_=function e(){var t=this;Gr.names.forEach(function(e){var r=Gr[e];t[r.privateName]=t[r.getterName]()});this.textTracksJson_=Yt.textTracksToJson(this.tech_);this.isReady_=false;this.tech_.dispose();this.tech_=false;if(this.isPosterFromTech_){this.poster_="";this.trigger("posterchange")}this.isPosterFromTech_=false};s.tech=function e(t){if(t===undefined){g.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\n"+"See https://github.com/videojs/video.js/issues/2617 for more info.\n")}return this.tech_};s.addTechControlsListeners_=function e(){this.removeTechControlsListeners_();this.on(this.tech_,"click",this.boundHandleTechClick_);this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_);this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_);this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_);this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_);this.on(this.tech_,"tap",this.boundHandleTechTap_)};s.removeTechControlsListeners_=function e(){this.off(this.tech_,"tap",this.boundHandleTechTap_);this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_);this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_);this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_);this.off(this.tech_,"click",this.boundHandleTechClick_);this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)};s.handleTechReady_=function e(){this.triggerReady();if(this.cache_.volume){this.techCall_("setVolume",this.cache_.volume)}this.handleTechPosterChange_();this.handleTechDurationChange_()};s.handleTechLoadStart_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-seeking");this.error(null);this.handleTechDurationChange_();if(!this.paused()){this.trigger("loadstart");this.trigger("firstplay")}else{this.hasStarted(false);this.trigger("loadstart")}this.manualAutoplay_(this.autoplay()===true&&this.options_.normalizeAutoplay?"play":this.autoplay())};s.manualAutoplay_=function e(t){var r=this;if(!this.tech_||typeof t!=="string"){return}var i=function e(){var t=r.muted();r.muted(true);var i=function e(){r.muted(t)};r.playTerminatedQueue_.push(i);var n=r.play();if(!qt(n)){return}return n["catch"](function(e){i();throw new Error("Rejection at manualAutoplay. Restoring muted value. "+(e?e:""))})};var n;if(t==="any"&&!this.muted()){n=this.play();if(qt(n)){n=n["catch"](i)}}else if(t==="muted"&&!this.muted()){n=i()}else{n=this.play()}if(!qt(n)){return}return n.then(function(){r.trigger({type:"autoplay-success",autoplay:t})})["catch"](function(){r.trigger({type:"autoplay-failure",autoplay:t})})};s.updateSourceCaches_=function e(t){if(t===void 0){t=""}var r=t;var i="";if(typeof r!=="string"){r=t.src;i=t.type}this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];if(r&&!i){i=pi(this,r)}this.cache_.source=St({},t,{src:r,type:i});var n=this.cache_.sources.filter(function(e){return e.src&&e.src===r});var a=[];var s=this.$$("source");var o=[];for(var u=0;u<s.length;u++){var l=fe(s[u]);a.push(l);if(l.src&&l.src===r){o.push(l.src)}}if(o.length&&!n.length){this.cache_.sources=a}else if(!n.length){this.cache_.sources=[this.cache_.source]}this.cache_.src=r};s.handleTechSourceset_=function e(t){var r=this;if(!this.changingSrc_){var i=function e(t){return r.updateSourceCaches_(t)};var n=this.currentSource().src;var a=t.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(a)){if(!this.lastSource_||this.lastSource_.tech!==a&&this.lastSource_.player!==n){i=function e(){}}}i(a);if(!t.src){this.tech_.any(["sourceset","loadstart"],function(e){if(e.type==="sourceset"){return}var t=r.techGet("currentSrc");r.lastSource_.tech=t;r.updateSourceCaches_(t)})}}this.lastSource_={player:this.currentSource().src,tech:t.src};this.trigger({src:t.src,type:"sourceset"})};s.hasStarted=function e(t){if(t===undefined){return this.hasStarted_}if(t===this.hasStarted_){return}this.hasStarted_=t;if(this.hasStarted_){this.addClass("vjs-has-started");this.trigger("firstplay")}else{this.removeClass("vjs-has-started")}};s.handleTechPlay_=function e(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(true);this.trigger("play")};s.handleTechRateChange_=function e(){if(this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0){this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)});this.queuedCallbacks_=[]}this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")};s.handleTechWaiting_=function e(){var t=this;this.addClass("vjs-waiting");this.trigger("waiting");var r=this.currentTime();var i=function e(){if(r!==t.currentTime()){t.removeClass("vjs-waiting");t.off("timeupdate",e)}};this.on("timeupdate",i)};s.handleTechCanPlay_=function e(){this.removeClass("vjs-waiting");this.trigger("canplay")};s.handleTechCanPlayThrough_=function e(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};s.handleTechPlaying_=function e(){this.removeClass("vjs-waiting");this.trigger("playing")};s.handleTechSeeking_=function e(){this.addClass("vjs-seeking");this.trigger("seeking")};s.handleTechSeeked_=function e(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")};s.handleTechFirstPlay_=function e(){if(this.options_.starttime){g.warn("Passing the `starttime` option to the player will be deprecated in 6.0");this.currentTime(this.options_.starttime)}this.addClass("vjs-has-started");this.trigger("firstplay")};s.handleTechPause_=function e(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")};s.handleTechEnded_=function e(){this.addClass("vjs-ended");this.removeClass("vjs-waiting");if(this.options_.loop){this.currentTime(0);this.play()}else if(!this.paused()){this.pause()}this.trigger("ended")};s.handleTechDurationChange_=function e(){this.duration(this.techGet_("duration"))};s.handleTechClick_=function e(t){if(!this.controls_){return}if(this.options_===undefined||this.options_.userActions===undefined||this.options_.userActions.click===undefined||this.options_.userActions.click!==false){if(this.options_!==undefined&&this.options_.userActions!==undefined&&typeof this.options_.userActions.click==="function"){this.options_.userActions.click.call(this,t)}else if(this.paused()){Ht(this.play())}else{this.pause()}}};s.handleTechDoubleClick_=function e(t){if(!this.controls_){return}var r=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)});if(!r){if(this.options_===undefined||this.options_.userActions===undefined||this.options_.userActions.doubleClick===undefined||this.options_.userActions.doubleClick!==false){if(this.options_!==undefined&&this.options_.userActions!==undefined&&typeof this.options_.userActions.doubleClick==="function"){this.options_.userActions.doubleClick.call(this,t)}else if(this.isFullscreen()){this.exitFullscreen()}else{this.requestFullscreen()}}}};s.handleTechTap_=function e(){this.userActive(!this.userActive())};s.handleTechTouchStart_=function e(){this.userWasActive=this.userActive()};s.handleTechTouchMove_=function e(){if(this.userWasActive){this.reportUserActivity()}};s.handleTechTouchEnd_=function e(t){if(t.cancelable){t.preventDefault()}};s.handleStageClick_=function e(){this.reportUserActivity()};s.toggleFullscreenClass_=function e(){if(this.isFullscreen()){this.addClass("vjs-fullscreen")}else{this.removeClass("vjs-fullscreen")}};s.documentFullscreenChange_=function e(r){var i=r.target.player;if(i&&i!==this){return}var n=this.el();var a=t[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)};s.handleTechFullscreenChange_=function e(t,r){var i=this;if(r){if(r.nativeIOSFullscreen){this.addClass("vjs-ios-native-fs");this.tech_.one("webkitendfullscreen",function(){i.removeClass("vjs-ios-native-fs")})}this.isFullscreen(r.isFullscreen)}};s.handleTechFullscreenError_=function e(t,r){this.trigger("fullscreenerror",r)};s.togglePictureInPictureClass_=function e(){if(this.isInPictureInPicture()){this.addClass("vjs-picture-in-picture")}else{this.removeClass("vjs-picture-in-picture")}};s.handleTechEnterPictureInPicture_=function e(t){this.isInPictureInPicture(true)};s.handleTechLeavePictureInPicture_=function e(t){this.isInPictureInPicture(false)};s.handleTechError_=function e(){var t=this.tech_.error();this.error(t)};s.handleTechTextData_=function e(){var t=null;if(arguments.length>1){t=arguments[1]}this.trigger("textdata",t)};s.getCache=function e(){return this.cache_};s.resetCache_=function e(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}};s.techCall_=function e(t,r){this.ready(function(){if(t in ai){return ri(this.middleware_,this.tech_,t,r)}else if(t in si){return ii(this.middleware_,this.tech_,t,r)}try{if(this.tech_){this.tech_[t](r)}}catch(e){g(e);throw e}},true)};s.techGet_=function e(t){if(!this.tech_||!this.tech_.isReady_){return}if(t in ni){return ti(this.middleware_,this.tech_,t)}else if(t in si){return ii(this.middleware_,this.tech_,t)}try{return this.tech_[t]()}catch(e){if(this.tech_[t]===undefined){g("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e);throw e}if(e.name==="TypeError"){g("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e);this.tech_.isReady_=false;throw e}g(e);throw e}};s.play=function t(){var r=this;var i=this.options_.Promise||e.Promise;if(i){return new i(function(e){r.play_(e)})}return this.play_()};s.play_=function e(t){var r=this;if(t===void 0){t=Ht}this.playCallbacks_.push(t);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_){this.off(["ready","loadstart"],this.waitToPlay_);this.waitToPlay_=null}if(!this.isReady_||!i){this.waitToPlay_=function(e){r.play_()};this.one(["ready","loadstart"],this.waitToPlay_);if(!i&&(X||z)){this.load()}return}var n=this.techGet_("play");if(n===null){this.runPlayTerminatedQueue_()}else{this.runPlayCallbacks_(n)}};s.runPlayTerminatedQueue_=function e(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];t.forEach(function(e){e()})};s.runPlayCallbacks_=function e(t){var r=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];r.forEach(function(e){e(t)})};s.pause=function e(){this.techCall_("pause")};s.paused=function e(){return this.techGet_("paused")===false?false:true};s.played=function e(){return this.techGet_("played")||Mt(0,0)};s.scrubbing=function e(t){if(typeof t==="undefined"){return this.scrubbing_}this.scrubbing_=!!t;this.techCall_("setScrubbing",this.scrubbing_);if(t){this.addClass("vjs-scrubbing")}else{this.removeClass("vjs-scrubbing")}};s.currentTime=function e(t){if(typeof t!=="undefined"){if(t<0){t=0}if(!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=t;this.off("canplay",this.boundApplyInitTime_);this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",t);this.cache_.initTime=0;return}this.cache_.currentTime=this.techGet_("currentTime")||0;return this.cache_.currentTime};s.applyInitTime_=function e(){this.currentTime(this.cache_.initTime)};s.duration=function e(t){if(t===undefined){return this.cache_.duration!==undefined?this.cache_.duration:NaN}t=parseFloat(t);if(t<0){t=Infinity}if(t!==this.cache_.duration){this.cache_.duration=t;if(t===Infinity){this.addClass("vjs-live")}else{this.removeClass("vjs-live")}if(!isNaN(t)){this.trigger("durationchange")}}};s.remainingTime=function e(){return this.duration()-this.currentTime()};s.remainingTimeDisplay=function e(){return Math.floor(this.duration())-Math.floor(this.currentTime())};s.buffered=function e(){var e=this.techGet_("buffered");if(!e||!e.length){e=Mt(0,0)}return e};s.bufferedPercent=function e(){return Ut(this.buffered(),this.duration())};s.bufferedEnd=function e(){var t=this.buffered();var r=this.duration();var i=t.end(t.length-1);if(i>r){i=r}return i};s.volume=function e(t){var r;if(t!==undefined){r=Math.max(0,Math.min(1,parseFloat(t)));this.cache_.volume=r;this.techCall_("setVolume",r);if(r>0){this.lastVolume_(r)}return}r=parseFloat(this.techGet_("volume"));return isNaN(r)?1:r};s.muted=function e(t){if(t!==undefined){this.techCall_("setMuted",t);return}return this.techGet_("muted")||false};s.defaultMuted=function e(t){if(t!==undefined){return this.techCall_("setDefaultMuted",t)}return this.techGet_("defaultMuted")||false};s.lastVolume_=function e(t){if(t!==undefined&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume};s.supportsFullScreen=function e(){return this.techGet_("supportsFullScreen")||false};s.isFullscreen=function e(t){if(t!==undefined){var r=this.isFullscreen_;this.isFullscreen_=Boolean(t);if(this.isFullscreen_!==r&&this.fsApi_.prefixed){this.trigger("fullscreenchange")}this.toggleFullscreenClass_();return}return this.isFullscreen_};s.requestFullscreen=function t(r){var i=this.options_.Promise||e.Promise;if(i){var n=this;return new i(function(e,t){function i(){n.off("fullscreenerror",s);n.off("fullscreenchange",a)}function a(){i();e()}function s(e,r){i();t(r)}n.one("fullscreenchange",a);n.one("fullscreenerror",s);var o=n.requestFullscreenHelper_(r);if(o){o.then(i,i);o.then(e,t)}})}return this.requestFullscreenHelper_()};s.requestFullscreenHelper_=function e(t){var r=this;var i;if(!this.fsApi_.prefixed){i=this.options_.fullscreen&&this.options_.fullscreen.options||{};if(t!==undefined){i=t}}if(this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](i);if(n){n.then(function(){return r.isFullscreen(true)},function(){return r.isFullscreen(false)})}return n}else if(this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow===true){this.techCall_("enterFullScreen")}else{this.enterFullWindow()}};s.exitFullscreen=function t(){var r=this.options_.Promise||e.Promise;if(r){var i=this;return new r(function(e,t){function r(){i.off("fullscreenerror",a);i.off("fullscreenchange",n)}function n(){r();e()}function a(e,i){r();t(i)}i.one("fullscreenchange",n);i.one("fullscreenerror",a);var s=i.exitFullscreenHelper_();if(s){s.then(r,r);s.then(e,t)}})}return this.exitFullscreenHelper_()};s.exitFullscreenHelper_=function e(){var r=this;if(this.fsApi_.requestFullscreen){var i=t[this.fsApi_.exitFullscreen]();if(i){Ht(i.then(function(){return r.isFullscreen(false)}))}return i}else if(this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow===true){this.techCall_("exitFullScreen")}else{this.exitFullWindow()}};s.enterFullWindow=function e(){this.isFullscreen(true);this.isFullWindow=true;this.docOrigOverflow=t.documentElement.style.overflow;ze(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow="hidden";ue(t.body,"vjs-full-window");this.trigger("enterFullWindow")};s.fullWindowOnEscKey=function e(t){if(wt.isEventKey(t,"Esc")){if(this.isFullscreen()===true){if(!this.isFullWindow){this.exitFullscreen()}else{this.exitFullWindow()}}}};s.exitFullWindow=function e(){this.isFullscreen(false);this.isFullWindow=false;Xe(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow=this.docOrigOverflow;le(t.body,"vjs-full-window");this.trigger("exitFullWindow")};s.disablePictureInPicture=function e(t){if(t===undefined){return this.techGet_("disablePictureInPicture")}this.techCall_("setDisablePictureInPicture",t);this.options_.disablePictureInPicture=t;this.trigger("disablepictureinpicturechanged")};s.isInPictureInPicture=function e(t){if(t!==undefined){this.isInPictureInPicture_=!!t;this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_};s.requestPictureInPicture=function e(){if("pictureInPictureEnabled"in t&&this.disablePictureInPicture()===false){return this.techGet_("requestPictureInPicture")}};s.exitPictureInPicture=function e(){if("pictureInPictureEnabled"in t){return t.exitPictureInPicture()}};s.handleKeyDown=function e(t){var r=this.options_.userActions;if(!r||!r.hotkeys){return}var i=function e(t){var r=t.tagName.toLowerCase();if(t.isContentEditable){return true}var i=["button","checkbox","hidden","radio","reset","submit"];if(r==="input"){return i.indexOf(t.type)===-1}var n=["textarea"];return n.indexOf(r)!==-1};if(i(this.el_.ownerDocument.activeElement)){return}if(typeof r.hotkeys==="function"){r.hotkeys.call(this,t)}else{this.handleHotkeys(t)}};s.handleHotkeys=function e(r){var i=this.options_.userActions?this.options_.userActions.hotkeys:{};var n=i.fullscreenKey,a=n===void 0?function(e){return wt.isEventKey(e,"f")}:n,s=i.muteKey,o=s===void 0?function(e){return wt.isEventKey(e,"m")}:s,u=i.playPauseKey,l=u===void 0?function(e){return wt.isEventKey(e,"k")||wt.isEventKey(e,"Space")}:u;if(a.call(this,r)){r.preventDefault();r.stopPropagation();var d=At.getComponent("FullscreenToggle");if(t[this.fsApi_.fullscreenEnabled]!==false){d.prototype.handleClick.call(this,r)}}else if(o.call(this,r)){r.preventDefault();r.stopPropagation();var c=At.getComponent("MuteToggle");c.prototype.handleClick.call(this,r)}else if(l.call(this,r)){r.preventDefault();r.stopPropagation();var f=At.getComponent("PlayToggle");f.prototype.handleClick.call(this,r)}};s.canPlayType=function e(t){var r;for(var i=0,n=this.options_.techOrder;i<n.length;i++){var a=n[i];var s=zr.getTech(a);if(!s){s=At.getComponent(a)}if(!s){g.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');continue}if(s.isSupported()){r=s.canPlayType(t);if(r){return r}}}return""};s.selectSource=function e(t){var r=this;var i=this.options_.techOrder.map(function(e){return[e,zr.getTech(e)]}).filter(function(e){var t=e[0],r=e[1];if(r){return r.isSupported()}g.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.');return false});var n=function e(t,r,i){var n;t.some(function(e){return r.some(function(t){n=i(e,t);if(n){return true}})});return n};var a;var s=function e(t){return function(e,r){return t(r,e)}};var o=function e(t,i){var n=t[0],a=t[1];if(a.canPlaySource(i,r.options_[n.toLowerCase()])){return{source:i,tech:n}}};if(this.options_.sourceOrder){a=n(t,i,s(o))}else{a=n(i,t,o)}return a||false};s.handleSrc_=function e(t,r){var i=this;if(typeof t==="undefined"){return this.cache_.src||""}if(this.resetRetryOnError_){this.resetRetryOnError_()}var n=vi(t);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}this.changingSrc_=true;if(!r){this.cache_.sources=n}this.updateSourceCaches_(n[0]);Zr(this,n[0],function(e,t){i.middleware_=t;if(!r){i.cache_.sources=n}i.updateSourceCaches_(e);var a=i.src_(e);if(a){if(n.length>1){return i.handleSrc_(n.slice(1))}i.changingSrc_=false;i.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);i.triggerReady();return}ei(t,i.tech_)});if(this.options_.retryOnError&&n.length>1){var a=function e(){i.error(null);i.handleSrc_(n.slice(1),true)};var s=function e(){i.off("error",a)};this.one("error",a);this.one("playing",s);this.resetRetryOnError_=function(){i.off("error",a);i.off("playing",s)}}};s.src=function e(t){return this.handleSrc_(t,false)};s.src_=function e(t){var r=this;var i=this.selectSource([t]);if(!i){return true}if(!Tt(i.tech,this.techName_)){this.changingSrc_=true;this.loadTech_(i.tech,i.source);this.tech_.ready(function(){r.changingSrc_=false});return false}this.ready(function(){if(this.tech_.constructor.prototype.hasOwnProperty("setSource")){this.techCall_("setSource",t)}else{this.techCall_("src",t.src)}this.changingSrc_=false},true);return false};s.load=function e(){this.techCall_("load")};s.reset=function t(){var r=this;var i=this.options_.Promise||e.Promise;if(this.paused()||!i){this.doReset_()}else{var n=this.play();Ht(n.then(function(){return r.doReset_()}))}};s.doReset_=function e(){if(this.tech_){this.tech_.clearTracks("text")}this.resetCache_();this.poster("");this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset");this.resetControlBarUI_();if(ot(this)){this.trigger("playerreset")}};s.resetControlBarUI_=function e(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()};s.resetProgressBar_=function e(){this.currentTime(0);var t=this.controlBar||{},r=t.durationDisplay,i=t.remainingTimeDisplay;if(r){r.updateContent()}if(i){i.updateContent()}};s.resetPlaybackRate_=function e(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()};s.resetVolumeBar_=function e(){this.volume(1);this.trigger("volumechange")};s.currentSources=function e(){var t=this.currentSource();var r=[];if(Object.keys(t).length!==0){r.push(t)}return this.cache_.sources||r};s.currentSource=function e(){return this.cache_.source||{}};s.currentSrc=function e(){return this.currentSource()&&this.currentSource().src||""};s.currentType=function e(){return this.currentSource()&&this.currentSource().type||""};s.preload=function e(t){if(t!==undefined){this.techCall_("setPreload",t);this.options_.preload=t;return}return this.techGet_("preload")};s.autoplay=function e(t){if(t===undefined){return this.options_.autoplay||false}var r;if(typeof t==="string"&&/(any|play|muted)/.test(t)||t===true&&this.options_.normalizeAutoplay){this.options_.autoplay=t;this.manualAutoplay_(typeof t==="string"?t:"play");r=false}else if(!t){this.options_.autoplay=false}else{this.options_.autoplay=true}r=typeof r==="undefined"?this.options_.autoplay:r;if(this.tech_){this.techCall_("setAutoplay",r)}};s.playsinline=function e(t){if(t!==undefined){this.techCall_("setPlaysinline",t);this.options_.playsinline=t;return this}return this.techGet_("playsinline")};s.loop=function e(t){if(t!==undefined){this.techCall_("setLoop",t);this.options_.loop=t;return}return this.techGet_("loop")};s.poster=function e(t){if(t===undefined){return this.poster_}if(!t){t=""}if(t===this.poster_){return}this.poster_=t;this.techCall_("setPoster",t);this.isPosterFromTech_=false;this.trigger("posterchange")};s.handleTechPosterChange_=function e(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";if(t!==this.poster_){this.poster_=t;this.isPosterFromTech_=true;this.trigger("posterchange")}}};s.controls=function e(t){if(t===undefined){return!!this.controls_}t=!!t;if(this.controls_===t){return}this.controls_=t;if(this.usingNativeControls()){this.techCall_("setControls",t)}if(this.controls_){this.removeClass("vjs-controls-disabled");this.addClass("vjs-controls-enabled");this.trigger("controlsenabled");if(!this.usingNativeControls()){this.addTechControlsListeners_()}}else{this.removeClass("vjs-controls-enabled");this.addClass("vjs-controls-disabled");this.trigger("controlsdisabled");if(!this.usingNativeControls()){this.removeTechControlsListeners_()}}};s.usingNativeControls=function e(t){if(t===undefined){return!!this.usingNativeControls_}t=!!t;if(this.usingNativeControls_===t){return}this.usingNativeControls_=t;if(this.usingNativeControls_){this.addClass("vjs-using-native-controls");this.trigger("usingnativecontrols")}else{this.removeClass("vjs-using-native-controls");this.trigger("usingcustomcontrols")}};s.error=function e(t){var r=this;if(t===undefined){return this.error_||null}n("beforeerror").forEach(function(e){var i=e(r,t);if(!(w(i)&&!Array.isArray(i)||typeof i==="string"||typeof i==="number"||i===null)){r.log.error("please return a value that MediaError expects in beforeerror hooks");return}t=i});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 Bt(t);this.addClass("vjs-error");g.error("(CODE:"+this.error_.code+" "+Bt.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error");n("error").forEach(function(e){return e(r,r.error_)});return};s.reportUserActivity=function e(t){this.userActivity_=true};s.userActive=function e(t){if(t===undefined){return this.userActive_}t=!!t;if(t===this.userActive_){return}this.userActive_=t;if(this.userActive_){this.userActivity_=true;this.removeClass("vjs-user-inactive");this.addClass("vjs-user-active");this.trigger("useractive");return}if(this.tech_){this.tech_.one("mousemove",function(e){e.stopPropagation();e.preventDefault()})}this.userActivity_=false;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")};s.listenForUserActivity_=function e(){var t;var r;var i;var n=tt(this,this.reportUserActivity);var a=function e(t){if(t.screenX!==r||t.screenY!==i){r=t.screenX;i=t.screenY;n()}};var s=function e(){n();this.clearInterval(t);t=this.setInterval(n,250)};var o=function e(r){n();this.clearInterval(t)};this.on("mousedown",s);this.on("mousemove",a);this.on("mouseup",o);this.on("mouseleave",o);var u=this.getChild("controlBar");if(u&&!z&&!N){u.on("mouseenter",function(e){if(this.player().options_.inactivityTimeout!==0){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout}this.player().options_.inactivityTimeout=0});u.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})}this.on("keydown",n);this.on("keyup",n);var l;this.setInterval(function(){if(!this.userActivity_){return}this.userActivity_=false;this.userActive(true);this.clearTimeout(l);var e=this.options_.inactivityTimeout;if(e<=0){return}l=this.setTimeout(function(){if(!this.userActivity_){this.userActive(false)}},e)},250)};s.playbackRate=function e(t){if(t!==undefined){this.techCall_("setPlaybackRate",t);return}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.cache_.lastPlaybackRate||this.techGet_("playbackRate")}return 1};s.defaultPlaybackRate=function e(t){if(t!==undefined){return this.techCall_("setDefaultPlaybackRate",t)}if(this.tech_&&this.tech_.featuresPlaybackRate){return this.techGet_("defaultPlaybackRate")}return 1};s.isAudio=function e(t){if(t!==undefined){this.isAudio_=!!t;return}return!!this.isAudio_};s.enableAudioOnlyUI_=function e(){var t=this;this.addClass("vjs-audio-only-mode");var r=this.children();var i=this.getChild("ControlBar");var n=i&&i.currentHeight();r.forEach(function(e){if(e===i){return}if(e.el_&&!e.hasClass("vjs-hidden")){e.hide();t.audioOnlyCache_.hiddenChildren.push(e)}});this.audioOnlyCache_.playerHeight=this.currentHeight();this.height(n);this.trigger("audioonlymodechange")};s.disableAudioOnlyUI_=function e(){this.removeClass("vjs-audio-only-mode");this.audioOnlyCache_.hiddenChildren.forEach(function(e){return e.show()});this.height(this.audioOnlyCache_.playerHeight);this.trigger("audioonlymodechange")};s.audioOnlyMode=function t(r){var i=this;if(typeof r!=="boolean"||r===this.audioOnlyMode_){return this.audioOnlyMode_}this.audioOnlyMode_=r;var n=this.options_.Promise||e.Promise;if(n){if(r){var a=[];if(this.isInPictureInPicture()){a.push(this.exitPictureInPicture())}if(this.isFullscreen()){a.push(this.exitFullscreen())}if(this.audioPosterMode()){a.push(this.audioPosterMode(false))}return n.all(a).then(function(){return i.enableAudioOnlyUI_()})}return n.resolve().then(function(){return i.disableAudioOnlyUI_()})}if(r){if(this.isInPictureInPicture()){this.exitPictureInPicture()}if(this.isFullscreen()){this.exitFullscreen()}this.enableAudioOnlyUI_()}else{this.disableAudioOnlyUI_()}};s.enablePosterModeUI_=function e(){var t=this.tech_&&this.tech_;t.hide();this.addClass("vjs-audio-poster-mode");this.trigger("audiopostermodechange")};s.disablePosterModeUI_=function e(){var t=this.tech_&&this.tech_;t.show();this.removeClass("vjs-audio-poster-mode");this.trigger("audiopostermodechange")};s.audioPosterMode=function t(r){var i=this;if(typeof r!=="boolean"||r===this.audioPosterMode_){return this.audioPosterMode_}this.audioPosterMode_=r;var n=this.options_.Promise||e.Promise;if(n){if(r){if(this.audioOnlyMode()){var a=this.audioOnlyMode(false);return a.then(function(){i.enablePosterModeUI_()})}return n.resolve().then(function(){i.enablePosterModeUI_()})}return n.resolve().then(function(){i.disablePosterModeUI_()})}if(r){if(this.audioOnlyMode()){this.audioOnlyMode(false)}this.enablePosterModeUI_();return}this.disablePosterModeUI_()};s.addTextTrack=function e(t,r,i){if(this.tech_){return this.tech_.addTextTrack(t,r,i)}};s.addRemoteTextTrack=function e(t,r){if(this.tech_){return this.tech_.addRemoteTextTrack(t,r)}};s.removeRemoteTextTrack=function e(t){if(t===void 0){t={}}var r=t,i=r.track;if(!i){i=t}if(this.tech_){return this.tech_.removeRemoteTextTrack(i)}};s.getVideoPlaybackQuality=function e(){return this.techGet_("getVideoPlaybackQuality")};s.videoWidth=function e(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};s.videoHeight=function e(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};s.language=function e(t){if(t===undefined){return this.language_}if(this.language_!==String(t).toLowerCase()){this.language_=String(t).toLowerCase();if(ot(this)){this.trigger("languagechange")}}};s.languages=function e(){return St(a.prototype.options_.languages,this.languages_)};s.toJSON=function e(){var t=St(this.options_);var r=t.tracks;t.tracks=[];for(var i=0;i<r.length;i++){var n=r[i];n=St(n);n.player=undefined;t.tracks[i]=n}return t};s.createModal=function e(t,r){var i=this;r=r||{};r.content=t||"";var n=new Xt(this,r);this.addChild(n);n.on("dispose",function(){i.removeChild(n)});n.open();return n};s.updateCurrentBreakpoint_=function e(){if(!this.responsive()){return}var t=this.currentBreakpoint();var r=this.currentWidth();for(var i=0;i<va.length;i++){var n=va[i];var a=this.breakpoints_[n];if(r<=a){if(t===n){return}if(t){this.removeClass(ma[t])}this.addClass(ma[n]);this.breakpoint_=n;break}}};s.removeCurrentBreakpoint_=function e(){var t=this.currentBreakpointClass();this.breakpoint_="";if(t){this.removeClass(t)}};s.breakpoints=function e(t){if(t===undefined){return k(this.breakpoints_)}this.breakpoint_="";this.breakpoints_=k({},ga,t);this.updateCurrentBreakpoint_();return k(this.breakpoints_)};s.responsive=function e(t){if(t===undefined){return this.responsive_}t=Boolean(t);var r=this.responsive_;if(t===r){return}this.responsive_=t;if(t){this.on("playerresize",this.boundUpdateCurrentBreakpoint_);this.updateCurrentBreakpoint_()}else{this.off("playerresize",this.boundUpdateCurrentBreakpoint_);this.removeCurrentBreakpoint_()}return t};s.currentBreakpoint=function e(){return this.breakpoint_};s.currentBreakpointClass=function e(){return ma[this.breakpoint_]||""};s.loadMedia=function e(t,r){var i=this;if(!t||typeof t!=="object"){return}this.reset();this.cache_.media=St(t);var n=this.cache_.media,a=n.artwork,s=n.poster,o=n.src,u=n.textTracks;if(!a&&s){this.cache_.media.artwork=[{src:s,type:hi(s)}]}if(o){this.src(o)}if(s){this.poster(s)}if(Array.isArray(u)){u.forEach(function(e){return i.addRemoteTextTrack(e,false)})}this.ready(r)};s.getMedia=function e(){if(!this.cache_.media){var t=this.poster();var r=this.currentSources();var i=Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}});var n={src:r,textTracks:i};if(t){n.poster=t;n.artwork=[{src:n.poster,type:hi(n.poster)}]}return n}return St(this.cache_.media)};a.getTagSettings=function e(t){var r={sources:[],tracks:[]};var i=fe(t);var n=i["data-setup"];if(oe(t,"vjs-fill")){i.fill=true}if(oe(t,"vjs-fluid")){i.fluid=true}if(n!==null){var a=jt(n||"{}"),s=a[0],o=a[1];if(s){g.error(s)}k(i,o)}k(r,i);if(t.hasChildNodes()){var u=t.childNodes;for(var l=0,d=u.length;l<d;l++){var c=u[l];var f=c.nodeName.toLowerCase();if(f==="source"){r.sources.push(fe(c))}else if(f==="track"){r.tracks.push(fe(c))}}}return r};s.flexNotSupported_=function e(){var r=t.createElement("i");return!("flexBasis"in r.style||"webkitFlexBasis"in r.style||"mozFlexBasis"in r.style||"msFlexBasis"in r.style||"msFlexOrder"in r.style)};s.debug=function e(t){if(t===undefined){return this.debugEnabled_}if(t){this.trigger("debugon");this.previousLogLevel_=this.log.level;this.log.level("debug");this.debugEnabled_=true}else{this.trigger("debugoff");this.log.level(this.previousLogLevel_);this.previousLogLevel_=undefined;this.debugEnabled_=false}};s.playbackRates=function e(t){if(t===undefined){return this.cache_.playbackRates}if(!Array.isArray(t)){return}if(!t.every(function(e){return typeof e==="number"})){return}this.cache_.playbackRates=t;this.trigger("playbackrateschange")};return a}(At);Gr.names.forEach(function(e){var t=Gr[e];ya.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]}});ya.prototype.crossorigin=ya.prototype.crossOrigin;ya.players={};var _a=e.navigator;ya.prototype.options_={techOrder:zr.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:false,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:_a&&(_a.languages&&_a.languages[0]||_a.userLanguage||_a.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:false,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:false,audioOnlyMode:false,audioPosterMode:false};["ended","seeking","seekable","networkState","readyState"].forEach(function(e){ya.prototype[e]=function(){return this.techGet_(e)}});ha.forEach(function(e){ya.prototype["handleTech"+bt(e)+"_"]=function(){return this.trigger(e)}});At.registerComponent("Player",ya);var ba=b(function(e){function t(r,i){e.exports=t=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return t(r,i)}e.exports=t});function Ta(){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}}var Sa=Ta;var Ea=b(function(e){function t(r,i,n){if(Sa()){e.exports=t=Reflect.construct}else{e.exports=t=function e(t,r,i){var n=[null];n.push.apply(n,r);var a=Function.bind.apply(t,n);var s=new a;if(i)ba(s,i.prototype);return s}}return t.apply(null,arguments)}e.exports=t});var Ia="plugin";var Ca="activePlugins_";var ka={};var wa=function e(t){return ka.hasOwnProperty(t)};var Aa=function e(t){return wa(t)?ka[t]:undefined};var Pa=function e(t,r){t[Ca]=t[Ca]||{};t[Ca][r]=true};var Oa=function e(t,r,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,r);t.trigger(n+":"+r.name,r)};var xa=function e(t,r){var i=function e(){Oa(this,{name:t,plugin:r,instance:null},true);var i=r.apply(this,arguments);Pa(this,t);Oa(this,{name:t,plugin:r,instance:i});return i};Object.keys(r).forEach(function(e){i[e]=r[e]});return i};var Da=function e(t,r){r.prototype.name=t;return function(){Oa(this,{name:t,plugin:r,instance:null},true);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}var a=Ea(r,[this].concat(i));this[t]=function(){return a};Oa(this,a.getEventHash());return a}};var La=function(){function e(t){if(this.constructor===e){throw new Error("Plugin must be sub-classed; not directly instantiated.")}this.player=t;if(!this.log){this.log=this.player.log.createLogger(this.name)}mt(this);delete this.trigger;yt(this,this.constructor.defaultState);Pa(t,this.name);this.dispose=this.dispose.bind(this);t.on("dispose",this.dispose)}var t=e.prototype;t.version=function e(){return this.constructor.VERSION};t.getEventHash=function e(t){if(t===void 0){t={}}t.name=this.name;t.plugin=this.constructor;t.instance=this;return t};t.trigger=function e(t,r){if(r===void 0){r={}}return Qe(this.eventBusEl_,t,this.getEventHash(r))};t.handleStateChanged=function e(t){};t.dispose=function e(){var t=this.name,r=this.player;this.trigger("dispose");this.off();r.off("dispose",this.dispose);r[Ca][t]=false;this.player=this.state=null;r[t]=Da(t,ka[t])};e.isBasic=function t(r){var i=typeof r==="string"?Aa(r):r;return typeof i==="function"&&!e.prototype.isPrototypeOf(i.prototype)};e.registerPlugin=function t(r,i){if(typeof r!=="string"){throw new Error('Illegal plugin name, "'+r+'", must be a string, was '+typeof r+".")}if(wa(r)){g.warn('A plugin named "'+r+'" already exists. You may want to avoid re-registering plugins!')}else if(ya.prototype.hasOwnProperty(r)){throw new Error('Illegal plugin name, "'+r+'", cannot share a name with an existing player method!')}if(typeof i!=="function"){throw new Error('Illegal plugin for "'+r+'", must be a function, was '+typeof i+".")}ka[r]=i;if(r!==Ia){if(e.isBasic(i)){ya.prototype[r]=xa(r,i)}else{ya.prototype[r]=Da(r,i)}}return i};e.deregisterPlugin=function e(t){if(t===Ia){throw new Error("Cannot de-register base plugin.")}if(wa(t)){delete ka[t];delete ya.prototype[t]}};e.getPlugins=function e(t){if(t===void 0){t=Object.keys(ka)}var r;t.forEach(function(e){var t=Aa(e);if(t){r=r||{};r[e]=t}});return r};e.getPluginVersion=function e(t){var r=Aa(t);return r&&r.VERSION||""};return e}();La.getPlugin=Aa;La.BASE_PLUGIN_NAME=Ia;La.registerPlugin(Ia,La);ya.prototype.usingPlugin=function(e){return!!this[Ca]&&this[Ca][e]===true};ya.prototype.hasPlugin=function(e){return!!wa(e)};function Ra(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)ba(e,t)}var Na=Ra;var Ma=function e(t,r){if(r===void 0){r={}}var i=function e(){t.apply(this,arguments)};var n={};if(typeof r==="object"){if(r.constructor!==Object.prototype.constructor){i=r.constructor}n=r}else if(typeof r==="function"){i=r}Na(i,t);if(t){i.super_=t}for(var a in n){if(n.hasOwnProperty(a)){i.prototype[a]=n[a]}}return i};var Ua=function e(t){return t.indexOf("#")===0?t.slice(1):t};function Ba(e,t,r){var i=Ba.getPlayer(e);if(i){if(t){g.warn('Player "'+e+'" is already initialised. Options will not be applied.')}if(r){i.ready(r)}return i}var a=typeof e==="string"?we("#"+Ua(e)):e;if(!te(a)){throw new TypeError("The element or ID supplied is not valid. (videojs)")}if(!a.ownerDocument.defaultView||!a.ownerDocument.body.contains(a)){g.warn("The element supplied is not included in the DOM")}t=t||{};if(t.restoreEl===true){t.restoreEl=(a.parentNode&&a.parentNode.hasAttribute("data-vjs-player")?a.parentNode:a).cloneNode(true)}n("beforesetup").forEach(function(e){var r=e(a,St(t));if(!w(r)||Array.isArray(r)){g.error("please return an object in beforesetup hooks");return}t=St(t,r)});var s=At.getComponent("Player");i=new s(a,t,r);n("setup").forEach(function(e){return e(i)});return i}Ba.hooks_=i;Ba.hooks=n;Ba.hook=a;Ba.hookOnce=o;Ba.removeHook=s;if(e.VIDEOJS_NO_DYNAMIC_STYLE!==true&&ee()){var Fa=we(".vjs-styles-defaults");if(!Fa){Fa=Ne("vjs-styles-defaults");var ja=we("head");if(ja){ja.insertBefore(Fa,ja.firstChild)}Me(Fa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}Le(1,Ba);Ba.VERSION=r;Ba.options=ya.prototype.options_;Ba.getPlayers=function(){return ya.players};Ba.getPlayer=function(e){var t=ya.players;var r;if(typeof e==="string"){var i=Ua(e);var n=t[i];if(n){return n}r=we("#"+i)}else{r=e}if(te(r)){var a=r,s=a.player,o=a.playerId;if(s||t[o]){return s||t[o]}}};Ba.getAllPlayers=function(){return Object.keys(ya.players).map(function(e){return ya.players[e]}).filter(Boolean)};Ba.players=ya.players;Ba.getComponent=At.getComponent;Ba.registerComponent=function(e,t){if(zr.isTech(t)){g.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)")}At.registerComponent.call(At,e,t)};Ba.getTech=zr.getTech;Ba.registerTech=zr.registerTech;Ba.use=Jr;Object.defineProperty(Ba,"middleware",{value:{},writeable:false,enumerable:true});Object.defineProperty(Ba.middleware,"TERMINATOR",{value:$r,writeable:false,enumerable:true});Ba.browser=Q;Ba.TOUCH_ENABLED=G;Ba.extend=Ma;Ba.mergeOptions=St;Ba.bind=tt;Ba.registerPlugin=La.registerPlugin;Ba.deregisterPlugin=La.deregisterPlugin;Ba.plugin=function(e,t){g.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");return La.registerPlugin(e,t)};Ba.getPlugins=La.getPlugins;Ba.getPlugin=La.getPlugin;Ba.getPluginVersion=La.getPluginVersion;Ba.addLanguage=function(e,t){var r;e=(""+e).toLowerCase();Ba.options.languages=St(Ba.options.languages,(r={},r[e]=t,r));return Ba.options.languages[e]};Ba.log=g;Ba.createLogger=y;Ba.createTimeRange=Ba.createTimeRanges=Mt;Ba.formatTime=Ni;Ba.setFormatTime=Li;Ba.resetFormatTime=Ri;Ba.parseUrl=dr;Ba.isCrossOrigin=hr;Ba.EventTarget=nt;Ba.on=ze;Ba.one=$e;Ba.off=Xe;Ba.trigger=Qe;Ba.xhr=Ir;Ba.TextTrack=Nr;Ba.AudioTrack=Mr;Ba.VideoTrack=Ur;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){Ba[e]=function(){g.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead");return Pe[e].apply(null,arguments)}});Ba.computedStyle=P;Ba.dom=Pe;Ba.url=pr;Ba.defineLazyProperty=da;Ba.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});return Ba});var s=a.dedupeVideojs(e.videojs,n);var o=new a({accountId:"1050259881001",adConfigId:"",autoplay:false,css:{controlBarColor:"rgba(0, 0, 0, 0.45)",controlColor:"white",progressColor:"#08088C"},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:"1050259881001",embedId:"default",platformVersion:"6.66.8",playerId:"default",playerName:"Brightcove Default Player"}},{name:"errors",autoInit:true,options:{}},{name:"catalog",autoInit:true,options:{accountId:"1050259881001",policyKey:"BCpkADawqM2TZAjD61cXJET2qzXdZuM3SEB8eRPfovAaSYEfFXF18GleYdVRnfpYf5kIjLivzqcV-WW5uhFAXiAjuqdIq0bsmG3JVJtdNzmvMlmpmmIu6zAjLuPOmDZYnOIu5ltjkrujbzVO"}},{name:"playlist",autoInit:false}],contextMenu:{},playerId:"default",preload:"metadata",videoCloud:{policyKey:"BCpkADawqM2TZAjD61cXJET2qzXdZuM3SEB8eRPfovAaSYEfFXF18GleYdVRnfpYf5kIjLivzqcV-WW5uhFAXiAjuqdIq0bsmG3JVJtdNzmvMlmpmmIu6zAjLuPOmDZYnOIu5ltjkrujbzVO"},skin:"sapphire",vhs:true,playersCDN:"//players.brightcove.net",responsive:true,liveui:true,controlBar:{},version:"6.66.8"},{});if(!s.getTech("flash")){(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsFlash=t(e.videojs)})(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;var r="5.4.2";var i="2.2.1";function n(e){e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};e.streamFromParts=function(e,t){return e+"&"+t};e.streamToParts=function(e){var t={connection:"",stream:""};if(!e){return t}var r=e.search(/&(?![\w-]+=)/);var i=void 0;if(r!==-1){i=r+1}else{r=i=e.lastIndexOf("/")+1;if(r===0){r=i=e.length}}t.connection=e.substring(0,r);t.stream=e.substring(i,e.length);return t};e.isStreamingType=function(t){return t in e.streamingFormats};e.RTMP_RE=/^rtmp[set]?:\/\//i;e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)};e.rtmpSourceHandler={};e.rtmpSourceHandler.canPlayType=function(t){if(e.isStreamingType(t)){return"maybe"}return""};e.rtmpSourceHandler.canHandleSource=function(t,r){var i=e.rtmpSourceHandler.canPlayType(t.type);if(i){return i}if(e.isStreamingSrc(t.src)){return"maybe"}return""};e.rtmpSourceHandler.handleSource=function(t,r,i){var n=e.streamToParts(t.src);r.setRtmpConnection(n.connection);r.setRtmpStream(n.stream)};e.registerSourceHandler(e.rtmpSourceHandler);return e}var a=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var s;if(typeof e!=="undefined"){s=e}else if(typeof a!=="undefined"){s=a}else if(typeof self!=="undefined"){s=self}else{s={}}var o=s;var u=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var l=function(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t};var d=function(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e};var c=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){l(t,e);function t(r,i){u(this,t);var n=d(this,e.call(this,r,i));if(r.source){n.ready(function(){this.setSource(r.source)},true)}if(r.startTime){n.ready(function(){this.load();this.play();this.currentTime(r.startTime)},true)}o.videojs=o.videojs||{};o.videojs.Flash=o.videojs.Flash||{};o.videojs.Flash.onReady=t.onReady;o.videojs.Flash.onEvent=t.onEvent;o.videojs.Flash.onError=t.onError;n.on("seeked",function(){this.lastSeekTarget_=undefined});return n}t.prototype.createEl=function e(){var i=this.options_;if(!i.swf){i.swf="https://vjs.zencdn.net/swf/"+r+"/video-js.swf"}var n=i.techId;var a=v({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:i.autoplay,preload:i.preload,loop:i.loop,muted:i.muted},i.flashVars);var s=v({wmode:"opaque",bgcolor:"#000000"},i.params);var o=v({id:n,name:n,class:"vjs-tech"},i.attributes);this.el_=t.embed(i.swf,a,s,o);this.el_.tech=this;return this.el_};t.prototype.play=function e(){if(this.ended()){this.setCurrentTime(0)}this.el_.vjs_play()};t.prototype.pause=function e(){this.el_.vjs_pause()};t.prototype.src=function e(t){if(t===undefined){return this.currentSrc()}return this.setSrc(t)};t.prototype.setSrc=function e(t){var r=this;t=h.getAbsoluteURL(t);this.el_.vjs_src(t);if(this.autoplay()){this.setTimeout(function(){return r.play()},0)}};t.prototype.seeking=function e(){return this.lastSeekTarget_!==undefined};t.prototype.setCurrentTime=function t(r){var i=this.seekable();if(i.length){r=r>i.start(0)?r:i.start(0);r=r<i.end(i.length-1)?r:i.end(i.length-1);this.lastSeekTarget_=r;this.trigger("seeking");this.el_.vjs_setProperty("currentTime",r);e.prototype.setCurrentTime.call(this)}};t.prototype.currentTime=function e(){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty("currentTime")};t.prototype.currentSrc=function e(){if(this.currentSource_){return this.currentSource_.src}return this.el_.vjs_getProperty("currentSrc")};t.prototype.duration=function e(){if(this.readyState()===0){return NaN}var e=this.el_.vjs_getProperty("duration");return e>=0?e:Infinity};t.prototype.load=function e(){this.el_.vjs_load()};t.prototype.poster=function e(){this.el_.vjs_getProperty("poster")};t.prototype.setPoster=function e(){};t.prototype.seekable=function e(){var t=this.duration();if(t===0){return p()}return p(0,t)};t.prototype.buffered=function e(){var t=this.el_.vjs_getProperty("buffered");if(t.length===0){return p()}return p(t[0][0],t[0][1])};t.prototype.supportsFullScreen=function e(){return false};t.prototype.enterFullScreen=function e(){return false};t.prototype.getVideoPlaybackQuality=function e(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");if(o.performance&&typeof o.performance.now==="function"){t.creationTime=o.performance.now()}else if(o.performance&&o.performance.timing&&typeof o.performance.timing.navigationStart==="number"){t.creationTime=o.Date.now()-o.performance.timing.navigationStart}return t};return t}(c);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 E=0;E<y.length;E++){S(y[E]);T(y[E])}for(var I=0;I<_.length;I++){S(_[I])}g.isSupported=function(){if(t.browser.IS_CHROME&&(!t.browser.IS_ANDROID||!t.browser.IS_IOS)||t.browser.IS_SAFARI&&!t.browser.IS_IOS||t.browser.IS_EDGE){return true}return g.version()[0]>=10};c.withSourceHandlers(g);g.nativeSourceHandler={};g.nativeSourceHandler.canPlayType=function(e){if(e in g.formats){return"maybe"}return""};g.nativeSourceHandler.canHandleSource=function(e,t){var r=void 0;function i(e){var t=h.getFileExtension(e);if(t){return"video/"+t}return""}if(!e.type){r=i(e.src)}else{r=e.type.replace(/;.*/,"").toLowerCase()}return g.nativeSourceHandler.canPlayType(r)};g.nativeSourceHandler.handleSource=function(e,t,r){t.setSrc(e.src)};g.nativeSourceHandler.dispose=function(){};g.registerSourceHandler(g.nativeSourceHandler);g.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};g.onReady=function(e){var t=f.$("#"+e);var r=t&&t.tech;if(r&&r.el()){g.checkReady(r)}};g.checkReady=function(e){if(!e.el()){return}if(e.el().vjs_getProperty){e.triggerReady()}else{this.setTimeout(function(){g.checkReady(e)},50)}};g.onEvent=function(e,t){var r=f.$("#"+e).tech;var i=Array.prototype.slice.call(arguments,2);r.setTimeout(function(){r.trigger(t,i)},1)};g.onError=function(e,t){var r=f.$("#"+e).tech;if(t==="srcnotfound"){return r.error(4)}if(typeof t==="string"){r.error("FLASH: "+t)}else{t.origin="flash";r.error(t)}};g.version=function(){var e="0,0,0";try{e=new o.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{if(m.mimeTypes["application/x-shockwave-flash"].enabledPlugin){e=(m.plugins["Shockwave Flash 2.0"]||m.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(e){}}return e.split(",")};g.embed=function(e,t,r,i){var n=g.getEmbedCode(e,t,r,i);var a=f.createEl("div",{innerHTML:n}).childNodes[0];return a};g.getEmbedCode=function(e,t,r,i){var n='<object type="application/x-shockwave-flash" ';var a="";var s="";var o="";if(t){Object.getOwnPropertyNames(t).forEach(function(e){a+=e+"="+t[e]+"&amp;"})}r=v({movie:e,flashvars:a,allowScriptAccess:"always",allowNetworking:"all"},r);Object.getOwnPropertyNames(r).forEach(function(e){s+='<param name="'+e+'" value="'+r[e]+'" />'});i=v({data:e,width:"100%",height:"100%"},i);Object.getOwnPropertyNames(i).forEach(function(e){o+=e+'="'+i[e]+'" '});return""+n+o+">"+s+"</object>"};n(g);if(c.getTech("Flash")){t.log.warn("Not using videojs-flash as it appears to already be registered");t.log.warn("videojs-flash should only be used with video.js@6 and above")}else{t.registerTech("Flash",g)}g.VERSION=i;return g})}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("global/window"),require("video.js")):typeof r==="function"&&r.amd?r(["exports","global/window","video.js"],t):t(e.videojsFlashlsSourceHandler={},e.window,e.videojs)})(this,function(e,t,r){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;var i=function(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};i.prototype.pipe=function(e){this.on("data",function(t){e.push(t)});this.on("done",function(t){e.flush(t)});return e};i.prototype.push=function(e){this.trigger("data",e)};i.prototype.flush=function(e){this.trigger("done",e)};var n=i;var a=4,s=128;var o=function(e){var t=0,r={payloadType:-1,payloadSize:0},i=0,n=0;while(t<e.byteLength){if(e[t]===s){break}while(e[t]===255){i+=255;t++}i+=e[t++];while(e[t]===255){n+=255;t++}n+=e[t++];if(!r.payload&&i===a){r.payloadType=i;r.payloadSize=n;r.payload=e.subarray(t,t+n);break}t+=n;i=0;n=0}return r};var u=function(e){if(e.payload[0]!==181){return null}if((e.payload[1]<<8|e.payload[2])!==49){return null}if(String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])!=="GA94"){return null}if(e.payload[7]!==3){return null}return e.payload.subarray(8,e.payload.length-1)};var l=function(e,t){var r=[],i,n,a,s;if(!(t[0]&64)){return r}n=t[0]&31;for(i=0;i<n;i++){a=i*3;s={type:t[a+2]&3,pts:e};if(t[a+2]&4){s.ccData=t[a+3]<<8|t[a+4];r.push(s)}}return r};var d=function(e){var t=e.byteLength,r=[],i=1,n,a;while(i<t-2){if(e[i]===0&&e[i+1]===0&&e[i+2]===3){r.push(i+2);i+=2}else{i++}}if(r.length===0){return e}n=t-r.length;a=new Uint8Array(n);var s=0;for(i=0;i<n;s++,i++){if(s===r[0]){s++;r.shift()}a[i]=e[s]}return a};var c={parseSei:o,parseUserData:u,parseCaptionPackets:l,discardEmulationPreventionBytes:d,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,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=c.parseSei(e.escapedRBSP);if(t.payloadType!==c.USER_DATA_REGISTERED_ITU_T_T35){return}r=c.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=c.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);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,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=g()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=g()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=g()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=p(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=m.indexOf(t&7968);if(this.mode_==="rollUp"){this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=p(i);a+=p(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};y.prototype=new n;y.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};y.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=g();this.nonDisplayed_=g();this.lastControlCode_=null;this.column_=0;this.row_=v;this.rollUpRows_=2;this.formatting_=[]};y.prototype.setConstants=function(){if(this.dataChannel_===0){this.BASE_=16;this.EXT_=17;this.CONTROL_=(20|this.field_)<<8;this.OFFSET_=23}else if(this.dataChannel_===1){this.BASE_=24;this.EXT_=25;this.CONTROL_=(28|this.field_)<<8;this.OFFSET_=31}this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};y.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};y.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&(t>=32&&t<=63)};y.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&(t>=32&&t<=47)};y.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&(t>=33&&t<=35)};y.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&(t>=64&&t<=127)};y.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};y.prototype.isNormalChar=function(e){return e>=32&&e<=127};y.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=v;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=g();this.displayed_=g()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};y.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};y.prototype.clearFormatting=function(e){if(!this.formatting_.length){return}var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[];this[this.mode_](e,t)};y.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};y.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};y.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<v+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};y.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var _={CaptionStream: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,r){var i,n="";for(i=t;i<r;i++){n+="%"+("00"+e[i].toString(16)).slice(-2)}return n},E=function(e,t,r){return decodeURIComponent(S(e,t,r))},I=function(e,t,r){return unescape(S(e,t,r))},C=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},k={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=E(e.data,1,t);e.value=E(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=E(e.data,1,t);e.url=E(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=I(e.data,0,t);break}}e.privateData=e.data.subarray(t+1);e.data=e.privateData}},w;w=function(e){var t={debug:!!(e&&e.debug),descriptor:e&&e.descriptor},r=0,i=[],n=0,a;w.prototype.init.call(this);this.dispatchType=T.METADATA_STREAM_TYPE.toString(16);if(t.descriptor){for(a=0;a<t.descriptor.length;a++){this.dispatchType+=("00"+t.descriptor[a].toString(16)).slice(-2)}}this.push=function(e){var a,s,o,u,l,d;if(e.type!=="timed-metadata"){return}if(e.dataAlignmentIndicator){n=0;i.length=0}if(i.length===0&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0))){if(t.debug){console.log("Skipping unrecognized metadata packet")}return}i.push(e);n+=e.data.byteLength;if(i.length===1){r=C(e.data.subarray(6,10));r+=10}if(n<r){return}a={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts};for(l=0;l<r;){a.data.set(i[0].data.subarray(0,r-l),l);l+=i[0].data.byteLength;n-=i[0].data.byteLength;i.shift()}s=10;if(a.data[5]&64){s+=4;s+=C(a.data.subarray(10,14));r-=C(a.data.subarray(16,20))}do{o=C(a.data.subarray(s+4,s+8));if(o<1){return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")}d=String.fromCharCode(a.data[s],a.data[s+1],a.data[s+2],a.data[s+3]);u={id:d,data:a.data.subarray(s+10,s+o+10)};u.key=u.id;if(k[u.id]){k[u.id](u);if(u.owner==="com.apple.streaming.transportStreamTimestamp"){var c=u.data,f=(c[3]&1)<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;f*=4;f+=c[7]&3;u.timeStamp=f;if(a.pts===undefined&&a.dts===undefined){a.pts=u.timeStamp;a.dts=u.timeStamp}this.trigger("timestamp",u)}}a.frames.push(u);s+=10;s+=o}while(s<r);this.trigger("data",a)}};w.prototype=new n;var A=w;var P=function e(t,r){var i={id:r.index+"",width:r.width,height:r.height,bandwidth:r.bitrate,isEnabled_:true};i.enabled=function(e){if(typeof e==="undefined"){return i.isEnabled_}if(e===i.isEnabled_){return}if(e===true||e===false){i.isEnabled_=e;t()}};return i};var O=function e(t){var r=null;var i=function e(){var i=r.filter(function(e){return e.enabled()});if(i.length===r.length||i.length===0){t.el_.vjs_setProperty("autoLevelCapping",-1);t.el_.vjs_setProperty("level",-1);return}if(i.length===1){t.el_.vjs_setProperty("level",parseInt(i[0].id,10));t.el_.vjs_setProperty("autoLevelCapping",-1);return}var n=i[i.length-1].id;t.el_.vjs_setProperty("autoLevelCapping",parseInt(n,10));t.el_.vjs_setProperty("level",-1)};return function(){if(!r){var e=t.el_.vjs_getProperty("levels");r=e.filter(function(e){return!e.audio}).map(P.bind(null,i))}return r}};var x=function e(t){var r=t.el_.vjs_getProperty("audioTracks");var i=t.audioTracks();var n=null;for(var a=0;a<i.length;a++){if(i[a].enabled){n=i[a].id;break}}if(n===null){return}for(var s=0;s<r.length;s++){if(n===r[s].title){t.el_.vjs_setProperty("audioTrack",s);return}}};var D=function e(t){var i=t.el_.vjs_getProperty("altAudioTracks");var n=t.el_.vjs_getProperty("audioTracks");var a=t.el_.vjs_getProperty("audioTrack");n.forEach(function(e,n){var s=i[e.id];t.audioTracks().addTrack(new r.AudioTrack({id:s.name,enabled:a===n,language:s.lang,default:s.default_track,label:s.name}))})};var L="1.4.8";var R=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 N=function e(t,r,i){var n=t.remoteTextTracks()||[];for(var a=0;a<n.length;a++){var s=n[a];if(s.kind===r&&s.label===i){t.removeRemoteTextTrack(s)}}};var M=function e(t){var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r};var U=function e(t,r,i){var n;var a;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime<=r&&a.endTime>=t){i.removeCue(a)}}};var B=function e(t,r){if(t.length){U(0,t.start(0),r)}};var F=function e(t,r){var i=-1;for(var n=0;n<t.length;n++){if(t[n].id===r){i=n;break}}t.selectedIndex_=i;t.trigger({selectedIndex:i,type:"change"})};var j=1/30;var V=function e(t,i){var n=[];if(t&&t.length){for(var a=0;a<t.length;a++){if(i(t.start(a),t.end(a))){n.push([t.start(a),t.end(a)])}}}return r.createTimeRanges(n)};var q=function e(t,r){return V(t,function(e,t){return e-j<=r&&t+j>=r})};var H=function(){function e(e,t,i){var n=this;if(t.options_&&t.options_.playerId){var a=r(t.options_.playerId);if(!a.hasOwnProperty("hls")){Object.defineProperty(a,"hls",{get:function e(){r.log.warn("player.hls is deprecated. Use player.tech_.hls instead.");t.trigger({type:"usage",name:"flashls-player-access"});return n}})}}Object.defineProperties(this,{stats:{get:function e(){return this.tech_.el_.vjs_getProperty("stats")}},bandwidth:{get:function e(){return this.tech_.el_.vjs_getProperty("stats").bandwidth}}});this.tech_=t;this.metadataTrack_=null;this.inbandTextTracks_={};this.metadataStream_=new A;this.captionStream_=new b;this.offsetPts=null;this.offsetDts=null;this.onLoadedmetadata_=this.onLoadedmetadata_.bind(this);this.onSeeking_=this.onSeeking_.bind(this);this.onId3updated_=this.onId3updated_.bind(this);this.onCaptionData_=this.onCaptionData_.bind(this);this.onMetadataStreamData_=this.onMetadataStreamData_.bind(this);this.onCaptionStreamData_=this.onCaptionStreamData_.bind(this);this.onLevelSwitch_=this.onLevelSwitch_.bind(this);this.onLevelLoaded_=this.onLevelLoaded_.bind(this);this.onFragmentLoaded_=this.onFragmentLoaded_.bind(this);this.onAudioTrackChanged=this.onAudioTrackChanged.bind(this);this.onPlay_=this.onPlay_.bind(this);this.tech_.on("loadedmetadata",this.onLoadedmetadata_);this.tech_.on("seeking",this.onSeeking_);this.tech_.on("id3updated",this.onId3updated_);this.tech_.on("captiondata",this.onCaptionData_);this.tech_.on("levelswitch",this.onLevelSwitch_);this.tech_.on("levelloaded",this.onLevelLoaded_);this.tech_.on("fragmentloaded",this.onFragmentLoaded_);this.tech_.on("play",this.onPlay_);this.metadataStream_.on("data",this.onMetadataStreamData_);this.captionStream_.on("data",this.onCaptionStreamData_);this.playlists=new r.EventTarget;this.playlists.media=function(){return n.media_()}}var i=e.prototype;i.src=function e(t){if(!t){return}this.tech_.setSrc(t.src)};i.onPlay_=function e(){if(this.tech_.duration()===Infinity){var t=this.seekable();if(this.tech_.currentTime()<t.start(0)){return this.tech_.setCurrentTime(t.end(t.length-1))}}};i.seekable=function e(){var t=this.tech_.el_.vjs_getProperty("seekableStart");var i=this.tech_.el_.vjs_getProperty("seekableEnd");if(i===0){return r.createTimeRange()}return r.createTimeRange(t,i)};i.media_=function e(){var t=this.tech_.el_.vjs_getProperty("levels");var r=this.tech_.el_.vjs_getProperty("level");var i;if(t.length){i={resolvedUri:t[r].url,attributes:{BANDWIDTH:t[r].bitrate,RESOLUTION:{width:t[r].width,height:t[r].height}}}}return i};i.onLoadedmetadata_=function e(){var t=this;this.representations=O(this.tech_);var i=r.players[this.tech_.options_.playerId];if(i&&i.qualityLevels){this.qualityLevels_=i.qualityLevels();this.representations().forEach(function(e){t.qualityLevels_.addQualityLevel(e)});F(this.qualityLevels_,this.tech_.el_.vjs_getProperty("level")+"")}D(this.tech_);this.tech_.audioTracks().on("change",this.onAudioTrackChanged)};i.onAudioTrackChanged=function e(){x(this.tech_)};i.onLevelSwitch_=function e(t,r){if(this.qualityLevels_){F(this.qualityLevels_,r[0].levelIndex+"")}this.playlists.trigger("mediachange");this.tech_.trigger({type:"mediachange",bubbles:true})};i.onLevelLoaded_=function e(){this.playlists.trigger("loadedplaylist")};i.onFragmentLoaded_=function e(){this.tech_.trigger("bandwidthupdate");this.captionStream_.flush()};i.onSeeking_=function e(){var t=this;U(0,Infinity,this.metadataTrack_);var r=q(this.tech_.buffered(),this.tech_.currentTime());if(!r.length){Object.keys(this.inbandTextTracks_).forEach(function(e){U(0,Infinity,t.inbandTextTracks_[e])});this.captionStream_.reset()}};i.onId3updated_=function e(r,i){var n=t.atob(i[0]);var a=M(n);var s={type:"timed-metadata",dataAlignmentIndicator:true,data:a};this.metadataStream_.push(s)};i.onMetadataStreamData_=function e(r){var i=this;if(!this.metadataTrack_){this.metadataTrack_=this.tech_.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;this.metadataTrack_.inBandMetadataTrackDispatchType="15"}B(this.tech_.buffered(),this.metadataTrack_);var n=this.tech_.currentTime();r.frames.forEach(function(e){var r=new t.VTTCue(n,n+.1,e.value||e.url||e.data||"");r.frame=e;r.value=e;R(r);i.metadataTrack_.addCue(r)});if(this.metadataTrack_.cues&&this.metadataTrack_.cues.length){var a=this.metadataTrack_.cues;var s=[];var o=this.tech_.duration();if(isNaN(o)||Math.abs(o)===Infinity){o=Number.MAX_VALUE}for(var u=0;u<a.length;u++){s.push(a[u])}s.sort(function(e,t){return e.startTime-t.startTime});for(var l=0;l<s.length-1;l++){if(s[l].endTime!==s[l+1].startTime){s[l].endTime=s[l+1].startTime}}s[s.length-1].endTime=o}};i.onCaptionData_=function e(r,i){var n=this;i[0].forEach(function(e){if(!n.offsetPts){n.offsetPts=e.pos}if(!n.offsetDts){n.offsetDts=e.dts}n.captionStream_.push({pts:(e.pos-n.offsetPts)*9e4,dts:(e.dts-n.offsetDts)*9e4,escapedRBSP:M(t.atob(e.data)),nalUnitType:"sei_rbsp"})})};i.onCaptionStreamData_=function e(r){if(r){if(!this.inbandTextTracks_[r.stream]){N(this.tech_,"captions",r.stream);this.inbandTextTracks_[r.stream]=this.tech_.addRemoteTextTrack({kind:"captions",label:r.stream,id:r.stream},false).track}B(this.tech_.buffered(),this.inbandTextTracks_[r.stream]);this.inbandTextTracks_[r.stream].addCue(new t.VTTCue(r.startPts/9e4,r.endPts/9e4,r.text))}};i.dispose=function e(){this.tech_.off("loadedmetadata",this.onLoadedmetadata_);this.tech_.off("seeked",this.onSeeking_);this.tech_.off("id3updated",this.onId3updated_);this.tech_.off("captiondata",this.onCaptionData_);this.tech_.audioTracks().off("change",this.onAudioTrackChanged);this.tech_.off("levelswitch",this.onLevelSwitch_);this.tech_.off("levelloaded",this.onLevelLoaded_);this.tech_.off("fragmentloaded",this.onFragmentLoaded_);this.tech_.off("play",this.onPlay_);if(this.qualityLevels_){this.qualityLevels_.dispose()}};return e}();var W={};var G=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;W.canPlayType=function(e){return G.test(e)?"maybe":""};W.canHandleSource=function(e,t){return W.canPlayType(e.type)==="maybe"};W.handleSource=function(e,t,r){t.hls=new H(e,t,r);t.hls.src(e);return t.hls};r.getTech("Flash").registerSourceHandler(W,0);W.VERSION=L;e.FlashlsHandler=H;e.default=W;Object.defineProperty(e,"__esModule",{value:true})});(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("video.js"),require("@xmldom/xmldom")):typeof r==="function"&&r.amd?r(["exports","video.js","@xmldom/xmldom"],t):(e=typeof globalThis!=="undefined"?globalThis:e||self,t(e.httpStreaming={},e.videojs,e.window))})(this,function(r,i,n){"use strict";function a(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=a(i);function o(e,t,r){return r={path:t,exports:{},require:function(e,t){return u(e,t===undefined||t===null?r.path:t)}},e(r,r.exports),r.exports}function u(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var l=o(function(e){function t(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var d=o(function(e){function t(r,i){e.exports=t=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};e.exports["default"]=e.exports,e.exports.__esModule=true;return t(r,i)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var c=o(function(e){function t(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;d(e,t)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var f=o(function(e,t){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/;var i=/^([^\/?#]*)([^]*)$/;var n=/(?:\/|^)\.(?=\/)/g;var a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g;var s={buildAbsoluteURL:function e(t,r,n){n=n||{};t=t.trim();r=r.trim();if(!r){if(!n.alwaysNormalize){return t}var a=s.parseURL(t);if(!a){throw new Error("Error trying to parse base URL.")}a.path=s.normalizePath(a.path);return s.buildURLFromParts(a)}var o=s.parseURL(r);if(!o){throw new Error("Error trying to parse relative URL.")}if(o.scheme){if(!n.alwaysNormalize){return r}o.path=s.normalizePath(o.path);return s.buildURLFromParts(o)}var u=s.parseURL(t);if(!u){throw new Error("Error trying to parse base URL.")}if(!u.netLoc&&u.path&&u.path[0]!=="/"){var l=i.exec(u.path);u.netLoc=l[1];u.path=l[2]}if(u.netLoc&&!u.path){u.path="/"}var d={scheme:u.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc){d.netLoc=u.netLoc;if(o.path[0]!=="/"){if(!o.path){d.path=u.path;if(!o.params){d.params=u.params;if(!o.query){d.query=u.query}}}else{var c=u.path;var f=c.substring(0,c.lastIndexOf("/")+1)+o.path;d.path=s.normalizePath(f)}}}if(d.path===null){d.path=n.alwaysNormalize?s.normalizePath(o.path):o.path}return s.buildURLFromParts(d)},parseURL:function e(t){var i=r.exec(t);if(!i){return null}return{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}},normalizePath:function e(t){t=t.split("").reverse().join("").replace(n,"");while(t.length!==(t=t.replace(a,"")).length){}return t.split("").reverse().join("")},buildURLFromParts:function e(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};e.exports=s})()});var h="http://example.com";var p=function t(r,i){if(/^[a-z]+:/i.test(i)){return i}if(/^data:/.test(r)){r=e.location&&e.location.href||""}var n=typeof e.URL==="function";var a=/^\/\//.test(r);var s=!e.location&&!/\/\//i.test(r);if(n){r=new e.URL(r,e.location||h)}else if(!/\/\//i.test(r)){r=f.buildAbsoluteURL(e.location&&e.location.href||"",r)}if(n){var o=new URL(i,r);if(s){return o.href.slice(h.length)}else if(a){return o.href.slice(o.protocol.length)}return o.href}return f.buildAbsoluteURL(r,i)};var v=p;var m=function e(t,r,i){if(t&&i&&i.responseURL&&r!==i.responseURL){return i.responseURL}return r};var g=function e(t){if(s["default"].log.debug){return s["default"].log.debug.bind(s["default"],"VHS:",t+" >")}return function(){}};var y=o(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};e.exports["default"]=e.exports,e.exports.__esModule=true;return t.apply(this,arguments)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var _=function(){function e(){this.listeners={}}var t=e.prototype;t.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};t.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t]=this.listeners[t].slice(0);this.listeners[t].splice(i,1);return i>-1};t.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};t.dispose=function e(){this.listeners={}};t.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();var b=function t(r){return e.atob?e.atob(r):Buffer.from(r,"base64").toString("binary")};function T(e){var t=b(e);var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r}var S=function(e){c(t,e);function t(){var t;t=e.call(this)||this;t.buffer="";return t}var r=t.prototype;r.push=function e(t){var r;this.buffer+=t;r=this.buffer.indexOf("\n");for(;r>-1;r=this.buffer.indexOf("\n")){this.trigger("data",this.buffer.substring(0,r));this.buffer=this.buffer.substring(r+1)}};return t}(_);var E=String.fromCharCode(9);var I=function e(t){var r=/([0-9.]*)?@?([0-9.]*)?/.exec(t||"");var i={};if(r[1]){i.length=parseInt(r[1],10)}if(r[2]){i.offset=parseInt(r[2],10)}return i};var C=function e(){var t="[^=]*";var r='"[^"]*"|[^,]*';var i="(?:"+t+")=(?:"+r+")";return new RegExp("(?:^|,)("+i+")")};var k=function e(t){var r=t.split(C());var i={};var n=r.length;var a;while(n--){if(r[n]===""){continue}a=/([^=]*)=(.*)/.exec(r[n]).slice(1);a[0]=a[0].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^\s+|\s+$/g,"");a[1]=a[1].replace(/^['"](.*)['"]$/g,"$1");i[a[0]]=a[1]}return i};var w=function(e){c(t,e);function t(){var t;t=e.call(this)||this;t.customParsers=[];t.tagMappers=[];return t}var r=t.prototype;r.push=function e(t){var r=this;var i;var n;t=t.trim();if(t.length===0){return}if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}var a=this.tagMappers.reduce(function(e,r){var i=r(t);if(i===t){return e}return e.concat([i])},[t]);a.forEach(function(e){for(var t=0;t<r.customParsers.length;t++){if(r.customParsers[t].call(r,e)){return}}if(e.indexOf("#EXT")!==0){r.trigger("data",{type:"comment",text:e.slice(1)});return}e=e.replace("\r","");i=/^#EXTM3U/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"m3u"});return}i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"inf"};if(i[1]){n.duration=parseFloat(i[1])}if(i[2]){n.title=i[2]}r.trigger("data",n);return}i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"targetduration"};if(i[1]){n.duration=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"version"};if(i[1]){n.version=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"media-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e);if(i){n={type:"tag",tagType:"discontinuity-sequence"};if(i[1]){n.number=parseInt(i[1],10)}r.trigger("data",n);return}i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"playlist-type"};if(i[1]){n.playlistType=i[1]}r.trigger("data",n);return}i=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e);if(i){n=y(I(i[1]),{type:"tag",tagType:"byterange"});r.trigger("data",n);return}i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e);if(i){n={type:"tag",tagType:"allow-cache"};if(i[1]){n.allowed=!/NO/.test(i[1])}r.trigger("data",n);return}i=/^#EXT-X-MAP:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"map"};if(i[1]){var a=k(i[1]);if(a.URI){n.uri=a.URI}if(a.BYTERANGE){n.byterange=I(a.BYTERANGE)}}r.trigger("data",n);return}i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"stream-inf"};if(i[1]){n.attributes=k(i[1]);if(n.attributes.RESOLUTION){var s=n.attributes.RESOLUTION.split("x");var o={};if(s[0]){o.width=parseInt(s[0],10)}if(s[1]){o.height=parseInt(s[1],10)}n.attributes.RESOLUTION=o}if(n.attributes.BANDWIDTH){n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)}if(n.attributes["FRAME-RATE"]){n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])}if(n.attributes["PROGRAM-ID"]){n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10)}}r.trigger("data",n);return}i=/^#EXT-X-MEDIA:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"media"};if(i[1]){n.attributes=k(i[1])}r.trigger("data",n);return}i=/^#EXT-X-ENDLIST/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"endlist"});return}i=/^#EXT-X-DISCONTINUITY/.exec(e);if(i){r.trigger("data",{type:"tag",tagType:"discontinuity"});return}i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"program-date-time"};if(i[1]){n.dateTimeString=i[1];n.dateTimeObject=new Date(i[1])}r.trigger("data",n);return}i=/^#EXT-X-KEY:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"key"};if(i[1]){n.attributes=k(i[1]);if(n.attributes.IV){if(n.attributes.IV.substring(0,2).toLowerCase()==="0x"){n.attributes.IV=n.attributes.IV.substring(2)}n.attributes.IV=n.attributes.IV.match(/.{8}/g);n.attributes.IV[0]=parseInt(n.attributes.IV[0],16);n.attributes.IV[1]=parseInt(n.attributes.IV[1],16);n.attributes.IV[2]=parseInt(n.attributes.IV[2],16);n.attributes.IV[3]=parseInt(n.attributes.IV[3],16);n.attributes.IV=new Uint32Array(n.attributes.IV)}}r.trigger("data",n);return}i=/^#EXT-X-START:?(.*)$/.exec(e);if(i){n={type:"tag",tagType:"start"};if(i[1]){n.attributes=k(i[1]);n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]);n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out-cont"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-out"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e);if(i){n={type:"tag",tagType:"cue-in"};if(i[1]){n.data=i[1]}else{n.data=""}r.trigger("data",n);return}i=/^#EXT-X-SKIP:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"skip"};n.attributes=k(i[1]);if(n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")){n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)}if(n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")){n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(E)}r.trigger("data",n);return}i=/^#EXT-X-PART:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"part"};n.attributes=k(i[1]);["DURATION"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseFloat(n.attributes[e])}});["INDEPENDENT","GAP"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=/YES/.test(n.attributes[e])}});if(n.attributes.hasOwnProperty("BYTERANGE")){n.attributes.byterange=I(n.attributes.BYTERANGE)}r.trigger("data",n);return}i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"server-control"};n.attributes=k(i[1]);["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseFloat(n.attributes[e])}});["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=/YES/.test(n.attributes[e])}});r.trigger("data",n);return}i=/^#EXT-X-PART-INF:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"part-inf"};n.attributes=k(i[1]);["PART-TARGET"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseFloat(n.attributes[e])}});r.trigger("data",n);return}i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"preload-hint"};n.attributes=k(i[1]);["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t=e==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{};n.attributes.byterange[t]=n.attributes[e];delete n.attributes[e]}});r.trigger("data",n);return}i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e);if(i&&i[1]){n={type:"tag",tagType:"rendition-report"};n.attributes=k(i[1]);["LAST-MSN","LAST-PART"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10)}});r.trigger("data",n);return}r.trigger("data",{type:"tag",data:e.slice(4)})})};r.addParser=function e(t){var r=this;var i=t.expression,n=t.customType,a=t.dataParser,s=t.segment;if(typeof a!=="function"){a=function e(t){return t}}this.customParsers.push(function(e){var t=i.exec(e);if(t){r.trigger("data",{type:"custom",data:a(e),customType:n,segment:s});return true}})};r.addTagMapper=function e(t){var r=t.expression,i=t.map;var n=function e(t){if(r.test(t)){return i(t)}return t};this.tagMappers.push(n)};return t}(_);var A=function e(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})};var P=function e(t){var r={};Object.keys(t).forEach(function(e){r[A(e)]=t[e]});return r};var O=function e(t){var r=t.serverControl,i=t.targetDuration,n=t.partTargetDuration;if(!r){return}var a="#EXT-X-SERVER-CONTROL";var s="holdBack";var o="partHoldBack";var u=i&&i*3;var l=n&&n*2;if(i&&!r.hasOwnProperty(s)){r[s]=u;this.trigger("info",{message:a+" defaulting HOLD-BACK to targetDuration * 3 ("+u+")."})}if(u&&r[s]<u){this.trigger("warn",{message:a+" clamping HOLD-BACK ("+r[s]+") to targetDuration * 3 ("+u+")"});r[s]=u}if(n&&!r.hasOwnProperty(o)){r[o]=n*3;this.trigger("info",{message:a+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+r[o]+")."})}if(n&&r[o]<l){this.trigger("warn",{message:a+" clamping PART-HOLD-BACK ("+r[o]+") to partTargetDuration * 2 ("+l+")."});r[o]=l}};var x=function(e){c(t,e);function t(){var t;t=e.call(this)||this;t.lineStream=new S;t.parseStream=new w;t.lineStream.pipe(t.parseStream);var r=l(t);var i=[];var n={};var a;var s;var o=false;var u=function e(){};var d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};var c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";var f=0;t.manifest={allowCache:true,discontinuityStarts:[],segments:[]};var h=0;var p=0;t.on("end",function(){if(n.uri||!n.parts&&!n.preloadHints){return}if(!n.map&&a){n.map=a}if(!n.key&&s){n.key=s}if(!n.timeline&&typeof f==="number"){n.timeline=f}t.manifest.preloadSegment=n});t.parseStream.on("data",function(e){var t;var l;({tag:function v(){(({version:function t(){if(e.version){this.manifest.version=e.version}},"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)){e.offset=h}}if("offset"in e){n.byterange=t;t.offset=e.offset}h=t.offset+t.length},endlist:function e(){this.manifest.endList=true},inf:function t(){if(!("mediaSequence"in this.manifest)){this.manifest.mediaSequence=0;this.trigger("info",{message:"defaulting media sequence to zero"})}if(!("discontinuitySequence"in this.manifest)){this.manifest.discontinuitySequence=0;this.trigger("info",{message:"defaulting discontinuity sequence to zero"})}if(e.duration>0){n.duration=e.duration}if(e.duration===0){n.duration=.01;this.trigger("info",{message:"updating zero segment duration to a small value"})}this.manifest.segments=i},key:function t(){if(!e.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(e.attributes.METHOD==="NONE"){s=null;return}if(!e.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(e.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{};this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes};return}if(e.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{};this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI};return}if(e.attributes.KEYFORMAT===c){var r=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(r.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=this.manifest.contentProtection||{};this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:T(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;f=e.number},"playlist-type":function t(){if(!/VOD|EVENT/.test(e.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist});return}this.manifest.playlistType=e.playlistType},map:function t(){a={};if(e.uri){a.uri=e.uri}if(e.byterange){a.byterange=e.byterange}if(s){a.key=s}},"stream-inf":function t(){this.manifest.playlists=i;this.manifest.mediaGroups=this.manifest.mediaGroups||d;if(!e.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}if(!n.attributes){n.attributes={}}y(n.attributes,e.attributes)},media:function r(){this.manifest.mediaGroups=this.manifest.mediaGroups||d;if(!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{};t=i[e.attributes["GROUP-ID"]];l={default:/yes/i.test(e.attributes.DEFAULT)};if(l.default){l.autoselect=true}else{l.autoselect=/yes/i.test(e.attributes.AUTOSELECT)}if(e.attributes.LANGUAGE){l.language=e.attributes.LANGUAGE}if(e.attributes.URI){l.uri=e.attributes.URI}if(e.attributes["INSTREAM-ID"]){l.instreamId=e.attributes["INSTREAM-ID"]}if(e.attributes.CHARACTERISTICS){l.characteristics=e.attributes.CHARACTERISTICS}if(e.attributes.FORCED){l.forced=/yes/i.test(e.attributes.FORCED)}t[e.attributes.NAME]=l},discontinuity:function e(){f+=1;n.discontinuity=true;this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function t(){if(typeof this.manifest.dateTimeString==="undefined"){this.manifest.dateTimeString=e.dateTimeString;this.manifest.dateTimeObject=e.dateTimeObject}n.dateTimeString=e.dateTimeString;n.dateTimeObject=e.dateTimeObject},targetduration:function t(){if(!isFinite(e.duration)||e.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration});return}this.manifest.targetDuration=e.duration;O.call(this,this.manifest)},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},skip:function t(){this.manifest.skip=P(e.attributes);this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function t(){var r=this;o=true;var i=this.manifest.segments.length;var t=P(e.attributes);n.parts=n.parts||[];n.parts.push(t);if(t.byterange){if(!t.byterange.hasOwnProperty("offset")){t.byterange.offset=p}p=t.byterange.offset+t.byterange.length}var a=n.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+a+" for segment #"+i,e.attributes,["URI","DURATION"]);if(this.manifest.renditionReports){this.manifest.renditionReports.forEach(function(e,t){if(!e.hasOwnProperty("lastPart")){r.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+t+" lacks required attribute(s): LAST-PART"})}})}},"server-control":function t(){var r=this.manifest.serverControl=P(e.attributes);if(!r.hasOwnProperty("canBlockReload")){r.canBlockReload=false;this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})}O.call(this,this.manifest);if(r.canSkipDateranges&&!r.hasOwnProperty("canSkipUntil")){this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})}},"preload-hint":function t(){var r=this.manifest.segments.length;var i=P(e.attributes);var a=i.type&&i.type==="PART";n.preloadHints=n.preloadHints||[];n.preloadHints.push(i);if(i.byterange){if(!i.byterange.hasOwnProperty("offset")){i.byterange.offset=a?p:0;if(a){p=i.byterange.offset+i.byterange.length}}}var s=n.preloadHints.length-1;this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+s+" for segment #"+r,e.attributes,["TYPE","URI"]);if(!i.type){return}for(var o=0;o<n.preloadHints.length-1;o++){var u=n.preloadHints[o];if(!u.type){continue}if(u.type===i.type){this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+s+" for segment #"+r+" has the same TYPE "+i.type+" as preload hint #"+o})}}},"rendition-report":function t(){var r=P(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[];this.manifest.renditionReports.push(r);var i=this.manifest.renditionReports.length-1;var n=["LAST-MSN","URI"];if(o){n.push("LAST-PART")}this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+i,e.attributes,n)},"part-inf":function t(){this.manifest.partInf=P(e.attributes);this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]);if(this.manifest.partInf.partTarget){this.manifest.partTargetDuration=this.manifest.partInf.partTarget}O.call(this,this.manifest)}})[e.tagType]||u).call(r)},uri:function t(){n.uri=e.uri;i.push(n);if(this.manifest.targetDuration&&!("duration"in n)){this.trigger("warn",{message:"defaulting segment duration to the target duration"});n.duration=this.manifest.targetDuration}if(s){n.key=s}n.timeline=f;if(a){n.map=a}p=0;n={}},comment:function e(){},custom:function t(){if(e.segment){n.custom=n.custom||{};n.custom[e.customType]=e.data}else{this.manifest.custom=this.manifest.custom||{};this.manifest.custom[e.customType]=e.data}}})[e.type].call(r)});return t}var r=t.prototype;r.warnOnMissingAttributes_=function e(t,r,i){var n=[];i.forEach(function(e){if(!r.hasOwnProperty(e)){n.push(e)}});if(n.length){this.trigger("warn",{message:t+" lacks required attribute(s): "+n.join(", ")})}};r.push=function e(t){this.lineStream.push(t)};r.end=function e(){this.lineStream.push("\n");this.trigger("end")};r.addParser=function e(t){this.parseStream.addParser(t)};r.addTagMapper=function e(t){this.parseStream.addTagMapper(t)};return t}(_);var D={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/};var L=["video","audio","text"];var R=["Video","Audio","Text"];var N=function e(t){if(!t){return t}return t.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,r){var i=("00"+Number(t).toString(16)).slice(-2);var n=("00"+Number(r).toString(16)).slice(-2);return"avc1."+i+"00"+n})};var M=function e(t){if(t===void 0){t=""}var r=t.split(",");var i=[];r.forEach(function(e){e=e.trim();var t;L.forEach(function(r){var n=D[r].exec(e.toLowerCase());if(!n||n.length<=1){return}t=r;var a=e.substring(0,n[1].length);var s=e.replace(a,"");i.push({type:a,details:s,mediaType:r})});if(!t){i.push({type:e,details:"",mediaType:"unknown"})}});return i};var U=function e(t,r){if(!t.mediaGroups.AUDIO||!r){return null}var i=t.mediaGroups.AUDIO[r];if(!i){return null}for(var n in i){var a=i[n];if(a.default&&a.playlists){return M(a.playlists[0].attributes.CODECS)}}return null};var B=function e(t){if(t===void 0){t=""}return D.audio.test(t.trim().toLowerCase())};var F=function e(t){if(t===void 0){t=""}return D.text.test(t.trim().toLowerCase())};var j=function e(t){if(!t||typeof t!=="string"){return}var r=t.toLowerCase().split(",").map(function(e){return N(e.trim())});var i="video";if(r.length===1&&B(r[0])){i="audio"}else if(r.length===1&&F(r[0])){i="application"}var n="mp4";if(r.every(function(e){return D.mp4.test(e)})){n="mp4"}else if(r.every(function(e){return D.webm.test(e)})){n="webm"}else if(r.every(function(e){return D.ogg.test(e)})){n="ogg"}return i+"/"+n+';codecs="'+t+'"'};var V=function t(r){if(r===void 0){r=""}return e.MediaSource&&e.MediaSource.isTypeSupported&&e.MediaSource.isTypeSupported(j(r))||false};var q=function e(t){if(t===void 0){t=""}return t.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<R.length;t++){var r=R[t];if(D["muxer"+r].test(e)){return true}}return false})};var H="mp4a.40.2";var W="avc1.4d400d";var G=1/30;var K=G*3;var Y=function e(t,r){var i=[];var n;if(t&&t.length){for(n=0;n<t.length;n++){if(r(t.start(n),t.end(n))){i.push([t.start(n),t.end(n)])}}}return s["default"].createTimeRanges(i)};var z=function e(t,r){return Y(t,function(e,t){return e-K<=r&&t+K>=r})};var X=function e(t,r){return Y(t,function(e){return e-G>=r})};var Q=function e(t){if(t.length<2){return s["default"].createTimeRanges()}var r=[];for(var i=1;i<t.length;i++){var n=t.end(i-1);var a=t.start(i);r.push([n,a])}return s["default"].createTimeRanges(r)};var $=function e(t,r){var i=null;var n=null;var a=0;var o=[];var u=[];if(!t||!t.length||!r||!r.length){return s["default"].createTimeRange()}var l=t.length;while(l--){o.push({time:t.start(l),type:"start"});o.push({time:t.end(l),type:"end"})}l=r.length;while(l--){o.push({time:r.start(l),type:"start"});o.push({time:r.end(l),type:"end"})}o.sort(function(e,t){return e.time-t.time});for(l=0;l<o.length;l++){if(o[l].type==="start"){a++;if(a===2){i=o[l].time}}else if(o[l].type==="end"){a--;if(a===1){n=o[l].time}}if(i!==null&&n!==null){u.push([i,n]);i=null;n=null}}return s["default"].createTimeRanges(u)};var J=function e(t){var r=[];if(!t||!t.length){return""}for(var i=0;i<t.length;i++){r.push(t.start(i)+" => "+t.end(i))}return r.join(", ")};var Z=function e(t,r,i){if(i===void 0){i=1}var n=t.length?t.end(t.length-1):0;return(n-r)/i};var ee=function e(t){var r=[];for(var i=0;i<t.length;i++){r.push({start:t.start(i),end:t.end(i)})}return r};var te=function e(t,r){if(t===r){return false}if(!t&&r||!r&&t){return true}if(t.length!==r.length){return true}for(var i=0;i<t.length;i++){if(t.start(i)!==r.start(i)||t.end(i)!==r.end(i)){return true}}return false};var re=function e(t){if(!t||!t.length||!t.end){return}return t.end(t.length-1)};var ie=function e(t,r){var i=0;if(!t||!t.length){return i}for(var n=0;n<t.length;n++){var a=t.start(n);var s=t.end(n);if(r>s){continue}if(r>a&&r<=s){i+=s-r;continue}i+=s-a}return i};var ne=s["default"].createTimeRange;var ae=function e(t,r){if(!r.preload){return r.duration}var i=0;(r.parts||[]).forEach(function(e){i+=e.duration});(r.preloadHints||[]).forEach(function(e){if(e.type==="PART"){i+=t.partTargetDuration}});return i};var se=function e(t){return(t.segments||[]).reduce(function(e,t,r){if(t.parts){t.parts.forEach(function(i,n){e.push({duration:i.duration,segmentIndex:r,partIndex:n,part:i,segment:t})})}else{e.push({duration:t.duration,segmentIndex:r,partIndex:null,segment:t,part:null})}return e},[])};var oe=function e(t){var r=t.segments&&t.segments.length&&t.segments[t.segments.length-1];return r&&r.parts||[]};var ue=function e(t){var r=t.preloadSegment;if(!r){return}var i=r.parts,n=r.preloadHints;var a=(n||[]).reduce(function(e,t){return e+(t.type==="PART"?1:0)},0);a+=i&&i.length?i.length:0;return a};var le=function e(t,r){if(r.endList){return 0}if(t&&t.suggestedPresentationDelay){return t.suggestedPresentationDelay}var i=oe(r).length>0;if(i&&r.serverControl&&r.serverControl.partHoldBack){return r.serverControl.partHoldBack}else if(i&&r.partTargetDuration){return r.partTargetDuration*3}else if(r.serverControl&&r.serverControl.holdBack){return r.serverControl.holdBack}else if(r.targetDuration){return r.targetDuration*3}return 0};var de=function e(t,r){var i=0;var n=r-t.mediaSequence;var a=t.segments[n];if(a){if(typeof a.start!=="undefined"){return{result:a.start,precise:true}}if(typeof a.end!=="undefined"){return{result:a.end-a.duration,precise:true}}}while(n--){a=t.segments[n];if(typeof a.end!=="undefined"){return{result:i+a.end,precise:true}}i+=ae(t,a);if(typeof a.start!=="undefined"){return{result:i+a.start,precise:true}}}return{result:i,precise:false}};var ce=function e(t,r){var i=0;var n;var a=r-t.mediaSequence;for(;a<t.segments.length;a++){n=t.segments[a];if(typeof n.start!=="undefined"){return{result:n.start-i,precise:true}}i+=ae(t,n);if(typeof n.end!=="undefined"){return{result:n.end-i,precise:true}}}return{result:-1,precise:false}};var fe=function e(t,r,i){if(typeof r==="undefined"){r=t.mediaSequence+t.segments.length}if(r<t.mediaSequence){return 0}var n=de(t,r);if(n.precise){return n.result}var a=ce(t,r);if(a.precise){return a.result}return n.result+i};var he=function t(r,i,n){if(!r){return 0}if(typeof n!=="number"){n=0}if(typeof i==="undefined"){if(r.totalDuration){return r.totalDuration}if(!r.endList){return e.Infinity}}return fe(r,i,n)};var pe=function e(t){var r=t.defaultDuration,i=t.durationList,n=t.startIndex,a=t.endIndex;var s=0;if(n>a){var o=[a,n];n=o[0];a=o[1]}if(n<0){for(var u=n;u<Math.min(0,a);u++){s+=r}n=0}for(var l=n;l<a;l++){s+=i[l].duration}return s};var ve=function e(t,r,i,n){if(!t||!t.segments){return null}if(t.endList){return he(t)}if(r===null){return null}r=r||0;var a=fe(t,t.mediaSequence+t.segments.length,r);if(i){n=typeof n==="number"?n:le(null,t);a-=n}return Math.max(0,a)};var me=function e(t,r,i){var n=true;var a=r||0;var s=ve(t,r,n,i);if(s===null){return ne()}return ne(a,s)};var ge=function e(t){var r=t.playlist,i=t.currentTime,n=t.startingSegmentIndex,a=t.startingPartIndex,s=t.startTime,o=t.experimentalExactManifestTimings;var u=i-s;var l=se(r);var d=0;for(var c=0;c<l.length;c++){var f=l[c];if(n!==f.segmentIndex){continue}if(typeof a==="number"&&typeof f.partIndex==="number"&&a!==f.partIndex){continue}d=c;break}if(u<0){if(d>0){for(var h=d-1;h>=0;h--){var p=l[h];u+=p.duration;if(o){if(u<0){continue}}else if(u+G<=0){continue}return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:s-pe({defaultDuration:r.targetDuration,durationList:l,startIndex:d,endIndex:h})}}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i}}if(d<0){for(var v=d;v<0;v++){u-=r.targetDuration;if(u<0){return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i}}}d=0}for(var m=d;m<l.length;m++){var g=l[m];u-=g.duration;if(o){if(u>0){continue}}else if(u-G>=0){continue}return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+pe({defaultDuration:r.targetDuration,durationList:l,startIndex:d,endIndex:m})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:i}};var ye=function e(t){return t.excludeUntil&&t.excludeUntil>Date.now()};var _e=function e(t){return t.excludeUntil&&t.excludeUntil===Infinity};var be=function e(t){var r=ye(t);return!t.disabled&&!r};var Te=function e(t){return t.disabled};var Se=function e(t){for(var r=0;r<t.segments.length;r++){if(t.segments[r].key){return true}}return false};var Ee=function e(t,r){return r.attributes&&r.attributes[t]};var Ie=function e(t,r,i,n){if(n===void 0){n=0}if(!Ee("BANDWIDTH",i)){return NaN}var a=t*i.attributes.BANDWIDTH;return(a-n*8)/r};var Ce=function e(t,r){if(t.playlists.length===1){return true}var i=r.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(function(e){if(!be(e)){return false}return(e.attributes.BANDWIDTH||0)<i}).length===0};var ke=function e(t,r){if(!t&&!r||!t&&r||t&&!r){return false}if(t===r){return true}if(t.id&&r.id&&t.id===r.id){return true}if(t.resolvedUri&&r.resolvedUri&&t.resolvedUri===r.resolvedUri){return true}if(t.uri&&r.uri&&t.uri===r.uri){return true}return false};var we=function e(t,r){var i=t&&t.mediaGroups&&t.mediaGroups.AUDIO||{};var n=false;for(var a in i){for(var s in i[a]){n=r(i[a][s]);if(n){break}}if(n){break}}return!!n};var Ae=function e(t){if(!t||!t.playlists||!t.playlists.length){var r=we(t,function(e){return e.playlists&&e.playlists.length||e.uri});return r}var i=function e(r){var i=t.playlists[r];var n=i.attributes&&i.attributes.CODECS;if(n&&n.split(",").every(function(e){return B(e)})){return"continue"}var a=we(t,function(e){return ke(i,e)});if(a){return"continue"}return{v:false}};for(var n=0;n<t.playlists.length;n++){var a=i(n);if(a==="continue")continue;if(typeof a==="object")return a.v}return true};var Pe={liveEdgeDelay:le,duration:he,seekable:me,getMediaInfoForTime:ge,isEnabled:be,isDisabled:Te,isBlacklisted:ye,isIncompatible:_e,playlistEnd:ve,isAes:Se,hasAttribute:Ee,estimateSegmentRequestTime:Ie,isLowestEnabledRendition:Ce,isAudioOnly:Ae,playlistMatch:ke,segmentDurationWithParts:ae};var Oe=s["default"].log;var xe=function e(t,r){return t+"-"+r};var De=function e(t){var r=t.onwarn,i=t.oninfo,n=t.manifestString,a=t.customTagParsers,s=a===void 0?[]:a,o=t.customTagMappers,u=o===void 0?[]:o,l=t.experimentalLLHLS;var d=new x;if(r){d.on("warn",r)}if(i){d.on("info",i)}s.forEach(function(e){return d.addParser(e)});u.forEach(function(e){return d.addTagMapper(e)});d.push(n);d.end();var c=d.manifest;if(!l){["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(e){if(c.hasOwnProperty(e)){delete c[e]}});if(c.segments){c.segments.forEach(function(e){["parts","preloadHints"].forEach(function(t){if(e.hasOwnProperty(t)){delete e[t]}})})}}if(!c.targetDuration){var f=10;if(c.segments&&c.segments.length){f=c.segments.reduce(function(e,t){return Math.max(e,t.duration)},0)}if(r){r("manifest has no targetDuration defaulting to "+f)}c.targetDuration=f}var h=oe(c);if(h.length&&!c.partTargetDuration){var p=h.reduce(function(e,t){return Math.max(e,t.duration)},0);if(r){r("manifest has no partTargetDuration defaulting to "+p);Oe.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")}c.partTargetDuration=p}return c};var Le=function e(t,r){if(!t.mediaGroups){return}["AUDIO","SUBTITLES"].forEach(function(e){if(!t.mediaGroups[e]){return}for(var i in t.mediaGroups[e]){for(var n in t.mediaGroups[e][i]){var a=t.mediaGroups[e][i][n];r(a,e,i,n)}}})};var Re=function e(t){var r=t.playlist,i=t.uri,n=t.id;r.id=n;r.playlistErrors_=0;if(i){r.uri=i}r.attributes=r.attributes||{}};var Ne=function e(t){var r=t.playlists.length;while(r--){var i=t.playlists[r];Re({playlist:i,id:xe(r,i.uri)});i.resolvedUri=v(t.uri,i.uri);t.playlists[i.id]=i;t.playlists[i.uri]=i;if(!i.attributes.BANDWIDTH){Oe.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}};var Me=function e(t){Le(t,function(e){if(e.uri){e.resolvedUri=v(t.uri,e.uri)}})};var Ue=function t(r,i){var n=xe(0,i);var a={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:e.location.href,resolvedUri:e.location.href,playlists:[{uri:i,id:n,resolvedUri:i,attributes:{}}]};a.playlists[n]=a.playlists[0];a.playlists[i]=a.playlists[0];return a};var Be=function e(t,r){t.uri=r;for(var i=0;i<t.playlists.length;i++){if(!t.playlists[i].uri){var n="placeholder-uri-"+i;t.playlists[i].uri=n}}var a=Ae(t);Le(t,function(e,r,i,n){var s="placeholder-uri-"+r+"-"+i+"-"+n;if(!e.playlists||!e.playlists.length){if(a&&r==="AUDIO"&&!e.uri){for(var o=0;o<t.playlists.length;o++){var u=t.playlists[o];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===i){return}}}e.playlists=[y({},e)]}e.playlists.forEach(function(e,r){var i=xe(r,s);if(e.uri){e.resolvedUri=e.resolvedUri||v(t.uri,e.uri)}else{e.uri=r===0?s:i;e.resolvedUri=e.uri}e.id=e.id||i;e.attributes=e.attributes||{};t.playlists[e.id]=e;t.playlists[e.uri]=e})});Ne(t);Me(t)};var Fe=s["default"].mergeOptions,je=s["default"].EventTarget;var Ve=function t(r,i){if(i.endList||!i.serverControl){return r}var n={};if(i.serverControl.canBlockReload){var a=i.preloadSegment;var s=i.mediaSequence+i.segments.length;if(a){var o=a.parts||[];var u=ue(i)-1;if(u>-1&&u!==o.length-1){n._HLS_part=u}if(u>-1||o.length){s--}}n._HLS_msn=s}if(i.serverControl&&i.serverControl.canSkipUntil){n._HLS_skip=i.serverControl.canSkipDateranges?"v2":"YES"}if(Object.keys(n).length){var l=new e.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(e){if(!n.hasOwnProperty(e)){return}l.searchParams.set(e,n[e])});r=l.toString()}return r};var qe=function e(t,r){if(!t){return r}var i=Fe(t,r);if(t.preloadHints&&!r.preloadHints){delete i.preloadHints}if(t.parts&&!r.parts){delete i.parts}else if(t.parts&&r.parts){for(var n=0;n<r.parts.length;n++){if(t.parts&&t.parts[n]){i.parts[n]=Fe(t.parts[n],r.parts[n])}}}if(!t.skipped&&r.skipped){i.skipped=false}if(t.preload&&!r.preload){i.preload=false}return i};var He=function e(t,r,i){var n=t.slice();var a=r.slice();i=i||0;var s=[];var o;for(var u=0;u<a.length;u++){var l=n[u+i];var d=a[u];if(l){o=l.map||o;s.push(qe(l,d))}else{if(o&&!d.map){d.map=o}s.push(d)}}return s};var We=function e(t,r){if(!t.resolvedUri&&t.uri){t.resolvedUri=v(r,t.uri)}if(t.key&&!t.key.resolvedUri){t.key.resolvedUri=v(r,t.key.uri)}if(t.map&&!t.map.resolvedUri){t.map.resolvedUri=v(r,t.map.uri)}if(t.map&&t.map.key&&!t.map.key.resolvedUri){t.map.key.resolvedUri=v(r,t.map.key.uri)}if(t.parts&&t.parts.length){t.parts.forEach(function(e){if(e.resolvedUri){return}e.resolvedUri=v(r,e.uri)})}if(t.preloadHints&&t.preloadHints.length){t.preloadHints.forEach(function(e){if(e.resolvedUri){return}e.resolvedUri=v(r,e.uri)})}};var Ge=function e(t){var r=t.segments||[];var i=t.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(var n=0;n<i.preloadHints.length;n++){if(i.preloadHints[n].type==="MAP"){return r}}}i.duration=t.targetDuration;i.preload=true;r.push(i)}return r};var Ke=function e(t,r){return t===r||t.segments&&r.segments&&t.segments.length===r.segments.length&&t.endList===r.endList&&t.mediaSequence===r.mediaSequence&&t.preloadSegment===r.preloadSegment};var Ye=function e(t,r,i){if(i===void 0){i=Ke}var n=Fe(t,{});var a=n.playlists[r.id];if(!a){return null}if(i(a,r)){return null}r.segments=Ge(r);var s=Fe(a,r);if(s.preloadSegment&&!r.preloadSegment){delete s.preloadSegment}if(a.segments){if(r.skip){r.segments=r.segments||[];for(var o=0;o<r.skip.skippedSegments;o++){r.segments.unshift({skipped:true})}}s.segments=He(a.segments,r.segments,r.mediaSequence-a.mediaSequence)}s.segments.forEach(function(e){We(e,s.resolvedUri)});for(var u=0;u<n.playlists.length;u++){if(n.playlists[u].id===r.id){n.playlists[u]=s}}n.playlists[r.id]=s;n.playlists[r.uri]=s;Le(t,function(e,t,i,n){if(!e.playlists){return}for(var a=0;a<e.playlists.length;a++){if(r.id===e.playlists[a].id){e.playlists[a]=s}}});return n};var ze=function e(t,r){var i=t.segments||[];var n=i[i.length-1];var a=n&&n.parts&&n.parts[n.parts.length-1];var s=a&&a.duration||n&&n.duration;if(r&&s){return s*1e3}return(t.partTargetDuration||t.targetDuration||10)*500};var Xe=function(t){c(r,t);function r(e,r,i){var n;if(i===void 0){i={}}n=t.call(this)||this;if(!e){throw new Error("A non-empty playlist URL or object is required")}n.logger_=g("PlaylistLoader");var a=i,o=a.withCredentials,u=o===void 0?false:o,d=a.handleManifestRedirects,c=d===void 0?false:d;n.src=e;n.vhs_=r;n.withCredentials=u;n.handleManifestRedirects=c;var f=r.options_;n.customTagParsers=f&&f.customTagParsers||[];n.customTagMappers=f&&f.customTagMappers||[];n.experimentalLLHLS=f&&f.experimentalLLHLS||false;if(s["default"].browser.IE_VERSION){n.experimentalLLHLS=false}n.state="HAVE_NOTHING";n.handleMediaupdatetimeout_=n.handleMediaupdatetimeout_.bind(l(n));n.on("mediaupdatetimeout",n.handleMediaupdatetimeout_);return n}var i=r.prototype;i.handleMediaupdatetimeout_=function e(){var t=this;if(this.state!=="HAVE_METADATA"){return}var r=this.media();var i=v(this.master.uri,r.uri);if(this.experimentalLLHLS){i=Ve(i,r)}this.state="HAVE_CURRENT_METADATA";this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials},function(e,r){if(!t.request){return}if(e){return t.playlistRequestError(t.request,t.media(),"HAVE_METADATA")}t.haveMetadata({playlistString:t.request.responseText,url:t.media().uri,id:t.media().id})})};i.playlistRequestError=function e(t,r,i){var n=r.uri,a=r.id;this.request=null;if(i){this.state=i}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")};i.parseManifest_=function e(t){var r=this;var i=t.url,n=t.manifestString;return De({onwarn:function e(t){var n=t.message;return r.logger_("m3u8-parser warn for "+i+": "+n)},oninfo:function e(t){var n=t.message;return r.logger_("m3u8-parser info for "+i+": "+n)},manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})};i.haveMetadata=function e(t){var r=t.playlistString,i=t.playlistObject,n=t.url,a=t.id;this.request=null;this.state="HAVE_METADATA";var s=i||this.parseManifest_({url:n,manifestString:r});s.lastRequest=Date.now();Re({playlist:s,uri:n,id:a});var o=Ye(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration;this.pendingMedia_=null;if(o){this.master=o;this.media_=this.master.playlists[a]}else{this.trigger("playlistunchanged")}this.updateMediaUpdateTimeout_(ze(this.media(),!!o));this.trigger("loadedplaylist")};i.dispose=function t(){this.trigger("dispose");this.stopRequest();e.clearTimeout(this.mediaUpdateTimeout);e.clearTimeout(this.finalRenditionTimeout);this.off()};i.stopRequest=function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}};i.media=function t(r,i){var n=this;if(!r){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}if(typeof r==="string"){if(!this.master.playlists[r]){throw new Error("Unknown playlist URI: "+r)}r=this.master.playlists[r]}e.clearTimeout(this.finalRenditionTimeout);if(i){var a=(r.partTargetDuration||r.targetDuration)/2*1e3||5*1e3;this.finalRenditionTimeout=e.setTimeout(this.media.bind(this,r,false),a);return}var s=this.state;var o=!this.media_||r.id!==this.media_.id;var u=this.master.playlists[r.id];if(u&&u.endList||r.endList&&r.segments.length){if(this.request){this.request.onreadystatechange=null;this.request.abort();this.request=null}this.state="HAVE_METADATA";this.media_=r;if(o){this.trigger("mediachanging");if(s==="HAVE_MASTER"){this.trigger("loadedmetadata")}else{this.trigger("mediachange")}}return}this.updateMediaUpdateTimeout_(ze(r,true));if(!o){return}this.state="SWITCHING_MEDIA";if(this.request){if(r.resolvedUri===this.request.url){return}this.request.onreadystatechange=null;this.request.abort();this.request=null}if(this.media_){this.trigger("mediachanging")}this.pendingMedia_=r;this.request=this.vhs_.xhr({uri:r.resolvedUri,withCredentials:this.withCredentials},function(e,t){if(!n.request){return}r.lastRequest=Date.now();r.resolvedUri=m(n.handleManifestRedirects,r.resolvedUri,t);if(e){return n.playlistRequestError(n.request,r,s)}n.haveMetadata({playlistString:t.responseText,url:r.uri,id:r.id});if(s==="HAVE_MASTER"){n.trigger("loadedmetadata")}else{n.trigger("mediachange")}})};i.pause=function t(){if(this.mediaUpdateTimeout){e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null}this.stopRequest();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"}};i.load=function t(r){var i=this;if(this.mediaUpdateTimeout){e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null}var n=this.media();if(r){var a=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5*1e3;this.mediaUpdateTimeout=e.setTimeout(function(){i.mediaUpdateTimeout=null;i.load()},a);return}if(!this.started){this.start();return}if(n&&!n.endList){this.trigger("mediaupdatetimeout")}else{this.trigger("loadedplaylist")}};i.updateMediaUpdateTimeout_=function t(r){var i=this;if(this.mediaUpdateTimeout){e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null}if(!this.media()||this.media().endList){return}this.mediaUpdateTimeout=e.setTimeout(function(){i.mediaUpdateTimeout=null;i.trigger("mediaupdatetimeout");i.updateMediaUpdateTimeout_(r)},r)};i.start=function t(){var r=this;this.started=true;if(typeof this.src==="object"){if(!this.src.uri){this.src.uri=e.location.href}this.src.resolvedUri=this.src.uri;setTimeout(function(){r.setupInitialPlaylist(r.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(e,t){if(!r.request){return}r.request=null;if(e){r.error={status:t.status,message:"HLS playlist request error at URL: "+r.src+".",responseText:t.responseText,code:2};if(r.state==="HAVE_NOTHING"){r.started=false}return r.trigger("error")}r.src=m(r.handleManifestRedirects,r.src,t);var i=r.parseManifest_({manifestString:t.responseText,url:r.src});r.setupInitialPlaylist(i)})};i.srcUri=function e(){return typeof this.src==="string"?this.src:this.src.uri};i.setupInitialPlaylist=function t(r){this.state="HAVE_MASTER";if(r.playlists){this.master=r;Be(this.master,this.srcUri());r.playlists.forEach(function(e){e.segments=Ge(e);e.segments.forEach(function(t){We(t,e.resolvedUri)})});this.trigger("loadedplaylist");if(!this.request){this.media(this.master.playlists[0])}return}var i=this.srcUri()||e.location.href;this.master=Ue(r,i);this.haveMetadata({playlistObject:r,url:i,id:this.master.playlists[0].id});this.trigger("loadedmetadata")};return r}(je);var Qe=s["default"].xhr,$e=s["default"].mergeOptions;var Je=function e(t,r,i,n){var a=t.responseType==="arraybuffer"?t.response:t.responseText;if(!r&&a){t.responseTime=Date.now();t.roundTripTime=t.responseTime-t.requestTime;t.bytesReceived=a.byteLength||a.length;if(!t.bandwidth){t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3)}}if(i.headers){t.responseHeaders=i.headers}if(r&&r.code==="ETIMEDOUT"){t.timedout=true}if(!r&&!t.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0){r=new Error("XHR Failed with a response of: "+(t&&(a||t.responseText)))}n(r,t)};var Ze=function e(){var t=function e(t,r){t=$e({timeout:45e3},t);var i=e.beforeRequest||s["default"].Vhs.xhr.beforeRequest;if(i&&typeof i==="function"){var n=i(t);if(n){t=n}}var a=s["default"].Vhs.xhr.original===true?Qe:s["default"].Vhs.xhr;var o=a(t,function(e,t){return Je(o,e,t,r)});var u=o.abort;o.abort=function(){o.aborted=true;return u.apply(o,arguments)};o.uri=t.uri;o.requestTime=Date.now();return o};t.original=true;return t};var et=function t(r){var i;var n=r.offset;if(typeof r.offset==="bigint"||typeof r.length==="bigint"){i=e.BigInt(r.offset)+e.BigInt(r.length)-e.BigInt(1)}else{i=r.offset+r.length-1}return"bytes="+n+"-"+i};var tt=function e(t){var r={};if(t.byterange){r.Range=et(t.byterange)}return r};var rt=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;var it=/^application\/dash\+xml/i;var nt=function e(t){if(rt.test(t)){return"hls"}if(it.test(t)){return"dash"}if(t==="application/vnd.videojs.vhs+json"){return"vhs-json"}return null};var at=function e(t){return t.toString(2).length};var st=function e(t){return Math.ceil(at(t)/8)};var ot=function e(t){if(ArrayBuffer.isView==="function"){return ArrayBuffer.isView(t)}return t&&t.buffer instanceof ArrayBuffer};var ut=function e(t){return ot(t)};var lt=function e(t){if(t instanceof Uint8Array){return t}if(!Array.isArray(t)&&!ut(t)&&!(t instanceof ArrayBuffer)){if(typeof t!=="number"||typeof t==="number"&&t!==t){t=0}else{t=[t]}}return new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0)};var dt=e.BigInt||Number;var ct=[dt("0x1"),dt("0x100"),dt("0x10000"),dt("0x1000000"),dt("0x100000000"),dt("0x10000000000"),dt("0x1000000000000"),dt("0x100000000000000"),dt("0x10000000000000000")];(function(){var e=new Uint16Array([65484]);var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(t[0]===255){return"big"}if(t[0]===204){return"little"}return"unknown"})();var ft=function e(t,r){var i=r===void 0?{}:r,n=i.signed,a=n===void 0?false:n,s=i.le,o=s===void 0?false:s;t=lt(t);var u=o?"reduce":"reduceRight";var l=t[u]?t[u]:Array.prototype[u];var d=l.call(t,function(e,r,i){var n=o?i:Math.abs(i+1-t.length);return e+dt(r)*ct[n]},dt(0));if(a){var c=ct[t.length]/dt(2)-dt(1);d=dt(d);if(d>c){d-=c;d-=c;d-=dt(2)}}return Number(d)};var ht=function e(t,r){var i=r===void 0?{}:r,n=i.le,a=n===void 0?false:n;if(typeof t!=="bigint"&&typeof t!=="number"||typeof t==="number"&&t!==t){t=0}t=dt(t);var s=st(t);var o=new Uint8Array(new ArrayBuffer(s));for(var u=0;u<s;u++){var l=a?u:Math.abs(u+1-o.length);o[l]=Number(t/ct[u]&dt(255));if(t<0){o[l]=Math.abs(~o[l]);o[l]-=u===0?1:2}}return o};var pt=function e(t,r){if(typeof t!=="string"&&t&&typeof t.toString==="function"){t=t.toString()}if(typeof t!=="string"){return new Uint8Array}if(!r){t=unescape(encodeURIComponent(t))}var i=new Uint8Array(t.length);for(var n=0;n<t.length;n++){i[n]=t.charCodeAt(n)}return i};var vt=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}r=r.filter(function(e){return e&&(e.byteLength||e.length)&&typeof e!=="string"});if(r.length<=1){return lt(r[0])}var n=r.reduce(function(e,t,r){return e+(t.byteLength||t.length)},0);var a=new Uint8Array(n);var s=0;r.forEach(function(e){e=lt(e);a.set(e,s);s+=e.byteLength});return a};var mt=function e(t,r,i){var n=i===void 0?{}:i,a=n.offset,s=a===void 0?0:a,o=n.mask,u=o===void 0?[]:o;t=lt(t);r=lt(r);var l=r.every?r.every:Array.prototype.every;return r.length&&t.length-s>=r.length&&l.call(r,function(e,r){var i=u[r]?u[r]&t[s+r]:t[s+r];return e===i})};var gt=function e(t,r){return t.start(r)+"-"+t.end(r)};var yt=function e(t,r){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(r%2?" ":"")};var _t=function e(t){if(t>=32&&t<126){return String.fromCharCode(t)}return"."};var bt=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(ot(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};var Tt=function e(t){var r=t.byterange||{length:Infinity,offset:0};return[r.length,r.offset,t.resolvedUri].join(",")};var St=function e(t){return t.resolvedUri};var Et=function e(t){var r=Array.prototype.slice.call(t);var i=16;var n="";var a;var s;for(var o=0;o<r.length/i;o++){a=r.slice(o*i,o*i+i).map(yt).join("");s=r.slice(o*i,o*i+i).map(_t).join("");n+=a+" "+s+"\n"}return n};var It=function e(t){var r=t.bytes;return Et(r)};var Ct=function e(t){var r="";var i;for(i=0;i<t.length;i++){r+=gt(t,i)+" "}return r};var kt=Object.freeze({__proto__:null,createTransferableMessage:bt,initSegmentId:Tt,segmentKeyId:St,hexDump:Et,tagDump:It,textRanges:Ct});var wt=.25;var At=function e(t,r){if(!r.dateTimeObject){return null}var i=r.videoTimingInfo.transmuxerPrependedSeconds;var n=r.videoTimingInfo.transmuxedPresentationStart;var a=n+i;var s=t-a;return new Date(r.dateTimeObject.getTime()+s*1e3)};var Pt=function e(t){return t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds};var Ot=function e(t,r){var i;try{i=new Date(t)}catch(e){return null}if(!r||!r.segments||r.segments.length===0){return null}var n=r.segments[0];if(i<n.dateTimeObject){return null}for(var a=0;a<r.segments.length-1;a++){n=r.segments[a];var s=r.segments[a+1].dateTimeObject;if(i<s){break}}var o=r.segments[r.segments.length-1];var u=o.dateTimeObject;var l=o.videoTimingInfo?Pt(o.videoTimingInfo):o.duration+o.duration*wt;var d=new Date(u.getTime()+l*1e3);if(i>d){return null}if(i>u){n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:Pe.duration(r,r.mediaSequence+r.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"}};var xt=function e(t,r){if(!r||!r.segments||r.segments.length===0){return null}var i=0;var n;for(var a=0;a<r.segments.length;a++){n=r.segments[a];i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration;if(t<=i){break}}var s=r.segments[r.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t){return null}if(t>i){if(t>i+s.duration*wt){return null}n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}};var Dt=function e(t,r){var i;var n;try{i=new Date(t);n=new Date(r)}catch(e){}var a=i.getTime();var s=n.getTime();return(s-a)/1e3};var Lt=function e(t){if(!t.segments||t.segments.length===0){return false}for(var r=0;r<t.segments.length;r++){var i=t.segments[r];if(!i.dateTimeObject){return false}}return true};var Rt=function e(t){var r=t.playlist,i=t.time,n=i===void 0?undefined:i,a=t.callback;if(!a){throw new Error("getProgramTime: callback must be provided")}if(!r||n===undefined){return a({message:"getProgramTime: playlist and time must be provided"})}var s=xt(n,r);if(!s){return a({message:"valid programTime was not found"})}if(s.type==="estimate"){return a({message:"Accurate programTime could not be determined."+" Please seek to e.seekTime and try again",seekTime:s.estimatedStart})}var o={mediaSeconds:n};var u=At(n,s.segment);if(u){o.programDateTime=u.toISOString()}return a(null,o)};var Nt=function e(t){var r=t.programTime,i=t.playlist,n=t.retryCount,a=n===void 0?2:n,s=t.seekTo,o=t.pauseAfterSeek,u=o===void 0?true:o,l=t.tech,d=t.callback;if(!d){throw new Error("seekToProgramTime: callback must be provided")}if(typeof r==="undefined"||!i||!s){return d({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"})}if(!i.endList&&!l.hasStarted_){return d({message:"player must be playing a live stream to start buffering"})}if(!Lt(i)){return d({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri})}var c=Ot(r,i);if(!c){return d({message:r+" was not found in the stream"})}var f=c.segment;var h=Dt(f.dateTimeObject,r);if(c.type==="estimate"){if(a===0){return d({message:r+" is not buffered yet. Try again"})}s(c.estimatedStart+h);l.one("seeked",function(){e({programTime:r,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:d})});return}var p=f.start+h;var v=function e(){return d(null,l.currentTime())};l.one("seeked",v);if(u){l.pause()}s(p)};var Mt=function e(t,r,i){r.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 Ut=function e(t){return!!t&&typeof t==="object"};var Bt=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return r.reduce(function(t,r){if(typeof r!=="object"){return t}Object.keys(r).forEach(function(i){if(Array.isArray(t[i])&&Array.isArray(r[i])){t[i]=t[i].concat(r[i])}else if(Ut(t[i])&&Ut(r[i])){t[i]=e(t[i],r[i])}else{t[i]=r[i]}});return t},{})};var Ft=function e(t){return Object.keys(t).map(function(e){return t[e]})};var jt=function e(t,r){var i=[];for(var n=t;n<r;n++){i.push(n)}return i};var Vt=function e(t){return t.reduce(function(e,t){return e.concat(t)},[])};var qt=function e(t){if(!t.length){return[]}var r=[];for(var i=0;i<t.length;i++){r.push(t[i])}return r};var Ht=function e(t,r){return t.reduce(function(e,t,i){if(t[r]){e.push(i)}return e},[])};var Wt=function e(t,r){for(var i=0;i<t.length;i++){if(r(t[i])){return i}}return-1};var Gt=function e(t,r){return Ft(t.reduce(function(e,t){t.forEach(function(t){e[r(t)]=t});return e},{}))};var Kt={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 Yt=function t(r){var i=r.baseUrl,n=i===void 0?"":i,a=r.source,s=a===void 0?"":a,o=r.range,u=o===void 0?"":o,l=r.indexRange,d=l===void 0?"":l;var c={uri:s,resolvedUri:p(n||"",s)};if(u||d){var f=u?u:d;var h=f.split("-");var v=e.BigInt?e.BigInt(h[0]):parseInt(h[0],10);var m=e.BigInt?e.BigInt(h[1]):parseInt(h[1],10);if(v<Number.MAX_SAFE_INTEGER&&typeof v==="bigint"){v=Number(v)}if(m<Number.MAX_SAFE_INTEGER&&typeof m==="bigint"){m=Number(m)}var g;if(typeof m==="bigint"||typeof v==="bigint"){g=e.BigInt(m)-e.BigInt(v)+e.BigInt(1)}else{g=m-v+1}if(typeof g==="bigint"&&g<Number.MAX_SAFE_INTEGER){g=Number(g)}c.byterange={length:g,offset:v}}return c};var zt=function t(r){var i;if(typeof r.offset==="bigint"||typeof r.length==="bigint"){i=e.BigInt(r.offset)+e.BigInt(r.length)-e.BigInt(1)}else{i=r.offset+r.length-1}return r.offset+"-"+i};var Xt=function e(t){if(t&&typeof t!=="number"){t=parseInt(t,10)}if(isNaN(t)){return null}return t};var Qt={static:function e(t){var r=t.duration,i=t.timescale,n=i===void 0?1:i,a=t.sourceDuration,s=t.periodDuration;var o=Xt(t.endNumber);var u=r/n;if(typeof o==="number"){return{start:0,end:o}}if(typeof s==="number"){return{start:0,end:s/u}}return{start:0,end:a/u}},dynamic:function e(t){var r=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,a=t.timescale,s=a===void 0?1:a,o=t.duration,u=t.periodStart,l=u===void 0?0:u,d=t.minimumUpdatePeriod,c=d===void 0?0:d,f=t.timeShiftBufferDepth,h=f===void 0?Infinity:f;var p=Xt(t.endNumber);var v=(r+i)/1e3;var m=n+l;var g=v+c;var y=g-m;var _=Math.ceil(y*s/o);var b=Math.floor((v-m-h)*s/o);var T=Math.floor((v-m)*s/o);return{start:Math.max(0,b),end:typeof p==="number"?p:Math.min(_,T)}}};var $t=function e(t){return function(e){var r=t.duration,i=t.timescale,n=i===void 0?1:i,a=t.periodStart,s=t.startNumber,o=s===void 0?1:s;return{number:o+e,duration:r/n,timeline:a,time:e*r}}};var Jt=function e(t){var r=t.type,i=t.duration,n=t.timescale,a=n===void 0?1:n,s=t.periodDuration,o=t.sourceDuration;var u=Qt[r](t),l=u.start,d=u.end;var c=jt(l,d).map($t(t));if(r==="static"){var f=c.length-1;var h=typeof s==="number"?s:o;c[f].duration=h-i/a*f}return c};var Zt=function e(t){var r=t.baseUrl,i=t.initialization,n=i===void 0?{}:i,a=t.sourceDuration,s=t.indexRange,o=s===void 0?"":s,u=t.periodStart,l=t.presentationTime,d=t.number,c=d===void 0?0:d,f=t.duration;if(!r){throw new Error(Kt.NO_BASE_URL)}var h=Yt({baseUrl:r,source:n.sourceURL,range:n.range});var p=Yt({baseUrl:r,source:r,indexRange:o});p.map=h;if(f){var v=Jt(t);if(v.length){p.duration=v[0].duration;p.timeline=v[0].timeline}}else if(a){p.duration=a;p.timeline=u}p.presentationTime=l||u;p.number=c;return[p]};var er=function t(r,i,n){var a=r.sidx.map?r.sidx.map:null;var s=r.sidx.duration;var o=r.timeline||0;var u=r.sidx.byterange;var l=u.offset+u.length;var d=i.timescale;var c=i.references.filter(function(e){return e.referenceType!==1});var f=[];var h=r.endList?"static":"dynamic";var p=r.sidx.timeline;var v=p;var m=r.mediaSequence||0;var g;if(typeof i.firstOffset==="bigint"){g=e.BigInt(l)+i.firstOffset}else{g=l+i.firstOffset}for(var y=0;y<c.length;y++){var _=i.references[y];var b=_.referencedSize;var T=_.subsegmentDuration;var S=void 0;if(typeof g==="bigint"){S=g+e.BigInt(b)-e.BigInt(1)}else{S=g+b-1}var E=g+"-"+S;var I={baseUrl:n,timescale:d,timeline:o,periodStart:p,presentationTime:v,number:m,duration:T,sourceDuration:s,indexRange:E,type:h};var C=Zt(I)[0];if(a){C.map=a}f.push(C);if(typeof g==="bigint"){g+=e.BigInt(b)}else{g+=b}v+=T/d;m++}r.segments=f;return r};var tr=["AUDIO","SUBTITLES"];var rr=1/60;var ir=function e(t){return Gt(t,function(e){var t=e.timeline;return t}).sort(function(e,t){return e.timeline>t.timeline?1:-1})};var nr=function e(t,r){for(var i=0;i<t.length;i++){if(t[i].attributes.NAME===r){return t[i]}}return null};var ar=function e(t){var r=[];Mt(t,tr,function(e,t,i,n){r=r.concat(e.playlists||[])});return r};var sr=function e(t){var r=t.playlist,i=t.mediaSequence;r.mediaSequence=i;r.segments.forEach(function(e,t){e.number=r.mediaSequence+t})};var or=function e(t){var r=t.oldPlaylists,i=t.newPlaylists,n=t.timelineStarts;i.forEach(function(e){e.discontinuitySequence=Wt(n,function(t){var r=t.timeline;return r===e.timeline});var t=nr(r,e.attributes.NAME);if(!t){return}if(e.sidx){return}var i=e.segments[0];var a=Wt(t.segments,function(e){return Math.abs(e.presentationTime-i.presentationTime)<rr});if(a===-1){sr({playlist:e,mediaSequence:t.mediaSequence+t.segments.length});e.segments[0].discontinuity=true;e.discontinuityStarts.unshift(0);if(!t.segments.length&&e.timeline>t.timeline||t.segments.length&&e.timeline>t.segments[t.segments.length-1].timeline){e.discontinuitySequence--}return}var s=t.segments[a];if(s.discontinuity&&!i.discontinuity){i.discontinuity=true;e.discontinuityStarts.unshift(0);e.discontinuitySequence--}sr({playlist:e,mediaSequence:t.segments[a].number})})};var ur=function e(t){var r=t.oldManifest,i=t.newManifest;var n=r.playlists.concat(ar(r));var a=i.playlists.concat(ar(i));i.timelineStarts=ir([r.timelineStarts,i.timelineStarts]);or({oldPlaylists:n,newPlaylists:a,timelineStarts:i.timelineStarts});return i};var lr=function e(t){return t&&t.uri+"-"+zt(t.byterange)};var dr=function e(t){var r=Ft(t.reduce(function(e,t){var r=t.attributes.id+(t.attributes.lang||"");if(!e[r]){e[r]=t;e[r].attributes.timelineStarts=[]}else{if(t.segments){var i;if(t.segments[0]){t.segments[0].discontinuity=true}(i=e[r].segments).push.apply(i,t.segments)}if(t.attributes.contentProtection){e[r].attributes.contentProtection=t.attributes.contentProtection}}e[r].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart});return e},{}));return r.map(function(e){e.discontinuityStarts=Ht(e.segments||[],"discontinuity");return e})};var cr=function e(t,r){var i=lr(t.sidx);var n=i&&r[i]&&r[i].sidx;if(n){er(t,n,t.sidx.resolvedUri)}return t};var fr=function e(t,r){if(r===void 0){r={}}if(!Object.keys(r).length){return t}for(var i in t){t[i]=cr(t[i],r)}return t};var hr=function e(t,r){var i;var n=t.attributes,a=t.segments,s=t.sidx,o=t.mediaSequence,u=t.discontinuitySequence,l=t.discontinuityStarts;var d={attributes:(i={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuitySequence:u,discontinuityStarts:l,timelineStarts:n.timelineStarts,mediaSequence:o,segments:a};if(n.contentProtection){d.contentProtection=n.contentProtection}if(s){d.sidx=s}if(r){d.attributes.AUDIO="audio";d.attributes.SUBTITLES="subs"}return d};var pr=function e(t){var r;var i=t.attributes,n=t.segments,a=t.mediaSequence,s=t.discontinuityStarts,o=t.discontinuitySequence;if(typeof n==="undefined"){n=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}];i.duration=i.sourceDuration}var u=(r={NAME:i.id,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r);if(i.codecs){u.CODECS=i.codecs}return{attributes:u,uri:"",endList:i.type==="static",timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:s,discontinuitySequence:o,mediaSequence:a,segments:n}};var vr=function e(t,r,i){if(r===void 0){r={}}if(i===void 0){i=false}var n;var a=t.reduce(function(e,t){var a=t.attributes.role&&t.attributes.role.value||"";var s=t.attributes.lang||"";var o=t.attributes.label||"main";if(s&&!t.attributes.label){var u=a?" ("+a+")":"";o=""+t.attributes.lang+u}if(!e[o]){e[o]={language:s,autoselect:true,default:a==="main",playlists:[],uri:""}}var l=cr(hr(t,i),r);e[o].playlists.push(l);if(typeof n==="undefined"&&a==="main"){n=t;n.default=true}return e},{});if(!n){var s=Object.keys(a)[0];a[s].default=true}return a};var mr=function e(t,r){if(r===void 0){r={}}return t.reduce(function(e,t){var i=t.attributes.lang||"text";if(!e[i]){e[i]={language:i,default:false,autoselect:false,playlists:[],uri:""}}e[i].playlists.push(cr(pr(t),r));return e},{})};var gr=function e(t){return t.reduce(function(e,t){if(!t){return e}t.forEach(function(t){var r=t.channel,i=t.language;e[i]={autoselect:false,default:false,instreamId:r,language:i};if(t.hasOwnProperty("aspectRatio")){e[i].aspectRatio=t.aspectRatio}if(t.hasOwnProperty("easyReader")){e[i].easyReader=t.easyReader}if(t.hasOwnProperty("3D")){e[i]["3D"]=t["3D"]}});return e},{})};var yr=function e(t){var r;var i=t.attributes,n=t.segments,a=t.sidx,s=t.discontinuityStarts;var o={attributes:(r={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:i.type==="static",timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:s,timelineStarts:i.timelineStarts,segments:n};if(i.frameRate){o.attributes["FRAME-RATE"]=i.frameRate}if(i.contentProtection){o.contentProtection=i.contentProtection}if(a){o.sidx=a}return o};var _r=function e(t){var r=t.attributes;return r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video"};var br=function e(t){var r=t.attributes;return r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio"};var Tr=function e(t){var r=t.attributes;return r.mimeType==="text/vtt"||r.contentType==="text"};var Sr=function e(t,r){t.forEach(function(e){e.mediaSequence=0;e.discontinuitySequence=Wt(r,function(t){var r=t.timeline;return r===e.timeline});if(!e.segments){return}e.segments.forEach(function(e,t){e.number=t})})};var Er=function e(t){if(!t){return[]}return Object.keys(t).reduce(function(e,r){var i=t[r];return e.concat(i.playlists)},[])};var Ir=function e(t){var r;var i=t.dashPlaylists,n=t.locations,a=t.sidxMapping,s=a===void 0?{}:a,o=t.previousManifest;if(!i.length){return{}}var u=i[0].attributes,l=u.sourceDuration,d=u.type,c=u.suggestedPresentationDelay,f=u.minimumUpdatePeriod;var h=dr(i.filter(_r)).map(yr);var p=dr(i.filter(br));var v=dr(i.filter(Tr));var m=i.map(function(e){return e.attributes.captionServices}).filter(Boolean);var g={allowCache:true,discontinuityStarts:[],segments:[],endList:true,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:l,playlists:fr(h,s)};if(f>=0){g.minimumUpdatePeriod=f*1e3}if(n){g.locations=n}if(d==="dynamic"){g.suggestedPresentationDelay=c}var y=g.playlists.length===0;var _=p.length?vr(p,s,y):null;var b=v.length?mr(v,s):null;var T=h.concat(Er(_),Er(b));var S=T.map(function(e){var t=e.timelineStarts;return t});g.timelineStarts=ir(S);Sr(T,g.timelineStarts);if(_){g.mediaGroups.AUDIO.audio=_}if(b){g.mediaGroups.SUBTITLES.subs=b}if(m.length){g.mediaGroups["CLOSED-CAPTIONS"].cc=gr(m)}if(o){return ur({oldManifest:o,newManifest:g})}return g};var Cr=function e(t,r,i){var n=t.NOW,a=t.clientOffset,s=t.availabilityStartTime,o=t.timescale,u=o===void 0?1:o,l=t.periodStart,d=l===void 0?0:l,c=t.minimumUpdatePeriod,f=c===void 0?0:c;var h=(n+a)/1e3;var p=s+d;var v=h+f;var m=v-p;return Math.ceil((m*u-r)/i)};var kr=function e(t,r){var i=t.type,n=t.minimumUpdatePeriod,a=n===void 0?0:n,s=t.media,o=s===void 0?"":s,u=t.sourceDuration,l=t.timescale,d=l===void 0?1:l,c=t.startNumber,f=c===void 0?1:c,h=t.periodStart;var p=[];var v=-1;for(var m=0;m<r.length;m++){var g=r[m];var y=g.d;var _=g.r||0;var b=g.t||0;if(v<0){v=b}if(b&&b>v){v=b}var T=void 0;if(_<0){var S=m+1;if(S===r.length){if(i==="dynamic"&&a>0&&o.indexOf("$Number$")>0){T=Cr(t,v,y)}else{T=(u*d-v)/y}}else{T=(r[S].t-v)/y}}else{T=_+1}var E=f+p.length+T;var I=f+p.length;while(I<E){p.push({number:I,duration:y/d,time:v,timeline:h});v+=y;I++}}return p};var wr=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g;var Ar=function e(t){return function(e,r,i,n){if(e==="$$"){return"$"}if(typeof t[r]==="undefined"){return e}var a=""+t[r];if(r==="RepresentationID"){return a}if(!i){n=1}else{n=parseInt(n,10)}if(a.length>=n){return a}return""+new Array(n-a.length+1).join("0")+a}};var Pr=function e(t,r){return t.replace(wr,Ar(r))};var Or=function e(t,r){if(!t.duration&&!r){return[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}]}if(t.duration){return Jt(t)}return kr(t,r)};var xr=function e(t,r){var i={RepresentationID:t.id,Bandwidth:t.bandwidth||0};var n=t.initialization,a=n===void 0?{sourceURL:"",range:""}:n;var s=Yt({baseUrl:t.baseUrl,source:Pr(a.sourceURL,i),range:a.range});var o=Or(t,r);return o.map(function(e){i.Number=e.number;i.Time=e.time;var r=Pr(t.media||"",i);var n=t.timescale||1;var a=t.presentationTimeOffset||0;var o=t.periodStart+(e.time-a)/n;var u={uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:p(t.baseUrl||"",r),map:s,number:e.number,presentationTime:o};return u})};var Dr=function e(t,r){var i=t.baseUrl,n=t.initialization,a=n===void 0?{}:n;var s=Yt({baseUrl:i,source:a.sourceURL,range:a.range});var o=Yt({baseUrl:i,source:r.media,range:r.mediaRange});o.map=s;return o};var Lr=function e(t,r){var i=t.duration,n=t.segmentUrls,a=n===void 0?[]:n,s=t.periodStart;if(!i&&!r||i&&r){throw new Error(Kt.SEGMENT_TIME_UNSPECIFIED)}var o=a.map(function(e){return Dr(t,e)});var u;if(i){u=Jt(t)}if(r){u=kr(t,r)}var l=u.map(function(e,r){if(o[r]){var i=o[r];var n=t.timescale||1;var a=t.presentationTimeOffset||0;i.timeline=e.timeline;i.duration=e.duration;i.number=e.number;i.presentationTime=s+(e.time-a)/n;return i}}).filter(function(e){return e});return l};var Rr=function e(t){var r=t.attributes,i=t.segmentInfo;var n;var a;if(i.template){a=xr;n=Bt(r,i.template)}else if(i.base){a=Zt;n=Bt(r,i.base)}else if(i.list){a=Lr;n=Bt(r,i.list)}var s={attributes:r};if(!a){return s}var o=a(n,i.segmentTimeline);if(n.duration){var u=n,l=u.duration,d=u.timescale,c=d===void 0?1:d;n.duration=l/c}else if(o.length){n.duration=o.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0)}else{n.duration=0}s.attributes=n;s.segments=o;if(i.base&&n.indexRange){s.sidx=o[0];s.segments=[]}return s};var Nr=function e(t){return t.map(Rr)};var Mr=function e(t,r){return qt(t.childNodes).filter(function(e){var t=e.tagName;return t===r})};var Ur=function e(t){return t.textContent.trim()};var Br=function e(t){return parseFloat(t.split("/").reduce(function(e,t){return e/t}))};var Fr=function e(t){var r=365*24*60*60;var i=30*24*60*60;var n=24*60*60;var a=60*60;var s=60;var o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/;var u=o.exec(t);if(!u){return 0}var l=u.slice(1),d=l[0],c=l[1],f=l[2],h=l[3],p=l[4],v=l[5];return parseFloat(d||0)*r+parseFloat(c||0)*i+parseFloat(f||0)*n+parseFloat(h||0)*a+parseFloat(p||0)*s+parseFloat(v||0)};var jr=function e(t){var r=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;if(r.test(t)){t+="Z"}return Date.parse(t)};var Vr={mediaPresentationDuration:function e(t){return Fr(t)},availabilityStartTime:function e(t){return jr(t)/1e3},minimumUpdatePeriod:function e(t){return Fr(t)},suggestedPresentationDelay:function e(t){return Fr(t)},type:function e(t){return t},timeShiftBufferDepth:function e(t){return Fr(t)},start:function e(t){return Fr(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)},frameRate:function e(t){return Br(t)},startNumber:function e(t){return parseInt(t,10)},timescale:function e(t){return parseInt(t,10)},presentationTimeOffset:function e(t){return parseInt(t,10)},duration:function e(t){var r=parseInt(t,10);if(isNaN(r)){return Fr(t)}return r},d:function e(t){return parseInt(t,10)},t:function e(t){return parseInt(t,10)},r:function e(t){return parseInt(t,10)},DEFAULT:function e(t){return t}};var qr=function e(t){if(!(t&&t.attributes)){return{}}return qt(t.attributes).reduce(function(e,t){var r=Vr[t.name]||Vr.DEFAULT;e[t.name]=r(t.value);return e},{})};var Hr={"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 Wr=function e(t,r){if(!r.length){return t}return Vt(t.map(function(e){return r.map(function(t){return p(e,Ur(t))})}))};var Gr=function e(t){var r=Mr(t,"SegmentTemplate")[0];var i=Mr(t,"SegmentList")[0];var n=i&&Mr(i,"SegmentURL").map(function(e){return Bt({tag:"SegmentURL"},qr(e))});var a=Mr(t,"SegmentBase")[0];var s=i||r;var o=s&&Mr(s,"SegmentTimeline")[0];var u=i||a||r;var l=u&&Mr(u,"Initialization")[0];var d=r&&qr(r);if(d&&l){d.initialization=l&&qr(l)}else if(d&&d.initialization){d.initialization={sourceURL:d.initialization}}var c={template:d,segmentTimeline:o&&Mr(o,"S").map(function(e){return qr(e)}),list:i&&Bt(qr(i),{segmentUrls:n,initialization:qr(l)}),base:a&&Bt(qr(a),{initialization:qr(l)})};Object.keys(c).forEach(function(e){if(!c[e]){delete c[e]}});return c};var Kr=function e(t,r,i){return function(e){var n=Mr(e,"BaseURL");var a=Wr(r,n);var s=Bt(t,qr(e));var o=Gr(e);return a.map(function(e){return{segmentInfo:Bt(i,o),attributes:Bt(s,{baseUrl:e})}})}};var Yr=function e(t){return t.reduce(function(e,t){var r=qr(t);if(r.schemeIdUri){r.schemeIdUri=r.schemeIdUri.toLowerCase()}var i=Hr[r.schemeIdUri];if(i){e[i]={attributes:r};var n=Mr(t,"cenc:pssh")[0];if(n){var a=Ur(n);e[i].pssh=a&&T(a)}}return e},{})};var zr=function e(t){if(t.schemeIdUri==="urn:scte:dash:cc:cea-608:2015"){var r=typeof t.value!=="string"?[]:t.value.split(";");return r.map(function(e){var t;var r;r=e;if(/^CC\d=/.test(e)){var i=e.split("=");t=i[0];r=i[1]}else if(/^CC\d$/.test(e)){t=e}return{channel:t,language:r}})}else if(t.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"){var i=typeof t.value!=="string"?[]:t.value.split(";");return i.map(function(e){var t={channel:undefined,language:undefined,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var r=e.split("="),i=r[0],n=r[1],a=n===void 0?"":n;t.channel=i;t.language=e;a.split(",").forEach(function(e){var r=e.split(":"),i=r[0],n=r[1];if(i==="lang"){t.language=n}else if(i==="er"){t.easyReader=Number(n)}else if(i==="war"){t.aspectRatio=Number(n)}else if(i==="3D"){t["3D"]=Number(n)}})}else{t.language=e}if(t.channel){t.channel="SERVICE"+t.channel}return t})}};var Xr=function e(t,r,i){return function(e){var n=qr(e);var a=Wr(r,Mr(e,"BaseURL"));var s=Mr(e,"Role")[0];var o={role:qr(s)};var u=Bt(t,n,o);var l=Mr(e,"Accessibility")[0];var d=zr(qr(l));if(d){u=Bt(u,{captionServices:d})}var c=Mr(e,"Label")[0];if(c&&c.childNodes.length){var f=c.childNodes[0].nodeValue.trim();u=Bt(u,{label:f})}var h=Yr(Mr(e,"ContentProtection"));if(Object.keys(h).length){u=Bt(u,{contentProtection:h})}var p=Gr(e);var v=Mr(e,"Representation");var m=Bt(i,p);return Vt(v.map(Kr(u,a,m)))}};var Qr=function e(t,r){return function(e,i){var n=Wr(r,Mr(e.node,"BaseURL"));var a=Bt(t,{periodStart:e.attributes.start});if(typeof e.attributes.duration==="number"){a.periodDuration=e.attributes.duration}var s=Mr(e.node,"AdaptationSet");var o=Gr(e.node);return Vt(s.map(Xr(a,n,o)))}};var $r=function e(t){var r=t.attributes,i=t.priorPeriodAttributes,n=t.mpdType;if(typeof r.start==="number"){return r.start}if(i&&typeof i.start==="number"&&typeof i.duration==="number"){return i.start+i.duration}if(!i&&n==="static"){return 0}return null};var Jr=function e(t,r){if(r===void 0){r={}}var i=r,n=i.manifestUri,a=n===void 0?"":n,s=i.NOW,o=s===void 0?Date.now():s,u=i.clientOffset,l=u===void 0?0:u;var d=Mr(t,"Period");if(!d.length){throw new Error(Kt.INVALID_NUMBER_OF_PERIOD)}var c=Mr(t,"Location");var f=qr(t);var h=Wr([a],Mr(t,"BaseURL"));f.type=f.type||"static";f.sourceDuration=f.mediaPresentationDuration||0;f.NOW=o;f.clientOffset=l;if(c.length){f.locations=c.map(Ur)}var p=[];d.forEach(function(e,t){var r=qr(e);var i=p[t-1];r.start=$r({attributes:r,priorPeriodAttributes:i?i.attributes:null,mpdType:f.type});p.push({node:e,attributes:r})});return{locations:f.locations,representationInfo:Vt(p.map(Qr(f,h)))}};var Zr=function e(t){if(t===""){throw new Error(Kt.DASH_EMPTY_MANIFEST)}var r=new n.DOMParser;var i;var a;try{i=r.parseFromString(t,"application/xml");a=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch(e){}if(!a||a&&a.getElementsByTagName("parsererror").length>0){throw new Error(Kt.DASH_INVALID_XML)}return a};var ei=function e(t){var r=Mr(t,"UTCTiming")[0];if(!r){return null}var i=qr(r);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT";i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Kt.UNSUPPORTED_UTC_TIMING_SCHEME)}return i};var ti=function e(t,r){if(r===void 0){r={}}var i=Jr(Zr(t),r);var n=Nr(i.representationInfo);return Ir({dashPlaylists:n,locations:i.locations,sidxMapping:r.sidxMapping,previousManifest:r.previousManifest})};var ri=function e(t){return ei(Zr(t))};var ii=Math.pow(2,32);var ni=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);var i;if(r.getBigUint64){i=r.getBigUint64(0);if(i<Number.MAX_SAFE_INTEGER){return Number(i)}return i}return r.getUint32(0)*ii+r.getUint32(4)};var ai={getUint64:ni,MAX_UINT32:ii};var si=ai.getUint64;var oi=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8)},n=12;if(i.version===0){i.earliestPresentationTime=r.getUint32(n);i.firstOffset=r.getUint32(n+4);n+=8}else{i.earliestPresentationTime=si(t.subarray(n));i.firstOffset=si(t.subarray(n+8));n+=16}n+=2;var a=r.getUint16(n);n+=2;for(;a>0;n+=12,a--){i.references.push({referenceType:(t[n]&128)>>>7,referencedSize:r.getUint32(n)&2147483647,subsegmentDuration:r.getUint32(n+4),startsWithSap:!!(t[n+8]&128),sapType:(t[n+8]&112)>>>4,sapDeltaTime:r.getUint32(n+8)&268435455})}return i};var ui=oi;var li=lt([73,68,51]);var di=function e(t,r){if(r===void 0){r=0}t=lt(t);var i=t[r+5];var n=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9];var a=(i&16)>>4;if(a){return n+20}return n+10};var ci=function e(t,r){if(r===void 0){r=0}t=lt(t);if(t.length-r<10||!mt(t,li,{offset:r})){return r}r+=di(t,r);return e(t,r)};var fi=function e(t){if(typeof t==="string"){return pt(t)}if(typeof t==="number"){return t}return t};var hi=function e(t){if(!Array.isArray(t)){return[fi(t)]}return t.map(function(e){return fi(e)})};var pi=function e(t,r,i){if(i===void 0){i=false}r=hi(r);t=lt(t);var n=[];if(!r.length){return n}var a=0;while(a<t.length){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0;var o=t.subarray(a+4,a+8);if(s===0){break}var u=a+s;if(u>t.length){if(i){break}u=t.length}var l=t.subarray(a+8,u);if(mt(o,r[0])){if(r.length===1){n.push(l)}else{n.push.apply(n,e(l,r.slice(1),i))}}a=u}return n};var vi={EBML:lt([26,69,223,163]),DocType:lt([66,130]),Segment:lt([24,83,128,103]),SegmentInfo:lt([21,73,169,102]),Tracks:lt([22,84,174,107]),Track:lt([174]),TrackNumber:lt([215]),DefaultDuration:lt([35,227,131]),TrackEntry:lt([174]),TrackType:lt([131]),FlagDefault:lt([136]),CodecID:lt([134]),CodecPrivate:lt([99,162]),VideoTrack:lt([224]),AudioTrack:lt([225]),Cluster:lt([31,67,182,117]),Timestamp:lt([231]),TimestampScale:lt([42,215,177]),BlockGroup:lt([160]),BlockDuration:lt([155]),Block:lt([161]),SimpleBlock:lt([163])};var mi=[128,64,32,16,8,4,2,1];var gi=function e(t){var r=1;for(var i=0;i<mi.length;i++){if(t&mi[i]){break}r++}return r};var yi=function e(t,r,i,n){if(i===void 0){i=true}if(n===void 0){n=false}var a=gi(t[r]);var s=t.subarray(r,r+a);if(i){s=Array.prototype.slice.call(t,r,r+a);s[0]^=mi[a-1]}return{length:a,value:ft(s,{signed:n}),bytes:s}};var _i=function e(t){if(typeof t==="string"){return t.match(/.{1,2}/g).map(function(t){return e(t)})}if(typeof t==="number"){return ht(t)}return t};var bi=function e(t){if(!Array.isArray(t)){return[_i(t)]}return t.map(function(e){return _i(e)})};var Ti=function e(t,r,i){if(i>=r.length){return r.length}var n=yi(r,i,false);if(mt(t.bytes,n.bytes)){return i}var a=yi(r,i+n.length);return e(t,r,i+a.length+a.value+n.length)};var Si=function e(t,r){r=bi(r);t=lt(t);var i=[];if(!r.length){return i}var n=0;while(n<t.length){var a=yi(t,n,false);var s=yi(t,n+a.length);var o=n+a.length+s.length;if(s.value===127){s.value=Ti(a,t,o);if(s.value!==t.length){s.value-=o}}var u=o+s.value>t.length?t.length:o+s.value;var l=t.subarray(o,u);if(mt(r[0],a.bytes)){if(r.length===1){i.push(l)}else{i=i.concat(e(l,r.slice(1)))}}var d=a.length+s.length+l.length;n+=d}return i};var Ei=lt([0,0,0,1]);var Ii=lt([0,0,1]);var Ci=lt([0,0,3]);var ki=function e(t){var r=[];var i=1;while(i<t.length-2){if(mt(t.subarray(i,i+3),Ci)){r.push(i+2);i++}i++}if(r.length===0){return t}var n=t.length-r.length;var a=new Uint8Array(n);var s=0;for(i=0;i<n;s++,i++){if(s===r[0]){s++;r.shift()}a[i]=t[s]}return a};var wi=function e(t,r,i,n){if(n===void 0){n=Infinity}t=lt(t);i=[].concat(i);var a=0;var s;var o=0;while(a<t.length&&(o<n||s)){var u=void 0;if(mt(t.subarray(a),Ei)){u=4}else if(mt(t.subarray(a),Ii)){u=3}if(!u){a++;continue}o++;if(s){return ki(t.subarray(s,a))}var l=void 0;if(r==="h264"){l=t[a+u]&31}else if(r==="h265"){l=t[a+u]>>1&63}if(i.indexOf(l)!==-1){s=a+u}a+=u+(r==="h264"?1:2)}return t.subarray(0,0)};var Ai=function e(t,r,i){return wi(t,"h264",r,i)};var Pi=function e(t,r,i){return wi(t,"h265",r,i)};var Oi={webm:lt([119,101,98,109]),matroska:lt([109,97,116,114,111,115,107,97]),flac:lt([102,76,97,67]),ogg:lt([79,103,103,83]),ac3:lt([11,119]),riff:lt([82,73,70,70]),avi:lt([65,86,73]),wav:lt([87,65,86,69]),"3gp":lt([102,116,121,112,51,103]),mp4:lt([102,116,121,112]),fmp4:lt([115,116,121,112]),mov:lt([102,116,121,112,113,116]),moov:lt([109,111,111,118]),moof:lt([109,111,111,102])};var xi={aac:function e(t){var r=ci(t);return mt(t,[255,16],{offset:r,mask:[255,22]})},mp3:function e(t){var r=ci(t);return mt(t,[255,2],{offset:r,mask:[255,6]})},webm:function e(t){var r=Si(t,[vi.EBML,vi.DocType])[0];return mt(r,Oi.webm)},mkv:function e(t){var r=Si(t,[vi.EBML,vi.DocType])[0];return mt(r,Oi.matroska)},mp4:function e(t){if(xi["3gp"](t)||xi.mov(t)){return false}if(mt(t,Oi.mp4,{offset:4})||mt(t,Oi.fmp4,{offset:4})){return true}if(mt(t,Oi.moof,{offset:4})||mt(t,Oi.moov,{offset:4})){return true}},mov:function e(t){return mt(t,Oi.mov,{offset:4})},"3gp":function e(t){return mt(t,Oi["3gp"],{offset:4})},ac3:function e(t){var r=ci(t);return mt(t,Oi.ac3,{offset:r})},ts:function e(t){if(t.length<189&&t.length>=1){return t[0]===71}var r=0;while(r+188<t.length&&r<188){if(t[r]===71&&t[r+188]===71){return true}r+=1}return false},flac:function e(t){var r=ci(t);return mt(t,Oi.flac,{offset:r})},ogg:function e(t){return mt(t,Oi.ogg)},avi:function e(t){return mt(t,Oi.riff)&&mt(t,Oi.avi,{offset:8})},wav:function e(t){return mt(t,Oi.riff)&&mt(t,Oi.wav,{offset:8})},h264:function e(t){return Ai(t,7,3).length},h265:function e(t){return Pi(t,[32,33],3).length}};var Di=Object.keys(xi).filter(function(e){return e!=="ts"&&e!=="h264"&&e!=="h265"}).concat(["ts","h264","h265"]);Di.forEach(function(e){var t=xi[e];xi[e]=function(e){return t(lt(e))}});var Li=xi;var Ri=function e(t){t=lt(t);for(var r=0;r<Di.length;r++){var i=Di[r];if(Li[i](t)){return i}}return""};var Ni=function e(t){return pi(t,["moof"]).length>0};var Mi=function e(t,r){if(t.readyState===4){return r()}return};var Ui=function e(t,r,i){var n=[];var a;var s=false;var o=function e(t,r,n,a){r.abort();s=true;return i(t,r,n,a)};var u=function e(t,r){if(s){return}if(t){return o(t,r,"",n)}var i=r.responseText.substring(n&&n.byteLength||0,r.responseText.length);n=vt(n,pt(i,true));a=a||ci(n);if(n.length<10||a&&n.length<a+2){return Mi(r,function(){return o(t,r,"",n)})}var u=Ri(n);if(u==="ts"&&n.length<188){return Mi(r,function(){return o(t,r,"",n)})}if(!u&&n.length<376){return Mi(r,function(){return o(t,r,"",n)})}return o(null,r,u,n)};var l={uri:t,beforeSend:function e(t){t.overrideMimeType("text/plain; charset=x-user-defined");t.addEventListener("progress",function(e){e.total;e.loaded;return Je(t,null,{statusCode:t.status},u)})}};var d=r(l,function(e,t){return Je(d,e,t,u)});return d};var Bi=s["default"].EventTarget,Fi=s["default"].mergeOptions;var ji=function e(t,r){if(!Ke(t,r)){return false}if(t.sidx&&r.sidx&&(t.sidx.offset!==r.sidx.offset||t.sidx.length!==r.sidx.length)){return false}else if(!t.sidx&&r.sidx||t.sidx&&!r.sidx){return false}if(t.segments&&!r.segments||!t.segments&&r.segments){return false}if(!t.segments&&!r.segments){return true}for(var i=0;i<t.segments.length;i++){var n=t.segments[i];var a=r.segments[i];if(n.uri!==a.uri){return false}if(!n.byterange&&!a.byterange){continue}var s=n.byterange;var o=a.byterange;if(s&&!o||!s&&o){return false}if(s.offset!==o.offset||s.length!==o.length){return false}}return true};var Vi=function e(t){var r=t.masterXml,i=t.srcUrl,n=t.clientOffset,a=t.sidxMapping,s=t.previousManifest;var o=ti(r,{manifestUri:i,clientOffset:n,sidxMapping:a,previousManifest:s});Be(o,i);return o};var qi=function e(t,r,i){var n=true;var a=Fi(t,{duration:r.duration,minimumUpdatePeriod:r.minimumUpdatePeriod,timelineStarts:r.timelineStarts});for(var s=0;s<r.playlists.length;s++){var o=r.playlists[s];if(o.sidx){var u=lr(o.sidx);if(i&&i[u]&&i[u].sidx){er(o,i[u].sidx,o.sidx.resolvedUri)}}var l=Ye(a,o,ji);if(l){a=l;n=false}}Le(r,function(e,t,r,i){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id;var o=Ye(a,e.playlists[0],ji);if(o){a=o;a.mediaGroups[t][r][i].playlists[0]=a.playlists[s];n=false}}});if(r.minimumUpdatePeriod!==t.minimumUpdatePeriod){n=false}if(n){return null}return a};var Hi=function e(t,r){var i=Boolean(!t.map&&!r.map);var n=i||Boolean(t.map&&r.map&&t.map.byterange.offset===r.map.byterange.offset&&t.map.byterange.length===r.map.byterange.length);return n&&t.uri===r.uri&&t.byterange.offset===r.byterange.offset&&t.byterange.length===r.byterange.length};var Wi=function e(t,r){var i={};for(var n in t){var a=t[n];var s=a.sidx;if(s){var o=lr(s);if(!r[o]){break}var u=r[o].sidxInfo;if(Hi(u,s)){i[o]=r[o]}}}return i};var Gi=function e(t,r){var i=Wi(t.playlists,r);var n=i;Le(t,function(e,t,i,a){if(e.playlists&&e.playlists.length){var s=e.playlists;n=Fi(n,Wi(s,r))}});return n};var Ki=function(t){c(r,t);function r(e,r,i,n){var a;if(i===void 0){i={}}a=t.call(this)||this;a.masterPlaylistLoader_=n||l(a);if(!n){a.isMaster_=true}var s=i,o=s.withCredentials,u=o===void 0?false:o,d=s.handleManifestRedirects,c=d===void 0?false:d;a.vhs_=r;a.withCredentials=u;a.handleManifestRedirects=c;if(!e){throw new Error("A non-empty playlist URL or object is required")}a.on("minimumUpdatePeriod",function(){a.refreshXml_()});a.on("mediaupdatetimeout",function(){a.refreshMedia_(a.media().id)});a.state="HAVE_NOTHING";a.loadedPlaylists_={};a.logger_=g("DashPlaylistLoader");if(a.isMaster_){a.masterPlaylistLoader_.srcUrl=e;a.masterPlaylistLoader_.sidxMapping_={}}else{a.childPlaylist_=e}return a}var i=r.prototype;i.requestErrored_=function e(t,r,i){if(!this.request){return true}this.request=null;if(t){this.error=typeof t==="object"&&!(t instanceof Error)?t:{status:r.status,message:"DASH request error at URL: "+r.uri,response:r.response,code:2};if(i){this.state=i}this.trigger("error");return true}};i.addSidxSegments_=function t(r,i,n){var a=this;var s=r.sidx&&lr(r.sidx);if(!r.sidx||!s||this.masterPlaylistLoader_.sidxMapping_[s]){this.mediaRequest_=e.setTimeout(function(){return n(false)},0);return}var o=m(this.handleManifestRedirects,r.sidx.resolvedUri);var u=function e(t,o){if(a.requestErrored_(t,o,i)){return}var u=a.masterPlaylistLoader_.sidxMapping_;var l;try{l=ui(lt(o.response).subarray(8))}catch(e){a.requestErrored_(e,o,i);return}u[s]={sidxInfo:r.sidx,sidx:l};er(r,l,r.sidx.resolvedUri);return n(true)};this.request=Ui(o,this.vhs_.xhr,function(e,t,i,n){if(e){return u(e,t)}if(!i||i!=="mp4"){return u({status:t.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:r,internal:true,blacklistDuration:Infinity,code:2},t)}var s=r.sidx.byterange,l=s.offset,d=s.length;if(n.length>=d+l){return u(e,{response:n.subarray(l,l+d),status:t.status,uri:t.uri})}a.request=a.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:tt({byterange:r.sidx.byterange})},u)})};i.dispose=function t(){this.trigger("dispose");this.stopRequest();this.loadedPlaylists_={};e.clearTimeout(this.minimumUpdatePeriodTimeout_);e.clearTimeout(this.mediaRequest_);e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;this.mediaRequest_=null;this.minimumUpdatePeriodTimeout_=null;if(this.masterPlaylistLoader_.createMupOnMedia_){this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_);this.masterPlaylistLoader_.createMupOnMedia_=null}this.off()};i.hasPendingRequest=function e(){return this.request||this.mediaRequest_};i.stopRequest=function e(){if(this.request){var t=this.request;this.request=null;t.onreadystatechange=null;t.abort()}};i.media=function e(t){var r=this;if(!t){return this.media_}if(this.state==="HAVE_NOTHING"){throw new Error("Cannot switch media playlist from "+this.state)}var i=this.state;if(typeof t==="string"){if(!this.masterPlaylistLoader_.master.playlists[t]){throw new Error("Unknown playlist URI: "+t)}t=this.masterPlaylistLoader_.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")}this.addSidxSegments_(t,i,function(e){r.haveMetadata({startingState:i,playlist:t})})};i.haveMetadata=function e(t){var r=t.startingState,i=t.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[i.id]=i;this.mediaRequest_=null;this.refreshMedia_(i.id);if(r==="HAVE_MASTER"){this.trigger("loadedmetadata")}else{this.trigger("mediachange")}};i.pause=function t(){if(this.masterPlaylistLoader_.createMupOnMedia_){this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_);this.masterPlaylistLoader_.createMupOnMedia_=null}this.stopRequest();e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;if(this.isMaster_){e.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_);this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null}if(this.state==="HAVE_NOTHING"){this.started=false}};i.load=function t(r){var i=this;e.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;var n=this.media();if(r){var a=n?n.targetDuration/2*1e3:5*1e3;this.mediaUpdateTimeout=e.setTimeout(function(){return i.load()},a);return}if(!this.started){this.start();return}if(n&&!n.endList){if(this.isMaster_&&!this.minimumUpdatePeriodTimeout_){this.trigger("minimumUpdatePeriod");this.updateMinimumUpdatePeriodTimeout_()}this.trigger("mediaupdatetimeout")}else{this.trigger("loadedplaylist")}};i.start=function t(){var r=this;this.started=true;if(!this.isMaster_){this.mediaRequest_=e.setTimeout(function(){return r.haveMaster_()},0);return}this.requestMaster_(function(e,t){r.haveMaster_();if(!r.hasPendingRequest()&&!r.media_){r.media(r.masterPlaylistLoader_.master.playlists[0])}})};i.requestMaster_=function e(t){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(e,i){if(r.requestErrored_(e,i)){if(r.state==="HAVE_NOTHING"){r.started=false}return}var n=i.responseText!==r.masterPlaylistLoader_.masterXml_;r.masterPlaylistLoader_.masterXml_=i.responseText;if(i.responseHeaders&&i.responseHeaders.date){r.masterLoaded_=Date.parse(i.responseHeaders.date)}else{r.masterLoaded_=Date.now()}r.masterPlaylistLoader_.srcUrl=m(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,i);if(n){r.handleMaster_();r.syncClientServerClock_(function(){return t(i,n)});return}return t(i,n)})};i.syncClientServerClock_=function e(t){var r=this;var i=ri(this.masterPlaylistLoader_.masterXml_);if(i===null){this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now();return t()}if(i.method==="DIRECT"){this.masterPlaylistLoader_.clientOffset_=i.value-Date.now();return t()}this.request=this.vhs_.xhr({uri:v(this.masterPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},function(e,n){if(!r.request){return}if(e){r.masterPlaylistLoader_.clientOffset_=r.masterLoaded_-Date.now();return t()}var a;if(i.method==="HEAD"){if(!n.responseHeaders||!n.responseHeaders.date){a=r.masterLoaded_}else{a=Date.parse(n.responseHeaders.date)}}else{a=Date.parse(n.responseText)}r.masterPlaylistLoader_.clientOffset_=a-Date.now();t()})};i.haveMaster_=function e(){this.state="HAVE_MASTER";if(this.isMaster_){this.trigger("loadedplaylist")}else if(!this.media_){this.media(this.childPlaylist_)}};i.handleMaster_=function e(){this.mediaRequest_=null;var t=this.masterPlaylistLoader_.master;var r=Vi({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:t});if(t){r=qi(t,r,this.masterPlaylistLoader_.sidxMapping_)}this.masterPlaylistLoader_.master=r?r:t;var i=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];if(i&&i!==this.masterPlaylistLoader_.srcUrl){this.masterPlaylistLoader_.srcUrl=i}if(!t||r&&r.minimumUpdatePeriod!==t.minimumUpdatePeriod){this.updateMinimumUpdatePeriodTimeout_()}return Boolean(r)};i.updateMinimumUpdatePeriodTimeout_=function t(){var r=this.masterPlaylistLoader_;if(r.createMupOnMedia_){r.off("loadedmetadata",r.createMupOnMedia_);r.createMupOnMedia_=null}if(r.minimumUpdatePeriodTimeout_){e.clearTimeout(r.minimumUpdatePeriodTimeout_);r.minimumUpdatePeriodTimeout_=null}var i=r.master&&r.master.minimumUpdatePeriod;if(i===0){if(r.media()){i=r.media().targetDuration*1e3}else{r.createMupOnMedia_=r.updateMinimumUpdatePeriodTimeout_;r.one("loadedmetadata",r.createMupOnMedia_)}}if(typeof i!=="number"||i<=0){if(i<0){this.logger_("found invalid minimumUpdatePeriod of "+i+", not setting a timeout")}return}this.createMUPTimeout_(i)};i.createMUPTimeout_=function t(r){var i=this.masterPlaylistLoader_;i.minimumUpdatePeriodTimeout_=e.setTimeout(function(){i.minimumUpdatePeriodTimeout_=null;i.trigger("minimumUpdatePeriod");i.createMUPTimeout_(r)},r)};i.refreshXml_=function e(){var t=this;this.requestMaster_(function(e,r){if(!r){return}if(t.media_){t.media_=t.masterPlaylistLoader_.master.playlists[t.media_.id]}t.masterPlaylistLoader_.sidxMapping_=Gi(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.sidxMapping_);t.addSidxSegments_(t.media(),t.state,function(e){t.refreshMedia_(t.media().id)})})};i.refreshMedia_=function t(r){var i=this;if(!r){throw new Error("refreshMedia_ must take a media id")}if(this.media_&&this.isMaster_){this.handleMaster_()}var n=this.masterPlaylistLoader_.master.playlists;var a=!this.media_||this.media_!==n[r];if(a){this.media_=n[r]}else{this.trigger("playlistunchanged")}if(!this.mediaUpdateTimeout){var s=function t(){if(i.media().endList){return}i.mediaUpdateTimeout=e.setTimeout(function(){i.trigger("mediaupdatetimeout");t()},ze(i.media(),Boolean(a)))};s()}this.trigger("loadedplaylist")};return r}(Bi);var Yi={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};var zi=function e(t){var r=new Uint8Array(new ArrayBuffer(t.length));for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r.buffer};var Xi=function e(t){t.on=t.addEventListener;t.off=t.removeEventListener;return t};var Qi=function e(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch(e){var r=new BlobBuilder;r.append(t);return URL.createObjectURL(r.getBlob())}};var $i=function e(t){return function(){var e=Qi(t);var r=Xi(new Worker(e));r.objURL=e;var i=r.terminate;r.on=r.addEventListener;r.off=r.removeEventListener;r.terminate=function(){URL.revokeObjectURL(e);return i.call(this)};return r}};var Ji=function e(t){return"var browserWorkerPolyFill = "+Xi.toString()+";\n"+"browserWorkerPolyFill(self);\n"+t};var Zi=function e(t){return t.toString().replace(/^function.+?{/,"").slice(0,-1)};var en=Ji(Zi(function(){var t=function e(){this.init=function(){var e={};this.on=function(t,r){if(!e[t]){e[t]=[]}e[t]=e[t].concat(r)};this.off=function(t,r){var i;if(!e[t]){return false}i=e[t].indexOf(r);e[t]=e[t].slice();e[t].splice(i,1);return i>-1};this.trigger=function(t){var r,i,n,a;r=e[t];if(!r){return}if(arguments.length===2){n=r.length;for(i=0;i<n;++i){r[i].call(this,arguments[1])}}else{a=[];i=arguments.length;for(i=1;i<arguments.length;++i){a.push(arguments[i])}n=r.length;for(i=0;i<n;++i){r[i].apply(this,a)}}};this.dispose=function(){e={}}}};t.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};t.prototype.push=function(e){this.trigger("data",e)};t.prototype.flush=function(e){this.trigger("done",e)};t.prototype.partialFlush=function(e){this.trigger("partialdone",e)};t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)};t.prototype.reset=function(e){this.trigger("reset",e)};var r=t;var i=Math.pow(2,32);var n=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength);var n;if(r.getBigUint64){n=r.getBigUint64(0);if(n<Number.MAX_SAFE_INTEGER){return Number(n)}return n}return r.getUint32(0)*i+r.getUint32(4)};var a={getUint64:n,MAX_UINT32:i};var s=a.MAX_UINT32;var o,u,l,d,c,f,h,p,v,m,g,y,_,b,T,S,E,I,C,k,w,A,P,O,x,D,L,R,N,M,U,B,F,j,V,q;(function(){var e;P={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 P){if(P.hasOwnProperty(e)){P[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]}}O=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);D=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);x=new Uint8Array([0,0,0,1]);L=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]);R=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]);N={video:L,audio:R};B=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);U=new Uint8Array([0,0,0,0,0,0,0,0]);F=new Uint8Array([0,0,0,0,0,0,0,0]);j=F;V=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);q=F;M=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})();o=function e(t){var r=[],i=0,n,a,s;for(n=1;n<arguments.length;n++){r.push(arguments[n])}n=r.length;while(n--){i+=r[n].byteLength}a=new Uint8Array(i+8);s=new DataView(a.buffer,a.byteOffset,a.byteLength);s.setUint32(0,a.byteLength);a.set(t,4);for(n=0,i=8;n<r.length;n++){a.set(r[n],i);i+=r[n].byteLength}return a};u=function e(){return o(P.dinf,o(P.dref,B))};l=function e(t){return o(P.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]))};d=function e(){return o(P.ftyp,O,x,O,D)};S=function e(t){return o(P.hdlr,N[t])};c=function e(t){return o(P.mdat,t)};T=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,t.duration&255,85,196,0,0]);if(t.samplerate){r[12]=t.samplerate>>>24&255;r[13]=t.samplerate>>>16&255;r[14]=t.samplerate>>>8&255;r[15]=t.samplerate&255}return o(P.mdhd,r)};b=function e(t){return o(P.mdia,T(t),S(t.type),h(t))};f=function e(t){return o(P.mfhd,new Uint8Array([0,0,0,0,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255]))};h=function e(t){return o(P.minf,t.type==="video"?o(P.vmhd,M):o(P.smhd,U),u(),I(t))};p=function e(t,r){var i=[],n=r.length;while(n--){i[n]=k(r[n])}return o.apply(null,[P.moof,f(t)].concat(i))};v=function e(t){var r=t.length,i=[];while(r--){i[r]=y(t[r])}return o.apply(null,[P.moov,g(4294967295)].concat(i).concat(m(t)))};m=function e(t){var r=t.length,i=[];while(r--){i[r]=w(t[r])}return o.apply(null,[P.mvex].concat(i))};g=function e(t){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o(P.mvhd,r)};E=function e(t){var r=t.samples||[],i=new Uint8Array(4+r.length),n,a;for(a=0;a<r.length;a++){n=r[a].flags;i[a+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy}return o(P.sdtp,i)};I=function e(t){return o(P.stbl,C(t),o(P.stts,q),o(P.stsc,j),o(P.stsz,V),o(P.stco,F))};(function(){var e,t;C=function r(i){return o(P.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),i.type==="video"?e(i):t(i))};e=function e(t){var r=t.sps||[],i=t.pps||[],n=[],a=[],s,u;for(s=0;s<r.length;s++){n.push((r[s].byteLength&65280)>>>8);n.push(r[s].byteLength&255);n=n.concat(Array.prototype.slice.call(r[s]))}for(s=0;s<i.length;s++){a.push((i[s].byteLength&65280)>>>8);a.push(i[s].byteLength&255);a=a.concat(Array.prototype.slice.call(i[s]))}u=[P.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]),o(P.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length],n,[i.length],a))),o(P.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))];if(t.sarRatio){var l=t.sarRatio[0],d=t.sarRatio[1];u.push(o(P.pasp,new Uint8Array([(l&4278190080)>>24,(l&16711680)>>16,(l&65280)>>8,l&255,(d&4278190080)>>24,(d&16711680)>>16,(d&65280)>>8,d&255])))}return o.apply(null,u)};t=function e(t){return o(P.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]),l(t))}})();_=function e(t){var r=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,0,(t.duration&4278190080)>>24,(t.duration&16711680)>>16,(t.duration&65280)>>8,t.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(t.width&65280)>>8,t.width&255,0,0,(t.height&65280)>>8,t.height&255,0,0]);return o(P.tkhd,r)};k=function e(t){var r,i,n,a,u,l,d;r=o(P.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]));l=Math.floor(t.baseMediaDecodeTime/s);d=Math.floor(t.baseMediaDecodeTime%s);i=o(P.tfdt,new Uint8Array([1,0,0,0,l>>>24&255,l>>>16&255,l>>>8&255,l&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255]));u=32+20+8+16+8+8;if(t.type==="audio"){n=A(t,u);return o(P.traf,r,i,n)}a=E(t);n=A(t,a.length+u);return o(P.traf,r,i,n,a)};y=function e(t){t.duration=t.duration||4294967295;return o(P.trak,_(t),b(t))};w=function e(t){var r=new Uint8Array([0,0,0,0,(t.id&4278190080)>>24,(t.id&16711680)>>16,(t.id&65280)>>8,t.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);if(t.type!=="video"){r[r.length-1]=0}return o(P.trex,r)};(function(){var e,t,r;r=function e(t,r){var i=0,n=0,a=0,s=0;if(t.length){if(t[0].duration!==undefined){i=1}if(t[0].size!==undefined){n=2}if(t[0].flags!==undefined){a=4}if(t[0].compositionTimeOffset!==undefined){s=8}}return[0,0,i|n|a|s,1,(t.length&4278190080)>>>24,(t.length&16711680)>>>16,(t.length&65280)>>>8,t.length&255,(r&4278190080)>>>24,(r&16711680)>>>16,(r&65280)>>>8,r&255]};t=function e(t,i){var n,a,s,u,l,d;u=t.samples||[];i+=8+12+16*u.length;s=r(u,i);a=new Uint8Array(s.length+u.length*16);a.set(s);n=s.length;for(d=0;d<u.length;d++){l=u[d];a[n++]=(l.duration&4278190080)>>>24;a[n++]=(l.duration&16711680)>>>16;a[n++]=(l.duration&65280)>>>8;a[n++]=l.duration&255;a[n++]=(l.size&4278190080)>>>24;a[n++]=(l.size&16711680)>>>16;a[n++]=(l.size&65280)>>>8;a[n++]=l.size&255;a[n++]=l.flags.isLeading<<2|l.flags.dependsOn;a[n++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample;a[n++]=l.flags.degradationPriority&240<<8;a[n++]=l.flags.degradationPriority&15;a[n++]=(l.compositionTimeOffset&4278190080)>>>24;a[n++]=(l.compositionTimeOffset&16711680)>>>16;a[n++]=(l.compositionTimeOffset&65280)>>>8;a[n++]=l.compositionTimeOffset&255}return o(P.trun,a)};e=function e(t,i){var n,a,s,u,l,d;u=t.samples||[];i+=8+12+8*u.length;s=r(u,i);n=new Uint8Array(s.length+u.length*8);n.set(s);a=s.length;for(d=0;d<u.length;d++){l=u[d];n[a++]=(l.duration&4278190080)>>>24;n[a++]=(l.duration&16711680)>>>16;n[a++]=(l.duration&65280)>>>8;n[a++]=l.duration&255;n[a++]=(l.size&4278190080)>>>24;n[a++]=(l.size&16711680)>>>16;n[a++]=(l.size&65280)>>>8;n[a++]=l.size&255}return o(P.trun,n)};A=function r(i,n){if(i.type==="audio"){return e(i,n)}return t(i,n)}})();var H={ftyp:d,mdat:c,moof:p,moov:v,initSegment:function e(t){var r=d(),i=v(t),n;n=new Uint8Array(r.byteLength+i.byteLength);n.set(r);n.set(i,r.byteLength);return n}};var W=function e(t){var r,i,n=[],a=[];a.byteLength=0;a.nalCount=0;a.duration=0;n.byteLength=0;for(r=0;r<t.length;r++){i=t[r];if(i.nalUnitType==="access_unit_delimiter_rbsp"){if(n.length){n.duration=i.dts-n.dts;a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n)}n=[i];n.byteLength=i.data.byteLength;n.pts=i.pts;n.dts=i.dts}else{if(i.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"){n.keyFrame=true}n.duration=i.dts-n.dts;n.byteLength+=i.data.byteLength;n.push(i)}}if(a.length&&(!n.duration||n.duration<=0)){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.length;a.duration+=n.duration;a.push(n);return a};var G=function e(t){var r,i,n=[],a=[];n.byteLength=0;n.nalCount=0;n.duration=0;n.pts=t[0].pts;n.dts=t[0].dts;a.byteLength=0;a.nalCount=0;a.duration=0;a.pts=t[0].pts;a.dts=t[0].dts;for(r=0;r<t.length;r++){i=t[r];if(i.keyFrame){if(n.length){a.push(n);a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration}n=[i];n.nalCount=i.length;n.byteLength=i.byteLength;n.pts=i.pts;n.dts=i.dts;n.duration=i.duration}else{n.duration+=i.duration;n.nalCount+=i.length;n.byteLength+=i.byteLength;n.push(i)}}if(a.length&&n.duration<=0){n.duration=a[a.length-1].duration}a.byteLength+=n.byteLength;a.nalCount+=n.nalCount;a.duration+=n.duration;a.push(n);return a};var K=function e(t){var r;if(!t[0][0].keyFrame&&t.length>1){r=t.shift();t.byteLength-=r.byteLength;t.nalCount-=r.nalCount;t[0][0].dts=r.dts;t[0][0].pts=r.pts;t[0][0].duration+=r.duration}return t};var Y=function e(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}};var z=function e(t,r){var i=Y();i.dataOffset=r;i.compositionTimeOffset=t.pts-t.dts;i.duration=t.duration;i.size=4*t.length;i.size+=t.byteLength;if(t.keyFrame){i.flags.dependsOn=2;i.flags.isNonSyncSample=0}return i};var X=function e(t,r){var i,n,a,s,o,u=r||0,l=[];for(i=0;i<t.length;i++){s=t[i];for(n=0;n<s.length;n++){o=s[n];a=z(o,u);u+=a.size;l.push(a)}}return l};var Q=function e(t){var r,i,n,a,s,o,u=0,l=t.byteLength,d=t.nalCount,c=l+4*d,f=new Uint8Array(c),h=new DataView(f.buffer);for(r=0;r<t.length;r++){a=t[r];for(i=0;i<a.length;i++){s=a[i];for(n=0;n<s.length;n++){o=s[n];h.setUint32(u,o.data.byteLength);u+=4;f.set(o.data,u);u+=o.data.byteLength}}}return f};var $=function e(t,r){var i,n=r||0,a=[];i=z(t,n);a.push(i);return a};var J=function e(t){var r,i,n=0,a=t.byteLength,s=t.length,o=a+4*s,u=new Uint8Array(o),l=new DataView(u.buffer);for(r=0;r<t.length;r++){i=t[r];l.setUint32(n,i.data.byteLength);n+=4;u.set(i.data,n);n+=i.data.byteLength}return u};var Z={groupNalsIntoFrames:W,groupFramesIntoGops:G,extendFirstKeyFrame:K,generateSampleTable:X,concatenateNalData:Q,generateSampleTableForFrame:$,concatenateNalDataForFrame:J};var ee=[33,16,5,32,164,27];var te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var re=function e(t){var r=[];while(t--){r.push(0)}return r};var ie=function e(t){return Object.keys(t).reduce(function(e,r){e[r]=new Uint8Array(t[r].reduce(function(e,t){return e.concat(t)},[]));return e},{})};var ne;var ae=function e(){if(!ne){var t={96000:[ee,[227,64],re(154),[56]],88200:[ee,[231],re(170),[56]],64000:[ee,[248,192],re(240),[56]],48000:[ee,[255,192],re(268),[55,148,128],re(54),[112]],44100:[ee,[255,192],re(268),[55,163,128],re(84),[112]],32000:[ee,[255,192],re(268),[55,234],re(226),[112]],24000:[ee,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16000:[ee,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12000:[te,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[te,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8000:[te,re(268),[3,121,16],re(47),[7]]};ne=ie(t)}return ne};var se=9e4,oe,ue,le,de,ce,fe,he;oe=function e(t){return t*se};ue=function e(t,r){return t*r};le=function e(t){return t/se};de=function e(t,r){return t/r};ce=function e(t,r){return oe(de(t,r))};fe=function e(t,r){return ue(le(t),r)};he=function e(t,r,i){return le(i?t:t-r)};var pe={ONE_SECOND_IN_TS:se,secondsToVideoTs:oe,secondsToAudioTs:ue,videoTsToSeconds:le,audioTsToSeconds:de,audioTsToVideoTs:ce,videoTsToAudioTs:fe,metadataTsToSeconds:he};var ve=function e(t){var r,i,n=0;for(r=0;r<t.length;r++){i=t[r];n+=i.data.byteLength}return n};var me=function e(t,r,i,n){var a,s=0,o=0,u=0,l=0,d,c,f;if(!r.length){return}a=pe.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate);s=Math.ceil(pe.ONE_SECOND_IN_TS/(t.samplerate/1024));if(i&&n){o=a-Math.max(i,n);u=Math.floor(o/s);l=u*s}if(u<1||l>pe.ONE_SECOND_IN_TS/2){return}d=ae()[t.samplerate];if(!d){d=r[0].data}for(c=0;c<u;c++){f=r[0];r.splice(0,0,{data:d,dts:f.dts-s,pts:f.pts-s})}t.baseMediaDecodeTime-=Math.floor(pe.videoTsToAudioTs(l,t.samplerate));return l};var ge=function e(t,r,i){if(r.minSegmentDts>=i){return t}r.minSegmentDts=Infinity;return t.filter(function(e){if(e.dts>=i){r.minSegmentDts=Math.min(r.minSegmentDts,e.dts);r.minSegmentPts=r.minSegmentDts;return true}return false})};var ye=function e(t){var r,i,n=[];for(r=0;r<t.length;r++){i=t[r];n.push({size:i.data.byteLength,duration:1024})}return n};var _e=function e(t){var r,i,n=0,a=new Uint8Array(ve(t));for(r=0;r<t.length;r++){i=t[r];a.set(i.data,n);n+=i.data.byteLength}return a};var be={prefixWithSilence:me,trimAdtsFramesByEarliestDts:ge,generateSampleTable:ye,concatenateFrameData:_e};var Te=pe.ONE_SECOND_IN_TS;var Se=function e(t,r){if(typeof r.pts==="number"){if(t.timelineStartInfo.pts===undefined){t.timelineStartInfo.pts=r.pts}if(t.minSegmentPts===undefined){t.minSegmentPts=r.pts}else{t.minSegmentPts=Math.min(t.minSegmentPts,r.pts)}if(t.maxSegmentPts===undefined){t.maxSegmentPts=r.pts}else{t.maxSegmentPts=Math.max(t.maxSegmentPts,r.pts)}}if(typeof r.dts==="number"){if(t.timelineStartInfo.dts===undefined){t.timelineStartInfo.dts=r.dts}if(t.minSegmentDts===undefined){t.minSegmentDts=r.dts}else{t.minSegmentDts=Math.min(t.minSegmentDts,r.dts)}if(t.maxSegmentDts===undefined){t.maxSegmentDts=r.dts}else{t.maxSegmentDts=Math.max(t.maxSegmentDts,r.dts)}}};var Ee=function e(t){delete t.minSegmentDts;delete t.maxSegmentDts;delete t.minSegmentPts;delete t.maxSegmentPts};var Ie=function e(t,r){var i,n,a=t.minSegmentDts;if(!r){a-=t.timelineStartInfo.dts}i=t.timelineStartInfo.baseMediaDecodeTime;i+=a;i=Math.max(0,i);if(t.type==="audio"){n=t.samplerate/Te;i*=n;i=Math.floor(i)}return i};var Ce={clearDtsInfo:Ee,calculateTrackBaseMediaDecodeTime:Ie,collectDtsInfo:Se};var ke=4,we=128;var Ae=function e(t){var r=0,i={payloadType:-1,payloadSize:0},n=0,a=0;while(r<t.byteLength){if(t[r]===we){break}while(t[r]===255){n+=255;r++}n+=t[r++];while(t[r]===255){a+=255;r++}a+=t[r++];if(!i.payload&&n===ke){var s=String.fromCharCode(t[r+3],t[r+4],t[r+5],t[r+6]);if(s==="GA94"){i.payloadType=n;i.payloadSize=a;i.payload=t.subarray(r,r+a);break}else{i.payload=void 0}}r+=a;n=0;a=0}return i};var Pe=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 Oe=function e(t,r){var i=[],n,a,s,o;if(!(r[0]&64)){return i}a=r[0]&31;for(n=0;n<a;n++){s=n*3;o={type:r[s+2]&3,pts:t};if(r[s+2]&4){o.ccData=r[s+3]<<8|r[s+4];i.push(o)}}return i};var xe=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};var De={parseSei:Ae,parseUserData:Pe,parseCaptionPackets:Oe,discardEmulationPreventionBytes:xe,USER_DATA_REGISTERED_ITU_T_T35:ke};var Le=function e(t){t=t||{};e.prototype.init.call(this);this.parse708captions_=typeof t.parse708captions==="boolean"?t.parse708captions:true;this.captionPackets_=[];this.ccStreams_=[new Ge(0,0),new Ge(0,1),new Ge(1,0),new Ge(1,1)];if(this.parse708captions_){this.cc708Stream_=new Fe({captionServices:t.captionServices})}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);if(this.parse708captions_){this.cc708Stream_.on("data",this.trigger.bind(this,"data"));this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone"));this.cc708Stream_.on("done",this.trigger.bind(this,"done"))}};Le.prototype=new r;Le.prototype.push=function(e){var t,r,i;if(e.nalUnitType!=="sei_rbsp"){return}t=De.parseSei(e.escapedRBSP);if(!t.payload){return}if(t.payloadType!==De.USER_DATA_REGISTERED_ITU_T_T35){return}r=De.parseUserData(t);if(!r){return}if(e.dts<this.latestDts_){this.ignoreNextEqualDts_=true;return}else if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;if(!this.numSameDts_){this.ignoreNextEqualDts_=false}return}i=De.parseCaptionPackets(e.pts,r);this.captionPackets_=this.captionPackets_.concat(i);if(this.latestDts_!==e.dts){this.numSameDts_=0}this.numSameDts_++;this.latestDts_=e.dts};Le.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return e==="flush"?t.flush():t.partialFlush()},this)};Le.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)}else{this.dispatchCea708Packet(e)}},this);this.captionPackets_.length=0;this.flushCCStreams(e)};Le.prototype.flush=function(){return this.flushStream("flush")};Le.prototype.partialFlush=function(){return this.flushStream("partialFlush")};Le.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=false;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(e){e.reset()})};Le.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)};Le.prototype.setsChannel1Active=function(e){return(e.ccData&30720)===4096};Le.prototype.setsChannel2Active=function(e){return(e.ccData&30720)===6144};Le.prototype.setsTextOrXDSActive=function(e){return(e.ccData&28928)===256||(e.ccData&30974)===4138||(e.ccData&30974)===6186};Le.prototype.dispatchCea708Packet=function(e){if(this.parse708captions_){this.cc708Stream_.push(e)}};var Re={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600};var Ne=function e(t){var r=Re[t]||t;if(t&4096&&t===r){return""}return String.fromCharCode(r)};var Me=function e(t){return 32<=t&&t<=127||160<=t&&t<=255};var Ue=function e(t){this.windowNum=t;this.reset()};Ue.prototype.reset=function(){this.clearText();this.pendingNewLine=false;this.winAttr={};this.penAttr={};this.penLoc={};this.penColor={};this.visible=0;this.rowLock=0;this.columnLock=0;this.priority=0;this.relativePositioning=0;this.anchorVertical=0;this.anchorHorizontal=0;this.anchorPoint=0;this.rowCount=1;this.virtualRowCount=this.rowCount+1;this.columnCount=41;this.windowStyle=0;this.penStyle=0};Ue.prototype.getText=function(){return this.rows.join("\n")};Ue.prototype.clearText=function(){this.rows=[""];this.rowIdx=0};Ue.prototype.newLine=function(e){if(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow==="function"){this.beforeRowOverflow(e)}if(this.rows.length>0){this.rows.push("");this.rowIdx++}while(this.rows.length>this.virtualRowCount){this.rows.shift();this.rowIdx--}};Ue.prototype.isEmpty=function(){if(this.rows.length===0){return true}else if(this.rows.length===1){return this.rows[0]===""}return false};Ue.prototype.addText=function(e){this.rows[this.rowIdx]+=e};Ue.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Be=function e(t,r,i){this.serviceNum=t;this.text="";this.currentWindow=new Ue(-1);this.windows=[];this.stream=i;if(typeof r==="string"){this.createTextDecoder(r)}};Be.prototype.init=function(e,t){this.startPts=e;for(var r=0;r<8;r++){this.windows[r]=new Ue(r);if(typeof t==="function"){this.windows[r].beforeRowOverflow=t}}};Be.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};Be.prototype.createTextDecoder=function(e){if(typeof TextDecoder==="undefined"){this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"})}else{try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}}};var Fe=function e(t){t=t||{};e.prototype.init.call(this);var r=this;var i=t.captionServices||{};var n={};var a;Object.keys(i).forEach(function(e){a=i[e];if(/^SERVICE/.test(e)){n[e]=a.encoding}});this.serviceEncodings=n;this.current708Packet=null;this.services={};this.push=function(e){if(e.type===3){r.new708Packet();r.add708Bytes(e)}else{if(r.current708Packet===null){r.new708Packet()}r.add708Bytes(e)}}};Fe.prototype=new r;Fe.prototype.new708Packet=function(){if(this.current708Packet!==null){this.push708Packet()}this.current708Packet={data:[],ptsVals:[]}};Fe.prototype.add708Bytes=function(e){var t=e.ccData;var r=t>>>8;var i=t&255;this.current708Packet.ptsVals.push(e.pts);this.current708Packet.data.push(r);this.current708Packet.data.push(i)};Fe.prototype.push708Packet=function(){var e=this.current708Packet;var t=e.data;var r=null;var i=null;var n=0;var a=t[n++];e.seq=a>>6;e.sizeCode=a&63;for(;n<t.length;n++){a=t[n++];r=a>>5;i=a&31;if(r===7&&i>0){a=t[n++];r=a}this.pushServiceBlock(r,n,i);if(i>0){n+=i-1}}};Fe.prototype.pushServiceBlock=function(e,t,r){var i;var n=t;var a=this.current708Packet.data;var s=this.services[e];if(!s){s=this.initService(e,n)}for(;n<t+r&&n<a.length;n++){i=a[n];if(Me(i)){n=this.handleText(n,s)}else if(i===24){n=this.multiByteCharacter(n,s)}else if(i===16){n=this.extendedCommands(n,s)}else if(128<=i&&i<=135){n=this.setCurrentWindow(n,s)}else if(152<=i&&i<=159){n=this.defineWindow(n,s)}else if(i===136){n=this.clearWindows(n,s)}else if(i===140){n=this.deleteWindows(n,s)}else if(i===137){n=this.displayWindows(n,s)}else if(i===138){n=this.hideWindows(n,s)}else if(i===139){n=this.toggleWindows(n,s)}else if(i===151){n=this.setWindowAttributes(n,s)}else if(i===144){n=this.setPenAttributes(n,s)}else if(i===145){n=this.setPenColor(n,s)}else if(i===146){n=this.setPenLocation(n,s)}else if(i===143){s=this.reset(n,s)}else if(i===8){s.currentWindow.backspace()}else if(i===12){s.currentWindow.clearText()}else if(i===13){s.currentWindow.pendingNewLine=true}else if(i===14){s.currentWindow.clearText()}else if(i===141){n++}else;}};Fe.prototype.extendedCommands=function(e,t){var r=this.current708Packet.data;var i=r[++e];if(Me(i)){e=this.handleText(e,t,{isExtended:true})}return e};Fe.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]};Fe.prototype.initService=function(e,t){var r="SERVICE"+e;var i=this;var r;var n;if(r in this.serviceEncodings){n=this.serviceEncodings[r]}this.services[e]=new Be(e,n,i);this.services[e].init(this.getPts(t),function(t){i.flushDisplayed(t,i.services[e])});return this.services[e]};Fe.prototype.handleText=function(e,t,r){var i=r&&r.isExtended;var n=r&&r.isMultiByte;var a=this.current708Packet.data;var s=i?4096:0;var o=a[e];var u=a[e+1];var l=t.currentWindow;var d;var c;if(t.textDecoder_&&!i){if(n){c=[o,u];e++}else{c=[o]}d=t.textDecoder_.decode(new Uint8Array(c))}else{d=Ne(s|o)}if(l.pendingNewLine&&!l.isEmpty()){l.newLine(this.getPts(e))}l.pendingNewLine=false;l.addText(d);return e};Fe.prototype.multiByteCharacter=function(e,t){var r=this.current708Packet.data;var i=r[e+1];var n=r[e+2];if(Me(i)&&Me(n)){e=this.handleText(++e,t,{isMultiByte:true})}return e};Fe.prototype.setCurrentWindow=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=i&7;t.setCurrentWindow(n);return e};Fe.prototype.defineWindow=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=i&7;t.setCurrentWindow(n);var a=t.currentWindow;i=r[++e];a.visible=(i&32)>>5;a.rowLock=(i&16)>>4;a.columnLock=(i&8)>>3;a.priority=i&7;i=r[++e];a.relativePositioning=(i&128)>>7;a.anchorVertical=i&127;i=r[++e];a.anchorHorizontal=i;i=r[++e];a.anchorPoint=(i&240)>>4;a.rowCount=i&15;i=r[++e];a.columnCount=i&63;i=r[++e];a.windowStyle=(i&56)>>3;a.penStyle=i&7;a.virtualRowCount=a.rowCount+1;return e};Fe.prototype.setWindowAttributes=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=t.currentWindow.winAttr;i=r[++e];n.fillOpacity=(i&192)>>6;n.fillRed=(i&48)>>4;n.fillGreen=(i&12)>>2;n.fillBlue=i&3;i=r[++e];n.borderType=(i&192)>>6;n.borderRed=(i&48)>>4;n.borderGreen=(i&12)>>2;n.borderBlue=i&3;i=r[++e];n.borderType+=(i&128)>>5;n.wordWrap=(i&64)>>6;n.printDirection=(i&48)>>4;n.scrollDirection=(i&12)>>2;n.justify=i&3;i=r[++e];n.effectSpeed=(i&240)>>4;n.effectDirection=(i&12)>>2;n.displayEffect=i&3;return e};Fe.prototype.flushDisplayed=function(e,t){var r=[];for(var i=0;i<8;i++){if(t.windows[i].visible&&!t.windows[i].isEmpty()){r.push(t.windows[i].getText())}}t.endPts=e;t.text=r.join("\n\n");this.pushCaption(t);t.startPts=e};Fe.prototype.pushCaption=function(e){if(e.text!==""){this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum});e.text="";e.startPts=e.endPts}};Fe.prototype.displayWindows=function(e,t){var r=this.current708Packet.data;var i=r[++e];var n=this.getPts(e);this.flushDisplayed(n,t);for(var a=0;a<8;a++){if(i&1<<a){t.windows[a].visible=1}}return e};Fe.prototype.hideWindows=function(e,t){var r=this.current708Packet.data;var i=r[++e];var n=this.getPts(e);this.flushDisplayed(n,t);for(var a=0;a<8;a++){if(i&1<<a){t.windows[a].visible=0}}return e};Fe.prototype.toggleWindows=function(e,t){var r=this.current708Packet.data;var i=r[++e];var n=this.getPts(e);this.flushDisplayed(n,t);for(var a=0;a<8;a++){if(i&1<<a){t.windows[a].visible^=1}}return e};Fe.prototype.clearWindows=function(e,t){var r=this.current708Packet.data;var i=r[++e];var n=this.getPts(e);this.flushDisplayed(n,t);for(var a=0;a<8;a++){if(i&1<<a){t.windows[a].clearText()}}return e};Fe.prototype.deleteWindows=function(e,t){var r=this.current708Packet.data;var i=r[++e];var n=this.getPts(e);this.flushDisplayed(n,t);for(var a=0;a<8;a++){if(i&1<<a){t.windows[a].reset()}}return e};Fe.prototype.setPenAttributes=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=t.currentWindow.penAttr;i=r[++e];n.textTag=(i&240)>>4;n.offset=(i&12)>>2;n.penSize=i&3;i=r[++e];n.italics=(i&128)>>7;n.underline=(i&64)>>6;n.edgeType=(i&56)>>3;n.fontStyle=i&7;return e};Fe.prototype.setPenColor=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=t.currentWindow.penColor;i=r[++e];n.fgOpacity=(i&192)>>6;n.fgRed=(i&48)>>4;n.fgGreen=(i&12)>>2;n.fgBlue=i&3;i=r[++e];n.bgOpacity=(i&192)>>6;n.bgRed=(i&48)>>4;n.bgGreen=(i&12)>>2;n.bgBlue=i&3;i=r[++e];n.edgeRed=(i&48)>>4;n.edgeGreen=(i&12)>>2;n.edgeBlue=i&3;return e};Fe.prototype.setPenLocation=function(e,t){var r=this.current708Packet.data;var i=r[e];var n=t.currentWindow.penLoc;t.currentWindow.pendingNewLine=true;i=r[++e];n.row=i&15;i=r[++e];n.column=i&63;return e};Fe.prototype.reset=function(e,t){var r=this.getPts(e);this.flushDisplayed(r,t);return this.initService(t.serviceNum,e)};var je={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 Ve=function e(t){if(t===null){return""}t=je[t]||t;return String.fromCharCode(t)};var qe=14;var He=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152];var We=function e(){var t=[],r=qe+1;while(r--){t.push("")}return t};var Ge=function e(t,r){e.prototype.init.call(this);this.field_=t||0;this.dataChannel_=r||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(e){var t,r,i,n,a;t=e.ccData&32639;if(t===this.lastControlCode_){this.lastControlCode_=null;return}if((t&61440)===4096){this.lastControlCode_=t}else if(t!==this.PADDING_){this.lastControlCode_=null}i=t>>>8;n=t&255;if(t===this.PADDING_){return}else if(t===this.RESUME_CAPTION_LOADING_){this.mode_="popOn"}else if(t===this.END_OF_CAPTION_){this.mode_="popOn";this.clearFormatting(e.pts);this.flushDisplayed(e.pts);r=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=r;this.startPts_=e.pts}else if(t===this.ROLL_UP_2_ROWS_){this.rollUpRows_=2;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_3_ROWS_){this.rollUpRows_=3;this.setRollUp(e.pts)}else if(t===this.ROLL_UP_4_ROWS_){this.rollUpRows_=4;this.setRollUp(e.pts)}else if(t===this.CARRIAGE_RETURN_){this.clearFormatting(e.pts);this.flushDisplayed(e.pts);this.shiftRowsUp_();this.startPts_=e.pts}else if(t===this.BACKSPACE_){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}}else if(t===this.ERASE_DISPLAYED_MEMORY_){this.flushDisplayed(e.pts);this.displayed_=We()}else if(t===this.ERASE_NON_DISPLAYED_MEMORY_){this.nonDisplayed_=We()}else if(t===this.RESUME_DIRECT_CAPTIONING_){if(this.mode_!=="paintOn"){this.flushDisplayed(e.pts);this.displayed_=We()}this.mode_="paintOn";this.startPts_=e.pts}else if(this.isSpecialCharacter(i,n)){i=(i&3)<<8;a=Ve(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isExtCharacter(i,n)){if(this.mode_==="popOn"){this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1)}else{this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1)}i=(i&3)<<8;a=Ve(i|n);this[this.mode_](e.pts,a);this.column_++}else if(this.isMidRowCode(i,n)){this.clearFormatting(e.pts);this[this.mode_](e.pts," ");this.column_++;if((n&14)===14){this.addFormatting(e.pts,["i"])}if((n&1)===1){this.addFormatting(e.pts,["u"])}}else if(this.isOffsetControlCode(i,n)){this.column_+=n&3}else if(this.isPAC(i,n)){var s=He.indexOf(t&7968);if(this.mode_==="rollUp"){if(s-this.rollUpRows_+1<0){s=this.rollUpRows_-1}this.setRollUp(e.pts,s)}if(s!==this.row_){this.clearFormatting(e.pts);this.row_=s}if(n&1&&this.formatting_.indexOf("u")===-1){this.addFormatting(e.pts,["u"])}if((t&16)===16){this.column_=((t&14)>>1)*4}if(this.isColorPAC(n)){if((n&14)===14){this.addFormatting(e.pts,["i"])}}}else if(this.isNormalChar(i)){if(n===0){n=null}a=Ve(i);a+=Ve(n);this[this.mode_](e.pts,a);this.column_+=a.length}}};Ge.prototype=new r;Ge.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e,t){try{return e.trim()}catch(e){this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."});return""}},this).join("\n").replace(/^\n+|\n+$/g,"");if(t.length){this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})}};Ge.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=We();this.nonDisplayed_=We();this.lastControlCode_=null;this.column_=0;this.row_=qe;this.rollUpRows_=2;this.formatting_=[]};Ge.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};Ge.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63};Ge.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63};Ge.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47};Ge.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35};Ge.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127};Ge.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127};Ge.prototype.isNormalChar=function(e){return e>=32&&e<=127};Ge.prototype.setRollUp=function(e,t){if(this.mode_!=="rollUp"){this.row_=qe;this.mode_="rollUp";this.flushDisplayed(e);this.nonDisplayed_=We();this.displayed_=We()}if(t!==undefined&&t!==this.row_){for(var r=0;r<this.rollUpRows_;r++){this.displayed_[t-r]=this.displayed_[this.row_-r];this.displayed_[this.row_-r]=""}}if(t===undefined){t=this.row_}this.topRow_=t-this.rollUpRows_+1};Ge.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var r=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,r)};Ge.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)};Ge.prototype.popOn=function(e,t){var r=this.nonDisplayed_[this.row_];r+=t;this.nonDisplayed_[this.row_]=r};Ge.prototype.rollUp=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};Ge.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++){this.displayed_[e]=""}for(e=this.row_+1;e<qe+1;e++){this.displayed_[e]=""}for(e=this.topRow_;e<this.row_;e++){this.displayed_[e]=this.displayed_[e+1]}this.displayed_[this.row_]=""};Ge.prototype.paintOn=function(e,t){var r=this.displayed_[this.row_];r+=t;this.displayed_[this.row_]=r};var Ke={CaptionStream:Le,Cea608Stream:Ge,Cea708Stream:Fe};var Ye={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};var ze=8589934592;var Xe=4294967296;var Qe="shared";var $e=function e(t,r){var i=1;if(t>r){i=-1}while(Math.abs(r-t)>Xe){t+=i*ze}return t};var Je=function e(t){var r,i;e.prototype.init.call(this);this.type_=t||Qe;this.push=function(e){if(this.type_!==Qe&&e.type!==this.type_){return}if(i===undefined){i=e.dts}e.dts=$e(e.dts,i);e.pts=$e(e.pts,i);r=e.dts;this.trigger("data",e)};this.flush=function(){i=r;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){i=void 0;r=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};Je.prototype=new r;var Ze={TimestampRolloverStream:Je,handleRollover:$e};var et=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a},tt=function e(t,r,i){return decodeURIComponent(et(t,r,i))},rt=function e(t,r,i){return unescape(et(t,r,i))},it=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},nt={TXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=tt(t.data,1,r);t.value=tt(t.data,r+1,t.data.length).replace(/\0*$/,"");break}}t.data=t.value},WXXX:function e(t){var r;if(t.data[0]!==3){return}for(r=1;r<t.data.length;r++){if(t.data[r]===0){t.description=tt(t.data,1,r);t.url=tt(t.data,r+1,t.data.length);break}}},PRIV:function e(t){var r;for(r=0;r<t.data.length;r++){if(t.data[r]===0){t.owner=rt(t.data,0,r);break}}t.privateData=t.data.subarray(r+1);t.data=t.privateData}},at;at=function e(t){var r={descriptor:t&&t.descriptor},i=0,n=[],a=0,s;at.prototype.init.call(this);this.dispatchType=Ye.METADATA_STREAM_TYPE.toString(16);if(r.descriptor){for(s=0;s<r.descriptor.length;s++){this.dispatchType+=("00"+r.descriptor[s].toString(16)).slice(-2)}}this.push=function(e){var t,r,s,o,u,l;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))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}n.push(e);a+=e.data.byteLength;if(n.length===1){i=it(e.data.subarray(6,10));i+=10}if(a<i){return}t={data:new Uint8Array(i),frames:[],pts:n[0].pts,dts:n[0].dts};for(u=0;u<i;){t.data.set(n[0].data.subarray(0,i-u),u);u+=n[0].data.byteLength;a-=n[0].data.byteLength;n.shift()}r=10;if(t.data[5]&64){r+=4;r+=it(t.data.subarray(10,14));i-=it(t.data.subarray(16,20))}do{s=it(t.data.subarray(r+4,r+8));if(s<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});return}l=String.fromCharCode(t.data[r],t.data[r+1],t.data[r+2],t.data[r+3]);o={id:l,data:t.data.subarray(r+10,r+s+10)};o.key=o.id;if(nt[o.id]){nt[o.id](o);if(o.owner==="com.apple.streaming.transportStreamTimestamp"){var d=o.data,c=(d[3]&1)<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;c*=4;c+=d[7]&3;o.timeStamp=c;if(t.pts===undefined&&t.dts===undefined){t.pts=o.timeStamp;t.dts=o.timeStamp}this.trigger("timestamp",o)}}t.frames.push(o);r+=10;r+=s}while(r<i);this.trigger("data",t)}};at.prototype=new r;var st=at;var ot=Ze.TimestampRolloverStream;var ut,lt,dt;var ct=188,ft=71;ut=function e(){var t=new Uint8Array(ct),r=0;ut.prototype.init.call(this);this.push=function(e){var i=0,n=ct,a;if(r){a=new Uint8Array(e.byteLength+r);a.set(t.subarray(0,r));a.set(e,r);r=0}else{a=e}while(n<a.byteLength){if(a[i]===ft&&a[n]===ft){this.trigger("data",a.subarray(i,n));i+=ct;n+=ct;continue}i++;n++}if(i<a.byteLength){t.set(a.subarray(i),0);r=a.byteLength-i}};this.flush=function(){if(r===ct&&t[0]===ft){this.trigger("data",t);r=0}this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.reset=function(){r=0;this.trigger("reset")}};ut.prototype=new r;lt=function e(){var t,r,i,n;lt.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function e(t,n){var a=0;if(n.payloadUnitStartIndicator){a+=t[a]+1}if(n.type==="pat"){r(t.subarray(a),n)}else{i(t.subarray(a),n)}};r=function e(t,r){r.section_number=t[7];r.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];r.pmtPid=n.pmtPid};i=function e(t,r){var i,a,s,o;if(!(t[5]&1)){return}n.programMapTable={video:null,audio:null,"timed-metadata":{}};i=(t[1]&15)<<8|t[2];a=3+i-4;s=(t[10]&15)<<8|t[11];o=12+s;while(o<a){var u=t[o];var l=(t[o+1]&31)<<8|t[o+2];if(u===Ye.H264_STREAM_TYPE&&n.programMapTable.video===null){n.programMapTable.video=l}else if(u===Ye.ADTS_STREAM_TYPE&&n.programMapTable.audio===null){n.programMapTable.audio=l}else if(u===Ye.METADATA_STREAM_TYPE){n.programMapTable["timed-metadata"][l]=u}o+=((t[o+3]&15)<<8|t[o+4])+5}r.programMapTable=n.programMapTable};this.push=function(e){var r={},i=4;r.payloadUnitStartIndicator=!!(e[1]&64);r.pid=e[1]&31;r.pid<<=8;r.pid|=e[2];if((e[3]&48)>>>4>1){i+=e[i]+1}if(r.pid===0){r.type="pat";t(e.subarray(i),r);this.trigger("data",r)}else if(r.pid===this.pmtPid){r.type="pmt";t(e.subarray(i),r);this.trigger("data",r);while(this.packetsWaitingForPmt.length){this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}}else if(this.programMapTable===undefined){this.packetsWaitingForPmt.push([e,i,r])}else{this.processPes_(e,i,r)}};this.processPes_=function(e,t,r){if(r.pid===this.programMapTable.video){r.streamType=Ye.H264_STREAM_TYPE}else if(r.pid===this.programMapTable.audio){r.streamType=Ye.ADTS_STREAM_TYPE}else{r.streamType=this.programMapTable["timed-metadata"][r.pid]}r.type="pes";r.data=e.subarray(t);this.trigger("data",r)}};lt.prototype=new r;lt.STREAM_TYPES={h264:27,adts:15};dt=function e(){var t=this,r=false,i={data:[],size:0},n={data:[],size:0},a={data:[],size:0},s,o=function e(t,r){var i;var n=t[0]<<16|t[1]<<8|t[2];r.data=new Uint8Array;if(n!==1){return}r.packetLength=6+(t[4]<<8|t[5]);r.dataAlignmentIndicator=(t[6]&4)!==0;i=t[7];if(i&192){r.pts=(t[9]&14)<<27|(t[10]&255)<<20|(t[11]&254)<<12|(t[12]&255)<<5|(t[13]&254)>>>3;r.pts*=4;r.pts+=(t[13]&6)>>>1;r.dts=r.pts;if(i&64){r.dts=(t[14]&14)<<27|(t[15]&255)<<20|(t[16]&254)<<12|(t[17]&255)<<5|(t[18]&254)>>>3;r.dts*=4;r.dts+=(t[18]&6)>>>1}}r.data=t.subarray(9+t[8])},u=function e(r,i,n){var a=new Uint8Array(r.size),s={type:i},u=0,l=0,d=false,c;if(!r.data.length||r.size<9){return}s.trackId=r.data[0].pid;for(u=0;u<r.data.length;u++){c=r.data[u];a.set(c.data,l);l+=c.data.byteLength}o(a,s);d=i==="video"||s.packetLength<=r.size;if(n||d){r.size=0;r.data.length=0}if(d){t.trigger("data",s)}};dt.prototype.init.call(this);this.push=function(e){({pat:function e(){},pes:function t(){var r,s;switch(e.streamType){case Ye.H264_STREAM_TYPE:r=i;s="video";break;case Ye.ADTS_STREAM_TYPE:r=n;s="audio";break;case Ye.METADATA_STREAM_TYPE:r=a;s="timed-metadata";break;default:return}if(e.payloadUnitStartIndicator){u(r,s,true)}r.data.push(e);r.size+=e.data.byteLength},pmt:function i(){var n={type:"metadata",tracks:[]};s=e.programMapTable;if(s.video!==null){n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+s.video,codec:"avc",type:"video"})}if(s.audio!==null){n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+s.audio,codec:"adts",type:"audio"})}r=true;t.trigger("data",n)}})[e.type]()};this.reset=function(){i.size=0;i.data.length=0;n.size=0;n.data.length=0;this.trigger("reset")};this.flushStreams_=function(){u(i,"video");u(n,"audio");u(a,"timed-metadata")};this.flush=function(){if(!r&&s){var e={type:"metadata",tracks:[]};if(s.video!==null){e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+s.video,codec:"avc",type:"video"})}if(s.audio!==null){e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+s.audio,codec:"adts",type:"audio"})}t.trigger("data",e)}r=false;this.flushStreams_();this.trigger("done")}};dt.prototype=new r;var ht={PAT_PID:0,MP2T_PACKET_LENGTH:ct,TransportPacketStream:ut,TransportParseStream:lt,ElementaryStream:dt,TimestampRolloverStream:ot,CaptionStream:Ke.CaptionStream,Cea608Stream:Ke.Cea608Stream,Cea708Stream:Ke.Cea708Stream,MetadataStream:st};for(var pt in Ye){if(Ye.hasOwnProperty(pt)){ht[pt]=Ye[pt]}}var vt=ht;var mt=pe.ONE_SECOND_IN_TS;var gt;var yt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];gt=function e(t){var r,i=0;gt.prototype.init.call(this);this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+i+" outside syncword"})};this.push=function(e){var n=0,a,s,o,u,l;if(!t){i=0}if(e.type!=="audio"){return}if(r&&r.length){o=r;r=new Uint8Array(o.byteLength+e.data.byteLength);r.set(o);r.set(e.data,o.byteLength)}else{r=e.data}var d;while(n+7<r.length){if(r[n]!==255||(r[n+1]&246)!==240){if(typeof d!=="number"){d=n}n++;continue}if(typeof d==="number"){this.skipWarn_(d,n);d=null}s=(~r[n+1]&1)*2;a=(r[n+3]&3)<<11|r[n+4]<<3|(r[n+5]&224)>>5;u=((r[n+6]&3)+1)*1024;l=u*mt/yt[(r[n+2]&60)>>>2];if(r.byteLength-n<a){break}this.trigger("data",{pts:e.pts+i*l,dts:e.dts+i*l,sampleCount:u,audioobjecttype:(r[n+2]>>>6&3)+1,channelcount:(r[n+2]&1)<<2|(r[n+3]&192)>>>6,samplerate:yt[(r[n+2]&60)>>>2],samplingfrequencyindex:(r[n+2]&60)>>>2,samplesize:16,data:r.subarray(n+7+s,n+a)});i++;n+=a}if(typeof d==="number"){this.skipWarn_(d,n);d=null}r=r.subarray(n)};this.flush=function(){i=0;this.trigger("done")};this.reset=function(){r=void 0;this.trigger("reset")};this.endTimeline=function(){r=void 0;this.trigger("endedtimeline")}};gt.prototype=new r;var _t=gt;var bt;bt=function e(t){var r=t.byteLength,i=0,n=0;this.length=function(){return 8*r};this.bitsAvailable=function(){return 8*r+n};this.loadWord=function(){var e=t.byteLength-r,a=new Uint8Array(4),s=Math.min(4,r);if(s===0){throw new Error("no bytes available")}a.set(t.subarray(e,e+s));i=new DataView(a.buffer).getUint32(0);n=s*8;r-=s};this.skipBits=function(e){var t;if(n>e){i<<=e;n-=e}else{e-=n;t=Math.floor(e/8);e-=t*8;r-=t;this.loadWord();i<<=e;n-=e}};this.readBits=function(e){var t=Math.min(n,e),a=i>>>32-t;n-=t;if(n>0){i<<=t}else if(r>0){this.loadWord()}t=e-t;if(t>0){return a<<t|this.readBits(t)}return a};this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e){if((i&2147483648>>>e)!==0){i<<=e;n-=e;return e}}this.loadWord();return e+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1};this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();if(1&e){return 1+e>>>1}return-1*(e>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};var Tt=bt;var St,Et;var It;Et=function e(){var t=0,r,i;Et.prototype.init.call(this);this.push=function(e){var n;if(!i){i=e.data}else{n=new Uint8Array(i.byteLength+e.data.byteLength);n.set(i);n.set(e.data,i.byteLength);i=n}var a=i.byteLength;for(;t<a-3;t++){if(i[t+2]===1){r=t+5;break}}while(r<a){switch(i[r]){case 0:if(i[r-1]!==0){r+=2;break}else if(i[r-2]!==0){r++;break}if(t+3!==r-2){this.trigger("data",i.subarray(t+3,r-2))}do{r++}while(i[r]!==1&&r<a);t=r-2;r+=3;break;case 1:if(i[r-1]!==0||i[r-2]!==0){r+=3;break}this.trigger("data",i.subarray(t+3,r-2));t=r-2;r+=3;break;default:r+=3;break}}i=i.subarray(t);r-=t;t=0};this.reset=function(){i=null;t=0;this.trigger("reset")};this.flush=function(){if(i&&i.byteLength>3){this.trigger("data",i.subarray(t+3))}i=null;t=0;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")}};Et.prototype=new r;It={100:true,110:true,122:true,244:true,44:true,83:true,86:true,118:true,128:true,138:true,139:true,134:true};St=function e(){var t=new Et,r,i,n,a,s,o,u;St.prototype.init.call(this);r=this;this.push=function(e){if(e.type!=="video"){return}i=e.trackId;n=e.pts;a=e.dts;t.push(e)};t.on("data",function(e){var t={trackId:i,pts:n,dts:a,data:e,nalUnitTypeCode:e[0]&31};switch(t.nalUnitTypeCode){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}r.trigger("data",t)});t.on("done",function(){r.trigger("done")});t.on("partialdone",function(){r.trigger("partialdone")});t.on("reset",function(){r.trigger("reset")});t.on("endedtimeline",function(){r.trigger("endedtimeline")});this.flush=function(){t.flush()};this.partialFlush=function(){t.partialFlush()};this.reset=function(){t.reset()};this.endTimeline=function(){t.endTimeline()};u=function e(t,r){var i=8,n=8,a,s;for(a=0;a<t;a++){if(n!==0){s=r.readExpGolomb();n=(i+s+256)%256}i=n===0?i:n}};s=function e(t){var r=t.byteLength,i=[],n=1,a,s;while(n<r-2){if(t[n]===0&&t[n+1]===0&&t[n+2]===3){i.push(n+2);n+=2}else{n++}}if(i.length===0){return t}a=r-i.length;s=new Uint8Array(a);var o=0;for(n=0;n<a;o++,n++){if(o===i[0]){o++;i.shift()}s[n]=t[o]}return s};o=function e(t){var r=0,i=0,n=0,a=0,s,o,l,d,c,f,h,p,v,m,g,y=[1,1],_,b;s=new Tt(t);o=s.readUnsignedByte();d=s.readUnsignedByte();l=s.readUnsignedByte();s.skipUnsignedExpGolomb();if(It[o]){c=s.readUnsignedExpGolomb();if(c===3){s.skipBits(1)}s.skipUnsignedExpGolomb();s.skipUnsignedExpGolomb();s.skipBits(1);if(s.readBoolean()){g=c!==3?8:12;for(b=0;b<g;b++){if(s.readBoolean()){if(b<6){u(16,s)}else{u(64,s)}}}}}s.skipUnsignedExpGolomb();f=s.readUnsignedExpGolomb();if(f===0){s.readUnsignedExpGolomb()}else if(f===1){s.skipBits(1);s.skipExpGolomb();s.skipExpGolomb();h=s.readUnsignedExpGolomb();for(b=0;b<h;b++){s.skipExpGolomb()}}s.skipUnsignedExpGolomb();s.skipBits(1);p=s.readUnsignedExpGolomb();v=s.readUnsignedExpGolomb();m=s.readBits(1);if(m===0){s.skipBits(1)}s.skipBits(1);if(s.readBoolean()){r=s.readUnsignedExpGolomb();i=s.readUnsignedExpGolomb();n=s.readUnsignedExpGolomb();a=s.readUnsignedExpGolomb()}if(s.readBoolean()){if(s.readBoolean()){_=s.readUnsignedByte();switch(_){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:{y=[s.readUnsignedByte()<<8|s.readUnsignedByte(),s.readUnsignedByte()<<8|s.readUnsignedByte()];break}}if(y){y[0]/y[1]}}}return{profileIdc:o,levelIdc:l,profileCompatibility:d,width:(p+1)*16-r*2-i*2,height:(2-m)*(v+1)*16-n*2-a*2,sarRatio:y}}};St.prototype=new r;var Ct={H264Stream:St,NalByteStream:Et};var kt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];var wt=function e(t,r){var i=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],n=t[r+5],a=(n&16)>>4;i=i>=0?i:0;if(a){return i+20}return i+10};var At=function e(t,r){if(t.length-r<10||t[r]!=="I".charCodeAt(0)||t[r+1]!=="D".charCodeAt(0)||t[r+2]!=="3".charCodeAt(0)){return r}r+=wt(t,r);return e(t,r)};var Pt=function e(t){var r=At(t,0);return t.length>=r+2&&(t[r]&255)===255&&(t[r+1]&240)===240&&(t[r+1]&22)===16};var Ot=function e(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};var xt=function e(t,r,i){var n,a="";for(n=r;n<i;n++){a+="%"+("00"+t[n].toString(16)).slice(-2)}return a};var Dt=function e(t,r,i){return unescape(xt(t,r,i))};var Lt=function e(t,r){var i=(t[r+5]&224)>>5,n=t[r+4]<<3,a=t[r+3]&3<<11;return a|n|i};var Rt=function e(t,r){if(t[r]==="I".charCodeAt(0)&&t[r+1]==="D".charCodeAt(0)&&t[r+2]==="3".charCodeAt(0)){return"timed-metadata"}else if(t[r]&255===255&&(t[r+1]&240)===240){return"audio"}return null};var Nt=function e(t){var r=0;while(r+5<t.length){if(t[r]!==255||(t[r+1]&246)!==240){r++;continue}return kt[(t[r+2]&60)>>>2]}return null};var Mt=function e(t){var r,i,n,a;r=10;if(t[5]&64){r+=4;r+=Ot(t.subarray(10,14))}do{i=Ot(t.subarray(r+4,r+8));if(i<1){return null}a=String.fromCharCode(t[r],t[r+1],t[r+2],t[r+3]);if(a==="PRIV"){n=t.subarray(r+10,r+i+10);for(var s=0;s<n.byteLength;s++){if(n[s]===0){var o=Dt(n,0,s);if(o==="com.apple.streaming.transportStreamTimestamp"){var u=n.subarray(s+1);var l=(u[3]&1)<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;l*=4;l+=u[7]&3;return l}break}}}r+=10;r+=i}while(r<t.byteLength);return null};var Ut={isLikelyAacData:Pt,parseId3TagSize:wt,parseAdtsSize:Lt,parseType:Rt,parseSampleRate:Nt,parseAacTimestamp:Mt};var Bt;Bt=function e(){var t=new Uint8Array,r=0;Bt.prototype.init.call(this);this.setTimestamp=function(e){r=e};this.push=function(e){var i=0,n=0,a,s,o,u;if(t.length){u=t.length;t=new Uint8Array(e.byteLength+u);t.set(t.subarray(0,u));t.set(e,u)}else{t=e}while(t.length-n>=3){if(t[n]==="I".charCodeAt(0)&&t[n+1]==="D".charCodeAt(0)&&t[n+2]==="3".charCodeAt(0)){if(t.length-n<10){break}i=Ut.parseId3TagSize(t,n);if(n+i>t.length){break}s={type:"timed-metadata",data:t.subarray(n,n+i)};this.trigger("data",s);n+=i;continue}else if((t[n]&255)===255&&(t[n+1]&240)===240){if(t.length-n<7){break}i=Ut.parseAdtsSize(t,n);if(n+i>t.length){break}o={type:"audio",data:t.subarray(n,n+i),pts:r,dts:r};this.trigger("data",o);n+=i;continue}n++}a=t.length-n;if(a>0){t=t.subarray(n)}else{t=new Uint8Array}};this.reset=function(){t=new Uint8Array;this.trigger("reset")};this.endTimeline=function(){t=new Uint8Array;this.trigger("endedtimeline")}};Bt.prototype=new r;var Ft=Bt;var jt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"];var Vt=jt;var qt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"];var Ht=qt;var Wt=Ct.H264Stream;var Gt=Ut.isLikelyAacData;var Kt=pe.ONE_SECOND_IN_TS;var Yt,zt,Xt,Qt;var $t=function e(t,r){r.stream=t;this.trigger("log",r)};var Jt=function e(t,r){var i=Object.keys(r);for(var n=0;n<i.length;n++){var a=i[n];if(a==="headOfPipeline"||!r[a].on){continue}r[a].on("log",$t.bind(t,a))}};var Zt=function e(t,r){var i;if(t.length!==r.length){return false}for(i=0;i<t.length;i++){if(t[i]!==r[i]){return false}}return true};var er=function e(t,r,i,n,a,s){var o=i-r,u=n-r,l=a-i;return{start:{dts:t,pts:t+o},end:{dts:t+u,pts:t+l},prependedContentDuration:s,baseMediaDecodeTime:t}};zt=function e(t,r){var i=[],n,a=0,s=0,o=Infinity;r=r||{};n=r.firstSequenceNumber||0;zt.prototype.init.call(this);this.push=function(e){Ce.collectDtsInfo(t,e);if(t){Vt.forEach(function(r){t[r]=e[r]})}i.push(e)};this.setEarliestDts=function(e){a=e};this.setVideoBaseMediaDecodeTime=function(e){o=e};this.setAudioAppendStart=function(e){s=e};this.flush=function(){var e,u,l,d,c,f,h;if(i.length===0){this.trigger("done","AudioSegmentStream");return}e=be.trimAdtsFramesByEarliestDts(i,t,a);t.baseMediaDecodeTime=Ce.calculateTrackBaseMediaDecodeTime(t,r.keepOriginalTimestamps);h=be.prefixWithSilence(t,e,s,o);t.samples=be.generateSampleTable(e);l=H.mdat(be.concatenateFrameData(e));i=[];u=H.moof(n,[t]);d=new Uint8Array(u.byteLength+l.byteLength);n++;d.set(u);d.set(l,u.byteLength);Ce.clearDtsInfo(t);c=Math.ceil(Kt*1024/t.samplerate);if(e.length){f=e.length*c;this.trigger("segmentTimingInfo",er(pe.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate),e[0].dts,e[0].pts,e[0].dts+f,e[0].pts+f,h||0));this.trigger("timingInfo",{start:e[0].pts,end:e[0].pts+f})}this.trigger("data",{track:t,boxes:d});this.trigger("done","AudioSegmentStream")};this.reset=function(){Ce.clearDtsInfo(t);i=[];this.trigger("reset")}};zt.prototype=new r;Yt=function e(t,r){var i,n=[],a=[],s,o;r=r||{};i=r.firstSequenceNumber||0;Yt.prototype.init.call(this);delete t.minPTS;this.gopCache_=[];this.push=function(e){Ce.collectDtsInfo(t,e);if(e.nalUnitType==="seq_parameter_set_rbsp"&&!s){s=e.config;t.sps=[e.data];Ht.forEach(function(e){t[e]=s[e]},this)}if(e.nalUnitType==="pic_parameter_set_rbsp"&&!o){o=e.data;t.pps=[e.data]}n.push(e)};this.flush=function(){var e,s,o,u,l,d,c=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=Z.groupNalsIntoFrames(n);o=Z.groupFramesIntoGops(e);if(!o[0][0].keyFrame){s=this.getGopForFusion_(n[0],t);if(s){c=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=Z.extendFirstKeyFrame(o)}}if(a.length){var p;if(r.alignGopsAtEnd){p=this.alignGopsAtEnd_(o)}else{p=this.alignGopsAtStart_(o)}if(!p){this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);n=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}Ce.clearDtsInfo(t);o=p}Ce.collectDtsInfo(t,o);t.samples=Z.generateSampleTable(o);l=H.mdat(Z.concatenateNalData(o));t.baseMediaDecodeTime=Ce.calculateTrackBaseMediaDecodeTime(t,r.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",er(t.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,c));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);u=H.moof(i,[t]);d=new Uint8Array(u.byteLength+l.byteLength);i++;d.set(u);d.set(l,u.byteLength);this.trigger("data",{track:t,boxes:d});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(){Ce.clearDtsInfo(t);s=undefined;o=undefined};this.getGopForFusion_=function(e){var r=45e3,i=1e4,n=Infinity,a,s,o,u,l;for(l=0;l<this.gopCache_.length;l++){u=this.gopCache_[l];o=u.gop;if(!(t.pps&&Zt(t.pps[0],u.pps[0]))||!(t.sps&&Zt(t.sps[0],u.sps[0]))){continue}if(o.dts<t.timelineStartInfo.dts){continue}a=e.dts-o.dts-o.duration;if(a>=-i&&a<=r){if(!s||n>a){s=u;n=a}}}if(s){return s.gop}return null};this.alignGopsAtStart_=function(e){var t,r,i,n,s,o,u,l;s=e.byteLength;o=e.nalCount;u=e.duration;t=r=0;while(t<a.length&&r<e.length){i=a[t];n=e[r];if(i.pts===n.pts){break}if(n.pts>i.pts){t++;continue}r++;s-=n.byteLength;o-=n.nalCount;u-=n.duration}if(r===0){return e}if(r===e.length){return null}l=e.slice(r);l.byteLength=s;l.duration=u;l.nalCount=o;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsAtEnd_=function(e){var t,r,i,n,s,o;t=a.length-1;r=e.length-1;s=null;o=false;while(t>=0&&r>=0){i=a[t];n=e[r];if(i.pts===n.pts){o=true;break}if(i.pts>n.pts){t--;continue}if(t===a.length-1){s=r}r--}if(!o&&s===null){return null}var u;if(o){u=r}else{u=s}if(u===0){return e}var l=e.slice(u);var d=l.reduce(function(e,t){e.byteLength+=t.byteLength;e.duration+=t.duration;e.nalCount+=t.nalCount;return e},{byteLength:0,duration:0,nalCount:0});l.byteLength=d.byteLength;l.duration=d.duration;l.nalCount=d.nalCount;l.pts=l[0].pts;l.dts=l[0].dts;return l};this.alignGopsWith=function(e){a=e}};Yt.prototype=new r;Qt=function e(t,r){this.numberOfTracks=0;this.metadataStream=r;t=t||{};if(typeof t.remux!=="undefined"){this.remuxTracks=!!t.remux}else{this.remuxTracks=true}if(typeof t.keepOriginalTimestamps==="boolean"){this.keepOriginalTimestamps=t.keepOriginalTimestamps}else{this.keepOriginalTimestamps=false}this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;Qt.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)}}};Qt.prototype=new r;Qt.prototype.flush=function(e){var t=0,r={captions:[],captionStreams:{},metadata:[],info:{}},i,n,a,s=0,o;if(this.pendingTracks.length<this.numberOfTracks){if(e!=="VideoSegmentStream"&&e!=="AudioSegmentStream"){return}else if(this.remuxTracks){return}else if(this.pendingTracks.length===0){this.emittedTracks++;if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}return}}if(this.videoTrack){s=this.videoTrack.timelineStartInfo.pts;Ht.forEach(function(e){r.info[e]=this.videoTrack[e]},this)}else if(this.audioTrack){s=this.audioTrack.timelineStartInfo.pts;Vt.forEach(function(e){r.info[e]=this.audioTrack[e]},this)}if(this.videoTrack||this.audioTrack){if(this.pendingTracks.length===1){r.type=this.pendingTracks[0].type}else{r.type="combined"}this.emittedTracks+=this.pendingTracks.length;a=H.initSegment(this.pendingTracks);r.initSegment=new Uint8Array(a.byteLength);r.initSegment.set(a);r.data=new Uint8Array(this.pendingBytes);for(o=0;o<this.pendingBoxes.length;o++){r.data.set(this.pendingBoxes[o],t);t+=this.pendingBoxes[o].byteLength}for(o=0;o<this.pendingCaptions.length;o++){i=this.pendingCaptions[o];i.startTime=pe.metadataTsToSeconds(i.startPts,s,this.keepOriginalTimestamps);i.endTime=pe.metadataTsToSeconds(i.endPts,s,this.keepOriginalTimestamps);r.captionStreams[i.stream]=true;r.captions.push(i)}for(o=0;o<this.pendingMetadata.length;o++){n=this.pendingMetadata[o];n.cueTime=pe.metadataTsToSeconds(n.pts,s,this.keepOriginalTimestamps);r.metadata.push(n)}r.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger("data",r);for(o=0;o<r.captions.length;o++){i=r.captions[o];this.trigger("caption",i)}for(o=0;o<r.metadata.length;o++){n=r.metadata[o];this.trigger("id3Frame",n)}}if(this.emittedTracks>=this.numberOfTracks){this.trigger("done");this.emittedTracks=0}};Qt.prototype.setRemux=function(e){this.remuxTracks=e};Xt=function e(t){var r=this,i=true,n,a;Xt.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 vt.MetadataStream;e.aacStream=new Ft;e.audioTimestampRolloverStream=new vt.TimestampRolloverStream("audio");e.timedMetadataTimestampRolloverStream=new vt.TimestampRolloverStream("timed-metadata");e.adtsStream=new _t;e.coalesceStream=new Qt(t,e.metadataStream);e.headOfPipeline=e.aacStream;e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream);e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream);e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)});e.aacStream.on("data",function(i){if(i.type!=="timed-metadata"&&i.type!=="audio"||e.audioSegmentStream){return}a=a||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"};e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new zt(a,t);e.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream"));e.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream);r.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("done",this.trigger.bind(this,"done"));Jt(this,e)};this.setupTsPipeline=function(){var e={};this.transmuxPipeline_=e;e.type="ts";e.metadataStream=new vt.MetadataStream;e.packetStream=new vt.TransportPacketStream;e.parseStream=new vt.TransportParseStream;e.elementaryStream=new vt.ElementaryStream;e.timestampRolloverStream=new vt.TimestampRolloverStream;e.adtsStream=new _t;e.h264Stream=new Wt;e.captionStream=new vt.CaptionStream(t);e.coalesceStream=new Qt(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(i){var s;if(i.type==="metadata"){s=i.tracks.length;while(s--){if(!n&&i.tracks[s].type==="video"){n=i.tracks[s];n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}else if(!a&&i.tracks[s].type==="audio"){a=i.tracks[s];a.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime}}if(n&&!e.videoSegmentStream){e.coalesceStream.numberOfTracks++;e.videoSegmentStream=new Yt(n,t);e.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream"));e.videoSegmentStream.on("timelineStartInfo",function(i){if(a&&!t.keepOriginalTimestamps){a.timelineStartInfo=i;e.audioSegmentStream.setEarliestDts(i.dts-r.baseMediaDecodeTime)}});e.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo"));e.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo"));e.videoSegmentStream.on("baseMediaDecodeTime",function(t){if(a){e.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}});e.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo"));e.h264Stream.pipe(e.videoSegmentStream).pipe(e.coalesceStream)}if(a&&!e.audioSegmentStream){e.coalesceStream.numberOfTracks++;e.audioSegmentStream=new zt(a,t);e.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream"));e.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo"));e.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo"));e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream)}r.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!n})}});e.coalesceStream.on("data",this.trigger.bind(this,"data"));e.coalesceStream.on("id3Frame",function(t){t.dispatchType=e.metadataStream.dispatchType;r.trigger("id3Frame",t)});e.coalesceStream.on("caption",this.trigger.bind(this,"caption"));e.coalesceStream.on("done",this.trigger.bind(this,"done"));Jt(this,e)};this.setBaseMediaDecodeTime=function(e){var r=this.transmuxPipeline_;if(!t.keepOriginalTimestamps){this.baseMediaDecodeTime=e}if(a){a.timelineStartInfo.dts=undefined;a.timelineStartInfo.pts=undefined;Ce.clearDtsInfo(a);if(r.audioTimestampRolloverStream){r.audioTimestampRolloverStream.discontinuity()}}if(n){if(r.videoSegmentStream){r.videoSegmentStream.gopCache_=[]}n.timelineStartInfo.dts=undefined;n.timelineStartInfo.pts=undefined;Ce.clearDtsInfo(n);r.captionStream.reset()}if(r.timestampRolloverStream){r.timestampRolloverStream.discontinuity()}};this.setAudioAppendStart=function(e){if(a){this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)}};this.setRemux=function(e){var r=this.transmuxPipeline_;t.remux=e;if(r&&r.coalesceStream){r.coalesceStream.setRemux(e)}};this.alignGopsWith=function(e){if(n&&this.transmuxPipeline_.videoSegmentStream){this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)}};this.getLogTrigger_=function(e){var t=this;return function(r){r.stream=e;t.trigger("log",r)}};this.push=function(e){if(i){var t=Gt(e);if(t&&this.transmuxPipeline_.type!=="aac"){this.setupAacPipeline()}else if(!t&&this.transmuxPipeline_.type!=="ts"){this.setupTsPipeline()}i=false}this.transmuxPipeline_.headOfPipeline.push(e)};this.flush=function(){i=true;this.transmuxPipeline_.headOfPipeline.flush()};this.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()}}};Xt.prototype=new r;var tr={Transmuxer:Xt,VideoSegmentStream:Yt,AudioSegmentStream:zt,AUDIO_PROPERTIES:Vt,VIDEO_PROPERTIES:Ht,generateSegmentTimingInfo:er};var rr=function e(t){return t>>>0};var ir=function e(t){return("00"+t.toString(16)).slice(-2)};var nr={toUnsigned:rr,toHexString:ir};var ar=function e(t){var r="";r+=String.fromCharCode(t[0]);r+=String.fromCharCode(t[1]);r+=String.fromCharCode(t[2]);r+=String.fromCharCode(t[3]);return r};var sr=ar;var or=nr.toUnsigned;var ur=function e(t,r){var i=[],n,a,s,o,u;if(!r.length){return null}for(n=0;n<t.byteLength;){a=or(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);s=sr(t.subarray(n+4,n+8));o=a>1?n+a:t.byteLength;if(s===r[0]){if(r.length===1){i.push(t.subarray(n+8,o))}else{u=e(t.subarray(n+8,o),r.slice(1));if(u.length){i=i.concat(u)}}}n=o}return i};var lr=ur;var dr=nr.toUnsigned;var cr=a.getUint64;var fr=function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4))};if(r.version===1){r.baseMediaDecodeTime=cr(t.subarray(4))}else{r.baseMediaDecodeTime=dr(t[4]<<24|t[5]<<16|t[6]<<8|t[7])}return r};var hr=fr;var pr=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]}};var vr=pr;var mr=function e(t){var r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.flags[2]&1,a=r.flags[2]&4,s=r.flags[1]&1,o=r.flags[1]&2,u=r.flags[1]&4,l=r.flags[1]&8,d=i.getUint32(4),c=8,f;if(n){r.dataOffset=i.getInt32(c);c+=4}if(a&&d){f={flags:vr(t.subarray(c,c+4))};c+=4;if(s){f.duration=i.getUint32(c);c+=4}if(o){f.size=i.getUint32(c);c+=4}if(l){if(r.version===1){f.compositionTimeOffset=i.getInt32(c)}else{f.compositionTimeOffset=i.getUint32(c)}c+=4}r.samples.push(f);d--}while(d--){f={};if(s){f.duration=i.getUint32(c);c+=4}if(o){f.size=i.getUint32(c);c+=4}if(u){f.flags=vr(t.subarray(c,c+4));c+=4}if(l){if(r.version===1){f.compositionTimeOffset=i.getInt32(c)}else{f.compositionTimeOffset=i.getUint32(c)}c+=4}r.samples.push(f)}return r};var gr=mr;var yr=function e(t){var r=new DataView(t.buffer,t.byteOffset,t.byteLength),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:r.getUint32(4)},n=i.flags[2]&1,a=i.flags[2]&2,s=i.flags[2]&8,o=i.flags[2]&16,u=i.flags[2]&32,l=i.flags[0]&65536,d=i.flags[0]&131072,c;c=8;if(n){c+=4;i.baseDataOffset=r.getUint32(12);c+=4}if(a){i.sampleDescriptionIndex=r.getUint32(c);c+=4}if(s){i.defaultSampleDuration=r.getUint32(c);c+=4}if(o){i.defaultSampleSize=r.getUint32(c);c+=4}if(u){i.defaultSampleFlags=r.getUint32(c)}if(l){i.durationIsEmpty=true}if(!n&&d){i.baseDataOffsetIsMoof=true}return i};var _r=yr;var br=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var Tr;if(typeof e!=="undefined"){Tr=e}else if(typeof br!=="undefined"){Tr=br}else if(typeof self!=="undefined"){Tr=self}else{Tr={}}var Sr=Tr;var Er=De.discardEmulationPreventionBytes;var Ir=Ke.CaptionStream;var Cr=function e(t,r){var i=t;for(var n=0;n<r.length;n++){var a=r[n];if(i<a.size){return a}i-=a.size}return null};var kr=function e(t,r,i){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),a={logs:[],seiNals:[]},s,o,u,l;for(o=0;o+4<t.length;o+=u){u=n.getUint32(o);o+=4;if(u<=0){continue}switch(t[o]&31){case 6:var d=t.subarray(o+1,o+1+u);var c=Cr(o,r);s={nalUnitType:"sei_rbsp",size:u,data:d,escapedRBSP:Er(d),trackId:i};if(c){s.pts=c.pts;s.dts=c.dts;l=c}else if(l){s.pts=l.pts;s.dts=l.dts}else{a.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+o+" for trackId "+i+". See mux.js#223."});break}a.seiNals.push(s);break}}return a};var wr=function e(t,r,i){var n=r;var a=i.defaultSampleDuration||0;var s=i.defaultSampleSize||0;var o=i.trackId;var u=[];t.forEach(function(e){var t=gr(e);var r=t.samples;r.forEach(function(e){if(e.duration===undefined){e.duration=a}if(e.size===undefined){e.size=s}e.trackId=o;e.dts=n;if(e.compositionTimeOffset===undefined){e.compositionTimeOffset=0}if(typeof n==="bigint"){e.pts=n+Sr.BigInt(e.compositionTimeOffset);n+=Sr.BigInt(e.duration)}else{e.pts=n+e.compositionTimeOffset;n+=e.duration}});u=u.concat(r)});return u};var Ar=function e(t,r){var i=lr(t,["moof","traf"]);var n=lr(t,["mdat"]);var a={};var s=[];n.forEach(function(e,t){var r=i[t];s.push({mdat:e,traf:r})});s.forEach(function(e){var t=e.mdat;var i=e.traf;var n=lr(i,["tfhd"]);var s=_r(n[0]);var o=s.trackId;var u=lr(i,["tfdt"]);var l=u.length>0?hr(u[0]).baseMediaDecodeTime:0;var d=lr(i,["trun"]);var c;var f;if(r===o&&d.length>0){c=wr(d,l,s);f=kr(t,c,o);if(!a[o]){a[o]={seiNals:[],logs:[]}}a[o].seiNals=a[o].seiNals.concat(f.seiNals);a[o].logs=a[o].logs.concat(f.logs)}});return a};var Pr=function e(t,r,i){var n;if(r===null){return null}n=Ar(t,r);var a=n[r]||{};return{seiNals:a.seiNals,logs:a.logs,timescale:i}};var Or=function e(){var t=false;var r;var i;var n;var a;var s;var o;this.isInitialized=function(){return t};this.init=function(e){r=new Ir;t=true;o=e?e.isPartial:false;r.on("data",function(e){e.startTime=e.startPts/a;e.endTime=e.endPts/a;s.captions.push(e);s.captionStreams[e.stream]=true});r.on("log",function(e){s.logs.push(e)})};this.isNewInit=function(e,t){if(e&&e.length===0||t&&typeof t==="object"&&Object.keys(t).length===0){return false}return n!==e[0]||a!==t[n]};this.parse=function(e,t,r){var o;if(!this.isInitialized()){return null}else if(!t||!r){return null}else if(this.isNewInit(t,r)){n=t[0];a=r[n]}else if(n===null||!a){i.push(e);return null}while(i.length>0){var u=i.shift();this.parse(u,t,r)}o=Pr(e,n,a);if(o&&o.logs){s.logs=s.logs.concat(o.logs)}if(o===null||!o.seiNals){if(s.logs.length){return{logs:s.logs,captions:[],captionStreams:[]}}return null}this.pushNals(o.seiNals);this.flushStream();return s};this.pushNals=function(e){if(!this.isInitialized()||!e||e.length===0){return null}e.forEach(function(e){r.push(e)})};this.flushStream=function(){if(!this.isInitialized()){return null}if(!o){r.flush()}else{r.partialFlush()}};this.clearParsedCaptions=function(){s.captions=[];s.captionStreams={};s.logs=[]};this.resetCaptionStream=function(){if(!this.isInitialized()){return null}r.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){i=[];n=null;a=null;if(!s){s={captions:[],captionStreams:{},logs:[]}}else{this.clearParsedCaptions()}this.resetCaptionStream()};this.reset()};var xr=Or;var Dr=nr.toUnsigned;var Lr=nr.toHexString;var Rr=a.getUint64;var Nr,Mr,Ur,Br,Fr,jr;Nr=function e(t){var r={},i=lr(t,["moov","trak"]);return i.reduce(function(e,t){var r,i,n,a,s;r=lr(t,["tkhd"])[0];if(!r){return null}i=r[0];n=i===0?12:20;a=Dr(r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3]);s=lr(t,["mdia","mdhd"])[0];if(!s){return null}i=s[0];n=i===0?12:20;e[a]=Dr(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]);return e},r)};Mr=function e(t,r){var i;i=lr(r,["moof","traf"]);var n=i.reduce(function(e,r){var i=lr(r,["tfhd"])[0];var n=Dr(i[4]<<24|i[5]<<16|i[6]<<8|i[7]);var a=t[n]||9e4;var s=lr(r,["tfdt"])[0];var o=new DataView(s.buffer,s.byteOffset,s.byteLength);var u;if(s[0]===1){u=Rr(s.subarray(4,12))}else{u=o.getUint32(4)}var l;if(typeof u==="bigint"){l=u/Sr.BigInt(a)}else if(typeof u==="number"&&!isNaN(u)){l=u/a}if(l<Number.MAX_SAFE_INTEGER){l=Number(l)}if(l<e){e=l}return e},Infinity);return typeof n==="bigint"||isFinite(n)?n:0};Ur=function e(t,r){var i=lr(r,["moof","traf"]);var n=0;var a=0;var s;if(i&&i.length){var o=lr(i[0],["tfhd"])[0];var u=lr(i[0],["trun"])[0];var l=lr(i[0],["tfdt"])[0];if(o){var d=_r(o);s=d.trackId}if(l){var c=hr(l);n=c.baseMediaDecodeTime}if(u){var f=gr(u);if(f.samples&&f.samples.length){a=f.samples[0].compositionTimeOffset||0}}}var h=t[s]||9e4;if(typeof n==="bigint"){a=Sr.BigInt(a);h=Sr.BigInt(h)}var p=(n+a)/h;if(typeof p==="bigint"&&p<Number.MAX_SAFE_INTEGER){p=Number(p)}return p};Br=function e(t){var r=lr(t,["moov","trak"]);var i=[];r.forEach(function(e){var t=lr(e,["mdia","hdlr"]);var r=lr(e,["tkhd"]);t.forEach(function(e,t){var n=sr(e.subarray(8,12));var a=r[t];var s;var o;var u;if(n==="vide"){s=new DataView(a.buffer,a.byteOffset,a.byteLength);o=s.getUint8(0);u=o===0?s.getUint32(12):s.getUint32(20);i.push(u)}})});return i};jr=function e(t){var r=t[0];var i=r===0?12:20;return Dr(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])};Fr=function e(t){var r=lr(t,["moov","trak"]);var i=[];r.forEach(function(e){var t={};var r=lr(e,["tkhd"])[0];var n,a;if(r){n=new DataView(r.buffer,r.byteOffset,r.byteLength);a=n.getUint8(0);t.id=a===0?n.getUint32(12):n.getUint32(20)}var s=lr(e,["mdia","hdlr"])[0];if(s){var o=sr(s.subarray(8,12));if(o==="vide"){t.type="video"}else if(o==="soun"){t.type="audio"}else{t.type=o}}var u=lr(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);t.codec=sr(l.subarray(4,8));var d=lr(l,[t.codec])[0];var c,f;if(d){if(/^[asm]vc[1-9]$/i.test(t.codec)){c=d.subarray(78);f=sr(c.subarray(4,8));if(f==="avcC"&&c.length>11){t.codec+=".";t.codec+=Lr(c[9]);t.codec+=Lr(c[10]);t.codec+=Lr(c[11])}else{t.codec="avc1.4d400d"}}else if(/^mp4[a,v]$/i.test(t.codec)){c=d.subarray(28);f=sr(c.subarray(4,8));if(f==="esds"&&c.length>20&&c[19]!==0){t.codec+="."+Lr(c[19]);t.codec+="."+Lr(c[20]>>>2&63).replace(/^0/,"")}else{t.codec="mp4a.40.2"}}else{t.codec=t.codec.toLowerCase()}}}var h=lr(e,["mdia","mdhd"])[0];if(h){t.timescale=jr(h)}i.push(t)});return i};var Vr={findBox:lr,parseType:sr,timescale:Nr,startTime:Mr,compositionStartTime:Ur,videoTrackIds:Br,tracks:Fr,getTimescaleFromMediaHeader:jr};var qr=function e(t){var r=t[1]&31;r<<=8;r|=t[2];return r};var Hr=function e(t){return!!(t[1]&64)};var Wr=function e(t){var r=0;if((t[3]&48)>>>4>1){r+=t[4]+1}return r};var Gr=function e(t,r){var i=qr(t);if(i===0){return"pat"}else if(i===r){return"pmt"}else if(r){return"pes"}return null};var Kr=function e(t){var r=Hr(t);var i=4+Wr(t);if(r){i+=t[i]+1}return(t[i+10]&31)<<8|t[i+11]};var Yr=function e(t){var r={};var i=Hr(t);var n=4+Wr(t);if(i){n+=t[n]+1}if(!(t[n+5]&1)){return}var a,s,o;a=(t[n+1]&15)<<8|t[n+2];s=3+a-4;o=(t[n+10]&15)<<8|t[n+11];var u=12+o;while(u<s){var l=n+u;r[(t[l+1]&31)<<8|t[l+2]]=t[l];u+=((t[l+3]&15)<<8|t[l+4])+5}return r};var zr=function e(t,r){var i=qr(t);var n=r[i];switch(n){case Ye.H264_STREAM_TYPE:return"video";case Ye.ADTS_STREAM_TYPE:return"audio";case Ye.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}};var Xr=function e(t){var r=Hr(t);if(!r){return null}var i=4+Wr(t);if(i>=t.byteLength){return null}var n=null;var a;a=t[i+7];if(a&192){n={};n.pts=(t[i+9]&14)<<27|(t[i+10]&255)<<20|(t[i+11]&254)<<12|(t[i+12]&255)<<5|(t[i+13]&254)>>>3;n.pts*=4;n.pts+=(t[i+13]&6)>>>1;n.dts=n.pts;if(a&64){n.dts=(t[i+14]&14)<<27|(t[i+15]&255)<<20|(t[i+16]&254)<<12|(t[i+17]&255)<<5|(t[i+18]&254)>>>3;n.dts*=4;n.dts+=(t[i+18]&6)>>>1}}return n};var Qr=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 $r=function e(t){var r=4+Wr(t);var i=t.subarray(r);var n=0;var a=0;var s=false;var o;for(;a<i.byteLength-3;a++){if(i[a+2]===1){n=a+5;break}}while(n<i.byteLength){switch(i[n]){case 0:if(i[n-1]!==0){n+=2;break}else if(i[n-2]!==0){n++;break}if(a+3!==n-2){o=Qr(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}do{n++}while(i[n]!==1&&n<i.length);a=n-2;n+=3;break;case 1:if(i[n-1]!==0||i[n-2]!==0){n+=3;break}o=Qr(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}a=n-2;n+=3;break;default:n+=3;break}}i=i.subarray(a);n-=a;a=0;if(i&&i.byteLength>3){o=Qr(i[a+3]&31);if(o==="slice_layer_without_partitioning_rbsp_idr"){s=true}}return s};var Jr={parseType:Gr,parsePat:Kr,parsePmt:Yr,parsePayloadUnitStartIndicator:Hr,parsePesType:zr,parsePesTime:Xr,videoPacketContainsKeyFrame:$r};var Zr=Ze.handleRollover;var ei={};ei.ts=Jr;ei.aac=Ut;var ti=pe.ONE_SECOND_IN_TS;var ri=188,ii=71;var ni=function e(t,r){var i=0,n=ri,a,s;while(n<t.byteLength){if(t[i]===ii&&t[n]===ii){a=t.subarray(i,n);s=ei.ts.parseType(a,r.pid);switch(s){case"pat":r.pid=ei.ts.parsePat(a);break;case"pmt":var o=ei.ts.parsePmt(a);r.table=r.table||{};Object.keys(o).forEach(function(e){r.table[e]=o[e]});break}i+=ri;n+=ri;continue}i++;n++}};var ai=function e(t,r,i){var n=0,a=ri,s,o,u,l,d;var c=false;while(a<=t.byteLength){if(t[n]===ii&&(t[a]===ii||a===t.byteLength)){s=t.subarray(n,a);o=ei.ts.parseType(s,r.pid);switch(o){case"pes":u=ei.ts.parsePesType(s,r.table);l=ei.ts.parsePayloadUnitStartIndicator(s);if(u==="audio"&&l){d=ei.ts.parsePesTime(s);if(d){d.type="audio";i.audio.push(d);c=true}}break}if(c){break}n+=ri;a+=ri;continue}n++;a++}a=t.byteLength;n=a-ri;c=false;while(n>=0){if(t[n]===ii&&(t[a]===ii||a===t.byteLength)){s=t.subarray(n,a);o=ei.ts.parseType(s,r.pid);switch(o){case"pes":u=ei.ts.parsePesType(s,r.table);l=ei.ts.parsePayloadUnitStartIndicator(s);if(u==="audio"&&l){d=ei.ts.parsePesTime(s);if(d){d.type="audio";i.audio.push(d);c=true}}break}if(c){break}n-=ri;a-=ri;continue}n--;a--}};var si=function e(t,r,i){var n=0,a=ri,s,o,u,l,d,c,f,h;var p=false;var v={data:[],size:0};while(a<t.byteLength){if(t[n]===ii&&t[a]===ii){s=t.subarray(n,a);o=ei.ts.parseType(s,r.pid);switch(o){case"pes":u=ei.ts.parsePesType(s,r.table);l=ei.ts.parsePayloadUnitStartIndicator(s);if(u==="video"){if(l&&!p){d=ei.ts.parsePesTime(s);if(d){d.type="video";i.video.push(d);p=true}}if(!i.firstKeyFrame){if(l){if(v.size!==0){c=new Uint8Array(v.size);f=0;while(v.data.length){h=v.data.shift();c.set(h,f);f+=h.byteLength}if(ei.ts.videoPacketContainsKeyFrame(c)){var m=ei.ts.parsePesTime(c);if(m){i.firstKeyFrame=m;i.firstKeyFrame.type="video"}else{console.warn("Failed to extract PTS/DTS from PES at first keyframe. "+"This could be an unusual TS segment, or else mux.js did not "+"parse your TS segment correctly. If you know your TS "+"segments do contain PTS/DTS on keyframes please file a bug "+"report! You can try ffprobe to double check for yourself.")}}v.size=0}}v.data.push(s);v.size+=s.byteLength}}break}if(p&&i.firstKeyFrame){break}n+=ri;a+=ri;continue}n++;a++}a=t.byteLength;n=a-ri;p=false;while(n>=0){if(t[n]===ii&&t[a]===ii){s=t.subarray(n,a);o=ei.ts.parseType(s,r.pid);switch(o){case"pes":u=ei.ts.parsePesType(s,r.table);l=ei.ts.parsePayloadUnitStartIndicator(s);if(u==="video"&&l){d=ei.ts.parsePesTime(s);if(d){d.type="video";i.video.push(d);p=true}}break}if(p){break}n-=ri;a-=ri;continue}n--;a--}};var oi=function e(t,r){if(t.audio&&t.audio.length){var i=r;if(typeof i==="undefined"||isNaN(i)){i=t.audio[0].dts}t.audio.forEach(function(e){e.dts=Zr(e.dts,i);e.pts=Zr(e.pts,i);e.dtsTime=e.dts/ti;e.ptsTime=e.pts/ti})}if(t.video&&t.video.length){var n=r;if(typeof n==="undefined"||isNaN(n)){n=t.video[0].dts}t.video.forEach(function(e){e.dts=Zr(e.dts,n);e.pts=Zr(e.pts,n);e.dtsTime=e.dts/ti;e.ptsTime=e.pts/ti});if(t.firstKeyFrame){var a=t.firstKeyFrame;a.dts=Zr(a.dts,n);a.pts=Zr(a.pts,n);a.dtsTime=a.dts/ti;a.ptsTime=a.pts/ti}}};var ui=function e(t){var r=false,i=0,n=null,a=null,s=0,o=0,u;while(t.length-o>=3){var l=ei.aac.parseType(t,o);switch(l){case"timed-metadata":if(t.length-o<10){r=true;break}s=ei.aac.parseId3TagSize(t,o);if(s>t.length){r=true;break}if(a===null){u=t.subarray(o,o+s);a=ei.aac.parseAacTimestamp(u)}o+=s;break;case"audio":if(t.length-o<7){r=true;break}s=ei.aac.parseAdtsSize(t,o);if(s>t.length){r=true;break}if(n===null){u=t.subarray(o,o+s);n=ei.aac.parseSampleRate(u)}i++;o+=s;break;default:o++;break}if(r){return null}}if(n===null||a===null){return null}var d=ti/n;var c={audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+i*1024*d,pts:a+i*1024*d}]};return c};var li=function e(t){var r={pid:null,table:null};var i={};ni(t,r);for(var n in r.table){if(r.table.hasOwnProperty(n)){var a=r.table[n];switch(a){case Ye.H264_STREAM_TYPE:i.video=[];si(t,r,i);if(i.video.length===0){delete i.video}break;case Ye.ADTS_STREAM_TYPE:i.audio=[];ai(t,r,i);if(i.audio.length===0){delete i.audio}break}}}return i};var di=function e(t,r){var i=ei.aac.isLikelyAacData(t);var n;if(i){n=ui(t)}else{n=li(t)}if(!n||!n.audio&&!n.video){return null}oi(n,r);return n};var ci={inspect:di,parseAudioPes_:ai};var fi=function e(t,r){r.on("data",function(e){var r=e.initSegment;e.initSegment={data:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength};var i=e.data;e.data=i.buffer;t.postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])});r.on("done",function(e){t.postMessage({action:"done"})});r.on("gopInfo",function(e){t.postMessage({action:"gopInfo",gopInfo:e})});r.on("videoSegmentTimingInfo",function(e){var r={start:{decode:pe.videoTsToSeconds(e.start.dts),presentation:pe.videoTsToSeconds(e.start.pts)},end:{decode:pe.videoTsToSeconds(e.end.dts),presentation:pe.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:pe.videoTsToSeconds(e.baseMediaDecodeTime)};if(e.prependedContentDuration){r.prependedContentDuration=pe.videoTsToSeconds(e.prependedContentDuration)}t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:r})});r.on("audioSegmentTimingInfo",function(e){var r={start:{decode:pe.videoTsToSeconds(e.start.dts),presentation:pe.videoTsToSeconds(e.start.pts)},end:{decode:pe.videoTsToSeconds(e.end.dts),presentation:pe.videoTsToSeconds(e.end.pts)},baseMediaDecodeTime:pe.videoTsToSeconds(e.baseMediaDecodeTime)};if(e.prependedContentDuration){r.prependedContentDuration=pe.videoTsToSeconds(e.prependedContentDuration)}t.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:r})});r.on("id3Frame",function(e){t.postMessage({action:"id3Frame",id3Frame:e})});r.on("caption",function(e){t.postMessage({action:"caption",caption:e})});r.on("trackinfo",function(e){t.postMessage({action:"trackinfo",trackInfo:e})});r.on("audioTimingInfo",function(e){t.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:pe.videoTsToSeconds(e.start),end:pe.videoTsToSeconds(e.end)}})});r.on("videoTimingInfo",function(e){t.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:pe.videoTsToSeconds(e.start),end:pe.videoTsToSeconds(e.end)}})});r.on("log",function(e){t.postMessage({action:"log",log:e})})};var hi=function(){function e(e,t){this.options=t||{};this.self=e;this.init()}var t=e.prototype;t.init=function e(){if(this.transmuxer){this.transmuxer.dispose()}this.transmuxer=new tr.Transmuxer(this.options);fi(this.self,this.transmuxer)};t.pushMp4Captions=function e(t){if(!this.captionParser){this.captionParser=new xr;this.captionParser.init()}var r=new Uint8Array(t.data,t.byteOffset,t.byteLength);var i=this.captionParser.parse(r,t.trackIds,t.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:r.buffer},[r.buffer])};t.probeMp4StartTime=function e(t){var r=t.timescales,i=t.data;var n=Vr.startTime(r,i);this.self.postMessage({action:"probeMp4StartTime",startTime:n,data:i},[i.buffer])};t.probeMp4Tracks=function e(t){var r=t.data;var i=Vr.tracks(r);this.self.postMessage({action:"probeMp4Tracks",tracks:i,data:r},[r.buffer])};t.probeTs=function e(t){var r=t.data,i=t.baseStartTime;var n=typeof i==="number"&&!isNaN(i)?i*pe.ONE_SECOND_IN_TS:void 0;var a=ci.inspect(r,n);var s=null;if(a){s={hasVideo:a.video&&a.video.length===2||false,hasAudio:a.audio&&a.audio.length===2||false};if(s.hasVideo){s.videoStart=a.video[0].ptsTime}if(s.hasAudio){s.audioStart=a.audio[0].ptsTime}}this.self.postMessage({action:"probeTs",result:s,data:r},[r.buffer])};t.clearAllMp4Captions=function e(){if(this.captionParser){this.captionParser.clearAllCaptions()}};t.clearParsedMp4Captions=function e(){if(this.captionParser){this.captionParser.clearParsedCaptions()}};t.push=function e(t){var r=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(r)};t.reset=function e(){this.transmuxer.reset()};t.setTimestampOffset=function e(t){var r=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(pe.secondsToVideoTs(r)))};t.setAudioAppendStart=function e(t){this.transmuxer.setAudioAppendStart(Math.ceil(pe.secondsToVideoTs(t.appendStart)))};t.setRemux=function e(t){this.transmuxer.setRemux(t.remux)};t.flush=function e(t){this.transmuxer.flush();self.postMessage({action:"done",type:"transmuxed"})};t.endTimeline=function e(){this.transmuxer.endTimeline();self.postMessage({action:"endedtimeline",type:"transmuxed"})};t.alignGopsWith=function e(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())};return e}();self.onmessage=function(e){if(e.data.action==="init"&&e.data.options){this.messageHandlers=new hi(self,e.data.options);return}if(!this.messageHandlers){this.messageHandlers=new hi(self)}if(e.data&&e.data.action&&e.data.action!=="init"){if(this.messageHandlers[e.data.action]){this.messageHandlers[e.data.action](e.data)}}}}));var tn=$i(en);var rn=function e(t,r,i){var n=t.data.segment,a=n.type,s=n.initSegment,o=n.captions,u=n.captionStreams,l=n.metadata,d=n.videoFrameDtsTime,c=n.videoFramePtsTime;r.buffer.push({captions:o,captionStreams:u,metadata:l});var f=t.data.segment.boxes||{data:t.data.segment.data};var h={type:a,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};if(typeof d!=="undefined"){h.videoFrameDtsTime=d}if(typeof c!=="undefined"){h.videoFramePtsTime=c}i(h)};var nn=function e(t){var r=t.transmuxedData,i=t.callback;r.buffer=[];i(r)};var an=function e(t,r){r.gopInfo=t.data.gopInfo};var sn=function e(t){var r=t.transmuxer,i=t.bytes,n=t.audioAppendStart,a=t.gopsToAlignWith,s=t.remux,o=t.onData,u=t.onTrackInfo,l=t.onAudioTimingInfo,d=t.onVideoTimingInfo,c=t.onVideoSegmentTimingInfo,f=t.onAudioSegmentTimingInfo,h=t.onId3,p=t.onCaptions,v=t.onDone,m=t.onEndedTimeline,g=t.onTransmuxerLog,y=t.isEndOfTimeline;var _={buffer:[]};var b=y;var T=function e(i){if(r.currentTransmux!==t){return}if(i.data.action==="data"){rn(i,_,o)}if(i.data.action==="trackinfo"){u(i.data.trackInfo)}if(i.data.action==="gopInfo"){an(i,_)}if(i.data.action==="audioTimingInfo"){l(i.data.audioTimingInfo)}if(i.data.action==="videoTimingInfo"){d(i.data.videoTimingInfo)}if(i.data.action==="videoSegmentTimingInfo"){c(i.data.videoSegmentTimingInfo)}if(i.data.action==="audioSegmentTimingInfo"){f(i.data.audioSegmentTimingInfo)}if(i.data.action==="id3Frame"){h([i.data.id3Frame],i.data.id3Frame.dispatchType)}if(i.data.action==="caption"){p(i.data.caption)}if(i.data.action==="endedtimeline"){b=false;m()}if(i.data.action==="log"){g(i.data.log)}if(i.data.type!=="transmuxed"){return}if(b){return}r.onmessage=null;nn({transmuxedData:_,callback:v});on(r)};r.onmessage=T;if(n){r.postMessage({action:"setAudioAppendStart",appendStart:n})}if(Array.isArray(a)){r.postMessage({action:"alignGopsWith",gopsToAlignWith:a})}if(typeof s!=="undefined"){r.postMessage({action:"setRemux",remux:s})}if(i.byteLength){var S=i instanceof ArrayBuffer?i:i.buffer;var E=i instanceof ArrayBuffer?0:i.byteOffset;r.postMessage({action:"push",data:S,byteOffset:E,byteLength:i.byteLength},[S])}if(y){r.postMessage({action:"endTimeline"})}r.postMessage({action:"flush"})};var on=function e(t){t.currentTransmux=null;if(t.transmuxQueue.length){t.currentTransmux=t.transmuxQueue.shift();if(typeof t.currentTransmux==="function"){t.currentTransmux()}else{sn(t.currentTransmux)}}};var un=function e(t,r){t.postMessage({action:r});on(t)};var ln=function e(t,r){if(!r.currentTransmux){r.currentTransmux=t;un(r,t);return}r.transmuxQueue.push(un.bind(null,r,t))};var dn=function e(t){ln("reset",t)};var cn=function e(t){ln("endTimeline",t)};var fn=function e(t){if(!t.transmuxer.currentTransmux){t.transmuxer.currentTransmux=t;sn(t);return}t.transmuxer.transmuxQueue.push(t)};var hn=function e(t){var r=new tn;r.currentTransmux=null;r.transmuxQueue=[];var i=r.terminate;r.terminate=function(){r.currentTransmux=null;r.transmuxQueue.length=0;return i.call(r)};r.postMessage({action:"init",options:t});return r};var pn={reset:dn,endTimeline:cn,transmux:fn,createTransmuxer:hn};var vn=function e(t){var r=t.transmuxer;var i=t.endAction||t.action;var n=t.callback;var a=y({},t,{endAction:null,transmuxer:null,callback:null});var s=function e(a){if(a.data.action!==i){return}r.removeEventListener("message",e);if(a.data.data){a.data.data=new Uint8Array(a.data.data,t.byteOffset||0,t.byteLength||a.data.data.byteLength);if(t.data){t.data=a.data.data}}n(a.data)};r.addEventListener("message",s);if(t.data){var o=t.data instanceof ArrayBuffer;a.byteOffset=o?0:t.data.byteOffset;a.byteLength=t.data.byteLength;var u=[o?t.data:t.data.buffer];r.postMessage(a,u)}else{r.postMessage(a)}};var mn={FAILURE:2,TIMEOUT:-101,ABORTED:-102};var gn=function e(t){t.forEach(function(e){e.abort()})};var yn=function e(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}};var _n=function e(t){var r=t.target;var i=Date.now()-r.requestTime;var n={bandwidth:Infinity,bytesReceived:0,roundTripTime:i||0};n.bytesReceived=t.loaded;n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3);return n};var bn=function e(t,r){if(r.timedout){return{status:r.status,message:"HLS request timed-out at URL: "+r.uri,code:mn.TIMEOUT,xhr:r}}if(r.aborted){return{status:r.status,message:"HLS request aborted at URL: "+r.uri,code:mn.ABORTED,xhr:r}}if(t){return{status:r.status,message:"HLS request errored at URL: "+r.uri,code:mn.FAILURE,xhr:r}}if(r.responseType==="arraybuffer"&&r.response.byteLength===0){return{status:r.status,message:"Empty HLS response at URL: "+r.uri,code:mn.FAILURE,xhr:r}}return null};var Tn=function e(t,r,i){return function(e,n){var a=n.response;var s=bn(e,n);if(s){return i(s,t)}if(a.byteLength!==16){return i({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:mn.FAILURE,xhr:n},t)}var o=new DataView(a);var u=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(var l=0;l<r.length;l++){r[l].bytes=u}return i(null,t)}};var Sn=function e(t,r){var i=Ri(t.map.bytes);if(i!=="mp4"){var n=t.map.resolvedUri||t.map.uri;return r({internal:true,message:"Found unsupported "+(i||"unknown")+" container for initialization segment at URL: "+n,code:mn.FAILURE})}vn({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:function e(i){var n=i.tracks,a=i.data;t.map.bytes=a;n.forEach(function(e){t.map.tracks=t.map.tracks||{};if(t.map.tracks[e.type]){return}t.map.tracks[e.type]=e;if(typeof e.id==="number"&&e.timescale){t.map.timescales=t.map.timescales||{};t.map.timescales[e.id]=e.timescale}});return r(null)}})};var En=function e(t){var r=t.segment,i=t.finishProcessingFn;return function(e,t){var n=bn(e,t);if(n){return i(n,r)}var a=new Uint8Array(t.response);if(r.map.key){r.map.encryptedBytes=a;return i(null,r)}r.map.bytes=a;Sn(r,function(e){if(e){e.xhr=t;e.status=t.status;return i(e,r)}i(null,r)})}};var In=function e(t){var r=t.segment,i=t.finishProcessingFn,n=t.responseType;return function(e,t){var a=bn(e,t);if(a){return i(a,r)}var s=n==="arraybuffer"||!t.responseText?t.response:zi(t.responseText.substring(r.lastReachedChar||0));r.stats=yn(t);if(r.key){r.encryptedBytes=new Uint8Array(s)}else{r.bytes=new Uint8Array(s)}return i(null,r)}};var Cn=function e(t){var r=t.segment,i=t.bytes,n=t.trackInfoFn,a=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,d=t.isEndOfTimeline,c=t.endedTimelineFn,f=t.dataFn,h=t.doneFn,p=t.onTransmuxerLog;var v=r.map&&r.map.tracks||{};var m=Boolean(v.audio&&v.video);var g=a.bind(null,r,"audio","start");var y=a.bind(null,r,"audio","end");var _=a.bind(null,r,"video","start");var b=a.bind(null,r,"video","end");var T=function e(){return fn({bytes:i,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:m,onData:function e(t){t.type=t.type==="combined"?"video":t.type;f(r,t)},onTrackInfo:function e(t){if(n){if(m){t.isMuxed=true}n(r,t)}},onAudioTimingInfo:function e(t){if(g&&typeof t.start!=="undefined"){g(t.start);g=null}if(y&&typeof t.end!=="undefined"){y(t.end)}},onVideoTimingInfo:function e(t){if(_&&typeof t.start!=="undefined"){_(t.start);_=null}if(b&&typeof t.end!=="undefined"){b(t.end)}},onVideoSegmentTimingInfo:function e(t){s(t)},onAudioSegmentTimingInfo:function e(t){o(t)},onId3:function e(t,i){u(r,t,i)},onCaptions:function e(t){l(r,[t])},isEndOfTimeline:d,onEndedTimeline:function e(){c()},onTransmuxerLog:p,onDone:function e(t){if(!h){return}t.type=t.type==="combined"?"video":t.type;h(null,r,t)}})};vn({action:"probeTs",transmuxer:r.transmuxer,data:i,baseStartTime:r.baseStartTime,callback:function e(t){r.bytes=i=t.data;var a=t.result;if(a){n(r,{hasAudio:a.hasAudio,hasVideo:a.hasVideo,isMuxed:m});n=null;if(a.hasAudio&&!m){g(a.audioStart)}if(a.hasVideo){_(a.videoStart)}g=null;_=null}T()}})};var kn=function e(t){var r=t.segment,i=t.bytes,n=t.trackInfoFn,a=t.timingInfoFn,o=t.videoSegmentTimingInfoFn,u=t.audioSegmentTimingInfoFn,l=t.id3Fn,d=t.captionsFn,c=t.isEndOfTimeline,f=t.endedTimelineFn,h=t.dataFn,p=t.doneFn,v=t.onTransmuxerLog;var m=new Uint8Array(i);if(Ni(m)){r.isFmp4=true;var g=r.map.tracks;var y={isFmp4:true,hasVideo:!!g.video,hasAudio:!!g.audio};if(g.audio&&g.audio.codec&&g.audio.codec!=="enca"){y.audioCodec=g.audio.codec}if(g.video&&g.video.codec&&g.video.codec!=="encv"){y.videoCodec=g.video.codec}if(g.video&&g.audio){y.isMuxed=true}n(r,y);var _=function e(t){h(r,{data:m,type:y.hasAudio&&!y.isMuxed?"audio":"video"});if(t&&t.length){d(r,t)}p(null,r,{})};vn({action:"probeMp4StartTime",timescales:r.map.timescales,data:m,transmuxer:r.transmuxer,callback:function e(t){var n=t.data,o=t.startTime;i=n.buffer;r.bytes=m=n;if(y.hasAudio&&!y.isMuxed){a(r,"audio","start",o)}if(y.hasVideo){a(r,"video","start",o)}if(!g.video||!n.byteLength||!r.transmuxer){_();return}vn({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:m,timescales:r.map.timescales,trackIds:[g.video.id],callback:function e(t){i=t.data.buffer;r.bytes=m=t.data;t.logs.forEach(function(e){v(s["default"].mergeOptions(e,{stream:"mp4CaptionParser"}))});_(t.captions)}})}});return}if(!r.transmuxer){p(null,r,{});return}if(typeof r.container==="undefined"){r.container=Ri(m)}if(r.container!=="ts"&&r.container!=="aac"){n(r,{hasAudio:false,hasVideo:false});p(null,r,{});return}Cn({segment:r,bytes:i,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:l,captionsFn:d,isEndOfTimeline:c,endedTimelineFn:f,dataFn:h,doneFn:p,onTransmuxerLog:v})};var wn=function e(t,r){var i=t.id,n=t.key,a=t.encryptedBytes,s=t.decryptionWorker;var o=function e(t){if(t.data.source===i){s.removeEventListener("message",e);var n=t.data.decrypted;r(new Uint8Array(n.bytes,n.byteOffset,n.byteLength))}};s.addEventListener("message",o);var u;if(n.bytes.slice){u=n.bytes.slice()}else{u=new Uint32Array(Array.prototype.slice.call(n.bytes))}s.postMessage(bt({source:i,encrypted:a,key:u,iv:n.iv}),[a.buffer,u.buffer])};var An=function e(t){var r=t.decryptionWorker,i=t.segment,n=t.trackInfoFn,a=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,d=t.isEndOfTimeline,c=t.endedTimelineFn,f=t.dataFn,h=t.doneFn,p=t.onTransmuxerLog;wn({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:r},function(e){i.bytes=e;kn({segment:i,bytes:i.bytes,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:c,dataFn:f,doneFn:h,onTransmuxerLog:p})})};var Pn=function e(t){var r=t.activeXhrs,i=t.decryptionWorker,n=t.trackInfoFn,a=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,d=t.isEndOfTimeline,c=t.endedTimelineFn,f=t.dataFn,h=t.doneFn,p=t.onTransmuxerLog;var v=0;var m=false;return function(e,t){if(m){return}if(e){m=true;gn(r);return h(e,t)}v+=1;if(v===r.length){var g=function e(){if(t.encryptedBytes){return An({decryptionWorker:i,segment:t,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:c,dataFn:f,doneFn:h,onTransmuxerLog:p})}kn({segment:t,bytes:t.bytes,trackInfoFn:n,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:c,dataFn:f,doneFn:h,onTransmuxerLog:p})};t.endOfAllRequests=Date.now();if(t.map&&t.map.encryptedBytes&&!t.map.bytes){return wn({decryptionWorker:i,id:t.requestId+"-init",encryptedBytes:t.map.encryptedBytes,key:t.map.key},function(e){t.map.bytes=e;Sn(t,function(e){if(e){gn(r);return h(e,t)}g()})})}g()}}};var On=function e(t){var r=t.loadendState,i=t.abortFn;return function(e){var t=e.target;if(t.aborted&&i&&!r.calledAbortFn){i();r.calledAbortFn=true}}};var xn=function e(t){var r=t.segment,i=t.progressFn;t.trackInfoFn;t.timingInfoFn;t.videoSegmentTimingInfoFn;t.audioSegmentTimingInfoFn;t.id3Fn;t.captionsFn;t.isEndOfTimeline;t.endedTimelineFn;t.dataFn;return function(e){var t=e.target;if(t.aborted){return}r.stats=s["default"].mergeOptions(r.stats,_n(e));if(!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived){r.stats.firstBytesReceivedAt=Date.now()}return i(e,r)}};var Dn=function e(t){var r=t.xhr,i=t.xhrOptions,n=t.decryptionWorker,a=t.segment,o=t.abortFn,u=t.progressFn,l=t.trackInfoFn,d=t.timingInfoFn,c=t.videoSegmentTimingInfoFn,f=t.audioSegmentTimingInfoFn,h=t.id3Fn,p=t.captionsFn,v=t.isEndOfTimeline,m=t.endedTimelineFn,g=t.dataFn,y=t.doneFn,_=t.onTransmuxerLog;var b=[];var T=Pn({activeXhrs:b,decryptionWorker:n,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:f,id3Fn:h,captionsFn:p,isEndOfTimeline:v,endedTimelineFn:m,dataFn:g,doneFn:y,onTransmuxerLog:_});if(a.key&&!a.key.bytes){var S=[a.key];if(a.map&&!a.map.bytes&&a.map.key&&a.map.key.resolvedUri===a.key.resolvedUri){S.push(a.map.key)}var E=s["default"].mergeOptions(i,{uri:a.key.resolvedUri,responseType:"arraybuffer"});var I=Tn(a,S,T);var C=r(E,I);b.push(C)}if(a.map&&!a.map.bytes){var k=a.map.key&&(!a.key||a.key.resolvedUri!==a.map.key.resolvedUri);if(k){var w=s["default"].mergeOptions(i,{uri:a.map.key.resolvedUri,responseType:"arraybuffer"});var A=Tn(a,[a.map.key],T);var P=r(w,A);b.push(P)}var O=s["default"].mergeOptions(i,{uri:a.map.resolvedUri,responseType:"arraybuffer",headers:tt(a.map)});var x=En({segment:a,finishProcessingFn:T});var D=r(O,x);b.push(D)}var L=s["default"].mergeOptions(i,{uri:a.part&&a.part.resolvedUri||a.resolvedUri,responseType:"arraybuffer",headers:tt(a)});var R=In({segment:a,finishProcessingFn:T,responseType:L.responseType});var N=r(L,R);N.addEventListener("progress",xn({segment:a,progressFn:u,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:f,id3Fn:h,captionsFn:p,isEndOfTimeline:v,endedTimelineFn:m,dataFn:g}));b.push(N);var M={};b.forEach(function(e){e.addEventListener("loadend",On({loadendState:M,abortFn:o}))});return function(){return gn(b)}};var Ln=g("CodecUtils");var Rn=function e(t){var r=t.attributes||{};if(r.CODECS){return M(r.CODECS)}};var Nn=function e(t,r){var i=r.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&i.AUDIO&&t.mediaGroups.AUDIO[i.AUDIO]};var Mn=function e(t,r){if(!Nn(t,r)){return true}var i=r.attributes||{};var n=t.mediaGroups.AUDIO[i.AUDIO];for(var a in n){if(!n[a].uri&&!n[a].playlists){return true}}return false};var Un=function e(t){var r={};t.forEach(function(e){var t=e.mediaType,i=e.type,n=e.details;r[t]=r[t]||[];r[t].push(N(""+i+n))});Object.keys(r).forEach(function(e){if(r[e].length>1){Ln("multiple "+e+" codecs found as attributes: "+r[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.");r[e]=null;return}r[e]=r[e][0]});return r};var Bn=function e(t){var r=0;if(t.audio){r++}if(t.video){r++}return r};var Fn=function e(t,r){var i=r.attributes||{};var n=Un(Rn(r)||[]);if(Nn(t,r)&&!n.audio){if(!Mn(t,r)){var a=Un(U(t,i.AUDIO)||[]);if(a.audio){n.audio=a.audio}}}return n};var jn=g("PlaylistSelector");var Vn=function e(t){if(!t||!t.playlist){return}var r=t.playlist;return JSON.stringify({id:r.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:r.attributes&&r.attributes.CODECS||""})};var qn=function t(r,i){if(!r){return""}var n=e.getComputedStyle(r);if(!n){return""}return n[i]};var Hn=function e(t,r){var i=t.slice();t.sort(function(e,t){var n=r(e,t);if(n===0){return i.indexOf(e)-i.indexOf(t)}return n})};var Wn=function t(r,i){var n;var a;if(r.attributes.BANDWIDTH){n=r.attributes.BANDWIDTH}n=n||e.Number.MAX_VALUE;if(i.attributes.BANDWIDTH){a=i.attributes.BANDWIDTH}a=a||e.Number.MAX_VALUE;return n-a};var Gn=function t(r,i){var n;var a;if(r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width){n=r.attributes.RESOLUTION.width}n=n||e.Number.MAX_VALUE;if(i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width){a=i.attributes.RESOLUTION.width}a=a||e.Number.MAX_VALUE;if(n===a&&r.attributes.BANDWIDTH&&i.attributes.BANDWIDTH){return r.attributes.BANDWIDTH-i.attributes.BANDWIDTH}return n-a};var Kn=function t(r,i,n,a,s,o){if(!r){return}var u={bandwidth:i,width:n,height:a,limitRenditionByPlayerDimensions:s};var l=r.playlists;if(Pe.isAudioOnly(r)){l=o.getAudioTrackPlaylists_();u.audioOnly=true}var d=l.map(function(t){var r;var i=t.attributes&&t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width;var n=t.attributes&&t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height;r=t.attributes&&t.attributes.BANDWIDTH;r=r||e.Number.MAX_VALUE;return{bandwidth:r,width:i,height:n,playlist:t}});Hn(d,function(e,t){return e.bandwidth-t.bandwidth});d=d.filter(function(e){return!Pe.isIncompatible(e.playlist)});var c=d.filter(function(e){return Pe.isEnabled(e.playlist)});if(!c.length){c=d.filter(function(e){return!Pe.isDisabled(e.playlist)})}var f=c.filter(function(e){return e.bandwidth*Yi.BANDWIDTH_VARIANCE<i});var h=f[f.length-1];var p=f.filter(function(e){return e.bandwidth===h.bandwidth})[0];if(s===false){var v=p||c[0]||d[0];if(v&&v.playlist){var m="sortedPlaylistReps";if(p){m="bandwidthBestRep"}if(c[0]){m="enabledPlaylistReps"}jn("choosing "+Vn(v)+" using "+m+" with options",u);return v.playlist}jn("could not choose a playlist with options",u);return null}var g=f.filter(function(e){return e.width&&e.height});Hn(g,function(e,t){return e.width-t.width});var y=g.filter(function(e){return e.width===n&&e.height===a});h=y[y.length-1];var _=y.filter(function(e){return e.bandwidth===h.bandwidth})[0];var b;var T;var S;if(!_){b=g.filter(function(e){return e.width>n||e.height>a});T=b.filter(function(e){return e.width===b[0].width&&e.height===b[0].height});h=T[T.length-1];S=T.filter(function(e){return e.bandwidth===h.bandwidth})[0]}var E;if(o.experimentalLeastPixelDiffSelector){var I=g.map(function(e){e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-a);return e});Hn(I,function(e,t){if(e.pixelDiff===t.pixelDiff){return t.bandwidth-e.bandwidth}return e.pixelDiff-t.pixelDiff});E=I[0]}var C=E||S||_||p||c[0]||d[0];if(C&&C.playlist){var k="sortedPlaylistReps";if(E){k="leastPixelDiffRep"}else if(S){k="resolutionPlusOneRep"}else if(_){k="resolutionBestRep"}else if(p){k="bandwidthBestRep"}else if(c[0]){k="enabledPlaylistReps"}jn("choosing "+Vn(C)+" using "+k+" with options",u);return C.playlist}jn("could not choose a playlist with options",u);return null};var Yn=function t(){var r=this.useDevicePixelRatio?e.devicePixelRatio||1:1;return Kn(this.playlists.master,this.systemBandwidth,parseInt(qn(this.tech_.el(),"width"),10)*r,parseInt(qn(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)};var zn=function t(r){var i=-1;var n=-1;if(r<0||r>1){throw new Error("Moving average bandwidth decay must be between 0 and 1.")}return function(){var t=this.useDevicePixelRatio?e.devicePixelRatio||1:1;if(i<0){i=this.systemBandwidth;n=this.systemBandwidth}if(this.systemBandwidth>0&&this.systemBandwidth!==n){i=r*this.systemBandwidth+(1-r)*i;n=this.systemBandwidth}return Kn(this.playlists.master,i,parseInt(qn(this.tech_.el(),"width"),10)*t,parseInt(qn(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}};var Xn=function e(t){var r=t.master,i=t.currentTime,n=t.bandwidth,a=t.duration,s=t.segmentDuration,o=t.timeUntilRebuffer,u=t.currentTimeline,l=t.syncController;var d=r.playlists.filter(function(e){return!Pe.isIncompatible(e)});var c=d.filter(Pe.isEnabled);if(!c.length){c=d.filter(function(e){return!Pe.isDisabled(e)})}var f=c.filter(Pe.hasAttribute.bind(null,"BANDWIDTH"));var h=f.map(function(e){var t=l.getSyncPoint(e,a,u,i);var r=t?1:2;var d=Pe.estimateSegmentRequestTime(s,n,e);var c=d*r-o;return{playlist:e,rebufferingImpact:c}});var p=h.filter(function(e){return e.rebufferingImpact<=0});Hn(p,function(e,t){return Wn(t.playlist,e.playlist)});if(p.length){return p[0]}Hn(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact});return h[0]||null};var Qn=function e(){var t=this;var r=this.playlists.master.playlists.filter(Pe.isEnabled);Hn(r,function(e,t){return Wn(e,t)});var i=r.filter(function(e){return!!Fn(t.playlists.master,e).video});return i[0]||null};var $n=function e(t){var r=0;var i;if(t.bytes){i=new Uint8Array(t.bytes);t.segments.forEach(function(e){i.set(e,r);r+=e.byteLength})}return i};var Jn=function e(t,r,i){if(!t[i]){r.trigger({type:"usage",name:"vhs-608"});r.trigger({type:"usage",name:"hls-608"});var n=i;if(/^cc708_/.test(i)){n="SERVICE"+i.split("_")[1]}var a=r.textTracks().getTrackById(n);if(a){t[i]=a}else{var s=r.options_.vhs&&r.options_.vhs.captionServices||{};var o=i;var u=i;var l=false;var d=s[n];if(d){o=d.label;u=d.language;l=d.default}t[i]=r.addRemoteTextTrack({kind:"captions",id:n,default:l,label:o,language:u},false).track}}};var Zn=function t(r){var i=r.inbandTextTracks,n=r.captionArray,a=r.timestampOffset;if(!n){return}var s=e.WebKitDataCue||e.VTTCue;n.forEach(function(e){var t=e.stream;i[t].addCue(new s(e.startTime+a,e.endTime+a,e.text))})};var ea=function e(t){Object.defineProperties(t.frame,{id:{get:function e(){s["default"].log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return t.value.key}},value:{get:function e(){s["default"].log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return t.value.data}},privateData:{get:function e(){s["default"].log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return t.value.data}}})};var ta=function t(r){var i=r.inbandTextTracks,n=r.metadataArray,a=r.timestampOffset,s=r.videoDuration;if(!n){return}var o=e.WebKitDataCue||e.VTTCue;var u=i.metadataTrack_;if(!u){return}n.forEach(function(t){var r=t.cueTime+a;if(typeof r!=="number"||e.isNaN(r)||r<0||!(r<Infinity)){return}t.frames.forEach(function(e){var t=new o(r,r,e.value||e.url||e.data||"");t.frame=e;t.value=e;ea(t);u.addCue(t)})});if(!u.cues||!u.cues.length){return}var l=u.cues;var d=[];for(var c=0;c<l.length;c++){if(l[c]){d.push(l[c])}}var f=d.reduce(function(e,t){var r=e[t.startTime]||[];r.push(t);e[t.startTime]=r;return e},{});var h=Object.keys(f).sort(function(e,t){return Number(e)-Number(t)});h.forEach(function(e,t){var r=f[e];var i=Number(h[t+1])||s;r.forEach(function(e){e.endTime=i})})};var ra=function e(t,r,i){if(t.metadataTrack_){return}t.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},false).track;t.metadataTrack_.inBandMetadataTrackDispatchType=r};var ia=function e(t,r,i){var n;var a;if(!i){return}if(!i.cues){return}n=i.cues.length;while(n--){a=i.cues[n];if(a.startTime>=t&&a.endTime<=r){i.removeCue(a)}}};var na=function e(t){var r=t.cues;if(!r){return}for(var i=0;i<r.length;i++){var n=[];var a=0;for(var s=0;s<r.length;s++){if(r[i].startTime===r[s].startTime&&r[i].endTime===r[s].endTime&&r[i].text===r[s].text){a++;if(a>1){n.push(r[s])}}}if(n.length){n.forEach(function(e){return t.removeCue(e)})}}};var aa=9e4,sa,oa,ua,la,da,ca,fa;sa=function e(t){return t*aa};oa=function e(t,r){return t*r};ua=function e(t){return t/aa};la=function e(t,r){return t/r};da=function e(t,r){return sa(la(t,r))};ca=function e(t,r){return oa(ua(t),r)};fa=function e(t,r,i){return ua(i?t:t-r)};var ha={ONE_SECOND_IN_TS:aa,secondsToVideoTs:sa,secondsToAudioTs:oa,videoTsToSeconds:ua,audioTsToSeconds:la,audioTsToVideoTs:da,videoTsToAudioTs:ca,metadataTsToSeconds:fa};var pa=function e(t,r,i){if(typeof r==="undefined"||r===null||!t.length){return[]}var n=Math.ceil((r-i+3)*ha.ONE_SECOND_IN_TS);var a;for(a=0;a<t.length;a++){if(t[a].pts>n){break}}return t.slice(a)};var va=function e(t,r,i){if(!r.length){return t}if(i){return r.slice()}var n=r[0].pts;var a=0;for(a;a<t.length;a++){if(t[a].pts>=n){break}}return t.slice(0,a).concat(r)};var ma=function e(t,r,i,n){var a=Math.ceil((r-n)*ha.ONE_SECOND_IN_TS);var s=Math.ceil((i-n)*ha.ONE_SECOND_IN_TS);var o=t.slice();var u=t.length;while(u--){if(t[u].pts<=s){break}}if(u===-1){return o}var l=u+1;while(l--){if(t[l].pts<=a){break}}l=Math.max(l,0);o.splice(l,u-l+1);return o};var ga=function e(t,r){if(!t&&!r||!t&&r||t&&!r){return false}if(t===r){return true}var i=Object.keys(t).sort();var n=Object.keys(r).sort();if(i.length!==n.length){return false}for(var a=0;a<i.length;a++){var s=i[a];if(s!==n[a]){return false}if(t[s]!==r[s]){return false}}return true};var ya=22;var _a=function e(t,r,i){r=r||[];var n=[];var a=0;for(var s=0;s<r.length;s++){var o=r[s];if(t===o.timeline){n.push(s);a+=o.duration;if(a>i){return s}}}if(n.length===0){return 0}return n[n.length-1]};var ba=1;var Ta=500;var Sa=function e(t){return typeof t==="number"&&isFinite(t)};var Ea=1/60;var Ia=function e(t,r,i){if(t!=="main"||!r||!i){return null}if(!i.hasAudio&&!i.hasVideo){return"Neither audio nor video found in segment."}if(r.hasVideo&&!i.hasVideo){return"Only audio found in segment when we expected video."+" We can't switch to audio only from a stream that had video."+" To get rid of this message, please add codec information to the manifest."}if(!r.hasVideo&&i.hasVideo){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 Ca=function e(t,r,i){var n=r-Yi.BACK_BUFFER_LENGTH;if(t.length){n=Math.max(n,t.start(0))}var a=r-i;return Math.min(a,n)};var ka=function e(t){var r=t.startOfSegment,i=t.duration,n=t.segment,a=t.part,s=t.playlist,o=s.mediaSequence,u=s.id,l=s.segments,d=l===void 0?[]:l,c=t.mediaIndex,f=t.partIndex,h=t.timeline;var p=d.length-1;var v="mediaIndex/partIndex increment";if(t.getMediaInfoForTime){v="getMediaInfoForTime ("+t.getMediaInfoForTime+")"}else if(t.isSyncRequest){v="getSyncSegmentCandidate (isSyncRequest)"}if(t.independent){v+=" with independent "+t.independent}var m=typeof f==="number";var g=t.segment.uri?"segment":"pre-segment";var y=m?ue({preloadSegment:n})-1:0;return g+" ["+(o+c)+"/"+(o+p)+"]"+(m?" part ["+f+"/"+y+"]":"")+(" segment start/end ["+n.start+" => "+n.end+"]")+(m?" part start/end ["+a.start+" => "+a.end+"]":"")+(" startOfSegment ["+r+"]")+(" duration ["+i+"]")+(" timeline ["+h+"]")+(" selected by ["+v+"]")+(" playlist ["+u+"]")};var wa=function e(t){return t+"TimingInfo"};var Aa=function e(t){var r=t.segmentTimeline,i=t.currentTimeline,n=t.startOfSegment,a=t.buffered,s=t.overrideCheck;if(!s&&r===i){return null}if(r<i){return n}return a.length?a.end(a.length-1):n};var Pa=function e(t){var r=t.timelineChangeController,i=t.currentTimeline,n=t.segmentTimeline,a=t.loaderType,s=t.audioDisabled;if(i===n){return false}if(a==="audio"){var o=r.lastTimelineChange({type:"main"});return!o||o.to!==n}if(a==="main"&&s){var u=r.pendingTimelineChange({type:"audio"});if(u&&u.to===n){return false}return true}return false};var Oa=function t(r){var i=0;["video","audio"].forEach(function(t){var n=r[t+"TimingInfo"];if(!n){return}var a=n.start,s=n.end;var o;if(typeof a==="bigint"||typeof s==="bigint"){o=e.BigInt(s)-e.BigInt(a)}else if(typeof a==="number"&&typeof s==="number"){o=s-a}if(typeof o!=="undefined"&&o>i){i=o}});if(typeof i==="bigint"&&i<Number.MAX_SAFE_INTEGER){i=Number(i)}return i};var xa=function e(t){var r=t.segmentDuration,i=t.maxDuration;if(!r){return false}return Math.round(r)>i+G};var Da=function e(t,r){if(r!=="hls"){return null}var i=Oa({audioTimingInfo:t.audioTimingInfo,videoTimingInfo:t.videoTimingInfo});if(!i){return null}var n=t.playlist.targetDuration;var a=xa({segmentDuration:i,maxDuration:n*2});var s=xa({segmentDuration:i,maxDuration:n});var o="Segment with index "+t.mediaIndex+" "+("from playlist "+t.playlist.id+" ")+("has a duration of "+i+" ")+("when the reported duration is "+t.duration+" ")+("and the target duration is "+n+". ")+"For HLS content, a duration in excess of the target duration may result in "+"playback issues. See the HLS specification section on EXT-X-TARGETDURATION for "+"more details: "+"https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";if(a||s){return{severity:a?"warn":"info",message:o}}return null};var La=function(t){c(r,t);function r(e,r){var i;i=t.call(this)||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.partIndex=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.vhs_=e.vhs;i.loaderType_=e.loaderType;i.currentMediaInfo_=void 0;i.startingMediaInfo_=void 0;i.segmentMetadataTrack_=e.segmentMetadataTrack;i.goalBufferLength_=e.goalBufferLength;i.sourceType_=e.sourceType;i.sourceUpdater_=e.sourceUpdater;i.inbandTextTracks_=e.inbandTextTracks;i.state_="INIT";i.timelineChangeController_=e.timelineChangeController;i.shouldSaveSegmentTimingInfo_=true;i.parse708captions_=e.parse708captions;i.useDtsForTimestampOffset_=e.useDtsForTimestampOffset;i.captionServices_=e.captionServices;i.experimentalExactManifestTimings=e.experimentalExactManifestTimings;i.checkBufferTimeout_=null;i.error_=void 0;i.currentTimeline_=-1;i.pendingSegment_=null;i.xhrOptions_=null;i.pendingSegments_=[];i.audioDisabled_=false;i.isPendingTimestampOffset_=false;i.gopBuffer_=[];i.timeMapping_=0;i.safeAppend_=s["default"].browser.IE_VERSION>=11;i.appendInitSegment_={audio:true,video:true};i.playlistOfLastInitSegment_={audio:null,video:null};i.callQueue_=[];i.loadQueue_=[];i.metadataQueue_={id3:[],caption:[]};i.waitingOnRemove_=false;i.quotaExceededErrorRetryTimeout_=null;i.activeInitSegmentId_=null;i.initSegments_={};i.cacheEncryptionKeys_=e.cacheEncryptionKeys;i.keyCache_={};i.decrypter_=e.decrypter;i.syncController_=e.syncController;i.syncPoint_={segmentIndex:0,time:0};i.transmuxer_=i.createTransmuxer_();i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")};i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_);i.mediaSource_.addEventListener("sourceopen",function(){if(!i.isEndOfStream_()){i.ended_=false}});i.fetchAtBuffer_=false;i.logger_=g("SegmentLoader["+i.loaderType_+"]");Object.defineProperty(l(i),"state",{get:function e(){return this.state_},set:function e(t){if(t!==this.state_){this.logger_(this.state_+" -> "+t);this.state_=t;this.trigger("statechange")}}});i.sourceUpdater_.on("ready",function(){if(i.hasEnoughInfoToAppend_()){i.processCallQueue_()}});if(i.loaderType_==="main"){i.timelineChangeController_.on("pendingtimelinechange",function(){if(i.hasEnoughInfoToAppend_()){i.processCallQueue_()}})}if(i.loaderType_==="audio"){i.timelineChangeController_.on("timelinechange",function(){if(i.hasEnoughInfoToLoad_()){i.processLoadQueue_()}if(i.hasEnoughInfoToAppend_()){i.processCallQueue_()}})}return i}var i=r.prototype;i.createTransmuxer_=function e(){return pn.createTransmuxer({remux:false,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:true,parse708captions:this.parse708captions_,captionServices:this.captionServices_})};i.resetStats_=function e(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0;this.mediaAppends=0};i.dispose=function t(){this.trigger("dispose");this.state="DISPOSED";this.pause();this.abort_();if(this.transmuxer_){this.transmuxer_.terminate()}this.resetStats_();if(this.checkBufferTimeout_){e.clearTimeout(this.checkBufferTimeout_)}if(this.syncController_&&this.triggerSyncInfoUpdate_){this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_)}this.off()};i.setAudio=function e(t){this.audioDisabled_=!t;if(t){this.appendInitSegment_.audio=true}else{this.sourceUpdater_.removeAudio(0,this.duration_())}};i.abort=function e(){if(this.state!=="WAITING"){if(this.pendingSegment_){this.pendingSegment_=null}return}this.abort_();this.state="READY";if(!this.paused()){this.monitorBuffer_()}};i.abort_=function t(){if(this.pendingSegment_&&this.pendingSegment_.abortRequests){this.pendingSegment_.abortRequests()}this.pendingSegment_=null;this.callQueue_=[];this.loadQueue_=[];this.metadataQueue_.id3=[];this.metadataQueue_.caption=[];this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.waitingOnRemove_=false;e.clearTimeout(this.quotaExceededErrorRetryTimeout_);this.quotaExceededErrorRetryTimeout_=null};i.checkForAbort_=function e(t){if(this.state==="APPENDING"&&!this.pendingSegment_){this.state="READY";return true}if(!this.pendingSegment_||this.pendingSegment_.requestId!==t){return true}return false};i.error=function e(t){if(typeof t!=="undefined"){this.logger_("error occurred:",t);this.error_=t}this.pendingSegment_=null;return this.error_};i.endOfStream=function e(){this.ended_=true;if(this.transmuxer_){pn.reset(this.transmuxer_)}this.gopBuffer_.length=0;this.pause();this.trigger("ended")};i.buffered_=function e(){var t=this.getMediaInfo_();if(!this.sourceUpdater_||!t){return s["default"].createTimeRanges()}if(this.loaderType_==="main"){var r=t.hasAudio,i=t.hasVideo,n=t.isMuxed;if(i&&r&&!this.audioDisabled_&&!n){return this.sourceUpdater_.buffered()}if(i){return this.sourceUpdater_.videoBuffered()}}return this.sourceUpdater_.audioBuffered()};i.initSegmentForMap=function e(t,r){if(r===void 0){r=false}if(!t){return null}var i=Tt(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}}return n||t};i.segmentKey=function e(t,r){if(r===void 0){r=false}if(!t){return null}var i=St(t);var n=this.keyCache_[i];if(this.cacheEncryptionKeys_&&r&&!n&&t.bytes){this.keyCache_[i]=n={resolvedUri:t.resolvedUri,bytes:t.bytes}}var a={resolvedUri:(n||t).resolvedUri};if(n){a.bytes=n.bytes}return a};i.couldBeginLoading_=function e(){return this.playlist_&&!this.paused()};i.load=function e(){this.monitorBuffer_();if(!this.playlist_){return}if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"){return}this.state="READY"};i.init_=function e(){this.state="READY";this.resetEverything();return this.monitorBuffer_()};i.playlist=function e(t,r){if(r===void 0){r={}}if(!t){return}var i=this.playlist_;var n=this.pendingSegment_;this.playlist_=t;this.xhrOptions_=r;if(this.state==="INIT"){t.syncInfo={mediaSequence:t.mediaSequence,time:0};if(this.loaderType_==="main"){this.syncController_.setDateTimeMappingForStart(t)}}var a=null;if(i){if(i.id){a=i.id}else if(i.uri){a=i.uri}}this.logger_("playlist update ["+a+" => "+(t.id||t.uri)+"]");this.trigger("syncinfoupdate");if(this.state==="INIT"&&this.couldBeginLoading_()){return this.init_()}if(!i||i.uri!==t.uri){if(this.mediaIndex!==null){if(!t.endList){this.resetLoader()}else{this.resyncLoader()}}this.currentMediaInfo_=void 0;this.trigger("playlistupdate");return}var s=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+s+"]");if(this.mediaIndex!==null){this.mediaIndex-=s;if(this.mediaIndex<0){this.mediaIndex=null;this.partIndex=null}else{var o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){var u=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists.");this.resetLoader();this.mediaIndex=u}}}if(n){n.mediaIndex-=s;if(n.mediaIndex<0){n.mediaIndex=null;n.partIndex=null}else{if(n.mediaIndex>=0){n.segment=t.segments[n.mediaIndex]}if(n.partIndex>=0&&n.segment.parts){n.part=n.segment.parts[n.partIndex]}}}this.syncController_.saveExpiredSegmentInfo(i,t)};i.pause=function t(){if(this.checkBufferTimeout_){e.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=null}};i.paused=function e(){return this.checkBufferTimeout_===null};i.resetEverything=function e(t){this.ended_=false;this.appendInitSegment_={audio:true,video:true};this.resetLoader();this.remove(0,Infinity,t);if(this.transmuxer_){this.transmuxer_.postMessage({action:"clearAllMp4Captions"});this.transmuxer_.postMessage({action:"reset"})}};i.resetLoader=function e(){this.fetchAtBuffer_=false;this.resyncLoader()};i.resyncLoader=function e(){if(this.transmuxer_){pn.reset(this.transmuxer_)}this.mediaIndex=null;this.partIndex=null;this.syncPoint_=null;this.isPendingTimestampOffset_=false;this.callQueue_=[];this.loadQueue_=[];this.metadataQueue_.id3=[];this.metadataQueue_.caption=[];this.abort();if(this.transmuxer_){this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}};i.remove=function e(t,r,i,n){if(i===void 0){i=function e(){}}if(n===void 0){n=false}if(r===Infinity){r=this.duration_()}if(r<=t){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}var a=1;var s=function e(){a--;if(a===0){i()}};if(n||!this.audioDisabled_){a++;this.sourceUpdater_.removeAudio(t,r,s)}if(n||this.loaderType_==="main"){this.gopBuffer_=ma(this.gopBuffer_,t,r,this.timeMapping_);a++;this.sourceUpdater_.removeVideo(t,r,s)}for(var o in this.inbandTextTracks_){ia(t,r,this.inbandTextTracks_[o])}ia(t,r,this.segmentMetadataTrack_);s()};i.monitorBuffer_=function t(){if(this.checkBufferTimeout_){e.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=e.setTimeout(this.monitorBufferTick_.bind(this),1)};i.monitorBufferTick_=function t(){if(this.state==="READY"){this.fillBuffer_()}if(this.checkBufferTimeout_){e.clearTimeout(this.checkBufferTimeout_)}this.checkBufferTimeout_=e.setTimeout(this.monitorBufferTick_.bind(this),Ta)};i.fillBuffer_=function e(){if(this.sourceUpdater_.updating()){return}var t=this.chooseNextRequest_();if(!t){return}if(typeof t.timestampOffset==="number"){this.isPendingTimestampOffset_=false;this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline})}this.loadSegment_(t)};i.isEndOfStream_=function e(t,r,i){if(t===void 0){t=this.mediaIndex}if(r===void 0){r=this.playlist_}if(i===void 0){i=this.partIndex}if(!r||!this.mediaSource_){return false}var n=typeof t==="number"&&r.segments[t];var a=t+1===r.segments.length;var s=!n||!n.parts||i+1===n.parts.length;return r.endList&&this.mediaSource_.readyState==="open"&&a&&s};i.chooseNextRequest_=function e(){var t=this.buffered_();var r=re(t)||0;var i=ie(t,this.currentTime_());var n=!this.hasPlayed_()&&i>=1;var a=i>=this.goalBufferLength_();var s=this.playlist_.segments;if(!s.length||n||a){return null}this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(o.isSyncRequest){o.mediaIndex=_a(this.currentTimeline_,s,r)}else if(this.mediaIndex!==null){var u=s[this.mediaIndex];var l=typeof this.partIndex==="number"?this.partIndex:-1;o.startOfSegment=u.end?u.end:r;if(u.parts&&u.parts[l+1]){o.mediaIndex=this.mediaIndex;o.partIndex=l+1}else{o.mediaIndex=this.mediaIndex+1}}else{var d=Pe.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?r:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),c=d.segmentIndex,f=d.startTime,h=d.partIndex;o.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+r:"currentTime "+this.currentTime_();o.mediaIndex=c;o.startOfSegment=f;o.partIndex=h}var p=s[o.mediaIndex];var v=p&&typeof o.partIndex==="number"&&p.parts&&p.parts[o.partIndex];if(!p||typeof o.partIndex==="number"&&!v){return null}if(typeof o.partIndex!=="number"&&p.parts){o.partIndex=0;v=p.parts[0]}if(!i&&v&&!v.independent){if(o.partIndex===0){var m=s[o.mediaIndex-1];var g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];if(g&&g.independent){o.mediaIndex-=1;o.partIndex=m.parts.length-1;o.independent="previous segment"}}else if(p.parts[o.partIndex-1].independent){o.partIndex-=1;o.independent="previous part"}}var y=this.mediaSource_&&this.mediaSource_.readyState==="ended";if(o.mediaIndex>=s.length-1&&y&&!this.seeking_()){return null}return this.generateSegmentInfo_(o)};i.generateSegmentInfo_=function e(t){var r=t.independent,i=t.playlist,n=t.mediaIndex,a=t.startOfSegment,s=t.isSyncRequest,o=t.partIndex,u=t.forceTimestampOffset,l=t.getMediaInfoForTime;var d=i.segments[n];var c=typeof o==="number"&&d.parts[o];var f={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||d.resolvedUri,mediaIndex:n,partIndex:c?o:null,isSyncRequest:s,startOfSegment:a,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:c&&c.duration||d.duration,segment:d,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:r};var h=typeof u!=="undefined"?u:this.isPendingTimestampOffset_;f.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:h});var p=re(this.sourceUpdater_.audioBuffered());if(typeof p==="number"){f.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()}if(this.sourceUpdater_.videoBuffered().length){f.gopsToAlignWith=pa(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)}return f};i.timestampOffsetForSegment_=function e(t){return Aa(t)};i.earlyAbortWhenNeeded_=function e(t){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH){return}if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3){return}var r=this.currentTime_();var i=t.bandwidth;var n=this.pendingSegment_.duration;var a=Pe.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived);var s=Z(this.buffered_(),r,this.vhs_.tech_.playbackRate())-1;if(a<=s){return}var o=Xn({master:this.vhs_.playlists.master,currentTime:r,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o){return}var u=a-s;var l=u-o.rebufferingImpact;var d=.5;if(s<=G){d=1}if(!o.playlist||o.playlist.uri===this.playlist_.uri||l<d){return}this.bandwidth=o.playlist.attributes.BANDWIDTH*Yi.BANDWIDTH_VARIANCE+1;this.trigger("earlyabort")};i.handleAbort_=function e(t){this.logger_("Aborting "+ka(t));this.mediaRequestsAborted+=1};i.handleProgress_=function e(t,r){this.earlyAbortWhenNeeded_(r.stats);if(this.checkForAbort_(r.requestId)){return}this.trigger("progress")};i.handleTrackInfo_=function e(t,r){this.earlyAbortWhenNeeded_(t.stats);if(this.checkForAbort_(t.requestId)){return}if(this.checkForIllegalMediaSwitch(r)){return}r=r||{};if(!ga(this.currentMediaInfo_,r)){this.appendInitSegment_={audio:true,video:true};this.startingMediaInfo_=r;this.currentMediaInfo_=r;this.logger_("trackinfo update",r);this.trigger("trackinfo")}if(this.checkForAbort_(t.requestId)){return}this.pendingSegment_.trackInfo=r;if(this.hasEnoughInfoToAppend_()){this.processCallQueue_()}};i.handleTimingInfo_=function e(t,r,i,n){this.earlyAbortWhenNeeded_(t.stats);if(this.checkForAbort_(t.requestId)){return}var a=this.pendingSegment_;var s=wa(r);a[s]=a[s]||{};a[s][i]=n;this.logger_("timinginfo: "+r+" - "+i+" - "+n);if(this.hasEnoughInfoToAppend_()){this.processCallQueue_()}};i.handleCaptions_=function e(t,r){var i=this;this.earlyAbortWhenNeeded_(t.stats);if(this.checkForAbort_(t.requestId)){return}if(r.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}var n=this.pendingSegment_;if(!n.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,r));return}var a=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();var s={};r.forEach(function(e){s[e.stream]=s[e.stream]||{startTime:Infinity,captions:[],endTime:0};var t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+a);t.endTime=Math.max(t.endTime,e.endTime+a);t.captions.push(e)});Object.keys(s).forEach(function(e){var t=s[e],r=t.startTime,n=t.endTime,o=t.captions;var u=i.inbandTextTracks_;i.logger_("adding cues from "+r+" -> "+n+" for "+e);Jn(u,i.vhs_.tech_,e);ia(r,n,u[e]);Zn({captionArray:o,inbandTextTracks:u,timestampOffset:a})});if(this.transmuxer_){this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}};i.handleId3_=function e(t,r,i){this.earlyAbortWhenNeeded_(t.stats);if(this.checkForAbort_(t.requestId)){return}var n=this.pendingSegment_;if(!n.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,r,i));return}var a=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();ra(this.inbandTextTracks_,i,this.vhs_.tech_);ta({inbandTextTracks:this.inbandTextTracks_,metadataArray:r,timestampOffset:a,videoDuration:this.duration_()})};i.processMetadataQueue_=function e(){this.metadataQueue_.id3.forEach(function(e){return e()});this.metadataQueue_.caption.forEach(function(e){return e()});this.metadataQueue_.id3=[];this.metadataQueue_.caption=[]};i.processCallQueue_=function e(){var t=this.callQueue_;this.callQueue_=[];t.forEach(function(e){return e()})};i.processLoadQueue_=function e(){var t=this.loadQueue_;this.loadQueue_=[];t.forEach(function(e){return e()})};i.hasEnoughInfoToLoad_=function e(){if(this.loaderType_!=="audio"){return true}var t=this.pendingSegment_;if(!t){return false}if(!this.getCurrentMediaInfo_()){return true}if(Pa({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})){return false}return true};i.getCurrentMediaInfo_=function e(t){if(t===void 0){t=this.pendingSegment_}return t&&t.trackInfo||this.currentMediaInfo_};i.getMediaInfo_=function e(t){if(t===void 0){t=this.pendingSegment_}return this.getCurrentMediaInfo_(t)||this.startingMediaInfo_};i.hasEnoughInfoToAppend_=function e(){if(!this.sourceUpdater_.ready()){return false}if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_){return false}var t=this.pendingSegment_;var r=this.getCurrentMediaInfo_();if(!t||!r){return false}var i=r.hasAudio,n=r.hasVideo,a=r.isMuxed;if(n&&!t.videoTimingInfo){return false}if(i&&!this.audioDisabled_&&!a&&!t.audioTimingInfo){return false}if(Pa({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})){return false}return true};i.handleData_=function e(t,r){this.earlyAbortWhenNeeded_(t.stats);if(this.checkForAbort_(t.requestId)){return}if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,t,r));return}var i=this.pendingSegment_;this.setTimeMapping_(i.timeline);this.updateMediaSecondsLoaded_(i.part||i.segment);if(this.mediaSource_.readyState==="closed"){return}if(t.map){t.map=this.initSegmentForMap(t.map,true);i.segment.map=t.map}if(t.key){this.segmentKey(t.key,true)}i.isFmp4=t.isFmp4;i.timingInfo=i.timingInfo||{};if(i.isFmp4){this.trigger("fmp4");i.timingInfo.start=i[wa(r.type)].start}else{var n=this.getCurrentMediaInfo_();var a=this.loaderType_==="main"&&n&&n.hasVideo;var s;if(a){s=i.videoTimingInfo.start}i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}this.updateAppendInitSegmentStatus(i,r.type);this.updateSourceBufferTimestampOffset_(i);if(i.isSyncRequest){this.updateTimingInfoEnd_(i);this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:this.loaderType_==="main"});var o=this.chooseNextRequest_();if(o.mediaIndex!==i.mediaIndex||o.partIndex!==i.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}i.hasAppendedData_=true;this.processMetadataQueue_();this.appendData_(i,r)};i.updateAppendInitSegmentStatus=function e(t,r){if(this.loaderType_==="main"&&typeof t.timestampOffset==="number"&&!t.changedTimestampOffset){this.appendInitSegment_={audio:true,video:true}}if(this.playlistOfLastInitSegment_[r]!==t.playlist){this.appendInitSegment_[r]=true}};i.getInitSegmentAndUpdateState_=function e(t){var r=t.type,i=t.initSegment,n=t.map,a=t.playlist;if(n){var s=Tt(n);if(this.activeInitSegmentId_===s){return null}i=this.initSegmentForMap(n,true).bytes;this.activeInitSegmentId_=s}if(i&&this.appendInitSegment_[r]){this.playlistOfLastInitSegment_[r]=a;this.appendInitSegment_[r]=false;this.activeInitSegmentId_=null;return i}return null};i.handleQuotaExceededError_=function t(r,i){var n=this;var a=r.segmentInfo,s=r.type,o=r.bytes;var u=this.sourceUpdater_.audioBuffered();var l=this.sourceUpdater_.videoBuffered();if(u.length>1){this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ee(u).join(", "))}if(l.length>1){this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ee(l).join(", "))}var d=u.length?u.start(0):0;var c=u.length?u.end(u.length-1):0;var f=l.length?l.start(0):0;var h=l.length?l.end(l.length-1):0;if(c-d<=ba&&h-f<=ba){this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to "+"buffer, triggering an error. "+("Appended byte length: "+o.byteLength+", ")+("audio buffer: "+ee(u).join(", ")+", ")+("video buffer: "+ee(l).join(", ")+", "));this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:Infinity});this.trigger("error");return}this.waitingOnRemove_=true;this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:a,type:s,bytes:o}));var p=this.currentTime_();var v=p-ba;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+v);this.remove(0,v,function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in "+ba+"s");n.waitingOnRemove_=false;n.quotaExceededErrorRetryTimeout_=e.setTimeout(function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue");n.quotaExceededErrorRetryTimeout_=null;n.processCallQueue_()},ba*1e3)},true)};i.handleAppendError_=function e(t,r){var i=t.segmentInfo,n=t.type,a=t.bytes;if(!r){return}if(r.code===ya){this.handleQuotaExceededError_({segmentInfo:i,type:n,bytes:a});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r);this.error(n+" append of "+a.length+"b failed for segment "+("#"+i.mediaIndex+" in playlist "+i.playlist.id));this.trigger("appenderror")};i.appendToSourceBuffer_=function e(t){var r=t.segmentInfo,i=t.type,n=t.initSegment,a=t.data,s=t.bytes;if(!s){var o=[a];var u=a.byteLength;if(n){o.unshift(n);u+=n.byteLength}s=$n({bytes:u,segments:o})}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:i,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:r,type:i,bytes:s}))};i.handleSegmentTimingInfo_=function e(t,r,i){if(!this.pendingSegment_||r!==this.pendingSegment_.requestId){return}var n=this.pendingSegment_.segment;var a=t+"TimingInfo";if(!n[a]){n[a]={}}n[a].transmuxerPrependedSeconds=i.prependedContentDuration||0;n[a].transmuxedPresentationStart=i.start.presentation;n[a].transmuxedDecodeStart=i.start.decode;n[a].transmuxedPresentationEnd=i.end.presentation;n[a].transmuxedDecodeEnd=i.end.decode;n[a].baseMediaDecodeTime=i.baseMediaDecodeTime};i.appendData_=function e(t,r){var i=r.type,n=r.data;if(!n||!n.byteLength){return}if(i==="audio"&&this.audioDisabled_){return}var a=this.getInitSegmentAndUpdateState_({type:i,initSegment:r.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:i,initSegment:a,data:n})};i.loadSegment_=function e(t){var r=this;this.state="WAITING";this.pendingSegment_=t;this.trimBackBuffer_(t);if(typeof t.timestampOffset==="number"){if(this.transmuxer_){this.transmuxer_.postMessage({action:"clearAllMp4Captions"})}}if(!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(function(){var e=y({},t,{forceTimestampOffset:true});y(t,r.generateSegmentInfo_(e));r.isPendingTimestampOffset_=false;r.updateTransmuxerAndRequestSegment_(t)});return}this.updateTransmuxerAndRequestSegment_(t)};i.updateTransmuxerAndRequestSegment_=function e(t){var r=this;if(this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)){this.gopBuffer_.length=0;t.gopsToAlignWith=[];this.timeMapping_=0;this.transmuxer_.postMessage({action:"reset"});this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset})}var i=this.createSimplifiedSegmentObj_(t);var n=this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex);var a=this.mediaIndex!==null;var s=t.timeline!==this.currentTimeline_&&t.timeline>0;var o=n||a&&s;this.logger_("Requesting "+ka(t));if(i.map&&!i.map.bytes){this.logger_("going to request init segment.");this.appendInitSegment_={video:true,audio:true}}t.abortRequests=Dn({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,t),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:function e(){r.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function e(i){var n=i.message,a=i.level,s=i.stream;r.logger_(ka(t)+" logged from transmuxer stream "+s+" as a "+a+": "+n)}})};i.trimBackBuffer_=function e(t){var r=Ca(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);if(r>0){this.remove(0,r)}};i.createSimplifiedSegmentObj_=function e(t){var r=t.segment;var i=t.part;var n={resolvedUri:i?i.resolvedUri:r.resolvedUri,byterange:i?i.byterange:r.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,part:t.part};var a=t.playlist.segments[t.mediaIndex-1];if(a&&a.timeline===r.timeline){if(a.videoTimingInfo){n.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd}else if(a.audioTimingInfo){n.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd}}if(r.key){var s=r.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);n.key=this.segmentKey(r.key);n.key.iv=s}if(r.map){n.map=this.initSegmentForMap(r.map)}return n};i.saveTransferStats_=function e(t){this.mediaRequests+=1;if(t){this.mediaBytesTransferred+=t.bytesReceived;this.mediaTransferDuration+=t.roundTripTime}};i.saveBandwidthRelatedStats_=function e(t,r){this.pendingSegment_.byteLength=r.bytesReceived;if(t<Ea){this.logger_("Ignoring segment's bandwidth because its duration of "+t+(" is less than the min to record "+Ea));return}this.bandwidth=r.bandwidth;this.roundTrip=r.roundTripTime};i.handleTimeout_=function e(){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");this.trigger("timeout")};i.segmentRequestFinished_=function e(t,r,i){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,r,i));return}this.saveTransferStats_(r.stats);if(!this.pendingSegment_){return}if(r.requestId!==this.pendingSegment_.requestId){return}if(t){this.pendingSegment_=null;this.state="READY";if(t.code===mn.ABORTED){return}this.pause();if(t.code===mn.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1;this.error(t);this.trigger("error");return}var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,r.stats);n.endOfAllRequests=r.endOfAllRequests;if(i.gopInfo){this.gopBuffer_=va(this.gopBuffer_,i.gopInfo,this.safeAppend_)}this.state="APPENDING";this.trigger("appending");this.waitForAppendsToComplete_(n)};i.setTimeMapping_=function e(t){var r=this.syncController_.mappingForTimeline(t);if(r!==null){this.timeMapping_=r}};i.updateMediaSecondsLoaded_=function e(t){if(typeof t.start==="number"&&typeof t.end==="number"){this.mediaSecondsLoaded+=t.end-t.start}else{this.mediaSecondsLoaded+=t.duration}};i.shouldUpdateTransmuxerTimestampOffset_=function e(t){if(t===null){return false}if(this.loaderType_==="main"&&t!==this.sourceUpdater_.videoTimestampOffset()){return true}if(!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset()){return true}return false};i.trueSegmentStart_=function e(t){var r=t.currentStart,i=t.playlist,n=t.mediaIndex,a=t.firstVideoFrameTimeForData,s=t.currentVideoTimestampOffset,o=t.useVideoTimingInfo,u=t.videoTimingInfo,l=t.audioTimingInfo;if(typeof r!=="undefined"){return r}if(!o){return l.start}var d=i.segments[n-1];if(n===0||!d||typeof d.start==="undefined"||d.end!==a+s){return a}return u.start};i.waitForAppendsToComplete_=function e(t){var r=this.getCurrentMediaInfo_(t);if(!r){this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:Infinity});this.trigger("error");return}var i=r.hasAudio,n=r.hasVideo,a=r.isMuxed;var s=this.loaderType_==="main"&&n;var o=!this.audioDisabled_&&i&&!a;t.waitingOnAppends=0;if(!t.hasAppendedData_){if(!t.timingInfo&&typeof t.timestampOffset==="number"){this.isPendingTimestampOffset_=true}t.timingInfo={start:0};t.waitingOnAppends++;if(!this.isPendingTimestampOffset_){this.updateSourceBufferTimestampOffset_(t);this.processMetadataQueue_()}this.checkAppendsDone_(t);return}if(s){t.waitingOnAppends++}if(o){t.waitingOnAppends++}if(s){this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t))}if(o){this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))}};i.checkAppendsDone_=function e(t){if(this.checkForAbort_(t.requestId)){return}t.waitingOnAppends--;if(t.waitingOnAppends===0){this.handleAppendsDone_()}};i.checkForIllegalMediaSwitch=function e(t){var r=Ia(this.loaderType_,this.getCurrentMediaInfo_(),t);if(r){this.error({message:r,blacklistDuration:Infinity});this.trigger("error");return true}return false};i.updateSourceBufferTimestampOffset_=function e(t){if(t.timestampOffset===null||typeof t.timingInfo.start!=="number"||t.changedTimestampOffset||this.loaderType_!=="main"){return}var r=false;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo});t.changedTimestampOffset=true;if(t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()){this.sourceUpdater_.videoTimestampOffset(t.timestampOffset);r=true}if(t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()){this.sourceUpdater_.audioTimestampOffset(t.timestampOffset);r=true}if(r){this.trigger("timestampoffset")}};i.getSegmentStartTimeForTimestampOffsetCalculation_=function e(t){var r=t.videoTimingInfo,i=t.audioTimingInfo,n=t.timingInfo;if(!this.useDtsForTimestampOffset_){return n.start}if(r&&typeof r.transmuxedDecodeStart==="number"){return r.transmuxedDecodeStart}if(i&&typeof i.transmuxedDecodeStart==="number"){return i.transmuxedDecodeStart}return n.start};i.updateTimingInfoEnd_=function e(t){t.timingInfo=t.timingInfo||{};var r=this.getMediaInfo_();var i=this.loaderType_==="main"&&r&&r.hasVideo;var n=i&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;if(!n){return}t.timingInfo.end=typeof n.end==="number"?n.end:n.start+t.duration};i.handleAppendsDone_=function e(){if(this.pendingSegment_){this.trigger("appendsdone")}if(!this.pendingSegment_){this.state="READY";if(!this.paused()){this.monitorBuffer_()}return}var t=this.pendingSegment_;this.updateTimingInfoEnd_(t);if(this.shouldSaveSegmentTimingInfo_){this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:this.loaderType_==="main"})}var r=Da(t,this.sourceType_);if(r){if(r.severity==="warn"){s["default"].log.warn(r.message)}else{this.logger_(r.message)}}this.recordThroughput_(t);this.pendingSegment_=null;this.state="READY";if(t.isSyncRequest){this.trigger("syncinfoupdate");if(!t.hasAppendedData_){this.logger_("Throwing away un-appended sync request "+ka(t));return}}this.logger_("Appended "+ka(t));this.addSegmentMetadataCue_(t);this.fetchAtBuffer_=true;if(this.currentTimeline_!==t.timeline){this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline});if(this.loaderType_==="main"&&!this.audioDisabled_){this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})}}this.currentTimeline_=t.timeline;this.trigger("syncinfoupdate");var i=t.segment;var n=t.part;var a=i.end&&this.currentTime_()-i.end>t.playlist.targetDuration*3;var o=n&&n.end&&this.currentTime_()-n.end>t.playlist.partTargetDuration*3;if(a||o){this.logger_("bad "+(a?"segment":"part")+" "+ka(t));this.resetEverything();return}var u=this.mediaIndex!==null;if(u){this.trigger("bandwidthupdate")}this.trigger("progress");this.mediaIndex=t.mediaIndex;this.partIndex=t.partIndex;if(this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex)){this.endOfStream()}this.trigger("appended");if(t.hasAppendedData_){this.mediaAppends++}if(!this.paused()){this.monitorBuffer_()}};i.recordThroughput_=function e(t){if(t.duration<Ea){this.logger_("Ignoring segment's throughput because its duration of "+t.duration+(" is less than the min to record "+Ea));return}var r=this.throughput.rate;var i=Date.now()-t.endOfAllRequests+1;var n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-r)/++this.throughput.count};i.addSegmentMetadataCue_=function t(r){if(!this.segmentMetadataTrack_){return}var i=r.segment;var n=i.start;var a=i.end;if(!Sa(n)||!Sa(a)){return}ia(n,a,this.segmentMetadataTrack_);var s=e.WebKitDataCue||e.VTTCue;var o={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,bandwidth:r.playlist.attributes.BANDWIDTH,resolution:r.playlist.attributes.RESOLUTION,codecs:r.playlist.attributes.CODECS,byteLength:r.byteLength,uri:r.uri,timeline:r.timeline,playlist:r.playlist.id,start:n,end:a};var u=JSON.stringify(o);var l=new s(n,a,u);l.value=o;this.segmentMetadataTrack_.addCue(l)};return r}(s["default"].EventTarget);function Ra(){}var Na=function e(t){if(typeof t!=="string"){return t}return t.replace(/./,function(e){return e.toUpperCase()})};var Ma=["video","audio"];var Ua=function e(t,r){var i=r[t+"Buffer"];return i&&i.updating||r.queuePending[t]};var Ba=function e(t,r){for(var i=0;i<r.length;i++){var n=r[i];if(n.type==="mediaSource"){return null}if(n.type===t){return i}}return null};var Fa=function e(t,r){if(r.queue.length===0){return}var i=0;var n=r.queue[i];if(n.type==="mediaSource"){if(!r.updating()&&r.mediaSource.readyState!=="closed"){r.queue.shift();n.action(r);if(n.doneFn){n.doneFn()}e("audio",r);e("video",r)}return}if(t==="mediaSource"){return}if(!r.ready()||r.mediaSource.readyState==="closed"||Ua(t,r)){return}if(n.type!==t){i=Ba(t,r.queue);if(i===null){return}n=r.queue[i]}r.queue.splice(i,1);r.queuePending[t]=n;n.action(t,r);if(!n.doneFn){r.queuePending[t]=null;e(t,r);return}};var ja=function e(t,r){var i=r[t+"Buffer"];var n=Na(t);if(!i){return}i.removeEventListener("updateend",r["on"+n+"UpdateEnd_"]);i.removeEventListener("error",r["on"+n+"Error_"]);r.codecs[t]=null;r[t+"Buffer"]=null};var Va=function e(t,r){return t&&r&&Array.prototype.indexOf.call(t.sourceBuffers,r)!==-1};var qa={appendBuffer:function e(t,r,i){return function(e,n){var a=n[e+"Buffer"];if(!Va(n.mediaSource,a)){return}n.logger_("Appending segment "+r.mediaIndex+"'s "+t.length+" bytes to "+e+"Buffer");try{a.appendBuffer(t)}catch(t){n.logger_("Error with code "+t.code+" "+(t.code===ya?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+r.mediaIndex+" to "+e+"Buffer"));n.queuePending[e]=null;i(t)}}},remove:function e(t,r){return function(e,i){var n=i[e+"Buffer"];if(!Va(i.mediaSource,n)){return}i.logger_("Removing "+t+" to "+r+" from "+e+"Buffer");try{n.remove(t,r)}catch(n){i.logger_("Remove "+t+" to "+r+" from "+e+"Buffer failed")}}},timestampOffset:function e(t){return function(e,r){var i=r[e+"Buffer"];if(!Va(r.mediaSource,i)){return}r.logger_("Setting "+e+"timestampOffset to "+t);i.timestampOffset=t}},callback:function e(t){return function(e,r){t()}},endOfStream:function e(t){return function(e){if(e.mediaSource.readyState!=="open"){return}e.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{e.mediaSource.endOfStream(t)}catch(e){s["default"].log.warn("Failed to call media source endOfStream",e)}}},duration:function e(t){return function(e){e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(e){s["default"].log.warn("Failed to set media source duration",e)}}},abort:function e(){return function(e,t){if(t.mediaSource.readyState!=="open"){return}var r=t[e+"Buffer"];if(!Va(t.mediaSource,r)){return}t.logger_("calling abort on "+e+"Buffer");try{r.abort()}catch(t){s["default"].log.warn("Failed to abort on "+e+"Buffer",t)}}},addSourceBuffer:function e(t,r){return function(e){var i=Na(t);var n=j(r);e.logger_("Adding "+t+"Buffer with codec "+r+" to mediaSource");var a=e.mediaSource.addSourceBuffer(n);a.addEventListener("updateend",e["on"+i+"UpdateEnd_"]);a.addEventListener("error",e["on"+i+"Error_"]);e.codecs[t]=r;e[t+"Buffer"]=a}},removeSourceBuffer:function e(t){return function(e){var r=e[t+"Buffer"];ja(t,e);if(!Va(e.mediaSource,r)){return}e.logger_("Removing "+t+"Buffer with codec "+e.codecs[t]+" from mediaSource");try{e.mediaSource.removeSourceBuffer(r)}catch(e){s["default"].log.warn("Failed to removeSourceBuffer "+t+"Buffer",e)}}},changeType:function e(t){return function(e,r){var i=r[e+"Buffer"];var n=j(t);if(!Va(r.mediaSource,i)){return}if(r.codecs[e]===t){return}r.logger_("changing "+e+"Buffer codec from "+r.codecs[e]+" to "+t);i.changeType(n);r.codecs[e]=t}}};var Ha=function e(t){var r=t.type,i=t.sourceUpdater,n=t.action,a=t.doneFn,s=t.name;i.queue.push({type:r,action:n,doneFn:a,name:s});Fa(r,i)};var Wa=function e(t,r){return function(e){if(r.queuePending[t]){var i=r.queuePending[t].doneFn;r.queuePending[t]=null;if(i){i(r[t+"Error_"])}}Fa(t,r)}};var Ga=function(t){c(r,t);function r(e){var r;r=t.call(this)||this;r.mediaSource=e;r.sourceopenListener_=function(){return Fa("mediaSource",l(r))};r.mediaSource.addEventListener("sourceopen",r.sourceopenListener_);r.logger_=g("SourceUpdater");r.audioTimestampOffset_=0;r.videoTimestampOffset_=0;r.queue=[];r.queuePending={audio:null,video:null};r.delayedAudioAppendQueue_=[];r.videoAppendQueued_=false;r.codecs={};r.onVideoUpdateEnd_=Wa("video",l(r));r.onAudioUpdateEnd_=Wa("audio",l(r));r.onVideoError_=function(e){r.videoError_=e};r.onAudioError_=function(e){r.audioError_=e};r.createdSourceBuffers_=false;r.initializedEme_=false;r.triggeredReady_=false;return r}var i=r.prototype;i.initializedEme=function e(){this.initializedEme_=true;this.triggerReady()};i.hasCreatedSourceBuffers=function e(){return this.createdSourceBuffers_};i.hasInitializedAnyEme=function e(){return this.initializedEme_};i.ready=function e(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()};i.createSourceBuffers=function e(t){if(this.hasCreatedSourceBuffers()){return}this.addOrChangeSourceBuffers(t);this.createdSourceBuffers_=true;this.trigger("createdsourcebuffers");this.triggerReady()};i.triggerReady=function e(){if(this.ready()&&!this.triggeredReady_){this.triggeredReady_=true;this.trigger("ready")}};i.addSourceBuffer=function e(t,r){Ha({type:"mediaSource",sourceUpdater:this,action:qa.addSourceBuffer(t,r),name:"addSourceBuffer"})};i.abort=function e(t){Ha({type:t,sourceUpdater:this,action:qa.abort(t),name:"abort"})};i.removeSourceBuffer=function e(t){if(!this.canRemoveSourceBuffer()){s["default"].log.error("removeSourceBuffer is not supported!");return}Ha({type:"mediaSource",sourceUpdater:this,action:qa.removeSourceBuffer(t),name:"removeSourceBuffer"})};i.canRemoveSourceBuffer=function t(){return!s["default"].browser.IE_VERSION&&!s["default"].browser.IS_FIREFOX&&e.MediaSource&&e.MediaSource.prototype&&typeof e.MediaSource.prototype.removeSourceBuffer==="function"};r.canChangeType=function t(){return e.SourceBuffer&&e.SourceBuffer.prototype&&typeof e.SourceBuffer.prototype.changeType==="function"};i.canChangeType=function e(){return this.constructor.canChangeType()};i.changeType=function e(t,r){if(!this.canChangeType()){s["default"].log.error("changeType is not supported!");return}Ha({type:t,sourceUpdater:this,action:qa.changeType(r),name:"changeType"})};i.addOrChangeSourceBuffers=function e(t){var r=this;if(!t||typeof t!=="object"||Object.keys(t).length===0){throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs")}Object.keys(t).forEach(function(e){var i=t[e];if(!r.hasCreatedSourceBuffers()){return r.addSourceBuffer(e,i)}if(r.canChangeType()){r.changeType(e,i)}})};i.appendBuffer=function e(t,r){var i=this;var n=t.segmentInfo,a=t.type,s=t.bytes;this.processedAppend_=true;if(a==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([t,r]);this.logger_("delayed audio append of "+s.length+" until video append");return}var o=r;Ha({type:a,sourceUpdater:this,action:qa.appendBuffer(s,n||{mediaIndex:-1},o),doneFn:r,name:"appendBuffer"});if(a==="video"){this.videoAppendQueued_=true;if(!this.delayedAudioAppendQueue_.length){return}var u=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+u.length+" appendBuffers");this.delayedAudioAppendQueue_.length=0;u.forEach(function(e){i.appendBuffer.apply(i,e)})}};i.audioBuffered=function e(){if(!Va(this.mediaSource,this.audioBuffer)){return s["default"].createTimeRange()}return this.audioBuffer.buffered?this.audioBuffer.buffered:s["default"].createTimeRange()};i.videoBuffered=function e(){if(!Va(this.mediaSource,this.videoBuffer)){return s["default"].createTimeRange()}return this.videoBuffer.buffered?this.videoBuffer.buffered:s["default"].createTimeRange()};i.buffered=function e(){var t=Va(this.mediaSource,this.videoBuffer)?this.videoBuffer:null;var r=Va(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;if(r&&!t){return this.audioBuffered()}if(t&&!r){return this.videoBuffered()}return $(this.audioBuffered(),this.videoBuffered())};i.setDuration=function e(t,r){if(r===void 0){r=Ra}Ha({type:"mediaSource",sourceUpdater:this,action:qa.duration(t),name:"duration",doneFn:r})};i.endOfStream=function e(t,r){if(t===void 0){t=null}if(r===void 0){r=Ra}if(typeof t!=="string"){t=undefined}Ha({type:"mediaSource",sourceUpdater:this,action:qa.endOfStream(t),name:"endOfStream",doneFn:r})};i.removeAudio=function e(t,r,i){if(i===void 0){i=Ra}if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){i();return}Ha({type:"audio",sourceUpdater:this,action:qa.remove(t,r),doneFn:i,name:"remove"})};i.removeVideo=function e(t,r,i){if(i===void 0){i=Ra}if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){i();return}Ha({type:"video",sourceUpdater:this,action:qa.remove(t,r),doneFn:i,name:"remove"})};i.updating=function e(){if(Ua("audio",this)||Ua("video",this)){return true}return false};i.audioTimestampOffset=function e(t){if(typeof t!=="undefined"&&this.audioBuffer&&this.audioTimestampOffset_!==t){Ha({type:"audio",sourceUpdater:this,action:qa.timestampOffset(t),name:"timestampOffset"});this.audioTimestampOffset_=t}return this.audioTimestampOffset_};i.videoTimestampOffset=function e(t){if(typeof t!=="undefined"&&this.videoBuffer&&this.videoTimestampOffset!==t){Ha({type:"video",sourceUpdater:this,action:qa.timestampOffset(t),name:"timestampOffset"});this.videoTimestampOffset_=t}return this.videoTimestampOffset_};i.audioQueueCallback=function e(t){if(!this.audioBuffer){return}Ha({type:"audio",sourceUpdater:this,action:qa.callback(t),name:"callback"})};i.videoQueueCallback=function e(t){if(!this.videoBuffer){return}Ha({type:"video",sourceUpdater:this,action:qa.callback(t),name:"callback"})};i.dispose=function e(){var t=this;this.trigger("dispose");Ma.forEach(function(e){t.abort(e);if(t.canRemoveSourceBuffer()){t.removeSourceBuffer(e)}else{t[e+"QueueCallback"](function(){return ja(e,t)})}});this.videoAppendQueued_=false;this.delayedAudioAppendQueue_.length=0;if(this.sourceopenListener_){this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_)}this.off()};return r}(s["default"].EventTarget);var Ka=function e(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))};var Ya=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)}));var za=function(t){c(r,t);function r(e,r){var i;if(r===void 0){r={}}i=t.call(this,e,r)||this;i.mediaSource_=null;i.subtitlesTrack_=null;i.loaderType_="subtitle";i.featuresNativeTextTracks_=e.featuresNativeTextTracks;i.shouldSaveSegmentTimingInfo_=false;return i}var i=r.prototype;i.createTransmuxer_=function e(){return null};i.buffered_=function e(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length){return s["default"].createTimeRanges()}var t=this.subtitlesTrack_.cues;var r=t[0].startTime;var i=t[t.length-1].startTime;return s["default"].createTimeRanges([[r,i]])};i.initSegmentForMap=function e(t,r){if(r===void 0){r=false}if(!t){return null}var i=Tt(t);var n=this.initSegments_[i];if(r&&!n&&t.bytes){var a=Ya.byteLength+t.bytes.byteLength;var s=new Uint8Array(a);s.set(t.bytes);s.set(Ya,t.bytes.byteLength);this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:s}}return n||t};i.couldBeginLoading_=function e(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()};i.init_=function e(){this.state="READY";this.resetEverything();return this.monitorBuffer_()};i.track=function e(t){if(typeof t==="undefined"){return this.subtitlesTrack_}this.subtitlesTrack_=t;if(this.state==="INIT"&&this.couldBeginLoading_()){this.init_()}return this.subtitlesTrack_};i.remove=function e(t,r){ia(t,r,this.subtitlesTrack_)};i.fillBuffer_=function e(){var t=this;var r=this.chooseNextRequest_();if(!r){return}if(this.syncController_.timestampOffsetForTimeline(r.timeline)===null){var i=function e(){t.state="READY";if(!t.paused()){t.monitorBuffer_()}};this.syncController_.one("timestampoffset",i);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(r)};i.timestampOffsetForSegment_=function e(){return null};i.chooseNextRequest_=function e(){return this.skipEmptySegments_(t.prototype.chooseNextRequest_.call(this))};i.skipEmptySegments_=function e(t){while(t&&t.segment.empty){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t};i.stopForError=function e(t){this.error(t);this.state="READY";this.pause();this.trigger("error")};i.segmentRequestFinished_=function t(r,i,n){var a=this;if(!this.subtitlesTrack_){this.state="READY";return}this.saveTransferStats_(i.stats);if(!this.pendingSegment_){this.state="READY";this.mediaRequestsAborted+=1;return}if(r){if(r.code===mn.TIMEOUT){this.handleTimeout_()}if(r.code===mn.ABORTED){this.mediaRequestsAborted+=1}else{this.mediaRequestsErrored+=1}this.stopForError(r);return}var s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,i.stats);if(i.key){this.segmentKey(i.key,true)}this.state="APPENDING";this.trigger("appending");var o=s.segment;if(o.map){o.map.bytes=i.map.bytes}s.bytes=i.bytes;if(typeof e.WebVTT!=="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var u;var l=function e(){a.subtitlesTrack_.tech_.off("vttjsloaded",u);a.stopForError({message:"Error loading vtt.js"});return};u=function e(){a.subtitlesTrack_.tech_.off("vttjserror",l);a.segmentRequestFinished_(r,i,n)};this.state="WAITING_ON_VTTJS";this.subtitlesTrack_.tech_.one("vttjsloaded",u);this.subtitlesTrack_.tech_.one("vttjserror",l);return}o.requested=true;try{this.parseVTTCues_(s)}catch(e){this.stopForError({message:e.message});return}this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_);if(s.cues.length){s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}}else{s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration}}if(s.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}s.byteLength=s.bytes.byteLength;this.mediaSecondsLoaded+=o.duration;s.cues.forEach(function(t){a.subtitlesTrack_.addCue(a.featuresNativeTextTracks_?new e.VTTCue(t.startTime,t.endTime,t.text):t)});na(this.subtitlesTrack_);this.handleAppendsDone_()};i.handleData_=function e(){};i.updateTimingInfoEnd_=function e(){};i.parseVTTCues_=function t(r){var i;var n=false;if(typeof e.TextDecoder==="function"){i=new e.TextDecoder("utf8")}else{i=e.WebVTT.StringDecoder();n=true}var a=new e.WebVTT.Parser(e,e.vttjs,i);r.cues=[];r.timestampmap={MPEGTS:0,LOCAL:0};a.oncue=r.cues.push.bind(r.cues);a.ontimestampmap=function(e){r.timestampmap=e};a.onparsingerror=function(e){s["default"].log.warn("Error encountered when parsing cues: "+e.message)};if(r.segment.map){var o=r.segment.map.bytes;if(n){o=Ka(o)}a.parse(o)}var u=r.bytes;if(n){u=Ka(u)}a.parse(u);a.flush()};i.updateTimeMapping_=function e(t,r,i){var n=t.segment;if(!r){return}if(!t.cues.length){n.empty=true;return}var a=t.timestampmap;var s=a.MPEGTS/ha.ONE_SECOND_IN_TS-a.LOCAL+r.mapping;t.cues.forEach(function(e){e.startTime+=s;e.endTime+=s});if(!i.syncInfo){var o=t.cues[0].startTime;var u=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(o,u-n.duration)}}};return r}(La);var Xa=function e(t,r){var i=t.cues;for(var n=0;n<i.length;n++){var a=i[n];if(r>=a.adStartTime&&r<=a.adEndTime){return a}}return null};var Qa=function t(r,i,n){if(n===void 0){n=0}if(!r.segments){return}var a=n;var s;for(var o=0;o<r.segments.length;o++){var u=r.segments[o];if(!s){s=Xa(i,a+u.duration/2)}if(s){if("cueIn"in u){s.endTime=a;s.adEndTime=a;a+=u.duration;s=null;continue}if(a<s.endTime){a+=u.duration;continue}s.endTime+=u.duration}else{if("cueOut"in u){s=new e.VTTCue(a,a+u.duration,u.cueOut);s.adStartTime=a;s.adEndTime=a+parseFloat(u.cueOut);i.addCue(s)}if("cueOutCont"in u){var l=u.cueOutCont.split("/").map(parseFloat),d=l[0],c=l[1];s=new e.VTTCue(a,a+u.duration,"");s.adStartTime=a-d;s.adEndTime=s.adStartTime+c;i.addCue(s)}}a+=u.duration}};var $a=86400;var Ja=[{name:"VOD",run:function e(t,r,i,n,a){if(i!==Infinity){var s={time:0,segmentIndex:0,partIndex:null};return s}return null}},{name:"ProgramDateTime",run:function e(t,r,i,n,a){if(!Object.keys(t.timelineToDatetimeMappings).length){return null}var s=null;var o=null;var u=se(r);a=a||0;for(var l=0;l<u.length;l++){var d=r.endList||a===0?l:u.length-(l+1);var c=u[d];var f=c.segment;var h=t.timelineToDatetimeMappings[f.timeline];if(!h||!f.dateTimeObject){continue}var p=f.dateTimeObject.getTime()/1e3;var v=p+h;if(f.parts&&typeof c.partIndex==="number"){for(var m=0;m<c.partIndex;m++){v+=f.parts[m].duration}}var g=Math.abs(a-v);if(o!==null&&(g===0||o<g)){break}o=g;s={time:v,segmentIndex:c.segmentIndex,partIndex:c.partIndex}}return s}},{name:"Segment",run:function e(t,r,i,n,a){var s=null;var o=null;a=a||0;var u=se(r);for(var l=0;l<u.length;l++){var d=r.endList||a===0?l:u.length-(l+1);var c=u[d];var f=c.segment;var h=c.part&&c.part.start||f&&f.start;if(f.timeline===n&&typeof h!=="undefined"){var p=Math.abs(a-h);if(o!==null&&o<p){break}if(!s||o===null||o>=p){o=p;s={time:h,segmentIndex:c.segmentIndex,partIndex:c.partIndex}}}}return s}},{name:"Discontinuity",run:function e(t,r,i,n,a){var s=null;a=a||0;if(r.discontinuityStarts&&r.discontinuityStarts.length){var o=null;for(var u=0;u<r.discontinuityStarts.length;u++){var l=r.discontinuityStarts[u];var d=r.discontinuitySequence+u+1;var c=t.discontinuities[d];if(c){var f=Math.abs(a-c.time);if(o!==null&&o<f){break}if(!s||o===null||o>=f){o=f;s={time:c.time,segmentIndex:l,partIndex:null}}}}}return s}},{name:"Playlist",run:function e(t,r,i,n,a){if(r.syncInfo){var s={time:r.syncInfo.time,segmentIndex:r.syncInfo.mediaSequence-r.mediaSequence,partIndex:null};return s}return null}}];var Za=function(e){c(t,e);function t(t){var r;r=e.call(this)||this;r.timelines=[];r.discontinuities=[];r.timelineToDatetimeMappings={};r.logger_=g("SyncController");return r}var r=t.prototype;r.getSyncPoint=function e(t,r,i,n){var a=this.runStrategies_(t,r,i,n);if(!a.length){return null}return this.selectSyncPoint_(a,{key:"time",value:n})};r.getExpiredTime=function e(t,r){if(!t||!t.segments){return null}var i=this.runStrategies_(t,r,t.discontinuitySequence,0);if(!i.length){return null}var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});if(n.segmentIndex>0){n.time*=-1}return Math.abs(n.time+pe({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:n.segmentIndex,endIndex:0}))};r.runStrategies_=function e(t,r,i,n){var a=[];for(var s=0;s<Ja.length;s++){var o=Ja[s];var u=o.run(this,t,r,i,n);if(u){u.strategy=o.name;a.push({strategy:o.name,syncPoint:u})}}return a};r.selectSyncPoint_=function e(t,r){var i=t[0].syncPoint;var n=Math.abs(t[0].syncPoint[r.key]-r.value);var a=t[0].strategy;for(var s=1;s<t.length;s++){var o=Math.abs(t[s].syncPoint[r.key]-r.value);if(o<n){n=o;i=t[s].syncPoint;a=t[s].strategy}}this.logger_("syncPoint for ["+r.key+": "+r.value+"] chosen with strategy"+(" ["+a+"]: [time:"+i.time+",")+(" segmentIndex:"+i.segmentIndex)+(typeof i.partIndex==="number"?",partIndex:"+i.partIndex:"")+"]");return i};r.saveExpiredSegmentInfo=function e(t,r){var i=r.mediaSequence-t.mediaSequence;if(i>$a){s["default"].log.warn("Not saving expired segment info. Media sequence gap "+i+" is too large.");return}for(var n=i-1;n>=0;n--){var a=t.segments[n];if(a&&typeof a.start!=="undefined"){r.syncInfo={mediaSequence:t.mediaSequence+n,time:a.start};this.logger_("playlist refresh sync: [time:"+r.syncInfo.time+","+(" mediaSequence: "+r.syncInfo.mediaSequence+"]"));this.trigger("syncinfoupdate");break}}};r.setDateTimeMappingForStart=function e(t){this.timelineToDatetimeMappings={};if(t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var r=t.segments[0];var i=r.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[r.timeline]=-i}};r.saveSegmentTimingInfo=function e(t){var r=t.segmentInfo,i=t.shouldSaveTimelineMapping;var n=this.calculateSegmentTimeMapping_(r,r.timingInfo,i);var a=r.segment;if(n){this.saveDiscontinuitySyncInfo_(r);if(!r.playlist.syncInfo){r.playlist.syncInfo={mediaSequence:r.playlist.mediaSequence+r.mediaIndex,time:a.start}}}var s=a.dateTimeObject;if(a.discontinuity&&i&&s){this.timelineToDatetimeMappings[a.timeline]=-(s.getTime()/1e3)}};r.timestampOffsetForTimeline=function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].time};r.mappingForTimeline=function e(t){if(typeof this.timelines[t]==="undefined"){return null}return this.timelines[t].mapping};r.calculateSegmentTimeMapping_=function e(t,r,i){var n=t.segment;var a=t.part;var s=this.timelines[t.timeline];var o;var u;if(typeof t.timestampOffset==="number"){s={time:t.startOfSegment,mapping:t.startOfSegment-r.start};if(i){this.timelines[t.timeline]=s;this.trigger("timestampoffset");this.logger_("time mapping for timeline "+t.timeline+": "+("[time: "+s.time+"] [mapping: "+s.mapping+"]"))}o=t.startOfSegment;u=r.end+s.mapping}else if(s){o=r.start+s.mapping;u=r.end+s.mapping}else{return false}if(a){a.start=o;a.end=u}if(!n.start||o<n.start){n.start=o}n.end=u;return true};r.saveDiscontinuitySyncInfo_=function e(t){var r=t.playlist;var i=t.segment;if(i.discontinuity){this.discontinuities[i.timeline]={time:i.start,accuracy:0}}else if(r.discontinuityStarts&&r.discontinuityStarts.length){for(var n=0;n<r.discontinuityStarts.length;n++){var a=r.discontinuityStarts[n];var s=r.discontinuitySequence+n+1;var o=a-t.mediaIndex;var u=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>u){var l=void 0;if(o<0){l=i.start-pe({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:t.mediaIndex,endIndex:a})}else{l=i.end+pe({defaultDuration:r.targetDuration,durationList:r.segments,startIndex:t.mediaIndex+1,endIndex:a})}this.discontinuities[s]={time:l,accuracy:u}}}}};r.dispose=function e(){this.trigger("dispose");this.off()};return t}(s["default"].EventTarget);var es=function(e){c(t,e);function t(){var t;t=e.call(this)||this;t.pendingTimelineChanges_={};t.lastTimelineChanges_={};return t}var r=t.prototype;r.clearPendingTimelineChange=function e(t){this.pendingTimelineChanges_[t]=null;this.trigger("pendingtimelinechange")};r.pendingTimelineChange=function e(t){var r=t.type,i=t.from,n=t.to;if(typeof i==="number"&&typeof n==="number"){this.pendingTimelineChanges_[r]={type:r,from:i,to:n};this.trigger("pendingtimelinechange")}return this.pendingTimelineChanges_[r]};r.lastTimelineChange=function e(t){var r=t.type,i=t.from,n=t.to;if(typeof i==="number"&&typeof n==="number"){this.lastTimelineChanges_[r]={type:r,from:i,to:n};delete this.pendingTimelineChanges_[r];this.trigger("timelinechange")}return this.lastTimelineChanges_[r]};r.dispose=function e(){this.trigger("dispose");this.pendingTimelineChanges_={};this.lastTimelineChanges_={};this.off()};return t}(s["default"].EventTarget);var ts=Ji(Zi(function(){var t=typeof globalThis!=="undefined"?globalThis:typeof e!=="undefined"?e:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function r(e,t,r){return r={path:t,exports:{},require:function e(t,n){return i(t,n===undefined||n===null?r.path:n)}},e(r,r.exports),r.exports}function i(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var n=r(function(e){function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}function r(e,r,i){if(r)t(e.prototype,r);if(i)t(e,i);return e}e.exports=r;e.exports["default"]=e.exports,e.exports.__esModule=true});var a=r(function(e){function t(r,i){e.exports=t=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};e.exports["default"]=e.exports,e.exports.__esModule=true;return t(r,i)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var s=r(function(e){function t(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;a(e,t)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var o=function(){function e(){this.listeners={}}var t=e.prototype;t.on=function e(t,r){if(!this.listeners[t]){this.listeners[t]=[]}this.listeners[t].push(r)};t.off=function e(t,r){if(!this.listeners[t]){return false}var i=this.listeners[t].indexOf(r);this.listeners[t]=this.listeners[t].slice(0);this.listeners[t].splice(i,1);return i>-1};t.trigger=function e(t){var r=this.listeners[t];if(!r){return}if(arguments.length===2){var i=r.length;for(var n=0;n<i;++n){r[n].call(this,arguments[1])}}else{var a=Array.prototype.slice.call(arguments,1);var s=r.length;for(var o=0;o<s;++o){r[o].apply(this,a)}}};t.dispose=function e(){this.listeners={}};t.pipe=function e(t){this.on("data",function(e){t.push(e)})};return e}();function u(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}var l=function e(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]];var r=t[0];var i=t[1];var n=r[4];var a=i[4];var s;var o;var u;var l=[];var d=[];var c;var f;var h;var p;var v;var m;for(s=0;s<256;s++){d[(l[s]=s<<1^(s>>7)*283)^s]=s}for(o=u=0;!n[o];o^=c||1,u=d[u]||1){p=u^u<<1^u<<2^u<<3^u<<4;p=p>>8^p&255^99;n[o]=p;a[p]=o;h=l[f=l[c=l[o]]];m=h*16843009^f*65537^c*257^o*16843008;v=l[p]*257^p*16843008;for(s=0;s<4;s++){r[s][o]=v=v<<24^v>>>8;i[s][p]=m=m<<24^m>>>8}}for(s=0;s<5;s++){r[s]=r[s].slice(0);i[s]=i[s].slice(0)}return t};var d=null;var c=function(){function e(e){if(!d){d=l()}this._tables=[[d[0][0].slice(),d[0][1].slice(),d[0][2].slice(),d[0][3].slice(),d[0][4].slice()],[d[1][0].slice(),d[1][1].slice(),d[1][2].slice(),d[1][3].slice(),d[1][4].slice()]];var t;var r;var i;var n=this._tables[0][4];var a=this._tables[1];var s=e.length;var o=1;if(s!==4&&s!==6&&s!==8){throw new Error("Invalid aes key size")}var u=e.slice(0);var c=[];this._key=[u,c];for(t=s;t<4*s+28;t++){i=u[t-1];if(t%s===0||s===8&&t%s===4){i=n[i>>>24]<<24^n[i>>16&255]<<16^n[i>>8&255]<<8^n[i&255];if(t%s===0){i=i<<8^i>>>24^o<<24;o=o<<1^(o>>7)*283}}u[t]=u[t-s]^i}for(r=0;t;r++,t--){i=u[r&3?t:t-4];if(t<=4||r<4){c[r]=i}else{c[r]=a[0][n[i>>>24]]^a[1][n[i>>16&255]]^a[2][n[i>>8&255]]^a[3][n[i&255]]}}}var t=e.prototype;t.decrypt=function e(t,r,i,n,a,s){var o=this._key[1];var u=t^o[0];var l=n^o[1];var d=i^o[2];var c=r^o[3];var f;var h;var p;var v=o.length/4-2;var m;var g=4;var y=this._tables[1];var _=y[0];var b=y[1];var T=y[2];var S=y[3];var E=y[4];for(m=0;m<v;m++){f=_[u>>>24]^b[l>>16&255]^T[d>>8&255]^S[c&255]^o[g];h=_[l>>>24]^b[d>>16&255]^T[c>>8&255]^S[u&255]^o[g+1];p=_[d>>>24]^b[c>>16&255]^T[u>>8&255]^S[l&255]^o[g+2];c=_[c>>>24]^b[u>>16&255]^T[l>>8&255]^S[d&255]^o[g+3];g+=4;u=f;l=h;d=p}for(m=0;m<4;m++){a[(3&-m)+s]=E[u>>>24]<<24^E[l>>16&255]<<16^E[d>>8&255]<<8^E[c&255]^o[g++];f=u;u=l;l=d;d=c;c=f}};return e}();var f=function(e){s(t,e);function t(){var t;t=e.call(this,o)||this;t.jobs=[];t.delay=1;t.timeout_=null;return t}var r=t.prototype;r.processJob_=function e(){this.jobs.shift()();if(this.jobs.length){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}else{this.timeout_=null}};r.push=function e(t){this.jobs.push(t);if(!this.timeout_){this.timeout_=setTimeout(this.processJob_.bind(this),this.delay)}};return t}(o);var h=function e(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24};var p=function e(t,r,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2);var a=new c(Array.prototype.slice.call(r));var s=new Uint8Array(t.byteLength);var o=new Int32Array(s.buffer);var u;var l;var d;var f;var p;var v;var m;var g;var y;u=i[0];l=i[1];d=i[2];f=i[3];for(y=0;y<n.length;y+=4){p=h(n[y]);v=h(n[y+1]);m=h(n[y+2]);g=h(n[y+3]);a.decrypt(p,v,m,g,o,y);o[y]=h(o[y]^u);o[y+1]=h(o[y+1]^l);o[y+2]=h(o[y+2]^d);o[y+3]=h(o[y+3]^f);u=p;l=v;d=m;f=g}return s};var v=function(){function e(t,r,i,n){var a=e.STEP;var s=new Int32Array(t.buffer);var o=new Uint8Array(t.byteLength);var l=0;this.asyncStream_=new f;this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),r,i,o));for(l=a;l<s.length;l+=a){i=new Uint32Array([h(s[l-4]),h(s[l-3]),h(s[l-2]),h(s[l-1])]);this.asyncStream_.push(this.decryptChunk_(s.subarray(l,l+a),r,i,o))}this.asyncStream_.push(function(){n(null,u(o))})}var t=e.prototype;t.decryptChunk_=function e(t,r,i,n){return function(){var e=p(t,r,i);n.set(e,t.byteOffset)}};n(e,null,[{key:"STEP",get:function e(){return 32e3}}]);return e}();var m;if(typeof e!=="undefined"){m=e}else if(typeof t!=="undefined"){m=t}else if(typeof self!=="undefined"){m=self}else{m={}}var g=m;var y=function e(t){if(ArrayBuffer.isView==="function"){return ArrayBuffer.isView(t)}return t&&t.buffer instanceof ArrayBuffer};var _=g.BigInt||Number;[_("0x1"),_("0x100"),_("0x10000"),_("0x1000000"),_("0x100000000"),_("0x10000000000"),_("0x1000000000000"),_("0x100000000000000"),_("0x10000000000000000")];(function(){var e=new Uint16Array([65484]);var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(t[0]===255){return"big"}if(t[0]===204){return"little"}return"unknown"})();var b=function e(t){var r={};Object.keys(t).forEach(function(e){var i=t[e];if(y(i)){r[e]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}}else{r[e]=i}});return r};self.onmessage=function(e){var t=e.data;var r=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength);var i=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4);var n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new v(r,i,n,function(e,r){self.postMessage(b({source:t.source,decrypted:r}),[r.buffer])})}}));var rs=$i(ts);var is=function e(t){var r=t.default?"main":"alternative";if(t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0){r="main-desc"}return r};var ns=function e(t,r){t.abort();t.pause();if(r&&r.activePlaylistLoader){r.activePlaylistLoader.pause();r.activePlaylistLoader=null}};var as=function e(t,r){r.activePlaylistLoader=t;t.load()};var ss=function e(t,r){return function(){var e=r.segmentLoaders,i=e[t],n=e.main,a=r.mediaTypes[t];var s=a.activeTrack();var o=a.getActiveGroup();var u=a.activePlaylistLoader;var l=a.lastGroup_;if(o&&l&&o.id===l.id){return}a.lastGroup_=o;a.lastTrack_=s;ns(i,a);if(!o||o.isMasterPlaylist){return}if(!o.playlistLoader){if(u){n.resetEverything()}return}i.resyncLoader();as(o.playlistLoader,a)}};var os=function e(t,r){return function(){var e=r.segmentLoaders[t],i=r.mediaTypes[t];i.lastGroup_=null;e.abort();e.pause()}};var us=function e(t,r){return function(){var e=r.masterPlaylistLoader,i=r.segmentLoaders,n=i[t],a=i.main,s=r.mediaTypes[t];var o=s.activeTrack();var u=s.getActiveGroup();var l=s.activePlaylistLoader;var d=s.lastTrack_;if(d&&o&&d.id===o.id){return}s.lastGroup_=u;s.lastTrack_=o;ns(n,s);if(!u){return}if(u.isMasterPlaylist){if(!o||!d||o.id===d.id){return}var c=r.vhs.masterPlaylistController_;var f=c.selectPlaylist();if(c.media()===f){return}s.logger_("track change. Switching master audio from "+d.id+" to "+o.id);e.pause();a.resetEverything();c.fastQualityChange_(f);return}if(t==="AUDIO"){if(!u.playlistLoader){a.setAudio(true);a.resetEverything();return}n.setAudio(true);a.setAudio(false)}if(l===u.playlistLoader){as(u.playlistLoader,s);return}if(n.track){n.track(o)}n.resetEverything();as(u.playlistLoader,s)}};var ls={AUDIO:function e(t,r){return function(){var e=r.segmentLoaders[t],i=r.mediaTypes[t],n=r.blacklistCurrentPlaylist;ns(e,i);var a=i.activeTrack();var o=i.activeGroup();var u=(o.filter(function(e){return e.default})[0]||o[0]).id;var l=i.tracks[u];if(a===l){n({message:"Problem encountered loading the default audio track."});return}s["default"].log.warn("Problem encountered loading the alternate audio track."+"Switching back to default.");for(var d in i.tracks){i.tracks[d].enabled=i.tracks[d]===l}i.onTrackChanged()}},SUBTITLES:function e(t,r){return function(){var e=r.segmentLoaders[t],i=r.mediaTypes[t];s["default"].log.warn("Problem encountered loading the subtitle track."+"Disabling subtitle track.");ns(e,i);var n=i.activeTrack();if(n){n.mode="disabled"}i.onTrackChanged()}}};var ds={AUDIO:function e(t,r,i){if(!r){return}var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",ls[t](t,i))},SUBTITLES:function e(t,r,i){var n=i.tech,a=i.requestOptions,s=i.segmentLoaders[t],o=i.mediaTypes[t];r.on("loadedmetadata",function(){var e=r.media();s.playlist(e,a);s.track(o.activeTrack());if(!n.paused()||e.endList&&n.preload()!=="none"){s.load()}});r.on("loadedplaylist",function(){s.playlist(r.media(),a);if(!n.paused()){s.load()}});r.on("error",ls[t](t,i))}};var cs={AUDIO:function e(t,r){var i=r.vhs,n=r.sourceType,a=r.segmentLoaders[t],o=r.requestOptions,u=r.master.mediaGroups,l=r.mediaTypes[t],d=l.groups,c=l.tracks,f=l.logger_,h=r.masterPlaylistLoader;var p=Ae(h.master);if(!u[t]||Object.keys(u[t]).length===0){u[t]={main:{default:{default:true}}};if(p){u[t].main.default.playlists=h.master.playlists}}for(var v in u[t]){if(!d[v]){d[v]=[]}for(var m in u[t][v]){var g=u[t][v][m];var y=void 0;if(p){f("AUDIO group '"+v+"' label '"+m+"' is a master playlist");g.isMasterPlaylist=true;y=null}else if(n==="vhs-json"&&g.playlists){y=new Xe(g.playlists[0],i,o)}else if(g.resolvedUri){y=new Xe(g.resolvedUri,i,o)}else if(g.playlists&&n==="dash"){y=new Ki(g.playlists[0],i,o,h)}else{y=null}g=s["default"].mergeOptions({id:m,playlistLoader:y},g);ds[t](t,g.playlistLoader,r);d[v].push(g);if(typeof c[m]==="undefined"){var _=new s["default"].AudioTrack({id:m,kind:is(g),enabled:false,language:g.language,default:g.default,label:m});c[m]=_}}}a.on("error",ls[t](t,r))},SUBTITLES:function e(t,r){var i=r.tech,n=r.vhs,a=r.sourceType,o=r.segmentLoaders[t],u=r.requestOptions,l=r.master.mediaGroups,d=r.mediaTypes[t],c=d.groups,f=d.tracks,h=r.masterPlaylistLoader;for(var p in l[t]){if(!c[p]){c[p]=[]}for(var v in l[t][p]){if(l[t][p][v].forced){continue}var m=l[t][p][v];var g=void 0;if(a==="hls"){g=new Xe(m.resolvedUri,n,u)}else if(a==="dash"){var y=m.playlists.filter(function(e){return e.excludeUntil!==Infinity});if(!y.length){return}g=new Ki(m.playlists[0],n,u,h)}else if(a==="vhs-json"){g=new Xe(m.playlists?m.playlists[0]:m.resolvedUri,n,u)}m=s["default"].mergeOptions({id:v,playlistLoader:g},m);ds[t](t,m.playlistLoader,r);c[p].push(m);if(typeof f[v]==="undefined"){var _=i.addRemoteTextTrack({id:v,kind:"subtitles",default:m.default&&m.autoselect,language:m.language,label:v},false).track;f[v]=_}}}o.on("error",ls[t](t,r))},"CLOSED-CAPTIONS":function e(t,r){var i=r.tech,n=r.master.mediaGroups,a=r.mediaTypes[t],o=a.groups,u=a.tracks;for(var l in n[t]){if(!o[l]){o[l]=[]}for(var d in n[t][l]){var c=n[t][l][d];if(!/^(?:CC|SERVICE)/.test(c.instreamId)){continue}var f=i.options_.vhs&&i.options_.vhs.captionServices||{};var h={label:d,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(f[h.instreamId]){h=s["default"].mergeOptions(h,f[h.instreamId])}if(h.default===undefined){delete h.default}o[l].push(s["default"].mergeOptions({id:d},c));if(typeof u[d]==="undefined"){var p=i.addRemoteTextTrack({id:h.instreamId,kind:"captions",default:h.default,language:h.language,label:h.label},false).track;u[d]=p}}}}};var fs=function e(t,r){for(var i=0;i<t.length;i++){if(ke(r,t[i])){return true}if(t[i].playlists&&e(t[i].playlists,r)){return true}}return false};var hs=function e(t,r){return function(e){var i=r.masterPlaylistLoader,n=r.mediaTypes[t].groups;var a=i.media();if(!a){return null}var s=null;if(a.attributes[t]){s=n[a.attributes[t]]}var o=Object.keys(n);if(!s){if(t==="AUDIO"&&o.length>1&&Ae(r.master)){for(var u=0;u<o.length;u++){var l=n[o[u]];if(fs(l,a)){s=l;break}}}else if(n.main){s=n.main}else if(o.length===1){s=n[o[0]]}}if(typeof e==="undefined"){return s}if(e===null||!s){return null}return s.filter(function(t){return t.id===e.id})[0]||null}};var ps={AUDIO:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].enabled){return e[i]}}return null}},SUBTITLES:function e(t,r){return function(){var e=r.mediaTypes[t].tracks;for(var i in e){if(e[i].mode==="showing"||e[i].mode==="hidden"){return e[i]}}return null}}};var vs=function e(t,r){var i=r.mediaTypes;return function(){var e=i[t].activeTrack();if(!e){return null}return i[t].activeGroup(e)}};var ms=function e(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){cs[e](e,t)});var r=t.mediaTypes,i=t.masterPlaylistLoader,n=t.tech,a=t.vhs,s=t.segmentLoaders,o=s["AUDIO"],u=s.main;["AUDIO","SUBTITLES"].forEach(function(e){r[e].activeGroup=hs(e,t);r[e].activeTrack=ps[e](e,t);r[e].onGroupChanged=ss(e,t);r[e].onGroupChanging=os(e,t);r[e].onTrackChanged=us(e,t);r[e].getActiveGroup=vs(e,t)});var l=r.AUDIO.activeGroup();if(l){var d=(l.filter(function(e){return e.default})[0]||l[0]).id;r.AUDIO.tracks[d].enabled=true;r.AUDIO.onGroupChanged();r.AUDIO.onTrackChanged();var c=r.AUDIO.getActiveGroup();if(!c.playlistLoader){u.setAudio(true)}else{u.setAudio(false);o.setAudio(true)}}i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return r[e].onGroupChanged()})});i.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(e){return r[e].onGroupChanging()})});var f=function e(){r.AUDIO.onTrackChanged();n.trigger({type:"usage",name:"vhs-audio-change"});n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",f);n.remoteTextTracks().addEventListener("change",r.SUBTITLES.onTrackChanged);a.on("dispose",function(){n.audioTracks().removeEventListener("change",f);n.remoteTextTracks().removeEventListener("change",r.SUBTITLES.onTrackChanged)});n.clearTracks("audio");for(var h in r.AUDIO.tracks){n.audioTracks().addTrack(r.AUDIO.tracks[h])}};var gs=function e(){var t={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ra,activeTrack:Ra,getActiveGroup:Ra,onGroupChanged:Ra,onTrackChanged:Ra,lastTrack_:null,logger_:g("MediaGroups["+e+"]")}});return t};var ys=60*2;var _s;var bs=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"];var Ts=function e(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]};var Ss=function e(t){var r=t.currentPlaylist,i=t.buffered,n=t.currentTime,a=t.nextPlaylist,o=t.bufferLowWaterLine,u=t.bufferHighWaterLine,l=t.duration,d=t.experimentalBufferBasedABR,c=t.log;if(!a){s["default"].log.warn("We received no playlist to switch to. Please check your stream.");return false}var f="allowing switch "+(r&&r.id||"null")+" -> "+a.id;if(!r){c(f+" as current playlist is not set");return true}if(a.id===r.id){return false}var h=Boolean(z(i,n).length);if(!r.endList){if(!h&&typeof r.partTargetDuration==="number"){c("not "+f+" as current playlist is live llhls, but currentTime isn't in buffered.");return false}c(f+" as current playlist is live");return true}var p=ie(i,n);var v=d?Yi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Yi.MAX_BUFFER_LOW_WATER_LINE;if(l<v){c(f+" as duration < max low water line ("+l+" < "+v+")");return true}var m=a.attributes.BANDWIDTH;var g=r.attributes.BANDWIDTH;if(m<g&&(!d||p<u)){var y=f+" as next bandwidth < current bandwidth ("+m+" < "+g+")";if(d){y+=" and forwardBuffer < bufferHighWaterLine ("+p+" < "+u+")"}c(y);return true}if((!d||m>g)&&p>=o){var _=f+" as forwardBuffer >= bufferLowWaterLine ("+p+" >= "+o+")";if(d){_+=" and next bandwidth > current bandwidth ("+m+" > "+g+")"}c(_);return true}c("not "+f+" as no switching criteria met");return false};var Es=function(t){c(r,t);function r(r){var i;i=t.call(this)||this;var n=r.src,a=r.handleManifestRedirects,o=r.withCredentials,u=r.tech,d=r.bandwidth,c=r.externVhs,f=r.useCueTags,h=r.blacklistDuration,p=r.enableLowInitialPlaylist,v=r.sourceType,m=r.cacheEncryptionKeys,y=r.experimentalBufferBasedABR,_=r.experimentalLeastPixelDiffSelector,b=r.captionServices;if(!n){throw new Error("A non-empty playlist URL or JSON manifest string is required")}var T=r.maxPlaylistRetries;if(T===null||typeof T==="undefined"){T=Infinity}_s=c;i.experimentalBufferBasedABR=Boolean(y);i.experimentalLeastPixelDiffSelector=Boolean(_);i.withCredentials=o;i.tech_=u;i.vhs_=u.vhs;i.sourceType_=v;i.useCueTags_=f;i.blacklistDuration=h;i.maxPlaylistRetries=T;i.enableLowInitialPlaylist=p;if(i.useCueTags_){i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues");i.cueTagsTrack_.inBandMetadataTrackDispatchType=""}i.requestOptions_={withCredentials:o,handleManifestRedirects:a,maxPlaylistRetries:T,timeout:null};i.on("error",i.pauseLoading);i.mediaTypes_=gs();i.mediaSource=new e.MediaSource;i.handleDurationChange_=i.handleDurationChange_.bind(l(i));i.handleSourceOpen_=i.handleSourceOpen_.bind(l(i));i.handleSourceEnded_=i.handleSourceEnded_.bind(l(i));i.mediaSource.addEventListener("durationchange",i.handleDurationChange_);i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_);i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_);i.seekable_=s["default"].createTimeRanges();i.hasPlayed_=false;i.syncController_=new Za(r);i.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},false).track;i.decrypter_=new rs;i.sourceUpdater_=new Ga(i.mediaSource);i.inbandTextTracks_={};i.timelineChangeController_=new es;var S={vhs:i.vhs_,parse708captions:r.parse708captions,useDtsForTimestampOffset:r.useDtsForTimestampOffset,captionServices:b,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.duration()},hasPlayed:function e(){return i.hasPlayed_},goalBufferLength:function e(){return i.goalBufferLength()},bandwidth:d,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_,experimentalExactManifestTimings:r.experimentalExactManifestTimings};i.masterPlaylistLoader_=i.sourceType_==="dash"?new Ki(n,i.vhs_,i.requestOptions_):new Xe(n,i.vhs_,i.requestOptions_);i.setupMasterPlaylistLoaderListeners_();i.mainSegmentLoader_=new La(s["default"].mergeOptions(S,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),r);i.audioSegmentLoader_=new La(s["default"].mergeOptions(S,{loaderType:"audio"}),r);i.subtitleSegmentLoader_=new za(s["default"].mergeOptions(S,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),r);i.setupSegmentLoaderListeners_();if(i.experimentalBufferBasedABR){i.masterPlaylistLoader_.one("loadedplaylist",function(){return i.startABRTimer_()});i.tech_.on("pause",function(){return i.stopABRTimer_()});i.tech_.on("play",function(){return i.startABRTimer_()})}bs.forEach(function(e){i[e+"_"]=Ts.bind(l(i),e)});i.logger_=g("MPC");i.triggeredFmp4Usage=false;if(i.tech_.preload()==="none"){i.loadOnPlay_=function(){i.loadOnPlay_=null;i.masterPlaylistLoader_.load()};i.tech_.one("play",i.loadOnPlay_)}else{i.masterPlaylistLoader_.load()}i.timeToLoadedData__=-1;i.mainAppendsToLoadedData__=-1;i.audioAppendsToLoadedData__=-1;var E=i.tech_.preload()==="none"?"play":"loadstart";i.tech_.one(E,function(){var e=Date.now();i.tech_.one("loadeddata",function(){i.timeToLoadedData__=Date.now()-e;i.mainAppendsToLoadedData__=i.mainSegmentLoader_.mediaAppends;i.audioAppendsToLoadedData__=i.audioSegmentLoader_.mediaAppends})});return i}var i=r.prototype;i.mainAppendsToLoadedData_=function e(){return this.mainAppendsToLoadedData__};i.audioAppendsToLoadedData_=function e(){return this.audioAppendsToLoadedData__};i.appendsToLoadedData_=function e(){var t=this.mainAppendsToLoadedData_();var r=this.audioAppendsToLoadedData_();if(t===-1||r===-1){return-1}return t+r};i.timeToLoadedData_=function e(){return this.timeToLoadedData__};i.checkABR_=function e(t){if(t===void 0){t="abr"}var r=this.selectPlaylist();if(r&&this.shouldSwitchToMedia_(r)){this.switchMedia_(r,t)}};i.switchMedia_=function e(t,r,i){var n=this.media();var a=n&&(n.id||n.uri);var s=t.id||t.uri;if(a&&a!==s){this.logger_("switch media "+a+" -> "+s+" from "+r);this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+r})}this.masterPlaylistLoader_.media(t,i)};i.startABRTimer_=function t(){var r=this;this.stopABRTimer_();this.abrTimer_=e.setInterval(function(){return r.checkABR_()},250)};i.stopABRTimer_=function t(){if(this.tech_.scrubbing&&this.tech_.scrubbing()){return}e.clearInterval(this.abrTimer_);this.abrTimer_=null};i.getAudioTrackPlaylists_=function e(){var t=this.master();var r=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO){return r}var i=t.mediaGroups.AUDIO;var n=Object.keys(i);var a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length){a=this.mediaTypes_.AUDIO.activeTrack()}else{var s=i.main||n.length&&i[n[0]];for(var o in s){if(s[o].default){a={label:o};break}}}if(!a){return r}var u=[];for(var l in i){if(i[l][a.label]){var d=i[l][a.label];if(d.playlists&&d.playlists.length){u.push.apply(u,d.playlists)}else if(d.uri){u.push(d)}else if(t.playlists.length){for(var c=0;c<t.playlists.length;c++){var f=t.playlists[c];if(f.attributes&&f.attributes.AUDIO&&f.attributes.AUDIO===l){u.push(f)}}}}}if(!u.length){return r}return u};i.setupMasterPlaylistLoaderListeners_=function e(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(Ce(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}if(e.endList&&t.tech_.preload()!=="none"){t.mainSegmentLoader_.playlist(e,t.requestOptions_);t.mainSegmentLoader_.load()}ms({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,vhs:t.vhs_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)});t.triggerPresenceUsage_(t.master(),e);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(){if(t.loadOnPlay_){t.tech_.off("play",t.loadOnPlay_)}var e=t.masterPlaylistLoader_.media();if(!e){t.excludeUnsupportedVariants_();var r;if(t.enableLowInitialPlaylist){r=t.selectInitialPlaylist()}if(!r){r=t.selectPlaylist()}if(!r||!t.shouldSwitchToMedia_(r)){return}t.initialMedia_=r;t.switchMedia_(t.initialMedia_,"initial");var i=t.sourceType_==="vhs-json"&&t.initialMedia_.segments;if(!i){return}e=t.initialMedia_}t.handleUpdatedMediaPlaylist(e)});this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort();t.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var e=t.masterPlaylistLoader_.media();var r=e.targetDuration*1.5*1e3;if(Ce(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())){t.requestOptions_.timeout=0}else{t.requestOptions_.timeout=r}t.masterPlaylistLoader_.load();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();if(e.lastExcludeReason_==="playlist-unchanged"){return}var r=t.stuckAtPlaylistEnd_(e);if(r){t.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"});t.tech_.trigger("playliststuck")}});this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"});t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})});this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"});t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})};i.handleUpdatedMediaPlaylist=function e(t){if(this.useCueTags_){this.updateAdCues_(t)}this.mainSegmentLoader_.playlist(t,this.requestOptions_);this.updateDuration(!t.endList);if(!this.tech_.paused()){this.mainSegmentLoader_.load();if(this.audioSegmentLoader_){this.audioSegmentLoader_.load()}}};i.triggerPresenceUsage_=function e(t,r){var i=t.mediaGroups||{};var n=true;var a=Object.keys(i.AUDIO);for(var s in i.AUDIO){for(var o in i.AUDIO[s]){var u=i.AUDIO[s][o];if(!u.uri){n=false}}}if(n){this.tech_.trigger({type:"usage",name:"vhs-demuxed"});this.tech_.trigger({type:"usage",name:"hls-demuxed"})}if(Object.keys(i.SUBTITLES).length){this.tech_.trigger({type:"usage",name:"vhs-webvtt"});this.tech_.trigger({type:"usage",name:"hls-webvtt"})}if(_s.Playlist.isAes(r)){this.tech_.trigger({type:"usage",name:"vhs-aes"});this.tech_.trigger({type:"usage",name:"hls-aes"})}if(a.length&&Object.keys(i.AUDIO[a[0]]).length>1){this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"});this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})}if(this.useCueTags_){this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"});this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}};i.shouldSwitchToMedia_=function e(t){var r=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_;var i=this.tech_.currentTime();var n=this.bufferLowWaterLine();var a=this.bufferHighWaterLine();var s=this.tech_.buffered();return Ss({buffered:s,currentTime:i,currentPlaylist:r,nextPlaylist:t,bufferLowWaterLine:n,bufferHighWaterLine:a,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})};i.setupSegmentLoaderListeners_=function e(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){t.checkABR_("bandwidthupdate");t.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("timeout",function(){if(t.experimentalBufferBasedABR){t.mainSegmentLoader_.load()}});if(!this.experimentalBufferBasedABR){this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")})}this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())});this.mainSegmentLoader_.on("appenderror",function(){t.error=t.mainSegmentLoader_.error_;t.trigger("error")});this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"});t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()});this.audioSegmentLoader_.on("appenderror",function(){t.error=t.audioSegmentLoader_.error_;t.trigger("error")});this.mainSegmentLoader_.on("ended",function(){t.logger_("main segment loader ended");t.onEndOfStream()});this.mainSegmentLoader_.on("earlyabort",function(e){if(t.experimentalBufferBasedABR){return}t.delegateLoaders_("all",["abort"]);t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the "+"request without rebuffering."},ys)});var r=function e(){if(!t.sourceUpdater_.hasCreatedSourceBuffers()){return t.tryToCreateSourceBuffers_()}var r=t.getCodecsOrExclude_();if(!r){return}t.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",r);this.audioSegmentLoader_.on("trackinfo",r);this.mainSegmentLoader_.on("fmp4",function(){if(!t.triggeredFmp4Usage){t.tech_.trigger({type:"usage",name:"vhs-fmp4"});t.tech_.trigger({type:"usage",name:"hls-fmp4"});t.triggeredFmp4Usage=true}});this.audioSegmentLoader_.on("fmp4",function(){if(!t.triggeredFmp4Usage){t.tech_.trigger({type:"usage",name:"vhs-fmp4"});t.tech_.trigger({type:"usage",name:"hls-fmp4"});t.triggeredFmp4Usage=true}});this.audioSegmentLoader_.on("ended",function(){t.logger_("audioSegmentLoader ended");t.onEndOfStream()})};i.mediaSecondsLoaded_=function e(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)};i.load=function e(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load()}};i.smoothQualityChange_=function e(t){if(t===void 0){t=this.selectPlaylist()}this.fastQualityChange_(t)};i.fastQualityChange_=function e(t){var r=this;if(t===void 0){t=this.selectPlaylist()}if(t===this.masterPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(t,"fast-quality");this.mainSegmentLoader_.resetEverything(function(){if(s["default"].browser.IE_VERSION||s["default"].browser.IS_EDGE){r.tech_.setCurrentTime(r.tech_.currentTime()+.04)}else{r.tech_.setCurrentTime(r.tech_.currentTime())}})};i.play=function e(){if(this.setupFirstPlay()){return}if(this.tech_.ended()){this.tech_.setCurrentTime(0)}if(this.hasPlayed_){this.load()}var t=this.tech_.seekable();if(this.tech_.duration()===Infinity){if(this.tech_.currentTime()<t.start(0)){return this.tech_.setCurrentTime(t.end(t.length-1))}}};i.setupFirstPlay=function e(){var t=this;var r=this.masterPlaylistLoader_.media();if(!r||this.tech_.paused()||this.hasPlayed_){return false}if(!r.endList){var i=this.seekable();if(!i.length){return false}if(s["default"].browser.IE_VERSION&&this.tech_.readyState()===0){this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.tech_.setCurrentTime(i.end(0));t.hasPlayed_=true});return false}this.trigger("firstplay");this.tech_.setCurrentTime(i.end(0))}this.hasPlayed_=true;this.load();return true};i.handleSourceOpen_=function e(){this.tryToCreateSourceBuffers_();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")};i.handleSourceEnded_=function e(){if(!this.inbandTextTracks_.metadataTrack_){return}var t=this.inbandTextTracks_.metadataTrack_.cues;if(!t||!t.length){return}var r=this.duration();t[t.length-1].endTime=isNaN(r)||Math.abs(r)===Infinity?Number.MAX_VALUE:r};i.handleDurationChange_=function e(){this.tech_.trigger("durationchange")};i.onEndOfStream=function e(){var t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var r=this.mainSegmentLoader_.getCurrentMediaInfo_();if(!r||r.hasVideo){t=t&&this.audioSegmentLoader_.ended_}else{t=this.audioSegmentLoader_.ended_}}if(!t){return}this.stopABRTimer_();this.sourceUpdater_.endOfStream()};i.stuckAtPlaylistEnd_=function e(t){var r=this.seekable();if(!r.length){return false}var i=this.syncController_.getExpiredTime(t,this.duration());if(i===null){return false}var n=_s.Playlist.playlistEnd(t,i);var a=this.tech_.currentTime();var s=this.tech_.buffered();if(!s.length){return n-a<=K}var o=s.end(s.length-1);return o-a<=K&&n-o<=K};i.blacklistCurrentPlaylist=function e(t,r){if(t===void 0){t={}}var i=t.playlist||this.masterPlaylistLoader_.media();r=r||t.blacklistDuration||this.blacklistDuration;if(!i){this.error=t;if(this.mediaSource.readyState!=="open"){this.trigger("error")}else{this.sourceUpdater_.endOfStream("network")}return}i.playlistErrors_++;var n=this.masterPlaylistLoader_.master.playlists;var a=n.filter(be);var o=a.length===1&&a[0]===i;if(n.length===1&&r!==Infinity){s["default"].log.warn("Problem encountered with playlist "+i.id+". "+"Trying again since it is the only playlist.");this.tech_.trigger("retryplaylist");return this.masterPlaylistLoader_.load(o)}if(o){var u=false;n.forEach(function(e){if(e===i){return}var t=e.excludeUntil;if(typeof t!=="undefined"&&t!==Infinity){u=true;delete e.excludeUntil}});if(u){s["default"].log.warn("Removing other playlists from the exclusion list because the last "+"rendition is about to be excluded.");this.tech_.trigger("retryplaylist")}}var l;if(i.playlistErrors_>this.maxPlaylistRetries){l=Infinity}else{l=Date.now()+r*1e3}i.excludeUntil=l;if(t.reason){i.lastExcludeReason_=t.reason}this.tech_.trigger("blacklistplaylist");this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"});this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var d=this.selectPlaylist();if(!d){this.error="Playback cannot continue. No available working or supported playlists.";this.trigger("error");return}var c=t.internal?this.logger_:s["default"].log.warn;var f=t.message?" "+t.message:"";c((t.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+(f+" Switching to playlist "+d.id+"."));if(d.attributes.AUDIO!==i.attributes.AUDIO){this.delegateLoaders_("audio",["abort","pause"])}if(d.attributes.SUBTITLES!==i.attributes.SUBTITLES){this.delegateLoaders_("subtitle",["abort","pause"])}this.delegateLoaders_("main",["abort","pause"]);var h=d.targetDuration/2*1e3||5*1e3;var p=typeof d.lastRequest==="number"&&Date.now()-d.lastRequest<=h;return this.switchMedia_(d,"exclude",o||p)};i.pauseLoading=function e(){this.delegateLoaders_("all",["abort","pause"]);this.stopABRTimer_()};i.delegateLoaders_=function e(t,r){var i=this;var n=[];var a=t==="all";if(a||t==="main"){n.push(this.masterPlaylistLoader_)}var s=[];if(a||t==="audio"){s.push("AUDIO")}if(a||t==="subtitle"){s.push("CLOSED-CAPTIONS");s.push("SUBTITLES")}s.forEach(function(e){var t=i.mediaTypes_[e]&&i.mediaTypes_[e].activePlaylistLoader;if(t){n.push(t)}});["main","audio","subtitle"].forEach(function(e){var r=i[e+"SegmentLoader_"];if(r&&(t===e||t==="all")){n.push(r)}});n.forEach(function(e){return r.forEach(function(t){if(typeof e[t]==="function"){e[t]()}})})};i.setCurrentTime=function e(t){var r=z(this.tech_.buffered(),t);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())){return 0}if(!this.masterPlaylistLoader_.media().segments){return 0}if(r&&r.length){return t}this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.resetEverything();this.audioSegmentLoader_.abort()}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.resetEverything();this.subtitleSegmentLoader_.abort()}this.load()};i.duration=function e(){if(!this.masterPlaylistLoader_){return 0}var t=this.masterPlaylistLoader_.media();if(!t){return 0}if(!t.endList){return Infinity}if(this.mediaSource){return this.mediaSource.duration}return _s.Playlist.duration(t)};i.seekable=function e(){return this.seekable_};i.onSyncInfoUpdate_=function e(){var t;if(!this.masterPlaylistLoader_){return}var r=this.masterPlaylistLoader_.media();if(!r){return}var i=this.syncController_.getExpiredTime(r,this.duration());if(i===null){return}var n=this.masterPlaylistLoader_.master;var a=_s.Playlist.seekable(r,i,_s.Playlist.liveEdgeDelay(n,r));if(a.length===0){return}if(this.mediaTypes_.AUDIO.activePlaylistLoader){r=this.mediaTypes_.AUDIO.activePlaylistLoader.media();i=this.syncController_.getExpiredTime(r,this.duration());if(i===null){return}t=_s.Playlist.seekable(r,i,_s.Playlist.liveEdgeDelay(n,r));if(t.length===0){return}}var o;var u;if(this.seekable_&&this.seekable_.length){o=this.seekable_.end(0);u=this.seekable_.start(0)}if(!t){this.seekable_=a}else if(t.start(0)>a.end(0)||a.start(0)>t.end(0)){this.seekable_=a}else{this.seekable_=s["default"].createTimeRanges([[t.start(0)>a.start(0)?t.start(0):a.start(0),t.end(0)<a.end(0)?t.end(0):a.end(0)]])}if(this.seekable_&&this.seekable_.length){if(this.seekable_.end(0)===o&&this.seekable_.start(0)===u){return}}this.logger_("seekable updated ["+J(this.seekable_)+"]");this.tech_.trigger("seekablechanged")};i.updateDuration=function e(t){if(this.updateDuration_){this.mediaSource.removeEventListener("sourceopen",this.updateDuration_);this.updateDuration_=null}if(this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,t);this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(t){var r=this.seekable();if(!r.length){return}if(isNaN(this.mediaSource.duration)||this.mediaSource.duration<r.end(r.length-1)){this.sourceUpdater_.setDuration(r.end(r.length-1))}return}var i=this.tech_.buffered();var n=_s.Playlist.duration(this.masterPlaylistLoader_.media());if(i.length>0){n=Math.max(n,i.end(i.length-1))}if(this.mediaSource.duration!==n){this.sourceUpdater_.setDuration(n)}};i.dispose=function e(){var t=this;this.trigger("dispose");this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();if(this.loadOnPlay_){this.tech_.off("play",this.loadOnPlay_)}["AUDIO","SUBTITLES"].forEach(function(e){var r=t.mediaTypes_[e].groups;for(var i in r){r[i].forEach(function(e){if(e.playlistLoader){e.playlistLoader.dispose()}})}});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose();this.sourceUpdater_.dispose();this.timelineChangeController_.dispose();this.stopABRTimer_();if(this.updateDuration_){this.mediaSource.removeEventListener("sourceopen",this.updateDuration_)}this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_);this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_);this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_);this.off()};i.master=function e(){return this.masterPlaylistLoader_.master};i.media=function e(){return this.masterPlaylistLoader_.media()||this.initialMedia_};i.areMediaTypesKnown_=function e(){var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;var r=!!this.mainSegmentLoader_.getCurrentMediaInfo_();var i=!t?true:!!this.audioSegmentLoader_.getCurrentMediaInfo_();if(!r||!i){return false}return true};i.getCodecsOrExclude_=function e(){var t=this;var r={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};r.video=r.main;var i=Fn(this.master(),this.media());var n={};var a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(r.main.hasVideo){n.video=i.video||r.main.videoCodec||W}if(r.main.isMuxed){n.video+=","+(i.audio||r.main.audioCodec||H)}if(r.main.hasAudio&&!r.main.isMuxed||r.audio.hasAudio||a){n.audio=i.audio||r.main.audioCodec||r.audio.audioCodec||H;r.audio.isFmp4=r.main.hasAudio&&!r.main.isMuxed?r.main.isFmp4:r.audio.isFmp4}if(!n.audio&&!n.video){this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:Infinity});return}var s=function e(t,r){return t?V(r):q(r)};var o={};var u;["video","audio"].forEach(function(e){if(n.hasOwnProperty(e)&&!s(r[e].isFmp4,n[e])){var t=r[e].isFmp4?"browser":"muxer";o[t]=o[t]||[];o[t].push(n[e]);if(e==="audio"){u=t}}});if(a&&u&&this.media().attributes.AUDIO){var l=this.media().attributes.AUDIO;this.master().playlists.forEach(function(e){var r=e.attributes&&e.attributes.AUDIO;if(r===l&&e!==t.media()){e.excludeUntil=Infinity}});this.logger_("excluding audio group "+l+" as "+u+' does not support codec(s): "'+n.audio+'"')}if(Object.keys(o).length){var d=Object.keys(o).reduce(function(e,t){if(e){e+=", "}e+=t+' does not support codec(s): "'+o[t].join(",")+'"';return e},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:true,message:d,blacklistDuration:Infinity});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var c=[];["video","audio"].forEach(function(e){var r=(M(t.sourceUpdater_.codecs[e]||"")[0]||{}).type;var i=(M(n[e]||"")[0]||{}).type;if(r&&i&&r.toLowerCase()!==i.toLowerCase()){c.push('"'+t.sourceUpdater_.codecs[e]+'" -> "'+n[e]+'"')}});if(c.length){this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+c.join(", ")+".",blacklistDuration:Infinity,internal:true});return}}return n};i.tryToCreateSourceBuffers_=function e(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()){return}if(!this.areMediaTypesKnown_()){return}var t=this.getCodecsOrExclude_();if(!t){return}this.sourceUpdater_.createSourceBuffers(t);var r=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(r)};i.excludeUnsupportedVariants_=function e(){var t=this;var r=this.master().playlists;var i=[];Object.keys(r).forEach(function(e){var n=r[e];if(i.indexOf(n.id)!==-1){return}i.push(n.id);var a=Fn(t.master,n);var s=[];if(a.audio&&!q(a.audio)&&!V(a.audio)){s.push("audio codec "+a.audio)}if(a.video&&!q(a.video)&&!V(a.video)){s.push("video codec "+a.video)}if(a.text&&a.text==="stpp.ttml.im1t"){s.push("text codec "+a.text)}if(s.length){n.excludeUntil=Infinity;t.logger_("excluding "+n.id+" for unsupported: "+s.join(", "))}})};i.excludeIncompatibleVariants_=function e(t){var r=this;var i=[];var n=this.master().playlists;var a=Un(M(t));var s=Bn(a);var o=a.video&&M(a.video)[0]||null;var u=a.audio&&M(a.audio)[0]||null;Object.keys(n).forEach(function(e){var t=n[e];if(i.indexOf(t.id)!==-1||t.excludeUntil===Infinity){return}i.push(t.id);var a=[];var l=Fn(r.masterPlaylistLoader_.master,t);var d=Bn(l);if(!l.audio&&!l.video){return}if(d!==s){a.push('codec count "'+d+'" !== "'+s+'"')}if(!r.sourceUpdater_.canChangeType()){var c=l.video&&M(l.video)[0]||null;var f=l.audio&&M(l.audio)[0]||null;if(c&&o&&c.type.toLowerCase()!==o.type.toLowerCase()){a.push('video codec "'+c.type+'" !== "'+o.type+'"')}if(f&&u&&f.type.toLowerCase()!==u.type.toLowerCase()){a.push('audio codec "'+f.type+'" !== "'+u.type+'"')}}if(a.length){t.excludeUntil=Infinity;r.logger_("blacklisting "+t.id+": "+a.join(" && "))}})};i.updateAdCues_=function e(t){var r=0;var i=this.seekable();if(i.length){r=i.start(0)}Qa(t,this.cueTagsTrack_,r)};i.goalBufferLength=function e(){var t=this.tech_.currentTime();var r=Yi.GOAL_BUFFER_LENGTH;var i=Yi.GOAL_BUFFER_LENGTH_RATE;var n=Math.max(r,Yi.MAX_GOAL_BUFFER_LENGTH);return Math.min(r+t*i,n)};i.bufferLowWaterLine=function e(){var t=this.tech_.currentTime();var r=Yi.BUFFER_LOW_WATER_LINE;var i=Yi.BUFFER_LOW_WATER_LINE_RATE;var n=Math.max(r,Yi.MAX_BUFFER_LOW_WATER_LINE);var a=Math.max(r,Yi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(r+t*i,this.experimentalBufferBasedABR?a:n)};i.bufferHighWaterLine=function e(){return Yi.BUFFER_HIGH_WATER_LINE};return r}(s["default"].EventTarget);var Is=function e(t,r,i){return function(e){var n=t.master.playlists[r];var a=_e(n);var s=be(n);if(typeof e==="undefined"){return s}if(e){delete n.disabled}else{n.disabled=true}if(e!==s&&!a){i();if(e){t.trigger("renditionenabled")}else{t.trigger("renditiondisabled")}}return e}};var Cs=function e(t,r,i){var n=t.masterPlaylistController_,a=t.options_.smoothQualityChange;var s=a?"smooth":"fast";var o=n[s+"QualityChange_"].bind(n);if(r.attributes){var u=r.attributes.RESOLUTION;this.width=u&&u.width;this.height=u&&u.height;this.bandwidth=r.attributes.BANDWIDTH;this.frameRate=r.attributes["FRAME-RATE"]}this.codecs=Fn(n.master(),r);this.playlist=r;this.id=i;this.enabled=Is(t.playlists,r.id,o)};var ks=function e(t){t.representations=function(){var e=t.masterPlaylistController_.master();var r=Ae(e)?t.masterPlaylistController_.getAudioTrackPlaylists_():e.playlists;if(!r){return[]}return r.filter(function(e){return!_e(e)}).map(function(e,r){return new Cs(t,e,e.id)})}};var ws=["seeking","seeked","pause","playing","error"];var As=function(){function t(t){var r=this;this.masterPlaylistController_=t.masterPlaylistController;this.tech_=t.tech;this.seekable=t.seekable;this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow;this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta;this.media=t.media;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=g("PlaybackWatcher");this.logger_("initialize");var i=function e(){return r.monitorCurrentTime_()};var n=function e(){return r.monitorCurrentTime_()};var a=function e(){return r.techWaiting_()};var s=function e(){return r.cancelTimer_()};var o=this.masterPlaylistController_;var u=["main","subtitle","audio"];var l={};u.forEach(function(e){l[e]={reset:function t(){return r.resetSegmentDownloads_(e)},updateend:function t(){return r.checkSegmentDownloads_(e)}};o[e+"SegmentLoader_"].on("appendsdone",l[e].updateend);o[e+"SegmentLoader_"].on("playlistupdate",l[e].reset);r.tech_.on(["seeked","seeking"],l[e].reset)});var d=function e(t){["main","audio"].forEach(function(e){o[e+"SegmentLoader_"][t]("appended",r.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){if(r.fixesBadSeeks_()){r.consecutiveUpdates=0;r.lastRecordedTime=r.tech_.currentTime();d("off")}};this.clearSeekingAppendCheck_=function(){return d("off")};this.watchForBadSeeking_=function(){r.clearSeekingAppendCheck_();d("on")};this.tech_.on("seeked",this.clearSeekingAppendCheck_);this.tech_.on("seeking",this.watchForBadSeeking_);this.tech_.on("waiting",a);this.tech_.on(ws,s);this.tech_.on("canplay",n);this.tech_.one("play",i);this.dispose=function(){r.clearSeekingAppendCheck_();r.logger_("dispose");r.tech_.off("waiting",a);r.tech_.off(ws,s);r.tech_.off("canplay",n);r.tech_.off("play",i);r.tech_.off("seeking",r.watchForBadSeeking_);r.tech_.off("seeked",r.clearSeekingAppendCheck_);u.forEach(function(e){o[e+"SegmentLoader_"].off("appendsdone",l[e].updateend);o[e+"SegmentLoader_"].off("playlistupdate",l[e].reset);r.tech_.off(["seeked","seeking"],l[e].reset)});if(r.checkCurrentTimeTimeout_){e.clearTimeout(r.checkCurrentTimeTimeout_)}r.cancelTimer_()}}var r=t.prototype;r.monitorCurrentTime_=function t(){this.checkCurrentTime_();if(this.checkCurrentTimeTimeout_){e.clearTimeout(this.checkCurrentTimeTimeout_)}this.checkCurrentTimeTimeout_=e.setTimeout(this.monitorCurrentTime_.bind(this),250)};r.resetSegmentDownloads_=function e(t){var r=this.masterPlaylistController_[t+"SegmentLoader_"];if(this[t+"StalledDownloads_"]>0){this.logger_("resetting possible stalled download count for "+t+" loader")}this[t+"StalledDownloads_"]=0;this[t+"Buffered_"]=r.buffered_()};r.checkSegmentDownloads_=function e(t){var r=this.masterPlaylistController_;var i=r[t+"SegmentLoader_"];var n=i.buffered_();var a=te(this[t+"Buffered_"],n);this[t+"Buffered_"]=n;if(a){this.resetSegmentDownloads_(t);return}this[t+"StalledDownloads_"]++;this.logger_("found #"+this[t+"StalledDownloads_"]+" "+t+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:ee(n)});if(this[t+"StalledDownloads_"]<10){return}this.logger_(t+" loader stalled download exclusion");this.resetSegmentDownloads_(t);this.tech_.trigger({type:"usage",name:"vhs-"+t+"-download-exclusion"});if(t==="subtitle"){return}r.blacklistCurrentPlaylist({message:"Excessive "+t+" segment downloading detected."},Infinity)};r.checkCurrentTime_=function e(){if(this.tech_.paused()||this.tech_.seeking()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();if(this.lastRecordedTime===t&&(!r.length||t+K>=r.end(r.length-1))){return this.techWaiting_()}if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime){this.consecutiveUpdates++;this.waiting_()}else if(t===this.lastRecordedTime){this.consecutiveUpdates++}else{this.consecutiveUpdates=0;this.lastRecordedTime=t}};r.cancelTimer_=function e(){this.consecutiveUpdates=0;if(this.timer_){this.logger_("cancelTimer_");clearTimeout(this.timer_)}this.timer_=null};r.fixesBadSeeks_=function e(){var t=this.tech_.seeking();if(!t){return false}var r=this.seekable();var i=this.tech_.currentTime();var n=this.afterSeekableWindow_(r,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);var a;if(n){var s=r.end(r.length-1);a=s}if(this.beforeSeekableWindow_(r,i)){var o=r.start(0);a=o+(o===r.end(0)?0:K)}if(typeof a!=="undefined"){this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+J(r)+". Seeking to ")+(a+"."));this.tech_.setCurrentTime(a);return true}var u=this.masterPlaylistController_.sourceUpdater_;var l=this.tech_.buffered();var d=u.audioBuffer?u.audioBuffered():null;var c=u.videoBuffer?u.videoBuffered():null;var f=this.media();var h=f.partTargetDuration?f.partTargetDuration:(f.targetDuration-G)*2;var p=[d,c];for(var v=0;v<p.length;v++){if(!p[v]){continue}var m=ie(p[v],i);if(m<h){return false}}var g=X(l,i);if(g.length===0){return false}a=g.start(0)+K;this.logger_("Buffered region starts ("+g.start(0)+") "+(" just beyond seek point ("+i+"). Seeking to "+a+"."));this.tech_.setCurrentTime(a);return true};r.waiting_=function e(){if(this.techWaiting_()){return}var t=this.tech_.currentTime();var r=this.tech_.buffered();var i=z(r,t);if(i.length&&t+3<=i.end(0)){this.cancelTimer_();this.tech_.setCurrentTime(t);this.logger_("Stopped at "+t+" while inside a buffered region "+("["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time.");this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}};r.techWaiting_=function e(){var t=this.seekable();var r=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null){return true}if(this.beforeSeekableWindow_(t,r)){var i=t.end(t.length-1);this.logger_("Fell out of live window at time "+r+". Seeking to "+("live point (seekable end) "+i));this.cancelTimer_();this.tech_.setCurrentTime(i);this.tech_.trigger({type:"usage",name:"vhs-live-resync"});this.tech_.trigger({type:"usage",name:"hls-live-resync"});return true}var n=this.tech_.vhs.masterPlaylistController_.sourceUpdater_;var a=this.tech_.buffered();var s=this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:r});if(s){this.cancelTimer_();this.tech_.setCurrentTime(r);this.tech_.trigger({type:"usage",name:"vhs-video-underflow"});this.tech_.trigger({type:"usage",name:"hls-video-underflow"});return true}var o=X(a,r);if(o.length>0){var u=o.start(0)-r;this.logger_("Stopped at "+r+", setting timer for "+u+", seeking "+("to "+o.start(0)));this.cancelTimer_();this.timer_=setTimeout(this.skipTheGap_.bind(this),u*1e3,r);return true}return false};r.afterSeekableWindow_=function e(t,r,i,n){if(n===void 0){n=false}if(!t.length){return false}var a=t.end(t.length-1)+K;var s=!i.endList;if(s&&n){a=t.end(t.length-1)+i.targetDuration*3}if(r>a){return true}return false};r.beforeSeekableWindow_=function e(t,r){if(t.length&&t.start(0)>0&&r<t.start(0)-this.liveRangeSafeTimeDelta){return true}return false};r.videoUnderflow_=function e(t){var r=t.videoBuffered,i=t.audioBuffered,n=t.currentTime;if(!r){return}var a;if(r.length&&i.length){var s=z(r,n-3);var o=z(r,n);var u=z(i,n);if(u.length&&!o.length&&s.length){a={start:s.end(0),end:u.end(0)}}}else{var l=X(r,n);if(!l.length){a=this.gapFromVideoUnderflow_(r,n)}}if(a){this.logger_("Encountered a gap in video from "+a.start+" to "+a.end+". "+("Seeking to current time "+n));return true}return false};r.skipTheGap_=function e(t){var r=this.tech_.buffered();var i=this.tech_.currentTime();var n=X(r,i);this.cancelTimer_();if(n.length===0||i!==t){return}this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0));this.tech_.setCurrentTime(n.start(0)+G);this.tech_.trigger({type:"usage",name:"vhs-gap-skip"});this.tech_.trigger({type:"usage",name:"hls-gap-skip"})};r.gapFromVideoUnderflow_=function e(t,r){var i=Q(t);for(var n=0;n<i.length;n++){var a=i.start(n);var s=i.end(n);if(r-a<4&&r-a>2){return{start:a,end:s}}}return null};return t}();var Ps={errorInterval:30,getSource:function e(t){var r=this.tech({IWillNotUseThisInPlugins:true});var i=r.currentSource_||this.currentSource();return t(i)}};var Os=function e(t,r){var i=0;var n=0;var a=s["default"].mergeOptions(Ps,r);t.ready(function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"});t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function e(){if(n){t.currentTime(n)}};var u=function e(r){if(r===null||r===undefined){return}n=t.duration()!==Infinity&&t.currentTime()||0;t.one("loadedmetadata",o);t.src(r);t.trigger({type:"usage",name:"vhs-error-reload"});t.trigger({type:"usage",name:"hls-error-reload"});t.play()};var l=function e(){if(Date.now()-i<a.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});t.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!a.getSource||typeof a.getSource!=="function"){s["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}i=Date.now();return a.getSource.call(t,u)};var d=function e(){t.off("loadedmetadata",o);t.off("error",l);t.off("dispose",e)};var c=function r(i){d();e(t,i)};t.on("error",l);t.on("dispose",d);t.reloadSourceOnError=c};var xs=function e(t){Os(this,t)};var Ds="2.15.1";var Ls="6.0.1";var Rs="0.22.1";var Ns="4.8.0";var Ms="3.1.3";var Us={PlaylistLoader:Xe,Playlist:Pe,utils:kt,STANDARD_PLAYLIST_SELECTOR:Yn,INITIAL_PLAYLIST_SELECTOR:Qn,lastBandwidthSelector:Yn,movingAverageBandwidthSelector:zn,comparePlaylistBandwidth:Wn,comparePlaylistResolution:Gn,xhr:Ze()};Object.keys(Yi).forEach(function(e){Object.defineProperty(Us,e,{get:function t(){s["default"].log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing");return Yi[e]},set:function t(r){s["default"].log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing");if(typeof r!=="number"||r<0){s["default"].log.warn("value of Vhs."+e+" must be greater than or equal to 0");return}Yi[e]=r}})});var Bs="videojs-vhs";var Fs=function e(t,r){var i=r.media();var n=-1;for(var a=0;a<t.length;a++){if(t[a].id===i.id){n=a;break}}t.selectedIndex_=n;t.trigger({selectedIndex:n,type:"change"})};var js=function e(t,r){r.representations().forEach(function(e){t.addQualityLevel(e)});Fs(t,r.playlists)};Us.canPlaySource=function(){return s["default"].log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var Vs=function e(t,r,i){if(!t){return t}var n={};if(r&&r.attributes&&r.attributes.CODECS){n=Un(M(r.attributes.CODECS))}if(i&&i.attributes&&i.attributes.CODECS){n.audio=i.attributes.CODECS}var a=j(n.video);var o=j(n.audio);var u={};for(var l in t){u[l]={};if(o){u[l].audioContentType=o}if(a){u[l].videoContentType=a}if(r.contentProtection&&r.contentProtection[l]&&r.contentProtection[l].pssh){u[l].pssh=r.contentProtection[l].pssh}if(typeof t[l]==="string"){u[l].url=t[l]}}return s["default"].mergeOptions(t,u)};var qs=function e(t,r){return t.reduce(function(e,t){if(!t.contentProtection){return e}var i=r.reduce(function(e,r){var i=t.contentProtection[r];if(i&&i.pssh){e[r]={pssh:i.pssh}}return e},{});if(Object.keys(i).length){e.push(i)}return e},[])};var Hs=function e(t){var r=t.player,i=t.sourceKeySystems,n=t.audioMedia,a=t.mainPlaylists;if(!r.eme.initializeMediaKeys){return Promise.resolve()}var s=n?a.concat([n]):a;var o=qs(s,Object.keys(i));var u=[];var l=[];o.forEach(function(e){l.push(new Promise(function(e,t){r.tech_.one("keysessioncreated",e)}));u.push(new Promise(function(t,i){r.eme.initializeMediaKeys({keySystems:e},function(e){if(e){i(e);return}t()})}))});return Promise.race([Promise.all(u),Promise.race(l)])};var Ws=function e(t){var r=t.player,i=t.sourceKeySystems,n=t.media,a=t.audioMedia;var o=Vs(i,n,a);if(!o){return false}r.currentSource().keySystems=o;if(o&&!r.eme){s["default"].log.warn("DRM encrypted source cannot be decrypted without a DRM plugin");return false}return true};var Gs=function t(){if(!e.localStorage){return null}var r=e.localStorage.getItem(Bs);if(!r){return null}try{return JSON.parse(r)}catch(e){return null}};var Ks=function t(r){if(!e.localStorage){return false}var i=Gs();i=i?s["default"].mergeOptions(i,r):r;try{e.localStorage.setItem(Bs,JSON.stringify(i))}catch(e){return false}return i};var Ys=function e(t){if(t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0){return JSON.parse(t.substring(t.indexOf(",")+1))}return t};Us.supportsNativeHls=function(){if(!t||!t.createElement){return false}var e=t.createElement("video");if(!s["default"].getTech("Html5").isSupported()){return false}var r=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return r.some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}();Us.supportsNativeDash=function(){if(!t||!t.createElement||!s["default"].getTech("Html5").isSupported()){return false}return/maybe|probably/i.test(t.createElement("video").canPlayType("application/dash+xml"))}();Us.supportsTypeNatively=function(e){if(e==="hls"){return Us.supportsNativeHls}if(e==="dash"){return Us.supportsNativeDash}return false};Us.isSupported=function(){return s["default"].log.warn("HLS is no longer a tech. Please remove it from "+"your player's techOrder.")};var zs=s["default"].getComponent("Component");var Xs=function(r){c(i,r);function i(e,i,n){var a;a=r.call(this,i,s["default"].mergeOptions(n.hls,n.vhs))||this;if(n.hls&&Object.keys(n.hls).length){s["default"].log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.")}if(typeof n.initialBandwidth==="number"){a.options_.bandwidth=n.initialBandwidth}a.logger_=g("VhsHandler");if(i.options_&&i.options_.playerId){var o=s["default"](i.options_.playerId);if(!o.hasOwnProperty("hls")){Object.defineProperty(o,"hls",{get:function e(){s["default"].log.warn("player.hls is deprecated. Use player.tech().vhs instead.");i.trigger({type:"usage",name:"hls-player-access"});return l(a)},configurable:true})}if(!o.hasOwnProperty("vhs")){Object.defineProperty(o,"vhs",{get:function e(){s["default"].log.warn("player.vhs is deprecated. Use player.tech().vhs instead.");i.trigger({type:"usage",name:"vhs-player-access"});return l(a)},configurable:true})}if(!o.hasOwnProperty("dash")){Object.defineProperty(o,"dash",{get:function e(){s["default"].log.warn("player.dash is deprecated. Use player.tech().vhs instead.");return l(a)},configurable:true})}a.player_=o}a.tech_=i;a.source_=e;a.stats={};a.ignoreNextSeekingEvent_=false;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(t,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var r=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;if(r&&r.contains(a.tech_.el())){a.masterPlaylistController_.fastQualityChange_()}else{a.masterPlaylistController_.checkABR_()}});a.on(a.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=false;return}this.setCurrentTime(this.tech_.currentTime())});a.on(a.tech_,"error",function(){if(this.tech_.error()&&this.masterPlaylistController_){this.masterPlaylistController_.pauseLoading()}});a.on(a.tech_,"play",a.play);return a}var n=i.prototype;n.setOptions_=function e(){var t=this;this.options_.withCredentials=this.options_.withCredentials||false;this.options_.handleManifestRedirects=this.options_.handleManifestRedirects===false?false:true;this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions===false?false:true;this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||false;this.options_.smoothQualityChange=this.options_.smoothQualityChange||false;this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage!=="undefined"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||false;this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||false;this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||false;this.options_.customTagParsers=this.options_.customTagParsers||[];this.options_.customTagMappers=this.options_.customTagMappers||[];this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||false;if(typeof this.options_.blacklistDuration!=="number"){this.options_.blacklistDuration=5*60}if(typeof this.options_.bandwidth!=="number"){if(this.options_.useBandwidthFromLocalStorage){var r=Gs();if(r&&r.bandwidth){this.options_.bandwidth=r.bandwidth;this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"});this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})}if(r&&r.throughput){this.options_.throughput=r.throughput;this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"});this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"})}}}if(typeof this.options_.bandwidth!=="number"){this.options_.bandwidth=Yi.INITIAL_BANDWIDTH}this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Yi.INITIAL_BANDWIDTH;["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(e){if(typeof t.source_[e]!=="undefined"){t.options_[e]=t.source_[e]}});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions;this.useDevicePixelRatio=this.options_.useDevicePixelRatio};n.src=function t(r,i){var n=this;if(!r){return}this.setOptions_();this.options_.src=Ys(this.source_.src);this.options_.tech=this.tech_;this.options_.externVhs=Us;this.options_.sourceType=nt(i);this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)};if(this.options_.smoothQualityChange){s["default"].log.warn("smoothQualityChange is deprecated and will be removed in the next major version")}this.masterPlaylistController_=new Es(this.options_);var a=s["default"].mergeOptions({liveRangeSafeTimeDelta:K},this.options_,{seekable:function e(){return n.seekable()},media:function e(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new As(a);this.masterPlaylistController_.on("error",function(){var e=s["default"].players[n.tech_.options_.playerId];var t=n.masterPlaylistController_.error;if(typeof t==="object"&&!t.code){t.code=3}else if(typeof t==="string"){t={message:t,code:3}}e.error(t)});var o=this.options_.experimentalBufferBasedABR?Us.movingAverageBandwidthSelector(.55):Us.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this);this.masterPlaylistController_.selectInitialPlaylist=Us.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 t(){var r=this.masterPlaylistController_.mainSegmentLoader_.bandwidth;var i=e.navigator.connection||e.navigator.mozConnection||e.navigator.webkitConnection;var n=1e7;if(this.options_.useNetworkInformationApi&&i){var a=i.downlink*1e3*1e3;if(a>=n&&r>=n){r=Math.max(r,a)}else{r=a}}return r},set:function e(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function e(){var t=1/(this.bandwidth||1);var r;if(this.throughput>0){r=1/this.throughput}else{r=0}var i=Math.floor(1/(t+r));return i},set:function e(){s["default"].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},mediaAppends:{get:function e(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:true},mainAppendsToLoadedData:{get:function e(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:true},audioAppendsToLoadedData:{get:function e(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:true},appendsToLoadedData:{get:function e(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:true},timeToLoadedData:{get:function e(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:true},buffered:{get:function e(){return ee(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 ee(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){Ks({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}});this.masterPlaylistController_.on("selectedinitialmedia",function(){ks(n)});this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){n.setupEme_()});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=true});this.setupQualityLevels_();if(!this.tech_.el()){return}this.mediaSourceUrl_=e.URL.createObjectURL(this.masterPlaylistController_.mediaSource);this.tech_.src(this.mediaSourceUrl_)};n.createKeySessions_=function e(){var t=this;var r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation");Hs({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:r&&r.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_("created EME key session");t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(e){t.logger_("error while creating EME key session",e);t.player_.error({message:"Failed to initialize media keys for EME",code:3})})};n.handleWaitingForKey_=function e(){this.logger_("waitingforkey fired, attempting to create any new key sessions");this.createKeySessions_()};n.setupEme_=function e(){var t=this;var r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;var i=Ws({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:r&&r.media()});this.player_.tech_.on("keystatuschange",function(e){if(e.status!=="output-restricted"){return}var r=t.masterPlaylistController_.master();if(!r||!r.playlists){return}var i=[];r.playlists.forEach(function(e){if(e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720){if(!e.excludeUntil||e.excludeUntil<Infinity){e.excludeUntil=Infinity;i.push(e)}}});if(i.length){var n;(n=s["default"].log).warn.apply(n,['DRM keystatus changed to "output-restricted." Removing the following HD playlists '+"that will most likely fail to play and clearing the buffer. "+"This may be due to HDCP restrictions on the stream and the capabilities of the current device."].concat(i));t.masterPlaylistController_.fastQualityChange_()}});this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this);this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_);if(s["default"].browser.IE_VERSION===11||!i){this.masterPlaylistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()};n.setupQualityLevels_=function e(){var t=this;var r=s["default"].players[this.tech_.options_.playerId];if(!r||!r.qualityLevels||this.qualityLevels_){return}this.qualityLevels_=r.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){js(t.qualityLevels_,t)});this.playlists.on("mediachange",function(){Fs(t.qualityLevels_,t.playlists)})};i.version=function e(){return{"@videojs/http-streaming":Ds,"mux.js":Ls,"mpd-parser":Rs,"m3u8-parser":Ns,"aes-decrypter":Ms}};n.version=function e(){return this.constructor.version()};n.canChangeType=function e(){return Ga.canChangeType()};n.play=function e(){this.masterPlaylistController_.play()};n.setCurrentTime=function e(t){this.masterPlaylistController_.setCurrentTime(t)};n.duration=function e(){return this.masterPlaylistController_.duration()};n.seekable=function e(){return this.masterPlaylistController_.seekable()};n.dispose=function t(){if(this.playbackWatcher_){this.playbackWatcher_.dispose()}if(this.masterPlaylistController_){this.masterPlaylistController_.dispose()}if(this.qualityLevels_){this.qualityLevels_.dispose()}if(this.player_){delete this.player_.vhs;delete this.player_.dash;delete this.player_.hls}if(this.tech_&&this.tech_.vhs){delete this.tech_.vhs}if(this.tech_){delete this.tech_.hls}if(this.mediaSourceUrl_&&e.URL.revokeObjectURL){e.URL.revokeObjectURL(this.mediaSourceUrl_);this.mediaSourceUrl_=null}if(this.tech_){this.tech_.off("waitingforkey",this.handleWaitingForKey_)}r.prototype.dispose.call(this)};n.convertToProgramTime=function e(t,r){return Rt({playlist:this.masterPlaylistController_.media(),time:t,callback:r})};n.seekToProgramTime=function e(t,r,i,n){if(i===void 0){i=true}if(n===void 0){n=2}return Nt({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:r})};return i}(zs);var Qs={name:"videojs-http-streaming",VERSION:Ds,canHandleSource:function e(t,r){if(r===void 0){r={}}var i=s["default"].mergeOptions(s["default"].options,r);return Qs.canPlayType(t.type,i)},handleSource:function e(t,r,i){if(i===void 0){i={}}var n=s["default"].mergeOptions(s["default"].options,i);r.vhs=new Xs(t,r,n);if(!s["default"].hasOwnProperty("hls")){Object.defineProperty(r,"hls",{get:function e(){s["default"].log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead.");return r.vhs},configurable:true})}r.vhs.xhr=Ze();r.vhs.src(t.src,t.type);return r.vhs},canPlayType:function e(t,r){if(r===void 0){r={}}var i=s["default"].mergeOptions(s["default"].options,r),n=i.vhs;n=n===void 0?{}:n;var a=n.overrideNative,o=a===void 0?!s["default"].browser.IS_ANY_SAFARI:a,u=i.hls;u=u===void 0?{}:u;var l=u.overrideNative,d=l===void 0?false:l;var c=nt(t);var f=c&&(!Us.supportsTypeNatively(c)||d||o);return f?"maybe":""}};var $s=function e(){return V("avc1.4d400d,mp4a.40.2")};if($s()){s["default"].getTech("Html5").registerSourceHandler(Qs,0)}s["default"].VhsHandler=Xs;Object.defineProperty(s["default"],"HlsHandler",{get:function e(){s["default"].log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead.");return Xs},configurable:true});s["default"].VhsSourceHandler=Qs;Object.defineProperty(s["default"],"HlsSourceHandler",{get:function e(){s["default"].log.warn("videojs.HlsSourceHandler is deprecated. "+"Use videojs.VhsSourceHandler instead.");return Qs},configurable:true});s["default"].Vhs=Us;Object.defineProperty(s["default"],"Hls",{get:function e(){s["default"].log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead.");return Us},configurable:true});if(!s["default"].use){s["default"].registerComponent("Hls",Us);s["default"].registerComponent("Vhs",Us)}s["default"].options.vhs=s["default"].options.vhs||{};s["default"].options.hls=s["default"].options.hls||{};if(!s["default"].getPlugin||!s["default"].getPlugin("reloadSourceOnError")){var Js=s["default"].registerPlugin||s["default"].plugin;Js("reloadSourceOnError",xs)}r.LOCAL_STORAGE_KEY=Bs;r.Vhs=Us;r.VhsHandler=Xs;r.VhsSourceHandler=Qs;r.emeKeySystems=Vs;r.expandDataUri=Ys;r.getAllPsshKeySystemsOptions=qs;r.setupEmeOptions=Ws;r.simpleTypeFromSourceType=nt;r.waitForKeySessionCreation=Hs;Object.defineProperty(r,"__esModule",{value:true})});(function(){if(s.getPlugin("perSourceBehaviors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsPerSourceBehaviors=t(e.videojs)})(typeof self!=="undefined"?self:this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.1.0";var r=e.getTech("Html5");var i=e.registerPlugin||e.plugin;var n=["abort","emptied","loadstart","play"];var a=["abort","emptied"];var s=["ad-playback","ads-ready?","postroll?","preroll?"];var o=function e(t){return s.indexOf(t)>-1};var u=function e(t){return t.usingPlugin("ads")&&typeof t.ads.inAdBreak==="function"};var l=function e(t,r){if(!t.usingPlugin("ads")){return false}if(u(t)){return t.ads.isInAdMode()&&r.type!=="loadstart"}return o(t.ads.state)};var d=function i(){var s=this;var o=[];var u;var d=false;var c;var f=true;var h=function t(r){return function(t,i){var n=this;if(this.perSourceBehaviors.disabled()){return}var a=arguments.length===2;var s=this.currentSrc();var u=[t];var l=e.bind(a?this:t,arguments[arguments.length-1]);var d=function e(){var t=n.currentSrc()!==s;if(n.perSourceBehaviors.disabled()){return}if(t||r){n.off.apply(n,u)}if(!t){l.apply(void 0,arguments)}};d.guid=l.guid;if(!a){u.push(i)}u.push(d);o.push(u);return this.on.apply(this,u)}};this.perSourceBehaviors={disable:e.bind(this,function e(){this.clearTimeout(c);c=null;d=true;return d}),disabled:function e(){return d},enable:function e(){d=false;return d},enabled:function e(){return!d},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()||c||l(s,e)){return}if(f&&a.indexOf(e.type)>-1){f=false;s.trigger("sourceunstable")}var t=[];var i=function e(r){return t.push({time:Date.now(),event:r})};i(e);s.on(r.Events,i);c=s.setTimeout(function(){var e=s.currentSrc();f=true;c=null;s.off(r.Events,i);if(e&&e!==u){o.forEach(function(e){return s.off.apply(s,e)});o.length=0;s.trigger("sourcechanged",{interimEvents:t,from:u,to:e});u=e}},1)})};d.VERSION=t;i("perSourceBehaviors",d);return d})})();(function(){if(s.getPlugin("contextmenu")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):e.videojsContextmenu=t(e.videojs)})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t="2.0.2";var r=e.registerPlugin||e.plugin;var i={cancel:true,sensitivity:10,wait:500,disabled:false};var n="vjs-contextmenu";function a(e,t){if(e.contextmenu.options.disabled){return e}var r={target:e,type:n};["clientX","clientY","pageX","pageY","screenX","screenY"].forEach(function(e){r[e]=t[e]});return e.trigger(r)}function s(e){var t=this.contextmenu.current;if(!t){return}var r=this.contextmenu.options.wait;if(e.type==="touchend"&&Number(new Date)-t.time>=r){a(this,e)}this.contextmenu.current=null}function o(e){var t=this.contextmenu.current;if(!t){return}var r=e.touches[0];var i=this.contextmenu.options.sensitivity;if(r.screenX-t.screenX>i||r.screenY-t.screenY>i){this.contextmenu.current=null}}function u(e){if(this.contextmenu.current){return}var t=e.touches[0];this.contextmenu.current={screenX:t.screenX,screenY:t.screenY,time:Number(new Date)}}function l(e){if(this.contextmenu.options.cancel&&!this.contextmenu.options.disabled){e.preventDefault()}a(this,e);this.off(["touchcancel","touchend"],s);this.off("touchmove",o);this.off("touchstart",u)}function d(t){var r=this;this.contextmenu.options=e.mergeOptions(i,t);this.contextmenu.VERSION="__VERSION__";this.on("contextmenu",l);this.on(["touchcancel","touchend"],s);this.on("touchmove",o);this.on("touchstart",u);this.ready(function(){return r.addClass(n)})}r("contextmenu",d);d.VERSION=t;return d})})();(function(){if(s.getPlugin("contextmenuUI")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document"),require("global/window")):typeof r==="function"&&r.amd?r(["video.js","global/document","global/window"],t):e.videojsContextmenuUi=t(e.videojs,e.document,e.window)})(this,function(e,t,r){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;t=t&&t.hasOwnProperty("default")?t["default"]:t;r=r&&r.hasOwnProperty("default")?r["default"]:r;function i(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}var a=e.getComponent("MenuItem");var s=function(e){i(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;n.handleClick=function t(i){var n=this;e.prototype.handleClick.call(this);this.options_.listener();r.setTimeout(function(){n.player().contextmenuUI.menu.dispose()},1)};return t}(a);var o=e.getComponent("Menu");var u=e.dom||e;var l=function(t){i(a,t);function a(i,a){var o;o=t.call(this,i,a)||this;o.dispose=e.bind(n(o),o.dispose);a.content.forEach(function(t){var n=function e(){};if(typeof t.listener==="function"){n=t.listener}else if(typeof t.href==="string"){n=function e(){return r.open(t.href)}}o.addItem(new s(i,{label:t.label,listener:e.bind(i,n)}))});return o}var o=a.prototype;o.createEl=function e(){var r=t.prototype.createEl.call(this);u.addClass(r,"vjs-contextmenu-ui-menu");r.style.left=this.options_.position.left+"px";r.style.top=this.options_.position.top+"px";return r};return a}(o);function d(e){var i;if(e.getBoundingClientRect&&e.parentNode){i=e.getBoundingClientRect()}if(!i){return{left:0,top:0}}var n=t.documentElement;var a=t.body;var s=n.clientLeft||a.clientLeft||0;var o=r.pageXOffset||a.scrollLeft;var u=i.left+o-s;var l=n.clientTop||a.clientTop||0;var d=r.pageYOffset||a.scrollTop;var c=i.top+d-l;return{left:Math.round(u),top:Math.round(c)}}function c(e,t){var r={};var i=d(e);var n=e.offsetWidth;var a=e.offsetHeight;var s=i.top;var o=i.left;var u=t.pageY;var l=t.pageX;if(t.changedTouches){l=t.changedTouches[0].pageX;u=t.changedTouches[0].pageY}r.y=Math.max(0,Math.min(1,(s-u+a)/a));r.x=Math.max(0,Math.min(1,(l-o)/n));return r}var f="5.2.0";function 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(r){var i=this;if(h(this)){this.contextmenuUI.menu.dispose();return}if(this.contextmenuUI.options_.excludeElements(r.target)){return}var n=c(this.el(),r);var a=this.el().getBoundingClientRect();var s=v(n,a);var o=e.browser.IS_FIREFOX?t.documentElement:t;r.preventDefault();var u=this.contextmenuUI.menu=new l(this,{content:this.contextmenuUI.content,position:s});this.contextmenuUI.closeMenu=function(){e.log.warn("player.contextmenuUI.closeMenu() is deprecated, please use player.contextmenuUI.menu.dispose() instead!");u.dispose()};u.on("dispose",function(){e.off(o,["click","tap"],u.dispose);i.removeChild(u);delete i.contextmenuUI.menu});this.addChild(u);var d=u.el_.getBoundingClientRect();var f=t.body.getBoundingClientRect();if(this.contextmenuUI.keepInside||d.right>f.width||d.bottom>f.height){u.el_.style.left=Math.floor(Math.min(s.left,this.player_.currentWidth()-u.currentWidth()))+"px";u.el_.style.top=Math.floor(Math.min(s.top,this.player_.currentHeight()-u.currentHeight()))+"px"}e.on(o,["click","tap"],u.dispose)}function g(t){var r=this;var i={keepInside:true,excludeElements:p};t=e.mergeOptions(i,t);if(!Array.isArray(t.content)){throw new Error('"content" required')}if(h(this)){this.contextmenuUI.menu.dispose();this.off("contextmenu",this.contextmenuUI.onContextMenu);delete this.contextmenuUI}var n=this.contextmenuUI=function(){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 r.addClass("vjs-contextmenu-ui")})}e.registerPlugin("contextmenuUI",g);g.VERSION=f;return g})})();(function(){if(s.getPlugin("bcAnalytics")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("@brightcove/loscore")):typeof r==="function"&&r.amd?r(["video.js","@brightcove/loscore"],t):(e=typeof globalThis!=="undefined"?globalThis:e||self,e.videojsBcAnalytics=t(e.videojs,e.videojs.bc_))})(this,function(r,i){"use strict";function n(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=n(r);var s=n(i);var o=function(e,t,r){if(r===void 0){r={}}t.forEach(function(t){if(e[t]!==undefined){r[t]=e[t]}});return r};var u=function e(t,r){if(r===void 0){r=[]}var i={};Object.keys(t).forEach(function(n){var o=t[n];r.push(n);if(s["default"].isObj(o)){i=a["default"].mergeOptions(i,e(o,r))}else{i[r.join(".")]=o}r.pop()});return i};var l=function e(t){return t.charAt(0).toUpperCase()+t.slice(1)};var d=function e(t,r){return t+"x"+r};var c={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 f={bitrate:"bitrates",event:"events"};var h=function(){function t(){this.data_={bitrates:{bitrates:[],playlists:[],rendered:[],throughput:[]},events:[],mr:0,performance:{},content:{},player:{dimensions:[],pixelratio:[],screendimensions:[]},frames:{}}}var r=t.prototype;r.keys=function e(){return Object.keys(this.data_)};r.append=function e(t){t=f.hasOwnProperty(t)?f[t]:t;if(!this.data_.hasOwnProperty(t)){throw new Error('"'+t+'" is not a known QosBuffer key')}for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++){i[n-1]=arguments[n]}this["append"+l(t)+"_"].apply(this,i)};r.flush=function e(){var t=this;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}if(!i.length){i=this.keys()}for(var o=0;o<i.length;o++){if(!this.data_.hasOwnProperty(i[o])){throw new Error('"'+i[o]+'" is not a known QosBuffer key')}}var u=i.map(function(e){return t["flush"+l(e)+"_"]()});var d=a["default"].mergeOptions.apply(a["default"],u);var c=s["default"].qs().stringify(d).length;if(c>3e3&&d["qos.bitrates"]){d["qos.bitrates"]=JSON.stringify({bitrates:[],playlists:[],rendered:[],throughput:[]})}return d};r.appendBitrates_=function e(t){var r=this;if(typeof t.playlists!=="undefined"){this.data_.bitrates.playlists.push([Date.now(),t.bitrates,t.playlists]);delete t.bitrates;delete t.playlists}Object.keys(t).forEach(function(e){r.data_.bitrates[e].push([Date.now(),t[e]])})};r.appendMr_=function e(t){this.data_.mr=t?1:null};r.appendPerformance_=function t(r){var i=this;var n=e.performance;if(s["default"].isNil(n)){return}Object.keys(c).forEach(function(e){if(!s["default"].isNil(n[e])){i.data_.performance[e]=o(n[e],c[e])}});if(s["default"].isFn(n.measure)){["bcParse","bcInit"].forEach(function(e){n.getEntriesByName(e,"measure").forEach(function(t){i.data_.performance[e]=t.duration})})}if(this.data_.performance.navigation){this.data_.performance.navigation.directedMigration=r?s["default"].qs().parse(r).directedMigration==="true":false}};r.appendFrames_=function e(t){this.data_.frames={dropped:t.droppedVideoFrames,corrupted:t.corruptedVideoFrames,total:t.totalVideoFrames}};r.appendPlayer_=function t(r,i){if(i===void 0){i=Date.now()}this.data_.player.dimensions.push([i,d(r.width,r.height),d(r.computedWidth,r.computedHeight)]);this.data_.player.pixelratio.push([i,e.devicePixelRatio]);this.data_.player.screendimensions.push([i,d(e.screen.width,e.screen.height)])};r.appendEvents_=function e(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}this.data_.events.push({type:r.join("."),time:Date.now()})};r.appendContent_=function e(t){this.data_.content={sourceMimeType:t.sourceMimeType}};r.flushBitrates_=function e(){var t=this.data_.bitrates;var r={};if(t.bitrates.length||t.playlists.length||t.rendered.length||t.throughput.length){r["qos.bitrates"]=JSON.stringify(t)}t.bitrates.length=0;t.playlists.length=0;t.rendered.length=0;t.throughput.length=0;return r};r.flushEvents_=function e(){var t=this.data_.events;var r={};t.forEach(function(e){var t=e.time,i=e.type;var n="qos.events."+i;if(Array.isArray(r[n])){r[n].push(t)}else if(r.hasOwnProperty(n)){r[n]=[r[n],t]}else{r[n]=t}});Object.keys(r).forEach(function(e){if(Array.isArray(r[e])){r[e]=JSON.stringify(r[e])}});t.length=0;return r};r.flushMr_=function e(){return{"qos.mr":this.data_.mr}};r.flushFrames_=function e(){var t=u(this.data_.frames,["qos","frames"]);this.data_.frames={};return t};r.flushPerformance_=function e(){return u(this.data_.performance,["qos","performance"])};r.flushPlayer_=function e(){var t=this.data_.player;var r={};Object.keys(t).forEach(function(e){var i=t[e];if(i.length){r["qos.player."+e]=JSON.stringify(i);i.length=0}});return r};r.flushContent_=function e(){return u(this.data_.content,["qos","content"])};return t}();var p=["ad-playback","ads-ready?","postroll?","preroll?"];var v=function e(t){return t.usingPlugin("ads")?t.ads.state:undefined};var m=function e(t){return t.usingPlugin("ads")&&!!t.adonly};var g=function e(t){return p.indexOf(t)>-1};var y=function e(t){return t.usingPlugin("ads")&&s["default"].isFn(t.ads.inAdBreak)};var _=function e(t){if(!t.usingPlugin("ads")){return false}if(m(t)){return true}if(y(t)){return t.ads.isInAdMode()}return g(t.ads.state)};var b=function e(t){if(!t.usingPlugin("ads")){return false}return t.ads.isContentResuming()};var T=function e(t,r){if(y(r)&&t&&t.type==="loadstart"){return true}return!_(r)};var S=function e(t){var r={};if(t.ima3){var i=t.ima3.currentAdEventInfo;r.plugin="ima3";if(s["default"].isFn(t.ima3)){return r}r.pluginVersion=t.ima3.VERSION||t.ima3.version;r.adTech=t.ima3.adTech;r.requestMode=t.ima3.settings.requestMode;r.timeout=t.ima3.settings.timeout;if(i){o(i,["adType","adPodLength","adPodId","creativeFormat","creativeLength","creativeId","creativeIndex","advertiserName","wrapperCreativeIds","dealId","adId","adTitle","adSystem","creativeAdId"],r);var n=i.creativeIndex;if(n&&n.length){r.firstPlayedAdIndex=n[0]}r.startedInAdPod=i.started;r.completedInAdPod=i.completed}}else if(t.FreeWheelPlugin){r.plugin="freewheel";if(s["default"].isFn(t.FreeWheelPlugin)){return r}r.pluginVersion=t.FreeWheelPlugin.VERSION||t.FreeWheelPlugin.getVersion()}return r};var E=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 I=function e(){var t={};E(t);return t};var C=function e(t,r,i){var n=t.currentAdSequence_;var a=["ads-loading","ads-ad-started","ads-ad-ended"];if(r==="ads-request"){E(n)}else if(r==="adstart"||r==="ads-loading"){if(!n.hasAdBreakStarted){if(n.adBreakIndex===null){n.adBreakIndex=0}else{n.adBreakIndex++}n.hasAdBreakStarted=true;a.forEach(function(e){n[e].push([])})}}else if(r==="adend"){n.hasAdBreakStarted=false}if(a.indexOf(r)>-1){n[r][n.adBreakIndex].push(i)}else if(r==="ads-request"||r==="ads-response-received"){n[r]=i}};var k=["progress","seeking","suspend","timeupdate"];var w=["seek","stable","unstable"];var A=["adend","adscanceled","adserror","adskip","adsready","adstart","adtimeout","contentplayback","contentupdate","nopostroll","nopreroll","readyforpreroll"];var P=[].concat(a["default"].getTech("Html5").Events);var O=P.filter(function(e){return k.indexOf(e)===-1});var x=["ads-request","ads-response-received","adstart","ads-loading","ads-ad-started","ads-ad-ended","adend"];var D=["ad_hard_timeout","ad_mode_begin","ad_mode_complete","ad_timeout","catalog_request","catalog_request_error","catalog_response","error","play_request","player_init","player_load","video_complete","video_engagement","video_impression","video_view"];var L="sendBeacon"in e.navigator;var R=e,N=R.Set;var M="lbu";var U=4e3;var B=new N;["account","domain","event","player"].forEach(function(e){return B.add(e)});var F=new N;["account","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_width","response_time_ms","session","start_time_ms","source","time","video","video_duration","video_name","video_seconds_viewed"].forEach(function(e){return F.add(e)});var j=function e(t,r){return Math.floor(t)+".."+(Math.floor(r)-1)};var V=function e(t){var r=2166136261;var i=r;for(var n=0;n<t.length;++n){i^=t.charCodeAt(n);i*=16777619}return i>>>0};var q=function e(t,r,i,n){var a="players.brightcove.com/"+t+"/"+r+"_"+i;if(n){a+="/"+n}return a};var H=function e(t,r){var i=s["default"].qs();Object.keys(r).forEach(function(e){if(s["default"].isNil(r[e])){delete r[e]}});var n=t+"?"+i.stringify(r);if(n.length<=U){return n}Object.keys(r).forEach(function(e){if(!F.has(e)){delete r[e]}});r.usage=M;n=t+"?"+i.stringify(r);return n};var W=function e(t,r,i,n,a){var s=r-t;if(a!==undefined&&a<r){s-=a-t}else if(i!==undefined&&n!==undefined){if(i<t){i=t}if(n>r){n=r}s-=n-i}return s};var G=function e(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++){i[n-1]=arguments[n]}var s=a["default"].mergeOptions.apply(a["default"],[t.params||{}].concat(i));delete t.params;return s};var K=function e(t,r){var i=t.mediainfo;var n=i&&i.duration||t.duration();if(i){if(r.video===undefined){r.video=i.id}if(r.video_name===undefined){r.video_name=i.name}if(r.reference_id===undefined){r.reference_id=i.referenceId}if(r.custom_fields===undefined){r.custom_fields=i.customFields}if(r.video_data===undefined){r.video_data=i}if(r.video_ads_supported===undefined){r.video_ads_supported=i.economics==="AD_SUPPORTED"}if(r.tags===undefined){r.tags=i.tags}}if(s["default"].isNum(n)&&r.video_duration===undefined){r.video_duration=Math.floor(n);if(r.video_duration<1||r.video_duration===Infinity){r.video_duration=null}}r.media_url=t.currentSrc();return r};var Y=function e(t,r){var i=t.preload();if(typeof i!=="string"){i=t.el().getAttribute("preload")}if(typeof i==="string"&&i.length===0){i="auto"}if(i){r.preload=i}};var z=function(){function r(t,r,i,n){if(n===void 0){n={}}this.baseUrl_=i;this.logger_=n.logger;this.history_=r;this.currentAdSequence_=I();this.player_=t;this.metrics_=[];this.metricsUnsent_=[];this.playerId=n.playerId;this.embedId=n.embedId;this.applicationId=n.applicationId;this.eventCount_=0;this.streamCount_=-1;this.hashUser_=true;this.playerUrl_=null;this.user(n.user||null);this.device(n.device||null);var s=t.options_&&t.options_.runtime_||{};var o=s.environment&&s.environment.queryString||{};if(n.requiresConsent){if(typeof e.BC_ANALYTICS_CONSENT==="boolean"){this.setConsent(e.BC_ANALYTICS_CONSENT,{silent:true});this.disableSetConsent()}else if(o.hasOwnProperty("analyticsConsent")||t.el().hasAttribute("data-analytics-consent")){this.setConsent(true,{silent:true});this.disableSetConsent()}else{this.setConsent(false,{silent:true})}}else{this.setConsent(true,{silent:true});this.disableSetConsent()}if(n.corpCommsApp){a["default"].log.warn("The `corpCommsApp` option is deprecated. Please use `application` instead.")}this.application(n.application||n.corpCommsApp||null);this.defaultParams_={domain:"videocloud",platform:"video-js",session:""};for(var u=0;u<3;u++){this.defaultParams_.session+=(Math.random()*4294967295>>>0).toString(16)}this.qos=new h(this);this.resetTimesOf()}var i=r.prototype;i.logger=function e(){if(this.logger_);};i.metrics=function e(){return this.metrics_.map(a["default"].mergeOptions)};i.resetTimesOf=function e(){this.timeOfImpression=null;this.timeOfView=null};i.defaultParams=function e(t){if(t){if(t.player){this.playerUrl_=t.player}t=s["default"].isFn(t)?t():t;this.defaultParams_=a["default"].mergeOptions(this.defaultParams_,t)}return this.defaultParams_};i.getSession=function e(){return this.defaultParams_.session};i.user=function e(t){if(t===null||s["default"].isNonEmptyStr(t)||s["default"].isNum(t)){this.user_=t;this.hashUser_=true}return this.user_};i.setUser=function e(t){if(this.player_.usingPlugin("chinaMetrics")){return a["default"].log.warn("setUser is disabled when using China Delivery")}if(t===null||s["default"].isNonEmptyStr(t)||s["default"].isNum(t)){this.user_=t;this.hashUser_=false}else{a["default"].log.warn("No user id set. User id must be a non-empty string or a number.")}};i.getUser=function e(){return this.user_};i.setConsent=function e(t,r){if(r===void 0){r={}}if(typeof t==="boolean"&&this.consent_!==t){this.consent_=t;if(!r.silent){this.player_.trigger({consent:t,type:"analytics_consent_changed"})}}};i.disableSetConsent=function e(){Object.defineProperty(this,"setConsent",{value:function e(){},configurable:false,enumerable:true,writable:false})};i.getConsent=function e(){return this.consent_};i.application=function e(t){if(t===null||s["default"].isNonEmptyStr(t)||s["default"].isNum(t)){this.application_=t}return this.application_};i.corpCommsApp=function e(t){if(t===null||s["default"].isNonEmptyStr(t)||s["default"].isNum(t)){this.application_=t;a["default"].log.warn("The corpCommsApp() method is deprecated. Please use application() instead.")}return this.application_};i.device=function e(t){if(t===null||s["default"].isNonEmptyStr(t)||s["default"].isNum(t)){this.device_=t}return this.device_};i.player=function e(t){if(t===null||s["default"].isNonEmptyStr(t)){this.defaultParams_.player=t;this.playerUrl_=t}return this.playerUrl_||this.defaultParams_.player};i.send=function e(t,r){var i;if(t===void 0){t={}}if(r===void 0){r={}}var n=null;if(this.user()){if(this.hashUser_){t.user=V(this.user())}else{t.user=this.user()}}if(this.application()){t.application=this.application();t.user=this.user()||this.device()}if(s["default"].isNil(t.time)){t.time=Date.now()}t.autoplay=this.player_.autoplay();r.qos=Array.isArray(r.qos)?r.qos:[];r.qos.push("mr");t=a["default"].mergeOptions(this.defaultParams_,t,(i=this.qos).flush.apply(i,r.qos));t.seq=""+this.eventCount_;if(D.indexOf(t.event)>-1){this.eventCount_++}if("streamCount"in r){t.seq+="_"+r.streamCount}if(typeof this.player_.getAccountId==="function"){var o=this.player_.getAccountId();t.account=o;t.player=this.playerUrl_||q(o,this.playerId,this.embedId,this.applicationId)}B.forEach(function(e){if(s["default"].isNil(t[e])){throw new Error('the "'+e+'" param is required')}});n=this.sendRequest_(t,r);this.metrics_.push(t);this.player_.trigger({params:t,type:"analytics_request"});this.player_.trigger({params:t,type:"analytics_request_"+t.event});return n};i.sendRequest_=function r(i,n){if(this.getConsent()){var a=H(this.baseUrl_,i);if(D.indexOf(i.event)>-1){if(n.useSendBeaconOnly){if(L){e.navigator.sendBeacon(a)}else{return null}}else{var s=t.createElement("img");s.src=a}}return{params:i,url:a}}this.metricsUnsent_.push({params:i,options:n});return null};i.sendAllUnsent=function e(){var t=this;var r=this.metricsUnsent_.slice();this.metricsUnsent_=[];return r.map(function(e){var r=e.params,i=e.options;return t.sendRequest_(r,i)})};i.sendCatalog_=function e(t,r){if(r===void 0){r={}}var i=r,n=i.error,a=i.xhr;if(n&&a){n.status=a.status}if(n){t.error=JSON.stringify(n)}return this.send(t,r)};i.sendVideoImpression=function e(t){if(t===void 0){t={}}var r=G(t,{event:"video_impression"});var i=S(this.player_);if(Object.keys(i).length>0){r.web_ad_info=JSON.stringify(i)}var n=s["default"].isNonEmptyStr(this.player_.currentSrc());if(!n||this.timeOfImpression){return null}if(a["default"].bc_.isNonEmptyStr(this.player_.currentType())){this.qos.append("content",{sourceMimeType:this.player_.currentType()});t.qos=t.qos||["content"]}this.streamCount_++;t.streamCount=this.streamCount_;K(this.player_,r);Y(this.player_,r);var o=this.send(r,t);if(o){this.timeOfImpression=Number(o.params.time)}return o};i.sendVideoView=function e(t){if(t===void 0){t={}}var r=G(t,{event:"video_view"});var i=s["default"].isNonEmptyStr(this.player_.currentSrc());if(!i||this.timeOfView||!this.timeOfImpression){return null}var n=this.history_;var a=n.first("canplay");var o=n.first("loadstart");var u=n.first("play");if(a){r.load_time_ms=a-this.timeOfImpression}r.start_time_ms=W(u||o,r.time,n.first("adstart",true),n.first("adend",true),n.first("adtimeout",true));K(this.player_,r);if(this.player_.usingPlugin("pluginDev")){r.feature="iris"}t.streamCount=this.streamCount_;var l=this.send(r,t);if(l){this.timeOfView=Number(l.params.time)}return l};i.sendVideoEngagement=function e(t,r,i){if(i===void 0){i={}}var n=G(i,{event:"video_engagement"});var a=r.buffered,o=r.duration,u=r.playbackEndTime,l=r.height,d=r.mediainfo,c=r.playbackRate,f=r.rebufferingCount,h=r.rendition,p=r.playbackStartTime,v=r.rangeStart,m=r.rangeEnd,g=r.stats,y=r.width;var _=u-p;i.qos=i.qos||["bitrates","events","player","frames"];t.length=t.end-t.start;n.player_height=l;n.player_width=y;n.video_duration=o;if(d){n.video=d.id;n.video_name=d.name}if(h){n.rendition_url=h.url;n.rendition_indicated_bps=h.indicatedBPS;n.rendition_mime_type=h.mimeType;n.rendition_height=h.height;n.rendition_width=h.width}if(g){if(!s["default"].isNil(g.mediaRequests)){n.media_requests=g.mediaRequests}if(!s["default"].isNil(g.mediaTransferDuration)){n.media_transfer_duration=g.mediaTransferDuration}if(!s["default"].isNil(g.mediaBytesTransferred)){n.media_bytes_transferred=g.mediaBytesTransferred}if(!s["default"].isNil(g.bandwidth)){n.measured_bps=g.bandwidth}if(!s["default"].isNil(g.mediaSecondsLoaded)){n.media_seconds_loaded=g.mediaSecondsLoaded}}var b=_/c*1e3;var T=t.end-t.start;var S=100;var E=Math.floor((T-b)/S)*S/1e3;if(f>0){n.rebuffering_count=f}if(E>0){n.rebuffering_seconds=E}if(a){var I=0;for(var C=0;C<a.length;C++){var k=a.start(C);var w=a.end(C);if(u>=k&&u<=w){I=w-u;break}}n.forward_buffer_seconds=I}if(_<1&&!n.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){n.license_request_attempts=A.length}K(this.player_,n);i.streamCount=this.streamCount_;if(n.video_duration===Infinity){n.video_seconds_viewed=Math.round(_);delete n.video_duration}else if(_>=1){n["qos.derived_range"]=j(p,u);n.range=v+".."+m}return this.send(n,i)};i.sendVideoComplete=function e(t){if(t===void 0){t={}}var r=G(t,{event:"video_complete"});K(this.player_,r);t.streamCount=this.streamCount_;return this.send(r,t)};i.sendError=function e(t){if(t===void 0){t={}}var r=this.player_.error();if(!r){return null}var i=G(t,{event:"error"});var n=s["default"].isFn(this.player_.errors)&&s["default"].isFn(this.player_.errors.getAll)&&this.player_.errors.getAll()||{unknown:{type:"MEDIA_ERR_UNKNOWN"}};if(r&&n.hasOwnProperty(String(r.code))){i.error_code=n[String(r.code)].type}else if(r.type!==undefined){i.error_code=r.type}else{i.error_code=n.unknown.type}K(this.player_,i);t.streamCount=this.streamCount_;return this.send(i,t)};i.sendCatalogRequest=function e(t,r){if(r===void 0){r={}}var i=G(r,{event:"catalog_request",url:t});return this.sendCatalog_(i,r)};i.sendCatalogRequestError=function e(t,r){if(r===void 0){r={}}var i=G(r,{event:"catalog_request_error",url:t});if(r.error){r.error=o(r.error,["code","message","type"])}return this.sendCatalog_(i,r)};i.sendCatalogResponse=function e(t,r){if(r===void 0){r={}}var i=G(r,{event:"catalog_response",url:t});i.time=Date.now();i.response_time_ms=i.time-this.history_.last("catalog_request");return this.sendCatalog_(i,r)};i.triggerAdError=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"ad_error"})),t)};i.triggerAdEnd=function e(t){if(t===void 0){t={}}var r=S(this.player_);var i=this.currentAdSequence_["ads-ad-started"];var n=this.currentAdSequence_.adBreakIndex;if(r.plugin!==undefined){if(r.adType==="preroll"&&i.length>0&&i[0].length>0){var a=this.history_.first("play",true);r.prerollDelay=i[0][0]-a;r.firstPlayInSession=a}r.adsRequest=this.currentAdSequence_["ads-request"];r.adsResponseReceived=this.currentAdSequence_["ads-response-received"];r.adsLoading=this.currentAdSequence_["ads-loading"][n];r.adsAdStarted=this.currentAdSequence_["ads-ad-started"][n];r.adsAdEnded=this.currentAdSequence_["ads-ad-ended"][n]}else{r.plugin="unknown"}var s={event:"ad_end",web_ad_info:JSON.stringify(r)};t.streamCount=this.streamCount_;return this.send(K(this.player_,G(t,s)),t)};i.sendAdEnd=function e(t){if(t===void 0){t={}}return this.triggerAdEnd(t)};i.sendAdHardTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(K(this.player_,G(t,{event:"ad_hard_timeout"})),t)};i.sendAdModeBegin=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"ad_mode_begin"})),t)};i.sendAdModeComplete=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"ad_mode_complete"})),t)};i.triggerAdStart=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(K(this.player_,G(t,{event:"ad_start"})),t)};i.sendAdStart=function e(t){if(t===void 0){t={}}return this.triggerAdStart(t)};i.sendAdTimeout=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(K(this.player_,G(t,{event:"ad_timeout"})),t)};i.triggerFullscreenEnabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"fullscreen_enabled"})),t)};i.triggerFullscreenDisabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"fullscreen_disabled"})),t)};i.triggerShareOverlay=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"share_overlay"})),t)};i.triggerShareSocialClicked=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"share_social_clicked"})),t)};i.triggerShareLinkCopied=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"share_link_copied"})),t)};i.triggerShareEmbedCopied=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"share_embed_copied"})),t)};i.triggerEnterPIP=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"pip_enabled"})),t)};i.triggerLeavePIP=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"pip_disabled"})),t)};i.triggerMuteEnabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"mute_enabled"})),t)};i.triggerMuteDisabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"mute_disabled"})),t)};i.triggerVolumeChange=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"volume_change"})),t)};i.triggerVideoPause=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"video_pause"})),t)};i.triggerVideoResume=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"video_resume"})),t)};i.triggerTextTrackEnabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"text_track_enabled"})),t)};i.triggerTextTrackDisabled=function e(t){if(t===void 0){t={}}return this.send(K(this.player_,G(t,{event:"text_track_disabled"})),t)};i.sendPlayRequest=function e(t){if(t===void 0){t={}}t.streamCount=this.streamCount_;return this.send(K(this.player_,G(t,{event:"play_request"})),t)};i.sendPlayerInit=function e(t){if(t===void 0){t={}}return this.send(G(t,{event:"player_init"}),t)};i.sendPlayerLoad=function e(t){if(t===void 0){t={}}return this.send(G(t,{event:"player_load"}),t)};return r}();var X=function(e){var t=e.bcAnalyticsLogger&&e.bcAnalyticsLogger();var r=function e(){return t&&t.add.apply(t,arguments)};return r};function Q(e,t,r){return r={path:t,exports:{},require:function(e,t){return $(e,t===undefined||t===null?r.path:t)}},e(r,r.exports),r.exports}function $(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var J=Q(function(e){function t(r,i){e.exports=t=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};e.exports["default"]=e.exports,e.exports.__esModule=true;return t(r,i)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var Z=Q(function(e){function t(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;J(e,t)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});var ee=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var te=function e(t){return t.map(function(e){return Math.floor(e)}).reduce(function(e,t){var r=e[e.length-1];if(t!==r){e.push(t)}return e},[])};var re=function e(t){return t.reduce(function(e,t){var r=e[e.length-1];if(r){if(r.end+1===t){r.end=t}else{e.push({start:t,end:t})}}else{e.push({start:t,end:t})}return e},[])};var ie=function e(t){return t.map(function(e){var t=e.start,r=e.end;var i=r-t;if(i>0){return{start:t,end:r-1,remainder:r}}return{start:t,end:r,remainder:r}})};var ne=function e(t){var r=[];var i=t.shift()||{},n=i.start,a=i.end,s=i.remainder;while(ee(n)&&ee(a)&&ee(s)&&n===a&&n===s){var o=t.shift()||{};n=o.start;a=o.end;s=o.remainder}if(t.length===0){r.push(s)}for(var u=0;u<t.length;u++){var l=t[u],d=l.start,c=l.end,f=l.remainder;for(var h=d;h<=(f||c);h++){r.push(h)}}return{start:n,end:a,remainders:r,ranges:t.length}};var ae=function e(t){return ne(ie(re(te(t))))};var se=1;function oe(){return se++}var ue=[];var le=function e(t,r,i,n,a){if(a===void 0){a=true}var s=[].concat(i).sort();if(r!=="removeEventListener"){t.off(s,n)}else{s.forEach(function(e){t.removeEventListener(e,n)})}if(!a){return}var o=ue.length;var u=function e(){var r=ue[o];if(r.context===t&&(r.fn.guid===n.guid||r.fn===n)&&s.every(function(e,t){return r.events[t]})){ue.splice(o,1);return"break"}};while(o--){var l=u();if(l==="break")break}};var de=function e(){var t=ue.length;while(t--){var r=ue.shift(),i=r.context,n=r.mode,a=r.events,s=r.fn;var o="off";if(n==="addEventListener"){o="removeEventListener"}le(i,o,a,s,false)}};var ce=function e(t,r,i,n){var a=[].concat(i).sort();var s={events:a,fn:n,mode:r,context:t};if(r==="one"||r==="onePerSrc"){s.fn=function(){var e="off";if(s.mode==="addEventListener"){e="removeEventListener"}le(s.context,e,s.events,s.fn);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}return n.apply(this,r)};if(!n.guid){n.guid=oe()}s.fn.guid=n.guid}ue.push(s);if(r==="addEventListener"){s.events.forEach(function(e){s.context.addEventListener(e,s.fn)})}else{s.context[s.mode](s.events,s.fn)}};var fe=function e(){var t=ue.slice(0);de();t.forEach(function(e){var t=e.context,r=e.mode,i=e.events,n=e.fn;ce(t,r,i,n)})};var he=1e4;var pe=function e(t){return Boolean(t.onceux&&t.onceux.currentTime&&t.onceux.timeline)};var ve=function(e){Z(t,e);function t(t,r){var i;i=e.call(this)||this;i.player_=t;i.logger_=r;i.stateBySrc_={};i.lastStateRecord_=0;i.disposed_=false;return i}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 r=this.player_.tech_&&this.player_.tech_.vhs;this.stateBySrc_[t].stats=r&&r.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 r=this.stateBySrc();r.mediainfo=t.mediainfo;r.playbackEndTime=t.currentTime();r.times.push(r.playbackEndTime);if(pe(t)){r.duration=t.onceux.timeline.contentDuration}else{r.duration=t.duration()}r.buffered=t.buffered();r.playbackRate=t.playbackRate()};r.isTracking=function e(){return!!this.timerId_};r.start=function e(t){var r=this;if(t===void 0){t={}}if(this.disposed_){return}var i=t;i.reason;var n=i.src;if(!n){n=this.player_.currentSrc()}var a=this.stateBySrc(n);a.playbackStartTime=a.playbackEndTime=this.player_.currentTime();if(pe(this.player_)){a.duration=this.player_.onceux.timeline.contentDuration}else{a.duration=this.player_.duration()}a.rebufferingCount=0;this.player_.clearTimeout(this.timerId_);this.timerCreatedAt_=Date.now();this.timerId_=this.player_.setTimeout(function(){return r.stop({src:n,reason:"engagement timer fired"})},he);return this};r.prepareState_=function e(t){var r=this.player_;var i=this.stateBySrc(t);i.height=Math.round(r.currentHeight());i.width=Math.round(r.currentWidth());var n=r.tech_&&r.tech_.vhs;if(n&&n.playlists&&n.playlists.media()){var s=n.playlists.media();var o=i.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}}}i.videoPlaybackQuality=r.getVideoPlaybackQuality();if(i.mediainfo){var u={};Object.keys(i.mediainfo).forEach(function(e){if(!/_/.test(e)){u[e]=i.mediainfo[e]}});i.mediainfo=u}i.times.push(r.currentTime());var l=ae(i.times),d=l.start,c=l.end,f=l.remainders,h=l.ranges;i.times=f;return a["default"].mergeOptions({rangeExtras:h,rangeStart:d,rangeEnd:c},i)};r.stop=function e(t){var r=this;if(t===void 0){t={}}if(!t.src){t.src=this.player_.currentSrc()}if(this.isTracking()){this.player_.clearTimeout(this.timerId_);this.timerId_=null;var i=this.stateBySrc(t.src);var n=(i.duration-i.playbackEndTime)*1e3;if(!this.player_.ended()&&n>0&&n<1500){this.timerId_=true;ce(this.player_,"one","ended",function(){r.recordState();r.stop({reason:"content ended after we delayed the engager"})});return this}t.state=this.prepareState_(t.src);t.period=t.period||{};t.period.start=t.period.start||this.timerCreatedAt_;t.period.end=t.period.end||Date.now();this.trigger({type:"engagement",engagement:t})}return this};r.dispose=function e(){this.disposed_=true;this.stop({ignoreAdState:true,reason:"player disposed"});this.off();return this};return t}(a["default"].EventTarget);var me=["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"];var ge=["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"];var ye=function(){function e(e){this.logger_=e;this.events_=[]}var t=e.prototype;t.add=function e(t,r,i){if(r===void 0){r=Date.now()}var n=a["default"].mergeOptions(i,{name:t,time:r});this.events_.push(n);return r};t.record=function e(t,r){var i=Date.now();this.add(t,i,{adState:v(r),isInAdState:_(r),networkState:me[r.networkState()],readyState:ge[r.readyState()]});return i};t.reset=function e(){this.events_.length=0};t.filter=function e(t){if(!s["default"].isFn(t)){return this.events_.filter(function(e){return e.name===t})}return this.events_.filter(t)};t.map=function e(t){return this.events_.map(t)};t.names=function e(){return this.map(function(e){return e.name})};t.first=function e(t,r){for(var i=0;i<this.events_.length;i++){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};t.last=function e(t,r){var i=this.events_.length;while(i--){var n=this.events_[i];if(!r&&n.isInAdState){continue}if(n.name===t){return n.time}}};return e}();var _e=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 be="3.18.2";var Te={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"};var Se=function e(t,r,i){Object.keys(i).forEach(function(e){r[e]=String(r[e]||"");if(e==="accountId"&&!s["default"].isNonEmptyStr(r[e])){r[e]=String(r.account||"")}if(!s["default"].isNonEmptyStr(r[e])){r[e]=t.getAttribute("data-"+i[e])||""}});return r};var Ee=function t(r,i){var n=Se(r.el(),i,{accountId:"account",applicationId:"application-id",embedId:"embed",playerId:"player",playerName:"name",usage:"usage"}),a=n.accountId,o=n.applicationId,u=n.embedId,l=n.playerId;if(!s["default"].isNonEmptyStr(i.player)){if(e.location.hostname==="players.api.brightcove.com"){i.player="players.api.brightcove.com/"+l+"_"+u;return}i.player=q(a,l,u);if(o){i.player+="/"+o}}if(o){if(s["default"].isNonEmptyStr(i.playerName)){i.playerName+=" - "+o}else{i.playerName=o}}};var Ie=function e(t){return{computedHeight:t.currentHeight(),computedWidth:t.currentWidth(),height:t.height(),width:t.width()}};var Ce=function t(r){if(typeof r==="boolean"){a["default"].log.warn("The __iframe__ option should only be used in tests!");return r}try{return e.parent!==e.self}catch(e){return true}};var ke=function r(i){var n=this;if(i===void 0){i={}}var o=false;var u=false;var l={};i=a["default"].mergeOptions(i);i.env=Te.hasOwnProperty(i.env)?i.env:"production";Ee(this,i);var d=X(this);var c=new ve(this,d);var f=new ye(d);var h=new _e;var p=s["default"].isNonEmptyStr(i.usage)?i.usage.split(","):[];p.forEach(function(e){h.put(e)});var g=new z(this,f,s["default"].isNonEmptyStr(i.analyticsUrl)?i.analyticsUrl:Te[i.env],{logger:d,user:i.user,corpCommsApp:i.corpCommsApp,application:i.application,device:i.device,playerId:i.playerId,embedId:i.embedId,applicationId:i.applicationId,requiresConsent:i.requiresConsent});g.defaultParams(function(){var r={account:i.accountId||null,destination:e.location.href,platform_version:i.platformVersion,player:i.player,player_name:i.playerName,source:t.referrer};if(Ce(i.__iframe__)){r.destination=t.referrer;if(s["default"].isNonEmptyStr(i.referrer)){r.source=i.referrer}else{try{r.source=e.parent.document.referrer}catch(e){r.source=null}}}return r});ce(this,"on","pluginsetup:ads",fe);this.bcAnalytics={client:g,engager:c,history:f,settings:i,VERSION:be};ce(this,"on","usage",function(e){if(!e.name){return a["default"].log.warn("Ignored usage event without a `name` parameter")}h.put(e.name)});var S=function e(){h.put("pagehide");c.stop({fromUnload:true,ignoreAdState:true,reason:"pagehide called"})};ce(e,"addEventListener","pagehide",S);var E=function e(t){if(!t.usingPlugin("bcAirplay")){return false}if(t.isConnectingToAirplay){t.isConnectingToAirplay=false;return true}};var I=function e(t){if(!T(t,n)){return}var r=f.first("loadstart",y(n));var i=f.first("play");var a=f.last("playing");if(t&&t.type==="playing"&&f.last("pause")){g.triggerVideoResume()}if((i||a)&&!c.isTracking()&&!n.paused()){c.start({period:{start:i||a},reason:"workflow detected that it is playing"})}if(g.timeOfImpression&&g.timeOfView){return}l.workflow=l.workflow||n.setTimeout(function(){l.workflow=null;r=f.first("loadstart",y(n));i=f.first("play");a=f.last("playing");if((r||i)&&!g.timeOfImpression){g.sendVideoImpression({params:{time:Math.min(r||Infinity,i||Infinity)}})}if(r&&a&&!g.timeOfView){g.sendVideoView({params:{time:a}})}},1)};c.on("engagement",function(t){var r=t.engagement,i=r.fromUnload,a=r.ignoreAdState,s=r.period,o=r.restartAlways,u=r.state;var l=_(n);var d={useSendBeaconOnly:i,params:{time:s.end}};if(u.rangeExtras>=2){h.put("disco-engmnt")}var f=h.peek();if(f&&f.length){d.params.usage=f.map(e.encodeURIComponent).sort().join(",")}if(!l||a){g.qos.append("frames",u.videoPlaybackQuality);var p=g.sendVideoEngagement(s,u,d);if(o||p&&!n.paused()){if(l){return}h.flush();c.start({reason:"sent engagement and still playing"})}}});ce(this,"on","dispose",function(){de();h.put("disposed");c.dispose()});ce(this,"on",O.concat(A,w).concat("sourceunstable"),function(e){f.record(e.type,n)});ce(this,"on",O.concat("ads-ad-started"),function(e){g.qos.append("event",_(n)?"ad":"content",e.type)});ce(this,"on",["loadedmetadata","resize"],function(){g.qos.append("player",Ie(n))});ce(this,"on","fullscreenchange",function(){var e=Date.now();l.fullscreen=n.setTimeout(function(){l.fullscreen=null;if(n.isFullscreen()){g.triggerFullscreenEnabled()}else{g.triggerFullscreenDisabled()}g.qos.append("player",Ie(n),e)},500)});ce(this,"on","mediachange",function(){if(n.tech_.vhs){var e=n.tech_.vhs.playlists.media();g.qos.append("bitrate",{bitrates:n.tech_.vhs.bandwidth,playlists:e&&e.attributes&&e.attributes.BANDWIDTH})}});ce(this,"on","ratechange",function(){var e=n.playbackRate().toFixed(2);h.put("pr:"+e)});ce(this,"on","pipactive",function(){g.triggerEnterPIP()});ce(this,"on","pipinactive",function(){g.triggerLeavePIP()});ce(this,"on","texttrackchange",function(e){var t=n.textTracks();if(f.last(e.type)){var r=f.filter(e.type);var i=r[r.length-1].text_track_index;g.triggerTextTrackDisabled({params:{text_track_kind:t[i].kind,text_track_language:t[i].language}})}for(var a=0;a<t.length;a++){if(t[a].mode==="showing"){f.add(e.type,new Date,{text_track_index:a});g.triggerTextTrackEnabled({params:{text_track_kind:t[a].kind,text_track_language:t[a].language}});break}}});if(this.controlBar&&this.controlBar.volumePanel&&this.controlBar.volumePanel.muteToggle){ce(this.controlBar.volumePanel.muteToggle,"on","click",function(){if(n.muted()){g.triggerMuteEnabled()}else{g.triggerMuteDisabled()}})}ce(this,"on","volumechange",function(){if(!n.muted()){g.triggerVolumeChange({params:{volume:n.volume()}})}});ce(this,"on","ready",function(){ce(n.tech_,"on","usage",function(e){if(!e.name){return a["default"].log.warn("Ignored usage event without a `name` parameter")}h.put(e.name)});ce(n.tech_,"on","bandwidthupdate",function(){g.qos.append("bitrate",{bitrates:n.tech_.vhs.bandwidth,throughput:Math.round(n.tech_.vhs.throughput)})});ce(n.tech_,"on","liveresync",function(){n.trigger({type:"usage",name:"hls-live-resync"})});ce(n.tech_,"on","videounderflow",function(){n.trigger({type:"usage",name:"hls-video-underflow"})});ce(n.tech_,"on","licenserequestattempted",function(){f.add("licenserequestattempted")});ce(n,"on","loadedmetadata",function(){var e=n.textTracks();for(var t=0;t<e.length;t++){if(e[t].label==="segment-metadata"){(function(){var r=e[t];var i=void 0;ce(r,"addEventListener","cuechange",function(){var e=r.activeCues[0];if(e){var t=n.tech_.vhs.playlists.master.playlists[e.value.playlist];if(i!==t.uri){if(t.attributes&&t.attributes.BANDWIDTH){g.qos.append("bitrate",{rendered:t.attributes.BANDWIDTH})}if(i!==undefined){c.stop({reason:"rendition on screen changed",restartAlways:true})}}i=t.uri}})})()}}if(n.usingPlugin("social")){ce(n.socialButton,"on","click",function(){g.triggerShareOverlay()});ce(n.socialOverlay,"on","click",function(e){if(e.target.classList.contains("vjs-social-share-link")){g.triggerShareSocialClicked({params:{share_network:e.target.getAttribute("title").toLowerCase()}})}});ce(n.socialOverlay,"on","copy",function(e){if(e.target.parentElement.classList.contains("vjs-social-direct-link")){g.triggerShareLinkCopied({params:{link_url:n.socialOverlay.getDirectLink()}})}else if(e.target.parentElement.classList.contains("vjs-social-embed-code")){g.triggerShareEmbedCopied({params:{embed_code:n.socialOverlay.getEmbedCode()}})}})}})});ce(this,"on","waiting",function(e){if(!u&&!_(n)){c.stateBySrc().rebufferingCount++}});ce(this,"on","sourcechanged",function(e,t){var r=t.interimEvents;r[0].event;var i=function e(){if(!u&&!_(n)){c.recordState()}};if(t.from){c.stop({reason:"changing sources",period:{end:r[0].time},ignoreAdState:true,src:t.from});c.clearStateBySrc(t.from)}o=false;u=false;g.resetTimesOf();f.reset();r.forEach(function(e){return f.add(e.event.type,e.time)});I();ce(n,"onPerSrc","timeupdate",i);ce(n,"onePerSrc","sourceunstable",function(){if(v(n)==="content-resuming"){return}var e=n.currentSrc();c.stop({ignoreAdState:true,reason:"sourceunstable",src:e});if(!_(n)){le(n,"off","timeupdate",i)}});ce(n,"onPerSrc",["loadstart","play","playing"],I);ce(n,"onPerSrc",["pause","ratechange"],function(e){if(e.type==="pause"){f.record(e.type,n);g.triggerVideoPause()}if(!u&&!_(n)&&!n.ended()){c.stop({reason:'saw "'+e.type+'"'});if(n.paused()){ce(n,"onePerSrc","playing",function(){c.start({reason:"playback began after a pause"})})}else if(e.type==="ratechange"){l.ratechange=n.setTimeout(function(){l.ratechange=null;c.start({reason:"the playback rate changed"})},1)}}});ce(n,"onPerSrc","unstable",function(){if(!u&&!_(n)){u=true;c.stop({reason:"seeking"})}});ce(n,"onPerSrc","seek",function(){if(u&&!_(n)){u=false;c.start({reason:"stopped seeking"})}});ce(n,"onePerSrc","adstart",function(){if(!m(n)){g.sendVideoImpression({params:{time:f.last("adstart",true)-100}})}});ce(n,"onPerSrc","adstart",function(){o=n.ended();c.stop({ignoreAdState:true,period:{end:f.last("adstart",true)},reason:"saw adstart"})});ce(n,"onePerSrc","adend",function(){if(!n.paused()&&!n.ended()){I()}});ce(n,"onPerSrc","adend",function(){if(!o){c.start({reason:'saw "adend"'})}});ce(n,"onePerSrc","ended",function(){c.stop({reason:"end of content"});g.sendVideoComplete()})});ce(this,"on","catalog_request",function(e){f.record(e.type,n);g.sendCatalogRequest(e.url)});ce(this,"on","catalog_request_error",function(e){f.record(e.type,n);g.sendCatalogRequestError(e.url,{error:e.error,xhr:e.response})});ce(this,"on","catalog_response",function(e){f.record(e.type,n);g.sendCatalogResponse(e.url,{xhr:e.response})});ce(this,"on","play",function(e){if(b(n)||E(n)){return}var t={params:{time:Date.now()}};if(n.perSourceBehaviors.isSrcStable()){g.sendPlayRequest(t)}else{ce(n,"one","sourcechanged",function(){g.sendPlayRequest(t)})}});ce(this,"on","error",function(){if(!_(n)){g.sendError()}});ce(this,"on","adstart",function(e){g.sendAdModeBegin();g.triggerAdStart();l.perSrcDisable=n.setTimeout(function(){l.perSrcDisable=null;n.perSourceBehaviors.disable()},1)});ce(this,"on","adend",function(e){g.triggerAdEnd();g.sendAdModeComplete();if(l.perSrcDisable){n.clearTimeout(l.perSrcDisable)}else{n.perSourceBehaviors.enable()}});ce(this,"on","adserror",function(e){g.triggerAdError({params:{ad_error:e.errorCode}})});ce(this,"on","adtimeout",function(){g.sendAdTimeout()});ce(this,"on","ad-hard-timeout",function(){g.sendAdHardTimeout()});ce(this,"on",x,function(e){C(g,e.type,Date.now())});g.qos.append("mr",i.mr);if(s["default"].isFn(i.beforeFirstBeacon)){i.beforeFirstBeacon(this)}g.sendPlayerInit();g.sendError();ce(this,"on","ready",function(){g.defaultParams({feature:m(n)?"adonly":null,autoplay:n.autoplay(),ads_enabled:n.ads!==undefined});g.qos.append("performance",(e.location.href||"").split("?")[1]);g.qos.append("player",Ie(n));if("hidden"in t&&"visibilityState"in t){if(t.hidden){n.trigger({type:"usage",name:"document-hidden"})}var r=function e(){n.trigger({type:"usage",name:"document-"+t.visibilityState})};ce(t,"addEventListener","visibilitychange",r)}if(t.querySelector(".bc-iframe")){n.trigger({type:"usage",name:"iframe-embed"})}else{n.trigger({type:"usage",name:"inpage-embed"})}g.sendPlayerLoad({qos:g.qos.keys(),params:{usage:h.flush()}})})};ke.VERSION=be;if(a["default"].registerPlugin){a["default"].registerPlugin("bcAnalytics",ke)}else{a["default"].plugin("bcAnalytics",ke)}return ke})})();(function(){if(s.getPlugin("errors")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js"),require("global/document")):typeof r==="function"&&r.amd?r(["video.js","global/document"],t):(e=e||self,e.videojsErrors=t(e.videojs,e.document))})(this,function(e,t){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e;t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t;var r="4.5.0";var i=e.getComponent("Flash");var n=!e.browser.IS_IPHONE;var a=e.registerPlugin||e.plugin;var s={header:"",code:"",message:"",timeout:45*1e3,backgroundTimeout:300*1e3,dismiss:n,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are "+"connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how "+"to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"Could not download the video"},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"},FLASHLS_ERR_CROSS_DOMAIN:{headline:"The video could not be loaded: crossdomain access denied."}}};var o=function n(a,o){var u;var l;var d;var c=[];var f=function t(r){o.errors=e.mergeOptions(o.errors,r);Object.keys(o.errors).forEach(function(e){var t=o.errors[e];if(!t.type){t.type=e}})};f();var h=function e(){if(a.error()&&a.error().code===-2){a.error(null)}a.clearTimeout(l);a.clearTimeout(u);if(d){d=false;a.removeClass("vjs-waiting")}var r=[Infinity,-1];var i=function e(t,r){return t.indexOf(r)!==-1};if(t.visibilityState==="hidden"&&(a.muted()||i(r,o.backgroundTimeout))||t.visibilityState==="visible"&&i(r,o.timeout)){return}l=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}d=true;a.addClass("vjs-waiting")},1e3);u=a.setTimeout(function(){if(a.error()||a.paused()||a.ended()){return}a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},t.visibilityState==="hidden"?o.backgroundTimeout:o.timeout)};var p=function e(){var t;while(c.length){t=c.shift();a.off(t[0],t[1])}a.clearTimeout(u);a.clearTimeout(l)};var v=function e(t,r){var i=function e(){if(!a.error()){var t=a.$(".vjs-tech");if(t&&t.type==="application/x-shockwave-flash"&&!t.vjs_getProperty){a.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});return}if(a.paused()){return h()}if(a.ended()){return h()}}r.call(this)};a.on(t,i);c.push([t,i])};var m=function e(){var r=0;p();h();v(["timeupdate","adtimeupdate"],function(){var e=a.currentTime();if(e!==r){r=e;h()}});a.off(t,"visibilitychange",e);a.on(t,"visibilitychange",e)};var g=function e(){if(!a.currentSrc()){a.error({code:-1,type:"PLAYER_ERR_NO_SRC"})}};var y=function r(){var n="";var s=a.error();var u=t.createElement("div");var l="";if(!s){return}a.off(t,"visibilitychange",m);s=e.mergeOptions(s,o.errors[s.code||s.type||0]);if(s.message){n='<div class="vjs-errors-details">'+a.localize("Technical details")+'\n : <div class="vjs-errors-message">'+a.localize(s.message)+"</div>\n </div>"}if(s.code===4&&i&&!i.isSupported()){var d=a.localize("If you are using an older browser please try upgrading or installing Flash.");n+='<span class="vjs-errors-flashmessage">'+d+"</span>"}var c=a.getChild("errorDisplay");u.className="vjs-errors-dialog";u.id="vjs-errors-dialog";l='<div class="vjs-errors-content-container">\n <h2 class="vjs-errors-headline">'+this.localize(s.headline)+'</h2>\n <div class="vjs-errors-code"><b>'+this.localize("Error Code")+":</b> "+(s.type||s.code)+"</div>\n "+n+"\n </div>";var f=c.closeable(!("dismiss"in s)||s.dismiss);if(f){l+='<div class="vjs-errors-ok-button-container">\n <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n </div>";u.innerHTML=l;c.fillWith(u);c.contentEl().firstChild.appendChild(c.getChild("closeButton").el());var h=c.el().querySelector(".vjs-errors-ok-button");a.on(h,"click",function(){c.close()})}else{u.innerHTML=l;c.fillWith(u)}if(a.currentWidth()<=600||a.currentHeight()<=250){c.addClass("vjs-xs")}c.one("modalclose",function(){return a.error(null)})};var _=function e(){p();a.removeClass("vjs-errors");a.off("play",m);a.off(t,"visibilitychange",m);a.off("play",g);a.off("dispose",e);a.off(["aderror","error"],y)};var b=function t(r){_();n(a,e.mergeOptions(s,r))};b.extend=function(e){return 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.backgroundTimeout=function(e){if(typeof e==="undefined"){return o.backgroundTimeout}if(e!==o.backgroundTimeout){o.backgroundTimeout=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=r;a.errors=b};var u=function t(r){o(this,e.mergeOptions(s,r))};["extend","getAll"].forEach(function(t){u[t]=function(){e.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}});u.VERSION=r;a("errors",u);return u})})();(function(){if(s.getPlugin("catalog")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?t(exports,require("video.js"),require("@brightcove/loscore")):typeof r==="function"&&r.amd?r(["exports","video.js","@brightcove/loscore"],t):(e=typeof globalThis!=="undefined"?globalThis:e||self,t(e.videojsBcCatalog={},e.videojs,e.videojs.bc_))})(this,function(r,i,n){"use strict";function a(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=a(i);var o=a(n);var u="3.45.4";var l="video";var d="playlist";var c="search";var f="lazySequence";var h="related";var p=[{attr:"data-video-id",query:"videoId",config:"videoId",type:l},{attr:"data-playlist-id",query:"playlistId",config:"playlistId",type:d},{attr:"data-catalog-search",query:"catalogSearch",config:"search",type:c},{attr:"data-catalog-sequence",query:"catalogSequence",config:"sequence",type:f}];var v=function e(t,r,i){for(var n=0;n<p.length;n++){var a=p[n];var s=a[t];if(r[s]){var o={id:r[s],type:a.type};if(o.type===d){o.playlistVideoId=i}return o}}};var m=function e(t,r,i){var n=r.options_;var a=Boolean(r.el().ownerDocument.querySelector(".bc-iframe"));var u=o["default"].qs();i=i?u.parse(i):u.search;p.concat({query:"playlistVideoId"}).forEach(function(e){var t=e.query;if(Array.isArray(i[t])){i[t]=i[t].pop()}});if(p.filter(function(e){return!!t[e.config]}).length>1||p.filter(function(e){return!!n[e.attr]}).length>1){r.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 l=a&&v("query",i,i.playlistVideoId)||v("attr",n,n["data-playlist-video-id"]||i.playlistVideoId)||v("config",t,i.playlistVideoId||t.playlistVideoId);if(!l){return}if(typeof l.id==="string"&&(l.type===c||l.type===f)){var d=l.id;try{l.id=JSON.parse(d)}catch(e){if(l.type===f){s["default"].log.error("sequence must be valid JSON or an object",e);return}}if(!o["default"].isObj(l.id)&&!Array.isArray(l.id)){l.id=d}}["adConfigId","deliveryConfigId","bumper"].forEach(function(e){var r=e==="bumper"?t[e]&&t[e].id:t[e];if(!o["default"].isNonEmptyStr(r)){return}if(o["default"].isObj(l.id)){l.id[e]=r}else if(Array.isArray(l.id)){l.id.forEach(function(t){t[e]=r})}else{l[e]=t[e]}});return l};var g={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_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_VIDEO_NOT_FOUND:{headline:"The Video Cloud video was not found."},VIDEO_CLOUD_ERR_DUPLICATE_PARAMETERS:{headline:"Invalid Request: Duplicate Parameter",message:"The same parameter name was provided more than once in the request."},VIDEO_CLOUD_ERR_TOKEN_REQUIRED:{headline:"Access Denied: Missing Token",message:"Video cannot be played without a token."},VIDEO_CLOUD_ERR_TOKEN_INVALID:{headline:"Access Denied: Invalid Token",message:"Video cannot be played without a valid token."},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"Playback Denied: Domain Restricted",message:"Video is not playable on this domain."},PLAYER_ERR_IP_RESTRICTED:{headline:"Playback Denied: IP",message:"Your IP address does not have access to this video."},PLAYER_ERR_GEO_RESTRICTED:{headline:"Playback Denied: Location",message:"Video is unavailable from your current location."},PLAYER_ERR_OFFER_RESTRICTED:{headline:"Playback Denied: Offer Restricted",message:"Video is not playable with your entitlements."},PLAYER_ERR_TAG_RESTRICTED:{headline:"Playback Denied: Tags",message:"Video does not have tags required for playback."},PLAYER_ERR_ACCOUNT_ID:{headline:"Playback Denied: Account ID",message:"Account ID missing or invalid."},PLAYER_ERR_DEVICE_RESTRICTED:{headline:"Playback Denied: Device",message:"Device does not have access to this resource."},VIDEO_CLOUD_ERR_VIDEO_NOT_PLAYABLE:{headline:"Playback Denied: Unavailable",message:"Video is not currently available for playback."},VIDEO_CLOUD_ERR_PLAYLIST_NOT_PLAYABLE:{headline:"Playback Denied: Unavailable",message:"Playlist is not currently available for playback."},VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_CREATE:{code:"DENIED_BY_STREAM_LIMIT_CREATE",headline:"Stream Limiting: New Viewers",message:"Limited stream has reached the maximum number of viewers."},VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_RENEW:{code:"DENIED_BY_STREAM_LIMIT_RENEW",headline:"Stream Limiting: Existing Viewers",message:"Limited stream is already being watched by the maximum number of viewers."},VIDEO_CLOUD_DENIED_BY_STREAM_LIMITING:{code:"DENIED_BY_STREAM_LIMITING",headline:"Stream Limiting: New Viewers",message:"Limited stream has reached the maximum number of viewers."},VIDEO_CLOUD_DENIED_BY_DEVICE_LIMITING:{code:"DENIED_BY_DEVICE_LIMITING",headline:"Device Limiting: New Viewers",message:"Maximum number of streams has been reached on this device."},VIDEO_CLOUD_ERR_PLAYLIST_NOT_FOUND:{headline:"Playlist Unavailable: Not Found",message:"Playlist cannot be found."},VIDEO_CLOUD_ERR_METHOD_NOT_ALLOWED:{headline:"API: Method not allowed."},VIDEO_CLOUD_ERR_SERVER:{headline:"Server: Internal server error",message:"An internal server error prevented playback."},VIDEO_CLOUD_ERR_VIDEO_RETRIEVE_FAILURE:{headline:"Server Error: Video",message:"Video unavailable."},VIDEO_CLOUD_ERR_ACCOUNT_RETRIEVE_FAILURE:{headline:"Server Error: Account",message:"Account unavailable."},VIDEO_CLOUD_ERR_VIDEO_URLS_RETRIEVE_FAILURE:{headline:"Server Error: Video URLs",message:"Stream URLs unavailable."},VIDEO_CLOUD_ERR_PLAYLIST_RETRIEVE_FAILURE:{headline:"Server Error: Playlist",message:"Video playlist unavailable."},VIDEO_CLOUD_ERR_PLAYBACK_RIGHT_RETRIEVE_FAILURE:{headline:"Server Error: Playback Rights",message:"Entitlements unavailable."},VIDEO_CLOUD_ERR_PLAYLIST_VIDEOS_RETRIEVE_FAILURE:{headline:"Server Error: Playlist Videos",message:"Playlist videos unavailable."},VIDEO_CLOUD_ERR_LICENSE_RETRIEVE_FAILURE:{headline:"Server Error: License",message:"Stream license unavailable."},VIDEO_CLOUD_ERR_OFFERS_RETRIEVE_FAILURE:{headline:"Server Error: Offers",message:"Stream offers unavailable."},VIDEO_CLOUD_ERR_RIGHTS_RETRIEVE_FAILURE:{headline:"Server Error: Rights",message:"Stream rights unavailable."},VIDEO_CLOUD_ERR_SERVICE_UNAVAILABLE:{headline:"Server Error: Unavailable",message:"The server is currently unavailable. Please try again later."},VIDEO_CLOUD_ERR_SERVICE_TIMEOUT:{headline:"Server Error: Timeout",message:"Recevied a timeout from the server. Please try again later."},GSC_ERR_DENIED_BY_CONCURRENCY_LIMITING:{headline:"Session Limiting: New Sessions",message:"Maximum number of sessions have been reached for this video",dismiss:false},GSC_TOKEN_REQUIRED:{headline:"Invalid Request: JWT is required",message:"Please provide a valid token",dismiss:false},GSC_INVALID_TOKEN:{headline:"Invalid Request: Invalid JWT",message:"Please provide a valid token",dismiss:false},GSC_MISSING_FIELD_ACCOUNT_ID:{headline:"Invalid Request: AccountID is required",message:"Please provide required information",dismiss:false},GSC_MISSING_FIELD_UID:{headline:"Invalid Request: UID in JWT is required",message:"Please provide required information",dismiss:false},GSC_MISSING_FIELD_SESSION_ID:{headline:"Invalid Request: SID in JWT is required",message:"Please provide required information",dismiss:false},GSC_MISSING_FIELD_CLIMIT:{headline:"Invalid Request: CLIMIT in JWT is required",message:"Please provide required information",dismiss:false},GSC_MISSING_FIELD_VIDEO_ID:{headline:"Invalid Request: videoId is required",message:"Please provide required information",dismiss:false},GSC_SESSION_STOPPED:{headline:"Stream Limiting: Session stopped",message:"Stream session no longer available",dismiss:false},GSC_SESSION_EXPIRED:{headline:"Stream Limiting: Session expired",message:"Stream session no longer available",dismiss:false},GSC_PLAYBACK_RESTRICTIONS:{headline:"Playback Restrictions: Not Met",message:"Playback restrictions requirements have not been met",dismiss:false},GSC_SESSION_NOT_FOUND:{headline:"Not found",message:"Playback session not found",dismiss:false},GSC_VIDEO_NOT_FOUND:{headline:"Not found",message:"Video cannot be found or does not exist",dismiss:false}};var y=function e(t,r){var i=t.error();if(r===null&&i&&(i.headline===g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_CREATE.headline||i.headline===g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_RENEW.headline||i.headline===g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMITING.headline||i.headline===g.VIDEO_CLOUD_DENIED_BY_DEVICE_LIMITING.headline||i.headline===g.GSC_ERR_DENIED_BY_CONCURRENCY_LIMITING.headline)){return i}if(r&&r.code===5&&/Denied by stream limiting \(create\)/.test(r.cause)){return g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_CREATE}if(r&&r.code===5&&/Denied by stream limiting \(renew\)/.test(r.cause)){return g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_RENEW}if(r&&r.code===5&&/Denied by stream limiting/.test(r.cause)){return g.VIDEO_CLOUD_DENIED_BY_STREAM_LIMITING}if(r&&r.code===5&&/Denied by device limiting: [1-9] devices in use/.test(r.cause)){return g.VIDEO_CLOUD_DENIED_BY_DEVICE_LIMITING}return r};var _=function e(t){var r=function e(){return t.errors.extend(g)};var i=o["default"].isFn(t.usingPlugin)?t.usingPlugin("errors"):o["default"].isFn(t.errors)&&o["default"].isFn(t.errors.extend);if(!i){t.on("pluginsetup:errors",r);t.on("dispose",function(){t.off("pluginsetup:errors",r)});return}r()};var b={400:{AD_CONFIG_NOT_FOUND:"VIDEO_CLOUD_ERR_AD_CONFIG_ID_NOT_FOUND",DUPLICATE_PARAMETERS:"VIDEO_CLOUD_ERR_DUPLICATE_PARAMETERS"},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",ACCOUNT_ID:"PLAYER_ERR_ACCOUNT_ID",DEVICE:"PLAYER_ERR_DEVICE_RESTRICTED"},VIDEO_NOT_PLAYABLE:"VIDEO_CLOUD_ERR_VIDEO_NOT_PLAYABLE",PLAYLIST_NOT_PLAYABLE:"VIDEO_CLOUD_ERR_PLAYLIST_NOT_PLAYABLE",DENIED_BY_STREAM_LIMITING_CREATE:"VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_CREATE",DENIED_BY_STREAM_LIMITING_RENEW:"VIDEO_CLOUD_DENIED_BY_STREAM_LIMIT_RENEW",DENIED_BY_STREAM_LIMITING:"VIDEO_CLOUD_DENIED_BY_STREAM_LIMITING",DENIED_BY_DEVICE_LIMITING:"VIDEO_CLOUD_DENIED_BY_DEVICE_LIMITING"},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_PLAYLIST_NOT_FOUND"},405:{METHOD_NOT_ALLOWED:"VIDEO_CLOUD_ERR_METHOD_NOT_ALLOWED"},500:{SERVER_ERROR:"VIDEO_CLOUD_ERR_SERVER"},502:{VIDEO_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_VIDEO_RETRIEVE_FAILURE",VIDEO_URLS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_VIDEO_URLS_RETRIEVE_FAILURE",PLAYLIST_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_PLAYLIST_RETRIEVE_FAILURE",PLAYLIST_VIDEOS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_PLAYLIST_VIDEOS_RETRIEVE_FAILURE",ACCOUNT_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_ACCOUNT_RETRIEVE_FAILURE",PLAYBACK_RIGHT_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_PLAYBACK_RIGHT_RETRIEVE_FAILURE",LICENSE_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_LICENSE_RETRIEVE_FAILURE",OFFERS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_OFFERS_RETRIEVE_FAILURE",RIGHTS_RETRIEVE_FAILURE:"VIDEO_CLOUD_ERR_RIGHTS_RETRIEVE_FAILURE"},503:{SERVICE_UNAVAILABLE:"VIDEO_CLOUD_ERR_SERVICE_UNAVAILABLE"},504:{SERVER_TIMEOUT:"VIDEO_CLOUD_ERR_SERVICE_TIMEOUT"}};var T=function e(t,r){var i=r.shift();if(o["default"].isNonEmptyStr(t[i])){return t[i]}if(!i||!t[i]){return"unknown"}return e(t[i],r)};var S=function e(t,r){r=Array.isArray(r)?r[0]:r||{};return{code:T(b,[t,r.error_code,r.error_subcode])}};var E=function e(t,r,i){if(i.embedHasPoster){t.poster=r.options_.poster}if(i.embedHasSources){t.sources=r.options_.sources}if(i.embedHasTracks){t.textTracks=r.options_.tracks}if(t.textTracks&&t.textTracks.length>0&&s["default"].browser.IS_ANY_SAFARI){r.$(".vjs-tech").setAttribute("crossorigin","anonymous")}return t};var I=function e(t,r){return function(e,i){if(e){e.data=i;t.catalog.error=e;t.error(S(e.status,i));return t.trigger("bc-catalog-error")}t.ready(function(){return t.catalog.load(r(i))})}};var C=function e(t,r,i){if(t===l){return I(r,function(e){return E(e,r,i)})}return I(r,function(e){var n=E({},r,i);if(Array.isArray(e.videos)){var a=e.videos[0]||{};e.videos[0]=s["default"].mergeOptions(a,n,{rawItem:a})}else{e.videos=[n]}if(i.playlistVideoId&&t===d){for(var o=0;o<e.length;o++){if(e[o].id===i.playlistVideoId||"ref:"+e[o].referenceId===i.playlistVideoId){e.startingIndex=o;break}}}return e})};var k=function e(){return Number.MAX_SAFE_INTEGER||Math.pow(2,53)-2};var w=function e(t,r){var i=t.cuePoints;var n=i[r];var a;for(r++;r<i.length;r++){if(i[r].time>n.time){a=i[r];break}}var s=isFinite(t.duration)?t.duration:k();n.startTime=n.time;if(a&&a.time<s){n.endTime=a.time}else{n.endTime=s}return n};var A=function e(t){var r=t.remoteTextTracks();if(r){var i=r.length;while(i--){t.removeRemoteTextTrack(r[i])}}var n=t.textTracks();if(n){var a=n.length;while(a--){var s=n[a];if(s.kind==="metadata"&&s.cues){var o=s.cues.length;while(o--){s.removeCue(s.cues[o])}}s.mode="disabled"}}};var P=function t(r,i){A(r);if(!i.cuePoints){return}var n=r.mediaCuePointsTrack();var a=e.VTTCue||e.vttjs&&e.vttjs.VTTCue||e.TextTrackCue;for(var s=0;s<i.cuePoints.length;s++){var o=i.cuePoints[s];var u=new a(o.startTime,o.endTime,o.type);u.originalCuePoint=o;n.addCue(u)}n.mode="hidden"};var O=function e(t,r,i){var n=0;for(;n<t.length;n++){if(r(t[n])){return t[n]}}return i};function x(e){var t=x.windowLocationProtocol();var r=function e(r){return r.src&&r.src.indexOf(t)===0};if(e&&e.length&&e.length>0){return O(e,r,e[0]).src}}x.windowLocationProtocol=function(){return e.location.protocol};var D=function e(t,r){return"https://"+t+".api."+(r?r+".":"")+"brightcove.com/playback/v1/"};var L={production:{papi:D("edge"),epa:D("edge-auth")},qa:{papi:D("edge","qa"),epa:D("edge-auth","qa")},staging:{papi:D("edge","staging"),epa:D("edge-auth","staging")}};var R=function t(r){return e.encodeURIComponent(r)};var N=function e(t){return typeof t==="string"&&/^BCpk/.test(t)};var M=function e(t){var r={ad_config_id:"adConfigId",config_id:"deliveryConfigId"};var i=["ad_config_id","config_id","tveToken"];if(t.type!==l){i.push("limit");i.push("offset")}if(t.type===c){i.push("q");i.push("sort")}var n={};i.forEach(function(e){var i=r[e]||e;if(t[i]){n[e]=t[i]}});var a=o["default"].qs().stringify(n);return a?"?"+a:""};var U=function e(t,r){var i=r.env,n=r.type;if(!i){i="production"}var a;if(o["default"].isNonEmptyStr(r.baseUrl)){a=r.baseUrl}else if(N(r.policyKey)){a=L[i].papi}else{a=L[i].epa}if(a.slice(-1)==="/"){a=a.slice(0,-1)}var s;s=a+"/accounts/"+R(t)+"/"+(n===d?"playlists":"videos");if(n!==c){s+="/"+R(r.id)}if(n===h){s+="/related"}s+=M(r);return s};var B=function e(t,r,i,n){if(n===void 0){n=function e(){}}var a=i.deliveryConfigId,u=i.adConfigId,f=i.id,p=i.bcovAuthToken,v=i.policyKey,m=i.q,g=i.type;if(!r||!g){return n(new Error("accountId and type are required"))}if(g===c&&!m){return n(new Error("q is required when performing a search"))}else if(g!==c&&!f){return n(new Error("id is required when getting a video or playlist"))}var y=U(r,i);var _=function e(i,n){t.trigger(o["default"].assign({type:"catalog_"+i,accountId:r,deliveryConfigId:a,adConfigId:u,playlistId:g===d?f:undefined,related:g===h?f:undefined,search:g===c?m:undefined,url:y,videoId:g===l?f:undefined},n))};var b=function e(t,r,i){return _("request_error",{error:t,response:r,body:i})};_("request");var T={};if(N(v)){T.Accept="application/json;pk="+v}else if(p){T.Authorization="Bearer "+p}var S=s["default"].xhr({headers:T,json:true,url:y},function(e,t,r){if(e){b(e,S,r);return n(e,r)}if(S.status>=400){b(new Error("Request Failed"),S,r);return n(S,r)}_("response",{response:S});n(null,r)});var E=S.onabort.bind(S);S.onabort=function(){var e=new Error("Request Aborted");E();b(e,S,null);return n(e,null)};return S};var F=function t(){var r=e.GestureEvent;return!!(r&&e.WebKitMediaKeys&&e.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4"))};var j=function t(){return s["default"].browser.IS_EDGE&&/Chrome/i.test(e.navigator.userAgent)};var V=function t(){return e.navigator.requestMediaKeySystemAccess&&!s["default"].browser.IS_IOS&&(s["default"].browser.IS_FIREFOX||s["default"].browser.IS_CHROME||j())};var q=function t(r){return e.SourceBuffer&&e.SourceBuffer.prototype&&typeof e.SourceBuffer.prototype.changeType==="function"};var H=function t(){return e.MediaSource&&e.MediaSource.isTypeSupported&&e.MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L60.90"')};var W=function e(t){return t==="application/vnd.apple.mpegurl"||t==="application/x-mpegURL"};var G=function e(t){var r=t&&t.encryption&&t.encryption.method;if(typeof r==="string"){return r.toLowerCase()==="aes-128"}var i=s["default"].parseUrl(t.src);return i.hostname.indexOf("boltdns.net")!==-1&&i.pathname.indexOf("/aes128/")!==-1};var K=function e(t){return t.isSecureContext||!/^http:/.test(t.location.href)};var Y;var z=function e(){if(Y!==undefined){return Y}var r=t.createElement("video");var i=s["default"].options.hls&&s["default"].options.hls.overrideNative;if(r&&r.canPlayType){Y=!i&&/probably|maybe/i.test(r.canPlayType("application/vnd.apple.mpegurl"))}else{Y=false}return Y};var X={isSafariWithFairplaySupport:F,isChromiumEdge:j,isBrowserWithWidevineSupport:V,isHlsType:W,isCodecSwitchingSupported:q,isHEVCSupported:H,isEncryptedHls:G,preferHttps:K,isNativeHlsSupported:z};var Q="https://fps.brightcove.com/v1/application_certificate";var $="com.apple.fps.1_0";var J=function t(r){return e.btoa(String.fromCharCode.apply(null,r))};var Z=function e(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))};var ee=function e(t){var r=t.source,i=t.publisherId,n=t.applicationId;var a=r.key_systems[$].certificate_url;if(a){return a}if(n&&i){return Q+"/"+i+"/"+n}return null};var te=function e(t,r){var i=ee({source:t.source,publisherId:t.publisherId,applicationId:t.applicationId});s["default"].xhr({uri:i,responseType:"arraybuffer"},s["default"].xhr.httpHandler(function(e,t){if(e){r(e);return}r(null,new Uint8Array(t))}))};var re=function e(t,r){if(typeof r==="string"){return r.split("//")[1]}return Z(r).split("//")[1]};var ie=function e(t,r){return function(e,i,n,a){var o=i.split("&").filter(function(e){return/^renditionType/.test(e)})[0]||"";var u=o.split("=")[1];var l={"Content-Type":"application/json",Accept:"application/octet-stream"};if(e.emeHeaders&&e.emeHeaders["BCOV-Auth"]){l["BCOV-Auth"]=e.emeHeaders["BCOV-Auth"]}if(u&&r){t=r[u]}s["default"].xhr({uri:t,method:"POST",responseType:"arraybuffer",json:{publisher_id:e.publisherId,application_id:e.applicationId,key_id:i.split("/")[3],server_playback_context:J(n)},headers:l},s["default"].xhr.httpHandler(a,true))}};var ne={getCertificateUri:ee,getCertificate:te,getContentId:re,createGetLicenseFunc:ie,base64EncodeUint8Array:J,FAIRPLAY_KEY_SYSTEM:$};var ae=function e(t){if(t===void 0){t=[]}return t.filter(function(e){return e.keySystems&&e.keySystems[ne.FAIRPLAY_KEY_SYSTEM]})};var se=function e(t,r,i){var n=ae(r);if(!n.length||!t.eme){i();return}var a=t.eme.options||{};var s=0;var o=[];var u={};var l=function e(t){var r=n[t];var l=ne.getCertificateUri({source:r,publisherId:a.publisherId,applicationId:a.applicationId});if(!l){return"continue"}if(u[l]){u[l].push(r);return"continue"}s++;u[l]=[r];r.keySystems[ne.FAIRPLAY_KEY_SYSTEM].getCertificate({source:r,publisherId:a.publisherId,applicationId:a.applicationId},function(e,t){if(e){o.push({message:"Unable to resolve FairPlay certificate",error:e})}else{var r=u[l];for(var n=0;n<r.length;n++){var a=r[n];a.keySystems[ne.FAIRPLAY_KEY_SYSTEM].getCertificate=function(e,r){r(null,t)}}}s--;if(!s){if(o.length){i(o);return}i()}})};for(var d=0;d<n.length;d++){var c=l(d);if(c==="continue")continue}};var oe=function e(t){if(!X.isHlsType(t.type)||!t.key_systems||!t.key_systems[ne.FAIRPLAY_KEY_SYSTEM]){return null}var r=t.key_systems[ne.FAIRPLAY_KEY_SYSTEM];var i=r.key_request_url;var n={};n[ne.FAIRPLAY_KEY_SYSTEM]={getCertificate:ne.getCertificate,getLicense:ne.createGetLicenseFunc(i,r.key_request_urls),getContentId:ne.getContentId};return n};var ue=function e(t){return oe(t)};var le={getKeySystemOptions:ue,getFairPlaySources:ae,resolveFairPlayCertificates:se};var de=function e(t,r){r=r||t&&t.mediainfo||{};return t&&t.hasPlugin&&t.hasPlugin("vr")&&r&&r.projection};var ce=50*1024*1024;var fe=3*1024*1024;var he=.5*1024*1024;var pe={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}}},codecs:{switching:{hevc:{combined:1,hevc:2,avc:3},nohevc:{combined:5,hevc:6,avc:4}},noswitching:{hevc:{combined:3,hevc:5,avc:2},nohevc:{combined:4,hevc:6,avc:1}}}};var ve={1:3,2:3.2,3:4.2,4:5,5:6,6:7,7:8};var me=function e(t,r){return r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&X.isSafariWithFairplaySupport()&&t.eme&&t.eme.options};var ge=function e(t,r){return r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&X.isBrowserWithWidevineSupport()&&t.eme&&t.eme.options};var ye=function e(t,r,i,n){r.priority=9999;if(!r.src){return 9999}if(r.type==="application/vnd.apple.mpegurl"&&r.key_systems&&(r.key_systems["com.apple.fps.1_0"]&&!me(i,r)||r.key_systems["com.widevine.alpha"]&&!ge(i,r))){return 9999}if(r.profiles&&r.profiles.match(/hbbtv/i)){return 9999}if(s["default"].browser.IS_IOS&&r.type==="application/vnd.apple.mpegurl"&&ve[r.ext_x_version]>parseFloat(s["default"].browser.IOS_VERSION)){return 9999}t=t[/^[^:]*/.exec(r.src)];if(!t){return 9999}if(t[r.type]){r.priority=t[r.type]}var a=r.codecs&&r.codecs.indexOf("avc1")!==-1;var o=r.codecs&&r.codecs.indexOf("hvc1")!==-1;var u=a&&o;var l;if(u){l=n.combined}else if(o){l=n.hevc}else{l=n.avc}return r.priority+l};var _e=function e(t,r,i,n,a){var o=be.preferHttps()?pe.https:pe.http;var u;if(de(t,r)){u=ce}else if(s["default"].browser.IS_IOS||s["default"].browser.IS_ANDROID){u=he}else{u=fe}if(be.preferMp4(t,r)){o=o.preferMp4}else if(be.supportsNativeHls()){o=o.nativeHls}else{o=o.noNativeHls}var l=ye(o,n,t,i)-ye(o,a,t,i);var d=n.type==="application/vnd.apple.mpegurl"&&n.codecs&&n.ext_x_version||a.type==="application/vnd.apple.mpegurl"&&a.codecs&&a.ext_x_version;var c=n.codecs&&a.codecs?false:true;if(d&&c){l=n.priority-a.priority}delete n.priority;delete a.priority;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-u)-Math.abs(a.avg_bitrate-u)}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 be(e,t,r){if(r===void 0){r={}}var i=t.sources||[];var n=[];var a=r,u=a.bcovAuthToken,l=a.policyKey,d=a.watermarkingToken,c=a.allowPlayreadyInChromiumEdge;var f=!!u&&l===null;if(u&&!o["default"].isNonEmptyStr(u)){s["default"].log.error("The bcovAuthToken catalog property must be a string");u=null}if(d&&!o["default"].isNonEmptyStr(d)){s["default"].log.error("The watermarking token catalog property must be a string");d=null}for(var h=0;h<i.length;h++){var p=i[h];if(p.key_systems&&p.key_systems["com.microsoft.playready"]&&X.isChromiumEdge()&&(f&&typeof c==="undefined"||c===false)){if(Object.keys(p.key_systems).length>1){delete p.key_systems["com.microsoft.playready"]}else{i.splice(h,1);h--;continue}}if(u&&p.key_systems){p.emeHeaders={"BCOV-Auth":u}}if(d){p.src=p.src.replace("{WMT}",d)}if(p.src&&p.container==="MP4"){p.type="video/mp4"}else if(p.src&&(p.container==="M2TS"||X.isHlsType(p.type))){p.type="application/vnd.apple.mpegurl";if(me(e,p)){p.keySystems=le.getKeySystemOptions(p)}if(X.isEncryptedHls(p)&&u){if(p.vmap&&e.hasPlugin("ssai")){p.bcovAuthToken=u}else{var v=s["default"].parseUrl(p.src);var m="bcov_auth="+u;if(!v.search){m="?"+m}else if(!(v.search[v.search.length-1]==="&")){m="&"+m}p.src+=m}}}n.push(p)}var g=be.supportsSwitchingCodecs(e)?"switching":"noswitching";var y=be.supportsHEVC()?"hevc":"nohevc";var _=pe.codecs[g][y];return n.sort(_e.bind(null,e,t,_))}be.supportsNativeHls=function(){return X.isNativeHlsSupported()};be.preferHttps=function(){return X.preferHttps(e)};be.supportsHEVC=function(){return X.isHEVCSupported()};be.supportsSwitchingCodecs=function(e){return X.isCodecSwitchingSupported(e)};be.preferMp4=function(e,t){return s["default"].browser.IS_ANDROID&&s["default"].browser.ANDROID_VERSION<5||de(e,t)};var Te=function(){function e(){this.defaults_={}}var t=e.prototype;t.normalize=function e(t,r,i){var n=o["default"].assign({},this.defaults_);if(t&&!o["default"].isObj(t)){n.id=t}else{o["default"].assign(n,t);if(o["default"].isObj(t.id)){o["default"].assign(n,t.id);if(!t.id.hasOwnProperty("id")){delete n.id}}}if(typeof r==="string"){n.type=r}if(n.type===c){if(!n.q){n.q=n.id}delete n.id}if(typeof t.deliveryConfigId==="string"){n.deliveryConfigId=t.deliveryConfigId}if(typeof i==="string"){n.adConfigId=i}if((n.type===d||n.type===c)&&n.limit===undefined){n.limit="100"}return n};t.setDefaults=function e(t){if(t===null){this.defaults_={}}else{o["default"].assign(this.defaults_,t)}};t.getDefault=function e(t){return o["default"].isObj(this.defaults_)&&this.defaults_[t]||undefined};t.getDefaults=function e(){return o["default"].isObj(this.defaults_)&&o["default"].assign({},this.defaults_)||{}};return e}();function Se(e,t,r){return r={path:t,exports:{},require:function(e,t){return Ee(e,t===undefined||t===null?r.path:t)}},e(r,r.exports),r.exports}function Ee(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ie=Se(function(e){function t(){e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r){if(Object.prototype.hasOwnProperty.call(r,i)){e[i]=r[i]}}}return e};e.exports["default"]=e.exports,e.exports.__esModule=true;return t.apply(this,arguments)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true});function Ce(e){var t=e.options_.runtime_.settings;var r=t.videoCloud&&t.videoCloud.bumper;var i=false;var n;return{setSource:function t(a,s){var o=e.playlist().length>0;var u=o&&e.playlist.currentItem()>-1?e.playlist()[e.playlist.currentItem()]:e.mediainfo;var l=r&&(r.id===u.id||r.id==="ref:"+u.referenceId);var d=e.bcPlaylistUi&&e.bcPlaylistUi()&&e.bcPlaylistUi().options.autoadvance;var c=u.id;var f=u.manifestExpiresAt;var h=function t(){var r=e.paused();e.catalog.get({id:c,type:"video"}).then(function(t){e.catalog.load(t);if(o){u.manifestExpiresAt=t.manifestExpiresAt;u.sources.forEach(function(e,r){e.src=t.sources[r].src})}e.one("canplay",function(){if(!r){e.play()}})}).catch(function(t){e.log.warn(t)})};if(Date.now()>f){h();return}e.one("play",function(){if(Date.now()>f){h();return}});var p=function t(){e.one("play",function(){return e.trigger("bumper-play")});e.one("ended",function(){e.trigger("bumper-ended");i=true})};var v=function t(){e.one("bumper-ended",function(){e.bigPlayButton.hide();e.posterImage.hide();if(n){n.poster="";e.catalog.load(n);if(!isNaN(d)){e.playlist.autoadvance(d)}}})};if(r){if(l);else{n=o?u:n||e.mediainfo}if(!i&&!l){e.catalog.get({id:r.id,type:"video"}).then(function(t){t.economics="FREE";t.poster=n.poster;t.name=n.name;t.description=n.description;e.catalog.bumper_=Ie(r,{video:t});e.catalog.load(t)})}else if(!i&&l){p();v()}else if(i&&!l){e.on("canplay",function(){e.play();if(o){i=false}})}}s(null,a)}}}var ke={production:"https://edge-gsc.api.brightcove.com",staging:"https://edge-gsc.api.staging.brightcove.com",qa:"https://edge-gsc.api.qa.brightcove.com"};var we={maxRetry:3,intervalRetry:6e4,interval:null};var Ae={MAX_CONCURRENCY:"MAX_CONCURRENCY",TOKEN_REQUIRED:"TOKEN_REQUIRED",INVALID_TOKEN:"INVALID_TOKEN",ACCOUNT_ID:"ACCOUNT_ID",UID:"UID",SESSION_ID:"SESSION_ID",CLIMIT:"CLIMIT",VIDEO_ID:"VIDEO_ID",SESSION_STOPPED:"SESSION_STOPPED",SESSION_EXPIRED:"SESSION_EXPIRED",PLAYBACK_RESTRICTIONS:"PLAYBACK_RESTRICTIONS",TOKEN_VALIDATION:"TOKEN_VALIDATION",SESSION_NOT_FOUND:"SESSION_NOT_FOUND",VIDEO_NOT_FOUND:"VIDEO_NOT_FOUND"};var Pe=function e(t,r){if(!r){r="production"}return ke[r]+"/api/v1/accounts/"+t+"/sessions"};var Oe=function e(t){var r=t.statusCode,i=t.body;var n=null;if(r<400||r>499){return n}var a=i.error;var o=a.sub_code||a.code;switch(o){case Ae.MAX_CONCURRENCY:n={code:"GSC_ERR_DENIED_BY_CONCURRENCY_LIMITING"};s["default"].log.error("GSC heartbeat max concurrency limit.",t);break;case Ae.TOKEN_REQUIRED:n={code:"GSC_TOKEN_REQUIRED"};s["default"].log.error("GSC JWT is required.",t);break;case Ae.INVALID_TOKEN:n={code:"GSC_INVALID_TOKEN"};s["default"].log.error("GSC JWT is required.",t);break;case Ae.ACCOUNT_ID:n={code:"GSC_MISSING_FIELD_ACCOUNT_ID"};s["default"].log.error("GSC AccountID is required.",t);break;case Ae.UID:n={code:"GSC_MISSING_FIELD_UID"};s["default"].log.error("GSC UID is required in JWT.",t);break;case Ae.SESSION_ID:n={code:"GSC_MISSING_FIELD_SESSION_ID"};s["default"].log.error("GSC SID is required in JWT.",t);break;case Ae.CLIMIT:n={code:"GSC_MISSING_FIELD_CLIMIT"};s["default"].log.error("GSC CLIMIT is required in JWT.",t);break;case Ae.VIDEO_ID:n={code:"GSC_MISSING_FIELD_VIDEO_ID"};s["default"].log.error("GSC videoId is required.",t);break;case Ae.SESSION_STOPPED:n={code:"GSC_SESSION_STOPPED"};s["default"].log.error("GSC session stopped.",t);break;case Ae.SESSION_EXPIRED:n={code:"GSC_SESSION_EXPIRED"};s["default"].log.error("GSC session expired.",t);break;case Ae.PLAYBACK_RESTRICTIONS:n={code:"GSC_PLAYBACK_RESTRICTIONS"};s["default"].log.error("GSC playback restrictions not met.",t);break;case Ae.SESSION_NOT_FOUND:n={code:"GSC_SESSION_NOT_FOUND"};s["default"].log.error("GSC session not found.",t);break;case Ae.VIDEO_NOT_FOUND:n={code:"GSC_VIDEO_NOT_FOUND"};s["default"].log.error("GSC video not found",t);break}return n};var xe=function(){function e(e,t){var r=this;if(t===void 0){t={}}this.player=e;this.timerId=null;this.interval=null;this.sid=null;this.retryCount=0;this.options=s["default"].mergeOptions(we,t);this.player.on("ended",function(){return r.stop()});this.player.one("play",function(){return r.init()})}var t=e.prototype;t.init=function e(){this.onTimerTick()};t.onTimerTick=function e(){var t=this;this.send(function(e){var r=e.statusCode,i=e.body;if(r>=500){t.player.log.error("GSC Heartbeat failed to contact server");t.retry();return}if(r===204){t.player.log.warn("Stream Concurrency feature has not been enabled for this account");return}var n=Oe(e);if(n){return t.terminatePlayback(n)}t.interval=i.heartbeat_interval;if(!t.timerId){t.timerId=t.player.setInterval(function(){return t.onTimerTick()},t.interval);t.retryCount=0}t.sid=i.sid})};t.terminatePlayback=function e(t){var r=this;this.player.one("playerreset",function(){return r.player.error(t)});this.player.reset()};t.retry=function e(){var t=this;var r=this.options,i=r.maxRetry,n=r.intervalRetry;if(this.retryCount>=i){this.terminatePlayback({code:"GSC_SESSION_STOPPED"});return}this.clear();this.retryCount++;this.player.setTimeout(function(){return t.onTimerTick()},n)};t.send=function e(t){var r=this;var i=this.player.catalog;var n=i.getCatalogParamDefault_("accountId");var a=i.getCatalogParamDefault_("bcovAuthToken");var o=i.getCatalogParamDefault_("env");var u={Authorization:"Bearer "+a};var l={url:Pe(n,o),method:"POST",json:true,headers:u,body:{video:this.player.mediainfo?this.player.mediainfo.id||"":""}};s["default"].xhr(l,function(e,i){if(e){s["default"].log.error("GSC Heartbeat failed to perform request.",e);r.retry();return}t(i)})};t.clear=function e(){if(!this.timerId){return}this.player.clearInterval(this.timerId);this.timerId=null;this.interval=null;this.sid=null};t.stop=function e(t){var r=this;if(t===void 0){t=null}this.isCasting=t;s["default"].log.debug("GSC: about to stop and clear heartbeat");var i=this.player.catalog;var n=i.getCatalogParamDefault_("accountId");var a=i.getCatalogParamDefault_("bcovAuthToken");var o=i.getCatalogParamDefault_("env");var u=Pe(n,o);var l={Authorization:"Bearer "+a};var d={url:u,method:"DELETE",json:true,headers:l};this.clear();s["default"].xhr(d,function(e,i,n){if(e){s["default"].log.error("GSC failed request for stop session.",e)}var a=Oe(i);if(a){r.player.error(a)}if(!t){r.player.one("play",function(){return r.init()})}})};t.getSessionId=function e(){return this.sid||""};return e}();var De=/([A-Za-z0-9])_([A-Za-z0-9])/g;var Le=function e(t){return t.replace(De,function(e,t,r){return t+r.toUpperCase()})};var Re=function e(t){var r=s["default"].mergeOptions(t);Object.keys(r).filter(function(e){return e.match(De)}).forEach(function(e){r[Le(e)]=r[e]});return r};var Ne=function e(r,i){if(!i){return}r.mediainfo=Re(i);var n=Boolean(r.el().ownerDocument.querySelector(".bc-iframe"));var a=r.mediainfo.name;if(n&&a){t.title=a}};var Me=function e(t,r){if(!r){return}t.playlistinfo=Re(r);delete t.playlistinfo.videos};var Ue=function e(t,r){return(t.type==="application/vnd.apple.mpegurl"||t.type==="application/dash+xml")&&r.toLowerCase()==="html5"};var Be=function e(t,r){if(!r){return t}var i=t;if(r.preferMp4){i=t.filter(function(e){return e.container&&e.container.toLowerCase()==="mp4"});if(Array.isArray(r.preferMp4)){var n=r.preferMp4,a=n[0],s=n[1];i=i.sort(function(e,t){var r=e.hasOwnProperty(a)?e[a]:null;var i=t.hasOwnProperty(a)?t[a]:null;if(r===null||i===null||!o["default"].isNum(r)||!o["default"].isNum(i)){return 0}if(o["default"].isNonEmptyStr(s)&&s.toLowerCase()==="asc"){return r-i}return i-r})}}return i};function Fe(t){var r=this;var i=function e(i){if(i&&i.accountId){r.trigger({type:"usage",name:"catalog-get-account-id"});return i.accountId}if(typeof r.getAccountId==="function"){return r.getAccountId()}return t.accountId||r.options_["data-account"]};var n=new Te;var a={};var u;var h={policyKey:r.options_["data-policy-key"],bcovAuthToken:r.options_["data-bcov-auth-token"],watermarkingToken:r.options_["data-watermarking-token"]};var p=Object.keys(h).reduce(function(e,t){if(h[t]){e[t]=h[t]}return e},{});["adConfigId","allowPlayreadyInChromiumEdge","baseUrl","bcovAuthToken","deliveryConfigId","env","policyKey","sourceSelectionRules","watermarkingToken"].forEach(function(e){if(t.hasOwnProperty(e)){p[e]=t[e]}});var v=null;if(t.streamConcurrency){v=new xe(r,t)}n.setDefaults(p);s["default"].hook("beforeerror",y);_(r);r.on("loadstart",function(){if(!o["default"].isFn(r.playlist)||!r.playlist()||!r.playlist().length){return}Ne(r,r.playlist()[r.playlist.indexOf(r.currentSrc())])});r.on("dispose",function(){return A(r)});var g=function e(t,i){var n=le.getFairPlaySources(t);if(!n.length){i();return}le.resolveFairPlayCertificates(r,n,function(e){if(e){s["default"].log("Unable to resolve FairPlay certificates",e)}i()})};var b=function e(t){if(!r.hasPlugin||!r.hasPlugin("ssai")||!t){return t}return t.map(function(e){if(e.vmap){e.type=s["default"].getPlugin("ssai").MIME_TYPE;e.originalHlsSource=e.src;e.src=e.vmap}return e})};var T=function e(t){if(!t.variants){return t}var r=t.name,i=t.description,n=t.longDescription,a=t.customFields;var o=null;var u={name:r,description:i,longDescription:n,language:o};u.customFields=s["default"].mergeOptions(a);var l=t.variants.map(Re);t.variants=[].concat(l,[u]);return t};var E=function e(t){if(!t){return}if(Array.isArray(t)){u=t.map(function(e){return T(Re(e))})}else{u=T(Re(t))}};var I=function e(t,r){if(!t||!t.variants){return s["default"].mergeOptions(t)}var i;if(r){r=r.toLowerCase()}for(var n=0;n<t.variants.length;n++){if(t.variants[n].language===null){i=t.variants[n]}if(t.variants[n].language&&t.variants[n].language.toLowerCase()===r){i=t.variants[n];break}}return s["default"].mergeOptions(t,i)};var k=function t(i){var n=function t(){var n=false;Ne(r,i);E(i);if(de(r)){var a=r.el().querySelector("video");a.setAttribute("crossorigin","anonymous")}r.el().setAttribute("data-video-id",i.id);if(e.bc&&!e.bc.disposedAfterPreroll_){r.poster(i.poster)}if(i.sources){for(var o=0;o<i.sources.length;o++){if(i.sources[o].vmap!==undefined){n=true;break}}}if(n&&r.onceux!==undefined){r.onceux.loadSourcesFromCatalog(i.sources)}else{if(n){i.sources=b(i.sources)}r.src(i.sources)}P(r,i);if(i.textTracks){var u=new RegExp("^"+e.location.protocol);var l=new RegExp("^https:");var d=null;var c=null;for(var f=0;f<i.textTracks.length;f++){var h=i.textTracks[f];if(h.label==="thumbnails"){if(r.usingPlugin("thumbnails")&&h.width<=480){if(u.test(h.src)){d=h}else if(l.test(h.src)){c=h}}}else{r.addRemoteTextTrack(h)}}var p=d||c;if(p){r.addRemoteTextTrack({src:p.src,label:"thumbnails",kind:"metadata",mode:"hidden"},false)}if(i.textTracks.length>0&&s["default"].browser.IS_ANY_SAFARI||s["default"].browser.IS_IOS){r.crossOrigin("anonymous")}}};g(i.sources,n)};var O=function e(t){var i=function e(){r.on("beforeplaylistitem",function(e,t){return P(r,t)});r.on("playlistchange",function(){return E(r.playlist())});for(var i=0;i<t.length;i++){t[i].sources=b(t[i].sources);var n=t[i].textTracks;if(n&&n.length>0){t[i].textTracks=n.filter(function(e){return e.label!=="thumbnails"})}}var a=t.startingIndex||0;E(t);Ne(r,t[a]);Me(r,r.catalog.data);if(de(r)){var s=r.el().querySelector("video");s.setAttribute("crossorigin","anonymous")}r.playlist(t,a)};var n=t.filter(function(e){return e.sources}).reduce(function(e,t){return e.concat(t.sources)},[]);g(n,i)};var D=function e(i,n){if(n===void 0){n={}}var a;var s=Re(i);if(s.sources){s.rawSources_=s.sources;s.sources=(t.getSources||be)(r,s,n);if(n.sourceSelectionRules){s.sources=Be(s.sources,n.sourceSelectionRules)}a=r.selectSource(s.sources)}if(s.posterSources){s.poster=x(s.posterSources)}if(s.thumbnailSources){s.thumbnail=x(s.thumbnailSources)}if(s.textTracks){var o=a&&Ue(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=x(e.sources)}return e})}if(s.duration){s.duration=s.duration*.001}if(s.cuePoints){for(var u=0;u<s.cuePoints.length;u++){w(s,u)}}if(s.manifestUrlTtl){s.manifestExpiresAt=Date.now()+s.manifestUrlTtl*1e3}return s};r.catalog={transformCatalogError:S,transformVideoResponse:D,mediaCuePointsTrack:function e(){if(!r.catalog.mediaCuePointsTrack.hasWarned_){s["default"].log.warn("player.catalog.mediaCuePointsTrack() is deprecated, please use player.mediaCuePointsTrack() instead!");r.catalog.mediaCuePointsTrack.hasWarned_=true}return r.mediaCuePointsTrack()},get:function e(t,u){t=n.normalize(t);if(r.catalog.tveToken){t.tveToken=r.catalog.tveToken}a=t;r.catalog.loading++;var d;var f=new o["default"].Promise(function(e,n){d=B(r,i(t),t,function(i,a){r.catalog.loading--;if(t.type===c&&a&&(!a.videos||!a.videos.length)){i=new Error("No videos returned from search")}if(i){i.data=a;r.catalog.error=i;return n(i)}if(!a){return e(null)}r.catalog.data=s["default"].mergeOptions({},a);if(t.adConfigId){r.catalog.data.adConfigId=t.adConfigId}var o=["allowPlayreadyInChromiumEdge","bcovAuthToken","policyKey","sourceSelectionRules"].reduce(function(e,r){if(t.hasOwnProperty(r)){e[r]=t[r]}return e},{});if(t.watermarkingToken){o.watermarkingToken=t.watermarkingToken}if(t.type===l){r.catalog.sources=a.sources;r.catalog.poster=a.poster;return e(D(a,o))}var u=a.videos.filter(function(e){return!e.hasOwnProperty("errors")}).map(function(e){return D(e,o)});if(u.length){return e(u)}return n(new Error("No videos returned from playlist"))})});if(!o["default"].isFn(u)){return f}f.then(function(e){u(null,e)}).catch(function(e){u(e,e.data)});return d},getVideo:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(n.normalize(t,l,i),r)},getSequence:function e(t,i,a){var o=this;if(i===void 0){i=function e(){}}if(!Array.isArray(t)){t=[t]}t=t.filter(function(e){if(!/^(search|video|playlist)$/i.test(e.type)){s["default"].log.error("invalid sequence type, please use search, video, or playlist. for:",e);return false}return true});if(!t.length){i(new Error("No valid sequences"),null);return}var u=t.length;var l=new Array(t.length);return t.map(function(e,d){return o.get(n.normalize(e,e.type,a),function(n,a){u--;if(n){s["default"].log.error("failed to request sequence",e);s["default"].log.error("with error",n)}else if(a){if(!Array.isArray(a)){a=[a]}l[d]=a}if(u===0){r.catalog.data=l;var o=l.reduce(function(e,t){return t&&e.concat(t)},[]);if(!o.length){i(new Error("No data was loaded for the sequence "+JSON.stringify(t),null))}else{i(null,o)}}},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(r){return a.getSequence(t.shift(),function(i,n){if((i||!n)&&t&&t.length){return e(r)}r(i,n)},n)};var o=function e(){if(!t.length){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,r,i){if(r===void 0){r=function e(){}}return this.get(n.normalize(t,c,i),r)},getPlaylist:function e(t,r,i){if(r===void 0){r=function e(){}}return this.get(n.normalize(t,d,i),r)},load:function e(t){if(Array.isArray(t)){O(t)}else{k(t)}},autoFindAndLoadMedia:function e(t){var i=m(t,r);if(!i){return}t.playlistVideoId=i.playlistVideoId;var a=C(i.type,r,t);if(i.type===f){this.getLazySequence(i.id,a)}else{this.get(n.normalize(i),a)}return i},setBcovAuthToken:function e(t){if(t!==null&&!o["default"].isNonEmptyStr(t)){s["default"].log.warn("Authorization Token must be a valid string or null");return}n.setDefaults({bcovAuthToken:t})},setPolicyKey:function e(t){if(t!==null&&!o["default"].isNonEmptyStr(t)){s["default"].log.warn("Policy key must be a valid string or null");return}n.setDefaults({policyKey:t})},setWatermarkingToken:function e(t){if(t!==null&&!o["default"].isNonEmptyStr(t)){s["default"].log.warn("Watermarking token must be a valid string or null");return}n.setDefaults({watermarkingToken:t})},getWatermarkingToken:function e(){return n.getDefault("watermarkingToken")},getCatalogParamDefault_:function e(t){if(t==="accountId"){return i()}return n.getDefault(t)},getLastParams:function e(){return s["default"].mergeOptions(a)},getLastData:function e(){return s["default"].mergeOptions(r.catalog.data)},getMetadata:function e(t){var i=t?t:{},n=i.type,a=i.lang;if(!u){s["default"].log.debug("getMetadata() called with no cached metadata");return n===d?[]:{}}var o=r.usingPlugin("playlist")?r.playlist():[];if(n===d&&o.length){return u.map(function(e){return I(e,a)})}if(o.length&&Array.isArray(u)){var l=r.playlist.indexOf(r.currentSrc());if(l===-1){return{}}return I(u[l],a)}return I(u,a)},getHeartbeat:function e(){return v},bumper:function e(){return this.bumper_||null},loading:0}}s["default"].use("*",Ce);s["default"].registerPlugin("catalog",Fe);Fe.VERSION=u;r.applySourceSelectionRules=Be;r.default=Fe;Object.defineProperty(r,"__esModule",{value:true})})})();(function(){if(s.getPlugin("playlist")){return}(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t(require("video.js")):typeof r==="function"&&r.amd?r(["video.js"],t):(e=e||self,e.videojsPlaylist=t(e.videojs))})(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t=function e(t){return typeof t==="number"&&!isNaN(t)&&t>=0&&t<Infinity};var r=function e(t){var r=t.playlist.autoadvance_;if(r.timeout){t.clearTimeout(r.timeout)}if(r.trigger){t.off("ended",r.trigger)}r.timeout=null;r.trigger=null};var i=function e(i,n){r(i);if(!t(n)){i.playlist.autoadvance_.delay=null;return}i.playlist.autoadvance_.delay=n;i.playlist.autoadvance_.trigger=function(){var t=function t(){return e(i,n)};i.one("play",t);i.playlist.autoadvance_.timeout=i.setTimeout(function(){r(i);i.off("play",t);i.playlist.next()},n*1e3)};i.one("ended",i.playlist.autoadvance_.trigger)};var n=function e(t){var r=t.remoteTextTracks();var i=r&&r.length||0;while(i--){t.removeRemoteTextTrack(r[i])}};var a=function e(t,r){var a=!t.paused()||t.ended();t.trigger("beforeplaylistitem",r.originalValue||r);if(r.playlistItemId_){t.playlist.currentPlaylistItemId_=r.playlistItemId_}t.poster(r.poster||"");t.src(r.sources);n(t);t.ready(function(){(r.textTracks||[]).forEach(t.addRemoteTextTrack.bind(t));t.trigger("playlistitem",r.originalValue||r);if(a){var e=t.play();if(typeof e!=="undefined"&&typeof e.then==="function"){e.then(null,function(e){})}}i(t,t.playlist.autoadvance_.delay)});return t};var s=function e(t){return!!t&&typeof t==="object"};var o=function e(t){var r=[];var i;t.forEach(function(e){if(!s(e)){i=Object(e);i.originalValue=e}else{i=e}r.push(i)});return r};var u=function e(t){var r=1;t.forEach(function(e){e.playlistItemId_=r++})};var l=function e(t,r){for(var i=0;i<t.length;i++){if(t[i].playlistItemId_===r){return i}}return-1};var d=function e(t,r){var i=t;var n=r;if(typeof t==="object"){i=t.src}if(typeof r==="object"){n=r.src}if(/^\/\//.test(i)){n=n.slice(n.indexOf("//"))}if(/^\/\//.test(n)){i=i.slice(i.indexOf("//"))}return i===n};var c=function e(t,r){for(var i=0;i<t.length;i++){var n=t[i].sources;if(Array.isArray(n)){for(var a=0;a<n.length;a++){var s=n[a];if(s&&d(s,r)){return i}}}}return-1};var f=function e(t){var r=-1;var i=t.length-1;while(++r<t.length){var n=r+Math.floor(Math.random()*(i-r+1));var a=t[n];t[n]=t[r];t[r]=a}return t};function h(t,n,d){if(d===void 0){d=0}var h=null;var p=false;var v=t.playlist=function(e,r){if(r===void 0){r=0}if(p){throw new Error("do not call playlist() during a playlist change")}if(Array.isArray(e)){var i=Array.isArray(h)?h.slice():null;var n=e.slice();h=n.slice();if(h.filter(function(e){return s(e)}).length!==h.length){h=o(h)}u(h);p=true;t.trigger({type:"duringplaylistchange",nextIndex:r,nextPlaylist:n,previousIndex:v.currentIndex_,previousPlaylist:i||[]});p=false;if(r!==-1){v.currentItem(r)}if(i){t.setTimeout(function(){t.trigger("playlistchange")},0)}}return h.map(function(e){return e.originalValue||e}).slice()};t.on("loadstart",function(){if(v.currentItem()===-1){r(t)}});v.currentIndex_=-1;v.player_=t;v.autoadvance_={};v.repeat_=false;v.currentPlaylistItemId_=null;v.currentItem=function(e){if(p){return v.currentIndex_}if(typeof e==="number"&&v.currentIndex_!==e&&e>=0&&e<h.length){v.currentIndex_=e;a(v.player_,h[v.currentIndex_]);return v.currentIndex_}var t=v.player_.currentSrc()||"";if(v.currentPlaylistItemId_){var r=l(h,v.currentPlaylistItemId_);var i=h[r];if(i&&Array.isArray(i.sources)&&c([i],t)>-1){v.currentIndex_=r;return v.currentIndex_}v.currentPlaylistItemId_=null}v.currentIndex_=v.indexOf(t);return v.currentIndex_};v.contains=function(e){return v.indexOf(e)!==-1};v.indexOf=function(e){if(typeof e==="string"){return c(h,e)}var t=Array.isArray(e)?e:e.sources;for(var r=0;r<t.length;r++){var i=t[r];if(typeof i==="string"){return c(h,i)}else if(i.src){return c(h,i.src)}}return-1};v.currentIndex=function(){return v.currentItem()};v.lastIndex=function(){return h.length-1};v.nextIndex=function(){var e=v.currentItem();if(e===-1){return-1}var t=v.lastIndex();if(v.repeat_&&e===t){return 0}return Math.min(e+1,t)};v.previousIndex=function(){var e=v.currentItem();if(e===-1){return-1}if(v.repeat_&&e===0){return v.lastIndex()}return Math.max(e-1,0)};v.first=function(){if(p){return}var e=v.currentItem(0);if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.last=function(){if(p){return}var e=v.currentItem(v.lastIndex());if(h.length){return h[e].originalValue||h[e]}v.currentIndex_=-1};v.next=function(){if(p){return}var e=v.nextIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.previous=function(){if(p){return}var e=v.previousIndex();if(e!==v.currentIndex_){var t=v.currentItem(e);return h[t].originalValue||h[t]}};v.autoadvance=function(e){i(v.player_,e)};v.repeat=function(t){if(t===undefined){return v.repeat_}if(typeof t!=="boolean"){e.log.error("videojs-playlist: Invalid value for repeat",t);return}v.repeat_=!!t;return v.repeat_};v.sort=function(e){if(!h.length){return}h.sort(e);if(p){return}t.trigger("playlistsorted")};v.reverse=function(){if(!h.length){return}h.reverse();if(p){return}t.trigger("playlistsorted")};v.shuffle=function(e){var r=e===void 0?{}:e,i=r.rest;var n=0;var a=h;if(i){n=v.currentIndex_+1;a=h.slice(n)}if(a.length<=1){return}f(a);if(i){var s;(s=h).splice.apply(s,[n,a.length].concat(a))}if(p){return}t.trigger("playlistsorted")};if(Array.isArray(n)){v(n.slice(),d)}else{h=[]}return v}var p="4.3.1";var v=e.registerPlugin||e.plugin;var m=function e(t,r){h(this,t,r)};v("playlist",m);m.VERSION=p;return m})})();var u=o.createInitializer(null,function(e,t,r){var i;var n=parseInt(null,10);var a=false;r.playlist();if(n===n&&isFinite(n)&&n>=0){r.playlist.autoadvance(n)}});a.restoreFirstVideojs();return u}(window,document);e(document.querySelector("video-js"))})();;</script> <script>(function(p){p.mark&&p.mark('bcParseEnd');p.measure&&p.measure('bcParse','bcParseStart','bcParseEnd')})(window.performance||{})</script> </body></html>