/*! @name videojs-playlist-ui @version 3.5.2 @license Apache-2.0 */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("global/document"),require("video.js")):"function"==typeof define&&define.amd?define(["global/document","video.js"],e):t.videojsPlaylistUi=e(t.document,t.videojs)}(this,function(t,e){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}t=t&&t.hasOwnProperty("default")?t.default:t;var l,s=(e=e&&e.hasOwnProperty("default")?e.default:e).dom||e,a=e.registerPlugin||e.plugin,n={className:"vjs-playlist",playOnSelect:!1,supportsCssPointerEvents:((l=t.createElement("x")).style.cssText="pointer-events:auto","auto"===l.style.pointerEvents)},r=function(t){t.addClass("vjs-selected")},o=function(t){t.removeClass("vjs-selected"),t.thumbnail&&s.removeClass(t.thumbnail,"vjs-playlist-now-playing")},p=function(t){t.removeClass("vjs-up-next")},d=e.getComponent("Component"),c=function(l){function s(t,e,i){var s;if(!e.item)throw new Error("Cannot construct a PlaylistMenuItem without an item option");return(s=l.call(this,t,e)||this).item=e.item,s.playOnSelect=i.playOnSelect,s.emitTapEvents(),s.on(["click","tap"],s.switchPlaylistItem_),s.on("keydown",s.handleKeyDown_),s}i(s,l);var a=s.prototype;return a.handleKeyDown_=function(t){13!==t.which&&32!==t.which||this.switchPlaylistItem_()},a.switchPlaylistItem_=function(t){this.player_.playlist.currentItem(function(t,e){for(var i=0,l=t.length;i=0){r(this.items[o]);var p=this.items[o].$(".vjs-playlist-thumbnail");p&&s.addClass(p,"vjs-playlist-now-playing")}},n.update=function(){var e=this.player_.playlist();if(this.items.length===e.length){for(var i=0;i