(window.webpackJsonp=window.webpackJsonp||[]).push([["npm.videojs-vtt.js"],{"2b8c":function(t,e,n){var r=n("be09"),i=t.exports={WebVTT:n("d02c4"),VTTCue:n("b03c"),VTTRegion:n("f97d")};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,s=i.VTTRegion,a=r.VTTCue,c=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=s},i.restore=function(){r.VTTCue=a,r.VTTRegion=c},r.VTTCue||i.shim()},b03c:function(t,e){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}function o(t){return"string"==typeof t&&(!!r[t.toLowerCase()]&&t.toLowerCase())}function s(t,e,n){this.hasBeenReset=!1;var r="",s=!1,a=t,c=e,u=n,h=null,l="",f=!0,p="auto",g="start",d="auto",m="auto",v=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(t){r=""+t}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(t){s=!!t}},startTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");a=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(t){u=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return h},set:function(t){h=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(t){var e=i(t);if(!1===e)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return f},set:function(t){f=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return g},set:function(t){var e=o(t);e&&(g=e,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return d},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");d=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(t){var e=o(t);e&&(m=e,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(t){var e=o(t);if(!e)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=e,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=s},d02c4:function(t,e,n){var r=n("ef34"),i=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function o(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function s(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function a(){this.values=i(null)}function c(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length)e(s[0],s[1])}}function u(t,e,n){var r=t;function i(){var e=s(t);if(null===e)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=i(),u(),"--\x3e"!==t.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),u(),e.endTime=i(),u(),function(t,e){var r=new a;c(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","center","end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");try{e.line=r.get("line","auto")}catch(t){}e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100);try{e.align=r.get("align","center")}catch(t){e.align=r.get("align","middle")}try{e.position=r.get("position","auto")}catch(t){e.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},e.align)}e.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},e.align)}(t,e)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r=0&&e<=100))&&(this.set(t,e),!0)}};var h=r.createElement&&r.createElement("textarea"),l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},g={rt:"ruby"};function d(t,e){function n(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]*>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}function r(t){return h.innerHTML=t,t=h.textContent,h.textContent="",t}function i(t,e){return!g[e.localName]||g[e.localName]===t.localName}function o(e,n){var r=l[e];if(!r)return null;var i=t.document.createElement(r),o=p[e];return o&&n&&(i[o]=n.trim()),i}for(var a,c=t.document.createElement("div"),u=c,d=[];null!==(a=n());)if("<"!==a[0])u.appendChild(t.document.createTextNode(r(a)));else{if("/"===a[1]){d.length&&d[d.length-1]===a.substr(2).replace(">","")&&(d.pop(),u=u.parentNode);continue}var m,v=s(a.substr(1,a.length-2));if(v){m=t.document.createProcessingInstruction("timestamp",v),u.appendChild(m);continue}var b=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(m=o(b[1],b[3])))continue;if(!i(u,m))continue;if(b[2]){var w=b[2].split(".");w.forEach((function(t){var e=/^bg_/.test(t),n=e?t.slice(3):t;if(f.hasOwnProperty(n)){var r=e?"background-color":"color",i=f[n];m.style[r]=i}})),m.className=w.join(" ")}d.push(b[1]),u.appendChild(m),u=m}return c}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(t){for(var e=0;e=n[0]&&t<=n[1])return!0}return!1}function b(t){var e=[],n="";if(!t||!t.childNodes)return"ltr";function r(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function i(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):n}return"ruby"===e.tagName?i(t):e.childNodes?(r(t,e),i(t)):void 0}for(r(e,t);n=i(e);)for(var o=0;o=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;il&&(h=h<0?-1:1,h*=Math.ceil(l/u)*u),s<0&&(h+=""===o.vertical?n.height:n.width,a=a.reverse()),i.move(f,h)}else{var p=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":s-=p/2;break;case"end":s-=p}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}a=["+y","-x","+x","-y"],i=new T(e)}var g=function(t,e){for(var i,o=new T(t),s=1,a=0;ac&&(i=new T(t),s=c),t=new T(o)}return i||o}(i,a);e.move(g.toCSSCompatValues(n))}function E(){}w.prototype.applyStyles=function(t,e){for(var n in e=e||this.div,t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},w.prototype.formatStyle=function(t,e){return 0===t?0:t+e},y.prototype=i(w.prototype),y.prototype.constructor=y,T.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},T.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},T.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},T.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},T.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},E.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},E.convertCueToDOMTree=function(t,e){return t&&e?d(t,e):null};E.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e=0&&t<=100}t.exports=function(){var t=100,e=3,n=0,o=100,s=0,a=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!i(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!i(t))throw new Error("RegionAnchorX must be between 0 and 100.");o=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!i(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!i(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(t){if(!i(t))throw new Error("ViewportAnchorX must be between 0 and 100.");s=t}},scroll:{enumerable:!0,get:function(){return c},set:function(t){var e=r(t);!1===e||(c=e)}}})}}}]);