"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[30307],{17784:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}}),n(86584);var r=n(98320),o=n(8566),s=n(5898),i=(n(10353),n(89100)),a=n(41177);function l(e){e.preventDefault(),o.Ay.show();var t=this;return ApiClient.getServerConfiguration().then((function(e){e.EnableSlowResponseWarning=t.querySelector("#chkSlowResponseWarning").checked,e.SlowResponseThresholdMs=t.querySelector("#txtSlowResponseWarning").value,ApiClient.updateServerConfiguration(e).then((function(){i.default.processServerConfigurationUpdateResult()}),(function(){(0,a.A)(s.Ay.translate("ErrorDefault")),i.default.processServerConfigurationUpdateResult()}))})),!1}function u(e){e.querySelector(".logsForm").addEventListener("submit",l),e.addEventListener("viewbeforeshow",(function(){o.Ay.show();var t=ApiClient;t.getJSON(t.getUrl("System/Logs")).then((function(n){var o="";o+='<div class="paperList">',o+=n.map((function(e){var n=t.getUrl("System/Logs/Log",{name:e.Name}),o="";o+='<a is="emby-linkbutton" href="'+(n+="&api_key="+t.accessToken())+'" target="_blank" class="listItem listItem-border" style="color:inherit;">',o+='<div class="listItemBody two-line">',o+="<h3 class='listItemBodyText' dir='ltr' style='text-align: left'>"+e.Name+"</h3>";var s=r.Ay.parseISO8601Date(e.DateModified,!0),i=r.Ay.toLocaleDateString(s);return o+='<div class="listItemBodyText secondary">'+(i+=" "+r.Ay.getDisplayTime(s))+"</div>",(o+="</div>")+"</a>"})).join(""),o+="</div>",e.querySelector(".serverLogs").innerHTML=o})),t.getServerConfiguration().then((function(t){e.querySelector("#chkSlowResponseWarning").checked=t.EnableSlowResponseWarning,e.querySelector("#txtSlowResponseWarning").value=t.SlowResponseThresholdMs})),o.Ay.hide()}))}}}]);