=a&&(this.a=b,d=this.e(),b=this.a);for(;m--;)d[b]=d[b++-k]}for(;8<=this.d;)this.d-=8,this.c--;this.a=b}; +G.prototype.D=function(e,c){var d=this.b,b=this.a;this.r=e;for(var a=d.length,f,g,k,m;256!==(f=Z(this,e));)if(256>f)b>=a&&(d=this.e(),a=d.length),d[b++]=f;else{g=f-257;m=O[g];0a&&(d=this.e(),a=d.length);for(;m--;)d[b]=d[b++-k]}for(;8<=this.d;)this.d-=8,this.c--;this.a=b}; +G.prototype.e=function(){var e=new (u?Uint8Array:Array)(this.a-32768),c=this.a-32768,d,b,a=this.b;if(u)e.set(a.subarray(32768,e.length));else{d=0;for(b=e.length;dd;++d)a[d]=a[c+d];this.a=32768;return a}; +G.prototype.F=function(e){var c,d=this.input.length/this.c+1|0,b,a,f,g=this.input,k=this.b;e&&("number"===typeof e.t&&(d=e.t),"number"===typeof e.A&&(d+=e.A));2>d?(b=(g.length-this.c)/this.r[2],f=258*(b/2)|0,a=fc&&(this.b.length=c),e=this.b);return this.buffer=e};function $(e){this.input=e;this.c=0;this.m=[];this.s=!1}$.prototype.G=function(){this.s||this.g();return this.m.slice()}; +$.prototype.g=function(){for(var e=this.input.length;this.c >>0;x(a,q,q)!==t&&n(Error("invalid CRC-32 checksum: 0x"+x(a,q,q).toString(16)+" / 0x"+t.toString(16)));c.M= +d=(h[l++]|h[l++]<<8|h[l++]<<16|h[l++]<<24)>>>0;(a.length&4294967295)!==d&&n(Error("invalid input size: "+(a.length&4294967295)+" / "+d));this.m.push(c);this.c=l}this.s=!0;var y=this.m,s,M,S=0,T=0,C;s=0;for(M=y.length;s ."))}function i(e,t,n){t in e||console.warn(new Error("Trying to set non-existing attribute "+t+" = "+n+" on a <"+e.tagName.toLowerCase()+">.")),e.setAttributeNS("",t,n)}function o(t,n){Object.keys(n).forEach(function(e){r(t,e,n[e].toString())})}Object.defineProperty(n,"__esModule",{value:!0}),n.addClass=function(e,t){var n=e.classList;return n?t.split(" ").forEach(function(e){return n.add(e)}):e.setAttribute("class",e.getAttribute("class")+" "+t),e},n.removeClass=function(e,t){var n=e.classList;return n?n.remove(t):e.setAttribute("class",(e.getAttribute("class")||"").replace(new RegExp("(\\s|^)"+t+"(\\s|$)","g"),"$2")),e},n.getParentByClassName=function(e,t){if("function"==typeof e.closest)return e.closest("."+t);for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null},n.removeChildren=function(e){for(;e.hasChildNodes();)e.removeChild(e.lastChild);return e},n.getLastItemOfNodeList=function(e){if(e&&0!==e.length)return e.item(e.length-1)},n.forEachNodeList=function(e,t){Array.prototype.forEach.call(e,t)},n.safeSetStyle=r,n.safeSetAttribute=i,n.safeSetStyles=o,n.safeSetAttributes=function(t,n){Object.keys(n).forEach(function(e){i(t,e,n[e].toString())})},n.makeHtmlEl=function(){var e=document.createElement("html");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/xmlns/"),e},n.makeBodyEl=function(e,t){void 0===e&&(e={}),void 0===t&&(t="");var n=document.createElement("body");return n.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),o(n,e),n.innerHTML=t,n}},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(t){return function(e){return e.name.toLowerCase()===t}};n.hasHeader=function(e,t){var n=i(t.toLowerCase());return e.some(n)};var o=!!Array.prototype.find;n.getHeader=function(e,t){var n,r=i(t.toLowerCase());return(n=o?e.find(r):e.map(r).pop())?n.value:void 0},n.getHeaders=function(e,t){var n=i(t.toLowerCase());return e.filter(n).map(function(e){return[t,e.value]})}},{}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,o,a,s,l,u,d,c,p,h,f,v,m,g,y=e("./svg"),w=function(e,t,n,r,i,o){var a=y.newSvg("",{x:e,y:t}),s=y.newG("icon "+r,{transform:"scale("+i+")"});return s.appendChild(o),s.appendChild(y.newTitle(n)),a.appendChild(s),a};function b(e,t,n,r){if(void 0===r&&(r=1),void 0===u){u=y.newPath("M6 6q0 .75-.525 1.275Q4.95 7.8 4.2 7.8q-.75 0-1.275-.525Q2.4 6.75 2.4\n 6q0-.75.525-1.275Q3.45 4.2 4.2 4.2q.75 0 1.275.525Q6 5.25 6 6zm9.6 3.6v4.2H2.4V12l3-3\n 1.5 1.5 4.8-4.8zm.9-6.6h-15q-.122 0-.21.09-.09.088-.09.21v11.4q0\n .122.09.21.088.09.21.09h15q.122 0 .21-.09.09-.088.09-.21V3.3q0-.122-.09-.21Q16.623\n 3 16.5 3zm1.5.3v11.4q0 .62-.44 1.06-.44.44-1.06.44h-15q-.62 0-1.06-.44Q0 15.32 0\n 14.7V3.3q0-.62.44-1.06.44-.44 1.06-.44h15q.62 0 1.06.44.44.44.44 1.06z")}return w(e,t,n,"icon-image",r,u.cloneNode(!1))}function C(e,t,n,r){if(void 0===r&&(r=1),void 0===p){p=y.newPath("M6 6q0 .75-.525 1.275Q4.95 7.8 4.2 7.8q-.75 0-1.275-.525Q2.4 6.75 2.4\n 6q0-.75.525-1.275Q3.45 4.2 4.2 4.2q.75 0 1.275.525Q6 5.25 6 6zm9.6 3.6v4.2H2.4V12l3-3\n 1.5 1.5 4.8-4.8zm.9-6.6h-15q-.122 0-.21.09-.09.088-.09.21v11.4q0\n .122.09.21.088.09.21.09h15q.122 0 .21-.09.09-.088.09-.21V3.3q0-.122-.09-.21Q16.623\n 3 16.5 3zm1.5.3v11.4q0 .62-.44 1.06-.44.44-1.06.44h-15q-.62 0-1.06-.44Q0 15.32 0\n 14.7V3.3q0-.62.44-1.06.44-.44 1.06-.44h15q.62 0 1.06.44.44.44.44 1.06z")}return w(e,t,n,"icon-warning",r,p.cloneNode(!1))}n.noTls=function(e,t,n,r){void 0===r&&(r=1),void 0===i&&(i=y.newPath("M18 6.216v2.77q0 .28-.206.486-.205.206-.486.206h-.693q-.28 0-.486-.206-.21-.205-.21\n -.487v-2.77q0-1.145-.81-1.957-.813-.81-1.96-.81-1.146 0-1.957.81-.81.812-.81 1.958v2.077h1.037q.434\n 0 .737.303.302.303.302.736v6.23q0 .433-.305.736t-.737.303H1.038q-.433 0-.736-.3Q0 15.996 0\n 15.56V9.33q0-.433.303-.736t.735-.303h7.27V6.218q0-2 1.422-3.423 1.423-1.423 3.424-1.423 2\n 0 3.424 1.424Q18 4.214 18 6.216"));return w(e,t,n,"icon-no-tls",r,i.cloneNode(!1))},n.err3xx=function(e,t,n,r){void 0===r&&(r=1),void 0===o&&(o=y.newPath("M17 2.333V7q0 .27-.198.47-.198.197-.47.197h-4.665q-.438 0-.615-.417-.177-.406.146-.72l1.437-1.436Q11.095\n 3.667 9 3.667q-1.083 0-2.068.422-.984.42-1.703 1.14-.72.715-1.14 1.7-.426.984-.426 2.07 0 1.08.422 2.065.42.984\n 1.14 1.703.718.72 1.702 1.14.984.422 2.067.422 1.24 0 2.344-.54 1.104-.543 1.864-1.533.073-.105.24-.126.146 0\n .26.095l1.427 1.436q.095.084.1.214.006.13-.08.234-1.133 1.376-2.75 2.13Q10.793 17 9 17q-1.625\n 0-3.104-.635-1.48-.636-2.552-1.71-1.073-1.072-1.71-2.55Q1 10.625 1 9t.635-3.104q.636-1.48 1.71-2.552\n 1.072-1.073 2.55-1.71Q7.375 1 9 1q1.53 0 2.964.578 1.432.578 2.546\n 1.63l1.355-1.343q.302-.323.73-.146.405.173.405.61z"));return w(e,t,n,"icon-redirect",r,o.cloneNode(!1))},n.err4xx=function(e,t,n,r){return void 0===r&&(r=1),C(e,t,n,r)},n.err5xx=function(e,t,n,r){return void 0===r&&(r=1),C(e,t,n,r)},n.plain=function(e,t,n,r){void 0===r&&(r=1),void 0===a&&(a=y.newPath("M15.247 4.393q.25.25.43.678.177.43.177.79v10.287q0\n .357-.25.607t-.607.25h-12q-.357 0-.607-.25t-.25-.606V1.858q0-.358.25-.608T2.997 1h8q.357 0\n .786.18.428.177.678.427zm-3.964-2.18V5.57h3.357q-.09-.256-.196-.364L11.65 2.41q-.108-.106-.367\n -.196zm3.428 13.644V6.714H11q-.357 0-.607-.25t-.25-.607V2.143h-6.86v13.714H14.71zM5.57\n 8.143q0-.125.08-.205.08-.08.204-.08h6.286q.125 0 .205.08.08.08.08.205v.57q0 .126-.08.207-.08.08\n -.205.08H5.854q-.125 0-.205-.08-.08-.08-.08-.206v-.57zm6.57 2q.125 0 .205.08.08.08.08.206V11q0\n .125-.08.205-.08.08-.205.08H5.854q-.125 0-.205-.08-.08-.08-.08-.205v-.57q0-.126.08-.207.08-.08.2\n -.08h6.286zm0 2.286q.125 0 .205.08.08.08.08.2v.572q0 .125-.08.205-.08.08-.205.08H5.854q-.125 0-.205\n -.08-.08-.08-.08-.205v-.572q0-.124.08-.204.08-.08.2-.08h6.286z"));return w(e,t,n,"icon-plain",r,a.cloneNode(!1))},n.other=function(e,t,n,r){void 0===r&&(r=1),void 0===s&&(s=y.newPath("M10.8 13.5v3q0 .2-.15.35-.15.15-.35.15h-3q-.2 0-.35-.15-.15-.15-.15-.35v-3q0-.2.15-.35.15\n -.15.35-.15h3q.2 0 .35.15.15.15.15.35zM14.75 6q0 .675-.193 1.262-.193.588-.437.957-.244.365\n -.688.74-.443.375-.718.543-.275.17-.763.444-.51.286-.852.81-.344.526-.344.84 0 .21-.15.405-.15.194\n -.35.194h-3q-.186 0-.318-.23-.13-.234-.13-.47v-.564q0-1.037.812-1.956.812-.917 1.787-1.355.74-.336\n 1.05-.7.314-.362.314-.95 0-.524-.583-.924-.58-.4-1.343-.4-.814 0-1.35.362-.44.312-1.34 1.437-.16.2\n -.386.2-.15 0-.313-.1L3.4 4.987q-.16-.124-.193-.312-.03-.188.07-.35Q5.277 1 9.077 1q1 0 2.01.387\n 1.01.388 1.825 1.038.812.65 1.325 1.594.51.94.51 1.98z"));return w(e,t,n,"icon-other",r,s.cloneNode(!1))},n.javascript=function(e,t,n,r){void 0===r&&(r=1),void 0===l&&(l=y.newPath("M13.516 2.9c-2.766 0-4.463 1.522-4.463 3.536 0 1.733 1.295 2.82 3.256 3.52\n 1.413.49 1.973.926 1.973 1.644 0 .787-.647 1.296-1.873 1.296-1.137 0-2.26-.368-2.96-.736l-.54\n 2.19c.665.367 1.996.734 3.344.734 3.238 0 4.744-1.68 4.744-3.658\n 0-1.68-.966-2.767-3.05-3.537-1.54-.6-2.186-.93-2.186-1.68 0-.6.56-1.14 1.714-1.14\n 1.137 0 1.996.33 2.45.56l.596-2.138c-.7-.332-1.663-.596-3.01-.596zm-9.032.192v7.44c0\n 1.822-.702 2.33-1.822 2.33-.525 0-.997-.09-1.365-.212L1 14.805c.525.175 1.33.28 1.96.28\n 2.574 0 4.185-1.173 4.185-4.534V3.097h-2.66z"));return w(e,t,n,"icon-js",r,l.cloneNode(!1))},n.image=b,n.svg=function(e,t,n,r){return void 0===r&&(r=1),b(e,t,n,r)},n.html=function(e,t,n,r){void 0===r&&(r=1),void 0===d&&(d=y.newPath("M5.626 13.31l-.492.492q-.098.098-.226.098t-.226-.098L.098 9.22Q0 9.12 0\n 8.99q0-.127.098-.226L4.682 4.18q.098-.097.226-.097t.226.098l.492.49q.1.1.1.23t-.1.23L1.76\n 8.99l3.866 3.866q.1.098.1.226t-.1.226zM11.44 2.815l-3.67\n 12.7q-.04.127-.152.19-.113.065-.23.026l-.61-.162q-.13-.04-.193-.152-.064-.112-.024-.24l3.67-12.698q.04\n -.128.157-.192.113-.064.23-.025l.61.167q.13.04.193.152.063.113.023.24zM17.9\n 9.22l-4.582 4.58q-.098.098-.226.098t-.226-.098l-.492-.492q-.1-.098-.1-.226t.1-.226L16.24\n 8.99l-3.867-3.865q-.1-.098-.1-.226t.1-.23l.492-.49q.098-.1.226-.1t.23.1l4.58 4.583q.1.1.1.226 0 .13-.1.23z"));return w(e,t,n,"icon-html",r,d.cloneNode(!1))},n.css=function(e,t,n,r){void 0===r&&(r=1),void 0===c&&(c=y.newPath("M15.436.99q.625 0 1.095.416.47.415.47 1.04 0 .564-.4 1.35-2.97 5.624-4.16 6.724-.865.814\n -1.946.814-1.127 0-1.935-.827-.81-.827-.81-1.962 0-1.144.822-1.895l5.705-5.175Q14.8.99\n 15.435.99zM7.31 10.232q.35.68.953 1.162.603.483 1.345.68l.01.634q.035 1.904-1.16 3.102-1.192\n 1.198-3.114 1.198-1.1 0-1.948-.416-.85-.415-1.364-1.14-.514-.723-.773-1.635Q1 12.905 1\n 11.85l.366.268q.304.224.555.398.25.175.53.327.277.15.41.15.368 0 .493-.33.224-.59.515-1.005.29\n -.415.62-.68.332-.263.788-.424.455-.16.92-.228.465-.066 1.118-.094z"));return w(e,t,n,"icon-css",r,c.cloneNode(!1))},n.warning=C,n.error=function(e,t,n,r){void 0===r&&(r=1),void 0===h&&(h=y.newPath("M9 1q2.177 0 4.016 1.073 1.838 1.073 2.91 2.91Q17 6.823 17 9q0 2.177-1.073 4.016-1.073\n 1.838-2.91 2.91Q11.177 17 9 17q-2.177 0-4.016-1.073-1.838-1.073-2.91-2.91Q1 11.177 1 9q0-2.177 1.073-4.016\n 1.073-1.838 2.91-2.91Q6.823 1 9 1zm1.333 12.99v-1.98q0-.145-.093-.244-.094-.1-.23-.1h-2q-.135 0-.24.105\n -.103.106-.103.24v1.98q0 .136.104.24.106.104.24.104h2q.137 0 .23-.1.094-.098.094-.243zm-.02-3.584l.187\n -6.468q0-.125-.104-.188-.104-.084-.25-.084H7.854q-.146 0-.25.084-.104.062-.104.188l.177 6.468q0\n .104.104.183.106.076.25.076h1.93q.146 0 .245-.078.1-.08.11-.184z"));return w(e,t,n,"icon-no-gzip",r,h.cloneNode(!1))},n.font=function(e,t,n,r){void 0===r&&(r=1),void 0===f&&(f=y.newPath("M7.97 5.754L6.338 10.08q.317 0 1.312.02.994.02 1.542.02.183 0 .548-.02-.836-2.432-1.77\n -4.345zM1 16.38l.02-.76q.22-.068.538-.12.317-.053.548-.102.23-.048.476-.14.245-.09.428-.278.182\n -.187.298-.485l2.28-5.923 2.69-6.962H9.51q.077.135.105.202l1.972 4.615q.317.75 1.02 2.476.7 1.726\n 1.095 2.64.144.327.558 1.39.413 1.062.692 1.62.192.432.336.547.183.145.847.284.663.14.807.197.058.37.058.55\n 0 .04-.005.13t-.005.128q-.605 0-1.827-.076-1.22-.08-1.836-.08-.73 0-2.067.07-1.337.067-1.712.076 0-.412.04\n -.75l1.258-.27q.01 0 .12-.022l.15-.033q.038-.01.14-.044.1-.034.143-.06l.1-.08q.06-.048.082-.106.024-.056.024\n -.133 0-.152-.298-.926t-.693-1.71q-.392-.93-.402-.96l-4.325-.02q-.25.56-.734 1.88-.487 1.32-.487 1.56 0\n .213.136.362.134.15.418.235.285.087.467.13.185.044.55.08.366.04.395.04.01.183.01.558 0 .087-.02.26-.558\n 0-1.678-.095-1.12-.098-1.678-.098-.08 0-.26.04-.18.037-.208.037-.77.136-1.808.136Z"));return w(e,t,n,"icon-font",r,f.cloneNode(!1))},n.flash=function(e,t,n,r){void 0===r&&(r=1),void 0===v&&(v=y.newPath("M13.724 4.738q.195.216.076.476L7.96 17.73q-.142.27-.456.27-.043 0-.15-.022-.185-.054-.277\n -.205-.092-.15-.05-.325l2.132-8.74L4.765 9.8q-.044.01-.13.01-.195 0-.336-.118-.193-.162-.14-.422L6.337.346q.043\n -.15.173-.25Q6.64 0 6.81 0h3.548q.206 0 .346.135.14.135.14.32 0 .086-.053.194L8.94 5.654l4.285\n -1.06q.086-.02.13-.02.205 0 .367.16z"));return w(e,t,n,"icon-flash",r,v.cloneNode(!1))},n.video=function(e,t,n,r){void 0===r&&(r=1),void 0===m&&(m=y.newPath("M17 4.107v9.714q0 .38-.348.53-.116.05-.223.05-.25 0-.41-.17l-3.6-3.6v1.48q0 1.067-.757 1.82-.754.756\n -1.817.756H3.57q-1.06 0-1.816-.753Q1 13.17 1 12.106V5.82q0-1.06.754-1.816.755-.754 1.817-.754h6.29q1.07 0\n 1.82.754.76.755.76 1.817V7.3l3.597-3.59q.16-.17.4-.17.107 0 .22.045.35.153.35.528z"));return w(e,t,n,"icon-video",r,m.cloneNode(!1))},n.audio=function(e,t,n,r){void 0===r&&(r=1),void 0===g&&(g=y.newPath("M8.385 3.756v10.46q0 .252-.183.434-.183.183-.433.183t-.44-.183l-3.2-3.202H1.61q-.25\n 0-.43-.183-.18-.182-.18-.432V7.14q0-.25.182-.432.182-.183.432-.183h2.52l3.202-3.202q.182-.183.432\n -.183t.43.183q.182.183.182.433zm3.692 5.23q0 .73-.41 1.36-.407.63-1.08.9-.097.048-.24.048-.25 0\n -.434-.178-.182-.177-.182-.437 0-.21.12-.35.12-.14.28-.24.16-.1.33-.22.166-.12.28-.34.117-.22.117\n -.55 0-.33-.115-.55-.115-.224-.28-.344-.163-.12-.326-.22-.165-.1-.28-.24-.116-.14-.116-.34 0-.26.183\n -.44t.43-.176q.146 0 .24.048.676.26 1.08.894.41.636.41 1.367zm2.46 0q0 1.472-.816 2.717t-2.16 1.813q\n -.12.048-.24.048-.26 0-.44-.183-.18-.18-.18-.43 0-.37.378-.56.54-.28.73-.42.713-.52 1.11-1.302.4\n -.783.4-1.667 0-.886-.4-1.67-.4-.783-1.11-1.303-.192-.145-.73-.424-.376-.192-.376-.567 0-.25.183\n -.434.183-.18.433-.18.123 0 .25.047 1.344.567 2.16 1.812.82 1.244.82 2.716zm2.463 0q0 2.212\n -1.22 4.063-1.222 1.85-3.25 2.72-.126.05-.25.05-.25 0-.434-.19-.183-.183-.183-.433 0-.346.375\n -.568.068-.04.217-.1.15-.064.216-.1.45-.244.79-.494 1.19-.875 1.85-2.183.67-1.306.67-2.777 0\n -1.47-.663-2.78-.664-1.304-1.846-2.18-.346-.25-.79-.49-.065-.035-.214-.1-.15-.06-.22-.1\n -.375-.22-.375-.57 0-.25.183-.43.183-.182.433-.182.123 0 .25.047 2.027.876 3.25 2.727Q17 6.775 17 8.99Z"));return w(e,t,n,"icon-audio",r,g.cloneNode(!1))}},{"./svg":6}],4:[function(e,t,n){"use strict";function r(e,t){var n=0;if(e&&!(e.length<1))for(var r=e.length;n a?o.authority.substr(0,a)+"..."+l[l.length-1].substr(-s):o.authority+"..."+l[l.length-1].substr(-s)},n.roundNumber=function(e,t){return void 0===t&&(t=2),Math.round(e*Math.pow(10,t))/Math.pow(10,t)},n.isInStatusCodeRange=function(e,t,n){return t<=e&&e<=n};var i=/[^a-z-]/g;n.toCssClass=function(e){return e.toLowerCase().replace(i,"")},n.pluralize=function(e,t){return e+(1 (local time: "+e.toLocaleString()+")":void 0};n.formatBytes=function(e){if(void 0===e)return"";var t=e+" bytes";return 1048576<=e?t+" (~"+r.roundNumber(e/1048576,1)+" MB)":1024<=e?t+" (~"+r.roundNumber(e/1024,0)+" kB)":t};var a={'"':""","&":"&","'":"'","<":"<",">":">"},s=new RegExp(Object.keys(a).join("|"),"g");n.escapeHtml=function(e){if(void 0===e&&(e=""),null==e)return"";if("string"!=typeof e){if("function"!=typeof e.toString)throw TypeError("Invalid parameter");e=e.toString()}return e.replace(s,function(e){return a[e]})};var l=new RegExp("[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]","g");n.sanitizeUrlForLink=function(e){var t=e.replace(l,"_");return 0===t.indexOf("http://")||0===t.indexOf("https://")?t:(console.warn("skipped link, due to potentially unsafe url",e),"")};var u=new RegExp("[^a-zA-Z0-9]","g");function d(e){return"number"==typeof e?e:"string"==typeof e?parseInt(e,10):void 0}n.sanitizeAlphaNumeric=function(e){return e.toString().replace(u,"")},n.toInt=d,n.validateOptions=function(n){var e=function(e){var t=d(n[e]);if(void 0===t)throw TypeError('option "'+e+'" needs to be a number');n[e]=t},t=function(e){n[e]=!!n[e]};return e("leftColumnWidth"),e("rowHeight"),e("selectedPage"),t("showAlignmentHelpers"),t("showIndicatorIcons"),t("showMimeTypeIcon"),n}},{"./misc":4}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var p=e("./dom"),h="http://www.w3.org/2000/svg";function r(e,t){var n=void 0===t?{}:t,r=n.attributes,i=void 0===r?{}:r,o=n.css,a=void 0===o?{}:o,s=n.text,l=void 0===s?"":s,u=n.className,d=void 0===u?"":u,c=document.createElementNS(h,e);return d&&p.addClass(c,d),l&&(c.textContent=l),p.safeSetStyles(c,a),p.safeSetAttributes(c,i),c}function i(e,t,n){return void 0===n&&(n={}),r("svg",{className:e,attributes:t,css:n})}n.newSvg=i,n.newG=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),r("g",{className:e,attributes:t,css:n})},n.newClipPath=function(e){return r("clipPath",{attributes:{id:e}})},n.newForeignObject=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n={}),r("foreignObject",{attributes:e,className:t,css:n})},n.newA=function(e){return r("a",{className:e})},n.newRect=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n={}),r("rect",{attributes:e,className:t,css:n})},n.newLine=function(e,t){return void 0===t&&(t=""),r("line",{className:t,attributes:e})},n.newTitle=function(e){var t=document.createElementNS(h,"title");return t.setAttribute("text",e),t},n.newTextEl=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),r("text",{text:e,attributes:t,css:n})},n.newPath=function(e){var t=document.createElementNS(h,"path");return t.setAttribute("d",e),t};var o,a,s=function(){void 0===o&&(o=i("water-fall-chart temp",{className:"water-fall-chart temp",width:"9999px"},{left:"0px",position:"absolute",top:"0px",visibility:"hidden","z-index":"99999"}));return void 0===o.parentElement&&window.document.body.appendChild(o),clearTimeout(a),a=setTimeout(function(){o.parentNode.removeChild(o)},500),o};n.getNodeTextWidth=function(e,t){if(void 0===t&&(t=!1),0===(e.textContent||"").length)return 0;var n,r,i=s();t?(r=e.style.textShadow,n=e):((n=e.cloneNode(!0)).setAttribute("x","0"),n.setAttribute("y","0")),n.style.textShadow="0",i.appendChild(n),window.document.body.appendChild(i);var o=n.getComputedTextLength();return t&&void 0!==r&&(e.style.textShadow=r),o}},{"./dom":1}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.makeLegend=function(){var e=document.createElement("ul");return e.className="resource-legend",e.innerHTML='\n Blocked \nDNS \nConnect \nSSL (TLS) \nSend \nWait \nReceive ',e}},{}],8:[function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=this.doc.pages.length&&(this.selectedPageIndex=this.doc.pages.length-1)}return e.prototype.getPageCount=function(){return this.doc.pages.length},e.prototype.getSelectedPage=function(){return this.doc.pages[this.selectedPageIndex]},e.prototype.getSelectedPageIndex=function(){return this.selectedPageIndex},e.prototype.setSelectedPageIndex=function(e){var t=this;if(this.selectedPageIndex!==e){if(e<0||e>=this.getPageCount())throw new Error("Page does not exist - Invalid pageIndex selected");this.selectedPageIndex=e;var n=this.doc.pages[this.selectedPageIndex];this.onPageUpdateCbs.forEach(function(e){e(t.selectedPageIndex,n)})}},e.prototype.onPageUpdate=function(e){if(1 ",i="",o=t.filter(function(e){return"error"===e.type}).map(function(e){return[e.title,e.description]}),a=t.filter(function(e){return"warning"===e.type}).map(function(e){return[e.title,e.description]}),s=t.filter(function(e){return"error"!==e.type&&"warning"!==e.type}).map(function(e){return[e.title,e.description]});return 0 '+f.pluralize("Error",o.length)+"\n "+g.makeDefinitionList(o)+"
"),0'+f.pluralize("Warning",a.length)+"\n "+g.makeDefinitionList(a)+"
"),0Info\n '+g.makeDefinitionList(s)+"
"),y("General",i+r)}(h.general,o)),p.push((a=h.request,s=h.requestHeaders,y("Request","\n "+g.makeDefinitionList(a)+"\n
\nAll Request Headers
\n\n "+g.makeDefinitionList(s)+"\n
"))),p.push((l=h.response,u=h.responseHeaders,y("Response","\n "+g.makeDefinitionList(l)+"\n
\nAll Response Headers
\n\n "+g.makeDefinitionList(u)+"\n
"))),p.push(y("Timings",g.makeDefinitionList(h.timings,!0))),p.push((d=e,w("Raw Data",function(){return""},"raw-data"))),"image"===n&&p.push((c=e,w("Preview",function(e){return'"+v.escapeHtml(JSON.stringify(d,null,2))+"'}))),p.filter(function(e){return void 0!==e})}},{"../helpers/misc":4,"../helpers/parse":5,"./extract-details-keys":10,"./helpers":14}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../helpers/misc"),p=e("../helpers/parse"),h=e("./har-heuristics"),f=e("./har-tabs"),v=e("./helpers");n.transformDoc=function(e,n){var r=void 0!==e.log?e.log:e;return{pages:m(r).map(function(e,t){return i(r,t,n)})}};var m=function(e){return e.pages&&0
l&&(l=e.startTime)}),n.fixedLengthMs&&(l=n.fixedLengthMs),{docIsTLS:u,durationMs:l+=100,entries:d,marks:c,title:o.title}}n.transformPage=i;var g=function(t,e,n){if(void 0===t)return[];var r=function(e,t){return e.startTime-t.startTime},i=Object.keys(t).filter(function(e){return"number"==typeof t[e]&&0<=t[e]}).map(function(e){return{name:p.escapeHtml(e.replace(/^[_]/,""))+" ("+o.roundNumber(t[e],0)+" ms)",startTime:t[e]}});return n.showUserTiming?a(e,n).concat(i).sort(r):i.sort(r)},a=function(o,a){var t=a.showUserTimingEndMarker?function(e){return 0===e.indexOf("_userTime.")}:function(e){return 0===e.indexOf("_userTime.")&&0!==e.indexOf("_userTime.endTimer-")},e=t;if(Array.isArray(a.showUserTiming)){var n=a.showUserTiming;e=function(e){return t(e)&&0<=n.indexOf(e.replace(/^_userTime\./,""))}}var s=/^_userTime\.((?:startTimer-)?(.+))$/;return Object.keys(o).filter(e).map(function(e){var t,n,r,i;return r=(t=s.exec(e)||[,void 0,void 0])[1],n=t[2],(r=p.escapeHtml(r))!==(n=p.escapeHtml(n))&&o["_userTime.endTimer-"+n]?{duration:i=o["_userTime.endTimer-"+n]-o[e],name:(a.showUserTimingEndMarker?r:n)+" ("+o[e]+" - "+(o[e]+i)+" ms)",startTime:o[e]}:{name:r,startTime:o[e]}})},y=function(a,s){var l=s.timings;return["blocked","dns","connect","send","wait","receive"].reduce(function(e,t){var n=u(t,s,e,a);if(n.end&&n.start>=n.end)return e;if("connect"===t&&l.ssl&&-1!==l.ssl){var r=parseInt(""+s._ssl_start,10)||n.start,i=parseInt(""+s._ssl_end,10)||n.start+l.ssl,o=parseInt(""+s._ssl_start,10)?n.start:i;return e.concat([v.createWaterfallEntryTiming("ssl",Math.round(r),Math.round(i))]).concat([v.createWaterfallEntryTiming(t,Math.round(o),Math.round(n.end))])}return e.concat([v.createWaterfallEntryTiming(t,Math.round(n.start),Math.round(n.end))])},[])},u=function(e,t,n,r){var i;switch(e){case"wait":i="ttfb";break;case"receive":i="download";break;default:i=e}var o=parseInt(t["_"+i+"_start"],10),a=parseInt(t["_"+i+"_end"],10),s=isNaN(o)?0 ")};n.makeDefinitionList=function(e,n){return void 0===n&&(n=!1),e.map(function(e){return"\n "+r(e[0])+" \n"+r(e[1])+" \n ";var t}).join("")},n.mimeToRequestType=function(e){if(void 0===e)return"other";var t=e.split("/"),n=t[1];switch(void 0!==n&&(n=-1"}).join("\n"),a=t.tabs.map(function(e){var t="tab";e.tabClass&&(t+=" "+e.tabClass);var n="";if(e.content)n=e.content;else{if("function"!=typeof e.renderContent)throw TypeError("Invalid Details Tab");n=e.renderContent(r),e.content=n}return' '+n+""}).join("\n");return i.innerHTML='\n\n\n ",n.appendChild(i),n}},{"../../helpers/dom":1,"../../helpers/parse":5}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var w=e("../../helpers/dom"),b=e("../../helpers/misc"),C=e("./svg-details-overlay"),r=function(){function y(e){this.context=e,this.openOverlays=[],this.realignRow=function(e,t){e.setAttribute("transform","translate(0, "+t+")")}}return y.prototype.getCombinedOverlayHeight=function(){return this.openOverlays.reduce(function(e,t){return e+(t.height||0)},0)},y.prototype.openOverlay=function(t,e,n,r,i){if(!this.openOverlays.some(function(e){return e.index===t})){var o=this,a={defaultY:e,entry:r,index:t,onClose:function(){o.closeOverlay(t,n,i)},openTabIndex:0};this.openOverlays.push(a),this.openOverlays=this.openOverlays.sort(function(e,t){return e.index>t.index?1:-1}),this.renderOverlays(n,i),this.context.pubSub.publishToOverlayChanges({changedIndex:t,combinedOverlayHeight:o.getCombinedOverlayHeight(),type:"open"})}},y.prototype.toggleOverlay=function(t,e,n,r,i){this.openOverlays.some(function(e){return e.index===t})?this.closeOverlay(t,n,i):this.openOverlay(t,e,n,r,i)},y.prototype.closeOverlay=function(r,e,t){this.openOverlays.splice(this.openOverlays.reduce(function(e,t,n){return t.index===r?n:e},-1),1),this.renderOverlays(e,t),this.context.pubSub.publishToOverlayChanges({changedIndex:r,combinedOverlayHeight:this.getCombinedOverlayHeight(),type:"closed"})},y.prototype.renderOverlays=function(f,e){var v=this,m=0,g=function(e,t,n){m+=n,e.actualY=t,e.height=n};e.forEach(function(e,t){var n=b.find(v.openOverlays,function(e){return e.index===t}),r=e.nextElementSibling,i=r.firstElementChild;if(v.realignRow(e,m),void 0!==n){if(i&&void 0!==n.actualY){var o=i.querySelector(".info-overlay-bg"),a=i.querySelector("foreignObject"),s=i.querySelector(".info-overlay-close-btn rect"),l=i.querySelector(".info-overlay-close-btn text");return g(n,n.defaultY+m,n.height),o.setAttribute("y",n.actualY.toString()),a.setAttribute("y",n.actualY.toString()),l.setAttribute("y",n.actualY.toString()),void s.setAttribute("y",n.actualY.toString())}var u,d,c,p,h;u=e.nextElementSibling,c=(d=n).defaultY+m,p=C.createRowInfoOverlay(d,c,f),(h=p.querySelector("img.preview"))&&!h.src&&h.setAttribute("src",(h.attributes.getNamedItem("data-src")||{value:""}).value),p.querySelector("a").addEventListener("keydown",y.firstElKeypress),w.getLastItemOfNodeList(p.querySelectorAll("button")).addEventListener("keydown",y.lastElKeypress),u.appendChild(p),g(d,c,p.getBoundingClientRect().height)}else i&&null!==r&&(r.querySelector("a").removeEventListener("keydown",y.firstElKeypress),w.getLastItemOfNodeList(r.querySelectorAll("button")).removeEventListener("keydown",y.lastElKeypress),w.removeChildren(r))})},y.showFullName=function(e){e.getElementsByClassName("row-fixed").item(0).dispatchEvent(new MouseEvent("mouseenter"))},y.firstElKeypress=function(e){if(b.isTabUp(e)){var t=w.getParentByClassName(e.target,"row-overlay-holder");t&&t.previousElementSibling&&y.showFullName(t.previousElementSibling)}},y.lastElKeypress=function(e){if(b.isTabDown(e)){var t=w.getParentByClassName(e.target,"row-overlay-holder");t&&t.nextElementSibling&&y.showFullName(t.nextElementSibling)}},y}();n.OverlayManager=r,n.default=r},{"../../helpers/dom":1,"../../helpers/misc":4,"./svg-details-overlay":19}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){this.subscribers=[]}return e.prototype.subscribeToOverlayChanges=function(e){this.subscribers.push(e)},e.prototype.subscribeToSpecificOverlayChanges=function(t,n){this.subscribers.push(function(e){e.changedIndex===t&&n(e)})},e.prototype.publishToOverlayChanges=function(t){this.subscribers.forEach(function(e){return e(t)})},e}();n.PubSub=r,n.default=r},{}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var m=e("../../helpers/dom"),g=e("../../helpers/svg"),y=e("./html-details-body");n.createRowInfoOverlay=function(e,t,n){var r,i,o,a,s,l,u=e.index+1,d=(r=t,i=n,o=g.newG("info-overlay-holder"),a=g.newRect({height:i,rx:2,ry:2,width:"100%",x:"0",y:r},"info-overlay-bg"),o.appendChild(a),o),c=g.newForeignObject({height:n,width:"100%",x:"0",y:t}),p=(s=t,(l=g.newA("info-overlay-close-btn")).appendChild(g.newRect({height:23,width:23,x:"100%",y:s})),l.appendChild(g.newTextEl("✕",{dx:7,dy:16,x:"100%",y:s})),l.appendChild(g.newTitle("Close Overlay")),l);p.addEventListener("click",function(){return e.onClose(e.index)});var h=y.createDetailsBody(u,n,e.entry),f=function(){return h.getElementsByClassName("tab-button")},v=function(n){e.openTabIndex=n,m.forEachNodeList(h.getElementsByClassName("tab"),function(e,t){e.style.display=n===t?"block":"none",f().item(t).classList.toggle("active",n===t)})};return m.forEachNodeList(f(),function(e,t){e.addEventListener("click",function(){return v(t)})}),v(e.openTabIndex),c.appendChild(h),d.appendChild(c),d.appendChild(p),d}},{"../../helpers/dom":1,"../../helpers/svg":6,"./html-details-body":16}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s=e("../../helpers/misc");function l(e,t){return{type:e,title:t,width:20}}n.makeIcon=l,n.getIndicatorIcons=function(e){var t=e.responseDetails.indicators.filter(function(e){return"icon"===e.displayType});if(0===t.length)return[];var n=[],r="",i=t.filter(function(e){return"error"===e.type}),o=t.filter(function(e){return"warning"===e.type}),a=t.filter(function(e){return"error"!==e.type&&"warning"!==e.type});return 0\n \n "+a+"\n#'+e+' \n '+l.escapeHtml(t.url)+'\n
\n \ntotal: "+Math.round(r.total)+"ms",{cssClass:w.timingTypeToCssClass(r.type),height:i.height-6,hideOverlay:i.hideOverlay,label:""+r.type+"
"+Math.round(r.start)+"ms - "+Math.round(r.end)+"ms"+o,showOverlay:i.showOverlay,unit:i.unit,width:r.total,x:r.start||.001,y:i.y}),n=b(t,"segment "+t.cssClass);m=Math.min(m,t.x),v.appendChild(n)}var r,i,o}),g.find(e.responseDetails.indicators,function(e){return"push"===e.id})&&v.appendChild((d=(u=a).y+u.height/1.5,c=g.roundNumber(u.x/u.unit)+"%",(p=y.newG("http2-inidicator-holder")).appendChild(y.newTextEl("→",{transform:"translate(-5)",x:c,y:d},{fillOpacity:"0.6","text-anchor":"end"})),p.appendChild(y.newTitle("http2 Push")),p)),v.appendChild((t=a,n=e.total,r=m,i=t.y+t.height/1.5,o=Math.round(n)+" ms",s=(t.x+t.width)/t.unit+1,l=y.newTextEl(o,{x:g.roundNumber(s)+"%",y:i}),100');return i.appendChild(o),r.appendChild(i),n.appendChild(r),n}},{"../../helpers/dom":1,"../../helpers/svg":6}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../../helpers/dom"),r=e("../../helpers/svg");n.createAlignmentLines=function(e){return{endline:r.newLine({x1:"0",x2:"0",y1:"0",y2:e},"line-end"),startline:r.newLine({x1:"0",x2:"0",y1:"0",y2:e},"line-start")}},n.makeHoverEvtListeners=function(i){return{onMouseEnterPartial:function(){return function(e){var t=e.target;o.addClass(t,"active");var n=t.x.baseVal.valueInSpecifiedUnits+t.width.baseVal.valueInSpecifiedUnits+"%",r=t.x.baseVal.valueInSpecifiedUnits+"%";i.endline.x1.baseVal.valueAsString=n,i.endline.x2.baseVal.valueAsString=n,i.startline.x1.baseVal.valueAsString=r,i.startline.x2.baseVal.valueAsString=r,o.addClass(i.endline,"active"),o.addClass(i.startline,"active")}},onMouseLeavePartial:function(){return function(e){var t=e.target;o.removeClass(t,"active"),o.removeClass(i.endline,"active"),o.removeClass(i.startline,"active")}}}}},{"../../helpers/dom":1,"../../helpers/svg":6}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var h=e("../../helpers/misc"),f=e("../../helpers/svg"),l=function(e,t,n,r,i){void 0===i&&(i=!1);var o,a,s=e.diagramHeight,l=100/n,u="sub-second-line";if(i){var d=n-.2"+e.url+"
"+Math.round(e.start)+"ms - "+Math.round(e.end)+"ms
total: "+(isNaN(e.total)?"n/a ":Math.round(e.total))+"ms",showOverlay:s.showAlignmentHelpers?d.onMouseEnterPartial:void 0,unit:f.unit,width:n,x:i,y:r},a=P.createRow(f,t,x,q,o,e,function(){f.overlayManager.toggleOverlay(t,r+s.rowHeight,450,e,S)});S.push(a),h.appendChild(a),h.appendChild(M.newG("row-overlay-holder"))}),s.showAlignmentHelpers&&void 0!==u&&g.appendChild(u),m.appendChild(g),m.appendChild(h),m.appendChild(p),m.appendChild(N.makeTooltip(s)),m}},{"../helpers/svg":6,"../transformers/styling-converters":15,"./details-overlay/overlay-manager":17,"./details-overlay/pub-sub":18,"./row/svg-row":22,"./row/svg-tooltip":23,"./sub-components/svg-alignment-helper":24,"./sub-components/svg-general-components":25,"./sub-components/svg-marks":26}]},{},[8])(8)}); \ No newline at end of file diff --git a/assets/8.7.1/js/sortable.min.js b/assets/8.7.1/js/sortable.min.js new file mode 100644 index 000000000..8278f504c --- /dev/null +++ b/assets/8.7.1/js/sortable.min.js @@ -0,0 +1,2 @@ +/*! sortable.js 0.8.0 */ +(function(){var a,b,c,d,e,f,g;a="table[data-sortable]",d=/^-?[£$¤]?[\d,.]+%?$/,g=/^\s+|\s+$/g,c=["click"],f="ontouchstart"in document.documentElement,f&&c.push("touchstart"),b=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)},e={init:function(b){var c,d,f,g,h;for(null==b&&(b={}),null==b.selector&&(b.selector=a),d=document.querySelectorAll(b.selector),h=[],f=0,g=d.length;g>f;f++)c=d[f],h.push(e.initTable(c));return h},initTable:function(a){var b,c,d,f,g,h;if(1===(null!=(h=a.tHead)?h.rows.length:void 0)&&"true"!==a.getAttribute("data-sortable-initialized")){for(a.setAttribute("data-sortable-initialized","true"),d=a.querySelectorAll("th"),b=f=0,g=d.length;g>f;b=++f)c=d[b],"false"!==c.getAttribute("data-sortable")&&e.setupClickableTH(a,c,b);return a}},setupClickableTH:function(a,d,f){var g,h,i,j,k,l;for(i=e.getColumnType(a,f),h=function(b){var c,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;if(b.handled===!0)return!1;for(b.handled=!0,m="true"===this.getAttribute("data-sorted"),n=this.getAttribute("data-sorted-direction"),h=m?"ascending"===n?"descending":"ascending":i.defaultSortDirection,p=this.parentNode.querySelectorAll("th"),s=0,w=p.length;w>s;s++)d=p[s],d.setAttribute("data-sorted","false"),d.removeAttribute("data-sorted-direction");if(this.setAttribute("data-sorted","true"),this.setAttribute("data-sorted-direction",h),o=a.tBodies[0],l=[],m){for(D=o.rows,v=0,z=D.length;z>v;v++)g=D[v],l.push(g);for(l.reverse(),B=0,A=l.length;A>B;B++)k=l[B],o.appendChild(k)}else{for(r=null!=i.compare?i.compare:function(a,b){return b-a},c=function(a,b){return a[0]===b[0]?a[2]-b[2]:i.reverse?r(b[0],a[0]):r(a[0],b[0])},C=o.rows,j=t=0,x=C.length;x>t;j=++t)k=C[j],q=e.getNodeValue(k.cells[f]),null!=i.comparator&&(q=i.comparator(q)),l.push([q,k,j]);for(l.sort(c),u=0,y=l.length;y>u;u++)k=l[u],o.appendChild(k[1])}return"function"==typeof window.CustomEvent&&"function"==typeof a.dispatchEvent?a.dispatchEvent(new CustomEvent("Sortable.sorted",{bubbles:!0})):void 0},l=[],j=0,k=c.length;k>j;j++)g=c[j],l.push(b(d,g,h));return l},getColumnType:function(a,b){var c,d,f,g,h,i,j,k,l,m,n;if(d=null!=(l=a.querySelectorAll("th")[b])?l.getAttribute("data-sortable-type"):void 0,null!=d)return e.typesObject[d];for(m=a.tBodies[0].rows,h=0,j=m.length;j>h;h++)for(c=m[h],f=e.getNodeValue(c.cells[b]),n=e.types,i=0,k=n.length;k>i;i++)if(g=n[i],g.match(f))return g;return e.typesObject.alpha},getNodeValue:function(a){var b;return a?(b=a.getAttribute("data-value"),null!==b?b:"undefined"!=typeof a.innerText?a.innerText.replace(g,""):a.textContent.replace(g,"")):""},setupTypes:function(a){var b,c,d,f;for(e.types=a,e.typesObject={},f=[],c=0,d=a.length;d>c;c++)b=a[c],f.push(e.typesObject[b.name]=b);return f}},e.setupTypes([{name:"numeric",defaultSortDirection:"descending",match:function(a){return a.match(d)},comparator:function(a){return parseFloat(a.replace(/[^0-9.-]/g,""),10)||0}},{name:"date",defaultSortDirection:"ascending",reverse:!0,match:function(a){return!isNaN(Date.parse(a))},comparator:function(a){return Date.parse(a)||0}},{name:"alpha",defaultSortDirection:"ascending",match:function(){return!0},compare:function(a,b){return a.localeCompare(b)}}]),setTimeout(e.init,0),"function"==typeof define&&define.amd?define(function(){return e}):"undefined"!=typeof exports?module.exports=e:window.Sortable=e}).call(this); \ No newline at end of file diff --git a/assets/8.7.1/js/video.novtt.min.js b/assets/8.7.1/js/video.novtt.min.js new file mode 100755 index 000000000..79aa97691 --- /dev/null +++ b/assets/8.7.1/js/video.novtt.min.js @@ -0,0 +1,6 @@ +!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){xe(t).forEach(function(r){return e(t[r],r)})}function e(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return xe(t).reduce(function(r,n){return e(r,t[n],n)},r)}function r(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],o=Jt.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Ne.warn(Me(Ie,t,r)),o.setAttribute(t,r)):"textContent"===t?v(o,r):o[t]=r}),Object.getOwnPropertyNames(r).forEach(function(t){o.setAttribute(t,r[t])}),n&&I(o,n),o}function v(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function y(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function g(t,e){return l(e),t.classList?t.classList.contains(e):c(e).test(t.className)}function m(t,e){return t.classList?t.classList.add(e):g(t,e)||(t.className=(t.className+" "+e).trim()),t}function _(t,e){return t.classList?t.classList.remove(e):(l(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function b(t,e,r){var n=g(t,e);if("function"==typeof r&&(r=r(t,e)),"boolean"!=typeof r&&(r=!n),r!==n)return r?m(t,e):_(t,e),t}function T(t,e){Object.getOwnPropertyNames(e).forEach(function(r){var n=e[r];null===n||void 0===n||!1===n?t.removeAttribute(r):t.setAttribute(r,!0===n?"":n)})}function C(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,n=r.length-1;n>=0;n--){var o=r[n].name,i=r[n].value;"boolean"!=typeof t[o]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+o+",")||(i=null!==i),e[o]=i}return e}function k(t,e){return t.getAttribute(e)}function E(t,e,r){t.setAttribute(e,r)}function w(t,e){t.removeAttribute(e)}function S(){Jt.body.focus(),Jt.onselectstart=function(){return!1}}function x(){Jt.onselectstart=function(){return!0}}function j(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),r={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(r[t]=e[t])}),r.height||(r.height=parseFloat(s(t,"height"))),r.width||(r.width=parseFloat(s(t,"width"))),r}}function P(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var r=Jt.documentElement,n=Jt.body,o=r.clientLeft||n.clientLeft||0,i=Kt.pageXOffset||n.scrollLeft,s=e.left+i-o,a=r.clientTop||n.clientTop||0,l=Kt.pageYOffset||n.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function A(t,e){var r={},n=P(t),o=t.offsetWidth,i=t.offsetHeight,s=n.top,a=n.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),r.y=Math.max(0,Math.min(1,(s-l+i)/i)),r.x=Math.max(0,Math.min(1,(c-a)/o)),r}function O(t){return n(t)&&3===t.nodeType}function N(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function M(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),h(t)||O(t)?t:"string"==typeof t&&/\S/.test(t)?Jt.createTextNode(t):void 0}).filter(function(t){return t})}function I(t,e){return M(e).forEach(function(e){return t.appendChild(e)}),t}function D(t,e){return I(N(t),e)}function F(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===ve||0===t.button&&1===t.buttons))}function L(){return Re++}function R(t){var e=t[He];return e||(e=t[He]=L()),Be[e]||(Be[e]={}),Be[e]}function B(t){var e=t[He];return!!e&&!!Object.getOwnPropertyNames(Be[e]).length}function H(t){var e=t[He];if(e){delete Be[e];try{delete t[He]}catch(e){t.removeAttribute?t.removeAttribute(He):t[He]=null}}}function V(t,e){var r=R(t);0===r.handlers[e].length&&(delete r.handlers[e],t.removeEventListener?t.removeEventListener(e,r.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,r.dispatcher)),Object.getOwnPropertyNames(r.handlers).length<=0&&(delete r.handlers,delete r.dispatcher,delete r.disabled),0===Object.getOwnPropertyNames(r).length&&H(t)}function z(t,e,r,n){r.forEach(function(r){t(e,r,n)})}function W(t){function e(){return!0}function r(){return!1}if(!t||!t.isPropagationStopped){var n=t||Kt.event;t={};for(var o in n)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&n.preventDefault||(t[o]=n[o]));if(t.target||(t.target=t.srcElement||Jt),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=r,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=r,null!==t.clientX&&void 0!==t.clientX){var i=Jt.documentElement,s=Jt.body;t.pageX=t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.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 U(t,e,r){if(Array.isArray(e))return z(U,t,e,r);var n=R(t);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),r.guid||(r.guid=L()),n.handlers[e].push(r),n.dispatcher||(n.disabled=!1,n.dispatcher=function(e,r){if(!n.disabled){e=W(e);var o=n.handlers[e.type];if(o)for(var i=o.slice(0),s=0,a=i.length;s-1&&(o={passive:!0}),t.addEventListener(e,n.dispatcher,o)}else t.attachEvent&&t.attachEvent("on"+e,n.dispatcher)}function q(t,e,r){if(B(t)){var n=R(t);if(n.handlers){if(Array.isArray(e))return z(q,t,e,r);var o=function(t,e){n.handlers[e]=[],V(t,e)};if(void 0!==e){var i=n.handlers[e];if(i){if(!r)return void o(t,e);if(r.guid)for(var s=0;s 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_=f("span",{className:"vjs-event-bus"});return r(t,sr),t.on("dispose",function(){t.off(),Kt.setTimeout(function(){t.eventBusEl_=null},0)}),t}function $(t,e){return r(t,ar),t.state=r({},t.state,e),"function"==typeof t.handleStateChanged&&Ze(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 e={},r=arguments.length,n=Array(r),i=0;i r)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+r+").")}function et(t,e,r,n){return tt(t,n,r.length-1),r[n][e]}function rt(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 nt(t,e){return Array.isArray(t)?rt(t):void 0===t||void 0===e?rt():rt([[t,e]])}function ot(t,e){var r=0,n=void 0,o=void 0;if(!e)return 0;t&&t.length||(t=nt(0,0));for(var i=0;i e&&(o=e),r+=o-n;return r/e}function it(t){if(t instanceof it)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:n(t)&&("number"==typeof t.code&&(this.code=t.code),r(this,t)),this.message||(this.message=it.defaultMessages[this.code]||"")}function st(t,e){var r,n=null;try{r=JSON.parse(t,e)}catch(t){n=t}return[n,r]}function at(t){return void 0!==t&&null!==t&&"function"==typeof t.then}function lt(t){at(t)&&t.then(null,function(t){})}function ct(t){var e=Wr.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 ut(t,e,r){if(!zr(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===Kr.call(t)?ht(t,e,r):"string"==typeof t?pt(t,e,r):dt(t,e,r)}function ht(t,e,r){for(var n=0,o=t.length;n 0&&(u=setTimeout(function(){if(!c){c=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}},t.timeout)),a.setRequestHeader)for(l in f)f.hasOwnProperty(l)&&a.setRequestHeader(l,f[l]);else if(t.headers&&!vt(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 _t(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 bt(){}function Tt(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=t.textTracks();o.kind=e,r&&(o.label=r),n&&(o.language=n),o.tech=t;var s=new un.text.TrackClass(o);return i.addTrack(s),s}function Ct(t,e){dn[t]=dn[t]||[],dn[t].push(e)}function kt(t,e,r){t.setTimeout(function(){return Nt(e,dn[e.type],r,t)},1)}function Et(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function wt(t,e,r){return t.reduceRight(jt(r),e[r]())}function St(t,e,r,n){return e[r](t.reduce(jt(r),n))}function xt(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="call"+J(r),i=t.reduce(jt(o),n),s=i===vn,a=s?null:e[r](i);return Pt(t,r,a,s),a}function jt(t){return function(e,r){return e===vn?vn:r[t]?r[t](e):e}}function Pt(t,e,r,n){for(var o=t.length-1;o>=0;o--){var i=t[o];i[e]&&i[e](n,r)}}function At(t){fn[t.id()]=null}function Ot(t,e){var r=fn[t.id()],n=null;if(void 0===r||null===r)return n=e(t),fn[t.id()]=[[e,n]],n;for(var o=0;o 0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],o=arguments[3],i=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)Nt(t,dn[a],n,o,i,s);else if(a){var c=Ot(o,a);c.setSource(r({},t),function(e,r){if(e)return Nt(t,l,n,o,i,s);i.push(c),Nt(r,t.type===r.type?l:dn[r.type],n,o,i,s)})}else l.length?Nt(t,l,n,o,i,s):s?n(t,i):Nt(t,dn["*"],n,o,i,!0)}function Mt(t){var e=Br(t.src),r=_n[e.toLowerCase()];return!t.type&&r&&(t.type=r),t}function It(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function Dt(t,e,r){try{t.style[e]=r}catch(t){return}}function Ft(t){Nn=t}function Lt(){Nn=On}function Rt(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function Bt(t,e){return Rt(t.options[t.options.selectedIndex].value,e)}function Ht(t,e,r){if(e)for(var n=0;n 2&&void 0!==arguments[2]?arguments[2]:!!ve&&ve<11,o=je.levels[Pe],i=new RegExp("^("+o+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),Ae&&Ae.push([].concat(e)),e.unshift("VIDEOJS:"),Kt.console){var s=Kt.console[t];s||"debug"!==t||(s=Kt.console.info||Kt.console.log),s&&o&&i.test(t)&&(r&&(e=e.map(function(t){if(n(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"](Kt.console,e):s(e))}};je=function(){for(var t=arguments.length,e=Array(t),r=0;r 0)for(var o=0,i=t.length;o0)for(var s=0,a=e.length;s0)for(var l=0,c=r.length;l 0)for(var h=0,p=n.length;h ',t=e.firstChild.href}return t},Br=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,r=e.exec(t);if(r)return r.pop().toLowerCase()}return""},Hr=function(t){var e=Kt.location,r=Lr(t);return(":"===r.protocol?e.protocol:r.protocol)+r.host!==e.protocol+e.host},Vr=(Object.freeze||Object)({parseUrl:Lr,getAbsoluteURL:Rr,getFileExtension:Br,isCrossOrigin:Hr}),zr=ct,Wr=Object.prototype.toString,Ur=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t,e){function r(t){return t.replace(/^\s*|\s*$/g,"")}e=t.exports=r,e.left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),qr=ut,Kr=Object.prototype.toString,Xr=Object.prototype.hasOwnProperty,Gr=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Yr=function(t){if(!t)return{};var e={};return qr(Ur(t).split("\n"),function(t){var r=t.indexOf(":"),n=Ur(t.slice(0,r)).toLowerCase(),o=Ur(t.slice(r+1));void 0===e[n]?e[n]=o:Gr(e[n])?e[n].push(o):e[n]=[e[n],o]}),e},$r=ft,Jr=Object.prototype.hasOwnProperty,Qr=gt;gt.XMLHttpRequest=Kt.XMLHttpRequest||bt,gt.XDomainRequest="withCredentials"in new gt.XMLHttpRequest?gt.XMLHttpRequest:Kt.XDomainRequest,function(t,e){for(var r=0;r=e&&(t.apply(void 0,arguments),r=n)}},Je=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Kt,o=void 0;return function(){var i=this,s=arguments,a=function(){o=null,a=null,r||t.apply(i,s)};!o&&r&&t.apply(i,s),n.clearTimeout(o),o=n.setTimeout(a,e)}},Qe=function(){};Qe.prototype.allowedEvents_={},Qe.prototype.on=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},U(this,t,e),this.addEventListener=r},Qe.prototype.addEventListener=Qe.prototype.on,Qe.prototype.off=function(t,e){q(this,t,e)},Qe.prototype.removeEventListener=Qe.prototype.off,Qe.prototype.one=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},X(this,t,e),this.addEventListener=r},Qe.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=W(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),K(this,t)},Qe.prototype.dispatchEvent=Qe.prototype.trigger;var Ze=function(t){return t instanceof Qe||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},tr=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},er=function(t){if(!t.nodeName&&!Ze(t))throw new Error("Invalid target; must be a DOM node or evented object.")},rr=function(t){if(!tr(t))throw new Error("Invalid event type; must be a non-empty string or array.")},nr=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},or=function(t,e){var r=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,o=void 0,i=void 0;return r?(n=t.eventBusEl_,e.length>=3&&e.shift(),o=e[0],i=e[1]):(n=e[0],o=e[1],i=e[2]),er(n),rr(o),nr(i),i=Ye(t,i),{isTargetingSelf:r,target:n,type:o,listener:i}},ir=function(t,e,r,n){er(t),t.nodeName?We[e](t,r,n):t[e](r,n)},sr={on:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n
=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_),H(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return Ne.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,r){return f(t,e,r)},t.prototype.localize=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),i=o&&o[n],s=n&&n.split("-")[0],a=o&&o[s],l=r;return i&&i[t]?l=i[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,function(t,r){var n=e[r-1],o=n;return void 0===n&&(o=t),o})),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 r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,o=void 0,i=void 0;if("string"==typeof e){i=J(e);var s=r.componentClass||i;r.name=i;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;o=new a(this.player_||this,r)}else o=e;if(this.children_.splice(n,0,o),"function"==typeof o.id&&(this.childIndex_[o.id()]=o),i=i||o.name&&J(o.name()),i&&(this.childNameIndex_[i]=o),"function"==typeof o.el&&o.el()){var l=this.contentEl().children,c=l[n]||null;this.contentEl().insertBefore(o.el(),c)}return o},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,r=this.children_.length-1;r>=0;r--)if(this.children_[r]===t){e=!0,this.children_.splice(r,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,r=this.options_.children;if(r){var n=this.options_,o=function(t){var r=t.name,o=t.opts;if(void 0!==n[r]&&(o=n[r]),!1!==o){!0===o&&(o={}),o.playerOptions=e.options_.playerOptions;var i=e.addChild(r,o);i&&(e[r]=i)}},i=void 0,s=t.getComponent("Tech");i=Array.isArray(r)?r:Object.keys(r),i.concat(Object.keys(this.options_).filter(function(t){return!i.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var n=void 0,o=void 0;return"string"==typeof t?(n=t,o=r[n]||e.options_[n]||{}):(n=t.name,o=t),{name:n,opts:o}}).filter(function(e){var r=t.getComponent(e.opts.componentClass||J(e.name));return r&&!s.isTech(r)}).forEach(o)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void 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 De(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Fe(t,e||this.contentEl())},t.prototype.hasClass=function(t){return g(this.el_,t)},t.prototype.addClass=function(t){m(this.el_,t)},t.prototype.removeClass=function(t){_(this.el_,t)},t.prototype.toggleClass=function(t,e){b(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 k(this.el_,t)},t.prototype.setAttribute=function(t,e){E(this.el_,t,e)},t.prototype.removeAttribute=function(t){w(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,r){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(r||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],o=n.indexOf("px");return-1!==o?parseInt(n.slice(0,o),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 Kt.getComputedStyle){var r=Kt.getComputedStyle(this.el_);e=r.getPropertyValue(t)||r[t]}if(0===(e=parseFloat(e))){var n="offset"+J(t);e=this.el_[n]}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,r=void 0;this.on("touchstart",function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),r=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)r=!1;else if(e){var n=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,i=Math.sqrt(n*n+o*o);i>10&&(r=!1)}});var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){if(e=null,!0===r){(new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=Ye(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var r=function(r){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",r),this.on("touchcancel",r)}},t.prototype.setTimeout=function(t,e){var r=this;t=Ye(this,t);var n=Kt.setTimeout(t,e),o=function(){return r.clearTimeout(n)};return o.guid="vjs-timeout-"+n,this.on("dispose",o),n},t.prototype.clearTimeout=function(t){Kt.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var r=this;t=Ye(this,t);var n=Kt.setInterval(t,e),o=function(){return r.clearInterval(n)};return o.guid="vjs-interval-"+n,this.on("dispose",o),n},t.prototype.clearInterval=function(t){Kt.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=Ye(this,t);var r=Kt.requestAnimationFrame(t),n=function(){return e.cancelAnimationFrame(r)};return n.guid="vjs-raf-"+r,this.on("dispose",n),r}return this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){Kt.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,r){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),o=n&&n.isTech(r),i=t===r||t.prototype.isPrototypeOf(r.prototype);if(o||!i){var s=void 0;throw s=o?"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]=r,r},t.getComponent=function(e){if(e)return e=J(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();lr.prototype.supportsRaf_="function"==typeof Kt.requestAnimationFrame&&"function"==typeof Kt.cancelAnimationFrame,lr.registerComponent("Component",lr);for(var cr={},ur=[["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"]],hr=ur[0],pr=void 0,dr=0;dr 0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ce(this,e);var i=Ee(this,t.call(this));if(!o&&(o=i,fe)){o=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}o.tracks_=[],Object.defineProperty(o,"length",{get:function(){return this.tracks_.length}});for(var a=0;a 0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);for(var i=void 0,s=o.length-1;s>=0;s--)if(o[s].enabled){wr(o,o[s]);break}if(fe){i=Jt.createElement("custom");for(var a in kr.prototype)"constructor"!==a&&(i[a]=kr.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(i[l]=e.prototype[l])}return i=r=Ee(this,t.call(this,o,i)),i.changing_=!1,n=i,Ee(r,n)}return ke(e,t),e.prototype.addTrack=function(e){var r=this;e.enabled&&wr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){r.changing_||(r.changing_=!0,wr(r,e),r.changing_=!1,r.trigger("change"))})},e}(kr),xr=function(t,e){for(var r=0;r 0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);for(var i=void 0,s=o.length-1;s>=0;s--)if(o[s].selected){xr(o,o[s]);break}if(fe){i=Jt.createElement("custom");for(var a in kr.prototype)"constructor"!==a&&(i[a]=kr.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(i[l]=e.prototype[l])}return i=r=Ee(this,t.call(this,o,i)),i.changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var t=0;t 0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,e);var i=void 0;if(fe){i=Jt.createElement("custom");for(var s in kr.prototype)"constructor"!==s&&(i[s]=kr.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(i[a]=e.prototype[a])}return i=r=Ee(this,t.call(this,o,i)),n=i,Ee(r,n)}return ke(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",Ye(this,function(){this.trigger("change")})),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",Ye(this,function(){this.trigger("selectedlanguagechange")}))},e}(kr),Ar=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Ce(this,t);var r=this;if(fe){r=Jt.createElement("custom");for(var n in t.prototype)"constructor"!==n&&(r[n]=t.prototype[n])}r.trackElements_=[],Object.defineProperty(r,"length",{get:function(){return this.trackElements_.length}});for(var o=0,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var o=Ee(this,t.call(this)),i=o;if(fe){i=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}var a={id:n.id||"vjs_track_"+L(),kind:n.kind||"",label:n.label||"",language:n.language||""};for(var l in a)!function(t){Object.defineProperty(i,t,{get:function(){return a[t]},set:function(){}})}(l);return r=i,Ee(o,r)}return ke(e,t),e}(Qe),Lr=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],r=Jt.createElement("a");r.href=t;var n=""===r.host&&"file:"!==r.protocol,o=void 0;n&&(o=Jt.createElement("div"),o.innerHTML='',r=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),Jt.body.appendChild(o));for(var i={},s=0;s x 0&&(Kt.console&&Kt.console.groupCollapsed&&Kt.console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach(function(t){return Ne.error(t)}),Kt.console&&Kt.console.groupEnd&&Kt.console.groupEnd()),r.flush()},tn=function(t,e){var r={uri:t},n=Hr(t);n&&(r.cors=n),Qr(r,Ye(this,function(t,r,n){if(t)return Ne.error(t,r);if(e.loaded_=!0,"function"!=typeof Kt.WebVTT){if(e.tech_){var o=function(){return Zr(n,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",function(){Ne.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)})}}else Zr(n,e)}))},en=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ce(this,e),!o.tech)throw new Error("A tech was not provided.");var i=Z(o,{kind:Ir[o.kind]||"subtitles",language:o.language||o.srclang||""}),s=Dr[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(s="hidden");var l=r=Ee(this,t.call(this,i));if(l.tech_=i.tech,fe)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Or(l.cues_),h=new Or(l.activeCues_),p=!1,d=Ye(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;Dr[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=[],r=0,n=this.cues.length;r =t?e.push(o):o.startTime===o.endTime&&o.startTime<=t&&o.startTime+.5>=t&&e.push(o)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var i=0;i 0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var i=Z(o,{kind:Mr[o.kind]||""}),s=r=Ee(this,t.call(this,i)),a=!1;if(fe)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"))}}),i.enabled&&(s.enabled=i.enabled),s.loaded_=!0,n=s,Ee(r,n)}return ke(e,t),e}(Fr),nn=function(t){function e(){var r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var i=Z(o,{kind:Nr[o.kind]||""}),s=r=Ee(this,t.call(this,i)),a=!1;if(fe)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"))}}),i.selected&&(s.selected=i.selected),n=s,Ee(r,n)}return ke(e,t),e}(Fr),on=0,sn=2,an=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,e);var n=Ee(this,t.call(this)),o=void 0,i=n;if(fe){i=Jt.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}var a=new en(r);if(i.kind=a.kind,i.src=a.src,i.srclang=a.language,i.label=a.label,i.default=a.default,Object.defineProperty(i,"readyState",{get:function(){return o}}),Object.defineProperty(i,"track",{get:function(){return a}}),o=on,a.addEventListener("loadeddata",function(){o=sn,i.trigger({type:"load",target:i})}),fe){var l;return l=i,Ee(n,l)}return n}return ke(e,t),e}(Qe);an.prototype.allowedEvents_={load:"load"},an.NONE=on,an.LOADING=1,an.LOADED=sn,an.ERROR=3;var ln={audio:{ListClass:Sr,TrackClass:rn,capitalName:"Audio"},video:{ListClass:jr,TrackClass:nn,capitalName:"Video"},text:{ListClass:Pr,TrackClass:en,capitalName:"Text"}};Object.keys(ln).forEach(function(t){ln[t].getterName=t+"Tracks",ln[t].privateName=t+"Tracks_"});var cn={remoteText:{ListClass:Pr,TrackClass:en,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ar,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},un=Z(ln,cn);cn.names=Object.keys(cn),ln.names=Object.keys(ln),un.names=[].concat(cn.names).concat(ln.names);var hn={},pn=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Ce(this,e),r.reportTouchActivity=!1;var o=Ee(this,t.call(this,null,r,n));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),un.names.forEach(function(t){var e=un[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===r["native"+t+"Tracks"]&&(o["featuresNative"+t+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new un.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return ke(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",function(){return e.setTimeout(function(){return e.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},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(Ye(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 nt(0,0)},e.prototype.bufferedPercent=function(){return ot(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(ln.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 r=e[t+"Tracks"]()||[],n=r.length;n--;){var o=r[n];"text"===t&&e.removeRemoteTextTrack(o),r.removeTrack(o)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var r=t[e];this.removeRemoteTextTrack(r)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new it(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?nt(0,0):nt()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;ln.names.forEach(function(e){var r=ln[e],n=function(){t.trigger(e+"trackchange")},o=t[r.getterName]();o.addEventListener("removetrack",n),o.addEventListener("addtrack",n),t.on("dispose",function(){o.removeEventListener("removetrack",n),o.removeEventListener("addtrack",n)})})},e.prototype.addWebVttScript_=function(){var t=this;if(!Kt.WebVTT)if(Jt.body.contains(this.el())){if(!this.options_["vtt.js"]&&o(hn)&&Object.keys(hn).length>0)return void this.trigger("vttjsloaded");var e=Jt.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}),Kt.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),r=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},o=function(t){return e.removeTrack(t.track)};r.on("addtrack",n),r.on("removetrack",o),this.addWebVttScript_();var i=function(){return t.trigger("texttrackchange")},s=function(){i();for(var t=0;t 0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1],n=this.createRemoteTextTrack(e);return!0!==r&&!1!==r&&(Ne.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),r=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==r&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(n.track)}),n},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,r){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,r){if(e.techs_||(e.techs_={}),!e.isTech(r))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]=r,"Tech"!==t&&e.defaultTechOrder_.push(t),r},e.getTech=function(t){if(t)return t=J(t),e.techs_&&e.techs_[t]?e.techs_[t]:Kt&&Kt.videojs&&Kt.videojs[t]?(Ne.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),Kt.videojs[t]):void 0},e}(lr);un.names.forEach(function(t){var e=un[t];pn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),pn.prototype.featuresVolumeControl=!0,pn.prototype.featuresFullscreenResize=!1,pn.prototype.featuresPlaybackRate=!1,pn.prototype.featuresProgressEvents=!1,pn.prototype.featuresSourceset=!1,pn.prototype.featuresTimeupdateEvents=!1,pn.prototype.featuresNativeTextTracks=!1,pn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,r){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,e)},t.canPlayType=function(e){ +for(var r=t.sourceHandlers||[],n=void 0,o=0;o 0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=r({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Ne.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),o=r({role:"button","aria-live":"polite"},o),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,o);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=f("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(void 0===t)return this.controlText_||"Need Text";var r=this.localize(t);this.controlText_=t,v(this.controlTextEl_,r),this.nonIconControl||e.setAttribute("title",r)},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){U(Jt,"keydown",Ye(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){q(Jt,"keydown",Ye(this,this.handleKeyPress))},e}(lr);lr.registerComponent("ClickableComponent",Cn);var kn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.update(),r.on("posterchange",Ye(o,o.update)),o}return ke(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=f("div",{className:"vjs-poster",tabIndex:-1});return _e||(this.fallbackImg_=f("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}(Cn);lr.registerComponent("PosterImage",kn);var En={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'},wn=function(t){function e(r,n,o){Ce(this,e);var i=Ee(this,t.call(this,r,n,o));return r.on("loadstart",Ye(i,i.toggleDisplay)),r.on("texttrackchange",Ye(i,i.updateDisplay)),r.on("loadstart",Ye(i,i.preselectTrack)),r.ready(Ye(i,function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)return void this.hide();r.on("fullscreenchange",Ye(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e 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 o=lr.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(o),o},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return Ne.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),lr.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}(Cn);lr.registerComponent("Button",xn);var jn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return ke(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 r=this.player_.getChild("controlBar"),n=r&&r.getChild("playToggle");if(!n)return void this.player_.focus();var o=function(){return n.focus()};at(e)?e.then(o,function(){}):this.setTimeout(o,1)}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(xn);jn.prototype.controlText_="Play Video",lr.registerComponent("BigPlayButton",jn);var Pn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.controlText(n&&n.controlText||o.localize("Close")),o}return ke(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}(xn);lr.registerComponent("CloseButton",Pn);var An=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"play",o.handlePlay),o.on(r,"pause",o.handlePause),o.on(r,"ended",o.handleEnded),o}return ke(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-ended"),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}(xn);An.prototype.controlText_="Play",lr.registerComponent("PlayToggle",An);var On=function(t,e){t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),o=o>0||s>0?o+":":"",n=((o||i>=10)&&n<10?"0"+n:n)+":",r=r<10?"0"+r:r,o+n+r},Nn=On,Mn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Nn(t,e)},In=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.throttledUpdateContent=$e(Ye(o,o.updateContent),25),o.on(r,"timeupdate",o.throttledUpdateContent),o}return ke(e,t),e.prototype.createEl=function(e){var r=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control"});return this.contentEl_=f("div",{className:r+"-display"},{"aria-live":"off"},f("span",{className:"vjs-control-text",textContent:this.localize(this.controlText_)})),this.updateTextNode_(),n.appendChild(this.contentEl_),n},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=Jt.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return Mn(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}(lr);In.prototype.controlText_="Time",lr.registerComponent("TimeDisplay",In);var Dn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"ended",o.handleEnded),o}return ke(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}(In);Dn.prototype.controlText_="Current Time",lr.registerComponent("CurrentTimeDisplay",Dn);var Fn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"durationchange",o.updateContent),o.on(r,"loadedmetadata",o.throttledUpdateContent),o}return ke(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}(In);Fn.prototype.controlText_="Duration Time",lr.registerComponent("DurationDisplay",Fn);var Ln=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:" /"})},e}(lr);lr.registerComponent("TimeDivider",Ln);var Rn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"durationchange",o.throttledUpdateContent),o.on(r,"ended",o.handleEnded),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(In);Rn.prototype.controlText_="Remaining Time",lr.registerComponent("RemainingTimeDisplay",Rn);var Bn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return ke(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=f("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+""+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(lr);lr.registerComponent("LiveDisplay",Bn);var Hn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return ke(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=r({tabIndex:0},n),o=r({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},o),t.prototype.createEl.call(this,e,n,o)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;t.preventDefault(),S(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;x(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!==t||t<0||t===1/0)&&(t=0);var r=(100*t).toFixed(2)+"%",n=e.el().style;return this.vertical()?n.height=r:n.width=r,t}}},e.prototype.calculateDistance=function(t){var e=A(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(lr);lr.registerComponent("Slider",Hn);var Vn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.partEls_=[],o.on(r,"progress",o.update),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),o=this.partEls_,i=function(t,e){var r=t/e||0;return 100*(r>=1?1:r)+"%"};this.el_.style.width=i(n,r);for(var s=0;se.length;u--)this.el_.removeChild(o[u-1]);o.length=e.length},e}(lr);lr.registerComponent("LoadProgressBar",Vn);var zn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,r){var n=j(this.el_),o=j(this.player_.el()),i=t.width*e;if(o&&n){var s=t.left-o.left+i,a=t.width-i+(o.right-t.right),l=n.width/2;s n.width&&(l=n.width),this.el_.style.right="-"+l+"px",v(this.el_,r)}},e}(lr);lr.registerComponent("TimeTooltip",zn);var Wn=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),o=Mn(n,r.player_.duration()),i=r.getChild("timeTooltip");i&&i.update(t,e,o)})},e}(lr);Wn.prototype.options_={children:[]},ve&&!(ve>8)||oe||se||Wn.prototype.options_.children.push("timeTooltip"),lr.registerComponent("PlayProgressBar",Wn);var Un=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.update=$e(Ye(o,o.update),25),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.duration(),o=Mn(e*n,n);r.el_.style.left=t.width*e+"px",r.getChild("timeTooltip").update(t,e,o)})},e}(lr);Un.prototype.options_={children:["timeTooltip"]},lr.registerComponent("MouseTimeDisplay",Un);var qn=30,Kn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.update=$e(Ye(o,o.update),qn),o.on(r,"timeupdate",o.update),o.on(r,"ended",o.handleEnded),o.updateInterval=null,o.on(r,["playing"],function(){o.clearInterval(o.updateInterval),o.updateInterval=o.setInterval(function(){o.requestAnimationFrame(function(){o.update()})},qn)}),o.on(r,["ended","pause","waiting"],function(){o.clearInterval(o.updateInterval)}),o.on(r,["timeupdate","ended"],o.update),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var r=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Mn(t,r),Mn(r,r)],"{1} of {2}")),this.bar.update(j(this.el_),e)},e.prototype.update=function(e){var r=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),r),r},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){F(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(F(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&<(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(Hn);Kn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ve&&!(ve>8)||oe||se||Kn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Kn.prototype.playerEvent="timeupdate",lr.registerComponent("SeekBar",Kn);var Xn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.handleMouseMove=$e(Ye(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=$e(Ye(o,o.handleMouseSeek),25),o.enable(),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var r=e.getChild("mouseTimeDisplay"),n=e.el(),o=j(n),i=A(n,t).x;i>1?i=1:i<0&&(i=0),r&&r.update(o,i)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(lr);Xn.prototype.options_={children:["seekBar"]},lr.registerComponent("ProgressControl",Xn);var Gn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on(r,"fullscreenchange",o.handleFullscreenChange),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(xn);Gn.prototype.controlText_="Fullscreen",lr.registerComponent("FullscreenToggle",Gn);var Yn=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},$n=function(t){function e(){return Ce(this,e),Ee(this,t.apply(this,arguments))}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},e}(lr);lr.registerComponent("VolumeLevel",$n);var Jn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.on("slideractive",o.updateLastVolume_),o.on(r,"volumechange",o.updateARIAAttributes),r.ready(function(){return o.updateARIAAttributes()}),o}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){F(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){F(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},e}(Hn);Jn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Jn.prototype.playerEvent="volumechange",lr.registerComponent("VolumeBar",Jn);var Qn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||o(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var i=Ee(this,t.call(this,r,n));return Yn(i,r),i.throttledHandleMouseMove=$e(Ye(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){ +i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return ke(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(lr);Qn.prototype.options_={children:["volumeBar"]},lr.registerComponent("VolumeControl",Qn);var Zn=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return Yn(o,r),o.on(r,["loadstart","volumechange"],o.update),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),r=this.player_.lastVolume_();if(0===e){var n=r<.1?.1:r;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var r=0;r<4;r++)_(this.el_,"vjs-vol-"+r);m(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(xn);Zn.prototype.controlText_="Mute",lr.registerComponent("MuteToggle",Zn);var to=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||o(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var i=Ee(this,t.call(this,r,n));return Yn(i,r),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return ke(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(lr);to.prototype.options_={children:["muteToggle","volumeControl"]},lr.registerComponent("VolumePanel",to);var eo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return n&&(o.menuButton_=n.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return ke(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",Ye(this,function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())}))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=f(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),U(r,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),r},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(lr);lr.registerComponent("Menu",eo);var ro=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e);var o=Ee(this,t.call(this,r,n));o.menuButton_=new xn(r,n),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var i=xn.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+i,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return ke(e,t),e.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var t=new eo(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=f("li",{className:"vjs-menu-title",innerHTML:J(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),y(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var r=0;r 1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",Ye(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){U(Jt,"keydown",Ye(this,this.handleKeyPress))},e.prototype.handleBlur=function(){q(Jt,"keydown",Ye(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),oe&&p())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(lr);lr.registerComponent("MenuButton",ro);var no=function(t){function e(r,n){Ce(this,e);var o=n.tracks,i=Ee(this,t.call(this,r,n));if(i.items.length<=1&&i.hide(),!o)return Ee(i);var s=Ye(i,i.update);return o.addEventListener("removetrack",s),o.addEventListener("addtrack",s),i.player_.on("ready",s),i.player_.on("dispose",function(){o.removeEventListener("removetrack",s),o.removeEventListener("addtrack",s)}),i}return ke(e,t),e}(ro);lr.registerComponent("TrackButton",no);var oo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.selectable=n.selectable,o.isSelected_=n.selected||!1,o.selected(o.isSelected_),o.selectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitem"),o}return ke(e,t),e.prototype.createEl=function(e,n,o){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",r({className:"vjs-menu-item",innerHTML:'",tabIndex:-1},n),o)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(Cn);lr.registerComponent("MenuItem",oo);var io=function(t){function e(r,n){Ce(this,e);var o=n.track,i=r.textTracks();n.label=o.label||o.language||"Unknown",n.selected="showing"===o.mode;var s=Ee(this,t.call(this,r,n));s.track=o;var a=function(){for(var t=arguments.length,e=Array(t),r=0;r -1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(oo);lr.registerComponent("TextTrackMenuItem",io);var so=function(t){function e(r,n){return Ce(this,e),n.track={player:r,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,Ee(this,t.call(this,r,n))}return ke(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,o=e.length;n -1&&"showing"===i.mode){r=!1;break}}r!==this.isSelected_&&this.selected(r)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,o=e.length;n -1&&"showing"===i.mode){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(io);lr.registerComponent("OffTextTrackMenuItem",so);var ao=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ce(this,e),n.tracks=r.textTracks(),Ee(this,t.call(this,r,n))}return ke(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:io,r=void 0;this.label_&&(r=this.label_+" off"),t.push(new so(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o -1){var s=new e(this.player_,{track:i,selectable:!0});s.addClass("vjs-"+i.kind+"-menu-item"),t.push(s)}}return t},e}(no);lr.registerComponent("TextTrackButton",ao);var lo=function(t){function e(r,n){Ce(this,e);var o=n.track,i=n.cue,s=r.currentTime();n.selectable=!0,n.label=i.text,n.selected=i.startTime<=s&&s =0;e--){var r=t[e];if(r.kind===this.kind_)return r}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(J(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r