".concat(t,"
")}).join("")}i.art.emit("subtitle:update",a)})}})}},{key:"load",value:function(t){var e,n=this,i=this.art.notice;return fetch(t).then(function(t){return e=t.headers.get("Content-Type"),t.text()}).then(function(t){return/x-subrip/gi.test(e)?n.vttText=n.srtToVtt(t):n.vttText=t,n.vttToBlob(n.vttText)}).catch(function(t){throw i.show(t),console.warn(t),t})}},{key:"srtToVtt",value:function(t){return"WEBVTT \r\n\r\n".concat(t.replace(/\{\\([ibu])\}/g,"$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat("\r\n\r\n"))}},{key:"vttToBlob",value:function(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}},{key:"checkExt",value:function(t){var e=x(t);Ut("vtt"===e||"srt"===e,"'subtitle.url' option require 'vtt' or 'srt' format, but got '".concat(e,"'."))}},{key:"show",value:function(){var t=this.art,e=t.refs.$subtitle,n=t.i18n,i=t.notice;Qt(e,"display","block"),this.state=!0,i.show(n.get("Show subtitle")),this.art.emit("subtitle:show",e)}},{key:"hide",value:function(){var t=this.art,e=t.refs.$subtitle,n=t.i18n,i=t.notice;Qt(e,"display","none"),this.state=!1,i.show(n.get("Hide subtitle")),this.art.emit("subtitle:hide",e)}},{key:"toggle",value:function(){this.state?this.hide():this.show()}},{key:"switch",value:function(e){var n=this,i=this.art.refs.$track;this.checkExt(e),Ut(i,"You need to initialize the subtitle option first."),this.load(e).then(function(t){i.src=t,n.art.emit("subtitle:switch",e)})}}]),n}();var bt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.ContentRect=function(t){if("getBBox"in t){var e=t.getBBox();return Object.freeze({height:e.height,left:0,top:0,width:e.width})}var n=window.getComputedStyle(t);return Object.freeze({height:parseFloat(n.height||"0"),left:parseFloat(n.paddingLeft||"0"),top:parseFloat(n.paddingTop||"0"),width:parseFloat(n.width||"0")})}});e(bt);bt.ContentRect;var wt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.target=t,this.$$broadcastWidth=this.$$broadcastHeight=0}return Object.defineProperty(t.prototype,"broadcastWidth",{get:function(){return this.$$broadcastWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"broadcastHeight",{get:function(){return this.$$broadcastHeight},enumerable:!0,configurable:!0}),t.prototype.isActive=function(){var t=bt.ContentRect(this.target);return!!t&&(t.width!==this.broadcastWidth||t.height!==this.broadcastHeight)},t}();e.ResizeObservation=n});e(wt);wt.ResizeObservation;var xt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.target=t,this.contentRect=bt.ContentRect(t)};e.ResizeObserverEntry=n});e(xt);xt.ResizeObserverEntry;var $t=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=[],i=function(){function t(t){this.$$observationTargets=[],this.$$activeTargets=[],this.$$skippedTargets=[];var e=function(t){if(void 0===t)return"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if("function"!=typeof t)return"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."}(t);if(e)throw TypeError(e);this.$$callback=t,n.push(this)}return t.prototype.observe=function(t){var e=r("observe",t);if(e)throw TypeError(e);0".concat(t,"
")}).join("")}i.art.emit("subtitle:update",a)})}})}},{key:"load",value:function(t){var e,n=this,i=this.art.notice;return fetch(t).then(function(t){return e=t.headers.get("Content-Type"),t.text()}).then(function(t){return/x-subrip/gi.test(e)?n.vttText=n.srtToVtt(t):n.vttText=t,n.vttToBlob(n.vttText)}).catch(function(t){throw i.show(t),console.warn(t),t})}},{key:"srtToVtt",value:function(t){return"WEBVTT \r\n\r\n".concat(t.replace(/\{\\([ibu])\}/g,"$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat("\r\n\r\n"))}},{key:"vttToBlob",value:function(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}},{key:"checkExt",value:function(t){var e=x(t);Yt("vtt"===e||"srt"===e,"'subtitle.url' option require 'vtt' or 'srt' format, but got '".concat(e,"'."))}},{key:"show",value:function(){var t=this.art,e=t.refs.$subtitle,n=t.i18n,i=t.notice;Xt(e,"display","block"),this.state=!0,i.show(n.get("Show subtitle")),this.art.emit("subtitle:show",e)}},{key:"hide",value:function(){var t=this.art,e=t.refs.$subtitle,n=t.i18n,i=t.notice;Xt(e,"display","none"),this.state=!1,i.show(n.get("Hide subtitle")),this.art.emit("subtitle:hide",e)}},{key:"toggle",value:function(){this.state?this.hide():this.show()}},{key:"switch",value:function(e){var n=this,i=this.art.refs.$track;this.checkExt(e),Yt(i,"You need to initialize the subtitle option first."),this.load(e).then(function(t){i.src=t,n.art.emit("subtitle:switch",e)})}}]),n}();var wt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.ContentRect=function(t){if("getBBox"in t){var e=t.getBBox();return Object.freeze({height:e.height,left:0,top:0,width:e.width})}var n=window.getComputedStyle(t);return Object.freeze({height:parseFloat(n.height||"0"),left:parseFloat(n.paddingLeft||"0"),top:parseFloat(n.paddingTop||"0"),width:parseFloat(n.width||"0")})}});e(wt);wt.ContentRect;var xt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.target=t,this.$$broadcastWidth=this.$$broadcastHeight=0}return Object.defineProperty(t.prototype,"broadcastWidth",{get:function(){return this.$$broadcastWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"broadcastHeight",{get:function(){return this.$$broadcastHeight},enumerable:!0,configurable:!0}),t.prototype.isActive=function(){var t=wt.ContentRect(this.target);return!!t&&(t.width!==this.broadcastWidth||t.height!==this.broadcastHeight)},t}();e.ResizeObservation=n});e(xt);xt.ResizeObservation;var $t=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.target=t,this.contentRect=wt.ContentRect(t)};e.ResizeObserverEntry=n});e($t);$t.ResizeObserverEntry;var kt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=[],i=function(){function t(t){this.$$observationTargets=[],this.$$activeTargets=[],this.$$skippedTargets=[];var e=function(t){if(void 0===t)return"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if("function"!=typeof t)return"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."}(t);if(e)throw TypeError(e);this.$$callback=t,n.push(this)}return t.prototype.observe=function(t){var e=r("observe",t);if(e)throw TypeError(e);0