/* videojs-ie8 1.1.2 */ !function(a,b){"undefined"==typeof a.HTMLVideoElement&&(b.createElement("video"),b.createElement("audio"),b.createElement("track")),function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){var b,c=Array,d=c.prototype,e=Object,f=e.prototype,g=Function.prototype,h=String,i=h.prototype,j=Number,k=j.prototype,l=d.slice,m=d.splice,n=d.push,o=d.unshift,p=d.concat,q=g.call,r=g.apply,s=Math.max,t=Math.min,u=f.toString,v="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,w=Function.prototype.toString,x=function(a){try{return w.call(a),!0}catch(b){return!1}},y="[object Function]",z="[object GeneratorFunction]";b=function(a){if("function"!=typeof a)return!1;if(v)return x(a);var b=u.call(a);return b===y||b===z};var A,B=RegExp.prototype.exec,C=function(a){try{return B.call(a),!0}catch(b){return!1}},D="[object RegExp]";A=function(a){return"object"!=typeof a?!1:v?C(a):u.call(a)===D};var E,F=String.prototype.valueOf,G=function(a){try{return F.call(a),!0}catch(b){return!1}},H="[object String]";E=function(a){return"string"==typeof a?!0:"object"!=typeof a?!1:v?G(a):u.call(a)===H};var I=e.defineProperty&&function(){try{var a={};e.defineProperty(a,"x",{enumerable:!1,value:a});for(var b in a)return!1;return a.x===a}catch(c){return!1}}(),J=function(a){var b;return b=I?function(a,b,c,d){!d&&b in a||e.defineProperty(a,b,{configurable:!0,enumerable:!1,writable:!0,value:c})}:function(a,b,c,d){!d&&b in a||(a[b]=c)},function(c,d,e){for(var f in d)a.call(d,f)&&b(c,f,d[f],e)}}(f.hasOwnProperty),K=function(a){var b=typeof a;return null===a||"object"!==b&&"function"!==b},L=j.isNaN||function(a){return a!==a},M={ToInteger:function(a){var b=+a;return L(b)?b=0:0!==b&&b!==1/0&&b!==-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b))),b},ToPrimitive:function(a){var c,d,e;if(K(a))return a;if(d=a.valueOf,b(d)&&(c=d.call(a),K(c)))return c;if(e=a.toString,b(e)&&(c=e.call(a),K(c)))return c;throw new TypeError},ToObject:function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return e(a)},ToUint32:function(a){return a>>>0}},N=function(){};J(g,{bind:function(a){var c=this;if(!b(c))throw new TypeError("Function.prototype.bind called on incompatible "+c);for(var d,f=l.call(arguments,1),g=function(){if(this instanceof d){var b=c.apply(this,p.call(f,l.call(arguments)));return e(b)===b?b:this}return c.apply(a,p.call(f,l.call(arguments)))},h=s(0,c.length-f.length),i=[],j=0;h>j;j++)n.call(i,"$"+j);return d=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this, arguments); }")(g),c.prototype&&(N.prototype=c.prototype,d.prototype=new N,N.prototype=null),d}});var O=q.bind(f.hasOwnProperty),P=q.bind(f.toString),Q=q.bind(l),R=r.bind(l),S=q.bind(i.slice),T=q.bind(i.split),U=q.bind(i.indexOf),V=q.bind(n),W=q.bind(f.propertyIsEnumerable),X=q.bind(d.sort),Y=c.isArray||function(a){return"[object Array]"===P(a)},Z=1!==[].unshift(0);J(d,{unshift:function(){return o.apply(this,arguments),this.length}},Z),J(c,{isArray:Y});var $=e("a"),_="a"!==$[0]||!(0 in $),aa=function(a){var b=!0,c=!0,d=!1;if(a)try{a.call("foo",function(a,c,d){"object"!=typeof d&&(b=!1)}),a.call([1],function(){"use strict";c="string"==typeof this},"x")}catch(e){d=!0}return!!a&&!d&&b&&c};J(d,{forEach:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=-1,g=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++f1&&(d=arguments[1]),!b(a))throw new TypeError("Array.prototype.map callback must be a function");for(var i=0;g>i;i++)i in f&&("undefined"==typeof d?h[i]=a(f[i],i,e):h[i]=a.call(d,f[i],i,e));return h}},!aa(d.map)),J(d,{filter:function(a){var c,d,e=M.ToObject(this),f=_&&E(this)?T(this,""):e,g=M.ToUint32(f.length),h=[];if(arguments.length>1&&(d=arguments[1]),!b(a))throw new TypeError("Array.prototype.filter callback must be a function");for(var i=0;g>i;i++)i in f&&(c=f[i],("undefined"==typeof d?a(c,i,e):a.call(d,c,i,e))&&V(h,c));return h}},!aa(d.filter)),J(d,{every:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.every callback must be a function");for(var g=0;f>g;g++)if(g in e&&!("undefined"==typeof c?a(e[g],g,d):a.call(c,e[g],g,d)))return!1;return!0}},!aa(d.every)),J(d,{some:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.some callback must be a function");for(var g=0;f>g;g++)if(g in e&&("undefined"==typeof c?a(e[g],g,d):a.call(c,e[g],g,d)))return!0;return!1}},!aa(d.some));var ba=!1;d.reduce&&(ba="object"==typeof d.reduce.call("es5",function(a,b,c,d){return d})),J(d,{reduce:function(a){var c=M.ToObject(this),d=_&&E(this)?T(this,""):c,e=M.ToUint32(d.length);if(!b(a))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===e&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var f,g=0;if(arguments.length>=2)f=arguments[1];else for(;;){if(g in d){f=d[g++];break}if(++g>=e)throw new TypeError("reduce of empty array with no initial value")}for(;e>g;g++)g in d&&(f=a(f,d[g],g,c));return f}},!ba);var ca=!1;d.reduceRight&&(ca="object"==typeof d.reduceRight.call("es5",function(a,b,c,d){return d})),J(d,{reduceRight:function(a){var c=M.ToObject(this),d=_&&E(this)?T(this,""):c,e=M.ToUint32(d.length);if(!b(a))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===e&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var f,g=e-1;if(arguments.length>=2)f=arguments[1];else for(;;){if(g in d){f=d[g--];break}if(--g<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>g)return f;do g in d&&(f=a(f,d[g],g,c));while(g--);return f}},!ca);var da=d.indexOf&&-1!==[0,1].indexOf(1,2);J(d,{indexOf:function(a){var b=_&&E(this)?T(this,""):M.ToObject(this),c=M.ToUint32(b.length);if(0===c)return-1;var d=0;for(arguments.length>1&&(d=M.ToInteger(arguments[1])),d=d>=0?d:s(0,c+d);c>d;d++)if(d in b&&b[d]===a)return d;return-1}},da);var ea=d.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);J(d,{lastIndexOf:function(a){var b=_&&E(this)?T(this,""):M.ToObject(this),c=M.ToUint32(b.length);if(0===c)return-1;var d=c-1;for(arguments.length>1&&(d=t(d,M.ToInteger(arguments[1]))),d=d>=0?d:c-Math.abs(d);d>=0;d--)if(d in b&&a===b[d])return d;return-1}},ea);var fa=function(){var a=[1,2],b=a.splice();return 2===a.length&&Y(b)&&0===b.length}();J(d,{splice:function(a,b){return 0===arguments.length?[]:m.apply(this,arguments)}},!fa);var ga=function(){var a={};return d.splice.call(a,0,0,1),1===a.length}();J(d,{splice:function(a,b){if(0===arguments.length)return[];var c=arguments;return this.length=s(M.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof b&&(c=Q(arguments),c.length<2?V(c,this.length-a):c[1]=M.ToInteger(b)),m.apply(this,c)}},!ga);var ha=function(){var a=new c(1e5);return a[8]="x",a.splice(1,1),7===a.indexOf("x")}(),ia=function(){var a=256,b=[];return b[a]="a",b.splice(a+1,0,"b"),"a"===b[a]}();J(d,{splice:function(a,b){for(var c,d=M.ToObject(this),e=[],f=M.ToUint32(d.length),g=M.ToInteger(a),i=0>g?s(f+g,0):t(g,f),j=t(s(M.ToInteger(b),0),f-i),k=0;j>k;)c=h(i+k),O(d,c)&&(e[k]=d[c]),k+=1;var l,m=Q(arguments,2),n=m.length;if(j>n){for(k=i;f-j>k;)c=h(k+j),l=h(k+n),O(d,c)?d[l]=d[c]:delete d[l],k+=1;for(k=f;k>f-j+n;)delete d[k-1],k-=1}else if(n>j)for(k=f-j;k>i;)c=h(k+j-1),l=h(k+n-1),O(d,c)?d[l]=d[c]:delete d[l],k-=1;k=i;for(var o=0;o=0&&!Y(a)&&b(a.callee)},Ea=Ca(arguments)?Ca:Da;J(e,{keys:function(a){var c=b(a),d=Ea(a),e=null!==a&&"object"==typeof a,f=e&&E(a);if(!e&&!c&&!d)throw new TypeError("Object.keys called on a non-object");var g=[],i=ua&&c;if(f&&va||d)for(var j=0;jm;m++){var n=Aa[m];l&&"constructor"===n||!O(a,n)||V(g,n)}return g}});var Fa=e.keys&&function(){return 2===e.keys(arguments).length}(1,2),Ga=e.keys&&function(){var a=e.keys(arguments);return 1!==arguments.length||1!==a.length||1!==a[0]}(1),Ha=e.keys;J(e,{keys:function(a){return Ha(Ea(a)?Q(a):a)}},!Fa||Ga);var Ia,Ja,Ka=0!==new Date(-0xc782b5b342b24).getUTCMonth(),La=new Date(-0x55d318d56a724),Ma=new Date(14496624e5),Na="Mon, 01 Jan -45875 11:59:59 GMT"!==La.toUTCString(),Oa=La.getTimezoneOffset();-720>Oa?(Ia="Tue Jan 02 -45875"!==La.toDateString(),Ja=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ma.toString())):(Ia="Mon Jan 01 -45875"!==La.toDateString(),Ja=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ma.toString()));var Pa=q.bind(Date.prototype.getFullYear),Qa=q.bind(Date.prototype.getMonth),Ra=q.bind(Date.prototype.getDate),Sa=q.bind(Date.prototype.getUTCFullYear),Ta=q.bind(Date.prototype.getUTCMonth),Ua=q.bind(Date.prototype.getUTCDate),Va=q.bind(Date.prototype.getUTCDay),Wa=q.bind(Date.prototype.getUTCHours),Xa=q.bind(Date.prototype.getUTCMinutes),Ya=q.bind(Date.prototype.getUTCSeconds),Za=q.bind(Date.prototype.getUTCMilliseconds),$a=["Sun","Mon","Tue","Wed","Thu","Fri"],_a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ab=function(a,b){return Ra(new Date(b,a,0))};J(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this);return 0>a&&Qa(this)>11?a+1:a},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this),b=Qa(this);return 0>a&&b>11?0:b},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this),b=Qa(this),c=Ra(this);if(0>a&&b>11){if(12===b)return c;var d=ab(0,a+1);return d-c+1}return c},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this);return 0>a&&Ta(this)>11?a+1:a},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this),b=Ta(this);return 0>a&&b>11?0:b},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this),b=Ta(this),c=Ua(this);if(0>a&&b>11){if(12===b)return c;var d=ab(0,a+1);return d-c+1}return c}},Ka),J(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Va(this),b=Ua(this),c=Ta(this),d=Sa(this),e=Wa(this),f=Xa(this),g=Ya(this);return $a[a]+", "+(10>b?"0"+b:b)+" "+_a[c]+" "+d+" "+(10>e?"0"+e:e)+":"+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+" GMT"}},Ka||Na),J(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=this.getDay(),b=this.getDate(),c=this.getMonth(),d=this.getFullYear();return $a[a]+" "+_a[c]+" "+(10>b?"0"+b:b)+" "+d}},Ka||Ia),(Ka||Ja)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=this.getDay(),b=this.getDate(),c=this.getMonth(),d=this.getFullYear(),e=this.getHours(),f=this.getMinutes(),g=this.getSeconds(),h=this.getTimezoneOffset(),i=Math.floor(Math.abs(h)/60),j=Math.floor(Math.abs(h)%60);return $a[a]+" "+_a[c]+" "+(10>b?"0"+b:b)+" "+d+" "+(10>e?"0"+e:e)+":"+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+" GMT"+(h>0?"-":"+")+(10>i?"0"+i:i)+(10>j?"0"+j:j)},I&&e.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var bb=-621987552e5,cb="-000001",db=Date.prototype.toISOString&&-1===new Date(bb).toISOString().indexOf(cb),eb=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();J(Date.prototype,{toISOString:function(){if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var a=Sa(this),b=Ta(this);a+=Math.floor(b/12),b=(b%12+12)%12;var c=[b+1,Ua(this),Wa(this),Xa(this),Ya(this)];a=(0>a?"-":a>9999?"+":"")+S("00000"+Math.abs(a),a>=0&&9999>=a?-4:-6);for(var d=0;d=7&&j>jb){var o=Math.floor(j/jb)*jb,p=Math.floor(o/1e3);m+=p,n-=1e3*p}k=1===l&&h(c)===c?new a(b.parse(c)):l>=7?new a(c,d,e,f,g,m,n):l>=6?new a(c,d,e,f,g,m):l>=5?new a(c,d,e,f,g):l>=4?new a(c,d,e,f):l>=3?new a(c,d,e):l>=2?new a(c,d):l>=1?new a(c):new a}else k=a.apply(this,arguments);return K(k)||J(k,{constructor:b},!0),k},c=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),d=[0,31,59,90,120,151,181,212,243,273,304,334,365],e=function(a,b){var c=b>1?1:0;return d[b]+Math.floor((a-1969+c)/4)-Math.floor((a-1901+c)/100)+Math.floor((a-1601+c)/400)+365*(a-1970)},f=function(b){var c=0,d=b;if(kb&&d>jb){var e=Math.floor(d/jb)*jb,f=Math.floor(e/1e3);c+=f,d-=1e3*f}return j(new a(1970,0,1,0,0,c,d))};for(var g in a)O(a,g)&&(b[g]=a[g]);J(b,{now:a.now,UTC:a.UTC},!0),b.prototype=a.prototype,J(b.prototype,{constructor:b},!0);var i=function(b){var d=c.exec(b);if(d){var g,h=j(d[1]),i=j(d[2]||1)-1,k=j(d[3]||1)-1,l=j(d[4]||0),m=j(d[5]||0),n=j(d[6]||0),o=Math.floor(1e3*j(d[7]||0)),p=Boolean(d[4]&&!d[8]),q="-"===d[9]?1:-1,r=j(d[10]||0),s=j(d[11]||0),t=m>0||n>0||o>0;return(t?24:25)>l&&60>m&&60>n&&1e3>o&&i>-1&&12>i&&24>r&&60>s&&k>-1&&k=-864e13&&864e13>=g)?g:NaN}return a.parse.apply(this,arguments)};return J(b,{parse:i}),b}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var lb=k.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),mb={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(a,b){for(var c=-1,d=b;++c=0;)c+=mb.data[b],mb.data[b]=Math.floor(c/a),c=c%a*mb.base},numToString:function(){for(var a=mb.size,b="";--a>=0;)if(""!==b||0===a||0!==mb.data[a]){var c=h(mb.data[a]);""===b?b=c:b+=S("0000000",0,7-c.length)+c}return b},pow:function Gb(a,b,c){return 0===b?c:b%2===1?Gb(a,b-1,c*a):Gb(a*a,b/2,c)},log:function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b}},nb=function(a){var b,c,d,e,f,g,i,k;if(b=j(a),b=L(b)?0:Math.floor(b),0>b||b>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(c=j(this),L(c))return"NaN";if(-1e21>=c||c>=1e21)return h(c);if(d="",0>c&&(d="-",c=-c),e="0",c>1e-21)if(f=mb.log(c*mb.pow(2,69,1))-69,g=0>f?c*mb.pow(2,-f,1):c/mb.pow(2,f,1),g*=4503599627370496,f=52-f,f>0){for(mb.multiply(0,g),i=b;i>=7;)mb.multiply(1e7,0),i-=7;for(mb.multiply(mb.pow(10,i,1),0),i=f-1;i>=23;)mb.divide(1<<23),i-=23;mb.divide(1<0?(k=e.length,e=b>=k?d+S("0.0000000000000000000",0,b-k+2)+e:d+S(e,0,k-b)+"."+S(e,k-b)):e=d+e,e};J(k,{toFixed:nb},lb);var ob=function(){try{return"1"===1..toPrecision(void 0)}catch(a){return!0}}(),pb=k.toPrecision;J(k,{toPrecision:function(a){return"undefined"==typeof a?pb.call(this):pb.call(this,a)}},ob),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var a="undefined"==typeof/()??/.exec("")[1],b=Math.pow(2,32)-1;i.split=function(c,d){var e=String(this);if("undefined"==typeof c&&0===d)return[];if(!A(c))return T(this,c,d);var f,g,h,i,j=[],k=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(c.sticky?"y":""),l=0,m=new RegExp(c.source,k+"g");a||(f=new RegExp("^"+m.source+"$(?!\\s)",k));var o="undefined"==typeof d?b:M.ToUint32(d);for(g=m.exec(e);g&&(h=g.index+g[0].length,!(h>l&&(V(j,S(e,l,g.index)),!a&&g.length>1&&g[0].replace(f,function(){for(var a=1;a1&&g.index=o)));)m.lastIndex===g.index&&m.lastIndex++,g=m.exec(e);return l===e.length?(i||!m.test(""))&&V(j,""):V(j,S(e,l)),j.length>o?S(j,0,o):j}}():"0".split(void 0,0).length&&(i.split=function(a,b){return"undefined"==typeof a&&0===b?[]:T(this,a,b)});var qb=i.replace,rb=function(){var a=[];return"x".replace(/x(.)?/g,function(b,c){V(a,c)}),1===a.length&&"undefined"==typeof a[0]}();rb||(i.replace=function(a,c){var d=b(c),e=A(a)&&/\)[*?]/.test(a.source);if(d&&e){var f=function(b){var d=arguments.length,e=a.lastIndex;a.lastIndex=0;var f=a.exec(b)||[];return a.lastIndex=e,V(f,arguments[d-2],arguments[d-1]),c.apply(this,f)};return qb.call(this,a,f)}return qb.call(this,a,c)});var sb=i.substr,tb="".substr&&"b"!=="0b".substr(-1);J(i,{substr:function(a,b){var c=a;return 0>a&&(c=s(this.length+a,0)),sb.call(this,c,b)}},tb);var ub=" \n \f\r  ᠎              \u2028\u2029\ufeff",vb="​",wb="["+ub+"]",xb=new RegExp("^"+wb+wb+"*"),yb=new RegExp(wb+wb+"*$"),zb=i.trim&&(ub.trim()||!vb.trim());J(i,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return h(this).replace(xb,"").replace(yb,"")}},zb);var Ab=q.bind(String.prototype.trim),Bb=i.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);J(i,{lastIndexOf:function(a){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var b=h(this),c=h(a),d=arguments.length>1?j(arguments[1]):NaN,e=L(d)?1/0:M.ToInteger(d),f=t(s(e,0),b.length),g=c.length,i=f+g;i>0;){i=s(0,i-g);var k=U(S(b,i,f+g),c);if(-1!==k)return i+k}return-1}},Bb);var Cb=i.lastIndexOf;if(J(i,{lastIndexOf:function(a){return Cb.apply(this,arguments)}},1!==i.lastIndexOf.length),(8!==parseInt(ub+"08")||22!==parseInt(ub+"0x16"))&&(parseInt=function(a){var b=/^[\-+]?0[xX]/;return function(c,d){var e=Ab(c),f=j(d)||(b.test(e)?16:10);return a(e,f)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(a){return function(b){var c=Ab(b),d=a(c);return 0===d&&"-"===S(c,0,1)?-0:d}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Db=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var a=this.name;"undefined"==typeof a?a="Error":"string"!=typeof a&&(a=h(a));var b=this.message;return"undefined"==typeof b?b="":"string"!=typeof b&&(b=h(b)),a?b?a+": "+b:a:b};Error.prototype.toString=Db}if(I){var Eb=function(a,b){if(W(a,b)){var c=Object.getOwnPropertyDescriptor(a,b);c.enumerable=!1,Object.defineProperty(a,b,c)}};Eb(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Eb(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Fb=function(){var a="/"+this.source+"/";return this.global&&(a+="g"),this.ignoreCase&&(a+="i"),this.multiline&&(a+="m"),a};RegExp.prototype.toString=Fb}}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){var a,c,d,e,f=Function.call,g=Object.prototype,h=f.bind(g.hasOwnProperty),i=f.bind(g.propertyIsEnumerable),j=f.bind(g.toString),k=h(g,"__defineGetter__");k&&(a=f.bind(g.__defineGetter__),c=f.bind(g.__defineSetter__),d=f.bind(g.__lookupGetter__),e=f.bind(g.__lookupSetter__)),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){var b=a.__proto__;return b||null===b?b:"[object Function]"===j(a.constructor)?a.constructor.prototype:a instanceof Object?g:null});var l=function(a){try{return a.sentinel=0,0===Object.getOwnPropertyDescriptor(a,"sentinel").value}catch(b){return!1}};if(Object.defineProperty){var m=l({}),n="undefined"==typeof b||l(b.createElement("div"));if(!n||!m)var o=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||o){var p="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(p+a);if(o)try{return o.call(Object,a,b)}catch(c){}var f;if(!h(a,b))return f;if(f={enumerable:i(a,b),configurable:!0},k){var j=a.__proto__,l=a!==g;l&&(a.__proto__=g);var m=d(a,b),n=e(a,b);if(l&&(a.__proto__=j),m||n)return m&&(f.get=m),n&&(f.set=n),f}return f.value=a[b],f.writable=!0,f}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var q,r=!({__proto__:null}instanceof Object),s=function(){if(!b.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(a){return!1}},t=function(){var a,b;return b=new ActiveXObject("htmlfile"),b.write(""),b.close(),a=b.parentWindow.Object.prototype,b=null,a},u=function(){var a,c=b.createElement("iframe"),d=b.body||b.documentElement;return c.style.display="none",d.appendChild(c),c.src="javascript:",a=c.contentWindow.Object.prototype,d.removeChild(c),c=null,a};q=r||"undefined"==typeof b?function(){return{__proto__:null}}:function(){var a=s()?t():u();delete a.constructor,delete a.hasOwnProperty,delete a.propertyIsEnumerable,delete a.isPrototypeOf,delete a.toLocaleString,delete a.toString,delete a.valueOf;var b=function(){};return b.prototype=a,q=function(){return new b},new b},Object.create=function(a,b){var c,d=function(){};if(null===a)c=q();else{if("object"!=typeof a&&"function"!=typeof a)throw new TypeError("Object prototype may only be an Object or null");d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}var v=function(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){return!1}};if(Object.defineProperty){var w=v({}),x="undefined"==typeof b||v(b.createElement("div"));if(!w||!x)var y=Object.defineProperty,z=Object.defineProperties}if(!Object.defineProperty||y){var A="Property description must be an object: ",B="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(b,f,h){if("object"!=typeof b&&"function"!=typeof b||null===b)throw new TypeError(B+b);if("object"!=typeof h&&"function"!=typeof h||null===h)throw new TypeError(A+h);if(y)try{return y.call(Object,b,f,h)}catch(i){}if("value"in h)if(k&&(d(b,f)||e(b,f))){var j=b.__proto__;b.__proto__=g,delete b[f],b[f]=h.value,b.__proto__=j}else b[f]=h.value;else{if(!k&&("get"in h||"set"in h))throw new TypeError(C);"get"in h&&a(b,f,h.get),"set"in h&&c(b,f,h.set)}return b}}(!Object.defineProperties||z)&&(Object.defineProperties=function(a,b){if(z)try{return z.call(Object,a,b)}catch(c){}return Object.keys(b).forEach(function(c){"__proto__"!==c&&Object.defineProperty(a,c,b[c])}),a}),Object.seal||(Object.seal=function(a){if(Object(a)!==a)throw new TypeError("Object.seal can only be called on Objects.");return a}),Object.freeze||(Object.freeze=function(a){if(Object(a)!==a)throw new TypeError("Object.freeze can only be called on Objects.");return a});try{Object.freeze(function(){})}catch(D){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){if(Object(a)!==a)throw new TypeError("Object.preventExtensions can only be called on Objects.");return a}),Object.isSealed||(Object.isSealed=function(a){if(Object(a)!==a)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(a){if(Object(a)!==a)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var b="";h(a,b);)b+="?";a[b]=!0;var c=h(a,b);return delete a[b],c})})}(window,document); /* thumbnails */ !function(){var t={width:0,height:0,basePath:""},e=function(){var t,s,a,r,n;for(a in s=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(n in r=t[a])r.hasOwnProperty(n)&&("object"==typeof r[n]?s[n]=e(s[n],r[n]):s[n]=r[n]);return s},s=function(e){var s,a,r;if(-1===(a=e.indexOf("#")))return{src:e,w:0,h:0,x:0,y:0};if(s=e.substring(0,a),"xywh="!==(r=e.substring(a+1)).substring(0,5))return{src:t.basePath+s,w:0,h:0,x:0,y:0};var n=r.substring(5).split(",");return{src:t.basePath+s,w:parseInt(n[2]),h:parseInt(n[3]),x:parseInt(n[0]),y:parseInt(n[1])}};videojs.registerPlugin("thumbnails",function(a){var r,n,o,l,c,p,h,d;if(n=e({},t,a),this,a){var u=this;a.vtt&&(t.basePath=a.basePath||a.vtt.substring(0,a.vtt.lastIndexOf("/")+1),console.log(t.basePath),u.on("durationchange",function(t){c=u.duration()}),p=function(t){var e,a,l;e=u.controlBar.progressControl.seekBar.calculateDistance(t)*c;var p=d&&d.cues.length;for(i=0;i=e){a=s(h.text);break}i++}if(void 0!==a){a.src&&o.src!=a.src&&(o.src=a.src),0===a.w&&(a.w=n.width),0===a.h&&(a.h=n.height);var g=a.h+0+"px",v=a.w+0+"px";r.style.width==v&&r.style.height==g||(r.style.width=a.w+0+"px",r.style.height=a.h+0+"px",r.style.top=-(a.h+37)+"px",span.style.width="60px",span.style.left=a.w/2-30+"px"),o.style.left=-a.x+"px",o.style.top=-a.y+"px",o.style.clip="rect("+a.y+"px,"+(a.w+a.x)+"px,"+(a.y+a.h)+"px,"+a.x+"px)";var x=new Date(1e3*e).toISOString().substr(11,8);span.innerHTML=x,l=a.w/2,r.style.left=-l+"px"}},h=function(t){t.explicitOriginalTarget&&console.log(t.explicitOriginalTarget.className),(!t.explicitOriginalTarget||"vjs-mouse-display"!==t.explicitOriginalTarget.ClassName&&"vjs-progress-holder vjs-slider vjs-slider-horizontal"!==t.explicitOriginalTarget.ClassName)&&(console.log("done"),r.style.left="-1000px")},u.ready(function(){var t=u.addRemoteTextTrack({id:"thumbnails",kind:"metadata",src:a.vtt});t.addEventListener("load",function e(){t.removeEventListener("load",e),d=u.textTracks().getTrackById("thumbnails")}),function(){var t;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=u.controlBar.progressControl,function(){t.addClass("fake-active")})}(),(r=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),r.appendChild(o),o.className="vjs-thumbnail",span=document.createElement("span"),r.appendChild(span),span.className="vjs-thumbnail-text",c=u.duration(),l=u.controlBar.progressControl,MTD=u.controlBar.progressControl.seekBar.mouseTimeDisplay,MTD.el().appendChild(r),l.on("mousemove",p),l.on("touchmove",p),l.on("touchcancel",h),l.on("touchend",h),u.on("userinactive",h)},!0))}})}(); /* videojs-seek-buttons 3.0.1 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojsSeekButtons=t(e.videojs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(e);function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var r=o.default.getComponent("Button"),i={forwardIndex:1,backIndex:1},s=function(e){var t=this;this.ready((function(){!function(e,t){e.addClass("vjs-seek-buttons"),t.forward&&t.forward>0&&(e.controlBar.seekForward=e.controlBar.addChild("seekButton",{direction:"forward",seconds:t.forward},t.forwardIndex)),t.back&&t.back>0&&(e.controlBar.seekBack=e.controlBar.addChild("seekButton",{direction:"back",seconds:t.back},t.backIndex))}(t,o.default.mergeOptions(i,e))}))};s.VERSION="3.0.1";var a=function(e){var t,o;function r(t,o){var n;return"forward"===(n=e.call(this,t,o)||this).options_.direction?n.controlText(n.localize("Seek forward {{seconds}} seconds").replace("{{seconds}}",n.options_.seconds)):"back"===n.options_.direction&&n.controlText(n.localize("Seek back {{seconds}} seconds").replace("{{seconds}}",n.options_.seconds)),n}o=e,(t=r).prototype=Object.create(o.prototype),t.prototype.constructor=t,n(t,o);var i=r.prototype;return i.buildCSSClass=function(){return"vjs-seek-button skip-"+this.options_.direction+" skip-"+this.options_.seconds+" "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(){var e=this.player_.currentTime();if("forward"===this.options_.direction){var t=this.player_.duration();this.player_.liveTracker&&this.player_.liveTracker.isLive()&&(t=this.player_.liveTracker.seekableEnd()),this.player_.currentTime(Math.min(e+this.options_.seconds,t))}else"back"===this.options_.direction&&this.player_.currentTime(Math.max(0,e-this.options_.seconds))},r}(r);return o.default.registerComponent("SeekButton",a),o.default.registerPlugin("seekButtons",s),s})); /* videojs-mobile-ui 1.1.1 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojsMobileUi=t(e.videojs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);const o=n.default.getComponent("Component"),i=n.default.dom||n.default;o.registerComponent("TouchOverlay",class extends o{constructor(e,t){super(e,t),this.seekSeconds=t.seekSeconds,this.tapTimeout=t.tapTimeout,this.taps=0,this.addChild("playToggle",{}),e.on(["playing","userinactive"],(e=>{this.removeClass("show-play-toggle")})),0===this.player_.options_.inactivityTimeout&&(this.player_.options_.inactivityTimeout=5e3),this.handleTaps_=n.default.fn.debounce((e=>{const t=(this.taps-1)*this.seekSeconds;if(this.taps=0,t<1)return;const n=this.el_.getBoundingClientRect(),o=e.changedTouches[0].clientX-n.left;if(o<.4*n.width)this.player_.currentTime(Math.max(0,this.player_.currentTime()-t)),this.addClass("reverse");else{if(!(o>n.width-.4*n.width))return;this.player_.currentTime(Math.min(this.player_.duration(),this.player_.currentTime()+t)),this.removeClass("reverse")}this.removeClass("show-play-toggle"),this.setAttribute("data-skip-text",`${t} ${this.localize("seconds")}`),this.removeClass("skip"),window.requestAnimationFrame((()=>{this.addClass("skip")}))}),this.tapTimeout),this.enable()}createEl(){return i.createEl("div",{className:"vjs-touch-overlay",tabIndex:-1})}handleTap(e){e.target===this.el_&&(e.preventDefault(),this.taps+=1,1===this.taps&&(this.removeClass("skip"),this.toggleClass("show-play-toggle")),this.handleTaps_(e))}enable(){this.firstTapCaptured=!1,this.on("touchend",this.handleTap)}disable(){this.off("touchend",this.handleTap)}});const s={fullscreen:{enterOnRotate:!0,exitOnRotate:!0,lockOnRotate:!0,lockToLandscapeOnEnter:!1,disabled:!1},touchControls:{seekSeconds:10,tapTimeout:300,disableOnEnd:!1,disabled:!1}},a=window.screen,r=()=>{if(a){const e=((a.orientation||{}).type||a.mozOrientation||a.msOrientation||"").split("-")[0];if("landscape"===e||"portrait"===e)return e}return"number"==typeof window.orientation?0===window.orientation||180===window.orientation?"portrait":"landscape":"portrait"},l=function(e={}){(e.forceForTesting||n.default.browser.IS_ANDROID||n.default.browser.IS_IOS)&&this.ready((()=>{((e,t)=>{if(e.addClass("vjs-mobile-ui"),!t.touchControls.disabled){(t.touchControls.disableOnEnd||"function"==typeof e.endscreen)&&e.addClass("vjs-mobile-ui-disable-end");const n=e.children_.indexOf(e.getChild("ControlBar"));e.touchOverlay=e.addChild("TouchOverlay",t.touchControls,n)}if(t.fullscreen.disabled)return;let o=!1;const i=()=>{const i=r();"landscape"===i&&t.fullscreen.enterOnRotate?!1===e.paused()&&(e.requestFullscreen(),(t.fullscreen.lockOnRotate||t.fullscreen.lockToLandscapeOnEnter)&&a.orientation&&a.orientation.lock&&a.orientation.lock("landscape").then((()=>{o=!0})).catch((e=>{n.default.log("Browser refused orientation lock:",e)}))):"portrait"===i&&t.fullscreen.exitOnRotate&&!o&&e.isFullscreen()&&e.exitFullscreen()};(t.fullscreen.enterOnRotate||t.fullscreen.exitOnRotate)&&(n.default.browser.IS_IOS?(window.addEventListener("orientationchange",i),e.on("dispose",(()=>{window.removeEventListener("orientationchange",i)}))):a.orientation&&(a.orientation.onchange=i,e.on("dispose",(()=>{a.orientation.onchange=null})))),e.on("fullscreenchange",(i=>{e.isFullscreen()&&t.fullscreen.lockToLandscapeOnEnter&&"portrait"===r()?a.orientation.lock("landscape").then((()=>{o=!0})).catch((e=>{n.default.log("Browser refused orientation lock:",e)})):!e.isFullscreen()&&o&&(a.orientation.unlock(),o=!1)})),e.on("ended",(e=>{!0===o&&(a.orientation.unlock(),o=!1)}))})(this,n.default.obj.merge(s,e))}))};return n.default.registerPlugin("mobileUi",l),l.VERSION="1.1.1",l})); /* custom */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.videojsBrand=e()}}(function(){return function e(t,n,i){function o(d,a){if(!n[d]){if(!t[d]){var f="function"==typeof require&&require;if(!a&&f)return f(d,!0);if(r)return r(d,!0);var l=new Error("Cannot find module '"+d+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[d]={exports:{}};t[d][0].call(u.exports,function(e){var n=t[d][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[d].exports}for(var r="function"==typeof require&&require,d=0;d=0&&t<=T};v.each=v.forEach=function(e,t,n){var r,i;if(t=g(t,n),L(e))for(r=0,i=e.length;r=3;return function(t,n,r,i){var o=!L(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=0},v.invoke=w(function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,function(e){var o=i;if(!o){if(r&&r.length&&(e=S(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)})}),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=L(e)?e:v.values(e)).length;so&&(o=r);else t=y(t,n),v.each(e,function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=L(e)?e:v.values(e)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(u.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&ot?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var k=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=function(e,t){var n=R.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||a,o="constructor";for(C(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=R[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(f)return f(e);var t=[];for(var n in e)C(e,n)&&t.push(n);return k&&j(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&j(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i1&&(r=g(r,t[1])),t=v.allKeys(e)):(r=F,t=P(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=v.map(P(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)}),v.defaults=H(v.allKeys,!0),v.create=function(e,t){var n=b(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o":">",'"':""","'":"'","`":"`"},G=v.invert(V),W=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=W(V),v.unescape=W(G),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(e){return"\\"+J[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,function(t,n,r,i,s){return a+=e.slice(o,s).replace(Y,Z),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},c=t.variable||"obj";return s.source="function("+c+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var $=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),$(this,n.apply(v,e))}}),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],$(this,n)}}),v.each(["concat","join","slice"],function(e){var t=o[e];v.prototype[e]=function(){return $(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,n){var r,i;!function(){window.WebComponents=window.WebComponents||{flags:{}};var e=document.querySelector('script[src*="webcomponents-lite.js"]'),t={};if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),e)for(var n,r=0;n=e.attributes[r];r++)"src"!==n.name&&(t[n.name]=n.value||!0);if(t.log&&t.log.split){var i=t.log.split(",");t.log={},i.forEach(function(e){t.log[e]=!0})}else t.log={}}t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),WebComponents.flags=t}(),function(e){"use strict";var t=!1;if(!e.forceJURL)try{var n=new URL("b","http://a");n.pathname="c%20d",t="http://a/c%20d"===n.href}catch(e){}if(!t){var r=Object.create(null);r.ftp=21,r.file=0,r.gopher=70,r.http=80,r.https=443,r.ws=80,r.wss=443;var i=Object.create(null);i["%2e"]=".",i[".%2e"]="..",i["%2e."]="..",i["%2e%2e"]="..";var o=void 0,a=/[a-zA-Z]/,s=/[a-zA-Z0-9\+\-\.]/;v.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){m.call(this),p.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||p.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&p.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&p.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&p.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],p.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),p.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),p.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}};var c=e.URL;c&&(v.createObjectURL=function(e){return c.createObjectURL.apply(c,arguments)},v.revokeObjectURL=function(e){c.revokeObjectURL(e)}),e.URL=v}function u(e){return void 0!==r[e]}function l(){m.call(this),this._isInvalid=!0}function d(e){return""==e&&l.call(this),e.toLowerCase()}function h(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function f(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function p(e,t,n){function c(e){y.push(e)}var p=t||"scheme start",m=0,v="",_=!1,g=!1,y=[];e:for(;(e[m-1]!=o||0==m)&&!this._isInvalid;){var w=e[m];switch(p){case"scheme start":if(!w||!a.test(w)){if(t){c("Invalid scheme.");break e}v="",p="no scheme";continue}v+=w.toLowerCase(),p="scheme";break;case"scheme":if(w&&s.test(w))v+=w.toLowerCase();else{if(":"!=w){if(t){if(o==w)break e;c("Code point not allowed in scheme: "+w);break e}v="",m=0,p="no scheme";continue}if(this._scheme=v,v="",t)break e;u(this._scheme)&&(this._isRelative=!0),p="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==w?(this._query="?",p="query"):"#"==w?(this._fragment="#",p="fragment"):o!=w&&"\t"!=w&&"\n"!=w&&"\r"!=w&&(this._schemeData+=h(w));break;case"no scheme":if(n&&u(n._scheme)){p="relative";continue}c("Missing scheme."),l.call(this);break;case"relative or authority":if("/"!=w||"/"!=e[m+1]){c("Expected /, got: "+w),p="relative";continue}p="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),o==w){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==w||"\\"==w)"\\"==w&&c("\\ is an invalid code point."),p="relative slash";else if("?"==w)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,p="query";else{if("#"!=w){var b=e[m+1],E=e[m+2];("file"!=this._scheme||!a.test(w)||":"!=b&&"|"!=b||o!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),p="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,p="fragment"}break;case"relative slash":if("/"!=w&&"\\"!=w){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),p="relative path";continue}"\\"==w&&c("\\ is an invalid code point."),p="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=w){c("Expected '/', got: "+w),p="authority ignore slashes";continue}p="authority second slash";break;case"authority second slash":if(p="authority ignore slashes","/"!=w){c("Expected '/', got: "+w);continue}break;case"authority ignore slashes":if("/"!=w&&"\\"!=w){p="authority";continue}c("Expected authority, got: "+w);break;case"authority":if("@"==w){_&&(c("@ already seen."),v+="%40"),_=!0;for(var C=0;C>>0)+t+++"__"};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){if(!e.JsMutationObserver){var t,n=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))t=setTimeout;else if(window.setImmediate)t=window.setImmediate;else{var r=[],i=String(Math.random());window.addEventListener("message",function(e){if(e.data===i){var t=r;r=[],t.forEach(function(e){e()})}}),t=function(e){r.push(e),window.postMessage(i,"*")}}var o,a,s=!1,c=[],u=0;h.prototype={observe:function(e,t){var r;if(r=e,e=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(r)||r,!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var i,o=n.get(e);o||n.set(e,o=[]);for(var a=0;a0){var o=v(r[i-1],e);if(o)return void(r[i-1]=o)}else n=this.observer,c.push(n),s||(s=!0,t(l));r[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=n.get(e);t||n.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=n.get(e),r=0;r]/g;function l(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case" ":return" "}}}if(t||n){var d=Node.prototype.cloneNode;r.cloneNode=function(e,t){var n=d.call(e,!1);return this.decorate&&this.decorate(n),t&&(n.content.appendChild(d.call(e.content,!0)),this.fixClonedDom(n.content,e.content)),n},r.fixClonedDom=function(e,t){if(t.querySelectorAll)for(var n,r,i=t.querySelectorAll("template"),o=e.querySelectorAll("template"),a=0,s=o.length;a=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,i){var o=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),o.open("GET",n,t.async),o.addEventListener("readystatechange",function(e){if(4===o.readyState){var n=null;try{var a=o.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(i,!t.ok(o)&&o,o.response||o.responseText,n)}}),o.send(),o},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,i){this.receive(e,r,t,n,i)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,i){this.cache[e]=r;for(var o,a=this.pending[e],s=0,c=a.length;s=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){c(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var n,r,i=e;(r=(n=e).ownerDocument.createElement("style")).textContent=n.textContent,t.resolveUrlsInStyle(r),e=r,i.__appliedElement=e,e.__importElement=i,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(i){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(i),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),i&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var a,s=e.sheet.cssRules,c=s?s.length:0,u=0;u=0},hasResource:function(e){return!c(e)||void 0!==e.__doc}};function c(e){return"link"===e.localName&&e.rel===o}e.parser=s,e.IMPORT_SELECTOR=a}),window.HTMLImports.addModule(function(e){var t=e.flags,n=e.IMPORT_LINK_TYPE,r=e.IMPORT_SELECTOR,i=e.rootDocument,o=e.Loader,a=e.Observer,s=e.parser,c={documents:{},documentPreloadSelectors:r,importsPreloadSelectors:[r].join(","),loadNode:function(e){u.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);u.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===i?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,r,i,o,a){if(t.load&&console.log("loaded",e,r),r.__resource=i,r.__error=o,function(e){return function(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}(e,n)}(r)){var c=this.documents[e];void 0===c&&((c=o?null:function(e,t){var r=document.implementation.createHTMLDocument(n);r._URL=t;var i=r.createElement("base");i.setAttribute("href",t),r.baseURI||function(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}(r)||Object.defineProperty(r,"baseURI",{value:t});var o=r.createElement("meta");o.setAttribute("charset","utf-8"),r.head.appendChild(o),r.head.appendChild(i),r.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(r);return r}(i,a||e))&&(c.__importLink=r,this.bootDocument(c)),this.documents[e]=c),r.__doc=c}s.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),s.parseNext()},loadedAll:function(){s.parseNext()}},u=new o(c.loaded.bind(c),c.loadedAll.bind(c));if(c.observer=new a,!document.baseURI){var l={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",l),Object.defineProperty(i,"baseURI",l)}e.importer=c,e.importLoader=u}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,i,o,a,s=0,c=e.length;s=0)){i.push(n);for(var o,a=n.querySelectorAll("link[rel="+t+"]"),s=0,c=a.length;s=0&&i(n,HTMLElement),n)}var h,f=document.createElement.bind(document),p=document.createElementNS.bind(document);function m(e,t){var r=e[t];e[t]=function(){var e=r.apply(this,arguments);return n(e),e}}h=Object.__proto__||o?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),document.registerElement=function(n,i){var o=i||{};if(!n)throw new Error("document.registerElement: first argument `name` must not be empty");if(n.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(n)+"'.");if(function(e){for(var t=0;t=0?t.buttonPositionIndex:e.controlBar.children().length+t.buttonPositionIndex),e.controlBar.addChild("chromecastButton",t,n)),e.on("chromecastRequested",function(e){e.chromecastSessionManager.openCastMenu()}.bind(null,e))}(e,t)}t.exports=function(e){e.registerPlugin("chromecast",function(e){var t=i.extend({addButtonToControlBar:!0},e||{});this.ready(function(){var e,n,i,c,u;this.controlBar&&(r.isChromecastAPIAvailable()?s(this,t):(e=this,n=t,c=a/o,u=1,i=setInterval(function(){u>c?clearInterval(i):(r.isChromecastAPIAvailable()&&(clearInterval(i),s(e,n)),u+=1)},o)))}.bind(this))})}},{"./chromecast/ChromecastSessionManager":4,underscore:2}],7:[function(e,t,n){"use strict";var r=e("underscore"),i=e("./preloadWebComponents"),o=e("./components/ChromecastButton"),a=e("./tech/ChromecastTech"),s=e("./enableChromecast");t.exports=function(e,t){r.defaults(r.extend({},t),{preloadWebComponents:!1}).preloadWebComponents&&i(),e=e||window.videojs,o(e),a(e),s(e)}},{"./components/ChromecastButton":5,"./enableChromecast":6,"./preloadWebComponents":8,"./tech/ChromecastTech":10,underscore:2}],8:[function(e,t,n){"use strict";var r=e("underscore");function i(e){return r.isString(window.navigator.userAgent)&&window.navigator.userAgent.indexOf(e)>=0}t.exports=function(){var t=!document.registerElement,n=i("CriOS");(i("Android")&&i("Chrome/")&&window.navigator.presentation||n)&&t&&e("webcomponents.js/webcomponents-lite.js")}},{underscore:2,"webcomponents.js/webcomponents-lite.js":3}],9:[function(e,t,n){"use strict";e("./index")(void 0,window.SILVERMINE_VIDEOJS_CHROMECAST_CONFIG)},{"./index":7}],10:[function(e,t,n){"use strict";var r,i=e("../chromecast/ChromecastSessionManager"),o=e("./ChromecastTechUI"),a=e("underscore");r={constructor:function(e){var t;return this._eventListeners=[],this.videojsPlayer=this.videojs(e.playerId),this._chromecastSessionManager=this.videojsPlayer.chromecastSessionManager,this._ui=new o,this._ui.updatePoster(this.videojsPlayer.poster()),t=this.constructor.super_.apply(this,arguments),this._remotePlayer=this._chromecastSessionManager.getRemotePlayer(),this._remotePlayerController=this._chromecastSessionManager.getRemotePlayerController(),this._listenToPlayerControllerEvents(),this.on("dispose",this._removeAllEventListeners.bind(this)),this._hasPlayedAnyItem=!1,this._requestTitle=e.requestTitleFn||a.noop,this._requestSubtitle=e.requestSubtitleFn||a.noop,this._requestCustomData=e.requestCustomDataFn||a.noop,this._initialStartTime=e.startTime||0,this._playSource(e.source,this._initialStartTime),this.ready(function(){this.setMuted(e.muted)}.bind(this)),t},createEl:function(){return this._ui.getDOMElement()},play:function(){this.paused()&&(this.ended()&&!this._isMediaLoading?this._playSource({src:this.videojsPlayer.src()},0):this._remotePlayerController.playOrPause())},pause:function(){!this.paused()&&this._remotePlayer.canPause&&this._remotePlayerController.playOrPause()},paused:function(){return this._remotePlayer.isPaused||this.ended()||null===this._remotePlayer.playerState},setSource:function(e){this._currentSource&&this._currentSource.src===e.src&&this._currentSource.type===e.type||(this._currentSource=e,this._playSource(e,0))},_playSource:function(e,t){var n,r=this._getCastSession(),i=new chrome.cast.media.MediaInfo(e.src,e.type),o=this._requestTitle(e),a=this._requestSubtitle(e),s=this._requestCustomData(e);this.trigger("waiting"),this._clearSessionTimeout(),i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.metadataType=chrome.cast.media.MetadataType.GENERIC,i.metadata.title=o,i.metadata.subtitle=a,s&&(i.customData=s),this._ui.updateTitle(o),this._ui.updateSubtitle(a),(n=new chrome.cast.media.LoadRequest(i)).autoplay=!0,n.currentTime=t,this._isMediaLoading=!0,this._hasPlayedCurrentItem=!1,r.loadMedia(n).then(function(){this._hasPlayedAnyItem||this.triggerReady(),this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("play"),this.trigger("playing"),this._hasPlayedAnyItem=!0,this._isMediaLoading=!1,this._getMediaSession().addUpdateListener(this._onMediaSessionStatusChanged.bind(this))}.bind(this),this._triggerErrorEvent.bind(this))},setCurrentTime:function(e){var t=this.duration();e>t||!this._remotePlayer.canSeek||(this._remotePlayer.currentTime=Math.min(t-1,e),this._remotePlayerController.seek(),this._triggerTimeUpdateEvent())},currentTime:function(){return this._hasPlayedAnyItem?this._remotePlayer.currentTime:this._initialStartTime},duration:function(){return this._hasPlayedAnyItem?this._remotePlayer.duration:this.videojsPlayer.duration()},ended:function(){var e=this._getMediaSession();return!(e||!this._hasMediaSessionEnded)||!!e&&e.idleReason===chrome.cast.media.IdleReason.FINISHED},volume:function(){return this._remotePlayer.volumeLevel},setVolume:function(e){this._remotePlayer.volumeLevel=e,this._remotePlayerController.setVolumeLevel(),this._triggerVolumeChangeEvent()},muted:function(){return this._remotePlayer.isMuted},setMuted:function(e){(this._remotePlayer.isMuted&&!e||!this._remotePlayer.isMuted&&e)&&this._remotePlayerController.muteOrUnmute()},poster:function(){return this._ui.getPoster()},setPoster:function(e){this._ui.updatePoster(e)},buffered:function(){},seekable:function(){return this.videojs.createTimeRange(0,this.duration())},controls:function(){return!1},playsinline:function(){return!0},supportsFullScreen:function(){return!0},setAutoplay:function(){},playbackRate:function(){var e=this._getMediaSession();return e?e.playbackRate:1},setPlaybackRate:function(){},preload:function(){},load:function(){},readyState:function(){return"IDLE"===this._remotePlayer.playerState||"BUFFERING"===this._remotePlayer.playerState?0:4},_listenToPlayerControllerEvents:function(){var e=cast.framework.RemotePlayerEventType;this._addEventListener(this._remotePlayerController,e.PLAYER_STATE_CHANGED,this._onPlayerStateChanged,this),this._addEventListener(this._remotePlayerController,e.VOLUME_LEVEL_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.IS_MUTED_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.CURRENT_TIME_CHANGED,this._triggerTimeUpdateEvent,this),this._addEventListener(this._remotePlayerController,e.DURATION_CHANGED,this._triggerDurationChangeEvent,this)},_addEventListener:function(e,t,n,r){var i;i={target:e,type:t,callback:n,context:r,listener:n.bind(r)},e.addEventListener(t,i.listener),this._eventListeners.push(i)},_removeAllEventListeners:function(){for(;this._eventListeners.length>0;)this._removeEventListener(this._eventListeners[0]);this._eventListeners=[]},_removeEventListener:function(e){var t;e.target.removeEventListener(e.type,e.listener),-1!==(t=a.findIndex(this._eventListeners,function(t){return t.target===e.target&&t.type===e.type&&t.callback===e.callback&&t.context===e.context}))&&this._eventListeners.splice(t,1)},_onPlayerStateChanged:function(){var e=chrome.cast.media.PlayerState,t=this._remotePlayer.playerState;t===e.PLAYING?(this._hasPlayedCurrentItem=!0,this.trigger("play"),this.trigger("playing")):t===e.PAUSED?this.trigger("pause"):t===e.IDLE&&this.ended()||null===t&&this._hasPlayedCurrentItem?(this._hasPlayedCurrentItem=!1,this._closeSessionOnTimeout(),this.trigger("ended"),this._triggerTimeUpdateEvent()):t===e.BUFFERING&&this.trigger("waiting")},_onMediaSessionStatusChanged:function(e){this._hasMediaSessionEnded=!!e},_closeSessionOnTimeout:function(){this._clearSessionTimeout(),this._sessionTimeoutID=setTimeout(function(){var e=this._getCastSession();e&&e.endSession(!0),this._clearSessionTimeout()}.bind(this),1e4)},_clearSessionTimeout:function(){this._sessionTimeoutID&&(clearTimeout(this._sessionTimeoutID),this._sessionTimeoutID=!1)},_getCastContext:function(){return this._chromecastSessionManager.getCastContext()},_getCastSession:function(){return this._getCastContext().getCurrentSession()},_getMediaSession:function(){var e=this._getCastSession();return e?e.getMediaSession():null},_triggerVolumeChangeEvent:function(){this.trigger("volumechange")},_triggerTimeUpdateEvent:function(){this.trigger("timeupdate")},_triggerDurationChangeEvent:function(){this.trigger("durationchange")},_triggerErrorEvent:function(){this.trigger("error")}},t.exports=function(e){var t,n=e.getComponent("Tech");(t=e.extend(n,r)).canPlaySource=i.isChromecastConnected.bind(i),t.isSupported=i.isChromecastConnected.bind(i),t.prototype.featuresVolumeControl=!0,t.prototype.featuresPlaybackRate=!1,t.prototype.movingMediaElementInDOM=!1,t.prototype.featuresFullscreenResize=!0,t.prototype.featuresTimeupdateEvents=!0,t.prototype.featuresProgressEvents=!1,t.prototype.featuresNativeTextTracks=!1,t.prototype.featuresNativeAudioTracks=!1,t.prototype.featuresNativeVideoTracks=!1,t.prototype.videojs=e,e.registerTech("chromecast",t)}},{"../chromecast/ChromecastSessionManager":4,"./ChromecastTechUI":11,underscore:2}],11:[function(e,t,n){"use strict";var r;r=e("class.extend").extend({init:function(){this._el=this._createDOMElement()},_createDOMElement:function(){var e=this._createElement("div","vjs-tech vjs-tech-chromecast"),t=this._createElement("div","vjs-tech-chromecast-poster"),n=this._createElement("img","vjs-tech-chromecast-poster-img"),r=this._createElement("div","vjs-tech-chromecast-title"),i=this._createElement("div","vjs-tech-chromecast-subtitle"),o=this._createElement("div","vjs-tech-chromecast-title-container");return t.appendChild(n),o.appendChild(r),o.appendChild(i),e.appendChild(o),e.appendChild(t),e},_createElement:function(e,t){var n=document.createElement(e);return n.className=t,n},getDOMElement:function(){return this._el},_findPosterEl:function(){return this._el.querySelector(".vjs-tech-chromecast-poster")},_findPosterImageEl:function(){return this._el.querySelector(".vjs-tech-chromecast-poster-img")},_findTitleEl:function(){return this._el.querySelector(".vjs-tech-chromecast-title")},_findSubtitleEl:function(){return this._el.querySelector(".vjs-tech-chromecast-subtitle")},updatePoster:function(e){var t=this._findPosterImageEl();this._poster=e||null,e?(t.setAttribute("src",e),t.classList.remove("vjs-tech-chromecast-poster-img-empty")):(t.removeAttribute("src"),t.classList.add("vjs-tech-chromecast-poster-img-empty"))},getPoster:function(){return this._poster},updateTitle:function(e){var t=this._findTitleEl();this._title=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-title-empty")):t.classList.add("vjs-tech-chromecast-title-empty")},updateSubtitle:function(e){var t=this._findSubtitleEl();this._subtitle=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-subtitle-empty")):t.classList.add("vjs-tech-chromecast-subtitle-empty")}}),t.exports=r},{"class.extend":1}]},{},[9]);