"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[60545],{82926:function(e,t,r){r.r(t),r.d(t,{default:function(){return d}}),r(44962),r(29305),r(32733),r(84701),r(81678),r(86584),r(4754),r(94),r(36947),r(78557),r(90076),r(83994),r(82367);var n=r(79754),o=r(46782),i=r(5898),l=r(82885);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(e){return e.preventDefault(),!1}function f(e,t,n){Promise.resolve().then(r.bind(r,46345)).then((function(r){var o=n?"on":"off";r.centerFocus[o](e,t)}))}r(63001),r(15453),r(10353);var d=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"show",value:function(e){return new Promise((function(t,r){var a={removeOnClose:!0,scrollY:!1};o.A.tv?a.size="fullscreen":a.size="small";var c=n.default.createDialog(a);c.classList.add("formDialog");var s,d,v,y="";y+='<div class="formDialogHeader">',y+='<button is="paper-icon-button-light" class="btnCancel hide-mouse-idle-tv" tabindex="-1" title="'.concat(i.Ay.translate("ButtonBack"),'"><span class="material-icons arrow_back" aria-hidden="true"></span></button>'),y+='<h3 class="formDialogHeaderTitle">${Sort}</h3>',y+="</div>",y+='<div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form style="margin:auto"> <div class="verticalSection verticalSection-extrabottompadding" style="margin-top:2em"> <div class="selectContainer"> <select is="emby-select" class="selectSortBy" label="${LabelSortBy}"> </select> </div> <div class="selectContainer"> <select is="emby-select" class="selectSortOrder" label="${LabelSortOrder}"> <option value="Ascending">${Ascending}</option> <option value="Descending">${Descending}</option> </select> </div> </div> </form> </div> </div> ',c.innerHTML=i.Ay.translateHtml(y,"core"),function(e,t){e.querySelector(".selectSortBy").innerHTML=t.map((function(e){return'<option value="'+e.value+'">'+e.name+"</option>"})).join("")}(c,e.sortOptions),s=c,d=e.settings,s.querySelector("form").addEventListener("submit",u),s.querySelector(".selectSortOrder").value=d.sortOrder,s.querySelector(".selectSortBy").value=d.sortBy,c.querySelector(".btnCancel").addEventListener("click",(function(){n.default.close(c)})),o.A.tv&&f(c.querySelector(".formDialogContent"),!1,!0),c.querySelector("form").addEventListener("change",(function(){v=!0}),!0),n.default.open(c).then((function(){if(o.A.tv&&f(c.querySelector(".formDialogContent"),!1,!1),v)return function(e,t){l.setFilter(t+"-sortorder",e.querySelector(".selectSortOrder").value),l.setFilter(t+"-sortby",e.querySelector(".selectSortBy").value)}(c,e.settingsKey),void t();r()}))}))}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()}}]);