define(["css!./emby-progressbar"],function(){"use strict";var EmbyProgressBar=function(_HTMLDivElement){babelHelpers.inherits(EmbyProgressBar,_HTMLDivElement);var _super=_createSuper(EmbyProgressBar);function EmbyProgressBar(){var _this;babelHelpers.classCallCheck(this,EmbyProgressBar);var self=_this=_super.call(this);return babelHelpers.possibleConstructorReturn(_this,self)}return babelHelpers.createClass(EmbyProgressBar,[{key:"connectedCallback",value:function(){this.timeInterval&&clearInterval(this.timeInterval),"time"===this.getAttribute("data-automode")&&(this.timeInterval=setInterval(function(){var start=parseInt(this.getAttribute("data-starttime")),end=parseInt(this.getAttribute("data-endtime")),pct=(Date.now()-start)/(end-start)*100,pct=Math.min(100,pct);pct=Math.max(0,pct),this.querySelector(".itemProgressBarForeground").style.width=pct+"%"}.bind(this),6e4))}},{key:"disconnectedCallback",value:function(){this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null)}}]),EmbyProgressBar}(babelHelpers.wrapNativeSuper(HTMLDivElement));customElements.define("emby-progressbar",EmbyProgressBar,{extends:"div"})});