!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.videojs = e() }(this, function () { function t(t, e) { return e = { exports: {} }, t(e, e.exports), e.exports } function e(t, e) { Ve(t).forEach(function (n) { return e(t[n], n) }) } function n(t, e) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0; return Ve(t).reduce(function (n, r) { return e(n, t[r], r) }, n) } function r(t) { for (var n = arguments.length, r = Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)r[i - 1] = arguments[i]; return Object.assign ? Object.assign.apply(Object, [t].concat(r)) : (r.forEach(function (n) { n && e(n, function (e, n) { t[n] = e }) }), t) } function i(t) { return !!t && "object" === (void 0 === t ? "undefined" : Ie(t)) } function o(t) { return i(t) && "[object Object]" === Fe.call(t) && t.constructor === Object } function s(t) { return t.replace(/\n\r?\s*/g, "") } function a(t, e) { if (!t || !e) return ""; if ("function" == typeof oe.getComputedStyle) { var n = oe.getComputedStyle(t); return n ? n[e] : "" } return t.currentStyle[e] || "" } function l(t) { return "string" == typeof t && /\S/.test(t) } function c(t) { if (/\s/.test(t)) throw new Error("class has illegal whitespace characters") } function u(t) { return new RegExp("(^|\\s)" + t + "($|\\s)") } function h() { return ue === oe.document && void 0 !== ue.createElement } function p(t) { return i(t) && 1 === t.nodeType } function d() { try { return oe.parent !== oe.self } catch (t) { return !0 } } function f(t) { return function (e, n) { if (!l(e)) return ue[t](null); l(n) && (n = ue.querySelector(n)); var r = p(n) ? n : ue; return r[t] && r[t](e) } } function v() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div", e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = arguments[3], i = ue.createElement(t); return Object.getOwnPropertyNames(e).forEach(function (t) { var n = e[t]; -1 !== t.indexOf("aria-") || "role" === t || "type" === t ? (Xe.warn(qe(Ke, t, n)), i.setAttribute(t, n)) : "textContent" === t ? y(i, n) : i[t] = n }), Object.getOwnPropertyNames(n).forEach(function (t) { i.setAttribute(t, n[t]) }), r && D(i, r), i } function y(t, e) { return void 0 === t.textContent ? t.innerText = e : t.textContent = e, t } function g(t, e) { e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t) } function m(t, e) { return c(e), t.classList ? t.classList.contains(e) : u(e).test(t.className) } function _(t, e) { return t.classList ? t.classList.add(e) : m(t, e) || (t.className = (t.className + " " + e).trim()), t } function b(t, e) { return t.classList ? t.classList.remove(e) : (c(e), t.className = t.className.split(/\s+/).filter(function (t) { return t !== e }).join(" ")), t } function T(t, e, n) { var r = m(t, e); if ("function" == typeof n && (n = n(t, e)), "boolean" != typeof n && (n = !r), n !== r) return n ? _(t, e) : b(t, e), t } function C(t, e) { Object.getOwnPropertyNames(e).forEach(function (n) { var r = e[n]; null === r || void 0 === r || !1 === r ? t.removeAttribute(n) : t.setAttribute(n, !0 === r ? "" : r) }) } function k(t) { var e = {}; if (t && t.attributes && t.attributes.length > 0) for (var n = t.attributes, r = n.length - 1; r >= 0; r--) { var i = n[r].name, o = n[r].value; "boolean" != typeof t[i] && -1 === ",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf("," + i + ",") || (o = null !== o), e[i] = o } return e } function w(t, e) { return t.getAttribute(e) } function E(t, e, n) { t.setAttribute(e, n) } function S(t, e) { t.removeAttribute(e) } function x() { ue.body.focus(), ue.onselectstart = function () { return !1 } } function j() { ue.onselectstart = function () { return !0 } } function A(t) { if (t && t.getBoundingClientRect && t.parentNode) { var e = t.getBoundingClientRect(), n = {}; return ["bottom", "height", "left", "right", "top", "width"].forEach(function (t) { void 0 !== e[t] && (n[t] = e[t]) }), n.height || (n.height = parseFloat(a(t, "height"))), n.width || (n.width = parseFloat(a(t, "width"))), n } } function P(t) { var e = void 0; if (t.getBoundingClientRect && t.parentNode && (e = t.getBoundingClientRect()), !e) return { left: 0, top: 0 }; var n = ue.documentElement, r = ue.body, i = n.clientLeft || r.clientLeft || 0, o = oe.pageXOffset || r.scrollLeft, s = e.left + o - i, a = n.clientTop || r.clientTop || 0, l = oe.pageYOffset || r.scrollTop, c = e.top + l - a; return { left: Math.round(s), top: Math.round(c) } } function N(t, e) { var n = {}, r = P(t), i = t.offsetWidth, o = t.offsetHeight, s = r.top, a = r.left, l = e.pageY, c = e.pageX; return e.changedTouches && (c = e.changedTouches[0].pageX, l = e.changedTouches[0].pageY), n.y = Math.max(0, Math.min(1, (s - l + o) / o)), n.x = Math.max(0, Math.min(1, (c - a) / i)), n } function O(t) { return i(t) && 3 === t.nodeType } function M(t) { for (; t.firstChild;)t.removeChild(t.firstChild); return t } function I(t) { return "function" == typeof t && (t = t()), (Array.isArray(t) ? t : [t]).map(function (t) { return "function" == typeof t && (t = t()), p(t) || O(t) ? t : "string" == typeof t && /\S/.test(t) ? ue.createTextNode(t) : void 0 }).filter(function (t) { return t }) } function D(t, e) { return I(e).forEach(function (e) { return t.appendChild(e) }), t } function L(t, e) { return D(M(t), e) } function R() { return Je++ } function B(t) { var e = t[Ze]; return e || (e = t[Ze] = R()), Qe[e] || (Qe[e] = {}), Qe[e] } function F(t) { var e = t[Ze]; return !!e && !!Object.getOwnPropertyNames(Qe[e]).length } function V(t) { var e = t[Ze]; if (e) { delete Qe[e]; try { delete t[Ze] } catch (e) { t.removeAttribute ? t.removeAttribute(Ze) : t[Ze] = null } } } function H(t, e) { var n = B(t); 0 === n.handlers[e].length && (delete n.handlers[e], t.removeEventListener ? t.removeEventListener(e, n.dispatcher, !1) : t.detachEvent && t.detachEvent("on" + e, n.dispatcher)), Object.getOwnPropertyNames(n.handlers).length <= 0 && (delete n.handlers, delete n.dispatcher, delete n.disabled), 0 === Object.getOwnPropertyNames(n).length && V(t) } function W(t, e, n, r) { n.forEach(function (n) { t(e, n, r) }) } function U(t) { function e() { return !0 } function n() { return !1 } if (!t || !t.isPropagationStopped) { var r = t || oe.event; t = {}; for (var i in r) "layerX" !== i && "layerY" !== i && "keyLocation" !== i && "webkitMovementX" !== i && "webkitMovementY" !== i && ("returnValue" === i && r.preventDefault || (t[i] = r[i])); if (t.target || (t.target = t.srcElement || ue), t.relatedTarget || (t.relatedTarget = t.fromElement === t.target ? t.toElement : t.fromElement), t.preventDefault = function () { r.preventDefault && r.preventDefault(), t.returnValue = !1, r.returnValue = !1, t.defaultPrevented = !0 }, t.defaultPrevented = !1, t.stopPropagation = function () { r.stopPropagation && r.stopPropagation(), t.cancelBubble = !0, r.cancelBubble = !0, t.isPropagationStopped = e }, t.isPropagationStopped = n, t.stopImmediatePropagation = function () { r.stopImmediatePropagation && r.stopImmediatePropagation(), t.isImmediatePropagationStopped = e, t.stopPropagation() }, t.isImmediatePropagationStopped = n, null !== t.clientX && void 0 !== t.clientX) { var o = ue.documentElement, s = ue.body; t.pageX = t.clientX + (o && o.scrollLeft || s && s.scrollLeft || 0) - (o && o.clientLeft || s && s.clientLeft || 0), t.pageY = t.clientY + (o && o.scrollTop || s && s.scrollTop || 0) - (o && o.clientTop || s && s.clientTop || 0) } t.which = t.charCode || t.keyCode, null !== t.button && void 0 !== t.button && (t.button = 1 & t.button ? 0 : 4 & t.button ? 1 : 2 & t.button ? 2 : 0) } return t } function z(t, e, n) { if (Array.isArray(e)) return W(z, t, e, n); var r = B(t); if (r.handlers || (r.handlers = {}), r.handlers[e] || (r.handlers[e] = []), n.guid || (n.guid = R()), r.handlers[e].push(n), r.dispatcher || (r.disabled = !1, r.dispatcher = function (e, n) { if (!r.disabled) { e = U(e); var i = r.handlers[e.type]; if (i) for (var o = i.slice(0), s = 0, a = o.length; s < a && !e.isImmediatePropagationStopped(); s++)try { o[s].call(t, e, n) } catch (t) { Xe.error(t) } } }), 1 === r.handlers[e].length) if (t.addEventListener) { var i = !1; tn && en.indexOf(e) > -1 && (i = { passive: !0 }), t.addEventListener(e, r.dispatcher, i) } else t.attachEvent && t.attachEvent("on" + e, r.dispatcher) } function X(t, e, n) { if (F(t)) { var r = B(t); if (r.handlers) { if (Array.isArray(e)) return W(X, t, e, n); var i = function (e) { r.handlers[e] = [], H(t, e) }; if (e) { var o = r.handlers[e]; if (o) { if (!n) return void i(e); if (n.guid) for (var s = 0; s < o.length; s++)o[s].guid === n.guid && o.splice(s--, 1); H(t, e) } } else for (var a in r.handlers) i(a) } } } function q(t, e, n) { var r = F(t) ? B(t) : {}, i = t.parentNode || t.ownerDocument; if ("string" == typeof e && (e = { type: e, target: t }), e = U(e), r.dispatcher && r.dispatcher.call(t, e, n), i && !e.isPropagationStopped() && !0 === e.bubbles) q.call(null, i, e, n); else if (!i && !e.defaultPrevented) { var o = B(e.target); e.target[e.type] && (o.disabled = !0, "function" == typeof e.target[e.type] && e.target[e.type](), o.disabled = !1) } return !e.defaultPrevented } function K(t, e, n) { if (Array.isArray(e)) return W(K, t, e, n); var r = function r() { X(t, e, r), n.apply(this, arguments) }; r.guid = n.guid = n.guid || R(), z(t, e, r) } function Y(t, e) { e && (on = e), oe.setTimeout(sn, t) } function G(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = e.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_ = v("span", { className: "vjs-event-bus" }); return r(t, _n), t.on("dispose", function () { return t.off() }), t } function $(t, e) { return r(t, bn), t.state = r({}, t.state, e), "function" == typeof t.handleStateChanged && pn(t) && t.on("statechanged", t.handleStateChanged), t } function J(t) { return "string" != typeof t ? t : t.charAt(0).toUpperCase() + t.slice(1) } function Q(t, e) { return J(t) === J(e) } function Z() { for (var t = {}, n = arguments.length, r = Array(n), i = 0; i < n; i++)r[i] = arguments[i]; return r.forEach(function (n) { n && e(n, function (e, n) { if (!o(e)) return void (t[n] = e); o(t[n]) || (t[n] = {}), t[n] = Z(t[n], e) }) }), t } function tt(t, e, n) { if ("number" != typeof e || e < 0 || e > n) throw new Error("Failed to execute '" + t + "' on 'TimeRanges': The index provided (" + e + ") is non-numeric or out of bounds (0-" + n + ").") } function et(t, e, n, r) { return tt(t, r, n.length - 1), n[r][e] } function nt(t) { return void 0 === t || 0 === t.length ? { length: 0, start: function () { throw new Error("This TimeRanges object is empty") }, end: function () { throw new Error("This TimeRanges object is empty") } } : { length: t.length, start: et.bind(null, "start", 0, t), end: et.bind(null, "end", 1, t) } } function rt(t, e) { return Array.isArray(t) ? nt(t) : void 0 === t || void 0 === e ? nt() : nt([[t, e]]) } function it(t, e) { var n = 0, r = void 0, i = void 0; if (!e) return 0; t && t.length || (t = rt(0, 0)); for (var o = 0; o < t.length; o++)r = t.start(o), i = t.end(o), i > e && (i = e), n += i - r; return n / e } function ot(t) { if (t instanceof ot) return t; "number" == typeof t ? this.code = t : "string" == typeof t ? this.message = t : i(t) && ("number" == typeof t.code && (this.code = t.code), r(this, t)), this.message || (this.message = ot.defaultMessages[this.code] || "") } function st(t, e) { var n, r = null; try { n = JSON.parse(t, e) } catch (t) { r = t } return [r, n] } function at(t) { var e = nr.call(t); return "[object Function]" === e || "function" == typeof t && "[object RegExp]" !== e || "undefined" != typeof window && (t === window.setTimeout || t === window.alert || t === window.confirm || t === window.prompt) } function lt(t, e, n) { if (!er(e)) throw new TypeError("iterator must be a function"); arguments.length < 3 && (n = this), "[object Array]" === or.call(t) ? ct(t, e, n) : "string" == typeof t ? ut(t, e, n) : ht(t, e, n) } function ct(t, e, n) { for (var r = 0, i = t.length; r < i; r++)sr.call(t, r) && e.call(n, t[r], r, t) } function ut(t, e, n) { for (var r = 0, i = t.length; r < i; r++)e.call(n, t.charAt(r), r, t) } function ht(t, e, n) { for (var r in t) sr.call(t, r) && e.call(n, t[r], r, t) } function pt() { for (var t = {}, e = 0; e < arguments.length; e++) { var n = arguments[e]; for (var r in n) ur.call(n, r) && (t[r] = n[r]) } return t } function dt(t) { for (var e in t) if (t.hasOwnProperty(e)) return !1; return !0 } function ft(t, e, n) { var r = t; return er(e) ? (n = e, "string" == typeof t && (r = { uri: t })) : r = cr(e, { uri: t }), r.callback = n, r } function vt(t, e, n) { return e = ft(t, e, n), yt(e) } function yt(t) { function e() { 4 === a.readyState && setTimeout(i, 0) } function n() { var t = void 0; if (t = a.response ? a.response : a.responseText || gt(a), y) try { t = JSON.parse(t) } catch (t) { } return t } function r(t) { return clearTimeout(u), t instanceof Error || (t = new Error("" + (t || "Unknown XMLHttpRequest Error"))), t.statusCode = 0, s(t, g) } function i() { if (!c) { var e; clearTimeout(u), e = t.useXDR && void 0 === a.status ? 200 : 1223 === a.status ? 204 : a.status; var r = g, i = null; return 0 !== e ? (r = { body: n(), statusCode: e, method: p, headers: {}, url: h, rawRequest: a }, a.getAllResponseHeaders && (r.headers = lr(a.getAllResponseHeaders()))) : i = new Error("Internal XMLHttpRequest Error"), s(i, r, r.body) } } if (void 0 === t.callback) throw new Error("callback argument missing"); var o = !1, s = function (e, n, r) { o || (o = !0, t.callback(e, n, r)) }, a = t.xhr || null; a || (a = t.cors || t.useXDR ? new vt.XDomainRequest : new vt.XMLHttpRequest); var l, c, u, h = a.url = t.uri || t.url, p = a.method = t.method || "GET", d = t.body || t.data, f = a.headers = t.headers || {}, v = !!t.sync, y = !1, g = { body: void 0, headers: {}, statusCode: 0, method: p, url: h, rawRequest: a }; if ("json" in t && !1 !== t.json && (y = !0, f.accept || f.Accept || (f.Accept = "application/json"), "GET" !== p && "HEAD" !== p && (f["content-type"] || f["Content-Type"] || (f["Content-Type"] = "application/json"), d = JSON.stringify(!0 === t.json ? d : t.json))), a.onreadystatechange = e, a.onload = i, a.onerror = r, a.onprogress = function () { }, a.onabort = function () { c = !0 }, a.ontimeout = r, a.open(p, h, !v, t.username, t.password), v || (a.withCredentials = !!t.withCredentials), !v && t.timeout > 0 && (u = setTimeout(function () { if (!c) { c = !0, a.abort("timeout"); var t = new Error("XMLHttpRequest timeout"); t.code = "ETIMEDOUT", r(t) } }, t.timeout)), a.setRequestHeader) for (l in f) f.hasOwnProperty(l) && a.setRequestHeader(l, f[l]); else if (t.headers && !dt(t.headers)) throw new Error("Headers cannot be set on an XDomainRequest object"); return "responseType" in t && (a.responseType = t.responseType), "beforeSend" in t && "function" == typeof t.beforeSend && t.beforeSend(a), a.send(d || null), a } function gt(t) { if ("document" === t.responseType) return t.responseXML; var e = t.responseXML && "parsererror" === t.responseXML.documentElement.nodeName; return "" !== t.responseType || e ? null : t.responseXML } function mt() { } function _t(t, e) { this.name = "ParsingError", this.code = t.code, this.message = e || t.message } function bt(t) { function e(t, e, n, r) { return 3600 * (0 | t) + 60 * (0 | e) + (0 | n) + (0 | r) / 1e3 } var n = t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/); return n ? n[3] ? e(n[1], n[2], n[3].replace(":", ""), n[4]) : n[1] > 59 ? e(n[1], n[2], 0, n[4]) : e(0, n[1], n[2], n[4]) : null } function Tt() { this.values = kr(null) } function Ct(t, e, n, r) { var i = r ? t.split(r) : [t]; for (var o in i) if ("string" == typeof i[o]) { var s = i[o].split(n); if (2 === s.length) { var a = s[0], l = s[1]; e(a, l) } } } function kt(t, e, n) { function r() { var e = bt(t); if (null === e) throw new _t(_t.Errors.BadTimeStamp, "Malformed timestamp: " + o); return t = t.replace(/^[^\sa-zA-Z-]+/, ""), e } function i() { t = t.replace(/^\s+/, "") } var o = t; if (i(), e.startTime = r(), i(), "--\x3e" !== t.substr(0, 3)) throw new _t(_t.Errors.BadTimeStamp, "Malformed time stamp (time stamps must be separated by '--\x3e'): " + o); t = t.substr(3), i(), e.endTime = r(), i(), function (t, e) { var r = new Tt; Ct(t, function (t, e) { switch (t) { case "region": for (var i = n.length - 1; i >= 0; i--)if (n[i].id === e) { r.set(t, n[i].region); break } break; case "vertical": r.alt(t, e, ["rl", "lr"]); break; case "line": var o = e.split(","), s = o[0]; r.integer(t, s), r.percent(t, s) && r.set("snapToLines", !1), r.alt(t, s, ["auto"]), 2 === o.length && r.alt("lineAlign", o[1], ["start", "middle", "end"]); break; case "position": o = e.split(","), r.percent(t, o[0]), 2 === o.length && r.alt("positionAlign", o[1], ["start", "middle", "end"]); break; case "size": r.percent(t, e); break; case "align": r.alt(t, e, ["start", "middle", "end", "left", "right"]) } }, /:/, /\s/), e.region = r.get("region", null), e.vertical = r.get("vertical", ""), e.line = r.get("line", "auto"), e.lineAlign = r.get("lineAlign", "start"), e.snapToLines = r.get("snapToLines", !0), e.size = r.get("size", 100), e.align = r.get("align", "middle"), e.position = r.get("position", { start: 0, left: 0, middle: 50, end: 100, right: 100 }, e.align), e.positionAlign = r.get("positionAlign", { start: "start", left: "start", middle: "middle", end: "end", right: "end" }, e.align) }(t, e) } function wt(t, e) { function n(t) { return wr[t] } for (var r, i = t.document.createElement("div"), o = i, s = []; null !== (r = function () { if (!e) return null; var t = e.match(/^([^<]*)(<[^>]+>?)?/); return function (t) { return e = e.substr(t.length), t }(t[1] ? t[1] : t[2]) }());)if ("<" !== r[0]) o.appendChild(t.document.createTextNode(function (t) { for (; c = t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t = t.replace(c[0], n); return t }(r))); else { if ("/" === r[1]) { s.length && s[s.length - 1] === r.substr(2).replace(">", "") && (s.pop(), o = o.parentNode); continue } var a, l = bt(r.substr(1, r.length - 2)); if (l) { a = t.document.createProcessingInstruction("timestamp", l), o.appendChild(a); continue } var c = r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/); if (!c) continue; if (!(a = function (e, n) { var r = Er[e]; if (!r) return null; var i = t.document.createElement(r); i.localName = r; var o = Sr[e]; return o && n && (i[o] = n.trim()), i }(c[1], c[3]))) continue; if (!function (t, e) { return !xr[e.localName] || xr[e.localName] === t.localName }(o, a)) continue; c[2] && (a.className = c[2].substr(1).replace(".", " ")), s.push(c[1]), o.appendChild(a), o = a } return i } function Et(t) { for (var e = 0; e < jr.length; e++) { var n = jr[e]; if (t >= n[0] && t <= n[1]) return !0 } return !1 } function St(t) { function e(t, e) { for (var n = e.childNodes.length - 1; n >= 0; n--)t.push(e.childNodes[n]) } function n(t) { if (!t || !t.length) return null; var r = t.pop(), i = r.textContent || r.innerText; if (i) { var o = i.match(/^.*(\n|\r)/); return o ? (t.length = 0, o[0]) : i } return "ruby" === r.tagName ? n(t) : r.childNodes ? (e(t, r), n(t)) : void 0 } var r, i = [], o = ""; if (!t || !t.childNodes) return "ltr"; for (e(i, t); o = n(i);)for (var s = 0; s < o.length; s++)if (r = o.charCodeAt(s), Et(r)) return "rtl"; return "ltr" } function xt(t) { if ("number" == typeof t.line && (t.snapToLines || t.line >= 0 && t.line <= 100)) return t.line; if (!t.track || !t.track.textTrackList || !t.track.textTrackList.mediaElement) return -1; for (var e = t.track, n = e.textTrackList, r = 0, i = 0; i < n.length && n[i] !== e; i++)"showing" === n[i].mode && r++; return -1 * ++r } function jt() { } function At(t, e, n) { var r = /MSIE\s8\.0/.test(navigator.userAgent), i = "rgba(255, 255, 255, 1)", o = "rgba(0, 0, 0, 0.8)"; r && (i = "rgb(255, 255, 255)", o = "rgb(0, 0, 0)"), jt.call(this), this.cue = e, this.cueDiv = wt(t, e.text); var s = { color: i, backgroundColor: o, position: "relative", left: 0, right: 0, top: 0, bottom: 0, display: "inline" }; r || (s.writingMode = "" === e.vertical ? "horizontal-tb" : "lr" === e.vertical ? "vertical-lr" : "vertical-rl", s.unicodeBidi = "plaintext"), this.applyStyles(s, this.cueDiv), this.div = t.document.createElement("div"), s = { textAlign: "middle" === e.align ? "center" : e.align, font: n.font, whiteSpace: "pre-line", position: "absolute" }, r || (s.direction = St(this.cueDiv), s.writingMode = "" === e.vertical ? "horizontal-tb" : "lr" === e.vertical ? "vertical-lr" : "vertical-rl".stylesunicodeBidi = "plaintext"), this.applyStyles(s), this.div.appendChild(this.cueDiv); var a = 0; switch (e.positionAlign) { case "start": a = e.position; break; case "middle": a = e.position - e.size / 2; break; case "end": a = e.position - e.size }"" === e.vertical ? this.applyStyles({ left: this.formatStyle(a, "%"), width: this.formatStyle(e.size, "%") }) : this.applyStyles({ top: this.formatStyle(a, "%"), height: this.formatStyle(e.size, "%") }), this.move = function (t) { this.applyStyles({ top: this.formatStyle(t.top, "px"), bottom: this.formatStyle(t.bottom, "px"), left: this.formatStyle(t.left, "px"), right: this.formatStyle(t.right, "px"), height: this.formatStyle(t.height, "px"), width: this.formatStyle(t.width, "px") }) } } function Pt(t) { var e, n, r, i, o = /MSIE\s8\.0/.test(navigator.userAgent); if (t.div) { n = t.div.offsetHeight, r = t.div.offsetWidth, i = t.div.offsetTop; var s = (s = t.div.childNodes) && (s = s[0]) && s.getClientRects && s.getClientRects(); t = t.div.getBoundingClientRect(), e = s ? Math.max(s[0] && s[0].height || 0, t.height / s.length) : 0 } this.left = t.left, this.right = t.right, this.top = t.top || i, this.height = t.height || n, this.bottom = t.bottom || i + (t.height || n), this.width = t.width || r, this.lineHeight = void 0 !== e ? e : t.lineHeight, o && !this.lineHeight && (this.lineHeight = 13) } function Nt(t, e, n, r) { var i = new Pt(e), o = e.cue, s = xt(o), a = []; if (o.snapToLines) { var l; switch (o.vertical) { case "": a = ["+y", "-y"], l = "height"; break; case "rl": a = ["+x", "-x"], l = "width"; break; case "lr": a = ["-x", "+x"], l = "width" }var c = i.lineHeight, u = c * Math.round(s), h = n[l] + c, p = a[0]; Math.abs(u) > h && (u = u < 0 ? -1 : 1, u *= Math.ceil(h / c) * c), s < 0 && (u += "" === o.vertical ? n.height : n.width, a = a.reverse()), i.move(p, u) } else { var d = i.lineHeight / n.height * 100; switch (o.lineAlign) { case "middle": s -= d / 2; break; case "end": s -= d }switch (o.vertical) { case "": e.applyStyles({ top: e.formatStyle(s, "%") }); break; case "rl": e.applyStyles({ left: e.formatStyle(s, "%") }); break; case "lr": e.applyStyles({ right: e.formatStyle(s, "%") }) }a = ["+y", "-x", "+x", "-y"], i = new Pt(e) } var f = function (t, e) { for (var i, o = new Pt(t), s = 1, a = 0; a < e.length; a++) { for (; t.overlapsOppositeAxis(n, e[a]) || t.within(n) && t.overlapsAny(r);)t.move(e[a]); if (t.within(n)) return t; var l = t.intersectPercentage(n); s > l && (i = new Pt(t), s = l), t = new Pt(o) } return i || o }(i, a); e.move(f.toCSSCompatValues(n)) } function Ot() { } function Mt(t) { return "string" == typeof t && (!!Nr[t.toLowerCase()] && t.toLowerCase()) } function It(t) { return "string" == typeof t && (!!Or[t.toLowerCase()] && t.toLowerCase()) } function Dt(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var r in n) t[r] = n[r] } return t } function Lt(t, e, n) { var r = this, i = /MSIE\s8\.0/.test(navigator.userAgent), o = {}; i ? r = document.createElement("custom") : o.enumerable = !0, r.hasBeenReset = !1; var s = "", a = !1, l = t, c = e, u = n, h = null, p = "", d = !0, f = "auto", v = "start", y = 50, g = "middle", m = 50, _ = "middle"; if (Object.defineProperty(r, "id", Dt({}, o, { get: function () { return s }, set: function (t) { s = "" + t } })), Object.defineProperty(r, "pauseOnExit", Dt({}, o, { get: function () { return a }, set: function (t) { a = !!t } })), Object.defineProperty(r, "startTime", Dt({}, o, { get: function () { return l }, set: function (t) { if ("number" != typeof t) throw new TypeError("Start time must be set to a number."); l = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "endTime", Dt({}, o, { get: function () { return c }, set: function (t) { if ("number" != typeof t) throw new TypeError("End time must be set to a number."); c = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "text", Dt({}, o, { get: function () { return u }, set: function (t) { u = "" + t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "region", Dt({}, o, { get: function () { return h }, set: function (t) { h = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "vertical", Dt({}, o, { get: function () { return p }, set: function (t) { var e = Mt(t); if (!1 === e) throw new SyntaxError("An invalid or illegal string was specified."); p = e, this.hasBeenReset = !0 } })), Object.defineProperty(r, "snapToLines", Dt({}, o, { get: function () { return d }, set: function (t) { d = !!t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "line", Dt({}, o, { get: function () { return f }, set: function (t) { if ("number" != typeof t && t !== Pr) throw new SyntaxError("An invalid number or illegal string was specified."); f = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "lineAlign", Dt({}, o, { get: function () { return v }, set: function (t) { var e = It(t); if (!e) throw new SyntaxError("An invalid or illegal string was specified."); v = e, this.hasBeenReset = !0 } })), Object.defineProperty(r, "position", Dt({}, o, { get: function () { return y }, set: function (t) { if (t < 0 || t > 100) throw new Error("Position must be between 0 and 100."); y = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "positionAlign", Dt({}, o, { get: function () { return g }, set: function (t) { var e = It(t); if (!e) throw new SyntaxError("An invalid or illegal string was specified."); g = e, this.hasBeenReset = !0 } })), Object.defineProperty(r, "size", Dt({}, o, { get: function () { return m }, set: function (t) { if (t < 0 || t > 100) throw new Error("Size must be between 0 and 100."); m = t, this.hasBeenReset = !0 } })), Object.defineProperty(r, "align", Dt({}, o, { get: function () { return _ }, set: function (t) { var e = It(t); if (!e) throw new SyntaxError("An invalid or illegal string was specified."); _ = e, this.hasBeenReset = !0 } })), r.displayState = void 0, i) return r } function Rt(t) { return "string" == typeof t && (!!Ir[t.toLowerCase()] && t.toLowerCase()) } function Bt(t) { return "number" == typeof t && t >= 0 && t <= 100 } function Ft() { var t = 100, e = 3, n = 0, r = 100, i = 0, o = 100, s = ""; Object.defineProperties(this, { width: { enumerable: !0, get: function () { return t }, set: function (e) { if (!Bt(e)) throw new Error("Width must be between 0 and 100."); t = e } }, lines: { enumerable: !0, get: function () { return e }, set: function (t) { if ("number" != typeof t) throw new TypeError("Lines must be set to a number."); e = t } }, regionAnchorY: { enumerable: !0, get: function () { return r }, set: function (t) { if (!Bt(t)) throw new Error("RegionAnchorX must be between 0 and 100."); r = t } }, regionAnchorX: { enumerable: !0, get: function () { return n }, set: function (t) { if (!Bt(t)) throw new Error("RegionAnchorY must be between 0 and 100."); n = t } }, viewportAnchorY: { enumerable: !0, get: function () { return o }, set: function (t) { if (!Bt(t)) throw new Error("ViewportAnchorY must be between 0 and 100."); o = t } }, viewportAnchorX: { enumerable: !0, get: function () { return i }, set: function (t) { if (!Bt(t)) throw new Error("ViewportAnchorX must be between 0 and 100."); i = t } }, scroll: { enumerable: !0, get: function () { return s }, set: function (t) { var e = Rt(t); if (!1 === e) throw new SyntaxError("An invalid or illegal string was specified."); s = e } } }) } function Vt(t, e, n, r) { var i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {}, o = t.textTracks(); i.kind = e, n && (i.label = n), r && (i.language = r), i.tech = t; var s = new Cr.text.TrackClass(i); return o.addTrack(s), s } function Ht(t, e) { Br[t] = Br[t] || [], Br[t].push(e) } function Wt(t, e, n) { t.setTimeout(function () { return Kt(e, Br[e.type], n, t) }, 1) } function Ut(t, e) { t.forEach(function (t) { return t.setTech && t.setTech(e) }) } function zt(t, e, n) { return t.reduceRight(qt(n), e[n]()) } function Xt(t, e, n, r) { return e[n](t.reduce(qt(n), r)) } function qt(t) { return function (e, n) { return n[t] ? n[t](e) : e } } function Kt() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n = arguments[2], i = arguments[3], o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : [], s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5], a = e[0], l = e.slice(1); if ("string" == typeof a) Kt(t, Br[a], n, i, o, s); else if (a) { var c = a(i); c.setSource(r({}, t), function (e, r) { if (e) return Kt(t, l, n, i, o, s); o.push(c), Kt(r, t.type === r.type ? l : Br[r.type], n, i, o, s) }) } else l.length ? Kt(t, l, n, i, o, s) : s ? n(t, o) : Kt(t, Br["*"], n, i, o, !0) } function Yt(t, e) { return "rgba(" + parseInt(t[1] + t[1], 16) + "," + parseInt(t[2] + t[2], 16) + "," + parseInt(t[3] + t[3], 16) + "," + e + ")" } function Gt(t, e, n) { try { t.style[e] = n } catch (t) { return } } function $t(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : t; t = t < 0 ? 0 : t; var n = Math.floor(t % 60), r = Math.floor(t / 60 % 60), i = Math.floor(t / 3600), o = Math.floor(e / 60 % 60), s = Math.floor(e / 3600); return (isNaN(t) || t === 1 / 0) && (i = r = n = "-"), i = i > 0 || s > 0 ? i + ":" : "", r = ((i || o >= 10) && r < 10 ? "0" + r : r) + ":", n = n < 10 ? "0" + n : n, i + r + n } function Jt(t, e) { if (e && (t = e(t)), t && "none" !== t) return t } function Qt(t, e) { return Jt(t.options[t.options.selectedIndex].value, e) } function Zt(t, e, n) { if (e) for (var r = 0; r < t.options.length; r++)if (Jt(t.options[r].value, n) === e) { t.selectedIndex = r; break } } function te(t, e, n) { var r = void 0; if ("string" == typeof t) { var o = te.getPlayers(); if (0 === t.indexOf("#") && (t = t.slice(1)), o[t]) return e && Xe.warn('Player "' + t + '" is already initialised. Options will not be applied.'), n && o[t].ready(n), o[t]; r = Ye("#" + t) } else r = t; if (!r || !r.nodeName) throw new TypeError("The element or ID supplied is not valid. (videojs)"); if (r.player || lo.players[r.playerId]) return r.player || lo.players[r.playerId]; e = e || {}, te.hooks("beforesetup").forEach(function (t) { var n = t(r, Z(e)); if (!i(n) || Array.isArray(n)) return void Xe.error("please return an object in beforesetup hooks"); e = Z(e, n) }); var s = Tn.getComponent("Player"), a = new s(r, e, n); return te.hooks("setup").forEach(function (t) { return t(a) }), a } var ee, ne = "6.3.3", re = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; ee = "undefined" != typeof window ? window : void 0 !== re ? re : "undefined" != typeof self ? self : {}; var ie, oe = ee, se = {}, ae = (Object.freeze || Object)({ default: se }), le = ae && se || ae, ce = void 0 !== re ? re : "undefined" != typeof window ? window : {}; "undefined" != typeof document ? ie = document : (ie = ce["__GLOBAL_DOCUMENT_CACHE@4"]) || (ie = ce["__GLOBAL_DOCUMENT_CACHE@4"] = le); var ue = ie, he = oe.navigator && oe.navigator.userAgent || "", pe = /AppleWebKit\/([\d.]+)/i.exec(he), de = pe ? parseFloat(pe.pop()) : null, fe = /iPad/i.test(he), ve = /iPhone/i.test(he) && !fe, ye = /iPod/i.test(he), ge = ve || fe || ye, me = function () { var t = he.match(/OS (\d+)_/i); return t && t[1] ? t[1] : null }(), _e = /Android/i.test(he), be = function () { var t = he.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i); if (!t) return null; var e = t[1] && parseFloat(t[1]), n = t[2] && parseFloat(t[2]); return e && n ? parseFloat(t[1] + "." + t[2]) : e || null }(), Te = _e && /webkit/i.test(he) && be < 2.3, Ce = _e && be < 5 && de < 537, ke = /Firefox/i.test(he), we = /Edge/i.test(he), Ee = !we && /Chrome/i.test(he), Se = function () { var t = he.match(/Chrome\/(\d+)/); return t && t[1] ? parseFloat(t[1]) : null }(), xe = /MSIE\s8\.0/.test(he), je = function () { var t = /MSIE\s(\d+)\.\d/.exec(he), e = t && parseFloat(t[1]); return !e && /Trident\/7.0/i.test(he) && /rv:11.0/.test(he) && (e = 11), e }(), Ae = /Safari/i.test(he) && !Ee && !_e && !we, Pe = Ae || ge, Ne = h() && ("ontouchstart" in oe || oe.DocumentTouch && oe.document instanceof oe.DocumentTouch), Oe = h() && "backgroundSize" in oe.document.createElement("video").style, Me = (Object.freeze || Object)({ IS_IPAD: fe, IS_IPHONE: ve, IS_IPOD: ye, IS_IOS: ge, IOS_VERSION: me, IS_ANDROID: _e, ANDROID_VERSION: be, IS_OLD_ANDROID: Te, IS_NATIVE_ANDROID: Ce, IS_FIREFOX: ke, IS_EDGE: we, IS_CHROME: Ee, CHROME_VERSION: Se, IS_IE8: xe, IE_VERSION: je, IS_SAFARI: Ae, IS_ANY_SAFARI: Pe, TOUCH_ENABLED: Ne, BACKGROUND_SIZE_SUPPORTED: Oe }), Ie = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, De = function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }, Le = function (t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e) }, Re = function (t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !e || "object" != typeof e && "function" != typeof e ? t : e }, Be = function (t, e) { return t.raw = e, t }, Fe = Object.prototype.toString, Ve = function (t) { return i(t) ? Object.keys(t) : [] }, He = void 0, We = "all", Ue = [], ze = function (t, e) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : !!je && je < 11, r = He.levels[We], o = new RegExp("^(" + r + ")$"); "log" !== t && e.unshift(t.toUpperCase() + ":"), Ue && Ue.push([].concat(e)), e.unshift("VIDEOJS:"); var s = oe.console && oe.console[t]; s && r && o.test(t) && (n && (e = e.map(function (t) { if (i(t) || Array.isArray(t)) try { return JSON.stringify(t) } catch (e) { return String(t) } return String(t) }).join(" ")), s.apply ? s[Array.isArray(e) ? "apply" : "call"](oe.console, e) : s(e)) }; He = function () { for (var t = arguments.length, e = Array(t), n = 0; n < t; n++)e[n] = arguments[n]; ze("log", e) }, He.levels = { all: "log|warn|error", error: "error", off: "", warn: "warn|error", DEFAULT: We }, He.level = function (t) { if ("string" == typeof t) { if (!He.levels.hasOwnProperty(t)) throw new Error('"' + t + '" in not a valid log level'); We = t } return We }, He.history = function () { return Ue ? [].concat(Ue) : [] }, He.history.clear = function () { Ue && (Ue.length = 0) }, He.history.disable = function () { null !== Ue && (Ue.length = 0, Ue = null) }, He.history.enable = function () { null === Ue && (Ue = []) }, He.error = function () { for (var t = arguments.length, e = Array(t), n = 0; n < t; n++)e[n] = arguments[n]; return ze("error", e) }, He.warn = function () { for (var t = arguments.length, e = Array(t), n = 0; n < t; n++)e[n] = arguments[n]; return ze("warn", e) }; var Xe = He, qe = function (t) { for (var e = "", n = 0; n < arguments.length; n++)e += s(t[n]) + (arguments[n + 1] || ""); return e }, Ke = Be(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ", " to ", "."], ["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ", " to ", "."]), Ye = f("querySelector"), Ge = f("querySelectorAll"), $e = (Object.freeze || Object)({ isReal: h, isEl: p, isInFrame: d, createEl: v, textContent: y, prependTo: g, hasClass: m, addClass: _, removeClass: b, toggleClass: T, setAttributes: C, getAttributes: k, getAttribute: w, setAttribute: E, removeAttribute: S, blockTextSelection: x, unblockTextSelection: j, getBoundingClientRect: A, findPosition: P, getPointerPosition: N, isTextNode: O, emptyEl: M, normalizeContent: I, appendContent: D, insertContent: L, $: Ye, $$: Ge }), Je = 1, Qe = {}, Ze = "vdata" + (new Date).getTime(), tn = !1; !function () { try { var t = Object.defineProperty({}, "passive", { get: function () { tn = !0 } }); oe.addEventListener("test", null, t) } catch (t) { } }(); var en = ["touchstart", "touchmove"], nn = (Object.freeze || Object)({ fixEvent: U, on: z, off: X, trigger: q, one: K }), rn = !1, on = void 0, sn = function () { if (h()) { var t = ue.getElementsByTagName("video"), e = ue.getElementsByTagName("audio"), n = []; if (t && t.length > 0) for (var r = 0, i = t.length; r < i; r++)n.push(t[r]); if (e && e.length > 0) for (var o = 0, s = e.length; o < s; o++)n.push(e[o]) ; if (n && n.length > 0) for (var a = 0, l = n.length; a < l; a++) { var c = n[a]; if (!c || !c.getAttribute) { Y(1); break } if (void 0 === c.player) { var u = c.getAttribute("data-setup"); null !== u && on(c) } } else rn || Y(1) } }; h() && "complete" === ue.readyState ? rn = !0 : K(oe, "load", function () { rn = !0 }); var an = function (t) { var e = ue.createElement("style"); return e.className = t, e }, ln = function (t, e) { t.styleSheet ? t.styleSheet.cssText = e : t.textContent = e }, cn = function (t, e, n) { e.guid || (e.guid = R()); var r = function () { return e.apply(t, arguments) }; return r.guid = n ? n + "_" + e.guid : e.guid, r }, un = function (t, e) { var n = Date.now(); return function () { var r = Date.now(); r - n >= e && (t.apply(void 0, arguments), n = r) } }, hn = function () { }; hn.prototype.allowedEvents_ = {}, hn.prototype.on = function (t, e) { var n = this.addEventListener; this.addEventListener = function () { }, z(this, t, e), this.addEventListener = n }, hn.prototype.addEventListener = hn.prototype.on, hn.prototype.off = function (t, e) { X(this, t, e) }, hn.prototype.removeEventListener = hn.prototype.off, hn.prototype.one = function (t, e) { var n = this.addEventListener; this.addEventListener = function () { }, K(this, t, e), this.addEventListener = n }, hn.prototype.trigger = function (t) { var e = t.type || t; "string" == typeof t && (t = { type: e }), t = U(t), this.allowedEvents_[e] && this["on" + e] && this["on" + e](t), q(this, t) }, hn.prototype.dispatchEvent = hn.prototype.trigger; var pn = function (t) { return t instanceof hn || !!t.eventBusEl_ && ["on", "one", "off", "trigger"].every(function (e) { return "function" == typeof t[e] }) }, dn = function (t) { return "string" == typeof t && /\S/.test(t) || Array.isArray(t) && !!t.length }, fn = function (t) { if (!t.nodeName && !pn(t)) throw new Error("Invalid target; must be a DOM node or evented object.") }, vn = function (t) { if (!dn(t)) throw new Error("Invalid event type; must be a non-empty string or array.") }, yn = function (t) { if ("function" != typeof t) throw new Error("Invalid listener; must be a function.") }, gn = function (t, e) { var n = e.length < 3 || e[0] === t || e[0] === t.eventBusEl_, r = void 0, i = void 0, o = void 0; return n ? (r = t.eventBusEl_, e.length >= 3 && e.shift(), i = e[0], o = e[1]) : (r = e[0], i = e[1], o = e[2]), fn(r), vn(i), yn(o), o = cn(t, o), { isTargetingSelf: n, target: r, type: i, listener: o } }, mn = function (t, e, n, r) { fn(t), t.nodeName ? nn[e](t, n, r) : t[e](n, r) }, _n = { on: function () { for (var t = this, e = arguments.length, n = Array(e), r = 0; r < e; r++)n[r] = arguments[r]; var i = gn(this, n), o = i.isTargetingSelf, s = i.target, a = i.type, l = i.listener; if (mn(s, "on", a, l), !o) { var c = function () { return t.off(s, a, l) }; c.guid = l.guid; var u = function () { return t.off("dispose", c) }; u.guid = l.guid, mn(this, "on", "dispose", c), mn(s, "on", "dispose", u) } }, one: function () { for (var t = this, e = arguments.length, n = Array(e), r = 0; r < e; r++)n[r] = arguments[r]; var i = gn(this, n), o = i.isTargetingSelf, s = i.target, a = i.type, l = i.listener; if (o) mn(s, "one", a, l); else { var c = function e() { for (var n = arguments.length, r = Array(n), i = 0; i < n; i++)r[i] = arguments[i]; t.off(s, a, e), l.apply(null, r) }; c.guid = l.guid, mn(s, "one", a, c) } }, off: function (t, e, n) { if (!t || dn(t)) X(this.eventBusEl_, t, e); else { var r = t, i = e; fn(r), vn(i), yn(n), n = cn(this, n), this.off("dispose", n), r.nodeName ? (X(r, i, n), X(r, "dispose", n)) : pn(r) && (r.off(i, n), r.off("dispose", n)) } }, trigger: function (t, e) { return q(this.eventBusEl_, t, e) } }, bn = { state: {}, setState: function (t) { var n = this; "function" == typeof t && (t = t()); var r = void 0; return e(t, function (t, e) { n.state[e] !== t && (r = r || {}, r[e] = { from: n.state[e], to: t }), n.state[e] = t }), r && pn(this) && this.trigger({ changes: r, type: "statechanged" }), r } }, Tn = function () { function t(e, n, r) { if (De(this, t), !e && this.play ? this.player_ = e = this : this.player_ = e, this.options_ = Z({}, this.options_), n = this.options_ = Z(this.options_, n), this.id_ = n.id || n.el && n.el.id, !this.id_) { var i = e && e.id && e.id() || "no_player"; this.id_ = i + "_component_" + R() } this.name_ = n.name || null, n.el ? this.el_ = n.el : !1 !== n.createEl && (this.el_ = this.createEl()), G(this, { eventBusKey: this.el_ ? "el_" : null }), $(this, this.constructor.defaultState), this.children_ = [], this.childIndex_ = {}, this.childNameIndex_ = {}, !1 !== n.initChildren && this.initChildren(), this.ready(r), !1 !== n.reportTouchActivity && this.enableTouchActivity() } return t.prototype.dispose = function () { if (this.trigger({ type: "dispose", bubbles: !1 }), this.children_) for (var t = this.children_.length - 1; t >= 0; t--)this.children_[t].dispose && this.children_[t].dispose(); this.children_ = null, this.childIndex_ = null, this.childNameIndex_ = null, this.el_ && (this.el_.parentNode && this.el_.parentNode.removeChild(this.el_), V(this.el_), this.el_ = null) }, t.prototype.player = function () { return this.player_ }, t.prototype.options = function (t) { return Xe.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"), t ? (this.options_ = Z(this.options_, t), this.options_) : this.options_ }, t.prototype.el = function () { return this.el_ }, t.prototype.createEl = function (t, e, n) { return v(t, e, n) }, t.prototype.localize = function (t, e) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : t, r = this.player_.language && this.player_.language(), i = this.player_.languages && this.player_.languages(), o = i && i[r], s = r && r.split("-")[0], a = i && i[s], l = n; return o && o[t] ? l = o[t] : a && a[t] && (l = a[t]), e && (l = l.replace(/\{(\d+)\}/g, function (t, n) { var r = e[n - 1], i = r; return void 0 === r && (i = t), i })), l }, t.prototype.contentEl = function () { return this.contentEl_ || this.el_ }, t.prototype.id = function () { return this.id_ }, t.prototype.name = function () { return this.name_ }, t.prototype.children = function () { return this.children_ }, t.prototype.getChildById = function (t) { return this.childIndex_[t] }, t.prototype.getChild = function (t) { if (t) return t = J(t), this.childNameIndex_[t] }, t.prototype.addChild = function (e) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.children_.length, i = void 0, o = void 0; if ("string" == typeof e) { o = J(e); var s = n.componentClass || o; n.name = o; var a = t.getComponent(s); if (!a) throw new Error("Component " + s + " does not exist"); if ("function" != typeof a) return null; i = new a(this.player_ || this, n) } else i = e; if (this.children_.splice(r, 0, i), "function" == typeof i.id && (this.childIndex_[i.id()] = i), o = o || i.name && J(i.name()), o && (this.childNameIndex_[o] = i), "function" == typeof i.el && i.el()) { var l = this.contentEl().children, c = l[r] || null; this.contentEl().insertBefore(i.el(), c) } return i }, t.prototype.removeChild = function (t) { if ("string" == typeof t && (t = this.getChild(t)), t && this.children_) { for (var e = !1, n = this.children_.length - 1; n >= 0; n--)if (this.children_[n] === t) { e = !0, this.children_.splice(n, 1); break } if (e) { this.childIndex_[t.id()] = null, this.childNameIndex_[t.name()] = null; var r = t.el(); r && r.parentNode === this.contentEl() && this.contentEl().removeChild(t.el()) } } }, t.prototype.initChildren = function () { var e = this, n = this.options_.children; if (n) { var r = this.options_, i = function (t) { var n = t.name, i = t.opts; if (void 0 !== r[n] && (i = r[n]), !1 !== i) { !0 === i && (i = {}), i.playerOptions = e.options_.playerOptions; var o = e.addChild(n, i); o && (e[n] = o) } }, o = void 0, s = t.getComponent("Tech"); o = Array.isArray(n) ? n : Object.keys(n), o.concat(Object.keys(this.options_).filter(function (t) { return !o.some(function (e) { return "string" == typeof e ? t === e : t === e.name }) })).map(function (t) { var r = void 0, i = void 0; return "string" == typeof t ? (r = t, i = n[r] || e.options_[r] || {}) : (r = t.name, i = t), { name: r, opts: i } }).filter(function (e) { var n = t.getComponent(e.opts.componentClass || J(e.name)); return n && !s.isTech(n) }).forEach(i) } }, t.prototype.buildCSSClass = function () { return "" }, t.prototype.ready = function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; t && (this.isReady_ ? e ? t.call(this) : this.setTimeout(t, 1) : (this.readyQueue_ = this.readyQueue_ || [], this.readyQueue_.push(t))) }, t.prototype.triggerReady = function () { this.isReady_ = !0, this.setTimeout(function () { var t = this.readyQueue_; this.readyQueue_ = [], t && t.length > 0 && t.forEach(function (t) { t.call(this) }, this), this.trigger("ready") }, 1) }, t.prototype.$ = function (t, e) { return Ye(t, e || this.contentEl()) }, t.prototype.$$ = function (t, e) { return Ge(t, e || this.contentEl()) }, t.prototype.hasClass = function (t) { return m(this.el_, t) }, t.prototype.addClass = function (t) { _(this.el_, t) }, t.prototype.removeClass = function (t) { b(this.el_, t) }, t.prototype.toggleClass = function (t, e) { T(this.el_, t, e) }, t.prototype.show = function () { this.removeClass("vjs-hidden") }, t.prototype.hide = function () { this.addClass("vjs-hidden") }, t.prototype.lockShowing = function () { this.addClass("vjs-lock-showing") }, t.prototype.unlockShowing = function () { this.removeClass("vjs-lock-showing") }, t.prototype.getAttribute = function (t) { return w(this.el_, t) }, t.prototype.setAttribute = function (t, e) { E(this.el_, t, e) }, t.prototype.removeAttribute = function (t) { S(this.el_, t) }, t.prototype.width = function (t, e) { return this.dimension("width", t, e) }, t.prototype.height = function (t, e) { return this.dimension("height", t, e) }, t.prototype.dimensions = function (t, e) { this.width(t, !0), this.height(e) }, t.prototype.dimension = function (t, e, n) { if (void 0 !== e) return null !== e && e === e || (e = 0), -1 !== ("" + e).indexOf("%") || -1 !== ("" + e).indexOf("px") ? this.el_.style[t] = e : this.el_.style[t] = "auto" === e ? "" : e + "px", void (n || this.trigger("componentresize")); if (!this.el_) return 0; var r = this.el_.style[t], i = r.indexOf("px"); return -1 !== i ? parseInt(r.slice(0, i), 10) : parseInt(this.el_["offset" + J(t)], 10) }, t.prototype.currentDimension = function (t) { var e = 0; if ("width" !== t && "height" !== t) throw new Error("currentDimension only accepts width or height value"); if ("function" == typeof oe.getComputedStyle) { var n = oe.getComputedStyle(this.el_); e = n.getPropertyValue(t) || n[t] } if (0 === (e = parseFloat(e))) { var r = "offset" + J(t); e = this.el_[r] } return e }, t.prototype.currentDimensions = function () { return { width: this.currentDimension("width"), height: this.currentDimension("height") } }, t.prototype.currentWidth = function () { return this.currentDimension("width") }, t.prototype.currentHeight = function () { return this.currentDimension("height") }, t.prototype.focus = function () { this.el_.focus() }, t.prototype.blur = function () { this.el_.blur() }, t.prototype.emitTapEvents = function () { var t = 0, e = null, n = void 0; this.on("touchstart", function (r) { 1 === r.touches.length && (e = { pageX: r.touches[0].pageX, pageY: r.touches[0].pageY }, t = (new Date).getTime(), n = !0) }), this.on("touchmove", function (t) { if (t.touches.length > 1) n = !1; else if (e) { var r = t.touches[0].pageX - e.pageX, i = t.touches[0].pageY - e.pageY, o = Math.sqrt(r * r + i * i); o > 10 && (n = !1) } }); var r = function () { n = !1 }; this.on("touchleave", r), this.on("touchcancel", r), this.on("touchend", function (r) { if (e = null, !0 === n) { (new Date).getTime() - t < 200 && (r.preventDefault(), this.trigger("tap")) } }) }, t.prototype.enableTouchActivity = function () { if (this.player() && this.player().reportUserActivity) { var t = cn(this.player(), this.player().reportUserActivity), e = void 0; this.on("touchstart", function () { t(), this.clearInterval(e), e = this.setInterval(t, 250) }); var n = function (n) { t(), this.clearInterval(e) }; this.on("touchmove", t), this.on("touchend", n), this.on("touchcancel", n) } }, t.prototype.setTimeout = function (t, e) { t = cn(this, t); var n = oe.setTimeout(t, e), r = function () { this.clearTimeout(n) }; return r.guid = "vjs-timeout-" + n, this.on("dispose", r), n }, t.prototype.clearTimeout = function (t) { oe.clearTimeout(t); var e = function () { }; return e.guid = "vjs-timeout-" + t, this.off("dispose", e), t }, t.prototype.setInterval = function (t, e) { t = cn(this, t); var n = oe.setInterval(t, e), r = function () { this.clearInterval(n) }; return r.guid = "vjs-interval-" + n, this.on("dispose", r), n }, t.prototype.clearInterval = function (t) { oe.clearInterval(t); var e = function () { }; return e.guid = "vjs-interval-" + t, this.off("dispose", e), t }, t.prototype.requestAnimationFrame = function (t) { var e = this; if (this.supportsRaf_) { t = cn(this, t); var n = oe.requestAnimationFrame(t), r = function () { return e.cancelAnimationFrame(n) }; return r.guid = "vjs-raf-" + n, this.on("dispose", r), n } return this.setTimeout(t, 1e3 / 60) }, t.prototype.cancelAnimationFrame = function (t) { if (this.supportsRaf_) { oe.cancelAnimationFrame(t); var e = function () { }; return e.guid = "vjs-raf-" + t, this.off("dispose", e), t } return this.clearTimeout(t) }, t.registerComponent = function (e, n) { if ("string" != typeof e || !e) throw new Error('Illegal component name, "' + e + '"; must be a non-empty string.'); var r = t.getComponent("Tech"), i = r && r.isTech(n), o = t === n || t.prototype.isPrototypeOf(n.prototype); if (i || !o) { var s = void 0; throw s = i ? "techs must be registered using Tech.registerTech()" : "must be a Component subclass", new Error('Illegal component, "' + e + '"; ' + s + ".") } e = J(e), t.components_ || (t.components_ = {}); var a = t.getComponent("Player"); if ("Player" === e && a && a.players) { var l = a.players, c = Object.keys(l); if (l && c.length > 0 && c.map(function (t) { return l[t] }).every(Boolean)) throw new Error("Can not register Player component after player has been created.") } return t.components_[e] = n, n }, t.getComponent = function (e) { if (e) return e = J(e), t.components_ && t.components_[e] ? t.components_[e] : void 0 }, t }(); Tn.prototype.supportsRaf_ = "function" == typeof oe.requestAnimationFrame && "function" == typeof oe.cancelAnimationFrame, Tn.registerComponent("Component", Tn); for (var Cn = {}, kn = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]], wn = kn[0], En = void 0, Sn = 0; Sn < kn.length; Sn++)if (kn[Sn][1] in ue) { En = kn[Sn]; break } if (En) for (var xn = 0; xn < En.length; xn++)Cn[wn[xn]] = En[xn]; ot.prototype.code = 0, ot.prototype.message = "", ot.prototype.status = null, ot.errorTypes = ["MEDIA_ERR_CUSTOM", "MEDIA_ERR_ABORTED", "MEDIA_ERR_NETWORK", "MEDIA_ERR_DECODE", "MEDIA_ERR_SRC_NOT_SUPPORTED", "MEDIA_ERR_ENCRYPTED"], ot.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 jn = 0; jn < ot.errorTypes.length; jn++)ot[ot.errorTypes[jn]] = jn, ot.prototype[ot.errorTypes[jn]] = jn; var An = st, Pn = function (t) { return ["kind", "label", "language", "id", "inBandMetadataTrackDispatchType", "mode", "src"].reduce(function (e, n, r) { return t[n] && (e[n] = t[n]), e }, { cues: t.cues && Array.prototype.map.call(t.cues, function (t) { return { startTime: t.startTime, endTime: t.endTime, text: t.text, id: t.id } }) }) }, Nn = function (t) { var e = t.$$("track"), n = Array.prototype.map.call(e, function (t) { return t.track }); return Array.prototype.map.call(e, function (t) { var e = Pn(t.track); return t.src && (e.src = t.src), e }).concat(Array.prototype.filter.call(t.textTracks(), function (t) { return -1 === n.indexOf(t) }).map(Pn)) }, On = function (t, e) { return t.forEach(function (t) { var n = e.addRemoteTextTrack(t).track; !t.src && t.cues && t.cues.forEach(function (t) { return n.addCue(t) }) }), e.textTracks() }, Mn = { textTracksToJson: Nn, jsonToTextTracks: On, trackToJson_: Pn }, In = "vjs-modal-dialog", Dn = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.opened_ = i.hasBeenOpened_ = i.hasBeenFilled_ = !1, i.closeable(!i.options_.uncloseable), i.content(i.options_.content), i.contentEl_ = v("div", { className: In + "-content" }, { role: "document" }), i.descEl_ = v("p", { className: In + "-description vjs-control-text", id: i.el().getAttribute("aria-describedby") }), y(i.descEl_, i.description()), i.el_.appendChild(i.descEl_), i.el_.appendChild(i.contentEl_), i } return Le(e, t), e.prototype.createEl = function () { return t.prototype.createEl.call(this, "div", { className: this.buildCSSClass(), tabIndex: -1 }, { "aria-describedby": this.id() + "_description", "aria-hidden": "true", "aria-label": this.label(), role: "dialog" }) }, e.prototype.buildCSSClass = function () { return In + " vjs-hidden " + t.prototype.buildCSSClass.call(this) }, e.prototype.handleKeyPress = function (t) { 27 === t.which && this.closeable() && this.close() }, e.prototype.label = function () { return this.localize(this.options_.label || "Modal Window") }, e.prototype.description = function () { var t = this.options_.description || this.localize("This is a modal window."); return this.closeable() && (t += " " + this.localize("This modal can be closed by pressing the Escape key or activating the close button.")), t }, e.prototype.open = function () { if (!this.opened_) { var t = this.player(); this.trigger("beforemodalopen"), this.opened_ = !0, (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) && this.fill(), this.wasPlaying_ = !t.paused(), this.options_.pauseOnOpen && this.wasPlaying_ && t.pause(), this.closeable() && this.on(this.el_.ownerDocument, "keydown", cn(this, this.handleKeyPress)), t.controls(!1), this.show(), this.conditionalFocus_(), this.el().setAttribute("aria-hidden", "false"), this.trigger("modalopen"), this.hasBeenOpened_ = !0 } }, e.prototype.opened = function (t) { return "boolean" == typeof t && this[t ? "open" : "close"](), this.opened_ }, e.prototype.close = function () { if (this.opened_) { var t = this.player(); this.trigger("beforemodalclose"), this.opened_ = !1, this.wasPlaying_ && this.options_.pauseOnOpen && t.play(), this.closeable() && this.off(this.el_.ownerDocument, "keydown", cn(this, this.handleKeyPress)), t.controls(!0), this.hide(), this.el().setAttribute("aria-hidden", "true"), this.trigger("modalclose"), this.conditionalBlur_(), this.options_.temporary && this.dispose() } }, e.prototype.closeable = function (t) { if ("boolean" == typeof t) { var e = this.closeable_ = !!t, n = this.getChild("closeButton"); if (e && !n) { var r = this.contentEl_; this.contentEl_ = this.el_, n = this.addChild("closeButton", { controlText: "Close Modal Dialog" }), this.contentEl_ = r, this.on(n, "close", this.close) } !e && n && (this.off(n, "close", this.close), this.removeChild(n), n.dispose()) } return this.closeable_ }, e.prototype.fill = function () { this.fillWith(this.content()) }, e.prototype.fillWith = function (t) { var e = this.contentEl(), n = e.parentNode, r = e.nextSibling; this.trigger("beforemodalfill"), this.hasBeenFilled_ = !0, n.removeChild(e), this.empty(), L(e, t), this.trigger("modalfill"), r ? n.insertBefore(e, r) : n.appendChild(e); var i = this.getChild("closeButton"); i && n.appendChild(i.el_) }, e.prototype.empty = function () { this.trigger("beforemodalempty"), M(this.contentEl()), this.trigger("modalempty") }, e.prototype.content = function (t) { return void 0 !== t && (this.content_ = t), this.content_ }, e.prototype.conditionalFocus_ = function () { var t = ue.activeElement, e = this.player_.el_; this.previouslyActiveEl_ = null, (e.contains(t) || e === t) && (this.previouslyActiveEl_ = t, this.focus(), this.on(ue, "keydown", this.handleKeyDown)) }, e.prototype.conditionalBlur_ = function () { this.previouslyActiveEl_ && (this.previouslyActiveEl_.focus(), this.previouslyActiveEl_ = null), this.off(ue, "keydown", this.handleKeyDown) }, e.prototype.handleKeyDown = function (t) { if (9 === t.which) { for (var e = this.focusableEls_(), n = this.el_.querySelector(":focus"), r = void 0, i = 0; i < e.length; i++)if (n === e[i]) { r = i; break } ue.activeElement === this.el_ && (r = 0), t.shiftKey && 0 === r ? (e[e.length - 1].focus(), t.preventDefault()) : t.shiftKey || r !== e.length - 1 || (e[0].focus(), t.preventDefault()) } }, e.prototype.focusableEls_ = function () { var t = this.el_.querySelectorAll("*"); return Array.prototype.filter.call(t, function (t) { return (t instanceof oe.HTMLAnchorElement || t instanceof oe.HTMLAreaElement) && t.hasAttribute("href") || (t instanceof oe.HTMLInputElement || t instanceof oe.HTMLSelectElement || t instanceof oe.HTMLTextAreaElement || t instanceof oe.HTMLButtonElement) && !t.hasAttribute("disabled") || t instanceof oe.HTMLIFrameElement || t instanceof oe.HTMLObjectElement || t instanceof oe.HTMLEmbedElement || t.hasAttribute("tabindex") && -1 !== t.getAttribute("tabindex") || t.hasAttribute("contenteditable") }) }, e }(Tn); Dn.prototype.options_ = { pauseOnOpen: !0, temporary: !0 }, Tn.registerComponent("ModalDialog", Dn); var Ln = function (t) { function e() { var n, r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; De(this, e); var o = Re(this, t.call(this)); if (!i && (i = o, xe)) { i = ue.createElement("custom"); for (var s in e.prototype) "constructor" !== s && (i[s] = e.prototype[s]) } i.tracks_ = [], Object.defineProperty(i, "length", { get: function () { return this.tracks_.length } }); for (var a = 0; a < r.length; a++)i.addTrack(r[a]); return n = i, Re(o, n) } return Le(e, t), e.prototype.addTrack = function (t) { var e = this.tracks_.length; "" + e in this || Object.defineProperty(this, e, { get: function () { return this.tracks_[e] } }), -1 === this.tracks_.indexOf(t) && (this.tracks_.push(t), this.trigger({ track: t, type: "addtrack" })) }, e.prototype.removeTrack = function (t) { for (var e = void 0, n = 0, r = this.length; n < r; n++)if (this[n] === t) { e = this[n], e.off && e.off(), this.tracks_.splice(n, 1); break } e && this.trigger({ track: e, type: "removetrack" }) }, e.prototype.getTrackById = function (t) { for (var e = null, n = 0, r = this.length; n < r; n++) { var i = this[n]; if (i.id === t) { e = i; break } } return e }, e }(hn); Ln.prototype.allowedEvents_ = { change: "change", addtrack: "addtrack", removetrack: "removetrack" }; for (var Rn in Ln.prototype.allowedEvents_) Ln.prototype["on" + Rn] = null; var Bn = function (t, e) { for (var n = 0; n < t.length; n++)Object.keys(t[n]).length && e.id !== t[n].id && (t[n].enabled = !1) }, Fn = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; De(this, e); for (var o = void 0, s = i.length - 1; s >= 0; s--)if (i[s].enabled) { Bn(i, i[s]); break } if (xe) { o = ue.createElement("custom"); for (var a in Ln.prototype) "constructor" !== a && (o[a] = Ln.prototype[a]); for (var l in e.prototype) "constructor" !== l && (o[l] = e.prototype[l]) } return o = n = Re(this, t.call(this, i, o)), o.changing_ = !1, r = o, Re(n, r) } return Le(e, t), e.prototype.addTrack = function (e) { var n = this; e.enabled && Bn(this, e), t.prototype.addTrack.call(this, e), e.addEventListener && e.addEventListener("enabledchange", function () { n.changing_ || (n.changing_ = !0, Bn(n, e), n.changing_ = !1, n.trigger("change")) }) }, e }(Ln), Vn = function (t, e) { for (var n = 0; n < t.length; n++)Object.keys(t[n]).length && e.id !== t[n].id && (t[n].selected = !1) }, Hn = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; De(this, e); for (var o = void 0, s = i.length - 1; s >= 0; s--)if (i[s].selected) { Vn(i, i[s]); break } if (xe) { o = ue.createElement("custom"); for (var a in Ln.prototype) "constructor" !== a && (o[a] = Ln.prototype[a]); for (var l in e.prototype) "constructor" !== l && (o[l] = e.prototype[l]) } return o = n = Re(this, t.call(this, i, o)), o.changing_ = !1, Object.defineProperty(o, "selectedIndex", { get: function () { for (var t = 0; t < this.length; t++)if (this[t].selected) return t; return -1 }, set: function () { } }), r = o, Re(n, r) } return Le(e, t), e.prototype.addTrack = function (e) { var n = this; e.selected && Vn(this, e), t.prototype.addTrack.call(this, e), e.addEventListener && e.addEventListener("selectedchange", function () { n.changing_ || (n.changing_ = !0, Vn(n, e), n.changing_ = !1, n.trigger("change")) }) }, e }(Ln), Wn = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; De(this, e); var o = void 0; if (xe) { o = ue.createElement("custom"); for (var s in Ln.prototype) "constructor" !== s && (o[s] = Ln.prototype[s]); for (var a in e.prototype) "constructor" !== a && (o[a] = e.prototype[a]) } return o = n = Re(this, t.call(this, i, o)), r = o, Re(n, r) } return Le(e, t), e.prototype.addTrack = function (e) { t.prototype.addTrack.call(this, e), e.addEventListener("modechange", cn(this, function () { this.trigger("change") })), -1 === ["metadata", "chapters"].indexOf(e.kind) && e.addEventListener("modechange", cn(this, function () { this.trigger("selectedlanguagechange") })) }, e }(Ln), Un = function () { function t() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; De(this, t); var n = this; if (xe) { n = ue.createElement("custom"); for (var r in t.prototype) "constructor" !== r && (n[r] = t.prototype[r]) } n.trackElements_ = [], Object.defineProperty(n, "length", { get: function () { return this.trackElements_.length } }); for (var i = 0, o = e.length; i < o; i++)n.addTrackElement_(e[i]); if (xe) return n } return t.prototype.addTrackElement_ = function (t) { var e = this.trackElements_.length; "" + e in this || Object.defineProperty(this, e, { get: function () { return this.trackElements_[e] } }), -1 === this.trackElements_.indexOf(t) && this.trackElements_.push(t) }, t.prototype.getTrackElementByTrack_ = function (t) { for (var e = void 0, n = 0, r = this.trackElements_.length; n < r; n++)if (t === this.trackElements_[n].track) { e = this.trackElements_[n]; break } return e }, t.prototype.removeTrackElement_ = function (t) { for (var e = 0, n = this.trackElements_.length; e < n; e++)if (t === this.trackElements_[e]) { this.trackElements_.splice(e, 1); break } }, t }(), zn = function () { function t(e) { De(this, t); var n = this; if (xe) { n = ue.createElement("custom"); for (var r in t.prototype) "constructor" !== r && (n[r] = t.prototype[r]) } if (t.prototype.setCues_.call(n, e), Object.defineProperty(n, "length", { get: function () { return this.length_ } }), xe) return n } return t.prototype.setCues_ = function (t) { var e = this.length || 0, n = 0, r = t.length; this.cues_ = t, this.length_ = t.length; var i = function (t) { "" + t in this || Object.defineProperty(this, "" + t, { get: function () { return this.cues_[t] } }) }; if (e < r) for (n = e; n < r; n++)i.call(this, n) }, t.prototype.getCueById = function (t) { for (var e = null, n = 0, r = this.length; n < r; n++) { var i = this[n]; if (i.id === t) { e = i; break } } return e }, t }(), Xn = { alternative: "alternative", captions: "captions", main: "main", sign: "sign", subtitles: "subtitles", commentary: "commentary" }, qn = { alternative: "alternative", descriptions: "descriptions", main: "main", "main-desc": "main-desc", translation: "translation", commentary: "commentary" }, Kn = { subtitles: "subtitles", captions: "captions", descriptions: "descriptions", chapters: "chapters", metadata: "metadata" }, Yn = { disabled: "disabled", hidden: "hidden", showing: "showing" }, Gn = function (t) { function e() { var n, r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; De(this, e); var i = Re(this, t.call(this)), o = i; if (xe) { o = ue.createElement("custom"); for (var s in e.prototype) "constructor" !== s && (o[s] = e.prototype[s]) } var a = { id: r.id || "vjs_track_" + R(), kind: r.kind || "", label: r.label || "", language: r.language || "" }; for (var l in a) !function (t) { Object.defineProperty(o, t, { get: function () { return a[t] }, set: function () { } }) }(l); return n = o, Re(i, n) } return Le(e, t), e }(hn), $n = function (t) { var e = ["protocol", "hostname", "port", "pathname", "search", "hash", "host"], n = ue.createElement("a"); n.href = t; var r = "" === n.host && "file:" !== n.protocol, i = void 0; r && (i = ue.createElement("div"), i.innerHTML = '', n = i.firstChild, i.setAttribute("style", "display:none; position:absolute;"), ue.body.appendChild(i)); for (var o = {}, s = 0; s < e.length; s++)o[e[s]] = n[e[s]]; return "http:" === o.protocol && (o.host = o.host.replace(/:80$/, "")), "https:" === o.protocol && (o.host = o.host.replace(/:443$/, "")), r && ue.body.removeChild(i), o }, Jn = function (t) { if (!t.match(/^https?:\/\//)) { var e = ue.createElement("div"); e.innerHTML = 'x', t = e.firstChild.href } return t }, Qn = function (t) { if ("string" == typeof t) { var e = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i, n = e.exec(t); if (n) return n.pop().toLowerCase() } return "" }, Zn = function (t) { var e = oe.location, n = $n(t); return (":" === n.protocol ? e.protocol : n.protocol) + n.host !== e.protocol + e.host }, tr = (Object.freeze || Object)({ parseUrl: $n, getAbsoluteURL: Jn, getFileExtension: Qn, isCrossOrigin: Zn }), er = at, nr = Object.prototype.toString, rr = t(function (t, e) { function n(t) { return t.replace(/^\s*|\s*$/g, "") } e = t.exports = n, e.left = function (t) { return t.replace(/^\s*/, "") }, e.right = function (t) { return t.replace(/\s*$/, "") } }), ir = lt, or = Object.prototype.toString, sr = Object.prototype.hasOwnProperty, ar = function (t) { return "[object Array]" === Object.prototype.toString.call(t) }, lr = function (t) { if (!t) return {}; var e = {}; return ir(rr(t).split("\n"), function (t) { var n = t.indexOf(":"), r = rr(t.slice(0, n)).toLowerCase(), i = rr(t.slice(n + 1)); void 0 === e[r] ? e[r] = i : ar(e[r]) ? e[r].push(i) : e[r] = [e[r], i] }), e }, cr = pt, ur = Object.prototype.hasOwnProperty, hr = vt; vt.XMLHttpRequest = oe.XMLHttpRequest || mt, vt.XDomainRequest = "withCredentials" in new vt.XMLHttpRequest ? vt.XMLHttpRequest : oe.XDomainRequest, function (t, e) { for (var n = 0; n < t.length; n++)e(t[n]) }(["get", "put", "post", "patch", "head", "delete"], function (t) { vt["delete" === t ? "del" : t] = function (e, n, r) { return n = ft(e, n, r), n.method = t.toUpperCase(), yt(n) } }); var pr = function (t, e) { var n = new oe.WebVTT.Parser(oe, oe.vttjs, oe.WebVTT.StringDecoder()), r = []; n.oncue = function (t) { e.addCue(t) }, n.onparsingerror = function (t) { r.push(t) }, n.onflush = function () { e.trigger({ type: "loadeddata", target: e }) }, n.parse(t), r.length > 0 && (oe.console && oe.console.groupCollapsed && oe.console.groupCollapsed("Text Track parsing errors for " + e.src), r.forEach(function (t) { return Xe.error(t) }), oe.console && oe.console.groupEnd && oe.console.groupEnd()), n.flush() }, dr = function (t, e) { var n = { uri: t }, r = Zn(t); r && (n.cors = r), hr(n, cn(this, function (t, n, r) { if (t) return Xe.error(t, n); if (e.loaded_ = !0, "function" != typeof oe.WebVTT) { if (e.tech_) { var i = function () { return pr(r, e) }; e.tech_.on("vttjsloaded", i), e.tech_.on("vttjserror", function () { Xe.error("vttjs failed to load, stopping trying to process " + e.src), e.tech_.off("vttjsloaded", i) }) } } else pr(r, e) })) }, fr = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; if (De(this, e), !i.tech) throw new Error("A tech was not provided."); var o = Z(i, { kind: Kn[i.kind] || "subtitles", language: i.language || i.srclang || "" }), s = Yn[o.mode] || "disabled", a = o.default; "metadata" !== o.kind && "chapters" !== o.kind || (s = "hidden"); var l = n = Re(this, t.call(this, o)); if (l.tech_ = o.tech, xe) for (var c in e.prototype) "constructor" !== c && (l[c] = e.prototype[c]); l.cues_ = [], l.activeCues_ = []; var u = new zn(l.cues_), h = new zn(l.activeCues_), p = !1, d = cn(l, function () { this.activeCues, p && (this.trigger("cuechange"), p = !1) }); return "disabled" !== s && l.tech_.ready(function () { l.tech_.on("timeupdate", d) }, !0), Object.defineProperty(l, "default", { get: function () { return a }, set: function () { } }), Object.defineProperty(l, "mode", { get: function () { return s }, set: function (t) { var e = this; Yn[t] && (s = t, "showing" === s && this.tech_.ready(function () { e.tech_.on("timeupdate", d) }, !0), this.trigger("modechange")) } }), Object.defineProperty(l, "cues", { get: function () { return this.loaded_ ? u : null }, set: function () { } }), Object.defineProperty(l, "activeCues", { get: function () { if (!this.loaded_) return null; if (0 === this.cues.length) return h; for (var t = this.tech_.currentTime(), e = [], n = 0, r = this.cues.length; n < r; n++) { var i = this.cues[n]; i.startTime <= t && i.endTime >= t ? e.push(i) : i.startTime === i.endTime && i.startTime <= t && i.startTime + .5 >= t && e.push(i) } if (p = !1, e.length !== this.activeCues_.length) p = !0; else for (var o = 0; o < e.length; o++)-1 === this.activeCues_.indexOf(e[o]) && (p = !0); return this.activeCues_ = e, h.setCues_(this.activeCues_), h }, set: function () { } }), o.src ? (l.src = o.src, dr(o.src, l)) : l.loaded_ = !0, r = l, Re(n, r) } return Le(e, t), e.prototype.addCue = function (t) { var e = t; if (oe.vttjs && !(t instanceof oe.vttjs.VTTCue)) { e = new oe.vttjs.VTTCue(t.startTime, t.endTime, t.text); for (var n in t) n in e || (e[n] = t[n]); e.id = t.id, e.originalCue_ = t } for (var r = this.tech_.textTracks(), i = 0; i < r.length; i++)r[i] !== this && r[i].removeCue(e); this.cues_.push(e), this.cues.setCues_(this.cues_) }, e.prototype.removeCue = function (t) { for (var e = this.cues_.length; e--;) { var n = this.cues_[e]; if (n === t || n.originalCue_ && n.originalCue_ === t) { this.cues_.splice(e, 1), this.cues.setCues_(this.cues_); break } } }, e }(Gn); fr.prototype.allowedEvents_ = { cuechange: "cuechange" }; var vr = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; De(this, e); var o = Z(i, { kind: qn[i.kind] || "" }), s = n = Re(this, t.call(this, o)), a = !1; if (xe) for (var l in e.prototype) "constructor" !== l && (s[l] = e.prototype[l]); return Object.defineProperty(s, "enabled", { get: function () { return a }, set: function (t) { "boolean" == typeof t && t !== a && (a = t, this.trigger("enabledchange")) } }), o.enabled && (s.enabled = o.enabled), s.loaded_ = !0, r = s, Re(n, r) } return Le(e, t), e }(Gn), yr = function (t) { function e() { var n, r, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; De(this, e); var o = Z(i, { kind: Xn[i.kind] || "" }), s = n = Re(this, t.call(this, o)), a = !1; if (xe) for (var l in e.prototype) "constructor" !== l && (s[l] = e.prototype[l]); return Object.defineProperty(s, "selected", { get: function () { return a }, set: function (t) { "boolean" == typeof t && t !== a && (a = t, this.trigger("selectedchange")) } }), o.selected && (s.selected = o.selected), r = s, Re(n, r) } return Le(e, t), e }(Gn), gr = 0, mr = 2, _r = function (t) { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; De(this, e); var r = Re(this, t.call(this)), i = void 0, o = r; if (xe) { o = ue.createElement("custom"); for (var s in e.prototype) "constructor" !== s && (o[s] = e.prototype[s]) } var a = new fr(n); if (o.kind = a.kind, o.src = a.src, o.srclang = a.language, o.label = a.label, o.default = a.default, Object.defineProperty(o, "readyState", { get: function () { return i } }), Object.defineProperty(o, "track", { get: function () { return a } }), i = gr, a.addEventListener("loadeddata", function () { i = mr, o.trigger({ type: "load", target: o }) }), xe) { var l; return l = o, Re(r, l) } return r } return Le(e, t), e }(hn); _r.prototype.allowedEvents_ = { load: "load" }, _r.NONE = gr, _r.LOADING = 1, _r.LOADED = mr, _r.ERROR = 3; var br = { audio: { ListClass: Fn, TrackClass: vr, capitalName: "Audio" }, video: { ListClass: Hn, TrackClass: yr, capitalName: "Video" }, text: { ListClass: Wn, TrackClass: fr, capitalName: "Text" } }; Object.keys(br).forEach(function (t) { br[t].getterName = t + "Tracks", br[t].privateName = t + "Tracks_" }); var Tr = { remoteText: { ListClass: Wn, TrackClass: fr, capitalName: "RemoteText", getterName: "remoteTextTracks", privateName: "remoteTextTracks_" }, remoteTextEl: { ListClass: Un, TrackClass: _r, capitalName: "RemoteTextTrackEls", getterName: "remoteTextTrackEls", privateName: "remoteTextTrackEls_" } }, Cr = Z(br, Tr); Tr.names = Object.keys(Tr), br.names = Object.keys(br), Cr.names = [].concat(Tr.names).concat(br.names); var kr = Object.create || function () { function t() { } return function (e) { if (1 !== arguments.length) throw new Error("Object.create shim only accepts one parameter."); return t.prototype = e, new t } }(); _t.prototype = kr(Error.prototype), _t.prototype.constructor = _t, _t.Errors = { BadSignature: { code: 0, message: "Malformed WebVTT signature." }, BadTimeStamp: { code: 1, message: "Malformed time stamp." } }, Tt.prototype = { set: function (t, e) { this.get(t) || "" === e || (this.values[t] = e) }, get: function (t, e, n) { return n ? this.has(t) ? this.values[t] : e[n] : this.has(t) ? this.values[t] : e }, has: function (t) { return t in this.values }, alt: function (t, e, n) { for (var r = 0; r < n.length; ++r)if (e === n[r]) { this.set(t, e); break } }, integer: function (t, e) { /^-?\d+$/.test(e) && this.set(t, parseInt(e, 10)) }, percent: function (t, e) { return !!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/) && (e = parseFloat(e)) >= 0 && e <= 100) && (this.set(t, e), !0) } }; var wr = { "&": "&", "<": "<", ">": ">", "": "", "": "", " ": " " }, Er = { c: "span", i: "i", b: "b", u: "u", ruby: "ruby", rt: "rt", v: "span", lang: "span" }, Sr = { v: "title", lang: "lang" }, xr = { rt: "ruby" }, jr = [[1470, 1470], [1472, 1472], [1475, 1475], [1478, 1478], [1488, 1514], [1520, 1524], [1544, 1544], [1547, 1547], [1549, 1549], [1563, 1563], [1566, 1610], [1645, 1647], [1649, 1749], [1765, 1766], [1774, 1775], [1786, 1805], [1807, 1808], [1810, 1839], [1869, 1957], [1969, 1969], [1984, 2026], [2036, 2037], [2042, 2042], [2048, 2069], [2074, 2074], [2084, 2084], [2088, 2088], [2096, 2110], [2112, 2136], [2142, 2142], [2208, 2208], [2210, 2220], [8207, 8207], [64285, 64285], [64287, 64296], [64298, 64310], [64312, 64316], [64318, 64318], [64320, 64321], [64323, 64324], [64326, 64449], [64467, 64829], [64848, 64911], [64914, 64967], [65008, 65020], [65136, 65140], [65142, 65276], [67584, 67589], [67592, 67592], [67594, 67637], [67639, 67640], [67644, 67644], [67647, 67669], [67671, 67679], [67840, 67867], [67872, 67897], [67903, 67903], [67968, 68023], [68030, 68031], [68096, 68096], [68112, 68115], [68117, 68119], [68121, 68147], [68160, 68167], [68176, 68184], [68192, 68223], [68352, 68405], [68416, 68437], [68440, 68466], [68472, 68479], [68608, 68680], [126464, 126467], [126469, 126495], [126497, 126498], [126500, 126500], [126503, 126503], [126505, 126514], [126516, 126519], [126521, 126521], [126523, 126523], [126530, 126530], [126535, 126535], [126537, 126537], [126539, 126539], [126541, 126543], [126545, 126546], [126548, 126548], [126551, 126551], [126553, 126553], [126555, 126555], [126557, 126557], [126559, 126559], [126561, 126562], [126564, 126564], [126567, 126570], [126572, 126578], [126580, 126583], [126585, 126588], [126590, 126590], [126592, 126601], [126603, 126619], [126625, 126627], [126629, 126633], [126635, 126651], [1114109, 1114109]]; jt.prototype.applyStyles = function (t, e) { e = e || this.div; for (var n in t) t.hasOwnProperty(n) && (e.style[n] = t[n]) }, jt.prototype.formatStyle = function (t, e) { return 0 === t ? 0 : t + e }, At.prototype = kr(jt.prototype), At.prototype.constructor = At, Pt.prototype.move = function (t, e) { switch (e = void 0 !== e ? e : this.lineHeight, t) { case "+x": this.left += e, this.right += e; break; case "-x": this.left -= e, this.right -= e; break; case "+y": this.top += e, this.bottom += e; break; case "-y": this.top -= e, this.bottom -= e } }, Pt.prototype.overlaps = function (t) { return this.left < t.right && this.right > t.left && this.top < t.bottom && this.bottom > t.top }, Pt.prototype.overlapsAny = function (t) { for (var e = 0; e < t.length; e++)if (this.overlaps(t[e])) return !0; return !1 }, Pt.prototype.within = function (t) { return this.top >= t.top && this.bottom <= t.bottom && this.left >= t.left && this.right <= t.right }, Pt.prototype.overlapsOppositeAxis = function (t, e) { switch (e) { case "+x": return this.left < t.left; case "-x": return this.right > t.right; case "+y": return this.top < t.top; case "-y": return this.bottom > t.bottom } }, Pt.prototype.intersectPercentage = function (t) { return Math.max(0, Math.min(this.right, t.right) - Math.max(this.left, t.left)) * Math.max(0, Math.min(this.bottom, t.bottom) - Math.max(this.top, t.top)) / (this.height * this.width) }, Pt.prototype.toCSSCompatValues = function (t) { return { top: this.top - t.top, bottom: t.bottom - this.bottom, left: this.left - t.left, right: t.right - this.right, height: this.height, width: this.width } }, Pt.getSimpleBoxPosition = function (t) { var e = t.div ? t.div.offsetHeight : t.tagName ? t.offsetHeight : 0, n = t.div ? t.div.offsetWidth : t.tagName ? t.offsetWidth : 0, r = t.div ? t.div.offsetTop : t.tagName ? t.offsetTop : 0; return t = t.div ? t.div.getBoundingClientRect() : t.tagName ? t.getBoundingClientRect() : t, { left: t.left, right: t.right, top: t.top || r, height: t.height || e, bottom: t.bottom || r + (t.height || e), width: t.width || n } }, Ot.StringDecoder = function () { return { decode: function (t) { if (!t) return ""; if ("string" != typeof t) throw new Error("Error - expected string data."); return decodeURIComponent(encodeURIComponent(t)) } } }, Ot.convertCueToDOMTree = function (t, e) { return t && e ? wt(t, e) : null }; Ot.processCues = function (t, e, n) { if (!t || !e || !n) return null; for (; n.firstChild;)n.removeChild(n.firstChild); var r = t.document.createElement("div"); if (r.style.position = "absolute", r.style.left = "0", r.style.right = "0", r.style.top = "0", r.style.bottom = "0", r.style.margin = "1.5%", n.appendChild(r), function (t) { for (var e = 0; e < t.length; e++)if (t[e].hasBeenReset || !t[e].displayState) return !0; return !1 }(e)) { var i = [], o = Pt.getSimpleBoxPosition(r), s = Math.round(.05 * o.height * 100) / 100, a = { font: s + "px sans-serif" }; !function () { for (var n, s, l = 0; l < e.length; l++)s = e[l], n = new At(t, s, a), r.appendChild(n.div), Nt(t, n, o, i), s.displayState = n.div, i.push(Pt.getSimpleBoxPosition(n)) }() } else for (var l = 0; l < e.length; l++)r.appendChild(e[l].displayState) }, Ot.Parser = function (t, e, n) { n || (n = e, e = {}), e || (e = {}), this.window = t, this.vttjs = e, this.state = "INITIAL", this.buffer = "", this.decoder = n || new TextDecoder("utf8"), this.regionList = [] }, Ot.Parser.prototype = { reportOrThrowError: function (t) { if (!(t instanceof _t)) throw t; this.onparsingerror && this.onparsingerror(t) }, parse: function (t) { function e() { for (var t = i.buffer, e = 0; e < t.length && "\r" !== t[e] && "\n" !== t[e];)++e; var n = t.substr(0, e); return "\r" === t[e] && ++e, "\n" === t[e] && ++e, i.buffer = t.substr(e), n } function n(t) { var e = new Tt; if (Ct(t, function (t, n) { switch (t) { case "id": e.set(t, n); break; case "width": e.percent(t, n); break; case "lines": e.integer(t, n); break; case "regionanchor": case "viewportanchor": var r = n.split(","); if (2 !== r.length) break; var i = new Tt; if (i.percent("x", r[0]), i.percent("y", r[1]), !i.has("x") || !i.has("y")) break; e.set(t + "X", i.get("x")), e.set(t + "Y", i.get("y")); break; case "scroll": e.alt(t, n, ["up"]) } }, /=/, /\s/), e.has("id")) { var n = new (i.vttjs.VTTRegion || i.window.VTTRegion); n.width = e.get("width", 100), n.lines = e.get("lines", 3), n.regionAnchorX = e.get("regionanchorX", 0), n.regionAnchorY = e.get("regionanchorY", 100), n.viewportAnchorX = e.get("viewportanchorX", 0), n.viewportAnchorY = e.get("viewportanchorY", 100), n.scroll = e.get("scroll", ""), i.onregion && i.onregion(n), i.regionList.push({ id: e.get("id"), region: n }) } } function r(t) { var e = new Tt; Ct(t, function (t, n) { switch (t) { case "MPEGT": e.integer(t + "S", n); break; case "LOCA": e.set(t + "L", bt(n)) } }, /[^\d]:/, /,/), i.ontimestampmap && i.ontimestampmap({ MPEGTS: e.get("MPEGTS"), LOCAL: e.get("LOCAL") }) } var i = this; t && (i.buffer += i.decoder.decode(t, { stream: !0 })); try { var o; if ("INITIAL" === i.state) { if (!/\r\n|\n/.test(i.buffer)) return this; o = e(); var s = o.match(/^WEBVTT([ \t].*)?$/); if (!s || !s[0]) throw new _t(_t.Errors.BadSignature); i.state = "HEADER" } for (var a = !1; i.buffer;) { if (!/\r\n|\n/.test(i.buffer)) return this; switch (a ? a = !1 : o = e(), i.state) { case "HEADER": /:/.test(o) ? function (t) { t.match(/X-TIMESTAMP-MAP/) ? Ct(t, function (t, e) { switch (t) { case "X-TIMESTAMP-MAP": r(e) } }, /=/) : Ct(t, function (t, e) { switch (t) { case "Region": n(e) } }, /:/) }(o) : o || (i.state = "ID"); continue; case "NOTE": o || (i.state = "ID"); continue; case "ID": if (/^NOTE($|[ \t])/.test(o)) { i.state = "NOTE"; break } if (!o) continue; if (i.cue = new (i.vttjs.VTTCue || i.window.VTTCue)(0, 0, ""), i.state = "CUE", -1 === o.indexOf("--\x3e")) { i.cue.id = o; continue } case "CUE": try { kt(o, i.cue, i.regionList) } catch (t) { i.reportOrThrowError(t), i.cue = null, i.state = "BADCUE"; continue } i.state = "CUETEXT"; continue; case "CUETEXT": var l = -1 !== o.indexOf("--\x3e"); if (!o || l && (a = !0)) { i.oncue && i.oncue(i.cue), i.cue = null, i.state = "ID"; continue } i.cue.text && (i.cue.text += "\n"), i.cue.text += o; continue; case "BADCUE": o || (i.state = "ID"); continue } } } catch (t) { i.reportOrThrowError(t), "CUETEXT" === i.state && i.cue && i.oncue && i.oncue(i.cue), i.cue = null, i.state = "INITIAL" === i.state ? "BADWEBVTT" : "BADCUE" } return this }, flush: function () { var t = this; try { if (t.buffer += t.decoder.decode(), (t.cue || "HEADER" === t.state) && (t.buffer += "\n\n", t.parse()), "INITIAL" === t.state) throw new _t(_t.Errors.BadSignature) } catch (e) { t.reportOrThrowError(e) } return t.onflush && t.onflush(), this } }; var Ar = Ot, Pr = "auto", Nr = { "": !0, lr: !0, rl: !0 }, Or = { start: !0, middle: !0, end: !0, left: !0, right: !0 }; Lt.prototype.getCueAsHTML = function () { return WebVTT.convertCueToDOMTree(window, this.text) }; var Mr = Lt, Ir = { "": !0, up: !0 }, Dr = Ft, Lr = t(function (t) { var e = t.exports = { WebVTT: Ar, VTTCue: Mr, VTTRegion: Dr }; oe.vttjs = e, oe.WebVTT = e.WebVTT; var n = e.VTTCue, r = e.VTTRegion, i = oe.VTTCue, o = oe.VTTRegion; e.shim = function () { oe.VTTCue = n, oe.VTTRegion = r }, e.restore = function () { oe.VTTCue = i, oe.VTTRegion = o }, oe.VTTCue || e.shim() }), Rr = function (t) { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function () { }; De(this, e), n.reportTouchActivity = !1; var i = Re(this, t.call(this, null, n, r)); return i.hasStarted_ = !1, i.on("playing", function () { this.hasStarted_ = !0 }), i.on("loadstart", function () { this.hasStarted_ = !1 }), Cr.names.forEach(function (t) { var e = Cr[t]; n && n[e.getterName] && (i[e.privateName] = n[e.getterName]) }), i.featuresProgressEvents || i.manualProgressOn(), i.featuresTimeupdateEvents || i.manualTimeUpdatesOn(), ["Text", "Audio", "Video"].forEach(function (t) { !1 === n["native" + t + "Tracks"] && (i["featuresNative" + t + "Tracks"] = !1) }), !1 === n.nativeCaptions || !1 === n.nativeTextTracks ? i.featuresNativeTextTracks = !1 : !0 !== n.nativeCaptions && !0 !== n.nativeTextTracks || (i.featuresNativeTextTracks = !0), i.featuresNativeTextTracks || i.emulateTextTracks(), i.autoRemoteTextTracks_ = new Cr.text.ListClass, i.initTrackListeners(), n.nativeControlsForTouch || i.emitTapEvents(), i.constructor && (i.name_ = i.constructor.name || "Unknown Tech"), i } return Le(e, t), e.prototype.manualProgressOn = function () { this.on("durationchange", this.onDurationChange), this.manualProgress = !0, this.one("ready", this.trackProgress) }, e.prototype.manualProgressOff = function () { this.manualProgress = !1, this.stopTrackingProgress(), this.off("durationchange", this.onDurationChange) }, e.prototype.trackProgress = function (t) { this.stopTrackingProgress(), this.progressInterval = this.setInterval(cn(this, function () { var t = this.bufferedPercent(); this.bufferedPercent_ !== t && this.trigger("progress"), this.bufferedPercent_ = t, 1 === t && this.stopTrackingProgress() }), 500) }, e.prototype.onDurationChange = function (t) { this.duration_ = this.duration() }, e.prototype.buffered = function () { return rt(0, 0) }, e.prototype.bufferedPercent = function () { return it(this.buffered(), this.duration_) }, e.prototype.stopTrackingProgress = function () { this.clearInterval(this.progressInterval) }, e.prototype.manualTimeUpdatesOn = function () { this.manualTimeUpdates = !0, this.on("play", this.trackCurrentTime), this.on("pause", this.stopTrackingCurrentTime) }, e.prototype.manualTimeUpdatesOff = function () { this.manualTimeUpdates = !1, this.stopTrackingCurrentTime(), this.off("play", this.trackCurrentTime), this.off("pause", this.stopTrackingCurrentTime) }, e.prototype.trackCurrentTime = function () { this.currentTimeInterval && this.stopTrackingCurrentTime(), this.currentTimeInterval = this.setInterval(function () { this.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }) }, 250) }, e.prototype.stopTrackingCurrentTime = function () { this.clearInterval(this.currentTimeInterval), this.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }) }, e.prototype.dispose = function () { this.clearTracks(br.names), this.manualProgress && this.manualProgressOff(), this.manualTimeUpdates && this.manualTimeUpdatesOff(), t.prototype.dispose.call(this) }, e.prototype.clearTracks = function (t) { var e = this; t = [].concat(t), t.forEach(function (t) { for (var n = e[t + "Tracks"]() || [], r = n.length; r--;) { var i = n[r]; "text" === t && e.removeRemoteTextTrack(i), n.removeTrack(i) } }) }, e.prototype.cleanupAutoTextTracks = function () { for (var t = this.autoRemoteTextTracks_ || [], e = t.length; e--;) { var n = t[e]; this.removeRemoteTextTrack(n) } }, e.prototype.reset = function () { }, e.prototype.error = function (t) { return void 0 !== t && (this.error_ = new ot(t), this.trigger("error")), this.error_ }, e.prototype.played = function () { return this.hasStarted_ ? rt(0, 0) : rt() }, e.prototype.setCurrentTime = function () { this.manualTimeUpdates && this.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }) }, e.prototype.initTrackListeners = function () { var t = this; br.names.forEach(function (e) { var n = br[e], r = function () { t.trigger(e + "trackchange") }, i = t[n.getterName](); i.addEventListener("removetrack", r), i.addEventListener("addtrack", r), t.on("dispose", function () { i.removeEventListener("removetrack", r), i.removeEventListener("addtrack", r) }) }) }, e.prototype.addWebVttScript_ = function () { var t = this; if (!oe.WebVTT) if (ue.body.contains(this.el())) { if (!this.options_["vtt.js"] && o(Lr) && Object.keys(Lr).length > 0) return void this.trigger("vttjsloaded"); var e = ue.createElement("script"); e.src = this.options_["vtt.js"] || "https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js", e.onload = function () { t.trigger("vttjsloaded") }, e.onerror = function () { t.trigger("vttjserror") }, this.on("dispose", function () { e.onload = null, e.onerror = null }), oe.WebVTT = !0, this.el().parentNode.appendChild(e) } else this.ready(this.addWebVttScript_) }, e.prototype.emulateTextTracks = function () { var t = this, e = this.textTracks(), n = this.remoteTextTracks(), r = function (t) { return e.addTrack(t.track) }, i = function (t) { return e.removeTrack(t.track) }; n.on("addtrack", r), n.on("removetrack", i), this.addWebVttScript_(); var o = function () { return t.trigger("texttrackchange") }, s = function () { o(); for (var t = 0; t < e.length; t++) { var n = e[t]; n.removeEventListener("cuechange", o), "showing" === n.mode && n.addEventListener("cuechange", o) } }; s(), e.addEventListener("change", s), e.addEventListener("addtrack", s), e.addEventListener("removetrack", s), this.on("dispose", function () { n.off("addtrack", r), n.off("removetrack", i), e.removeEventListener("change", s), e.removeEventListener("addtrack", s), e.removeEventListener("removetrack", s); for (var t = 0; t < e.length; t++) { e[t].removeEventListener("cuechange", o) } }) }, e.prototype.addTextTrack = function (t, e, n) { if (!t) throw new Error("TextTrack kind is required but was not provided"); return Vt(this, t, e, n) }, e.prototype.createRemoteTextTrack = function (t) { var e = Z(t, { tech: this }); return new Tr.remoteTextEl.TrackClass(e) }, e.prototype.addRemoteTextTrack = function () { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n = arguments[1], r = this.createRemoteTextTrack(e); return !0 !== n && !1 !== n && (Xe.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'), n = !0), this.remoteTextTrackEls().addTrackElement_(r), this.remoteTextTracks().addTrack(r.track), !0 !== n && this.ready(function () { return t.autoRemoteTextTracks_.addTrack(r.track) }), r }, e.prototype.removeRemoteTextTrack = function (t) { var e = this.remoteTextTrackEls().getTrackElementByTrack_(t); this.remoteTextTrackEls().removeTrackElement_(e), this.remoteTextTracks().removeTrack(t), this.autoRemoteTextTracks_.removeTrack(t) }, e.prototype.getVideoPlaybackQuality = function () { return {} }, e.prototype.setPoster = function () { }, e.prototype.playsinline = function () { }, e.prototype.setPlaysinline = function () { }, e.prototype.canPlayType = function () { return "" }, e.canPlayType = function () { return "" }, e.canPlaySource = function (t, n) { return e.canPlayType(t.type) }, e.isTech = function (t) { return t.prototype instanceof e || t instanceof e || t === e }, e.registerTech = function (t, n) { if (e.techs_ || (e.techs_ = {}), !e.isTech(n)) throw new Error("Tech " + t + " must be a Tech"); if (!e.canPlayType) throw new Error("Techs must have a static canPlayType method on them"); if (!e.canPlaySource) throw new Error("Techs must have a static canPlaySource method on them"); return t = J(t), e.techs_[t] = n, "Tech" !== t && e.defaultTechOrder_.push(t), n }, e.getTech = function (t) { if (t) return t = J(t), e.techs_ && e.techs_[t] ? e.techs_[t] : oe && oe.videojs && oe.videojs[t] ? (Xe.warn("The " + t + " tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"), oe.videojs[t]) : void 0 }, e }(Tn); Cr.names.forEach(function (t) { var e = Cr[t]; Rr.prototype[e.getterName] = function () { return this[e.privateName] = this[e.privateName] || new e.ListClass, this[e.privateName] } }), Rr.prototype.featuresVolumeControl = !0, Rr.prototype.featuresFullscreenResize = !1, Rr.prototype.featuresPlaybackRate = !1, Rr.prototype.featuresProgressEvents = !1, Rr.prototype.featuresTimeupdateEvents = !1, Rr.prototype.featuresNativeTextTracks = !1, Rr.withSourceHandlers = function (t) { t.registerSourceHandler = function (e, n) { var r = t.sourceHandlers; r || (r = t.sourceHandlers = []), void 0 === n && (n = r.length), r.splice(n, 0, e) }, t.canPlayType = function (e) { for (var n = t.sourceHandlers || [], r = void 0, i = 0; i < n.length; i++)if (r = n[i].canPlayType(e)) return r; return "" }, t.selectSourceHandler = function (e, n) { for (var r = t.sourceHandlers || [], i = 0; i < r.length; i++)if (r[i].canHandleSource(e, n)) return r[i]; return null }, t.canPlaySource = function (e, n) { var r = t.selectSourceHandler(e, n); return r ? r.canHandleSource(e, n) : "" }, ["seekable", "duration"].forEach(function (t) { var e = this[t]; "function" == typeof e && (this[t] = function () { return this.sourceHandler_ && this.sourceHandler_[t] ? this.sourceHandler_[t].apply(this.sourceHandler_, arguments) : e.apply(this, arguments) }) }, t.prototype), t.prototype.setSource = function (e) { var n = t.selectSourceHandler(e, this.options_); n || (t.nativeSourceHandler ? n = t.nativeSourceHandler : Xe.error("No source hander found for the current source.")), this.disposeSourceHandler(), this.off("dispose", this.disposeSourceHandler), n !== t.nativeSourceHandler && (this.currentSource_ = e), this.sourceHandler_ = n.handleSource(e, this, this.options_), this.on("dispose", this.disposeSourceHandler) }, t.prototype.disposeSourceHandler = function () { this.currentSource_ && (this.clearTracks(["audio", "video"]), this.currentSource_ = null), this.cleanupAutoTextTracks(), this.sourceHandler_ && (this.sourceHandler_.dispose && this.sourceHandler_.dispose(), this.sourceHandler_ = null) } }, Tn.registerComponent("Tech", Rr), Rr.registerTech("Tech", Rr), Rr.defaultTechOrder_ = []; var Br = {}, Fr = { buffered: 1, currentTime: 1, duration: 1, seekable: 1, played: 1 }, Vr = { setCurrentTime: 1 }, Hr = function t(e) { if (Array.isArray(e)) { var n = []; e.forEach(function (e) { e = t(e), Array.isArray(e) ? n = n.concat(e) : i(e) && n.push(e) }), e = n } else e = "string" == typeof e && e.trim() ? [{ src: e }] : i(e) && "string" == typeof e.src && e.src && e.src.trim() ? [e] : []; return e }, Wr = function (t) { function e(n, r, i) { De(this, e); var o = Z({ createEl: !1 }, r), s = Re(this, t.call(this, n, o, i)); if (r.playerOptions.sources && 0 !== r.playerOptions.sources.length) n.src(r.playerOptions.sources); else for (var a = 0, l = r.playerOptions.techOrder; a < l.length; a++) { var c = J(l[a]), u = Rr.getTech(c); if (c || (u = Tn.getComponent(c)), u && u.isSupported()) { n.loadTech_(c); break } } return s } return Le(e, t), e }(Tn); Tn.registerComponent("MediaLoader", Wr); var Ur = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.emitTapEvents(), i.enable(), i } return Le(e, t), e.prototype.createEl = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div", n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; n = r({ innerHTML: '', className: this.buildCSSClass(), tabIndex: 0 }, n), "button" === e && Xe.error("Creating a ClickableComponent with an HTML element of " + e + " is not supported; use a Button instead."), i = r({ role: "button", "aria-live": "polite" }, i), this.tabIndex_ = n.tabIndex; var o = t.prototype.createEl.call(this, e, n, i); return this.createControlTextEl(o), o }, e.prototype.createControlTextEl = function (t) { return this.controlTextEl_ = v("span", { className: "vjs-control-text" }), t && t.appendChild(this.controlTextEl_), this.controlText(this.controlText_, t), this.controlTextEl_ }, e.prototype.controlText = function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.el(); if (!t) return this.controlText_ || "Need Text"; var n = this.localize(t); this.controlText_ = t, y(this.controlTextEl_, n), this.nonIconControl || e.setAttribute("title", n) }, e.prototype.buildCSSClass = function () { return "vjs-control vjs-button " + t.prototype.buildCSSClass.call(this) }, e.prototype.enable = function () { this.enabled_ || (this.enabled_ = !0, this.removeClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "false"), void 0 !== this.tabIndex_ && this.el_.setAttribute("tabIndex", this.tabIndex_), this.on(["tap", "click"], this.handleClick), this.on("focus", this.handleFocus), this.on("blur", this.handleBlur)) }, e.prototype.disable = function () { this.enabled_ = !1, this.addClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "true"), void 0 !== this.tabIndex_ && this.el_.removeAttribute("tabIndex"), this.off(["tap", "click"], this.handleClick), this.off("focus", this.handleFocus), this.off("blur", this.handleBlur) }, e.prototype.handleClick = function (t) { }, e.prototype.handleFocus = function (t) { z(ue, "keydown", cn(this, this.handleKeyPress)) }, e.prototype.handleKeyPress = function (e) { 32 === e.which || 13 === e.which ? (e.preventDefault(), this.trigger("click")) : t.prototype.handleKeyPress && t.prototype.handleKeyPress.call(this, e) }, e.prototype.handleBlur = function (t) { X(ue, "keydown", cn(this, this.handleKeyPress)) }, e }(Tn); Tn.registerComponent("ClickableComponent", Ur); var zr = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.update(), n.on("posterchange", cn(i, i.update)), i } return Le(e, t), e.prototype.dispose = function () { this.player().off("posterchange", this.update), t.prototype.dispose.call(this) }, e.prototype.createEl = function () { var t = v("div", { className: "vjs-poster", tabIndex: -1 }); return Oe || (this.fallbackImg_ = v("img"), t.appendChild(this.fallbackImg_)), t }, e.prototype.update = function (t) { var e = this.player().poster(); this.setSrc(e), e ? this.show() : this.hide() }, e.prototype.setSrc = function (t) { if (this.fallbackImg_) this.fallbackImg_.src = t; else { var e = ""; t && (e = 'url("' + t + '")'), this.el_.style.backgroundImage = e } }, e.prototype.handleClick = function (t) { this.player_.controls() && (this.player_.paused() ? this.player_.play() : this.player_.pause()) }, e }(Ur); Tn.registerComponent("PosterImage", zr); var Xr = { 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' }, qr = function (t) { function e(n, r, i) { De(this, e); var o = Re(this, t.call(this, n, r, i)); return n.on("loadstart", cn(o, o.toggleDisplay)), n.on("texttrackchange", cn(o, o.updateDisplay)), n.on("loadstart", cn(o, o.preselectTrack)), n.ready(cn(o, function () { if (n.tech_ && n.tech_.featuresNativeTextTracks) return void this.hide(); n.on("fullscreenchange", cn(this, this.updateDisplay)); for (var t = this.options_.playerOptions.tracks || [], e = 0; e < t.length; e++)this.player_.addRemoteTextTrack(t[e], !0); this.preselectTrack() })), o } return Le(e, t), e.prototype.preselectTrack = function () { for (var t = { captions: 1, subtitles: 1 }, e = this.player_.textTracks(), n = this.player_.cache_.selectedLanguage, r = void 0, i = void 0, o = void 0, s = 0; s < e.length; s++) { var a = e[s]; n && n.enabled && n.language === a.language ? a.kind === n.kind ? o = a : o || (o = a) : n && !n.enabled ? (o = null, r = null, i = null) : a.default && ("descriptions" !== a.kind || r ? a.kind in t && !i && (i = a) : r = a) } o ? o.mode = "showing" : i ? i.mode = "showing" : r && (r.mode = "showing") }, e.prototype.toggleDisplay = function () { this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks ? this.hide() : this.show() }, e.prototype.createEl = function () { return t.prototype.createEl.call(this, "div", { className: "vjs-text-track-display" }, { "aria-live": "off", "aria-atomic": "true" }) }, e.prototype.clearDisplay = function () { "function" == typeof oe.WebVTT && oe.WebVTT.processCues(oe, [], this.el_) }, e.prototype.updateDisplay = function () { var t = this.player_.textTracks(); this.clearDisplay(); for (var e = null, n = null, r = t.length; r--;) { var i = t[r]; "showing" === i.mode && ("descriptions" === i.kind ? e = i : n = i) } n ? ("off" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "off"), this.updateForTrack(n)) : e && ("assertive" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "assertive"), this.updateForTrack(e)) }, e.prototype.updateForTrack = function (t) { if ("function" == typeof oe.WebVTT && t.activeCues) { for (var e = this.player_.textTrackSettings.getValues(), n = [], r = 0; r < t.activeCues.length; r++)n.push(t.activeCues[r]); oe.WebVTT.processCues(oe, n, this.el_); for (var i = n.length; i--;) { var o = n[i]; if (o) { var s = o.displayState; if (e.color && (s.firstChild.style.color = e.color), e.textOpacity && Gt(s.firstChild, "color", Yt(e.color || "#fff", e.textOpacity)), e.backgroundColor && (s.firstChild.style.backgroundColor = e.backgroundColor), e.backgroundOpacity && Gt(s.firstChild, "backgroundColor", Yt(e.backgroundColor || "#000", e.backgroundOpacity)), e.windowColor && (e.windowOpacity ? Gt(s, "backgroundColor", Yt(e.windowColor, e.windowOpacity)) : s.style.backgroundColor = e.windowColor), e.edgeStyle && ("dropshadow" === e.edgeStyle ? s.firstChild.style.textShadow = "2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222" : "raised" === e.edgeStyle ? s.firstChild.style.textShadow = "1px 1px #222, 2px 2px #222, 3px 3px #222" : "depressed" === e.edgeStyle ? s.firstChild.style.textShadow = "1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222" : "uniform" === e.edgeStyle && (s.firstChild.style.textShadow = "0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")), e.fontPercent && 1 !== e.fontPercent) { var a = oe.parseFloat(s.style.fontSize); s.style.fontSize = a * e.fontPercent + "px", s.style.height = "auto", s.style.top = "auto", s.style.bottom = "2px" } e.fontFamily && "default" !== e.fontFamily && ("small-caps" === e.fontFamily ? s.firstChild.style.fontVariant = "small-caps" : s.firstChild.style.fontFamily = Xr[e.fontFamily]) } } } }, e }(Tn); Tn.registerComponent("TextTrackDisplay", qr); var Kr = function (t) { function e() { return De(this, e), Re(this, t.apply(this, arguments)) } return Le(e, t), e.prototype.createEl = function () { return t.prototype.createEl.call(this, "div", { className: "vjs-loading-spinner", dir: "ltr" }) }, e }(Tn); Tn.registerComponent("LoadingSpinner", Kr); var Yr = function (t) { function e() { return De(this, e), Re(this, t.apply(this, arguments)) } return Le(e, t), e.prototype.createEl = function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; t = "button", e = r({ innerHTML: '', className: this.buildCSSClass() }, e), n = r({ type: "button", "aria-live": "polite" }, n); var i = Tn.prototype.createEl.call(this, t, e, n); return this.createControlTextEl(i), i }, e.prototype.addChild = function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = this.constructor.name; return Xe.warn("Adding an actionable (user controllable) child to a Button (" + n + ") is not supported; use a ClickableComponent instead."), Tn.prototype.addChild.call(this, t, e) }, e.prototype.enable = function () { t.prototype.enable.call(this), this.el_.removeAttribute("disabled") }, e.prototype.disable = function () { t.prototype.disable.call(this), this.el_.setAttribute("disabled", "disabled") }, e.prototype.handleKeyPress = function (e) { 32 !== e.which && 13 !== e.which && t.prototype.handleKeyPress.call(this, e) }, e }(Ur); Tn.registerComponent("Button", Yr); var Gr = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.mouseused_ = !1, i.on("mousedown", i.handleMouseDown), i } return Le(e, t), e.prototype.buildCSSClass = function () { return "vjs-big-play-button" }, e.prototype.handleClick = function (t) { var e = this.player_.play(); if (!(this.mouseused_ && t.clientX && t.clientY)) { var n = this.player_.getChild("controlBar"), r = n && n.getChild("playToggle"); if (!r) return void this.player_.focus(); var i = function () { return r.focus() }; if (e && e.then) { var o = function () { }; e.then(i, o) } else this.setTimeout(i, 1) } }, e.prototype.handleKeyPress = function (e) { this.mouseused_ = !1, t.prototype.handleKeyPress.call(this, e) }, e.prototype.handleMouseDown = function (t) { this.mouseused_ = !0 }, e }(Yr); Gr.prototype.controlText_ = "Play Video", Tn.registerComponent("BigPlayButton", Gr); var $r = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.controlText(r && r.controlText || i.localize("Close")), i } return Le(e, t), e.prototype.buildCSSClass = function () { return "vjs-close-button " + t.prototype.buildCSSClass.call(this) }, e.prototype.handleClick = function (t) { this.trigger({ type: "close", bubbles: !1 }) }, e }(Yr); Tn.registerComponent("CloseButton", $r); var Jr = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.on(n, "play", i.handlePlay), i.on(n, "pause", i.handlePause), i.on(n, "ended", i.handleEnded), i } return Le(e, t), e.prototype.buildCSSClass = function () { return "vjs-play-control " + t.prototype.buildCSSClass.call(this) }, e.prototype.handleClick = function (t) { this.player_.paused() ? this.player_.play() : this.player_.pause() }, e.prototype.handleSeeked = function (t) { this.removeClass("vjs-ended"), this.player_.paused() ? this.handlePause(t) : this.handlePlay(t) }, e.prototype.handlePlay = function (t) { this.removeClass("vjs-paused"), this.addClass("vjs-playing"), this.controlText("Pause") }, e.prototype.handlePause = function (t) { this.removeClass("vjs-playing"), this.addClass("vjs-paused"), this.controlText("Play") }, e.prototype.handleEnded = function (t) { this.removeClass("vjs-playing"), this.addClass("vjs-ended"), this.controlText("Replay"), this.one(this.player_, "seeked", this.handleSeeked) }, e }(Yr); Jr.prototype.controlText_ = "Play", Tn.registerComponent("PlayToggle", Jr); var Qr = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.throttledUpdateContent = un(cn(i, i.updateContent), 25), i.on(n, "timeupdate", i.throttledUpdateContent), i } return Le(e, t), e.prototype.createEl = function (e) { var n = this.buildCSSClass(), r = t.prototype.createEl.call(this, "div", { className: n + " vjs-time-control vjs-control" }); return this.contentEl_ = v("div", { className: n + "-display" }, { "aria-live": "off" }, v("span", { className: "vjs-control-text", textContent: this.localize(this.contentText_) })), this.updateTextNode_(), r.appendChild(this.contentEl_), r }, e.prototype.updateTextNode_ = function () { this.textNode_ && this.contentEl_.removeChild(this.textNode_), this.textNode_ = ue.createTextNode(this.formattedTime_ || "0:00"), this.contentEl_.appendChild(this.textNode_) }, e.prototype.formatTime_ = function (t) { return $t(t) }, e.prototype.updateFormattedTime_ = function (t) { var e = this.formatTime_(t); e !== this.formattedTime_ && (this.formattedTime_ = e, this.requestAnimationFrame(this.updateTextNode_)) }, e.prototype.updateContent = function (t) { }, e }(Tn); Qr.prototype.controlText_ = "Time", Tn.registerComponent("TimeDisplay", Qr); var Zr = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.on(n, "ended", i.handleEnded), i } return Le(e, t), e.prototype.buildCSSClass = function () { return "vjs-current-time" }, e.prototype.updateContent = function (t) { var e = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); this.updateFormattedTime_(e) }, e.prototype.handleEnded = function (t) { this.player_.duration() && this.updateFormattedTime_(this.player_.duration()) }, e }(Qr); Zr.prototype.controlText_ = "Current Time", Tn.registerComponent("CurrentTimeDisplay", Zr); var ti = function (t) { function e(n, r) { De(this, e); var i = Re(this, t.call(this, n, r)); return i.on(n, ["durationchange", "loadedmetadata"], i.throttledUpdateContent), i } return Le(e, t), e.prototype.buildCSSClass = function () { return "vjs-duration" }, e.prototype.updateContent = function (t) { var e = this.player_.duration(); e && this.duration_ !== e && (this.duration_ = e, this.updateFormattedTime_(e)) }, e }(Qr); ti.prototype.controlText_ = "Duration Time", Tn.registerComponent("DurationDisplay", ti); var ei = function (t) { function e() { return De(this, e), Re(this, t.apply(this, arguments)) } return Le(e, t), e.prototype.createEl = function () { return t.prototype.createEl.call(this, "div", { className: "vjs-time-control vjs-time-divider", innerHTML: "