"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4108],{81719:function(e,n,t){t.r(n),t(61013),t(5769),t(63238),t(61418),t(17460),t(14078);var a=t(65009),l=t.n(a),s=(t(72326),t(56705)),i=t(3319),r=t(44614),o=t(76543);function c(){s.ZP.show();var e=this;return ApiClient.getNamedConfiguration("dlna").then((function(n){n.EnablePlayTo=e.querySelector("#chkEnablePlayTo").checked,n.EnableDebugLog=e.querySelector("#chkEnableDlnaDebugLogging").checked,n.ClientDiscoveryIntervalSeconds=$("#txtClientDiscoveryInterval",e).val(),n.EnableServer=$("#chkEnableServer",e).is(":checked"),n.BlastAliveMessages=$("#chkBlastAliveMessages",e).is(":checked"),n.BlastAliveMessageIntervalSeconds=$("#txtBlastInterval",e).val(),n.DefaultUserId=$("#selectUser",e).val(),ApiClient.updateNamedConfiguration("dlna",n).then(o.ZP.processServerConfigurationUpdateResult)})),!1}function u(){return[{href:"#!/dlnasettings.html",name:r.ZP.translate("Settings")},{href:"#!/dlnaprofiles.html",name:r.ZP.translate("TabProfiles")}]}$(document).on("pageinit","#dlnaSettingsPage",(function(){$(".dlnaSettingsForm").off("submit",c).on("submit",c)})).on("pageshow","#dlnaSettingsPage",(function(){i.Z.setTabs("dlna",0,u),s.ZP.show();var e=this,n=ApiClient.getNamedConfiguration("dlna"),t=ApiClient.getUsers();Promise.all([n,t]).then((function(n){!function(e,n,t){e.querySelector("#chkEnablePlayTo").checked=n.EnablePlayTo,e.querySelector("#chkEnableDlnaDebugLogging").checked=n.EnableDebugLog,$("#txtClientDiscoveryInterval",e).val(n.ClientDiscoveryIntervalSeconds),$("#chkEnableServer",e).prop("checked",n.EnableServer),$("#chkBlastAliveMessages",e).prop("checked",n.BlastAliveMessages),$("#txtBlastInterval",e).val(n.BlastAliveMessageIntervalSeconds);var a=t.map((function(e){return'<option value="'+e.Id+'">'+l()(e.Name)+"</option>"})).join("");$("#selectUser",e).html(a).val(n.DefaultUserId||""),s.ZP.hide()}(e,n[0],n[1])}))}))}}]);