"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8021],{14511:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}}),n(5769),n(63238),n(61418),n(17460),n(14078);var i=n(56705),r=n(83094),a=(n(83225),n(78066),n(76543));function o(){var e=this;i.ZP.show();var t=getParameterByName("id"),n=ApiClient.getJSON(ApiClient.getUrl("Devices/Info",{Id:t})),r=ApiClient.getJSON(ApiClient.getUrl("Devices/Options",{Id:t}));Promise.all([n,r]).then((function(t){!function(e,t,n){e.querySelector("#txtCustomName",e).value=n.CustomName||"",e.querySelector(".reportedName",e).innerText=t.Name||""}(e,t[0],t[1]),i.ZP.hide()}))}function s(e){var t,n;return t=r.ZP.parentWithClass(this,"page"),n=getParameterByName("id"),ApiClient.ajax({url:ApiClient.getUrl("Devices/Options",{Id:n}),type:"POST",data:JSON.stringify({CustomName:t.querySelector("#txtCustomName").value}),contentType:"application/json"}).then(a.ZP.processServerConfigurationUpdateResult),e.preventDefault(),!1}function u(e){e.querySelector("form").addEventListener("submit",s),e.addEventListener("viewshow",o)}}}]);