"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84158],{84158:function(e,t,r){r(78557),r(67593),r(23630),r(69177);var s=r(5898),a=r(58953),i=Object.create(HTMLDivElement.prototype);i.createdCallback=function(){this.classList.add("progressring"),this.setAttribute("dir","ltr");var e=this;if(e.innerHTML='<div class="progressring-bg"> <div class="progressring-text"></div> </div> <div class="spiner-holder-one animate-0-25-a"> <div class="spiner-holder-two animate-0-25-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-25-50-a"> <div class="spiner-holder-two animate-25-50-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-50-75-a"> <div class="spiner-holder-two animate-50-75-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-75-100-a"> <div class="spiner-holder-two animate-75-100-b"> <div class="progressring-spiner"></div> </div> </div> ',window.MutationObserver){var t=new MutationObserver((function(t){t.forEach((function(){e.setProgress(parseFloat(e.getAttribute("data-progress")||"0"))}))}));t.observe(e,{attributes:!0,childList:!1,characterData:!1}),e.observer=t}e.setProgress(parseFloat(e.getAttribute("data-progress")||"0"))},i.setProgress=function(e){var t;(e=Math.floor(e))<25?(t=e/100*360-90,this.querySelector(".animate-0-25-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-25-50-b").style.transform="rotate(-90deg)",this.querySelector(".animate-50-75-b").style.transform="rotate(-90deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=25&&e<50?(t=(e-25)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-50-75-b").style.transform="rotate(-90deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=50&&e<75?(t=(e-50)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="none",this.querySelector(".animate-50-75-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=75&&e<=100&&(t=(e-75)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="none",this.querySelector(".animate-50-75-b").style.transform="none",this.querySelector(".animate-75-100-b").style.transform="rotate("+t+"deg)"),this.querySelector(".progressring-text").innerHTML=(0,a.a4)(e/100,(0,s.jE)())},i.attachedCallback=function(){},i.detachedCallback=function(){var e=this.observer;e&&(e.disconnect(),this.observer=null)},document.registerElement("emby-progressring",{prototype:i,extends:"div"});var n=i,o=r(36300),l=r(67430),d=r(4935),c=Object.create(n);c.createdCallback=function(){var e,t=this;n.createdCallback&&n.createdCallback.call(this);var r=null===(e=o.Ay.parentWithAttribute(this,"data-serverid"))||void 0===e?void 0:e.getAttribute("data-serverid"),s=r?l.tF.getApiClient(r):l.tF.currentApiClient();this._wsUnsubscribers=[],s&&this._wsUnsubscribers.push(s.subscribe([d.De.RefreshProgress],(function(e){var r=e.Data;return function(e,t){if(e.itemId||(e.itemId=o.Ay.parentWithAttribute(e,"data-id").getAttribute("data-id")),(null==t?void 0:t.ItemId)===e.itemId){var r=parseFloat(t.Progress);r&&r<100?e.classList.remove("hide"):e.classList.add("hide"),e.dataset.progress=r}}(t,r)})))},c.attachedCallback=function(){n.attachedCallback&&n.attachedCallback.call(this)},c.detachedCallback=function(){var e;n.detachedCallback&&n.detachedCallback.call(this),null===(e=this._wsUnsubscribers)||void 0===e||e.forEach((function(e){e()})),this._wsUnsubscribers=[],this.itemId=null},document.registerElement("emby-itemrefreshindicator",{prototype:c,extends:"div"})}}]);