Jellyfin_random_backdrops/main.jellyfin.bundle.js

2 lines
490 KiB
JavaScript

/*! For license information please see main.jellyfin.bundle.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[14577],{86191:function(e,t,n){"use strict";n(29305),n(32733),n(51770),n(84701),n(81678),n(2623),n(14382),n(44962),n(87324),n(89336),n(4754),n(10849),n(70389),n(94),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(21359),n(61642),n(83994),n(23630),n(82367);var r=n(87082),i=n(92600),o=n(22622),a=n(89100),s=n(44797),l=n(82885),u=n(90381);function c(e){return c="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},c(e)}function d(){d=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=p(e[i],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(c(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),u(k,l,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]: {};t%2?p(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function v(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function g(e,t,n){return t=x(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=x(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},w.apply(null,arguments)}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var A=function(e){!e.quality&&(e.maxWidth||e.width||e.maxHeight||e.height||e.fillWidth||e.fillHeight)&&(e.quality=90)},P=function(){if(navigator.connection){var e=navigator.connection.downlinkMax;if(e&&e>0&&e<Number.POSITIVE_INFINITY)return e/=8,e*=1e6,e*=.7,parseInt(e,10)}return null},k=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=g(this,t,arguments)).localApiClient=null,e.firstConnection=null,e._minServerVersion=r.U,s.A.on(e,"localusersignedout",(function(e,t){(0,l.setUserInfo)(null,null),I.credentials(I.credentials()),window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedOut&&window.NativeShell.onLocalUserSignedOut(t)})),s.A.on(e,"apiclientcreated",(function(e,t){t.getMaxBandwidth=P,t.normalizeImageOptions=A})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor: {value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,a=[{key: "initApiClient",value:function(e){console.debug("creating ApiClient singleton");var t=new i.ApiClient(e,o.g.appName(),o.g.appVersion(),o.g.deviceName(),o.g.deviceId());t.enableAutomaticNetworking=!1,t.manualAddressOnly=!0,this.addApiClient(t),this.setLocalApiClient(t),console.debug("loaded ApiClient singleton")}},{key: "connect",value:function(e){return(n=t,"connect",r=this,"function"==typeof(i=w(x(1&3?n.prototype:n),"connect",r))?function(e){return i.apply(r,e)}:i)([h({enableAutoLogin:u.A.enableAutoLogin()},e)]);var n,r,i}},{key: "setLocalApiClient",value:function(e){e&&(this.localApiClient=e,window.ApiClient=e)}},{key: "getLocalApiClient",value:function(){return this.localApiClient}},{key: "currentApiClient",value:function(){var e=this.getLocalApiClient();if(!e){var t=this.getLastUsedServer();t&&(e=this.getApiClient(t.Id))}return e}},{key: "getCurrentApiClientAsync",value:(c=d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.currentApiClient()){e.next=3;break}throw new Error("[ServerConnection] No current ApiClient instance");case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)})),p=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=c.apply(e,t);function o(e){f(i,n,r,o,a,"next",e)}function a(e){f(i,n,r,o,a,"throw",e)}o(void 0)}))},function(){return p.apply(this,arguments)})},{key: "onLocalUserSignedIn",value:function(e){var t=this.getApiClient(e.ServerId);return this.setLocalApiClient(t),(0,l.setUserInfo)(e.Id,t).then((function(){return window.NativeShell&&"function"==typeof window.NativeShell.onLocalUserSignedIn?window.NativeShell.onLocalUserSignedIn(e,t.accessToken()):Promise.resolve()}))}}],a&&m(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,c,p}(i.ConnectionManager),I=new i.Credentials,j=a.default.capabilities(o.g);t.A=new k(I,o.g.appName(),o.g.appVersion(),o.g.deviceName(),o.g.deviceId(),j)},41177:function(e,t,n){"use strict";n.d(t,{A:function(){return c}}),n(29305),n(32733),n(51770),n(84701),n(2623),n(44962),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(70267),i=n(34789),o=n(48080),a=n(5898);function s(e){return s="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},s(e)}function l(){l=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};d(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,l){var u=p(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==s(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),d(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),d(k,c,"Generator"),d(k,a,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e,t){return d.apply(this,arguments)}function d(){var e;return e=l().mark((function e(t,n){var s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=!(i.A.web0s||i.A.tizenVersion&&i.A.tizenVersion<3||!i.A.tv||!window.alert),u="string"==typeof t?{title:n,text:t}:t,e.next=4,r.appRouter.ready();case 4:if(!s){e.next=7;break}return alert((u.text||"").replaceAll("<br/>","\n")),e.abrupt("return",Promise.resolve());case 7:return u.buttons=[{name:a.Ay.translate("ButtonGotIt"),id: "ok",type: "submit"}],e.abrupt("return",o.A.show(u));case 9:case"end":return e.stop()}}),e)})),d=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))},d.apply(this,arguments)}},22622:function(e,t,n){"use strict";n.d(t,{g:function(){return S}}),n(14382),n(84734),n(44962),n(74576),n(78557),n(90076),n(45309),n(95021),n(73687),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(90381),i=n(34789),o=n(44797),a=n(58180),s=n(51876),l=n(5898),u=n(57634);function c(){if(!m){var e="_deviceId2";(m=r.A.get(e))||((t=[]).push(navigator.userAgent),t.push((new Date).getTime()),m=window.btoa?btoa(t.join("|")).replaceAll("=","1"):(new Date).getTime(),r.A.set(e,m))}var t;return m}function d(){return v||(v=i.A.tizen?"Samsung Smart TV":i.A.web0s?"LG Smart TV":i.A.operaTv?"Opera TV":i.A.xboxOne?"Xbox One":i.A.ps4?"Sony PS4":i.A.chrome?"Chrome":i.A.edgeChromium?"Edge Chromium":i.A.edge?"Edge":i.A.firefox?"Firefox":i.A.opera?"Opera":i.A.safari?"Safari": "Web Browser",i.A.ipad?v+=" iPad":i.A.iphone?v+=" iPhone":i.A.android&&(v+=" Android")),v}function f(){A&&(A=!1,o.A.trigger(S,"resume"))}function p(){A||(A=!0)}var h,y,m,v,g=(h=[],navigator.share&&h.push("sharing"),i.A.edgeUwp||i.A.tv||i.A.xboxOne||i.A.ps4||h.push("filedownload"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s?h.push("exit"):h.push("plugins"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.ps4||(h.push("externallinks"),h.push("externalpremium")),i.A.operaTv||h.push("externallinkdisplay"),!i.A.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)&&h.push("voiceinput"),(i.A.edgeUwp||i.A.tizen||i.A.web0s||i.A.orsay||i.A.operaTv||i.A.ps4||i.A.xboxOne||!i.A.mobile)&&(h.push("htmlaudioautoplay"),h.push("htmlvideoautoplay")),function(){if(i.A.tv)return!1;var e=document.documentElement;return!!(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen||document.createElement("video").webkitEnterFullscreen)}()&&h.push("fullscreenchange"),(i.A.tv||i.A.xboxOne||i.A.ps4||i.A.mobile||i.A.ipad)&&h.push("physicalvolumecontrol"),i.A.tv||i.A.xboxOne||i.A.ps4||h.push("remotecontrol"),i.A.operaTv||i.A.tizen||i.A.orsay||i.A.web0s||i.A.edgeUwp||h.push("remotevideo"),h.push("displaylanguage"),h.push("otherapppromotions"),h.push("displaymode"),h.push("targetblank"),h.push("screensaver"),s.$A().then((function(e){e&&h.push("multiserver")})),!i.A.orsay&&(i.A.firefox||i.A.ps4||i.A.edge||function(){try{var e=document.createElement("video"),t=document.createElement("style");t.textContent="video::cue {background: inherit}",document.body.appendChild(t),document.body.appendChild(e);var n=window.getComputedStyle(e,"::cue").background;return document.body.removeChild(t),document.body.removeChild(e),!!n.length}catch(e){return console.error("error detecting cue support: "+e),!1}}())&&h.push("subtitleappearancesettings"),i.A.orsay||h.push("subtitleburnsettings"),i.A.tv||i.A.ps4||i.A.xboxOne||h.push("fileinput"),(i.A.chrome||i.A.edgeChromium)&&h.push("chromecast"),h);function b(){try{var e;null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.exit?window.NativeShell.AppHost.exit():i.A.tizen?tizen.application.getCurrentApplication().exit():i.A.web0s?webOS.platformBack():window.close()}catch(e){console.error("error closing application: "+e)}}var w,x,S={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(){alert("setWindowState is not supported and should not be called")},exit:function(){window.appMode&&i.A.tizen?y||n.e(62882).then(n.bind(n,62882)).then((function(e){y=e.show({title:l.Ay.translate("MessageConfirmAppExit"),items: [{id: "yes",name:l.Ay.translate("Yes")},{id: "no",name:l.Ay.translate("No")}]}).then((function(e){"yes"===e&&b()})).finally((function(){y=null}))})):b()},supports:function(e){return window.NativeShell?window.NativeShell.AppHost.supports(e): -1!==g.indexOf(e.toLowerCase())},preferVisualCards:i.A.android||i.A.chrome,getDefaultLayout:function(){return window.NativeShell?window.NativeShell.AppHost.getDefaultLayout(): "desktop"},getDeviceProfile:function(e){return new Promise((function(t){var n,o;if(window.NativeShell)o=window.NativeShell.AppHost.getDeviceProfile(u.A,"10.10.3");else{var s=function(e){var t=[];return e&&a.JQ(e.RunTimeTicks,e.MediaType)&&(i.A.edge&&t.push("mp3"),i.A.edgeChromium||(t.push("ac3"),t.push("eac3")),i.A.chrome||i.A.edgeChromium||i.A.firefox||t.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:t}}(e);o=(0,u.A)(s)}var l=r.A.maxVideoWidth(),c=l<0?null===(n=S.screen())||void 0===n?void 0:n.maxAllowedWidth:l;if(c){var d={Condition: "LessThanEqual",Property: "Width",Value:c.toString(),IsRequired:!1};r.A.limitSupportedVideoResolution()&&o.CodecProfiles.push({Type: "Video",Conditions: [d]}),o.TranscodingProfiles.forEach((function(e){"Video"===e.Type&&(e.Conditions=(e.Conditions||[]).filter((function(e){return"Width"!==e.Property})),e.Conditions.push(d))}))}var f=r.A.preferredTranscodeVideoCodec();f&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.VideoCodec.split(","),n=t.indexOf(f);-1!==n&&(t.splice(n,1),t.unshift(f),e.VideoCodec=t.join(","))}}));var p=r.A.preferredTranscodeVideoAudioCodec();p&&o.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(","),n=t.indexOf(p);-1!==n&&(t.splice(n,1),t.unshift(p),e.AudioCodec=t.join(","))}})),t(o)}))},init:function(){return window.NativeShell?window.NativeShell.AppHost.init(): {deviceId:c(),deviceName:d()}},deviceName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceName?window.NativeShell.AppHost.deviceName():d()},deviceId:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.deviceId?window.NativeShell.AppHost.deviceId():c()},appName:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appName?window.NativeShell.AppHost.appName(): "Jellyfin Web"},appVersion:function(){var e;return null!==(e=window.NativeShell)&&void 0!==e&&null!==(e=e.AppHost)&&void 0!==e&&e.appVersion?window.NativeShell.AppHost.appVersion(): "10.10.3"},getPushTokenInfo:function(){return{}},setUserScalable:function(e){if(!i.A.tv){var t=e?"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes": "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no";document.querySelector("meta[name=viewport]").setAttribute("content",t)}},screen:function(){var e,t=null,n=null===(e=window.NativeShell)||void 0===e?void 0:e.AppHost;return null!=n&&n.screen?t=n.screen():window.screen&&!i.A.tv&&(t={width:Math.floor(window.screen.width*window.devicePixelRatio),height:Math.floor(window.screen.height*window.devicePixelRatio)}),t&&(t.maxAllowedWidth=Math.max(t.width,t.height)),t}},A=!1;void 0!==document.hidden?(w="hidden",x="visibilitychange"):void 0!==document.webkitHidden&&(w="webkitHidden",x="webkitvisibilitychange"),document.addEventListener(x,(function(){document[w]?p():f()}),!1),window.addEventListener&&(window.addEventListener("focus",f),window.addEventListener("blur",p)),S.init()},84069:function(e,t,n){"use strict";n.r(t),n.d(t,{autoFocus:function(){return l},enable:function(){return s},isEnabled:function(){return a}}),n(24776),n(69892),n(78557),n(83994);var r,i=n(9164),o=n(46782);function a(){return o.A.tv}function s(){a()&&(window.addEventListener("focusin",(function(e){r=e.target})),console.debug("AutoFocuser enabled"))}function l(e){if(!a())return null;e=e||document.body;var t,n=[];if(r&&(r.classList.contains("btnPreviousPage")?(n.push(e.querySelector(".btnPreviousPage")),n.push(e.querySelector(".btnNextPage"))):r.classList.contains("btnNextPage")?(n.push(e.querySelector(".btnNextPage")),n.push(e.querySelector(".btnPreviousPage"))):r.classList.contains("btnSelectView")&&n.push(e.querySelector(".btnSelectView")),n.push(r)),(n=n.concat(Array.from(e.querySelectorAll(".btnPlay")))).every((function(e){return!i.A.isCurrentlyFocusable(e)||(i.A.focus(e),t=e,!1)})),!t){var o=e.querySelector(".itemsContainer");o&&(t=i.A.autoFocus(o))}return t||(t=i.A.autoFocus(e)),t}t.default={isEnabled:a,enable:s,autoFocus:l}},89166:function(e,t,n){"use strict";n.d(t,{C9:function(){return T},FB:function(){return _},KH:function(){return L},gJ:function(){return w}}),n(29305),n(32733),n(84701),n(81678),n(44962),n(86584),n(4754),n(94),n(77575),n(36947),n(78557),n(83994),n(23630),n(82367);var r=n(98526),i=n(34789),o=n(47750),a=n(47629),s=n(82885),l=n(86191);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}var f,p,h,y,m,v,g=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: "load",value:function(e,t,n){var r=new Image,o=this;r.onload=function(){if(!o.isDestroyed){var r=document.createElement("div");if(r.classList.add("backdropImage"),r.classList.add("displayingBackdropImage"),r.style.backgroundImage="url('".concat(e,"')"),r.setAttribute("data-url",e),r.classList.add("backdropImageFadeIn"),t.appendChild(r),i.A.slow)return null!=n&&n.parentNode&&n.parentNode.removeChild(n),void A(!0);var s=function(){a.Ay.removeEventListener(r,a.Ay.whichAnimationEvent(),s,{once:!0}),r===o.currentAnimatingElement&&(o.currentAnimatingElement=null),null!=n&&n.parentNode&&n.parentNode.removeChild(n)};a.Ay.addEventListener(r,a.Ay.whichAnimationEvent(),s,{once:!0}),A(!0)}},r.src=e}},{key: "cancelAnimation",value:function(){var e=this.currentAnimatingElement;e&&(e.classList.remove("backdropImageFadeIn"),this.currentAnimatingElement=null)}},{key: "destroy",value:function(){this.isDestroyed=!0,this.cancelAnimation()}}])&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function b(){return f||(f=document.querySelector(".backdropContainer")),f||((f=document.createElement("div")).classList.add("backdropContainer"),document.body.insertBefore(f,document.body.firstChild)),f}function w(e){E(),m&&(m.destroy(),m=null),b().innerHTML="",e&&(y=!1),A(!1)}function x(){return p||(p=document.querySelector(".backgroundContainer")),p}function S(){h||y?x().classList.add("withBackdrop"):x().classList.remove("withBackdrop")}function A(e){h=e,S()}function P(e){y=e,S()}function k(e,t){var n;t=t||{};var r=l.A.getApiClient(e.ServerId);return e.BackdropImageTags&&e.BackdropImageTags.length>0?e.BackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.BackdropItemId||e.Id,Object.assign(t,{type: "Backdrop",tag:n,maxWidth:a.Ay.getScreenWidth(),index:i}))})):e.ParentBackdropItemId&&null!==(n=e.ParentBackdropImageTags)&&void 0!==n&&n.length?e.ParentBackdropImageTags.map((function(n,i){return r.getScaledImageUrl(e.ParentBackdropItemId,Object.assign(t,{type: "Backdrop",tag:n,maxWidth:a.Ay.getScreenWidth(),index:i}))})): []}var I=[],j=-1;function T(e,t,n){if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]||s.enableBackdrops()){var o=function(e,t){for(var n=[],r=function(e){n.push(e)},i=0,o=e.length;i<o;i++)k(e[i],t).forEach(r);return n}(e,t);o.length?function(e,t){(0,r.A)(e,I)||(E(),I=e,j=-1,e.length>1&&!1!==t&&!i.A.tv&&!i.A.firefox&&(v=setInterval(C,24e3)),C())}(o,n):w()}}function C(){if(!o.f.isPlayingLocally(["Video"])){var e=j+1;e>=I.length&&(e=0),j=e,function(e){m&&(m.destroy(),m=null);var t=b(),n=t.querySelector(".displayingBackdropImage");if(n&&n.getAttribute("data-url")===e){if(n.getAttribute("data-url")===e)return;n.classList.remove("displayingBackdropImage")}var r=new g;r.load(e,t,n),m=r}(I[e])}}function E(){v&&clearInterval(v),v=null,I=[],j=-1}var L={Full: "full",Backdrop: "backdrop",None: "none"};function _(e){var t=b(),n=x();e===L.Full||2===e?(w(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):e===L.Backdrop||1===e?(P(!0),document.documentElement.classList.add("transparentDocument"),n.classList.add("backgroundContainer-transparent"),t.classList.add("hide")):(P(!1),document.documentElement.classList.remove("transparentDocument"),n.classList.remove("backgroundContainer-transparent"),t.classList.remove("hide"))}},40532:function(e,t,n){"use strict";n(29305),n(32733),n(51770),n(84701),n(2623),n(44962),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(83994),n(93062),n(97747),n(23630),n(82367);var r=n(70267),i=n(34789),o=n(48080),a=n(5898);function s(e){return s="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},s(e)}function l(){l=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};d(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,l){var u=p(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==s(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(s(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),d(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),d(k,c,"Generator"),d(k,a,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function d(){return(d=c(l().mark((function e(t){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof t&&(t={title: "",text:t}),n=(t.text||"").replaceAll("<br/>","\n"),e.next=4,r.appRouter.ready();case 4:if(!window.confirm(n)){e.next=9;break}return e.abrupt("return",Promise.resolve());case 9:return e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(){return(f=c(l().mark((function e(t,n){var i,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=[]).push({name:(i="string"==typeof t?{title:n,text:t}:t).cancelText||a.Ay.translate("ButtonCancel"),id: "cancel",type: "cancel"}),s.push({name:i.confirmText||a.Ay.translate("ButtonOk"),id: "ok",type: "delete"===i.primary?"delete": "submit"}),i.buttons=s,e.next=7,r.appRouter.ready();case 7:return e.abrupt("return",o.A.show(i).then((function(e){return"ok"===e?Promise.resolve():Promise.reject()})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var p=i.A.web0s||i.A.tizenVersion&&i.A.tizenVersion<3||!i.A.tv||!window.confirm?function(e,t){return f.apply(this,arguments)}:function(e){return d.apply(this,arguments)};t.A=p},48080:function(e,t,n){"use strict";n.d(t,{A:function(){return m}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(83994),n(23630),n(82367);var r=n(31234),i=n.n(r),o=n(22696),a=n.n(o),s=n(79754),l=n(47629),u=n(46782),c=n(10838),d=n(5898),f=(n(10353),n(15453),n(98959),'<div class="formDialogHeader formDialogHeader-clear justify-content-center"> <h1 class="formDialogHeaderTitle" style="margin-top:.5em;padding:0 1em"></h1> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered" style="padding-top:1em;padding-bottom:1em;text-align:center"> <div class="text"></div> </div> </div> <div class="formDialogFooter formDialogFooter-clear formDialogFooter-flex" style="margin:1em"></div> ');function p(e){return p="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},p(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={show:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: {dialogOptions: {},buttons: []},t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]: {};t%2?h(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({removeOnClose:!0,scrollY:!1},e.dialogOptions),n=u.A.tv;n&&(t.size="fullscreen");var r=s.default.createDialog(t);r.classList.add("formDialog"),r.innerHTML=d.Ay.translateHtml(f,"core"),r.classList.add("align-items-center"),r.classList.add("justify-content-center");var o=r.querySelector(".formDialogContent");o.classList.add("no-grow"),n?(o.style["max-width"]="50%",o.style["max-height"]="60%",c.default.centerFocus.on(o,!1)):(o.style.maxWidth="".concat(Math.min(150*e.buttons.length+200,l.Ay.getWindowSize().innerWidth-50),"px"),r.classList.add("dialog-fullscreen-lowres")),e.title?r.querySelector(".formDialogHeaderTitle").innerText=e.title||"":r.querySelector(".formDialogHeaderTitle").classList.add("hide");var p,m,v=e.html||e.text||"";r.querySelector(".text").innerHTML=i().sanitize(v),v||r.querySelector(".dialogContentInner").classList.add("hide");var g,b="",w=!1;for(p=0,m=e.buttons.length;p<m;p++){var x=e.buttons[p],S=0===p?" autofocus": "",A="btnOption raised formDialogFooterItem formDialogFooterItem-autosize";x.type&&(A+=" button-".concat(x.type)),x.description&&(w=!0),w&&(A+=" formDialogFooterItem-vertical formDialogFooterItem-nomarginbottom"),b+='<button is="emby-button" type="button" class="'.concat(A,'" data-id="').concat(x.id,'"').concat(S,">").concat(a()(x.name),"</button>"),x.description&&(b+='<div class="formDialogFooterItem formDialogFooterItem-autosize fieldDescription" style="margin-top:.25em!important;margin-bottom:1.25em!important;">'.concat(x.description,"</div>"))}function P(){g=this.getAttribute("data-id"),s.default.close(r)}r.querySelector(".formDialogFooter").innerHTML=b,w&&r.querySelector(".formDialogFooter").classList.add("formDialogFooter-vertical");var k=r.querySelectorAll(".btnOption");for(p=0,m=k.length;p<m;p++)k[p].addEventListener("click",P);return s.default.open(r).then((function(){return n&&c.default.centerFocus.off(r.querySelector(".formDialogContent"),!1),g||Promise.reject()}))}("string"==typeof e?{title:t,text:e}:e)}}},79754:function(e,t,n){"use strict";n.r(t),n.d(t,{close:function(){return w},createDialog:function(){return P},open:function(){return b},setOnOpen:function(){return k}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(76281),n(44962),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(90076),n(95021),n(99425),n(83994),n(93062),n(97456),n(23630),n(82367);var r,i=n(9164),o=n(34789),a=n(46782),s=n(38490),l=n(44305),u=n(47629),c=n(72524);function d(e){return d="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},d(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]: {};t%2?f(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){return!o.A.tv&&o.A.supportsCssAnimation()}function m(e){var t=e.parentNode;if(t)try{t.removeChild(e)}catch(e){console.error("[dialogHelper] error removing dialog element: "+e)}}function v(e,t,n,r){this.originalUrl=window.location.href;var o,d=document.activeElement,f=!1;function h(){o&&(o(),o=null),e.dispatchEvent(new CustomEvent("close",{bubbles:!1,cancelable:!1})),n({element:e})}function v(t){"back"===t.detail.command&&(t.preventDefault(),t.stopPropagation(),w(e))}if(e.addEventListener("_close",(function(){if(g(e)||s.default.off(e,v),o&&(o(),o=null),function(e){var t=e.backdrop;if(t){e.backdrop=null;var n=function(){m(t)};if(y())return t.classList.remove("dialogBackdropOpened"),void setTimeout(n,300);n()}}(e),e.classList.remove("opened"),f&&document.body.classList.remove("noScroll"),g(e)){var n,r=c.b.location.state||{};(null===(n=r.dialogs)||void 0===n?void 0:n.length)>0&&(r.dialogs[r.dialogs.length-1]===t?(o=c.b.listen(h),c.b.back()):r.dialogs.includes(t)&&(console.warn('[dialogHelper] dialog "%s" was closed, but is not the last dialog opened',t),o=c.b.listen(h),c.b.replace("".concat(c.b.location.pathname).concat(c.b.location.search),p(p({},r),{},{dialogs:r.dialogs.filter((function(e){return e!==t}))}))))}if(a.A.tv&&i.A.focus(d),(0,l.G4)(e.getAttribute("data-removeonclose"),!0)){!function(e){a.A.tv&&(e.classList.contains("scrollX")?A(e,!0,!1):e.classList.contains("smoothScrollY")&&A(e,!1,!1))}(e);var u=e.dialogContainer;u?(m(u),e.dialogContainer=null):m(e)}o||h()})),!e.classList.contains("dialog-fixedSize")&&e.classList.add("centeredDialog"),e.classList.remove("hide"),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: {},n=document.createElement("div");n.classList.add("dialogBackdrop");var r=e.dialogContainer||e;r.parentNode.insertBefore(n,r),e.backdrop=n,n.offsetWidth,n.classList.add("dialogBackdropOpened"),t.preventCloseOnClick||u.Ay.addEventListener(e.dialogContainer||n,"click",(function(t){t.target===e.dialogContainer&&w(e)}),{passive:!0}),t.preventCloseOnRightClick||u.Ay.addEventListener(e.dialogContainer||n,"contextmenu",(function(t){t.target===e.dialogContainer&&(w(e),t.preventDefault())}))}(e,r),e.classList.add("opened"),e.dispatchEvent(new CustomEvent("open",{bubbles:!1,cancelable:!1})),"true"!==e.getAttribute("data-lockscroll")||document.body.classList.contains("noScroll")||(document.body.classList.add("noScroll"),f=!0),function(e){var t=function(){i.A.pushScope(e),"true"===e.getAttribute("data-autofocus")&&i.A.autoFocus(e),document.activeElement&&!e.contains(document.activeElement)&&document.activeElement.blur()};y()?u.Ay.addEventListener(e,u.Ay.whichAnimationEvent(),x(e,t),{once:!0}):t()}(e),g(e)){var b=c.b.location.state||{},S=b.dialogs||[];S.push(t),c.b.push("".concat(c.b.location.pathname).concat(c.b.location.search),p(p({},b),{},{dialogs:S})),o=c.b.listen((function(n){var r,i=!((null===(r=n.location.state)||void 0===r?void 0:r.dialogs)||[]).includes(t);!i&&function(e){return!e.classList.contains("hide")}(e)||!o||(o(),o=null),i&&w(e)}))}else s.default.on(e,v)}function g(e){return"true"===e.getAttribute("data-history")}function b(e,t){r&&r(e);var n=e.parentNode;n&&n.removeChild(e);var i=document.createElement("div");return i.classList.add("dialogContainer"),i.appendChild(e),e.dialogContainer=i,document.body.appendChild(i),new Promise((function(n){new v(e,"dlg".concat((new Date).getTime()),n,t)}))}function w(e){e.classList.contains("hide")||(e.dispatchEvent(new CustomEvent("closing",{bubbles:!1,cancelable:!1})),function(e,t){if(y()){var n=!0;switch(e.animationConfig.exit.name){case"fadeout":e.style.animation="fadeout ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"scaledown":e.style.animation="scaledown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;case"slidedown":e.style.animation="slidedown ".concat(e.animationConfig.exit.timing.duration,"ms ease-out normal both");break;default:n=!1}if(u.Ay.addEventListener(e,u.Ay.whichAnimationEvent(),x(e,t),{once:!0}),n)return}t()}(e,(function(){i.A.popScope(e),e.classList.add("hide"),e.dispatchEvent(new CustomEvent("_close",{bubbles:!1,cancelable:!1}))})))}var x=function(e,t){return function n(){u.Ay.removeEventListener(e,u.Ay.whichAnimationEvent(),n,{once:!0}),t()}},S="overscroll-behavior-y"in document.body.style;function A(e,t,r){Promise.resolve().then(n.bind(n,10838)).then((function(n){var i=r?"on": "off";n.centerFocus[i](e,t)}))}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: {},t=document.createElement("div");e.id&&(t.id=e.id),t.classList.add("focuscontainer"),t.classList.add("hide"),function(e){return null!=e.lockScroll?e.lockScroll: "fullscreen"===e.size||!(S&&(e.size||!o.A.touch))&&(!!e.size||o.A.touch)}(e)&&t.setAttribute("data-lockscroll","true"),!1!==e.enableHistory&&t.setAttribute("data-history","true"),!1!==e.modal&&t.setAttribute("modal","modal"),!1!==e.autoFocus&&t.setAttribute("data-autofocus","true");var n=e.entryAnimation||"scaleup",r=e.exitAnimation||"scaledown",i=e.entryAnimationDuration||("fullscreen"!==e.size?180: 280),s=e.exitAnimationDuration||("fullscreen"!==e.size?120: 220);if(t.animationConfig={entry: {name:n,timing: {duration:i,easing: "ease-out"}},exit: {name:r,timing: {duration:s,easing: "ease-out",fill: "both"}}},t.classList.add("dialog"),e.scrollX?(t.classList.add("scrollX"),t.classList.add("smoothScrollX"),a.A.tv&&A(t,!0,!0)):!1!==e.scrollY&&(t.classList.add("smoothScrollY"),a.A.tv&&A(t,!1,!0)),e.removeOnClose&&t.setAttribute("data-removeonclose","true"),e.size&&(t.classList.add("dialog-fixedSize"),t.classList.add("dialog-".concat(e.size))),y())switch(t.animationConfig.entry.name){case"fadein":t.style.animation="fadein ".concat(i,"ms ease-out normal");break;case"scaleup":t.style.animation="scaleup ".concat(i,"ms ease-out normal both");break;case"slideup":t.style.animation="slideup ".concat(i,"ms ease-out normal");break;case"slidedown":t.style.animation="slidedown ".concat(i,"ms ease-out normal")}return t}function k(e){r=e}t.default={open:b,close:w,createDialog:P,setOnOpen:k}},21840:function(e,t,n){"use strict";n.r(t),n(29305),n(32733),n(84701),n(81678),n(24776),n(44962),n(4754),n(94),n(36947),n(83810),n(78557),n(90076),n(83994),n(82367);var r,i=n(22696),o=n.n(i),a=n(8566),s=n(79754),l=n(47629),u=n(5898),c=(n(98959),n(15453),n(10353),n(41177));function d(e){return d="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},d(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function m(){a.Ay.hide()}function v(e,t,n,r){if(t&&"string"!=typeof t)throw new Error("invalid path");a.Ay.show();var i=[];t?(i.push(ApiClient.getDirectoryContents(t,n)),i.push(ApiClient.getParentPath(t))):i.push(ApiClient.getDrives()),Promise.all(i).then((function(n){var r=n[0],i=(n[1]?JSON.parse(n[1]): "")||"",o="";e.querySelector(".results").scrollTop=0,e.querySelector("#txtDirectoryPickerPath").value=t||"",t&&(o+=g("lnkPath lnkDirectory","",i,"..."));for(var s=0,l=r.length;s<l;s++){var u=r[s];o+=g("File"===u.Type?"lnkPath lnkFile": "lnkPath lnkDirectory",u.Type,u.Path,u.Name)}e.querySelector(".results").innerHTML=o,a.Ay.hide()}),(function(){r&&(e.querySelector("#txtDirectoryPickerPath").value="",e.querySelector(".results").innerHTML="",a.Ay.hide())}))}function g(e,t,n,r){var i="";return i+='<div class="listItem listItem-border '.concat(e,'" data-type="').concat(t,'" data-path="').concat(o()(n),'">'),i+='<div class="listItemBody" style="padding-left:0;padding-top:.5em;padding-bottom:.5em;">',i+='<div class="listItemBodyText">',i+=o()(r),i+="</div>",i+="</div>",(i+='<span class="material-icons arrow_forward" aria-hidden="true" style="font-size:inherit;"></span>')+"</div>"}function b(e){var t;t={text:e},(0,c.A)(t)}function w(e){return e.path?Promise.resolve(e.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then((function(e){return e.Path||""}),(function(){return""}))}var x=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,"currentDialog",void 0),h(this,"show",(function(e){var n={includeDirectories:!0};null!=(e=e||{}).includeDirectories&&(n.includeDirectories=e.includeDirectories),null!=e.includeFiles&&(n.includeFiles=e.includeFiles),Promise.all([r?Promise.resolve(r):ApiClient.getPublicSystemInfo().then((function(e){return r=e,e})),w(e)]).then((function(r){var i=r[0],a=r[1],c=s.default.createDialog({size: "small",removeOnClose:!0,scrollY:!1});c.classList.add("ui-body-a"),c.classList.add("background-theme-a"),c.classList.add("directoryPicker"),c.classList.add("formDialog");var d="";d+='<div class="formDialogHeader">',d+='<button is="paper-icon-button-light" class="btnCloseDialog autoSize" tabindex="-1" title="'.concat(u.Ay.translate("ButtonBack"),'"><span class="material-icons arrow_back" aria-hidden="true"></span></button>'),d+='<h3 class="formDialogHeaderTitle">',d+=o()(e.header||"")||u.Ay.translate("HeaderSelectPath"),d+="</h3>",d+="</div>",d+=function(e,t){var n,r="";r+='<div class="formDialogContent scrollY">',r+='<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">',e.pathReadOnly||(r+='<div class="infoBanner" style="margin-bottom:1.5em;">',r+=e.instruction?"".concat(o()(e.instruction),"<br/><br/>"): "","bsd"===t.OperatingSystem.toLowerCase()?(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerBSDInstruction"),r+="<br/>"): "linux"===t.OperatingSystem.toLowerCase()&&(r+="<br/>",r+="<br/>",r+=u.Ay.translate("MessageDirectoryPickerLinuxInstruction"),r+="<br/>"),r+="</div>"),r+='<form style="margin:auto;">',r+='<div class="inputContainer" style="display: flex; align-items: center;">',r+='<div style="flex-grow:1;">',n=!0!==e.includeFiles?"LabelFolder": "LabelPath";var i=e.pathReadOnly?" readonly": "";return r+='<input is="emby-input" id="txtDirectoryPickerPath" type="text" required="required" '.concat(i,' label="').concat(u.Ay.translate(n),'"/>'),r+="</div>",i||(r+='<button type="button" is="paper-icon-button-light" class="btnRefreshDirectories emby-input-iconbutton" title="'.concat(u.Ay.translate("Refresh"),'"><span class="material-icons search" aria-hidden="true"></span></button>')),r+="</div>",i||(r+='<div class="results paperList" style="max-height: 200px; overflow-y: auto;"></div>'),e.enableNetworkSharePath&&(r+='<div class="inputContainer" style="margin-top:2em;">',r+='<input is="emby-input" id="txtNetworkPath" type="text" label="'.concat(u.Ay.translate("LabelOptionalNetworkPath"),'"/>'),r+='<div class="fieldDescription">',r+=u.Ay.translate("LabelOptionalNetworkPathHelp","<b>\\\\server</b>","<b>\\\\192.168.1.101</b>"),r+="</div>",r+="</div>"),r+='<div class="formDialogFooter">',r+='<button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem">'.concat(u.Ay.translate("ButtonOk"),"</button>"),r+="</div>",r+="</form>",r+="</div>",(r+="</div>")+"</div>"}(e,i),c.innerHTML=d,function(e,t,n){e.addEventListener("click",(function(t){var r=l.Ay.parentWithClass(t.target,"lnkPath");if(r){var i=r.getAttribute("data-path");r.classList.contains("lnkFile")?e.querySelector("#txtDirectoryPickerPath").value=i:v(e,i,n,!0)}})),e.addEventListener("click",(function(t){if(l.Ay.parentWithClass(t.target,"btnRefreshDirectories")){var r=e.querySelector("#txtDirectoryPickerPath").value;v(e,r,n)}})),e.addEventListener("change",(function(t){var r=l.Ay.parentWithTag(t.target,"INPUT");r&&"txtDirectoryPickerPath"===r.id&&v(e,r.value,n)})),e.querySelector("form").addEventListener("submit",(function(e){if(t.callback){var n=this.querySelector("#txtNetworkPath");n=n?n.value:null;var r=this.querySelector("#txtDirectoryPickerPath").value;(function(e,t,n){return n.ajax({type: "POST",url:n.getUrl("Environment/ValidatePath"),data:JSON.stringify({ValidateWriteable:t,Path:e}),contentType: "application/json"}).catch((function(e){if(e){if(404===e.status)return b(u.Ay.translate("PathNotFound")),Promise.reject();if(500===e.status)return b(t?u.Ay.translate("WriteAccessRequired"):u.Ay.translate("PathNotFound")),Promise.reject()}return Promise.resolve()}))})(r,t.validateWriteable,ApiClient).then(t.callback(r,n))}return e.preventDefault(),e.stopPropagation(),!1}))}(c,e,n),c.addEventListener("close",m),s.default.open(c),c.querySelector(".btnCloseDialog").addEventListener("click",(function(){s.default.close(c)})),t.currentDialog=c,c.querySelector("#txtDirectoryPickerPath").value=a;var f=c.querySelector("#txtNetworkPath");f&&(f.value=e.networkSharePath||""),e.pathReadOnly||v(c,a,n,!0)}))})),h(this,"close",(function(){t.currentDialog&&s.default.close(t.currentDialog)}))}));t.default=x},9164:function(e,t,n){"use strict";n(84734),n(86584),n(87324),n(89336),n(67593);var r=n(47629),i=n(93599),o=[];function a(e,t,n){var r;return!1!==n&&(r=e.querySelector("*[autofocus]"))||!1!==t&&(r=m(e,1,"noautofocus")[0])?(s(r),r): null}function s(e){try{e.focus({preventScroll:i.Ay.isEnabled()})}catch(e){console.error("Error in focusManager.autoFocus: "+e)}}var l=["INPUT","TEXTAREA","SELECT","BUTTON","A"],u=["BODY","DIALOG"],c=l.map((function(e){return"INPUT"===e&&(e+=':not([type="range"]):not([type="file"])'),e+':not([tabindex="-1"]):not(:disabled)'})).join(",")+",.focusable";function d(e){var t;return-1!==l.indexOf(e.tagName)||(null===(t=e.classList)||void 0===t?void 0:t.contains("focusable"))}function f(e,t){if(e){var n=e.tagName;n&&"HTML"!==n&&"BODY"!==n||(e=t)}return e}function p(e){for(var t=e;!d(e);){var n=e.parentNode;if(!n)return f(e,t);e=n}return f(e,t)}function h(e){return null!==e.offsetParent}function y(){return o[0]||document.body}function m(e,t,n){for(var r=(e||y()).querySelectorAll(c),i=[],o=0,a=r.length;o<a;o++){var s=r[o];if((!n||!s.classList.contains(n))&&h(s)&&(i.push(s),t&&i.length>=t))break}return i}function v(e,t){if(-1!==u.indexOf(e.tagName))return!0;var n=e.classList;if(n.contains("focuscontainer"))return!0;if(0===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-left"))return!0}else if(1===t){if(n.contains("focuscontainer-x"))return!0;if(n.contains("focuscontainer-right"))return!0}else if(2===t){if(n.contains("focuscontainer-y"))return!0}else if(3===t){if(n.contains("focuscontainer-y"))return!0;if(n.contains("focuscontainer-down"))return!0}return!1}function g(e){var t;return null===(t=e.getBoundingClientRect?e.getBoundingClientRect(): {top: 0,left: 0,width: 0,height: 0}).right&&((t={top:t.top,left:t.left,width:t.width,height:t.height}).right=t.left+t.width,t.bottom=t.top+t.height),t}function b(e,t,n,i){if((e=e||document.activeElement)&&(e=p(e)),n=n||(e?function(e,t){for(;!v(e,t);)if(!(e=e.parentNode))return y();return e}(e,t):y()),e){for(var o,l=r.Ay.parentWithClass(e,"focusable"),u=g(e),d=parseFloat(u.left)||0,f=parseFloat(u.top)||0,h=parseFloat(d+u.width-1)||d,m=parseFloat(f+u.height-1)||f,b=u.left+u.width/2,w=u.top+u.height/2,S=i||n.querySelectorAll(c),A=1/0,P=0,k=S.length;P<k;P++){var I=S[P];if(I!==e&&I!==l){var j=g(I);if(j.width||j.height){switch(t){case 0:if(j.left>=u.left)continue;if(j.right===u.right)continue;break;case 1:if(j.right<=u.right)continue;if(j.left===u.left)continue;break;case 2:if(j.top>=u.top)continue;if(j.bottom>=u.bottom)continue;break;case 3:if(j.bottom<=u.bottom)continue;if(j.top<=u.top)continue}var T=j.left,C=j.top,E=T+j.width-1,L=C+j.height-1,_=x(d,h,T,E),O=x(f,m,C,L),M=j.left+j.width/2,R=j.top+j.height/2,D=void 0,N=void 0;switch(t){case 0:D=Math.abs(d-Math.min(d,E)),N=O?0:Math.abs(w-R);break;case 1:D=Math.abs(h-Math.max(h,T)),N=O?0:Math.abs(w-R);break;case 2:N=Math.abs(f-Math.min(f,L)),D=_?0:Math.abs(b-M);break;case 3:N=Math.abs(m-Math.max(m,C)),D=_?0:Math.abs(b-M)}var F=Math.sqrt(D*D+N*N);F<A&&(o=I,A=F)}}}if(o){if(e){var z=r.Ay.parentWithClass(o,"focusable");z&&z!==o&&l!==z&&(o=z)}s(o)}}else a(n,!0,!1)}function w(e,t,n,r){return n>=e&&n<=t||r>=e&&r<=t}function x(e,t,n,r){return w(e,t,n,r)||w(n,r,e,t)}t.A={autoFocus:a,focus:s,focusableParent:p,getFocusableElements:m,moveLeft:function(e,t){b(e,0,t?t.container: null,t?t.focusableElements:null)},moveRight:function(e,t){b(e,1,t?t.container: null,t?t.focusableElements:null)},moveUp:function(e,t){b(e,2,t?t.container: null,t?t.focusableElements:null)},moveDown:function(e,t){b(e,3,t?t.container: null,t?t.focusableElements:null)},sendText:function(e){document.activeElement.value=e},isCurrentlyFocusable:function(e){if(e.disabled)return!1;if("-1"===e.getAttribute("tabindex"))return!1;if("INPUT"===e.tagName){var t=e.type;if("range"===t)return!1;if("file"===t)return!1}return h(e)},pushScope:function(e){o.push(e)},popScope:function(){o.length&&(o.length-=1)},focusFirst:function(e,t){for(var n=e.querySelectorAll(t),r=0,i=n.length;r<i;r++){var o=n[r];if(h(o)){s(o);break}}},focusLast:function(e,t){for(var n=[].slice.call(e.querySelectorAll(t),0).reverse(),r=0,i=n.length;r<i;r++){var o=n[r];if(h(o)){s(o);break}}},moveFocus:function(e,t,n,r){var i,o,a,l=t.querySelectorAll(n),u=[];for(i=0,o=l.length;i<o;i++)h(a=l[i])&&u.push(a);var c=-1;for(i=0,o=u.length;i<o;i++)if(e===(a=u[i])||a.contains(e)){c=i;break}if(-1!==c){var d=c+r;d=Math.max(0,d);var f=u[d=Math.min(d,u.length-1)];f&&s(f)}}}},58180:function(e,t,n){"use strict";n.d(t,{B1:function(){return f},EK:function(){return k},HI:function(){return g},JN:function(){return A},JQ:function(){return p},Oy:function(){return x},X9:function(){return I},Y3:function(){return u},ZB:function(){return S},bR:function(){return h},di:function(){return m},iP:function(){return c},jK:function(){return y},n8:function(){return b},qQ:function(){return d},qh:function(){return j},si:function(){return w},we:function(){return P}}),n(24776),n(44962),n(94),n(78557),n(90076),n(95021),n(83994),n(93062),n(82367),n(24362),n(76218),n(99102);var r,i,o=n(90381),a=n(34789),s=n(44797),l=n(80262);function u(){return o.A.get("volume")||1}function c(e){e&&o.A.set("volume",e)}function d(e){return e.IsRemote?null: "anonymous"}function f(e,t){return!(a.A.iOS||!a.A.safari||!e.MediaStreams.some((function(e){return"vp9"===e.Codec})))||p(e.RunTimeTicks,t)}function p(e,t){if(null==window.MediaSource)return!1;if(a.A.iOS)return!1;if(a.A.tizen||a.A.web0s)return!1;if((n=document.createElement("video")).canPlayType("application/x-mpegURL").replace(/no/,"")||n.canPlayType("application/vnd.apple.mpegURL").replace(/no/,"")){if(a.A.android&&("Audio"===t||"Video"===t))return!0;if(e)return!1}var n;return!0}function h(e,t){var n,o=e._hlsPlayer;if(o){var a=Date.now();null!==(n=window.performance)&&void 0!==n&&n.now&&(a=performance.now()),!r||a-r>3e3?(r=a,console.debug("try to recover media Error ..."),o.recoverMediaError()):!i||a-i>3e3?(i=a,console.debug("try to swap Audio Codec and recover media Error ..."),o.swapAudioCodec(),o.recoverMediaError()):(console.error("cannot recover, last media error recovery failed ..."),t?t():y(e,l.F.FATAL_HLS_ERROR))}}function y(e,t){e.destroyCustomTrack&&e.destroyCustomTrack(e._mediaElement),s.A.trigger(e,"error",[{type:t}])}function m(e){return e&&!isNaN(e)&&e!==Number.POSITIVE_INFINITY&&e!==Number.NEGATIVE_INFINITY}function v(e,t){Math.abs((e.currentTime||0)-t)>=1&&(e.currentTime=t)}function g(e,t,n,r){var i=(n||0)/1e7;if(i)if(t.duration>=i)v(t,i),r&&r();else{var o=["durationchange","loadeddata","play","loadedmetadata"],a=function(e){0===t.currentTime&&t.duration>=i&&(console.debug("seeking to ".concat(i," on ").concat(e.type," event")),v(t,i),o.forEach((function(e){t.removeEventListener(e,a)})),r&&r())};o.forEach((function(e){t.addEventListener(e,a)}))}}function b(e,t,n){var r;return window.Windows&&null!==(r=n.mediaSource)&&void 0!==r&&r.IsLocal?Windows.Storage.StorageFile.getFileFromPathAsync(n.url).then((function(t){var r=new Windows.Media.Playback.MediaPlaybackList,i=Windows.Media.Core.MediaSource.createFromStorageFile(t),o=(n.playerStartPositionTicks||0)/1e4;return r.items.append(new Windows.Media.Playback.MediaPlaybackItem(i,o)),e.src=URL.createObjectURL(r,{oneTimeOnly:!0}),Promise.resolve()})):(e.src=t,Promise.resolve())}function w(e){e.src="",e.innerHTML="",e.removeAttribute("src")}function x(e,t){try{return e.play().catch((function(e){var t=(e.name||"").toLowerCase();return"notallowederror"===t||"aborterror"===t?Promise.resolve():Promise.reject(e)})).then((function(){return function(e,t){e.addEventListener("error",t)}(e,t),Promise.resolve()}))}catch(e){return console.error("error calling video.play: "+e),Promise.reject()}}function S(e){var t=e._castPlayer;if(t){try{t.unload()}catch(e){console.error(e)}e._castPlayer=null}}function A(e){var t=e._hlsPlayer;if(t){try{t.destroy()}catch(e){console.error(e)}e._hlsPlayer=null}}function P(e){var t=e._flvPlayer;if(t){try{t.unload(),t.detachMediaElement(),t.destroy()}catch(e){console.error(e)}e._flvPlayer=null}}function k(e,t,n,r,i,o){t.on(Hls.Events.MANIFEST_PARSED,(function(){x(n,r).then(i,(function(){o&&(o(),o=null)}))})),t.on(Hls.Events.ERROR,(function(n,r){var i;if(console.error("HLS Error: Type: "+r.type+" Details: "+(r.details||"")+" Fatal: "+(r.fatal||!1)),r.type===Hls.ErrorTypes.NETWORK_ERROR&&null!==(i=r.response)&&void 0!==i&&i.code&&r.response.code>=400)return console.debug("hls.js response error code: "+r.response.code),t.destroy(),void(o?(o(l.F.SERVER_ERROR),o=null):y(e,l.F.SERVER_ERROR));if(r.fatal)switch(r.type){case Hls.ErrorTypes.NETWORK_ERROR:r.response&&0===r.response.code?(console.debug("hls.js response error code: "+r.response.code),t.destroy(),o?(o(l.F.NETWORK_ERROR),o=null):y(e,l.F.NETWORK_ERROR)):(console.debug("fatal network error encountered, try to recover"),t.startLoad());break;case Hls.ErrorTypes.MEDIA_ERROR:console.debug("fatal media error encountered, try to recover"),h(e,o),o=null;break;default:console.debug("Cannot recover from hls error - destroy and trigger error"),t.destroy(),o?(o(),o=null):y(e,l.F.FATAL_HLS_ERROR)}}))}function I(e,t,n){t.removeEventListener("error",n),w(t),A(e),P(e),S(e);var r={src:e._currentSrc};s.A.trigger(e,"stopped",[r]),e._currentTime=null,e._currentSrc=null,e._currentPlayOptions=null}function j(e,t){var n,r=[],i=t.buffered||[],o=e._currentPlayOptions;o&&(n=o.transcodingOffsetTicks),n=n||0;for(var a=0,s=i.length;a<s;a++){var l=i.start(a),u=i.end(a);m(l)||(l=0),m(u)?r.push({start: 1e7*l+n,end: 1e7*u+n}):u=0}return r}},23648:function(e,t,n){"use strict";n.d(t,{Hc:function(){return g}}),n(29305),n(32733),n(51770),n(84701),n(2623),n(84734),n(44962),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(23630),n(82367);var r=n(65369),i=n(11444),o=n(1164),a=n(86084),s=n(45251),l=n(4748),u=n(22622),c=n(5898),d=n(86191),f=n(75384);function p(e){return p="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},p(e)}function h(){h=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==p(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=f;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(p(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),u(k,l,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function y(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function m(e,t){var n=t.Type;return"UserRootFolder"!==n&&"UserView"!==n&&"Program"!==n&&"Timer"!==n&&"SeriesTimer"!==n&&("Recording"!==t.Type||"Completed"===t.Status)&&!v(t)&&e.Policy.IsAdministrator}function v(e){return(null==e?void 0:e.Id)&&"string"==typeof e.Id&&0===e.Id.indexOf("local")}function g(e,t){return b.apply(this,arguments)}function b(){var e;return e=h().mark((function e(t,n){var r,i,o,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.A.getApiClient(n.ServerId),i=(0,f.C)(r),e.prev=2,e.next=5,(0,l.C)(i).getPlaylistUser({userId:t.Id,playlistId:n.Id});case 5:return o=e.sent,a=o.data,e.abrupt("return",!!a.CanEdit);case 10:e.prev=10,e.t0=e.catch(2),console.error("Failed to get playlist permissions",e.t0);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[2,10]])})),b=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){y(o,r,i,a,s,"next",e)}function s(e){y(o,r,i,a,s,"throw",e)}a(void 0)}))},b.apply(this,arguments)}t.Ay={getDisplayName:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: {};if(!e)throw new Error("null item passed into getDisplayName");"Timer"===e.Type&&(e=e.ProgramInfo||e);var n=("Program"!==e.Type&&"Recording"!==e.Type||!e.IsSeries&&!e.EpisodeTitle?e.Name:e.EpisodeTitle)||"";if("TvChannel"===e.Type)return e.ChannelNumber?e.ChannelNumber+" "+n:n;if("Episode"===e.Type&&0===e.ParentIndexNumber)n=c.Ay.translate("ValueSpecialEpisodeName",n);else if(("Episode"===e.Type||"Program"===e.Type||"Recording"===e.Type)&&null!=e.IndexNumber&&null!=e.ParentIndexNumber&&!1!==t.includeIndexNumber){var r=e.IndexNumber,i=r,o=" - ";!1!==t.includeParentInfo?i="S"+e.ParentIndexNumber+":E"+i:o=". ",e.IndexNumberEnd&&(i+="-"+(r=e.IndexNumberEnd)),i&&(n=n?i+o+n:i)}return n},supportsAddingToCollection:function(e){return!("Recording"===e.Type&&"Completed"!==e.Status||e.CollectionType||-1!==["Genre","MusicGenre","Studio","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"].indexOf(e.Type)||"Photo"===e.MediaType||v(e))},supportsAddingToPlaylist:function(e){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"Photo"!==e.MediaType&&("Recording"!==e.Type||"Completed"===e.Status)&&!v(e)&&e.CollectionType!==r.X.Livetv&&(e.MediaType||e.IsFolder||"Genre"===e.Type||"MusicGenre"===e.Type||"MusicArtist"===e.Type)},isLocalItem:v,canIdentify:function(e,t){var n=t.Type;return("Movie"===n||"Trailer"===n||"Series"===n||"BoxSet"===n||"Person"===n||"Book"===n||"MusicAlbum"===n||"MusicArtist"===n||"MusicVideo"===n)&&e.Policy.IsAdministrator&&!v(t)},canEdit:m,canEditImages:function(e,t){var n=t.Type;return"Photo"!==t.MediaType&&("UserView"===n?!!e.Policy.IsAdministrator:("Recording"!==t.Type||"Completed"===t.Status)&&"Timer"!==n&&"SeriesTimer"!==n&&m(e,t)&&!v(t))},canEditSubtitles:function(e,t){if(t.MediaType!==s.z.Video)return!1;var n=t.Type;return(n!==i.D.Recording||t.Status===a.k.Completed)&&n!==i.D.TvChannel&&n!==i.D.Program&&"Timer"!==n&&"SeriesTimer"!==n&&n!==i.D.UserRootFolder&&n!==i.D.UserView&&!v(t)&&t.LocationType!==o.i.Virtual&&(e.Policy.EnableSubtitleManagement||e.Policy.IsAdministrator)},canEditLyrics:function(e,t){return t.MediaType===s.z.Audio&&!v(t)&&e.Policy.IsAdministrator},canShare:function(e,t){return"Program"!==e.Type&&"TvChannel"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&("Recording"!==e.Type||"Completed"===e.Status)&&!v(e)&&t.Policy.EnablePublicSharing&&u.g.supports("sharing")},enableDateAddedDisplay:function(e){return!e.IsFolder&&e.MediaType&&"Program"!==e.Type&&"TvChannel"!==e.Type&&"Trailer"!==e.Type},canMarkPlayed:function(e){if("Program"===e.Type)return!1;if("Video"===e.MediaType){if("TvChannel"!==e.Type)return!0}else if("Audio"===e.MediaType){if("AudioPodcast"===e.Type)return!0;if("AudioBook"===e.Type)return!0}return"Series"===e.Type||"Season"===e.Type||"BoxSet"===e.Type||"Book"===e.MediaType||"Recording"===e.MediaType},canRate:function(e){return"Program"!==e.Type&&"Timer"!==e.Type&&"SeriesTimer"!==e.Type&&"CollectionFolder"!==e.Type&&"UserView"!==e.Type&&"Channel"!==e.Type&&e.UserData},canConvert:function(e,t){if(!t.Policy.EnableMediaConversion)return!1;if(v(e))return!1;var n=e.MediaType;if("Book"===n||"Photo"===n||"Audio"===n)return!1;if(e.CollectionType===r.X.Livetv)return!1;var i=e.Type;return!("Channel"===i||"Person"===i||"Year"===i||"Program"===i||"Timer"===i||"SeriesTimer"===i||"Virtual"===e.LocationType&&!e.IsFolder||e.IsPlaceHolder)},canRefreshMetadata:function(e,t){return!!t.Policy.IsAdministrator&&e.CollectionType!==r.X.Livetv&&!("Timer"===e.Type||"SeriesTimer"===e.Type||"Program"===e.Type||"TvChannel"===e.Type||"Recording"===e.Type&&"Completed"!==e.Status||v(e))},supportsMediaSourceSelection:function(e){return"Video"===e.MediaType&&"TvChannel"!==e.Type&&!(!e.MediaSources||1===e.MediaSources.length&&"Placeholder"===e.MediaSources[0].Type)&&(null!=e.EnableMediaSourceDisplay?!!e.EnableMediaSourceDisplay:!e.SourceType||"Library"===e.SourceType)},sortTracks:function(e,t){var n=e.IsExternal-t.IsExternal;return 0!=n||0!=(n=t.IsForced-e.IsForced)||0!=(n=t.IsDefault-e.IsDefault)?n:e.Index-t.Index}}},92305:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E},show:function(){return T},showFindNew:function(){return C}}),n(24776),n(78557),n(96054),n(90076);var r,i,o,a,s,l,u=n(22696),c=n.n(u),d=n(79754),f=n(8566),p=n(5898),h=n(10838),y=n(46782),m=n(9164),v=n(34789),g=(n(98959),n(77157),n(15453),n(86191)),b=n(50764),w='<div class="formDialogHeader"> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"> <span class="material-icons arrow_back" aria-hidden="true"></span> </button> <h3 class="formDialogHeaderTitle">${Identify}</h3> </div> <div class="formDialogContent smoothScrollY"> <div class="dialogContentInner dialog-content-centered"> <form class="popupIdentifyForm" style="margin:auto"> <p>${HeaderIdentifyItemHelp}</p> <div class="padded-bottom fldPath hide"> <div>${LabelPath}</div> <div class="txtPath fieldDescription"></div> </div> <div class="inputContainer"> <input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}"/> </div> <div class="fldLookupYear inputContainer"> <input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}"/> </div> <div class="identifyProviderIds"></div> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block formDialogFooterItem"> <span>${Search}</span> </button> </div> </form> <div class="identificationSearchResults hide"> <h1>${SearchResults}</h1> <div class="identificationSearchResultList itemsContainer vertical-wrap"></div> </div> <form class="identifyOptionsForm hide" style="margin:auto"> <br/> <div class="selectedSearchResult"></div> <br/> <label class="checkboxContainer"> <input type="checkbox" is="emby-checkbox" id="chkIdentifyReplaceImages"/> <span>${ReplaceExistingImages}</span> </label> <div class="formDialogFooter"> <button is="emby-button" type="submit" class="raised button-submit block btnSubmit formDialogFooterItem"> <span>${ButtonOk}</span> </button> </div> </form> </div> </div> ',x=n(98320),S=!v.A.slow&&!v.A.edge,A=!1;function P(){return g.A.getApiClient(o)}function k(e){var t,n,o,a,s={ProviderIds: {}},u=e.querySelectorAll(".identifyField");for(n=0,o=u.length;n<o;n++)(a=u[n].value)&&("number"===u[n].type&&(a=parseInt(a,10)),s[u[n].getAttribute("data-lookup")]=a);var h=!1,v=e.querySelectorAll(".txtLookupId");for(n=0,o=v.length;n<o;n++)(a=v[n].value)&&(h=!0),s.ProviderIds[v[n].getAttribute("data-providerkey")]=a;if(h||s.Name){s={SearchInfo:s},null!==(t=r)&&void 0!==t&&t.Id?s.ItemId=r.Id:s.IncludeDisabledProviders=!0,f.Ay.show();var g=P();g.ajax({type: "POST",url:g.getUrl("Items/RemoteSearch/".concat(i)),data:JSON.stringify(s),contentType: "application/json",dataType: "json"}).then((function(t){f.Ay.hide(),function(e,t){var n=e.querySelector(".identificationSearchResults");e.querySelector(".popupIdentifyForm").classList.add("hide"),n.classList.remove("hide"),e.querySelector(".identifyOptionsForm").classList.add("hide"),e.querySelector(".dialogContentInner").classList.remove("dialog-content-centered");var i,o,a="";for(i=0,o=t.length;i<o;i++)a+=I(t[i],i);var s=e.querySelector(".identificationSearchResultList");function u(){var n,i=parseInt(this.getAttribute("data-index"),10),o=t[i];null!=r?function(e,t){var n=e.querySelector(".identifyOptionsForm");e.querySelector(".popupIdentifyForm").classList.add("hide"),e.querySelector(".identificationSearchResults").classList.add("hide"),n.classList.remove("hide"),e.querySelector("#chkIdentifyReplaceImages").checked=!0,e.querySelector(".dialogContentInner").classList.add("dialog-content-centered"),l=t;var r=[];r.push(c()(t.Name)),t.ProductionYear&&r.push(x.Ay.toLocaleString(t.ProductionYear,{useGrouping:!1}));var i=r.join("<br/>");t.ImageUrl&&(i='<div style="display:flex;align-items:center;"><img src="'.concat(t.ImageUrl,'" style="max-height:240px;" /><div style="margin-left:1em;">').concat(i,"</div>")),e.querySelector(".selectedSearchResult").innerHTML=i,m.A.focus(n.querySelector(".btnSubmit"))}(e,o):(n=e,l=o,A=!0,f.Ay.hide(),d.default.close(n))}s.innerHTML=a;var p=s.querySelectorAll(".card");for(i=0,o=p.length;i<o;i++)p[i].addEventListener("click",u);y.A.tv&&m.A.autoFocus(n)}(e,t)}))}else(0,b.A)(p.Ay.translate("PleaseEnterNameOrId"))}function I(e,t){var n,r="",o="card scalableCard";"Episode"===i?(o+=" backdropCard backdropCard-scalable",n="cardPadder-backdrop"): "MusicAlbum"===i||"MusicArtist"===i?(o+=" squareCard squareCard-scalable",n="cardPadder-square"):(o+=" portraitCard portraitCard-scalable",n="cardPadder-portrait"),y.A.tv&&(o+=" show-focus",S&&(o+=" show-animation")),r+='<button type="button" class="'.concat(o,'" data-index="').concat(t,'">'),r+='<div class="'.concat("cardBox cardBox-bottompadded",'">'),r+='<div class="cardScalable">',r+='<div class="'.concat(n,'"></div>'),r+='<div class="cardContent searchImage">',e.ImageUrl?r+='<div class="cardImageContainer coveredImage" style="background-image:url(\''.concat(e.ImageUrl,"');\"></div>"):r+='<div class="cardImageContainer coveredImage defaultCardBackground defaultCardBackground1"><div class="cardText cardCenteredText">'.concat(c()(e.Name),"</div></div>"),r+="</div>",r+="</div>";var a=3;"MusicAlbum"===i&&a++;var s=[e.Name];s.push(e.SearchProviderName),e.AlbumArtist&&s.push(e.AlbumArtist.Name),e.ProductionYear&&s.push(e.ProductionYear);for(var l=0;l<a;l++)r+=0===l?'<div class="cardText cardText-first cardTextCentered">':'<div class="cardText cardText-secondary cardTextCentered">',r+=c()(s[l]||"")||"&nbsp;",r+="</div>";return(r+="</div>")+"</button>"}function j(){f.Ay.hide(),A?a():s()}function T(e,t){return new Promise((function(n,u){a=n,s=u,o=t,A=!1,function(e){f.Ay.show();var t=P();t.getItem(t.getCurrentUserId(),e).then((function(e){i=(r=e).Type;var t={size: "small",removeOnClose:!0,scrollY:!1};y.A.tv&&(t.size="fullscreen");var n=d.default.createDialog(t);n.classList.add("formDialog"),n.classList.add("recordingDialog");var o="";o+=p.Ay.translateHtml(w,"core"),n.innerHTML=o,n.addEventListener("close",j),y.A.tv&&h.default.centerFocus.on(n.querySelector(".formDialogContent"),!1),e.Path?n.querySelector(".fldPath").classList.remove("hide"):n.querySelector(".fldPath").classList.add("hide"),n.querySelector(".txtPath").innerText=e.Path||"",d.default.open(n),n.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(n),!1})),n.querySelector(".identifyOptionsForm").addEventListener("submit",(function(e){return e.preventDefault(),function(e){f.Ay.show();var t={ReplaceAllImages:e.querySelector("#chkIdentifyReplaceImages").checked},n=P();n.ajax({type: "POST",url:n.getUrl("Items/RemoteSearch/Apply/".concat(r.Id),t),data:JSON.stringify(l),contentType: "application/json"}).then((function(){A=!0,f.Ay.hide(),d.default.close(e)}),(function(){f.Ay.hide(),d.default.close(e)}))}(n),!1})),n.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(n)})),n.classList.add("identifyDialog"),function(e,t){var n=P();n.getJSON(n.getUrl("Items/".concat(t.Id,"/ExternalIdInfos"))).then((function(n){for(var r="",i=0,o=n.length;i<o;i++){var a=n[i],s="txtLookup".concat(a.Key);r+='<div class="inputContainer">';var l=a.Name;a.Type&&(l="".concat(a.Name," ").concat(p.Ay.translate(a.Type)));var u=p.Ay.translate("LabelDynamicExternalId",c()(l));r+='<input is="emby-input" class="txtLookupId" data-providerkey="'.concat(a.Key,'" id="').concat(s,'" label="').concat(u,'"/>'),r+="</div>"}e.querySelector("#txtLookupName").value="","Person"===t.Type||"BoxSet"===t.Type?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=""),e.querySelector(".identifyProviderIds").innerHTML=r,e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Identify")}))}(n,e),f.Ay.hide()}))}(e)}))}function C(e,t,n,a){return new Promise((function(s){o=a,A=!1,function(e,t,n,o){r=null,i=n;var a={size: "small",removeOnClose:!0,scrollY:!1};y.A.tv&&(a.size="fullscreen");var s=d.default.createDialog(a);s.classList.add("formDialog"),s.classList.add("recordingDialog");var u="";u+=p.Ay.translateHtml(w,"core"),s.innerHTML=u,y.A.tv&&h.default.centerFocus.on(s.querySelector(".formDialogContent"),!1),d.default.open(s),s.querySelector(".btnCancel").addEventListener("click",(function(){d.default.close(s)})),s.querySelector(".popupIdentifyForm").addEventListener("submit",(function(e){return e.preventDefault(),k(s),!1})),s.addEventListener("close",(function(){f.Ay.hide(),o(A?l:null)})),s.classList.add("identifyDialog"),function(e,t,n,r){e.querySelector("#txtLookupName").value=t,"Person"===r||"BoxSet"===r?(e.querySelector(".fldLookupYear").classList.add("hide"),e.querySelector("#txtLookupYear").value=""):(e.querySelector(".fldLookupYear").classList.remove("hide"),e.querySelector("#txtLookupYear").value=n),e.querySelector(".formDialogHeaderTitle").innerHTML=p.Ay.translate("Search")}(s,e,t,n)}(e,t,n,s)}))}var E={show:T,showFindNew:C}},46782:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(22622),i=n(34789),o=n(90381),a=n(44797);function s(e){return s="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},s(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function d(e,t,n){t===n?(e[t]=!0,document.documentElement.classList.add("layout-"+t)):(e[t]=!1,document.documentElement.classList.remove("layout-"+t))}var f=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"tv",!1),u(this,"mobile",!1),u(this,"desktop",!1),u(this,"experimental",!1)},(t=[{key: "setLayout",value:function(e,t){if(e&&"auto"!==e){if(d(this,"mobile",e),d(this,"tv",e),d(this,"desktop",e),this.experimental="experimental"===e,this.experimental){var n=i.A.mobile?"mobile":this.defaultLayout||"desktop";d(this,n,n)}!1!==t&&o.A.set("layout",e)}else this.autoLayout(),!1!==t&&o.A.set("layout","");a.A.trigger(this,"modechange")}},{key: "getSavedLayout",value:function(){return o.A.get("layout")}},{key: "autoLayout",value:function(){i.A.mobile?this.setLayout("mobile",!1):i.A.tv||i.A.xboxOne||i.A.ps4?this.setLayout("tv",!1):this.setLayout(this.defaultLayout||"tv",!1)}},{key: "init",value:function(){var e=this.getSavedLayout();e?this.setLayout(e,!1):this.autoLayout()}}])&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());r.g.getDefaultLayout&&(f.defaultLayout=r.g.getDefaultLayout()),f.init(),t.A=f},47750:function(e,t,n){"use strict";n.d(t,{f:function(){return qe}}),n(29305),n(32733),n(51770),n(84701),n(81678),n(2623),n(24776),n(14382),n(64771),n(69892),n(76281),n(84734),n(44962),n(86584),n(87324),n(89336),n(26448),n(25352),n(4754),n(10849),n(70389),n(94),n(77575),n(33087),n(36947),n(36457),n(88908),n(26437),n(83810),n(52697),n(78557),n(96054),n(90076),n(646),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r=n(15122),i=n(85242),o=n(45251),a=n(45950),s=n(35222),l=n(44797),u=n(98320),c=n(90381),d=n(23648),f=n(38829),p=(n(74576),n(58953));function h(e){return h="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},h(e)}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}: {done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function g(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}var b=0;function w(e){e.PlaylistItemId||(e.PlaylistItemId="playlistItem"+b,b++)}function x(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].PlaylistItemId===e)return n;return-1}var S,A=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._sortedPlaylist=[],this._playlist=[],this._repeatMode="RepeatNone",this._shuffleMode="Sorted"},t=[{key: "getPlaylist",value:function(){return this._playlist.slice(0)}},{key: "setPlaylist",value:function(e){for(var t=0,n=(e=e.slice(0)).length;t<n;t++)w(e[t]);this._currentPlaylistItemId=null,this._playlist=e,this._repeatMode="RepeatNone"}},{key: "queue",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]),this._playlist.push(e[t])}},{key: "shufflePlaylist",value:function(){this._sortedPlaylist=[];var e,t=y(this._playlist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._sortedPlaylist.push(n)}}catch(e){t.e(e)}finally{t.f()}for(var r=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0],i=this._playlist.length-1;i>0;i--){var o=(0,p.HO)(0,i-1),a=this._playlist[i];this._playlist[i]=this._playlist[o],this._playlist[o]=a}this._playlist.unshift(r),this._shuffleMode="Shuffle"}},{key: "sortShuffledPlaylist",value:function(){this._playlist=[];var e,t=y(this._sortedPlaylist);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._playlist.push(n)}}catch(e){t.e(e)}finally{t.f()}this._sortedPlaylist=[],this._shuffleMode="Sorted"}},{key: "clearPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._playlist.splice(this.getCurrentPlaylistIndex(),1)[0];this._playlist=[],e||this._playlist.push(t)}},{key: "queueNext",value:function(e){for(var t=0,n=e.length;t<n;t++)w(e[t]);var r,i,o,a=this.getCurrentPlaylistIndex();-1===a?a=this._playlist.length:a++,r=this._playlist,i=e,(o=[]).push(a),o.push(0),o=o.concat(i),r.splice.apply(r,o)}},{key: "getCurrentPlaylistIndex",value:function(){return x(this.getCurrentPlaylistItemId(),this._playlist)}},{key: "getCurrentItem",value:function(){var e=x(this.getCurrentPlaylistItemId(),this._playlist);return-1===e?null:this._playlist[e]}},{key: "getCurrentPlaylistItemId",value:function(){return this._currentPlaylistItemId}},{key: "setPlaylistState",value:function(e){this._currentPlaylistItemId=e}},{key: "setPlaylistIndex",value:function(e){e<0?this.setPlaylistState(null):this.setPlaylistState(this._playlist[e].PlaylistItemId)}},{key: "removeFromPlaylist",value:function(e){if(this._playlist.length<=e.length)return{result: "empty"};var t=this.getCurrentPlaylistItemId(),n=-1!==e.indexOf(t);return this._sortedPlaylist=this._sortedPlaylist.filter((function(t){return!e.includes(t.PlaylistItemId)})),this._playlist=this._playlist.filter((function(t){return!e.includes(t.PlaylistItemId)})),{result: "removed",isCurrentIndex:n}}},{key: "movePlaylistItem",value:function(e,t){for(var n,r,i,o,a=this.getPlaylist(),s=0,l=a.length;s<l;s++)if(a[s].PlaylistItemId===e){n=s;break}if(-1===n||n===t)return{result: "noop"};if(t>=a.length)throw new Error("newIndex out of bounds");return i=n,o=t,(r=a).splice(o,0,r.splice(i,1)[0]),this._playlist=a,{result: "moved",playlistItemId:e,newIndex:t}}},{key: "reset",value:function(){this._sortedPlaylist=[],this._playlist=[],this._currentPlaylistItemId=null,this._repeatMode="RepeatNone",this._shuffleMode="Sorted"}},{key: "setRepeatMode",value:function(e){if(!["RepeatOne","RepeatAll","RepeatNone"].includes(e))throw new TypeError("invalid value provided for setRepeatMode");this._repeatMode=e}},{key: "getRepeatMode",value:function(){return this._repeatMode}},{key: "setShuffleMode",value:function(e){switch(e){case"Shuffle":this.shufflePlaylist();break;case"Sorted":this.sortShuffledPlaylist();break;default:throw new TypeError("invalid value provided to setShuffleMode")}}},{key: "toggleShuffleMode",value:function(){switch(this._shuffleMode){case"Shuffle":this.setShuffleMode("Sorted");break;case"Sorted":this.setShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}}},{key: "getShuffleMode",value:function(){return this._shuffleMode}},{key: "getNextItemInfo",value:function(){var e,t=this.getPlaylist(),n=t.length;switch(this.getRepeatMode()){case"RepeatOne":e=this.getCurrentPlaylistIndex();break;case"RepeatAll":(e=this.getCurrentPlaylistIndex()+1)>=n&&(e=0);break;default:e=this.getCurrentPlaylistIndex()+1}if(e<0||e>=n)return null;var r=t[e];return r?{item:r,index:e}: null}}],t&&v(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),P=A,k=n(82885),I=n(5898),j=n(8566),T=n(22622),C=n(86191),E=n(41177),L=n(38783),_=n(53089),O=n(2290),M=n(97067),R=n(41087),D=n(22934),N=n(10989),F=n(75384),z=n(73025),U=function(e,t,n){return-1===n?void 0!==e.EndTicks&&e.EndTicks<=t:void 0!==e.StartTicks&&e.StartTicks>t},V=function(e,t){return void 0!==e.StartTicks&&e.StartTicks<=t&&(void 0===e.EndTicks||e.EndTicks>t)};!function(e){e.Pairing="pairing",e.Paired="paired",e.PairError="pairerror",e.PlaybackCancelled="playbackcancelled",e.PlaybackError="playbackerror",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlayerChange="playerchange",e.ReportPlayback="reportplayback"}(S||(S={}));var B,q=n(57178),H=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},G=function(){function e(e){var t,n,r,i,o,a,s,u,c,d,f,p,h,y,m,v,g,b,w,x,A,P,k,I,j,T;this.playbackManager=e,this.playbackManagerEvents=((t={})[S.PlaybackCancelled]=null===(r=this.onPlaybackCancelled)||void 0===r?void 0:r.bind(this),t[S.PlaybackError]=null===(i=this.onPlaybackError)||void 0===i?void 0:i.bind(this),t[S.PlaybackStart]=null===(o=this.onPlaybackStart)||void 0===o?void 0:o.bind(this),t[S.PlaybackStop]=null===(a=this.onPlaybackStop)||void 0===a?void 0:a.bind(this),t[S.PlayerChange]=null===(s=this.onPlayerChange)||void 0===s?void 0:s.bind(this),t[S.ReportPlayback]=null===(u=this.onReportPlayback)||void 0===u?void 0:u.bind(this),t),this.playerEvents=((n={})[q.g.Error]=null===(c=this.onPlayerError)||void 0===c?void 0:c.bind(this),n[q.g.FullscreenChange]=null===(d=this.onPlayerFullscreenChange)||void 0===d?void 0:d.bind(this),n[q.g.ItemStarted]=null===(f=this.onPlayerItemStarted)||void 0===f?void 0:f.bind(this),n[q.g.ItemStopped]=null===(p=this.onPlayerItemStopped)||void 0===p?void 0:p.bind(this),n[q.g.MediaStreamsChange]=null===(h=this.onPlayerMediaStreamsChange)||void 0===h?void 0:h.bind(this),n[q.g.Pause]=null===(y=this.onPlayerPause)||void 0===y?void 0:y.bind(this),n[q.g.PlaybackStart]=null===(m=this.onPlayerPlaybackStart)||void 0===m?void 0:m.bind(this),n[q.g.PlaybackStop]=null===(v=this.onPlayerPlaybackStop)||void 0===v?void 0:v.bind(this),n[q.g.PlaylistItemAdd]=null===(g=this.onPlayerPlaylistItemAdd)||void 0===g?void 0:g.bind(this),n[q.g.PlaylistItemMove]=null===(b=this.onPlayerPlaylistItemMove)||void 0===b?void 0:b.bind(this),n[q.g.PlaylistItemRemove]=null===(w=this.onPlayerPlaylistItemRemove)||void 0===w?void 0:w.bind(this),n[q.g.PromptSkip]=null===(x=this.onPromptSkip)||void 0===x?void 0:x.bind(this),n[q.g.RepeatModeChange]=null===(A=this.onPlayerRepeatModeChange)||void 0===A?void 0:A.bind(this),n[q.g.ShuffleModeChange]=null===(P=this.onPlayerShuffleModeChange)||void 0===P?void 0:P.bind(this),n[q.g.Stopped]=null===(k=this.onPlayerStopped)||void 0===k?void 0:k.bind(this),n[q.g.TimeUpdate]=null===(I=this.onPlayerTimeUpdate)||void 0===I?void 0:I.bind(this),n[q.g.Unpause]=null===(j=this.onPlayerUnpause)||void 0===j?void 0:j.bind(this),n[q.g.VolumeChange]=null===(T=this.onPlayerVolumeChange)||void 0===T?void 0:T.bind(this),n),Object.entries(this.playbackManagerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.on(e,r,i)})),this.bindPlayerEvents(),l.A.on(e,S.PlayerChange,this.bindPlayerEvents.bind(this))}return e.prototype.bindPlayerEvents=function(){var e=this,t=this.playbackManager.getCurrentPlayer();this.player!==t&&(this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.off(e.player,r,i)})),this.player=t,this.player&&Object.entries(this.playerEvents).forEach((function(t){var n=H(t,2),r=n[0],i=n[1];i&&l.A.on(e.player,r,i)})))},e}(),W=n(94738),Y=(B=function(e,t){return B=Object.setPrototypeOf||{__proto__: []}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},B(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Q=function(e){function t(){var t=e.apply(this,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(arguments),!1))||this;return t.hasSegments=!1,t.isLastSegmentIgnored=!1,t.lastSegmentIndex=0,t.lastTime=-1,t.mediaSegments=[],t}return Y(t,e),t.prototype.fetchMediaSegments=function(e,t,n){return r=this,i=void 0,a=function(){var r,i,o;return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:r=new D.B7(e.configuration,void 0,e.axiosInstance),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r.getItemSegments({itemId:t,includeSegmentTypes:n})];case 2:return i=a.sent().data,this.mediaSegments=i.Items||[],[3,4];case 3:return o=a.sent(),console.error("[MediaSegmentManager] failed to fetch segments",o),this.mediaSegments=[],[3,4];case 4:return[2]}}))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}l((a=a.apply(r,i||[])).next())}));var r,i,o,a},t.prototype.skipSegment=function(e){if(void 0!==e.StartTicks&&this.lastTime>e.StartTicks)console.info("[MediaSegmentManager] ignoring skipping segment that has been seeked back into",e),this.isLastSegmentIgnored=!0;else if(e.EndTicks){if(e.StartTicks&&e.EndTicks-e.StartTicks<N.wi)return console.info("[MediaSegmentManager] ignoring skipping segment with duration <1s",e),void(this.isLastSegmentIgnored=!0);console.debug("[MediaSegmentManager] skipping to %s ms",e.EndTicks/N.Jb),this.playbackManager.seek(e.EndTicks,this.player)}else console.debug("[MediaSegmentManager] skipping to next item in queue"),this.playbackManager.nextTrack(this.player)},t.prototype.promptToSkip=function(e){if(e.StartTicks&&e.EndTicks&&e.EndTicks-e.StartTicks<3*N.wi)return console.info("[MediaSegmentManager] ignoring segment prompt with duration <3s",e),void(this.isLastSegmentIgnored=!0);this.playbackManager.promptToSkip(e)},t.prototype.performAction=function(e){if(this.mediaSegmentTypeActions&&e.Type&&this.mediaSegmentTypeActions[e.Type]){var t=this.mediaSegmentTypeActions[e.Type];t===W.M.Skip?this.skipSegment(e):t===W.M.AskToSkip&&this.promptToSkip(e)}else console.error("[MediaSegmentManager] segment type missing from action map",e,this.mediaSegmentTypeActions)},t.prototype.onPlayerPlaybackStart=function(e,t){var n,r,i,o;this.isLastSegmentIgnored=!1,this.lastSegmentIndex=0,this.lastTime=-1,this.hasSegments=!!(null===(n=t.MediaSource)||void 0===n?void 0:n.HasSegments);var a=null===(r=t.MediaSource)||void 0===r?void 0:r.Id,s=(null===(i=t.NowPlayingItem)||void 0===i?void 0:i.ServerId)||(null===(o=C.A.currentApiClient())||void 0===o?void 0:o.serverId());if(this.hasSegments&&s&&a)if(this.mediaSegmentTypeActions=Object.values(R.w).map((function(e){return{type:e,action:(0,z._)(k.currentSettings,e)}})).filter((function(e){var t=e.action;return!!t&&t!==W.M.None})).reduce((function(e,t){var n=t.type,r=t.action;return r&&(e[n]=r),e}),{}),Object.keys(this.mediaSegmentTypeActions).length){var l=(0,F.C)(C.A.getApiClient(s));this.fetchMediaSegments(l,a,Object.keys(this.mediaSegmentTypeActions).map((function(e){return e})))}else console.info("[MediaSegmentManager] user has no media segment actions enabled")},t.prototype.onPlayerTimeUpdate=function(){if(this.hasSegments&&this.mediaSegments.length){var e=this.playbackManager.currentTime(this.player)*N.Jb,t=function(e,t,n){void 0===n&&(n=0);var r=e[n];if(V(r,t))return{index:n,segment:r};var i=1;n>0&&r.StartTicks&&r.StartTicks>t&&(i=-1);for(var o=n,a=e[o];o>=0&&o<e.length;a=e[o+=i]){if(U(a,t,i))return;if(V(a,t))return{index:o,segment:a}}}(this.mediaSegments,e,this.lastSegmentIndex);!t||this.isLastSegmentIgnored&&this.lastSegmentIndex===t.index||(console.debug("[MediaSegmentManager] found %s segment at %s ms",t.segment.Type,e/N.Jb,t),this.isLastSegmentIgnored=!1,this.performAction(t.segment),this.lastSegmentIndex=t.index),this.lastTime=e}},t}(G),K=n(80262);function X(e){return"NotSupportedError"===(null==e?void 0:e.name)?K.F.MEDIA_NOT_SUPPORTED:K.F.PLAYER_ERROR}var $=n(11444),J=n(34789),Z=n(42538),ee=n(47629),te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__: []}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.onOsdChanged=n.onOsdChanged.bind(n),n}return te(t,e),t.prototype.onHideComplete=function(){this.skipElement&&this.skipElement.classList.add("hide")},t.prototype.createSkipElement=function(){var e=this;if(!this.skipElement&&this.currentSegment){var t=document.createElement("button");t.classList.add("skip-button"),t.classList.add("hide"),t.classList.add("skip-button-hidden"),t.addEventListener("click",(function(){var t,n=e.playbackManager.currentTime()*N.Jb;(null===(t=e.currentSegment)||void 0===t?void 0:t.EndTicks)&&(n<e.currentSegment.EndTicks-N.wi?e.playbackManager.seek(e.currentSegment.EndTicks):e.hideSkipButton())})),document.body.appendChild(t),this.skipElement=t}},t.prototype.setButtonText=function(){this.skipElement&&this.currentSegment&&(this.skipElement.innerHTML=I.Ay.translate("MediaSegmentSkipPrompt",I.Ay.translate("MediaSegmentType.".concat(this.currentSegment.Type))),this.skipElement.innerHTML+='<span class="material-icons skip_next" aria-hidden="true"></span>')},t.prototype.showSkipButton=function(e){var t=this,n=this.skipElement;n&&(this.clearHideTimeout(),ee.Ay.removeEventListener(n,ee.Ay.whichTransitionEvent(),this.onHideComplete,{once:!0}),n.classList.remove("hide"),e.animate?n.classList.remove("no-transition"):n.classList.add("no-transition"),n.offsetWidth,requestAnimationFrame((function(){n.classList.remove("skip-button-hidden"),e.keep||(t.hideTimeout=setTimeout(t.hideSkipButton.bind(t),8e3))})))},t.prototype.hideSkipButton=function(){var e=this,t=this.skipElement;t&&(t.classList.remove("no-transition"),t.offsetWidth,requestAnimationFrame((function(){t.classList.add("skip-button-hidden"),ee.Ay.addEventListener(t,ee.Ay.whichTransitionEvent(),e.onHideComplete,{once:!0})})))},t.prototype.clearHideTimeout=function(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},t.prototype.onOsdChanged=function(e,t){this.currentSegment&&(t?this.showSkipButton({animate:!1,keep:!0}):this.hideTimeout||this.hideSkipButton())},t.prototype.onPromptSkip=function(e,t){this.player&&null!=t.EndTicks&&t.EndTicks>=this.playbackManager.currentItem(this.player).RunTimeTicks&&this.playbackManager.getNextItem()&&k.enableNextVideoInfoOverlay()||this.currentSegment||(this.currentSegment=t,this.createSkipElement(),this.setButtonText(),this.showSkipButton({animate:!0}))},t.prototype.onPlayerTimeUpdate=function(){if(this.currentSegment){var e=this.playbackManager.currentTime(this.player)*N.Jb;V(this.currentSegment,e)||(this.currentSegment=null,this.hideSkipButton())}},t.prototype.onPlayerChange=function(){this.playbackManager.getCurrentPlayer()&&(l.A.off(document,Z.B.SHOW_VIDEO_OSD,this.onOsdChanged),l.A.on(document,Z.B.SHOW_VIDEO_OSD,this.onOsdChanged))},t.prototype.onPlaybackStop=function(){this.currentSegment=null,this.hideSkipButton(),l.A.off(document,Z.B.SHOW_VIDEO_OSD,this.onOsdChanged)},t}(G);function re(e){return re="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},re(e)}function ie(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||le(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(){oe=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new E(r||[]);return i(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==n&&r.call(S,a)&&(w=S);var A=b.prototype=v.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==re(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function I(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=j(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function j(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(T,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(re(t)+" is not iterable")}return g.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},P(k.prototype),u(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(A),u(A,l,"Generator"),u(A,a,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null: "undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||le(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=le(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}: {done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function le(e,t){if(e){if("string"==typeof e)return ue(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,me(r.key),r)}}function de(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){de(o,r,i,a,s,"next",e)}function s(e){de(o,r,i,a,s,"throw",e)}a(void 0)}))}}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]: {};t%2?pe(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function me(e){var t=function(e,t){if("object"!=re(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==re(t)?t:t+""}function ve(e){return!e.getPlaylist&&e.isLocalPlayer}function ge(e){return e.isLocalPlayer&&T.g.supports("physicalvolumecontrol")}function be(e,t,n,r,i,o,a){if(i){var s=Object.assign({},t.PlayState);s.ItemId=t.NowPlayingItem.Id,a&&(s.EventName=a),r&&function(e,t,n,r){t.NowPlayingQueue=function(e,t){return(t=t||e._currentPlayer)&&!ve(t)?t.getPlaylistSync():e._playQueueManager.getPlaylist()}(e,n).map((function(e){var t={Id:e.Id,PlaylistItemId:e.PlaylistItemId};return e.ServerId!==r&&(t.ServerId=e.ServerId),t}))}(e,s,n,i),C.A.getApiClient(i)[o](s).then((function(){l.A.trigger(e,"reportplayback",[!0])}))}else l.A.trigger(e,"reportplayback",[!1])}function we(e){return e.toLowerCase().replace(" ","")}function xe(e,t){var n=C.A.getApiClient(e);if(t.Ids&&1===t.Ids.split(",").length){var r=t.Ids.split(",");return n.getItem(n.getCurrentUserId(),r).then((function(e){return{Items: [e],TotalRecordCount: 1}}))}return-1===t.Limit?delete t.Limit:t.Limit=t.Limit||300,t.Fields=["Chapters","Trickplay"],t.ExcludeLocationTypes="Virtual",t.EnableTotalRecordCount=!1,t.CollapseBoxSetItems=!1,(0,O.J)(n,n.getCurrentUserId(),t)}function Se(e,t){var n=(0,a.A)({},e,t),r=n.Filters?n.Filters.split(","): [];return-1===r.indexOf("IsNotFolder")&&r.push("IsNotFolder"),n.Filters=r.join(","),n}function Ae(e,t){if(t=(t||"").toLowerCase(),"audio"===e){if("opus"===t)return"audio/ogg";if("webma"===t)return"audio/webm";if("m4a"===t)return"audio/mp4"}else if("video"===e){if("mkv"===t)return"video/x-matroska";if("m4v"===t)return"video/mp4";if("mov"===t)return"video/quicktime";if("mpg"===t)return"video/mpeg";if("flv"===t)return"video/x-flv"}return e+"/"+t}function Pe(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)","i").exec(t);return null==n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function ke(e){return e.isLocalPlayer}function Ie(e){return!!e.Id}function je(e){var t=null,n=null,r=null;return e.CodecProfiles.forEach((function(e){"Audio"===e.Type&&(e.Conditions||[]).forEach((function(e){"LessThanEqual"===e.Condition&&"AudioBitDepth"===e.Property?n=e.Value: "LessThanEqual"===e.Condition&&"AudioSampleRate"===e.Property?t=e.Value: "LessThanEqual"===e.Condition&&"AudioBitrate"===e.Property&&(r=e.Value)}))})),{maxAudioSampleRate:t,maxAudioBitDepth:n,maxAudioBitrate:r}}var Te=(new Date).getTime();function Ce(e,t,n,r,i,o){var a="Audio/"+e.Id+"/universal";return Te++,r.getUrl(a,{UserId:r.getCurrentUserId(),DeviceId:r.deviceId(),MaxStreamingBitrate:o.maxAudioBitrate||o.maxBitrate,Container:n,TranscodingContainer:t.Container||null,TranscodingProtocol:t.Protocol||null,AudioCodec:t.AudioCodec,MaxAudioSampleRate:o.maxAudioSampleRate,MaxAudioBitDepth:o.maxAudioBitDepth,api_key:r.accessToken(),PlaySessionId:Te,StartTimeTicks:i||0,EnableRedirection:!0,EnableRemoteMedia:T.g.supports("remoteaudio"),EnableAudioVbrEncoding:t.EnableAudioVbrEncoding})}function Ee(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));var s=je(t);return Ce(e,o,a,r,i,he({maxBitrate:n},s))}function Le(e,t,n,r,i){return function(e,t,n,r,i){var o=t.TranscodingProfiles.filter((function(e){return"Audio"===e.Type&&"Streaming"===e.Context}))[0],a="";t.DirectPlayProfiles.forEach((function(e){"Audio"===e.Type&&(a?a+=","+e.Container:a=e.Container,e.AudioCodec&&(a+="|"+e.AudioCodec))}));for(var s=je(t),l=[],u=0,c=e.length;u<c;u++){var f=e[u],p=void 0;"Audio"!==f.MediaType||d.Ay.isLocalItem(f)||(p=Ce(f,o,a,r,i,he({maxBitrate:n},s))),l.push(p||""),0===u&&(i=0)}return Promise.resolve(l)}(e,t,n,r,i).then((function(t){for(var n=0,r=e.length;n<r;n++){var i=e[n],o=t[n];o&&(i.PresetMediaSource={StreamUrl:o,Id:i.Id,MediaStreams: [],RunTimeTicks:i.RunTimeTicks})}}))}function _e(e,t,n,r,i,o,a){return Oe.apply(this,arguments)}function Oe(){return(Oe=fe(oe().mark((function e(t,n,r,o,a,s,l){var u,f,p,h,y;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.Ay.isLocalItem(r)||"Audio"!==r.MediaType||t.useServerPlaybackInfoForAudio){e.next=2;break}return e.abrupt("return",{MediaSources: [{StreamUrl:Ee(r,o,l.maxBitrate,n,l.startPosition),Id:r.Id,MediaStreams: [],RunTimeTicks:r.RunTimeTicks}]});case 2:if(!r.PresetMediaSource){e.next=4;break}return e.abrupt("return",{MediaSources: [r.PresetMediaSource]});case 4:return u=r.Id,f={UserId:n.getCurrentUserId(),StartTimeTicks:l.startPosition||0},p=(0,F.C)(n),h=(0,i.n)(p),l.isPlayback?(f.IsPlayback=!0,f.AutoOpenLiveStream=!0):(f.IsPlayback=!1,f.AutoOpenLiveStream=!1),null!=l.audioStreamIndex&&(f.AudioStreamIndex=l.audioStreamIndex),null!=l.subtitleStreamIndex&&(f.SubtitleStreamIndex=l.subtitleStreamIndex),null!=l.secondarySubtitleStreamIndex&&(f.SecondarySubtitleStreamIndex=l.secondarySubtitleStreamIndex),null!=l.enableDirectPlay&&(f.EnableDirectPlay=l.enableDirectPlay),null!=l.enableDirectStream&&(f.EnableDirectStream=l.enableDirectStream),null!=l.allowVideoStreamCopy&&(f.AllowVideoStreamCopy=l.allowVideoStreamCopy),null!=l.allowAudioStreamCopy&&(f.AllowAudioStreamCopy=l.allowAudioStreamCopy),a&&(f.MediaSourceId=a),s&&(f.LiveStreamId=s),l.maxBitrate&&(f.MaxStreamingBitrate=l.maxBitrate),t.enableMediaProbe&&!t.enableMediaProbe(r)&&(f.EnableMediaProbe=!1),!1!==f.EnableDirectStream&&t.supportsPlayMethod&&!t.supportsPlayMethod("DirectStream",r)&&(f.EnableDirectStream=!1),t.getDirectPlayProtocols&&(f.DirectPlayProtocols=t.getDirectPlayProtocols()),f.AlwaysBurnInSubtitleWhenTranscoding=c.A.alwaysBurnInSubtitleWhenTranscoding(),f.DeviceProfile=o,e.next=26,h.getPostedPlaybackInfo({itemId:u,playbackInfoDto:f});case 26:return y=e.sent,e.abrupt("return",y.data);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Me(e,t,n){var r="BluRay"===n.VideoType||"Dvd"===n.VideoType||"HdDvd"===n.VideoType;if(n.SupportsDirectPlay||r){if(n.IsRemote&&!T.g.supports("remotevideo"))return Promise.resolve(!1);if("Http"===n.Protocol&&!n.RequiredHttpHeaders.length)return n.SupportsDirectStream||n.SupportsTranscoding?function(e,t){return e.IsRemote?Promise.resolve(!0):t.getEndpointInfo().then((function(t){if(t.IsInNetwork){if(!t.IsLocal){var n=(e.Path||"").toLowerCase();if(-1!==n.indexOf("localhost")||-1!==n.indexOf("127.0.0.1"))return Promise.resolve(!1)}return Promise.resolve(!0)}return Promise.resolve(!1)}))}(n,e):Promise.resolve(!0)}return Promise.resolve(!1)}function Re(e,t){return!t.ErrorCode||(De(0,t.ErrorCode===r.V.NoCompatibleStream?"PlaybackErrorNoCompatibleStream": "PlaybackError.".concat(t.ErrorCode)),!1)}function De(e,t){(0,E.A)({text:I.Ay.translate(t),title:I.Ay.translate("HeaderPlaybackError")})}function Ne(e){e.fullscreen=!1!==e.fullscreen}function Fe(e){return!e.isLocalPlayer}function ze(e,t){return{name:t.name,id:t.id,playerName:t.name,playableMediaTypes: ["Audio","Video","Photo","Book"].map(t.canPlayMediaType),isLocalPlayer:t.isLocalPlayer,supportedCommands:e.getSupportedCommands(t)}}function Ue(e){return e.getTargets?e.getTargets():Promise.resolve([ze(e)])}function Ve(e,t){var n=e.isLocalPlayer?0: 1,r=t.isLocalPlayer?0: 1;return n=n.toString()+e.name,r=r.toString()+t.name,n.localeCompare(r)}var Be=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t,r=this,i=[],a=null;this._playNextAfterEnded=!0;var p,h={};function y(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw new Error("player cannot be null");var n=t?N(e).secondarySubtitleStreamIndex:N(e).subtitleStreamIndex;return null==n||-1===n?null:r.getSubtitleStream(e,n)}function m(e){var t=r._currentPlayer;t&&e.id!==t.id||v(null)}function v(e,n){var i=r._currentPlayer,o=t;if(e&&!n&&e.isLocalPlayer&&(n=ze(r,e)),e&&!n)throw new Error("targetInfo cannot be null");a=null,r._currentPlayer=e,t=n,n&&console.debug("Active player: "+JSON.stringify(n)),i&&r.endPlayerUpdates(i),e&&r.beginPlayerUpdates(e),function(e,t,n,r,i){(t||r)&&(n&&i&&n.id===i.id||l.A.trigger(e,"playerchange",[t,n,r]))}(r,e,n,i,o)}function g(e,t){e||(e=C.A.currentApiClient());var n=e.getSavedEndpointInfo()||{};return c.A.maxStreamingBitrate(n.IsInNetwork,t)}function b(e){return e.DeliveryMethod?e.DeliveryMethod:e.IsExternal?"External": "Embed"}function w(e){if(!e)throw new Error("player cannot be null");return-1!==(N(e).streamInfo.url||"").toLowerCase().indexOf(".m3u8")||(e.seekable?e.seekable():!("Transcode"===r.playMethod(e))&&e.duration())}function x(e,t,n){if(w(e)&&null==n)e.currentTime(parseInt(t/1e4,10));else{n=n||{};var i=N(e).streamInfo.liveStreamId,o=N(e).streamInfo.lastMediaInfoQuery,a=r.playSessionId(e),s=r.currentItem(e);e.getDeviceProfile(s,{isRetry:!1===n.EnableDirectPlay}).then((function(l){var u=null==n.AudioStreamIndex?N(e).audioStreamIndex:n.AudioStreamIndex,c=null==n.SubtitleStreamIndex?N(e).subtitleStreamIndex:n.SubtitleStreamIndex,d=null==n.SecondarySubtitleStreamIndex?N(e).secondarySubtitleStreamIndex:n.SecondarySubtitleStreamIndex,f=r.currentMediaSource(e),p=C.A.getApiClient(s.ServerId);t&&(t=parseInt(t,10));var h=n.MaxStreamingBitrate||r.getMaxStreamingBitrate(e),y=s.playOptions||{fullscreen:!0},m={maxBitrate:h,startPosition:t,isPlayback:!0,audioStreamIndex:u,subtitleStreamIndex:c,enableDirectPlay:n.EnableDirectPlay,enableDirectStream:n.EnableDirectStream,allowVideoStreamCopy:n.AllowVideoStreamCopy,allowAudioStreamCopy:n.AllowAudioStreamCopy};_e(e,p,s,l,f.Id,i,m).then((function(n){if(Re(0,n)){f=n.MediaSources[0];var r=te(p,s.MediaType,s,f,t,e);if(r.fullscreen=y.fullscreen,r.lastMediaInfoQuery=o,r.resetSubtitleOffset=!1,!r.url)return H(),void De(0,"PlaybackError.".concat(K.F.NO_MEDIA_ERROR));N(e).subtitleStreamIndex=c,N(e).secondarySubtitleStreamIndex=d,N(e).audioStreamIndex=u,N(e).maxStreamingBitrate=h,function(e,t,n,r){var i=N(t);i.isChangingStream=!0,i.streamInfo&&n?e.stopActiveEncodings(n).then((function(){var i=function(){e.stopActiveEncodings(n)};S(0,t,r).then(i,i)})):S(0,t,r)}(p,e,a,r)}}))}))}}function S(e,t,n){var r=N(t);return r.streamInfo=n,t.play(n).then((function(){r.isChangingStream=!1,n.started=!0,n.ended=!1,Ze(t,"timeupdate")}),(function(e){r.isChangingStream=!1,Ee.call(t,e,{type:X(e),streamInfo:n})}))}function A(e,t){return E.apply(this,arguments)}function E(){return(E=fe(oe().mark((function e(t,n){var r,i,o,a,s;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",[]);case 2:if(O(t,n),r=t[0],i=r.ServerId,o=n.queryOptions||{},!(a=R(r,i,n,o,t))){e.next=14;break}return e.next=10,a;case 10:return s=e.sent,e.abrupt("return",s?s.Items:t);case 14:return e.abrupt("return",t);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e,t){e.length>1&&null!=t&&t.ids&&e.sort((function(e,n){return t.ids.indexOf(e.Id)-t.ids.indexOf(n.Id)}))}function R(e,t,n,r,i){switch(e.Type){case"Program":return xe(t,{Ids:e.ChannelId});case"Playlist":return xe(t,{ParentId:e.Id,SortBy:n.shuffle?"Random": null});case"MusicArtist":return xe(t,Se({ArtistIds:e.Id,Filters: "IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Audio"},r));case"PhotoAlbum":return xe(t,Se({ParentId:e.Id,Filters: "IsNotFolder",Recursive:!1,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Photo",Limit: -1},r));case"MusicGenre":return xe(t,Se({GenreIds:e.Id,Filters: "IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Audio"},r));case"Genre":return xe(t,Se({GenreIds:e.Id,ParentId:e.ParentId,Filters: "IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Video"},r));case"Series":case"Season":return function(e,t,n){return D.apply(this,arguments)}(e,n,i);case"Episode":return function(e,t,n){return 1===n.length&&!1!==ue(e,t).supportsProgress?function(e,t){return new Promise((function(n,r){var i=C.A.getApiClient(e.ServerId);e.SeriesId?i.getEpisodes(e.SeriesId,{IsVirtualUnaired:!1,IsMissing:!1,UserId:i.getCurrentUserId(),Fields: ["Chapters","Trickplay"]}).then((function(r){n(function(e,t,n){var r,i=se(e.Items.entries());try{for(i.s();!(r=i.n()).done;){var o=ae(r.value,2),a=o[0];if(o[1].Id===t.Id){e.StartIndex=a;break}}}catch(e){i.e(e)}finally{i.f()}return n.startIndex=e.StartIndex,e.TotalRecordCount=e.Items.length,e}(r,e,t))}),r):n(null)}))}(e,t): null}(e,n,i)}return function(e,t,n,r){if("Photo"===e.MediaType)return xe(t,Se({ParentId:e.ParentId,Filters: "IsNotFolder",Recursive:!1,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Photo,Video",Limit: -1},r)).then((function(t){var r=t.Items.map((function(e){return e.Id})).indexOf(e.Id);return-1===r&&(r=0),n.startIndex=r,Promise.resolve(t)}));if(e.IsFolder&&"homevideos"===e.CollectionType)return xe(t,Se({ParentId:e.Id,Filters: "IsNotFolder",Recursive:!0,SortBy:n.shuffle?"Random": "SortName",MediaTypes: "Photo",Limit: -1},r));if(e.IsFolder){var i=null;return n.shuffle?i="Random": "BoxSet"!==e.Type&&(i="SortName"),xe(t,Se({ParentId:e.Id,Filters: "IsNotFolder",Recursive:!0,SortBy:i,MediaTypes: "Audio,Video"},r))}return null}(e,t,n,r)}function D(){return(D=fe(oe().mark((function e(t,n,r){var i,o,a,s,l,u,c,d,f;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=C.A.getApiClient(t.ServerId),o="Season"===t.Type?r[n.startIndex||0].Id:void 0,e.next=4,i.getEpisodes(t.SeriesId||t.Id,{IsVirtualUnaired:!1,IsMissing:!1,SeasonId:o&&1===r.length?o:void 0,SortBy:n.shuffle?"Random":void 0,UserId:i.getCurrentUserId(),Fields: ["Chapters","Trickplay"]});case 4:if(a=e.sent,!n.shuffle){e.next=9;break}a.StartIndex=0,e.next=35;break;case 9:a.StartIndex=void 0,l=se(a.Items.entries()),e.prev=11,l.s();case 13:if((u=l.n()).done){e.next=26;break}if(c=ae(u.value,2),d=c[0],f=c[1],!o||1==r.length){e.next=21;break}if(f.SeasonId!=o){e.next=20;break}void 0===s&&(s=d),e.next=21;break;case 20:return e.abrupt("continue",24);case 21:if(f.UserData.Played){e.next=24;break}return a.StartIndex=d,e.abrupt("break",26);case 24:e.next=13;break;case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(11),l.e(e.t0);case 31:return e.prev=31,l.f(),e.finish(31);case 34:a.StartIndex=a.StartIndex||s||0;case 35:return n.startIndex=a.StartIndex,a.TotalRecordCount=a.Items.length,e.abrupt("return",a);case 38:case"end":return e.stop()}}),e,null,[[11,28,31,34]])})))).apply(this,arguments)}function N(e){if(!e)throw new Error("player cannot be null");if(!e.name)throw new Error("player name cannot be null");var t=h[e.name];return t||(h[e.name]={},t=h[e.name]),e}function F(e){if(!e)throw new Error("player cannot be null");var t=Math.floor(1e4*e.currentTime());return N(e).streamInfo&&(t+=N(e).streamInfo.transcodingOffsetTicks||0),t}this._playQueueManager=new P,r.currentItem=function(e){if(!e)throw new Error("player cannot be null");if(e.currentItem)return e.currentItem();var t=N(e);return t.streamInfo?t.streamInfo.item: null},r.currentMediaSource=function(e){if(!e)throw new Error("player cannot be null");if(e.currentMediaSource)return e.currentMediaSource();var t=N(e);return t.streamInfo?t.streamInfo.mediaSource: null},r.playMethod=function(e){if(!e)throw new Error("player cannot be null");if(e.playMethod)return e.playMethod();var t=N(e);return t.streamInfo?t.streamInfo.playMethod: null},r.playSessionId=function(e){if(!e)throw new Error("player cannot be null");if(e.playSessionId)return e.playSessionId();var t=N(e);return t.streamInfo?t.streamInfo.playSessionId: null},r.getPlayerInfo=function(){var e=r._currentPlayer;if(!e)return null;var n=t||{};return{name:e.name,isLocalPlayer:e.isLocalPlayer,id:n.id,deviceName:n.deviceName,playableMediaTypes:n.playableMediaTypes,supportedCommands:n.supportedCommands}},r.setActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=i.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");v(e,t)}else{var n;if(null!==(n=r._currentPlayer)&&void 0!==n&&n.isLocalPlayer)return;v(null,null)}},r.trySetActivePlayer=function(e,t){if("localplayer"!==e&&"localplayer"!==e.name){if("string"==typeof e&&(e=i.filter((function(t){return t.name===e}))[0]),!e)throw new Error("null player");if(a!==t.id){a=t.id;var n=e.tryPair?e.tryPair(t):Promise.resolve();l.A.trigger(r,"pairing"),n.then((function(){l.A.trigger(r,"paired"),v(e,t)}),(function(){l.A.trigger(r,"pairerror"),a===t.id&&(a=null)}))}}else{var o;null!==(o=r._currentPlayer)&&void 0!==o&&o.isLocalPlayer}},r.getTargets=function(){var e=i.filter(Fe).map(Ue);return Promise.all(e).then((function(e){return C.A.currentApiClient().getCurrentUser().then((function(t){var n=[];n.push({name:I.Ay.translate("HeaderMyDevice"),id: "localplayer",playerName: "localplayer",playableMediaTypes: ["Audio","Video","Photo","Book"],isLocalPlayer:!0,supportedCommands:r.getSupportedCommands({isLocalPlayer:!0}),user:t});var i,o=se(e);try{for(o.s();!(i=o.n()).done;){var a,s=se(i.value);try{for(s.s();!(a=s.n()).done;){var l=a.value;n.push(l)}}catch(e){s.e(e)}finally{s.f()}}}catch(e){o.e(e)}finally{o.f()}return n.sort(Ve)}))}))},r.playerHasSecondarySubtitleSupport=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r._currentPlayer;return!!e&&Boolean(e.supports("SecondarySubtitles"))},r.trackHasSecondarySubtitleSupport=function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:r._currentPlayer)||!e)return!1;var t=(e.Codec||"").toLowerCase();return"ssa"!==t&&"ass"!==t&&"External"===b(e)},r.secondarySubtitleTracks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r._currentPlayer;return r.subtitleTracks(e).filter((function(t){return r.trackHasSecondarySubtitleSupport(t,e)}))},r.getSubtitleStream=function(e,t){return r.subtitleTracks(e).filter((function(e){return"Subtitle"===e.Type&&e.Index===t}))[0]},r.getPlaylist=function(e){return(e=e||r._currentPlayer)&&!ve(e)?e.getPlaylistSync?Promise.resolve(e.getPlaylistSync()):e.getPlaylist():Promise.resolve(r._playQueueManager.getPlaylist())},r.promptToSkip=function(e,t){t=t||r._currentPlayer,e&&this._skipSegment&&l.A.trigger(t,q.g.PromptSkip,[e])},r.isPlaying=function(e){var t,n;return null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.isPlaying?e.isPlaying():null!=(null===(n=e)||void 0===n?void 0:n.currentSrc())},r.isPlayingMediaType=function(e,t){var n;return null!==(n=t=t||r._currentPlayer)&&void 0!==n&&n.isPlaying?t.isPlaying(e):!!r.isPlaying(t)&&N(t).streamInfo.mediaType===e},r.isPlayingLocally=function(e,t){var n;return!(null===(n=t=t||r._currentPlayer)||void 0===n||!n.isLocalPlayer)&&e.filter((function(e){return r.isPlayingMediaType(e,t)})).length>0},r.isPlayingVideo=function(e){return r.isPlayingMediaType("Video",e)},r.isPlayingAudio=function(e){return r.isPlayingMediaType("Audio",e)},r.getPlayers=function(){return i},r.canPlay=function(e){var t=e.Type;if("PhotoAlbum"===t||"MusicGenre"===t||"Season"===t||"Series"===t||"BoxSet"===t||"MusicAlbum"===t||"MusicArtist"===t||"Playlist"===t)return!0;if("Virtual"===e.LocationType&&"Program"!==t)return!1;if("Program"===t){if(!e.EndDate||!e.StartDate)return!1;if((new Date).getTime()>u.Ay.parseISO8601Date(e.EndDate).getTime()||(new Date).getTime()<u.Ay.parseISO8601Date(e.StartDate).getTime())return!1}return null!=ue(e,{fullscreen:!0})},r.toggleAspectRatio=function(e){if(e=e||r._currentPlayer){for(var t=r.getAspectRatio(e),n=r.getSupportedAspectRatios(e),i=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){i=o;break}++i>=n.length&&(i=0),r.setAspectRatio(n[i].id,e)}},r.setAspectRatio=function(e,t){var n;null!==(n=t=t||r._currentPlayer)&&void 0!==n&&n.setAspectRatio&&t.setAspectRatio(e)},r.getSupportedAspectRatios=function(e){var t;return null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.getSupportedAspectRatios?e.getSupportedAspectRatios(): []},r.getAspectRatio=function(e){var t;if(null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.getAspectRatio)return e.getAspectRatio()},r.increasePlaybackRate=function(e){if(e=e||r._currentPlayer){for(var t=r.getPlaybackRate(e),n=r.getSupportedPlaybackRates(e),i=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){i=o;break}i=Math.min(i+1,n.length-1),r.setPlaybackRate(n[i].id,e)}},r.decreasePlaybackRate=function(e){if(e=e||r._currentPlayer){for(var t=r.getPlaybackRate(e),n=r.getSupportedPlaybackRates(e),i=-1,o=0,a=n.length;o<a;o++)if(n[o].id===t){i=o;break}i=Math.max(i-1,0),r.setPlaybackRate(n[i].id,e)}},r.getSupportedPlaybackRates=function(e){var t;return null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.getSupportedPlaybackRates?e.getSupportedPlaybackRates(): []},r.setBrightness=function(e,t){(t=t||r._currentPlayer)&&(p||(p=!0,n.e(71454).then(n.bind(n,71454)).then()),t.setBrightness(e))},r.getBrightness=function(e){if(e=e||r._currentPlayer)return e.getBrightness()},r.setVolume=function(e,t){(t=t||r._currentPlayer)&&!ge(t)&&t.setVolume(e)},r.getVolume=function(e){return(e=e||r._currentPlayer)&&!ge(e)?e.getVolume(): 1},r.volumeUp=function(e){(e=e||r._currentPlayer)&&!ge(e)&&e.volumeUp()},r.volumeDown=function(e){(e=e||r._currentPlayer)&&!ge(e)&&e.volumeDown()},r.changeAudioStream=function(e){if((e=e||r._currentPlayer)&&!ve(e))return e.changeAudioStream();if(e){for(var t=r.currentMediaSource(e),n=[],i=0,o=t.MediaStreams.length;i<o;i++)"Audio"===t.MediaStreams[i].Type&&n.push(t.MediaStreams[i]);if(!(n.length<=1)){for(var a=r.getAudioStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=0),c=-1===c?-1:n[c].Index,r.setAudioStreamIndex(c,e)}}},r.changeSubtitleStream=function(e){if((e=e||r._currentPlayer)&&!ve(e))return e.changeSubtitleStream();if(e){for(var t=r.currentMediaSource(e),n=[],i=0,o=t.MediaStreams.length;i<o;i++)"Subtitle"===t.MediaStreams[i].Type&&n.push(t.MediaStreams[i]);if(n.length){for(var a=r.getSubtitleStreamIndex(e),s=-1,l=0,u=n.length;l<u;l++)if(n[l].Index===a){s=l;break}var c=s+1;c>=n.length&&(c=-1),c=-1===c?-1:n[c].Index,r.setSubtitleStreamIndex(c,e)}}},r.getAudioStreamIndex=function(e){return(e=e||r._currentPlayer)&&!ve(e)?e.getAudioStreamIndex():N(e).audioStreamIndex},r.setAudioStreamIndex=function(e,t){if((t=t||r._currentPlayer)&&!ve(t))return t.setAudioStreamIndex(e);"Transcode"!==r.playMethod(t)&&t.canSetAudioStreamIndex()?t.getDeviceProfile(r.currentItem(t)).then((function(n){!function(e,t,n){for(var r,i=e.MediaStreams,o=0,a=i.length;o<a;o++)if("Audio"===i[o].Type&&i[o].Index===t){r=i[o];break}if(!r)return!1;var s=e.Container.toLowerCase(),l=(r.Codec||"").toLowerCase();return!!l&&(n.DirectPlayProfiles||[]).some((function(e){return"Video"===e.Type&&(0,_.q)((e.Container||"").toLowerCase(),s)&&(0,_.q)((e.AudioCodec||"").toLowerCase(),l)}))}(r.currentMediaSource(t),e,n)?(x(t,F(t),{AudioStreamIndex:e}),N(t).audioStreamIndex=e):(t.setAudioStreamIndex(e),N(t).audioStreamIndex=e)})):(x(t,F(t),{AudioStreamIndex:e}),N(t).audioStreamIndex=e)},r.getMaxStreamingBitrate=function(e){var t;if(null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.getMaxStreamingBitrate)return e.getMaxStreamingBitrate();var n=N(e);if(n.maxStreamingBitrate)return n.maxStreamingBitrate;var i=n.streamInfo?n.streamInfo.mediaType: null,o=r.currentItem(e);return g(o?C.A.getApiClient(o.ServerId):C.A.currentApiClient(),i)},r.enableAutomaticBitrateDetection=function(e){var t;if(null!==(t=e=e||r._currentPlayer)&&void 0!==t&&t.enableAutomaticBitrateDetection)return e.enableAutomaticBitrateDetection();var n=N(e),i=n.streamInfo?n.streamInfo.mediaType: null,o=r.currentItem(e),a=(o?C.A.getApiClient(o.ServerId):C.A.currentApiClient()).getSavedEndpointInfo()||{};return c.A.enableAutomaticBitrateDetection(a.IsInNetwork,i)},r.setMaxStreamingBitrate=function(e,t){var n;if(null!==(n=t=t||r._currentPlayer)&&void 0!==n&&n.setMaxStreamingBitrate)return t.setMaxStreamingBitrate(e);var i=C.A.getApiClient(r.currentItem(t).ServerId);i.getEndpointInfo().then((function(n){var r,o=N(t),a=o.streamInfo?o.streamInfo.mediaType:null;e.enableAutomaticBitrateDetection?(c.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!0),r=i.detectBitrate(!0)):(c.A.enableAutomaticBitrateDetection(n.IsInNetwork,a,!1),r=Promise.resolve(e.maxBitrate)),r.then((function(e){c.A.maxStreamingBitrate(n.IsInNetwork,a,e),x(t,F(t),{MaxStreamingBitrate:e})}))}))},r.isFullscreen=function(e){return!(e=e||r._currentPlayer).isLocalPlayer||e.isFullscreen?e.isFullscreen():s.A.isEnabled?s.A.isFullscreen:document.webkitIsFullScreen},r.toggleFullscreen=function(e){if(!(e=e||r._currentPlayer).isLocalPlayer||e.toggleFullscreen)return e.toggleFullscreen();if(s.A.isEnabled)s.A.toggle();else if(document.webkitIsFullScreen&&document.webkitCancelFullscreen)document.webkitCancelFullscreen();else{var t=document.querySelector("video");null!=t&&t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}},r.togglePictureInPicture=function(e){return(e=e||r._currentPlayer).togglePictureInPicture()},r.toggleAirPlay=function(e){return(e=e||r._currentPlayer).toggleAirPlay()},r.getSubtitleStreamIndex=function(e){if((e=e||r._currentPlayer)&&!ve(e))return e.getSubtitleStreamIndex();if(!e)throw new Error("player cannot be null");return N(e).subtitleStreamIndex},r.getSecondarySubtitleStreamIndex=function(e){if(!(e=e||r._currentPlayer))throw new Error("player cannot be null");try{if(!ve(e))return e.getSecondarySubtitleStreamIndex()}catch(e){console.error("[playbackmanager] Failed to get secondary stream index:",e)}return N(e).secondarySubtitleStreamIndex},r.setSubtitleStreamIndex=function(e,t){if((t=t||r._currentPlayer)&&!ve(t))return t.setSubtitleStreamIndex(e);var n=y(t),i=r.getSubtitleStream(t,e);if(n||i){var o=-1,a=r.playMethod(t);n&&!i?("Encode"===b(n)||"Embed"===b(n)&&"Transcode"===a)&&x(t,F(t),{SubtitleStreamIndex: -1}):!n&&i?"External"===b(i)||"Embed"===b(i)&&"Transcode"!==a?o=e:x(t,F(t),{SubtitleStreamIndex:e}):n&&i&&("External"===b(i)||"Embed"===b(i)&&"Transcode"!==a?(o=e,"External"!==b(n)&&"Embed"!==b(n)&&x(t,F(t),{SubtitleStreamIndex: -1})):x(t,F(t),{SubtitleStreamIndex:e})),t.setSubtitleStreamIndex(o),-1!==o&&r.trackHasSecondarySubtitleSupport(i)||r.setSecondarySubtitleStreamIndex(-1),N(t).subtitleStreamIndex=e}},r.setSecondarySubtitleStreamIndex=function(e,t){if(t=t||r._currentPlayer,r.playerHasSecondarySubtitleSupport(t)){if(t&&!ve(t))try{return t.setSecondarySubtitleStreamIndex(e)}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}var n=y(t,!0),i=r.getSubtitleStream(t,e);if((n||i)&&(!i||r.trackHasSecondarySubtitleSupport(i,t)))try{t.setSecondarySubtitleStreamIndex(e),N(t).secondarySubtitleStreamIndex=e}catch(e){console.error("[playbackmanager] AutoSet - Failed to set secondary track:",e)}}},r.supportSubtitleOffset=function(e){return(e=e||r._currentPlayer)&&"setSubtitleOffset"in e},r.enableShowingSubtitleOffset=function(e){(e=e||r._currentPlayer).enableShowingSubtitleOffset()},r.disableShowingSubtitleOffset=function(e){(e=e||r._currentPlayer).disableShowingSubtitleOffset&&e.disableShowingSubtitleOffset()},r.isShowingSubtitleOffsetEnabled=function(e){return(e=e||r._currentPlayer).isShowingSubtitleOffsetEnabled()},r.isSubtitleStreamExternal=function(e,t){var n=r.getSubtitleStream(t,e);return!!n&&"External"===b(n)},r.setSubtitleOffset=function(e,t){(t=t||r._currentPlayer).setSubtitleOffset&&t.setSubtitleOffset(e)},r.getPlayerSubtitleOffset=function(e){if((e=e||r._currentPlayer).getSubtitleOffset)return e.getSubtitleOffset()},r.canHandleOffsetOnCurrentSubtitle=function(e){var t=r.getSubtitleStreamIndex(e);return-1!==t&&r.isSubtitleStreamExternal(t,e)},r.seek=function(e,t){if(e=Math.max(0,e),(t=t||r._currentPlayer)&&!ve(t))return t.seek(e);x(t,e)},r.seekRelative=function(e,t){if((t=t||r._currentPlayer)&&!ve(t)&&t.seekRelative)return t.seekRelative(n);var n=F(t)+e;return this.seek(n,t)},r.translateItemsForPlayback=A,r.getItemsForPlayback=xe,r.play=function(){var e=fe(oe().mark((function e(t){var n,i,o;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ne(t),!r._currentPlayer){e.next=6;break}if(!1!==t.enableRemotePlayers||r._currentPlayer.isLocalPlayer){e.next=4;break}throw new Error("Remote players are disabled");case 4:if(r._currentPlayer.isLocalPlayer){e.next=6;break}return e.abrupt("return",r._currentPlayer.play(t));case 6:if(t.fullscreen&&j.Ay.show(),n=t.items){e.next=14;break}if(t.serverId){e.next=11;break}throw new Error("serverId required!");case 11:return e.next=13,xe(t.serverId,{Ids:t.ids.join(",")});case 13:n=e.sent.Items;case 14:return e.next=16,A(n,t);case 16:return n=e.sent,e.next=19,z(n);case 19:if(n=e.sent,t.startIndex){for(i=0,o=0;o<t.startIndex;o++)i+=n[o].length;t.startIndex=i}return n=n.flat(),e.abrupt("return",U(n,t));case 23:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r.getPlayerState=function(e,t,n){if(!(e=e||r._currentPlayer))throw new Error("player cannot be null");if(!ve(e)&&e.getPlayerState)return e.getPlayerState();t=t||r.currentItem(e),n=n||r.currentMediaSource(e);var i={PlayState: {}};return e&&(i.PlayState.VolumeLevel=e.getVolume(),i.PlayState.IsMuted=e.isMuted(),i.PlayState.IsPaused=e.paused(),i.PlayState.RepeatMode=r.getRepeatMode(e),i.PlayState.ShuffleMode=r.getQueueShuffleMode(e),i.PlayState.MaxStreamingBitrate=r.getMaxStreamingBitrate(e),i.PlayState.PositionTicks=F(e),i.PlayState.PlaybackStartTimeTicks=r.playbackStartTime(e),i.PlayState.PlaybackRate=r.getPlaybackRate(e),i.PlayState.SubtitleStreamIndex=r.getSubtitleStreamIndex(e),i.PlayState.SecondarySubtitleStreamIndex=r.getSecondarySubtitleStreamIndex(e),i.PlayState.AudioStreamIndex=r.getAudioStreamIndex(e),i.PlayState.BufferedRanges=r.getBufferedRanges(e),i.PlayState.PlayMethod=r.playMethod(e),n&&(i.PlayState.LiveStreamId=n.LiveStreamId),i.PlayState.PlaySessionId=r.playSessionId(e),i.PlayState.PlaylistItemId=r.getCurrentPlaylistItemId(e)),n&&(i.PlayState.MediaSourceId=n.Id,i.NowPlayingItem={RunTimeTicks:n.RunTimeTicks},i.PlayState.CanSeek=(n.RunTimeTicks||0)>0||w(e)),t&&(i.NowPlayingItem=function(e,t,n){var r=Object.assign({},t);return n&&(r.RunTimeTicks=n.RunTimeTicks,r.MediaStreams=n.MediaStreams,r.MediaSources=null),r.RunTimeTicks=r.RunTimeTicks||1e4*e.duration(),r}(e,t,n)),i.MediaSource=n,i},r.duration=function(e){if((e=e||r._currentPlayer)&&!ve(e)&&!e.isLocalPlayer)return e.duration();if(!e)throw new Error("player cannot be null");var t=r.currentMediaSource(e);if(null!=t&&t.RunTimeTicks)return t.RunTimeTicks;var n=e.duration();return n&&(n*=1e4),n},r.getCurrentTicks=F;var z=function(){var e=fe(oe().mark((function e(t){var n;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=function(){var e=fe(oe().mark((function e(t){var n,r,i;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.PartCount&&t.PartCount>1&&[$.D.Episode,$.D.Movie].includes(t.Type))){e.next=10;break}return n=C.A.getApiClient(t.ServerId),e.next=4,n.getCurrentUser();case 4:return r=e.sent,e.next=7,n.getAdditionalVideoParts(r.Id,t.Id);case 7:if(!(i=e.sent).Items.length){e.next=10;break}return e.abrupt("return",[t].concat(ie(i.Items)));case 10:return e.abrupt("return",[t]);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return",Promise.all(t.map(n)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function U(e,t){var n=t.startIndex||0,i=e[n];if(i||(i=e[n=0]),!i)return De(0,"PlaybackError.".concat(K.F.NO_MEDIA_ERROR)),Promise.reject();if("Photo"===i.MediaType||"Book"===i.MediaType)return function(e,t){var n=ue(e[t.startIndex||0],t);return j.Ay.hide(),t.items=e,n.play(t)}(e,t);var o=C.A.getApiClient(i.ServerId);return function(e,t,n){return n.startPositionTicks||n.startIndex||!1===n.fullscreen||"Video"!==(r=e).MediaType||"TvChannel"===r.Type||"InProgress"===r.Status||!Ie(r)||!k.enableCinemaMode()?Promise.resolve({Items: []}):t.getIntros(e.Id).then((function(e){return e}),(function(){return Promise.resolve({Items: []})}));var r}(i,o,t).then((function(o){var a,s,l=o.Items;return i.playOptions={fullscreen:(s=t).fullscreen,mediaSourceId:s.mediaSourceId,audioStreamIndex:s.audioStreamIndex,subtitleStreamIndex:s.subtitleStreamIndex,startPositionTicks:s.startPositionTicks},a=l.length?{fullscreen:i.playOptions.fullscreen}:i.playOptions,e=l.concat(e),a.items=e,a.startIndex=n,B(e[n],a,(function(){r._playQueueManager.setPlaylist(e),V(e[n].PlaylistItemId,n),j.Ay.hide()}))}))}function V(e,t){isNaN(t)||r._playQueueManager.setPlaylistState(e,t)}function B(e,t,n,i){if(e.IsPlaceHolder)return j.Ay.hide(),De(0,"PlaybackErrorPlaceHolder"),Promise.reject();Ne(t),t.isFirstItem?t.isFirstItem=!1:t.isFirstItem=!0;var o=C.A.getApiClient(e.ServerId),a=e.MediaType;return t.fullscreen&&j.Ay.show(),function(e,t){return new Promise((function(n,r){var i=f.X.ofType(L.Q.PreplayIntercept);if(i.sort((function(e,t){return(e.order||0)-(t.order||0)})),i.length){var o=Object.assign({},t);o.mediaType=e.MediaType,o.item=e,Z(i,0,o,n,r)}else n()}))}(e,t).catch(G).then((function(){return function(e,t,n){return Promise.resolve().then((function(){return!Ie(t)||d.Ay.isLocalItem(t)?Promise.reject(new Error("skip bitrate detection")):e.getEndpointInfo().then((function(t){return"Video"!==n&&"Audio"!==n||!c.A.enableAutomaticBitrateDetection(t.IsInNetwork,n)?Promise.reject(new Error("skip bitrate detection")):e.detectBitrate().then((function(e){return c.A.maxStreamingBitrate(t.IsInNetwork,n,e),e}))}))})).catch((function(){return g(e,n)}))}(o,e,a)})).then((function(o){return function(e,t,n,i,o){var a,s=n.startPositionTicks,u=ue(t,n),c=r._currentPlayer;if(c?(r._playNextAfterEnded=!1,a=function(e,t,n){var i=r.getPlayerState(e),o=r.currentItem(e).ServerId;return we(e),function(e){l.A.off(e,"stopped",Oe)}(e),(e===t?e.stop(!1):e.stop(!0)).then((function(){N(e).streamInfo=null,Be(e),ve(e)&&be(r,i,e,!0,o,"reportPlaybackStopped"),l.A.trigger(r,"playbackstop",[{player:e,state:i,nextItem:n,nextMediaType:n.MediaType}])}))}(c,u,t)):a=Promise.resolve(),!u)return a.then((function(){H(),j.Ay.hide(),console.error("No player found for the requested media: ".concat(t.Url)),De(0,"ErrorPlayerNotFound")}));if(!Ie(t)||"Book"===t.MediaType)return a.then((function(){var e=function(e){return{url:e.Url||e.Path,playMethod: "DirectPlay",item:e,textTracks: [],mediaType:e.MediaType}}(t);return e.fullscreen=n.fullscreen,N(u).isChangingStream=!1,u.play(e).then((function(){j.Ay.hide(),i(),je(u,n,e)})).catch((function(e){r.stop(u),j.Ay.hide(),De(0,e||"ErrorDefault")}))}));var d,f=C.A.getApiClient(t.ServerId),p=[$.D.TvChannel,$.D.LiveTvChannel].includes(t.Type);p||(d=n.mediaSourceId||t.Id);var h=p?Promise.resolve([]):f.getItem(f.getCurrentUserId(),d).then((function(e){return e.MediaStreams}));return Promise.all([a,u.getDeviceProfile(t),f.getCurrentUser(),h]).then((function(a){var l=a[1],c=a[2],p=a[3],h=n.audioStreamIndex,y=n.subtitleStreamIndex,m={maxBitrate:e,startPosition:s,isPlayback: null,audioStreamIndex:h,subtitleStreamIndex:y,startIndex:n.startIndex,enableDirectPlay: null,enableDirectStream: null,allowVideoStreamCopy: null,allowAudioStreamCopy: null};if(u&&!ve(u))return function(e,t,n,r,i,o){return Le(t,n,o.maxBitrate,r,o.startPosition).then((function(){return j.Ay.hide(),e.play({items:t,startPositionTicks:o.startPosition||0,mediaSourceId:i,audioStreamIndex:o.audioStreamIndex,subtitleStreamIndex:o.subtitleStreamIndex,startIndex:o.startIndex})}))}(u,n.items,l,f,d,m);n.items=null;var v={};return function(e,t,n,r,i){try{if(!e)return;if(!t)return void console.warn("AutoSet - No mediaStreams");r&&"number"==typeof e.DefaultAudioStreamIndex&&ee(e.DefaultAudioStreamIndex,e,t,n,"Audio"),i&&"number"==typeof e.DefaultSubtitleStreamIndex&&ee(e.DefaultSubtitleStreamIndex,e,t,n,"Subtitle"),i&&"number"==typeof e.DefaultSecondarySubtitleStreamIndex&&ee(e.DefaultSecondarySubtitleStreamIndex,e,t,n,"Subtitle",!0)}catch(e){console.error("AutoSet - Caught unexpected error: ".concat(e))}}(o,p,v,c.Configuration.RememberAudioSelections,c.Configuration.RememberSubtitleSelections),null!=v.DefaultAudioStreamIndex&&(m.audioStreamIndex=v.DefaultAudioStreamIndex),null!=v.DefaultSubtitleStreamIndex&&(m.subtitleStreamIndex=v.DefaultSubtitleStreamIndex),le(u,f,l,t,d,m).then(function(){var o=fe(oe().mark((function o(a){var l,c,d,p;return oe().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return null!=v.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSecondarySubtitleStreamIndex=v.DefaultSecondarySubtitleStreamIndex),(null==a.DefaultSubtitleStreamIndex||a.DefaultSubtitleStreamIndex<0)&&(null!=a.DefaultSecondarySubtitleStreamIndex&&(a.DefaultSubtitleStreamIndex=a.DefaultSecondarySubtitleStreamIndex),a.DefaultSecondarySubtitleStreamIndex=-1),l=a.MediaStreams[a.DefaultSubtitleStreamIndex],c=a.MediaStreams[a.DefaultSecondarySubtitleStreamIndex],r.trackHasSecondarySubtitleSupport(l,u)&&r.trackHasSecondarySubtitleSupport(c,u)||(a.DefaultSecondarySubtitleStreamIndex=-1),(d=te(f,t.MediaType,t,a,s,u)).fullscreen=n.fullscreen,(p=N(u)).isChangingStream=!1,p.maxStreamingBitrate=e,p.streamInfo=d,o.abrupt("return",u.play(d).then((function(){j.Ay.hide(),i(),je(u,n,d,a)}),(function(e){i(),je(u,n,d,a),setTimeout((function(){Ee.call(u,e,{type:X(e),streamInfo:d})}),100)})));case 12:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}())}))}(o,e,t,n,i).catch(W)})).catch((function(){t.fullscreen&&j.Ay.hide()}))}function H(){var e=r._currentPlayer;e&&(Y(e),m(e)),l.A.trigger(r,"playbackcancelled")}function G(){return H(),Promise.reject()}function W(e){H();var t="ErrorDefault";return e instanceof Response&&(e.status>=500?t="PlaybackError.".concat(K.F.SERVER_ERROR):e.status>=400&&(t="PlaybackError.".concat(K.F.NO_MEDIA_ERROR))),De(0,t),Promise.reject()}function Y(e){e.destroy()}function Z(e,t,n,r,i){t>=e.length?r():e[t].intercept(n).then((function(){Z(e,t+1,n,r,i)}),i)}function ee(e,t,n,r,i,o){if(-1==e)return console.debug("AutoSet ".concat(i," - No Stream Set")),void("Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=-1:r.DefaultSubtitleStreamIndex=-1));if(t.MediaStreams&&n){var a=null,s=0,l=t.MediaStreams[e];if(l){console.debug("AutoSet ".concat(i," - Previous was ").concat(l.Index," - ").concat(l.DisplayTitle));var u,c=0,d=se(t.MediaStreams);try{for(d.s();!(u=d.n()).done;){var f=u.value;if(f.Type==i){if(f.Index==e)break;c+=1}}}catch(e){d.e(e)}finally{d.f()}var p,h=0,y=se(n);try{for(y.s();!(p=y.n()).done;){var m=p.value;if(m.Type==i){var v=0;l.Codec==m.Codec&&(v+=1),c==h&&(v+=1),l.DisplayTitle&&l.DisplayTitle==m.DisplayTitle&&(v+=2),l.Language&&"und"!=l.Language&&l.Language==m.Language&&(v+=2),console.debug("AutoSet ".concat(i," - Score ").concat(v," for ").concat(m.Index," - ").concat(m.DisplayTitle)),v>s&&v>=3&&(s=v,a=m.Index),h+=1}}}catch(e){y.e(e)}finally{y.f()}null!=a?(console.debug("AutoSet ".concat(i," - Using ").concat(a," score ").concat(s,".")),"Subtitle"==i&&(o?r.DefaultSecondarySubtitleStreamIndex=a:r.DefaultSubtitleStreamIndex=a),"Audio"==i&&(r.DefaultAudioStreamIndex=a)):console.debug("AutoSet ".concat(i," - Threshold not met. Using default."))}else console.debug("AutoSet ".concat(i," - No prevStream"))}else console.debug("AutoSet ".concat(i," - No MediaStreams"))}function te(e,t,n,r,i,o){var a,s,l,u=0,c=i,d=r.LiveStreamId,f="Transcode",p=(r.Container||"").toLowerCase();if(r.MediaStreams&&o.useFullSubtitleUrls&&r.MediaStreams.forEach((function(t){var n;null!==(n=t.DeliveryUrl)&&void 0!==n&&n.startsWith("/")&&(t.DeliveryUrl=e.getUrl(t.DeliveryUrl))})),"Video"===t||"Audio"===t)if(s=Ae(t.toLowerCase(),p),r.enableDirectPlay)a=r.Path,f="DirectPlay";else if(r.StreamUrl)a=r.StreamUrl;else if(r.SupportsDirectPlay||r.SupportsDirectStream){l={Static:!0,mediaSourceId:r.Id,deviceId:e.deviceId(),api_key:e.accessToken()},r.ETag&&(l.Tag=r.ETag),r.LiveStreamId&&(l.LiveStreamId=r.LiveStreamId);var h="Video"===t?"Videos": "Audio";a=e.getUrl(h+"/"+n.Id+"/stream."+p,l),f=r.SupportsDirectPlay?"DirectPlay": "DirectStream"}else r.SupportsTranscoding&&(a=e.getUrl(r.TranscodingUrl),"hls"===r.TranscodingSubProtocol?s="application/x-mpegURL":(s=Ae(t.toLowerCase(),r.TranscodingContainer),-1===a.toLowerCase().indexOf("copytimestamps=true")&&(u=i||0)));else a=r.Path,f="DirectPlay";!a&&r.SupportsDirectPlay&&(a=r.Path,f="DirectPlay");var y={url:a,mimeType:s,transcodingOffsetTicks:u,playMethod:f,playerStartPositionTicks:c,item:n,mediaSource:r,textTracks:re(e,n,r),tracks:re(e,n,r),mediaType:t,liveStreamId:d,playSessionId:Pe("playSessionId",a),title:n.Name},m=(0,M.I)(e,n,{},!0);return m&&(y.backdropUrl=m),y}function re(e,t,n){for(var r=n.MediaStreams.filter((function(e){return"Subtitle"===e.Type})).filter((function(e){return"External"===e.DeliveryMethod})),i=[],o=0,a=r.length;o<a;o++){var s,l=r[o];s=d.Ay.isLocalItem(t)?l.Path:l.IsExternalUrl?l.DeliveryUrl:e.getUrl(l.DeliveryUrl),i.push({url:s,language:l.Language||"und",isDefault:l.Index===n.DefaultSubtitleStreamIndex,index:l.Index,format:l.Codec})}return i}function le(e,t,n,r,i,o){return o.isPlayback=!0,_e(e,t,r,n,i,null,o).then((function(i){return Re(0,i)?function(e,t,n){var r=n.map((function(t){return Me(e,0,t)}));return r.length?Promise.all(r).then((function(e){for(var t=0,r=n.length;t<r;t++)n[t].enableDirectPlay=e[t]||!1;var i=n.filter((function(e){return e.enableDirectPlay}))[0];return i||(i=n.filter((function(e){return e.SupportsDirectStream}))[0]),(i=i||n.filter((function(e){return e.SupportsTranscoding}))[0])||n[0]})):Promise.reject()}(t,0,i.MediaSources).then((function(a){return a?a.RequiresOpening&&!a.LiveStreamId?(o.audioStreamIndex=null,o.subtitleStreamIndex=null,function(e,t,n,r,i,o,a){var s={DeviceProfile:i,OpenToken:o.OpenToken},l={UserId:t.getCurrentUserId(),StartTimeTicks:a.startPosition||0,ItemId:n.Id,PlaySessionId:r};return a.maxBitrate&&(l.MaxStreamingBitrate=a.maxBitrate),null!=a.audioStreamIndex&&(l.AudioStreamIndex=a.audioStreamIndex),null!=a.subtitleStreamIndex&&(l.SubtitleStreamIndex=a.subtitleStreamIndex),!1!==l.EnableDirectStream&&e.supportsPlayMethod&&!e.supportsPlayMethod("DirectStream",n)&&(l.EnableDirectStream=!1),t.ajax({url:t.getUrl("LiveStreams/Open",l),type: "POST",data:JSON.stringify(s),contentType: "application/json",dataType: "json"})}(e,t,r,i.PlaySessionId,n,a,o).then((function(e){return Me(t,0,e.MediaSource).then((function(t){return e.MediaSource.enableDirectPlay=t,e.MediaSource}))}))):null!=r.AlbumId?t.getItem(t.getCurrentUserId(),r.AlbumId).then((function(e){return a.albumNormalizationGain=e.NormalizationGain,a})):a:(De(0,"PlaybackError.".concat(K.F.NO_MEDIA_ERROR)),Promise.reject())})):Promise.reject()}))}function ue(e,t,n){var i=Ie(e);return function(e,t){if(!t){var n=e._currentPlayer;if(n&&!ke(n))return[n]}return e.getPlayers().filter(ke)}(r,n).filter((function(n){if(n.canPlayMediaType(e.MediaType)){if(i)return!n.canPlayItem||n.canPlayItem(e,t);if(e.Url&&n.canPlayUrl)return n.canPlayUrl(e.Url)}return!1}))[0]}function ce(e){var t=r.currentMediaSource(e),n=N(e);return he(he({},t),{},{DefaultAudioStreamIndex:n.audioStreamIndex,DefaultSubtitleStreamIndex:n.subtitleStreamIndex,DefaultSecondarySubtitleStreamIndex:n.secondarySubtitleStreamIndex})}function de(e,t,n){if(!(n=n||r._currentPlayer))return r.play(e);if(e.items)return A(e.items,e).then((function(e){pe(e,t,n)}));if(!e.serverId)throw new Error("serverId required!");return xe(e.serverId,{Ids:e.ids.join(",")}).then((function(r){return A(r.Items,e).then((function(e){pe(e,t,n)}))}))}function pe(e,t,n){if(e.length)if(n.isLocalPlayer)if(n&&!ve(n)){var i=C.A.getApiClient(e[0].ServerId);n.getDeviceProfile(e[0]).then((function(o){Le(e,o,r.getMaxStreamingBitrate(n),i,0).then((function(){"next"===t?n.queueNext(e):n.queue(e)}))}))}else"next"===t?r._playQueueManager.queueNext(e):r._playQueueManager.queue(e),l.A.trigger(n,"playlistitemadd");else"next"===t?n.queueNext({items:e}):n.queue({items:e})}function ye(){Ze(this,"timeupdate")}function me(e){we(e),e._progressInterval=setInterval(ye.bind(e),1e4)}function we(e){e._progressInterval&&(clearInterval(e._progressInterval),e._progressInterval=null)}function je(e,t,n,i){if(!e)throw new Error("player cannot be null");v(e);var o=N(e);o.streamInfo=n,n.playbackStartTimeTicks=1e4*(new Date).getTime(),i?(o.audioStreamIndex=i.DefaultAudioStreamIndex,o.subtitleStreamIndex=i.DefaultSubtitleStreamIndex,o.secondarySubtitleStreamIndex=i.DefaultSecondarySubtitleStreamIndex):(o.audioStreamIndex=null,o.subtitleStreamIndex=null,o.secondarySubtitleStreamIndex=null),r._playNextAfterEnded=!0;var a=t.isFirstItem,s=t.fullscreen,u=r.getPlayerState(e,n.item,n.mediaSource);be(r,u,e,!0,u.NowPlayingItem.ServerId,"reportPlaybackStart"),u.IsFirstItem=a,u.IsFullscreen=s,l.A.trigger(e,"playbackstart",[u]),l.A.trigger(r,"playbackstart",[e,u]),n.started=!0,me(e)}function Te(e,t,n){var i=this;v(i);var o=t.playOptions||{fullscreen:!0},a=o.isFirstItem,s=o.fullscreen;o.isFirstItem=!1;var u=N(i);u.streamInfo={};var c=u.streamInfo;c.playbackStartTimeTicks=1e4*(new Date).getTime();var d=r.getPlayerState(i,t,n);be(r,d,i,!0,d.NowPlayingItem.ServerId,"reportPlaybackStart"),d.IsFirstItem=a,d.IsFullscreen=s,l.A.trigger(i,"playbackstart",[d]),l.A.trigger(r,"playbackstart",[i,d]),c.started=!0,me(i)}function Ce(e,t){var n=this;we(n);var i=r.getPlayerState(n,t.item,t.mediaSource),o=t.nextItem,a=t.nextMediaType,s={player:n,state:i,nextItem:o?o.item: null,nextMediaType:a};i.NextMediaType=a,N(n).streamInfo.ended=!0,Ie(t.item)&&(i.PlayState.PositionTicks=1e4*(t.positionMs||0),be(r,i,n,!0,t.item.ServerId,"reportPlaybackStopped")),i.NextItem=s.nextItem,l.A.trigger(n,"playbackstop",[i]),l.A.trigger(r,"playbackstop",[s]);var u=o&&o.item.playOptions||{fullscreen:!0};(o?ue(o.item,u):null)!==n&&(Y(n),m(n))}function Ee(e,t){var n=this,i=(t=t||{}).type;console.warn("[playbackmanager] onPlaybackError:",e,t);var o=t.streamInfo||N(n).streamInfo;if(null!=o&&o.url){var a=o.url.toLowerCase().includes("transcodereasons"),s=-1!==o.url.toLowerCase().indexOf("allowvideostreamcopy=false"),u=-1!==o.url.toLowerCase().indexOf("allowaudiostreamcopy=false");if(function(e,t,n,r){return e.mediaSource.SupportsTranscoding&&(!n||!r)}(o,0,s,u)){var c=F(n)||o.playerStartPositionTicks,d="Remote"===o.item.LocationType&&!a;return void x(n,c,{EnableDirectPlay:!1,EnableDirectStream:d,AllowVideoStreamCopy:d,AllowAudioStreamCopy:!u&&!s&&null})}}l.A.trigger(r,"playbackerror",[i]),Oe.call(n,e,".".concat(i))}function Oe(e,t){var n=this;if(!N(n).isChangingStream){we(n);var i=r.getPlayerState(n),a=N(n),s=a.streamInfo,u=t&&"string"==typeof t,c=r._playNextAfterEnded&&!u?r._playQueueManager.getNextItemInfo(): null,d=c?c.item.MediaType: null,f={player:n,state:i,nextItem:c?c.item: null,nextMediaType:d};i.NextMediaType=d,s&&Ie(s.item)&&(!1===n.supportsProgress&&i.PlayState&&!i.PlayState.PositionTicks&&(i.PlayState.PositionTicks=s.item.RunTimeTicks),s.ended=!0,be(r,i,n,!0,s.item.ServerId,"reportPlaybackStopped")),i.NextItem=f.nextItem,c||r._playQueueManager.reset(),l.A.trigger(n,"playbackstop",[i]),l.A.trigger(r,"playbackstop",[f]);var p=c&&c.item.playOptions||{fullscreen:!0};(c?ue(c.item,p):null)!==n&&(a.streamInfo=null,Y(n),m(n)),u?De(0,"PlaybackError"+t):c&&C.A.getApiClient(c.item.ServerId).getCurrentUser().then((function(e){(e.Configuration.EnableNextEpisodeAutoPlay||d!==o.z.Video)&&r.nextTrack()}))}}function Be(e){ve(e)&&(l.A.off(e,"stopped",Oe),l.A.on(e,"stopped",Oe))}function qe(){Ze(this,"timeupdate")}function He(){Ze(this,"pause")}function Ge(){Ze(this,"unpause")}function We(){Ze(this,"volumechange")}function Ye(){Ze(this,"repeatmodechange")}function Qe(){Ze(this,"shufflequeuemodechange")}function Ke(){Ze(this,"playlistitemmove",!0)}function Xe(){Ze(this,"playlistitemremove",!0)}function $e(){Ze(this,"playlistitemadd",!0)}function Je(e){i.push(e),i.sort((function(e,t){return(e.priority||0)-(t.priority||0)})),!1!==e.isLocalPlayer&&(e.isLocalPlayer=!0),e.currentState={},e.getVolume&&e.setVolume||function(e){e.getVolume=function(){return e.volume()},e.setVolume=function(t){return e.volume(t)}}(e),ve(e)?(l.A.on(e,"error",Ee),l.A.on(e,"timeupdate",qe),l.A.on(e,"pause",He),l.A.on(e,"unpause",Ge),l.A.on(e,"volumechange",We),l.A.on(e,"repeatmodechange",Ye),l.A.on(e,"shufflequeuemodechange",Qe),l.A.on(e,"playlistitemmove",Ke),l.A.on(e,"playlistitemremove",Xe),l.A.on(e,"playlistitemadd",$e)):e.isLocalPlayer&&(l.A.on(e,"itemstarted",Te),l.A.on(e,"itemstopped",Ce),l.A.on(e,"timeupdate",qe),l.A.on(e,"pause",He),l.A.on(e,"unpause",Ge),l.A.on(e,"volumechange",We),l.A.on(e,"repeatmodechange",Ye),l.A.on(e,"shufflequeuemodechange",Qe),l.A.on(e,"playlistitemmove",Ke),l.A.on(e,"playlistitemremove",Xe),l.A.on(e,"playlistitemadd",$e)),e.isLocalPlayer&&function(e){s.A.isEnabled?s.A.on("change",(function(){l.A.trigger(e,"fullscreenchange")})):document.addEventListener("webkitfullscreenchange",(function(){l.A.trigger(e,"fullscreenchange")}),!1)}(e),Be(e)}function Ze(e,t,n){if(!e)throw new Error("player cannot be null");var i=r.getPlayerState(e);if(i.NowPlayingItem){var o=i.NowPlayingItem.ServerId,a=N(e).streamInfo;null!=a&&a.started&&!a.ended&&be(r,i,e,n,o,"reportPlaybackProgress",t),null!=a&&a.liveStreamId&&(new Date).getTime()-(a.lastMediaInfoQuery||0)>=6e5&&function(e,t,n,r,i){console.debug("getLiveStreamMediaInfo"),t.lastMediaInfoQuery=(new Date).getTime(),C.A.getApiClient(i).getLiveStreamMediaInfo(r).then((function(t){n.MediaStreams=t.MediaStreams,l.A.trigger(e,"mediastreamschange")}),(function(){}))}(e,a,r.currentMediaSource(e),a.liveStreamId,o)}}r.getPlaybackInfo=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ue(e,t),o=C.A.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var a=g(C.A.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){var s={maxBitrate:a,startPosition:n,isPlayback: null,audioStreamIndex:t.audioStreamIndex,subtitleStreamIndex:t.subtitleStreamIndex,startIndex: null,enableDirectPlay: null,enableDirectStream: null,allowVideoStreamCopy: null,allowAudioStreamCopy: null};return le(i,o,r,e,t.mediaSourceId,s).then((function(t){return te(o,e.MediaType,e,t,n,i)}))}))}))},r.getPlaybackMediaSources=function(e,t){var n=(t=t||{}).startPositionTicks||0,r=t.mediaType||e.MediaType,i=ue(e,t,!0),o=C.A.getApiClient(e.ServerId);return o.getEndpointInfo().then((function(){var t=g(C.A.getApiClient(e.ServerId),r);return i.getDeviceProfile(e).then((function(r){return _e(i,o,e,r,null,null,{maxBitrate:t,startPosition:n,isPlayback:!0,audioStreamIndex: null,subtitleStreamIndex: null,enableDirectPlay: null,enableDirectStream: null,allowVideoStreamCopy: null,allowAudioStreamCopy: null}).then((function(e){return e.MediaSources}))}))}))},r.getItemFromPlaylistItemId=function(e){for(var t,n,i=r._playQueueManager.getPlaylist(),o=0,a=i.length;o<a;o++)if(i[o].PlaylistItemId===e){t=i[o],n=o;break}return{Item:t,Index:n}},r.setCurrentPlaylistItem=function(e,t){if((t=t||r._currentPlayer)&&!ve(t))return t.setCurrentPlaylistItem(e);var n=r.getItemFromPlaylistItemId(e);if(n.Item){var i=n.Item.playOptions||{fullscreen:!0};B(n.Item,i,(function(){V(n.Item.PlaylistItemId,n.Index)}))}},r.removeFromPlaylist=function(e,t){if(!e)throw new Error("Invalid playlistItemIds");if((t=t||r._currentPlayer)&&!ve(t))return t.removeFromPlaylist(e);var n=r._playQueueManager.removeFromPlaylist(e);if("empty"===n.result)return r.stop(t);var i=n.isCurrentIndex;return l.A.trigger(t,"playlistitemremove",[{playlistItemIds:e}]),i?r.setCurrentPlaylistItem(r._playQueueManager.getPlaylist()[0].PlaylistItemId,t):Promise.resolve()},r.movePlaylistItem=function(e,t,n){if((n=n||r._currentPlayer)&&!ve(n))return n.movePlaylistItem(e,t);var i=r._playQueueManager.movePlaylistItem(e,t);"noop"!==i.result&&l.A.trigger(n,"playlistitemmove",[{playlistItemId:i.playlistItemId,newIndex:i.newIndex}])},r.getCurrentPlaylistIndex=function(e){return(e=e||r._currentPlayer)&&!ve(e)?e.getCurrentPlaylistIndex():r._playQueueManager.getCurrentPlaylistIndex()},r.getCurrentPlaylistItemId=function(e){return(e=e||r._currentPlayer)&&!ve(e)?e.getCurrentPlaylistItemId():r._playQueueManager.getCurrentPlaylistItemId()},r.channelUp=function(e){return e=e||r._currentPlayer,r.nextTrack(e)},r.channelDown=function(e){return e=e||r._currentPlayer,r.previousTrack(e)},r.nextTrack=function(e){if((e=e||r._currentPlayer)&&!ve(e))return e.nextTrack();var t=r._playQueueManager.getNextItemInfo();if(t){console.debug("playing next track");var n=t.item.playOptions||{fullscreen:!0};B(t.item,n,(function(){V(t.item.PlaylistItemId,t.index)}),ce(e))}},r.previousTrack=function(e){if((e=e||r._currentPlayer)&&!ve(e))return e.previousTrack();var t=r.getCurrentPlaylistIndex(e)-1;if(t>=0){var n=r._playQueueManager.getPlaylist()[t];if(n){var i=n.playOptions||{fullscreen:!0};i.startPositionTicks=0,B(n,i,(function(){V(n.PlaylistItemId,t)}),ce(e))}}},r.queue=function(e){return de(e,"",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},r.queueNext=function(e){return de(e,"next",arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer)},l.A.on(f.X,"registered",(function(e,t){t.type===L.Q.MediaPlayer&&Je(t)})),f.X.ofType(L.Q.MediaPlayer).forEach(Je),r.onAppClose=function(){var e=this._currentPlayer;e&&this.isPlaying(e)&&(this._playNextAfterEnded=!1,Oe.call(e))},r.playbackStartTime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!ve(e)&&!e.isLocalPlayer)return e.playbackStartTime();var t=N(e).streamInfo;return t?t.playbackStartTimeTicks: null},T.g.supports("remotecontrol")&&Promise.resolve().then(n.bind(n,10736)).then((function(e){var t=e.default;l.A.on(t,"ServerShuttingDown",r.setDefaultPlayerActive.bind(r)),l.A.on(t,"ServerRestarting",r.setDefaultPlayerActive.bind(r))})),function(e){new Q(e)}(r),J.A.tv||J.A.xboxOne||J.A.ps4||(this._skipSegment=function(e){return new ne(e)}(r))},t=[{key: "getCurrentPlayer",value:function(){return this._currentPlayer}},{key: "currentTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!e||ve(e)||e.isLocalPlayer?this.getCurrentTicks(e)/1e4:e.currentTime()}},{key: "getNextItem",value:function(){return this._playQueueManager.getNextItemInfo()}},{key: "nextItem",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(t&&!ve(t))return t.nextItem();var n=this._playQueueManager.getNextItemInfo();if(null===(e=n)||void 0===e||!e.item)return Promise.reject();var r=C.A.getApiClient(n.item.ServerId);return r.getItem(r.getCurrentUserId(),n.item.Id)}},{key: "canQueue",value:function(e){return"MusicAlbum"===e.Type||"MusicArtist"===e.Type||"MusicGenre"===e.Type?this.canQueueMediaType("Audio"):this.canQueueMediaType(e.MediaType)}},{key: "canQueueMediaType",value:function(e){return!!this._currentPlayer&&this._currentPlayer.canPlayMediaType(e)}},{key: "isMuted",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return!!e&&e.isMuted()}},{key: "setMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&t.setMute(e)}},{key: "toggleMute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;t&&(t.toggleMute?t.toggleMute():t.setMute(!t.isMuted()))}},{key: "toggleDisplayMirroring",value:function(){this.enableDisplayMirroring(!this.enableDisplayMirroring())}},{key: "enableDisplayMirroring",value:function(e){if(null==e)return"0"!==(c.A.get("displaymirror")||"");var t=e?"1": "0";c.A.set("displaymirror",t)}},{key: "nextChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e),r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks>n}))[0];r?this.seek(r.StartPositionTicks,e):this.nextTrack(e)}},{key: "previousChapter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer,t=this.currentItem(e),n=this.getCurrentTicks(e);n-=1e8,0===this.getCurrentPlaylistIndex(e)&&(n=Math.max(n,0));var r=(t.Chapters||[]).filter((function(e){return e.StartPositionTicks<=n}));r.length?this.seek(r[r.length-1].StartPositionTicks,e):this.previousTrack(e)}},{key: "fastForward",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.fastForward){var t=1e4*k.skipForwardLength();this.seekRelative(t,e)}else e.fastForward(k.skipForwardLength())}},{key: "rewind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(null==e.rewind){var t=0-1e4*k.skipBackLength();this.seekRelative(t,e)}else e.rewind(k.skipBackLength())}},{key: "seekPercent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=this.duration(t)||0;n*=e/=100,this.seek(parseInt(n,10),t)}},{key: "seekMs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer,n=1e4*e;this.seek(n,t)}},{key: "playTrailers",value:(r=fe(oe().mark((function e(t){var n,r,i,o;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(r=this._currentPlayer)||!r.playTrailers){e.next=3;break}return e.abrupt("return",r.playTrailers(t));case 3:if(i=C.A.getApiClient(t.ServerId),!t.LocalTrailerCount){e.next=8;break}return e.next=7,i.getLocalTrailers(i.getCurrentUserId(),t.Id);case 7:o=e.sent;case 8:if(null!==(n=o)&&void 0!==n&&n.length||(o=(t.RemoteTrailers||[]).map((function(e){return{Name:e.Name||t.Name+" Trailer",Url:e.Url,MediaType: "Video",Type: "Trailer",ServerId:i.serverId()}}))),!o.length){e.next=11;break}return e.abrupt("return",this.play({items:o}));case 11:return e.abrupt("return",Promise.reject());case 12:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key: "getSubtitleUrl",value:function(e,t){var n=C.A.getApiClient(t);return e.IsExternalUrl?e.DeliveryUrl:n.getUrl(e.DeliveryUrl)}},{key: "stop",value:function(e){return(e=e||this._currentPlayer)?(ve(e)&&(this._playNextAfterEnded=!1),e.stop(!0,!0)):Promise.resolve()}},{key: "getBufferedRanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getBufferedRanges?e.getBufferedRanges(): []}},{key: "playPause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.playPause?e.playPause():e.paused()?this.unpause(e):this.pause(e)}},{key: "paused",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e)return e.paused()}},{key: "pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.pause()}},{key: "unpause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;e&&e.unpause()}},{key: "setPlaybackRate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.setPlaybackRate&&(t.setPlaybackRate(e),sessionStorage.setItem("playbackRateSpeed",e))}},{key: "getPlaybackRate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return null!=e&&e.getPlaybackRate?e.getPlaybackRate(): null}},{key: "instantMix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(null!=t&&t.instantMix)return t.instantMix(e);var n=C.A.getApiClient(e.ServerId),r={UserId:n.getCurrentUserId(),Limit: 200},i=this;n.getInstantMixFromItem(e.Id,r).then((function(e){i.play({items:e.Items})}))}},{key: "shuffle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;return null!=t&&t.shuffle?t.shuffle(e):this.play({items: [e],shuffle:!0})}},{key: "audioTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.audioTracks){var t=e.audioTracks();if(t)return t.sort(d.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Audio"===e.Type})).sort(d.Ay.sortTracks)}},{key: "subtitleTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e.subtitleTracks){var t=e.subtitleTracks();if(t)return t.sort(d.Ay.sortTracks)}var n=this.currentMediaSource(e);return((null==n?void 0:n.MediaStreams)||[]).filter((function(e){return"Subtitle"===e.Type})).sort(d.Ay.sortTracks)}},{key: "getSupportedCommands",value:function(e){if((e=e||this._currentPlayer||{isLocalPlayer:!0}).isLocalPlayer){var t=["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","PlayMediaSource","PlayTrailers"];return T.g.supports("fullscreenchange")&&t.push("ToggleFullscreen"),e.supports&&(e.supports("PictureInPicture")&&t.push("PictureInPicture"),e.supports("AirPlay")&&t.push("AirPlay"),e.supports("SetBrightness")&&t.push("SetBrightness"),e.supports("SetAspectRatio")&&t.push("SetAspectRatio"),e.supports("PlaybackRate")&&t.push("PlaybackRate")),t}var n=this.getPlayerInfo();return n?n.supportedCommands: []}},{key: "setRepeatMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!ve(t))return t.setRepeatMode(e);this._playQueueManager.setRepeatMode(e),l.A.trigger(t,"repeatmodechange")}},{key: "getRepeatMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!ve(e)?e.getRepeatMode():this._playQueueManager.getRepeatMode()}},{key: "setQueueShuffleMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!ve(t))return t.setQueueShuffleMode(e);this._playQueueManager.setShuffleMode(e),l.A.trigger(t,"shufflequeuemodechange")}},{key: "getQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;return e&&!ve(e)?e.getQueueShuffleMode():this._playQueueManager.getShuffleMode()}},{key: "toggleQueueShuffleMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currentPlayer;if(e&&!ve(e))switch(e.getQueueShuffleMode()){case"Shuffle":e.setQueueShuffleMode("Sorted");break;case"Sorted":e.setQueueShuffleMode("Shuffle");break;default:throw new TypeError("current value for shufflequeue is invalid")}else this._playQueueManager.toggleShuffleMode();l.A.trigger(e,"shufflequeuemodechange")}},{key: "clearQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;if(t&&!ve(t))return t.clearQueue(e);this._playQueueManager.clearPlaylist(e),l.A.trigger(t,"playlistitemremove")}},{key: "trySetActiveDeviceName",value:function(e){e=we(e);var t=this;t.getTargets().then((function(n){var r=n.filter((function(t){return we(t.name)===e}))[0];r&&t.trySetActivePlayer(r.playerName,r)}))}},{key: "displayContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._currentPlayer;null!=t&&t.displayContent&&t.displayContent(e)}},{key: "beginPlayerUpdates",value:function(e){e.beginPlayerUpdates&&e.beginPlayerUpdates()}},{key: "endPlayerUpdates",value:function(e){e.endPlayerUpdates&&e.endPlayerUpdates()}},{key: "setDefaultPlayerActive",value:function(){this.setActivePlayer("localplayer")}},{key: "removeActivePlayer",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.name)===e&&this.setDefaultPlayerActive()}},{key: "removeActiveTarget",value:function(e){var t=this.getPlayerInfo();(null==t?void 0:t.id)===e&&this.setDefaultPlayerActive()}},{key: "sendCommand",value:function(e,t){switch(console.debug("MediaController received command: "+e.Name),e.Name){case"SetRepeatMode":this.setRepeatMode(e.Arguments.RepeatMode,t);break;case"SetShuffleQueue":this.setQueueShuffleMode(e.Arguments.ShuffleMode,t);break;case"VolumeUp":this.volumeUp(t);break;case"VolumeDown":this.volumeDown(t);break;case"Mute":this.setMute(!0,t);break;case"Unmute":this.setMute(!1,t);break;case"ToggleMute":this.toggleMute(t);break;case"SetVolume":this.setVolume(e.Arguments.Volume,t);break;case"SetAspectRatio":this.setAspectRatio(e.Arguments.AspectRatio,t);break;case"PlaybackRate":this.setPlaybackRate(e.Arguments.PlaybackRate,t);break;case"SetBrightness":this.setBrightness(e.Arguments.Brightness,t);break;case"SetAudioStreamIndex":this.setAudioStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetSubtitleStreamIndex":this.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10),t);break;case"SetMaxStreamingBitrate":this.setMaxStreamingBitrate(parseInt(e.Arguments.Bitrate,10),t);break;case"ToggleFullscreen":this.toggleFullscreen(t);break;default:t.sendCommand&&t.sendCommand(e)}}}],t&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),qe=new Be;window.addEventListener("beforeunload",(function(){try{qe.onAppClose()}catch(e){console.error("error in onAppClose: "+e)}}))},86663:function(e,t,n){"use strict";n.r(t),n.d(t,{show:function(){return y}}),n(14382),n(69703),n(84734),n(44962),n(86584),n(78557),n(90076),n(83994),n(82367);var r=n(44797),i=n(34789),o=n(8566),a=n(47750),s=n(38829),l=n(70267),u=n(5898),c=n(22622),d=n(83237),f=(n(77157),n(10353),n(48080)),p=n(79754);function h(e){var t=e.deviceType;switch(!t&&e.isLocalPlayer&&(t=i.A.tv?"tv":i.A.mobile?"smartphone": "desktop"),t||(t="tv"),t){case"smartphone":return"smartphone";case"tablet":return"tablet";case"tv":default:return"tv";case"cast":return"cast";case"desktop":return"computer"}}function y(e){var t=a.f.getPlayerInfo();if(!t||t.isLocalPlayer){var r=t?t.id:null;o.Ay.show(),a.f.getTargets().then((function(t){var l=t.map((function(e){var t,n=e.name;return e.appName&&e.appName!==e.name&&(n+=" - "+e.appName),{name:n,id:e.id,selected:r===e.id,secondaryText:(t=e,t.user?t.user.Name:null),icon:h(e)}}));n.e(62882).then(n.bind(n,62882)).then((function(n){o.Ay.hide();var r={title:u.Ay.translate("HeaderPlayOn"),items:l,positionTo:e,resolveOnClick:!0,border:!0};!i.A.chrome&&!i.A.edgeChromium||c.g.supports("castmenuhashchange")||(r.enableHistory=!1),!!s.X.plugins.find((function(e){return"chromecast"===e.id}))||(r.text="(".concat(u.Ay.translate("GoogleCastUnsupported"),")")),n.show(r).then((function(e){var n=t.filter((function(t){return t.id===e}))[0];a.f.trySetActivePlayer(n.playerName,n)})).catch((function(){}))})).catch((function(e){console.error("[playerSelectionMenu] failed to import action sheet",e)}))})).catch((function(e){console.error("[playerSelectionMenu] failed to get playback targets",e)}))}else!function(e){var t="",n=p.default.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration: 160,exitAnimationDuration: 160,autoFocus:!1});n.classList.add("promptDialog");var r=e.deviceName||e.name;t+='<div class="promptDialogContent" style="padding:1.5em;">',t+='<h2 style="margin-top:.5em;">',t+=r,t+="</h2>",t+="<div>",-1!==e.supportedCommands.indexOf("DisplayContent")&&(t+='<label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkMirror"'+(a.f.enableDisplayMirroring()?" checked": "")+"/>",t+="<span>"+u.Ay.translate("EnableDisplayMirroring")+"</span>",t+="</label>"),t+="</div>",t+='<div><label class="checkboxContainer">',t+='<input type="checkbox" is="emby-checkbox" class="chkAutoCast"'+((0,d.Ol)()?" checked": "")+"/>",t+="<span>"+u.Ay.translate("EnableAutoCast")+"</span>",t+="</label></div>",t+='<div style="margin-top:1em;display:flex;justify-content: flex-end;">',t+='<button is="emby-button" type="button" class="button-flat btnRemoteControl promptDialogButton">'+u.Ay.translate("HeaderRemoteControl")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnDisconnect promptDialogButton ">'+u.Ay.translate("Disconnect")+"</button>",t+='<button is="emby-button" type="button" class="button-flat btnCancel promptDialogButton">'+u.Ay.translate("ButtonCancel")+"</button>",t+="</div>",t+="</div>",n.innerHTML=t;var i=n.querySelector(".chkMirror");i&&i.addEventListener("change",m);var o=n.querySelector(".chkAutoCast");o&&o.addEventListener("change",v);var s="",c=n.querySelector(".btnRemoteControl");c&&c.addEventListener("click",(function(){s="nowplaying",p.default.close(n)})),n.querySelector(".btnDisconnect").addEventListener("click",(function(){s="disconnectFromPlayer",p.default.close(n)})),n.querySelector(".btnCancel").addEventListener("click",(function(){p.default.close(n)})),p.default.open(n).then((function(){if("nowplaying"===s)return l.appRouter.showNowPlaying();"disconnectFromPlayer"===s&&function(e){if(-1!==a.f.getSupportedCommands().indexOf("EndSession")){var t=[];t.push({name:u.Ay.translate("Yes"),id: "yes"}),t.push({name:u.Ay.translate("No"),id: "no"}),f.A.show({buttons:t,text:u.Ay.translate("ConfirmEndPlayerSession",e)}).then((function(e){switch(e){case"yes":a.f.getCurrentPlayer().endSession(),a.f.setDefaultPlayerActive();break;case"no":a.f.setDefaultPlayerActive()}})).catch((function(){}))}else a.f.setDefaultPlayerActive()}(r)})).catch((function(){}))}(t)}function m(){a.f.enableDisplayMirroring(this.checked)}function v(){(0,d.sS)(this.checked)}r.A.on(a.f,"pairing",(function(){o.Ay.show()})),r.A.on(a.f,"paired",(function(){o.Ay.hide()})),r.A.on(a.f,"pairerror",(function(){o.Ay.hide()})),t.default={show:y}},38829:function(e,t,n){"use strict";n.d(t,{X:function(){return L}}),n(29305),n(32733),n(51770),n(84701),n(81678),n(2623),n(14382),n(76281),n(44962),n(17731),n(87324),n(89336),n(26448),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(99425),n(83994),n(90580),n(23630),n(82367);var r=n(44797),i=n(5898),o=n(8566),a=n(90381),s=n(47750),l=n(22622),u=n(70267),c=n(38490),d=n(50764),f=n(40532),p=n(89100),h=n(86191);function y(e){return y="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},y(e)}function m(){m=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==y(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?v:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(y(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),u(k,l,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function v(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){v(o,r,i,a,s,"next",e)}function s(e){v(o,r,i,a,s,"throw",e)}a(void 0)}))}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function w(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function x(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var S=(new Date).getTime(),A=new WeakSet,P=function(){return e=function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,A),t=this,r=[],(n=w(n="pluginsList"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r},t=[{key: "plugins",get:function(){return this.pluginsList}},{key: "loadPlugin",value:(y=g(m().mark((function e(t){var y,v,g,b,w;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t){e.next=23;break}if(!(t in window)){e.next=16;break}return console.log("Loading plugin (via window): ".concat(t)),e.next=5,window[t];case 5:if("function"==typeof(v=e.sent)){e.next=8;break}throw new TypeError("Plugin definitions in window have to be an (async) function returning the plugin class");case 8:return e.next=10,v();case 10:if("function"==typeof(g=e.sent)){e.next=13;break}throw new TypeError("Plugin definition doesn't return a class for '".concat(t,"'"));case 13:y=new g({events:r.A,loading:o.Ay,appSettings:a.A,playbackManager:s.f,globalize:i.Ay,appHost:l.g,appRouter:u.appRouter,inputManager:c,toast:d.A,confirm:f.A,dashboard:p,ServerConnections:h.A}),e.next=21;break;case 16:return console.debug("Loading plugin (via dynamic import): ".concat(t)),e.next=19,n(11167)("./".concat(t));case 19:b=e.sent,y=new b.default;case 21:e.next=32;break;case 23:if(!t.then){e.next=31;break}return console.debug("Loading plugin (via promise/async function)"),e.next=27,t;case 27:w=e.sent,y=new w.default,e.next=32;break;case 31:throw new TypeError("Plugins have to be a Promise that resolves to a plugin builder function");case 32:return e.abrupt("return",x(A,this,T).call(this,t,y));case 33:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key: "ofType",value:function(e){return this.pluginsList.filter((function(t){return t.type===e}))}},{key: "firstOfType",value:function(e){return this.ofType(e).sort((function(e,t){return(e.priority||0)-(t.priority||0)}))[0]}},{key: "mapPath",value:function(e,t,n){"string"==typeof e&&(e=this.pluginsList.filter((function(t){return(t.id||t.packageName)===e}))[0]);var r=e.baseUrl+"/"+t;return n&&(r+=r.includes("?")?"&": "?",r+="v="+S),r}}],t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,y}();function k(e){var t=e.getTranslations?e.getTranslations(): [];return i.Ay.loadStrings({name:e.id||e.packageName,strings:t})}function I(e){return j.apply(this,arguments)}function j(){return(j=g(m().mark((function e(t){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x(A,this,E).call(this,t),"skin"!==t.type){e.next=5;break}return e.abrupt("return",t);case 5:return e.abrupt("return",x(A,this,k).call(this,t));case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function T(e,t){return C.apply(this,arguments)}function C(){return(C=g(m().mark((function e(t,n){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t){e.next=7;break}if(!this.plugins.filter((function(e){return e.id===n.id}))[0]){e.next=4;break}return e.abrupt("return",t);case 4:n.installUrl=t,r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n.baseUrl=t.substring(0,r);case 7:return e.abrupt("return",x(A,this,I).call(this,n));case 8:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function E(e){this.pluginsList.push(e),r.A.trigger(this,"registered",[e])}var L=new P},70267:function(e,t,n){"use strict";n.r(t),n.d(t,{appRouter:function(){return I},isLyricsPage:function(){return j}}),n(29305),n(32733),n(51770),n(84701),n(81678),n(2623),n(24776),n(76281),n(84734),n(44962),n(17731),n(87324),n(89336),n(4754),n(10849),n(70389),n(94),n(36947),n(26437),n(52697),n(78557),n(90076),n(95021),n(50987),n(83994),n(93062),n(97456),n(64062),n(90580),n(23630),n(82367);var r=n(65369),i=n(89166),o=n(5898),a=n(23648),s=n(8566),l=n(86191),u=n(41177),c=n(53678),d=n(66911),f=n(75384),p=n(72524);function h(e){return h="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},h(e)}function y(){y=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==h(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=f;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?v:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(h(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),u(k,l,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){m(o,r,i,a,s,"next",e)}function s(e){m(o,r,i,a,s,"throw",e)}a(void 0)}))}}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function b(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}var x=["/home.html","/login.html","/selectserver.html"],S=["/addserver.html","/selectserver.html","/login.html","/forgotpassword.html","/forgotpasswordpin.html","/wizardremoteaccess.html","/wizardfinish.html","/wizardlibrary.html","/wizardsettings.html","/wizardstart.html","/wizarduser.html"],A=new WeakSet,P=function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,A),b(this,"forcedLogoutMsg",void 0),b(this,"msgTimeout",void 0),b(this,"promiseShow",void 0),b(this,"resolveOnNextShow",void 0),document.addEventListener("viewshow",(function(){return t.onViewShow()})),this.lastPath=p.b.location.pathname+p.b.location.search,this.listen(),this.baseRoute=window.location.href.split("?")[0].replace(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(A,this,k).call(this),""),this.baseRoute=this.baseRoute.split("#")[0],this.baseRoute.endsWith("/")&&!this.baseRoute.endsWith("://")&&(this.baseRoute=this.baseRoute.substring(0,this.baseRoute.length-1))},t=[{key: "ready",value:function(){return this.promiseShow||Promise.resolve()}},{key: "back",value:(h=v(y().mark((function e(){var t=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.promiseShow){e.next=3;break}return e.next=3,this.promiseShow;case 3:return this.promiseShow=new Promise((function(e){var n=p.b.listen((function(){n(),t.promiseShow=null,e()}));p.b.back()})),e.abrupt("return",this.promiseShow);case 5:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key: "show",value:(n=v(y().mark((function e(t,n){var r=this;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.promiseShow){e.next=3;break}return e.next=3,this.promiseShow;case 3:if(t.startsWith("#")&&(t=t.substring(1)),t.startsWith("!")&&(t=t.substring(1)),0!==t.indexOf("/")&&-1===t.indexOf("://")&&(t="/"+t),t=t.replace(this.baseUrl(),""),p.b.location.pathname!==t||"/home.html"===t){e.next=10;break}return s.Ay.hide(),e.abrupt("return",Promise.resolve());case 10:return this.promiseShow=new Promise((function(e){r.resolveOnNextShow=e,setTimeout((function(){return p.b.push(t,n)}),0)})),e.abrupt("return",this.promiseShow);case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key: "listen",value:function(){var e=this;p.b.listen((function(t){var n=t.location,r=n.pathname.replace(/^!/,"")+n.search;r===e.lastPath&&(console.debug("[appRouter] path did not change, resolving promise"),e.onViewShow()),e.lastPath=r}))}},{key: "baseUrl",value:function(){return this.baseRoute}},{key: "canGoBack",value:function(){var e=p.b.location.pathname;return!(!document.querySelector(".dialogContainer")&&x.includes(e))&&window.history.length>1}},{key: "showItem",value:function(e,t,n){var r=this;if("string"==typeof e){var i=t?l.A.getApiClient(t):l.A.currentApiClient(),o=(0,f.C)(i),a=i.getCurrentUserId();c.q.fetchQuery((0,d.I)(o,a,e)).then((function(e){r.showItem(e,n)})).catch((function(e){console.error("[AppRouter] Failed to fetch item",e)}))}else{2===arguments.length&&(n=arguments[1]);var s=this.getRouteUrl(e,n);this.show(s)}}},{key: "setTransparency",value:function(e){console.warn("Deprecated! Use Dashboard.setBackdropTransparency"),(0,i.FB)(e)}},{key: "onViewShow",value:function(){var e=this.resolveOnNextShow;e&&(this.promiseShow=null,this.resolveOnNextShow=null,e())}},{key: "onForcedLogoutMessageTimeout",value:function(){var e=this.forcedLogoutMsg;this.forcedLogoutMsg=null,e&&(0,u.A)(e)}},{key: "showForcedLogoutMessage",value:function(e){this.forcedLogoutMsg=e,this.msgTimeout&&clearTimeout(this.msgTimeout),this.msgTimeout=setTimeout(this.onForcedLogoutMessageTimeout,100)}},{key: "onRequestFail",value:function(e,t){403===t.status&&"ParentalControl"===t.errorCode&&(S.includes(p.b.location.pathname)||(I.showForcedLogoutMessage(o.Ay.translate("AccessRestrictedTryAgainLater")),I.showLocalLogin(this.serverId())))}},{key: "getRouteUrl",value:function(e,t){if(!e)throw new Error("item cannot be null");if(e.url)return e.url;var n,i=t?t.context: null,o=e.Id||e.ItemId;t||(t={});var s=e.Type||(t?t.itemType:null),l=e.ServerId||t.serverId;if("settings"===e)return"#/mypreferencesmenu.html";if("wizard"===e)return"#/wizardstart.html";if("manageserver"===e)return"#/dashboard";if("recordedtv"===e)return"#/livetv.html?tab=3&serverId="+t.serverId;if("nextup"===e)return"#/list.html?type=nextup&serverId="+t.serverId;if("list"===e){var u="#/list.html?serverId="+t.serverId+"&type="+t.itemTypes;return t.isFavorite&&(u+="&IsFavorite=true"),t.isAiring&&(u+="&IsAiring=true"),t.isMovie&&(u+="&IsMovie=true"),t.isSeries&&(u+="&IsSeries=true&IsMovie=false&IsNews=false"),t.isSports&&(u+="&IsSports=true"),t.isKids&&(u+="&IsKids=true"),t.isNews&&(u+="&IsNews=true"),u}if("livetv"===e)return"programs"===t.section?"#/livetv.html?tab=0&serverId="+t.serverId: "guide"===t.section?"#/livetv.html?tab=1&serverId="+t.serverId: "movies"===t.section?"#/list.html?type=Programs&IsMovie=true&serverId="+t.serverId: "shows"===t.section?"#/list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId="+t.serverId: "sports"===t.section?"#/list.html?type=Programs&IsSports=true&serverId="+t.serverId: "kids"===t.section?"#/list.html?type=Programs&IsKids=true&serverId="+t.serverId: "news"===t.section?"#/list.html?type=Programs&IsNews=true&serverId="+t.serverId: "onnow"===t.section?"#/list.html?type=Programs&IsAiring=true&serverId="+t.serverId: "channels"===t.section?"#/livetv.html?tab=2&serverId="+t.serverId: "dvrschedule"===t.section?"#/livetv.html?tab=4&serverId="+t.serverId: "seriesrecording"===t.section?"#/livetv.html?tab=5&serverId="+t.serverId: "#/livetv.html?serverId="+t.serverId;if("SeriesTimer"==s)return"#/details?seriesTimerId="+o+"&serverId="+l;if(e.CollectionType==r.X.Livetv)return"#/livetv.html?collectionType=".concat(e.CollectionType);if("Genre"===e.Type)return n="#/list.html?genreId="+e.Id+"&serverId="+l,"livetv"===i&&(n+="&type=Programs"),t.parentId&&(n+="&parentId="+t.parentId),n;if("MusicGenre"===e.Type)return n="#/list.html?musicGenreId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("Studio"===e.Type)return n="#/list.html?studioId="+e.Id+"&serverId="+l,t.parentId&&(n+="&parentId="+t.parentId),n;if("tag"===e)return n="#/list.html?type=tag&tag=".concat(encodeURIComponent(t.tag),"&serverId=").concat(l),t.parentId&&(n+="&parentId="+t.parentId),n;if("folders"!==i&&!a.Ay.isLocalItem(e)){if(e.CollectionType==r.X.Movies)return n="#/movies.html?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;if(e.CollectionType==r.X.Tvshows)return n="#/tv.html?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),t&&"latest"===t.section&&(n+="&tab=1"),n;var c;if(e.CollectionType==r.X.Music)return n="#/music.html?topParentId=".concat(e.Id,"&collectionType=").concat(e.CollectionType),"latest"===(null===(c=t)||void 0===c?void 0:c.section)&&(n+="&tab=1"),n;if("experimental"===localStorage.getItem("layout")&&e.CollectionType==r.X.Homevideos)return"#/homevideos.html?topParentId="+e.Id}return["Playlist","TvChannel","Program","BoxSet","MusicAlbum","MusicGenre","Person","Recording","MusicArtist"].indexOf(s)>=0?"#/details?id="+o+"&serverId="+l: "Series"==s||"Season"==s||"Episode"==s?"#/details?id="+o+(i?"&context="+i: "")+"&serverId="+l:e.IsFolder?o?"#/list.html?parentId="+o+"&serverId="+l: "#": "#/details?id="+o+"&serverId="+l}},{key: "showLocalLogin",value:function(e){return this.show("login.html?serverid="+e)}},{key: "showVideoOsd",value:function(){return this.show("video")}},{key: "showSelectServer",value:function(){return this.show("selectserver.html")}},{key: "showSettings",value:function(){return this.show("mypreferencesmenu.html")}},{key: "showNowPlaying",value:function(){return this.show("queue")}},{key: "showGuide",value:function(){return this.show("livetv.html?tab=1")}},{key: "goHome",value:function(){return this.show("home.html")}},{key: "showSearch",value:function(){return this.show("search.html")}},{key: "showLiveTV",value:function(){return this.show("livetv.html")}},{key: "showRecordedTV",value:function(){return this.show("livetv.html?tab=3")}},{key: "showFavorites",value:function(){return this.show("home.html?tab=1")}}],t&&g(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,h}();function k(){var e=window.location.pathname||"",t=e.lastIndexOf("/");return(e=-1!==t?e.substring(t): "/"+e)&&"/"!==e||(e="/index.html"),e}var I=new P,j=function(){return"/lyrics"===p.b.location.pathname.toLowerCase()};window.Emby=window.Emby||{},window.Emby.Page=I},93599:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(83994),n(82367);var r=n(47629),i=n(90381),o=n(46782);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 s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=270,c=1e-6,d="scrollBehavior"in document.documentElement.style,f=!1;try{var p=document.createElement("div"),h=Object.defineProperty({},"behavior",{get:function(){return f=!0,null}});p.scrollTo(h)}catch(e){}function y(e,t,n){return e<=t?t:e>=n?n:e}var m,v=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: "scrollLeft",get:function(){return window.pageXOffset},set:function(e){window.scroll(e,window.pageYOffset)}},{key: "scrollTop",get:function(){return window.pageYOffset},set:function(e){window.scroll(window.pageXOffset,e)}},{key: "scrollWidth",get:function(){return Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)}},{key: "scrollHeight",get:function(){return Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}},{key: "clientWidth",get:function(){return Math.min(document.documentElement.clientWidth,document.body.clientWidth)}},{key: "clientHeight",get:function(){return Math.min(document.documentElement.clientHeight,document.body.clientHeight)}},{key: "getAttribute",value:function(e){return document.body.getAttribute(e)}},{key: "getBoundingClientRect",value:function(){return{left: 0,top: 0,width:this.clientWidth,height:this.clientHeight}}},{key: "scrollTo",value:function(){window.scrollTo.apply(window,arguments)}}],t&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),g=new v,b={x: {nameScroll: "scrollWidth",nameClient: "clientWidth",nameStyle: "overflowX",nameScrollMode: "data-scroll-mode-x"},y: {nameScroll: "scrollHeight",nameClient: "clientHeight",nameStyle: "overflowY",nameScrollMode: "data-scroll-mode-y"}};function w(e,t){if(e)for(var n=t?b.y:b.x,r=e.parentElement;r&&r!==document.body;){if("custom"===r.getAttribute(n.nameScrollMode))return r;var i=window.getComputedStyle(r);if("fixed"===i.position)return r;var o=i[n.nameStyle];if("scroll"===o||"auto"===o&&r[n.nameScroll]>r[n.nameClient])return r;r=r.parentElement}return g}function x(e,t){var n={};return t?(n.scrollPos=e.scrollTop,n.scrollSize=e.scrollHeight,n.clientSize=e.clientHeight,n.mode=e.getAttribute(b.y.nameScrollMode)):(n.scrollPos=e.scrollLeft,n.scrollSize=e.scrollWidth,n.clientSize=e.clientWidth,n.mode=e.getAttribute(b.x.nameScrollMode)),n.custom="custom"===n.mode,n}function S(e,t,n){var r=t.getBoundingClientRect(),i=e.getBoundingClientRect();return n?e.scrollTop+r.top-i.top:e.scrollLeft+r.left-i.left}function A(e,t,n,r){var i,o,a,s,l,u,c=e.scrollSize-e.clientSize;if(r)i=t+(n-e.clientSize)/2;else{var d=(o=t,a=t+n-1,s=e.scrollPos,u=e.scrollPos+e.clientSize-1-a,(l=o-s)<0&&l<u?-l:u<0?u: 0);i=e.scrollPos-d}return y(Math.round(i),0,c)}function P(e,t){if("scrollTo"in e)if(f)e.scrollTo(t);else{var n=void 0!==t.left?t.left:e.scrollLeft,r=void 0!==t.top?t.top:e.scrollTop;e.scrollTo(n,r)}else"scrollLeft"in e&&(void 0!==t.left&&(e.scrollLeft=t.left),void 0!==t.top&&(e.scrollTop=t.top))}function k(e,t,n,r,i){var o=i?"smooth": "instant";e!==n?(e&&P(e,{left:t,behavior:o}),n&&P(n,{top:r,behavior:o})):e&&P(e,{left:t,top:r,behavior:o})}function I(){cancelAnimationFrame(m),m=void 0}function j(e,t,n,r,i){I(),i&&!d?function(e,t,n,r){var i,o=e?e.scrollLeft:t,a=n?n.scrollTop:r,s=t-o,l=r-a;Math.abs(s)<c&&Math.abs(l)<c||(m=requestAnimationFrame((function c(d){i=i||d;var f,p=Math.min(1,(d-i)/u);if(1===p)return I(),void k(e,t,n,r,!1);k(e,o+s*(p=(f=p)*(2-f)),n,a+l*p,!1),m=requestAnimationFrame(c)})))}(e,t,n,r):k(e,t,n,r,i)}function T(){return o.A.tv}function C(e,t){t=!!t;var n=!0,r=!0,i=e.offsetParent,o=i&&(!i.offsetParent||"fixed"===window.getComputedStyle(i).position);o&&(n=r=!1);var a=w(e,!1),s=w(e,!0),l=x(a,!1),u=x(s,!0);if(!(a===s&&(l.custom||u.custom)||l.custom&&u.custom)){var c,d=e.getBoundingClientRect(),f=0,p=0;l.custom?a=null:f=A(l,S(a,e,!1),d.width,n),u.custom?s=null:(p=A(u,S(s,e,!0),d.height,r),o&&d.bottom<0&&(p=0),p<((c=document.querySelector(".headerTop"))?c.clientHeight: 0)&&s===g&&(p=0)),j(a,f,s,p,t)}}T()&&r.Ay.addEventListener(window,"focusin",(function(e){setTimeout((function(){C(e.target,i.A.enableSmoothScroll())}),0)}),{capture:!0}),t.Ay={isEnabled:T,scrollTo:function(e,t,n){n=!!n;var r=w(null,!1),i=x(r,!1),o=x(r,!0);j(r,e=y(Math.round(e),0,i.scrollSize-i.clientSize),r,t=y(Math.round(t),0,o.scrollSize-o.clientSize),n)},scrollToElement:C}},50764:function(e,t,n){"use strict";var r;function i(e){"string"==typeof e&&(e={text:e});var t=document.createElement("div");t.classList.add("toast"),t.textContent=e.text,(r||((r=document.createElement("div")).classList.add("toastContainer"),document.body.appendChild(r)),r).appendChild(t),setTimeout((function(){t.classList.add("toastVisible"),function(e){setTimeout((function(){e.classList.add("toastHide"),function(e){setTimeout((function(){e.parentNode.removeChild(e)}),300)}(e)}),3300)}(t)}),300)}n.d(t,{A:function(){return i}})},64963:function(e,t,n){"use strict";n(76281),n(84734),n(78557),n(90076),n(95021),n(99425),n(93062),n(97747);var r,i,o=n(19119),a=n(89100),s=function(){return document.querySelector(".mainAnimatedPages")};function l(e,t){if(t.controllerFactory)return Promise.resolve();var n=e.getAttribute("data-controller");if(n){0===n.indexOf("__plugin/")&&(n=n.substring(9)),n=a.default.getPluginUrl(n);var r=ApiClient.getUrl("/web/"+n);return(0,o.W)(r).then((function(e){t.controllerFactory=e}))}return Promise.resolve()}function u(e,t,n){for(var r=0,i=e.length;r<i;r++)t!==r&&n!==r&&e[r].classList.add("hide")}function c(e,t){for(var n=0,r=e.length;n<r;n++)t!==n&&e[n].classList.add("hide")}function d(){console.debug("[viewContainer] resetting view cache"),f=[],p=[];var e=s();e&&(e.innerHTML=""),h=-1}var f=[],p=[],h=-1;d(),null===(r=s())||void 0===r||r.classList.remove("hide"),t.Ay={loadView:function(e){if(!e.cancel){var t=h,n=-1===t?null:f[t],r=t+1;r>=3&&(r=0);var o=e.url.includes("configurationpage"),a=function(e,t){var n=e.view;if(-1===n.indexOf('data-role="page"'))return n;var r=-1!==n.indexOf("<script"),i=function(e,t){t&&(e=e.replaceAll("\x3c!--<script","<script").replaceAll("<\/script>--\x3e","<\/script>"));var n=document.createElement("div");return n.innerHTML=e,n.querySelector('div[data-role="page"]')}(n,r);r&&(r=null!=i.querySelector("script"));var o=!1,a=!1,s=!1;return t&&(o=-1!=n.indexOf("jQuery")||-1!=n.indexOf("$(")||-1!=n.indexOf("$."),s=-1!=n.indexOf(".checked("),a=-1!=n.indexOf(".selectmenu(")),{elem:i,hasScript:r,hasjQuerySelect:a,hasjQueryChecked:s,hasjQuery:o}}(e,o),d=a.elem,y=f[r];y&&function(e){e.dispatchEvent(new CustomEvent("viewdestroy",{}))}(y);var m=d;"string"==typeof m&&((m=document.createElement("div")).innerHTML=d),m.classList.add("mainAnimatedPage");var v=s();if(!v)return void console.warn("[viewContainer] main animated pages element is not present");y?a.hasScript&&window.$?(v.removeChild(y),m=$(m).appendTo(v)[0]):v.replaceChild(m,y):a.hasScript&&window.$?m=$(m).appendTo(v)[0]:v.appendChild(m),e.type&&m.setAttribute("data-type",e.type);var g=[];return e.fullscreen&&g.push("fullscreen"),g.length&&m.setAttribute("data-properties",g.join(",")),f[r]=m,l(m,e).then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return i&&i(m,!1,e),u(f,r,t),h=r,p[r]=e.url,!e.cancel&&n&&c(f,r),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=m),m}))}},tryRestoreView:function(e){console.debug("[viewContainer] tryRestoreView",e);var t=e.url,n=p.indexOf(t);if(-1!==n){var r=f[n],o=r;if(o){if(e.cancel)return;var a=h,s=-1===a?null:f[a];return l(o,e).then((function(){return i&&i(o,!0,e),u(f,n,a),r.classList.remove("hide"),h=n,!e.cancel&&s&&c(f,n),window.$&&($.mobile=$.mobile||{},$.mobile.activePage=o),o}))}}return Promise.reject()},reset:d,setOnBeforeChange:function(e){i=e}}},62156:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(84734),n(44962),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(83994),n(93062),n(23630),n(82367),n(99102);var r,i,o=n(64963),a=n(9164),s=n(46782);function l(e){return l="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},l(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function d(e,t,n){r&&p(r,null,"viewhide"),r=e;var o=h(e,t,n);n?s.A.mobile||(e.activeElement&&document.body.contains(e.activeElement)&&a.A.isCurrentlyFocusable(e.activeElement)?a.A.focus(e.activeElement):a.A.autoFocus(e)):!1!==t.autoFocus&&a.A.autoFocus(e),e.dispatchEvent(new CustomEvent("viewshow",o)),i&&e.dispatchEvent(new CustomEvent("pageshow",o))}function f(e){var t=e.getAttribute("data-properties");return t?t.split(","): []}function p(e,t,n,r){t||(t={detail: {type:e.getAttribute("data-type"),properties:f(e)},bubbles:!0,cancelable:r}),t.cancelable=r||!1;var o=e.dispatchEvent(new CustomEvent(n,t));return i&&(t.cancelable=!1,e.dispatchEvent(new CustomEvent(n.replace("view","page"),t))),o}function h(e,t,n){var r=t.state,i=t.url,o=t.options,a=void 0===o?{}:o,s=i.indexOf("?"),l=new URLSearchParams(i.substring(s+1)),u={};return l.forEach((function(e,t){u[t]=e})),{detail: {type:e.getAttribute("data-type"),properties:f(e),params:u,isRestored:n,state:r,options:a},bubbles:!0,cancelable:!1}}o.Ay.setOnBeforeChange((function(e,t,n){r&&p(r,null,"viewbeforehide",!0);var o=h(e,n,t);e.initComplete||(e.initComplete=!0,"function"==typeof n.controllerFactory?new n.controllerFactory(e,o.detail.params):n.controllerFactory&&"function"==typeof n.controllerFactory.default&&new n.controllerFactory.default(e,o.detail.params),n.controllerFactory&&!i||p(e,o,"viewinit")),p(e,o,"viewbeforeshow")})),document.addEventListener("skinunload",(function(){o.Ay.reset()}));var y=new(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: "loadView",value:function(e){r&&(r.activeElement=document.activeElement),e.cancel||o.Ay.loadView(e).then((function(t){d(t,e)}))}},{key: "hideView",value:function(){r&&(p(r,null,"viewbeforehide"),p(r,null,"viewhide"),r.classList.add("hide"),r=null)}},{key: "tryRestoreView",value:function(e,t){return e.cancel?Promise.reject({cancelled:!0}):(r&&(r.activeElement=document.activeElement),o.Ay.tryRestoreView(e).then((function(n){t&&t(),d(n,e,!0)})))}},{key: "currentView",value:function(){return r}},{key: "dispatchPageEvents",value:function(e){i=e}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());y.dispatchPageEvents(!0),t.A=y},10353:function(e,t,n){"use strict";n(69177);var r=n(47629),i=n(46782),o=n(13615),a=n(70267),s=n(22622),l=Object.create(HTMLButtonElement.prototype),u=Object.create(HTMLAnchorElement.prototype);function c(e){var t=this.getAttribute("href")||"";"#"!==t?this.getAttribute("target")?s.g.supports("targetblank")||(e.preventDefault(),o.A.openUrl(t)):(e.preventDefault(),a.appRouter.show(t)):e.preventDefault()}l.createdCallback=function(){this.classList.contains("emby-button")||(this.classList.add("emby-button"),i.A.tv&&this.classList.add("show-focus"))},l.attachedCallback=function(){"A"===this.tagName&&((0,r.f)(this,"click",c,{}),(0,r.q2)(this,"click",c,{}),"true"===this.getAttribute("data-autohide")&&(s.g.supports("externallinks")?this.classList.remove("hide"):this.classList.add("hide")))},l.detachedCallback=function(){(0,r.f)(this,"click",c,{})},u.createdCallback=l.createdCallback,u.attachedCallback=l.attachedCallback,document.registerElement("emby-button",{prototype:l,extends: "button"}),document.registerElement("emby-linkbutton",{prototype:u,extends: "a"}),t.A=l},15453:function(e,t,n){"use strict";var r=n(46782),i=(n(69177),Object.create(HTMLButtonElement.prototype));i.createdCallback=function(){this.classList.add("paper-icon-button-light"),r.A.tv&&this.classList.add("show-focus")},document.registerElement("paper-icon-button-light",{prototype:i,extends: "button"})},77157:function(e,t,n){"use strict";n.r(t);var r=n(34789),i=n(47629),o=(n(69177),Object.create(HTMLInputElement.prototype));function a(e){if(13===e.keyCode||32===e.keyCode&&r.A.tizen)return e.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),!1}var s=r.A.tizen||r.A.orsay||r.A.operaTv||r.A.web0s;function l(e){var t=this.parentNode;t.style.webkitAnimationName="repaintChrome",t.style.webkitAnimationDelay=!0===e?"500ms": "",t.style.webkitAnimationDuration="10ms",t.style.webkitAnimationIterationCount="1",setTimeout((function(){t.style.webkitAnimationName=""}),!0===e?520: 20)}o.attachedCallback=function(){if("true"!==this.getAttribute("data-embycheckbox")){this.setAttribute("data-embycheckbox","true"),this.classList.add("emby-checkbox");var e=this.parentNode;e.classList.add("emby-checkbox-label");var t=e.querySelector("span"),n="checkboxOutline",r=this.getAttribute("data-outlineclass");r&&(n+=" "+r);var o='<span class="material-icons checkboxIcon checkboxIcon-checked '+(this.getAttribute("data-checkedicon")||"check")+'" aria-hidden="true"></span>',u='<span class="material-icons checkboxIcon checkboxIcon-unchecked '+(this.getAttribute("data-uncheckedicon")||"")+'" aria-hidden="true"></span>';e.insertAdjacentHTML("beforeend",'<span class="'+n+'">'+o+u+"</span>"),t.classList.add("checkboxLabel"),this.addEventListener("keydown",a),s&&(l.call(this,!0),i.Ay.addEventListener(this,"click",l,{passive:!0}),i.Ay.addEventListener(this,"blur",l,{passive:!0}),i.Ay.addEventListener(this,"focus",l,{passive:!0}),i.Ay.addEventListener(this,"change",l,{passive:!0}))}},o.detachedCallback=function(){this.removeEventListener("keydown",a),i.Ay.removeEventListener(this,"click",l,{passive:!0}),i.Ay.removeEventListener(this,"blur",l,{passive:!0}),i.Ay.removeEventListener(this,"focus",l,{passive:!0}),i.Ay.removeEventListener(this,"change",l,{passive:!0})},document.registerElement("emby-checkbox",{prototype:o,extends: "input"})},98959:function(e,t,n){"use strict";n(36947),n(36457);var r=n(34789),i=n(47629),o=(n(69177),Object.create(HTMLInputElement.prototype)),a=0,s=!1;if(Object.getOwnPropertyDescriptor&&Object.defineProperty){var l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");if(null!=l&&l.configurable){var u=l.set;l.set=function(e){u.call(this,e),this.dispatchEvent(new CustomEvent("valueset",{bubbles:!1,cancelable:!1}))},Object.defineProperty(HTMLInputElement.prototype,"value",l),s=!0}}function c(){var e=this.labelElement;this.value?e.classList.remove("inputLabel-float"):s&&"date"!==this.type&&"time"!==this.type&&e.classList.add("inputLabel-float")}o.createdCallback=function(){if(this.id||(this.id="embyinput"+a,a++),!this.classList.contains("emby-input")){this.classList.add("emby-input");var e=this.parentNode,t=this.ownerDocument,n=t.createElement("label");n.innerText=this.getAttribute("label")||"",n.classList.add("inputLabel"),n.classList.add("inputLabelUnfocused"),n.htmlFor=this.id,e.insertBefore(n,this),this.labelElement=n,i.Ay.addEventListener(this,"focus",(function(){c.call(this),t.attachIME&&t.attachIME(this),n.classList.add("inputLabelFocused"),n.classList.remove("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"blur",(function(){c.call(this),n.classList.remove("inputLabelFocused"),n.classList.add("inputLabelUnfocused")}),{passive:!0}),i.Ay.addEventListener(this,"change",c,{passive:!0}),i.Ay.addEventListener(this,"input",c,{passive:!0}),i.Ay.addEventListener(this,"valueset",c,{passive:!0}),r.A.orsay&&this===t.activeElement&&t.attachIME&&t.attachIME(this)}},o.attachedCallback=function(){this.labelElement.htmlFor=this.id,c.call(this)},o.label=function(e){this.labelElement.innerText=e},document.registerElement("emby-input",{prototype:o,extends: "input"})},24639:function(e,t,n){"use strict";n(29305),n(32733),n(51770),n(84701),n(2623),n(24776),n(14382),n(44962),n(86584),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(23630),n(82367),n(21973),n(63960),n(96244),n(86684),n(91315),n(74288),n(36956),n(63220),n(90883),n(69785),n(79237),n(29379),n(39603),n(82118),n(84238);var r=n(63696),i=n(7470),o=n(86191),a=n(22622),s=n(84069),l=n(8566),u=n(38829),c=n(70267),d=n(5898),f=["af","ar","be-by","bg-bg","bn_bd","ca","cs","cy","da","de","el","en-gb","en-us","eo","es","es_419","es-ar","es_do","es-mx","et","eu","fa","fi","fil","fr","fr-ca","gl","gsw","he","hi-in","hr","hu","id","it","ja","kk","ko","lt-lt","lv","mr","ms","nb","nl","nn","pl","pr","pt","pt-br","pt-pt","ro","ru","sk","sl-si","sq","sv","ta","th","tr","uk","ur_pk","vi","zh-cn","zh-hk","zh-tw"].map((function(e){return{lang:e,path: "".concat(e,".json")}})),p=n(83237),h=n(34789),y=n(74550),m=n(82885),v=n(51876),g=n(54048),b=n(89100),w=n(44797),x=n(62540),S=n(9790),A=n(84757),P=n(69410),k=n(28626),I=n(60182),j=n(53678),T=n(72524),C=window.Proxy&&!h.A.tv,E=function(){return(0,x.jsxs)(S.Ht,{client:j.q,children: [(0,x.jsx)(P.Kv,{children:(0,x.jsx)(k.w,{children:(0,x.jsx)(I.AQ,{children:(0,x.jsx)(T.A,{})})})}),C&&(0,x.jsx)(A.E,{initialIsOpen:!1})]})},L=(n(10353),n(66911)),_=n(75384),O=n(47750);document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i&&function(e,t){var n,r,i,a;n=this,r=void 0,a=function(){var n,r,i,a,s,l;return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(u){switch(u.label){case 0:if(!O.f.enableDisplayMirroring())return[3,4];if(!(n=O.f.getPlayerInfo())||n.isLocalPlayer||-1===n.supportedCommands.indexOf("DisplayContent"))return[3,4];r=o.A.getApiClient(e),i=(0,_.C)(r),a=r.getCurrentUserId(),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,j.q.fetchQuery((0,L.I)(i,a,t))];case 2:return s=u.sent(),O.f.displayContent({ItemName:s.Name,ItemId:s.Id,ItemType:s.Type},O.f.getCurrentPlayer()),[3,4];case 3:return l=u.sent(),console.error("[DisplayMirrorManager] failed to mirror item",l),[3,4];case 4:return[2]}}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(o,s)}l((a=a.apply(n,r||[])).next())}))}(r,i)})),n(86663),n(76281),n(84734),n(99425);var M,R=n(45251),D=n(23216),N=n(58961);function F(e){return F="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},F(e)}function z(){z=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new E(r||[]);return i(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==n&&r.call(S,a)&&(w=S);var A=b.prototype=v.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==F(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function I(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=j(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function j(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(T,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(F(t)+" is not iterable")}return g.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},P(k.prototype),u(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(A),u(A,l,"Generator"),u(A,a,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function U(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}var V=[];function B(e,t){var n=e.filter((function(e){return e.MediaType===R.z.Video?m.currentSettings.enableThemeVideos():m.currentSettings.enableThemeSongs()}));if(n.length){if(!M&&O.f.isPlaying())return;V=n.map((function(e){return e.Id})),n.forEach((function(e){e.playOptions={fullscreen:!1,enableRemotePlayers:!1}})),O.f.play({items:n,fullscreen:!1,enableRemotePlayers:!1}).then((function(){M=t}))}else q()}function q(){M&&O.f.stop(),M=null}var H=[N.u.CollectionFolder,N.u.UserView,N.u.Person,N.u.Program,N.u.TvChannel,N.u.Channel,N.u.SeriesTimer];function shuffle(array) {for (let i = array.length - 1; i > 0; i--) {const j = Math.floor(Math.random() * (i + 1));[array[i], array[j]] = [array[j], array[i]];}return array;}function G() {var e;return e = z().mark(function e(t, n) {var r, i, a, s, l, u, c, d;return z().wrap(function(e) {for (;;) switch (e.prev = e.next) {case 0:return r = o.A.getApiClient(t), i = (0, _.C)(r), a = r.getCurrentUserId(), e.prev = 3, e.next = 6, j.q.fetchQuery((0, L.I)(i, a, n));case 6:if (!(l = e.sent).CollectionType) {e.next = 10;break;}return q(), e.abrupt("return");case 10:if (!H.includes(l.Type)) {e.next = 13;break;}return q(), e.abrupt("return");case 13:return e.next = 15, (0, D.Q)(i).getThemeMedia({userId: a,itemId: l.Id,inheritFromParent: !0});case 15:u = e.sent,c = u.data,(d = m.currentSettings.enableThemeVideos() && null !== (s = c.ThemeVideosResult) && void 0 !== s && null !== (s = s.Items) && void 0 !== s && s.length ? { ...c.ThemeVideosResult, Items: shuffle(s) } : c.ThemeSongsResult).OwnerId !== M && B(d.Items, d.OwnerId),e.next = 24;break;case 21:e.prev = 21, e.t0 = e.catch(3), console.error("[ThemeMediaPlayer] failed to load theme media", e.t0);case 24:case "end":return e.stop();}}, e, null, [[3, 21]]);}), G = function() {var t = this,n = arguments;return new Promise(function(r, i) {var o = e.apply(t, n);function a(e) {U(o, r, i, a, s, "next", e);}function s(e) {U(o, r, i, a, s, "throw", e);}a(void 0);});}, G.apply(this, arguments);}document.addEventListener("viewshow",(function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.params)||{},r=n.serverId,i=n.id;r&&i?function(e,t){G.apply(this,arguments)}(r,i):(e.detail.options||{}).supportsThemeMedia||B([],null)}),!0),w.A.on(O.f,"playbackstart",(function(e,t){var n=O.f.currentItem(t);-1==V.indexOf(n.Id)&&(M=null)}));var W=n(39641);W.A.setTheme(m.theme()).then((function(){return document.body.classList.add("force-scroll")})),w.A.on(o.A,"localusersignedin",(function(){W.A.setTheme(m.theme())})),(0,b.pageClassOn)("viewbeforeshow","page",(function(){this.classList.contains("type-interior")?W.A.setTheme(m.dashboardTheme()):W.A.setTheme(m.theme())})),n(40787),n(69892),n(95021),n(73687);var Y=n(38490),Q=n(38783);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X(){return 1e3*m.screensaverTime()}var $=0;function J(e){return J="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},J(e)}function Z(){Z=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new E(r||[]);return i(a,"_invoke",{value:I(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==n&&r.call(S,a)&&(w=S);var A=b.prototype=v.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==J(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function I(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=j(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function j(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(T,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(J(t)+" is not iterable")}return g.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},P(k.prototype),u(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(A),u(A,l,"Generator"),u(A,a,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function ee(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function te(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ee(o,r,i,a,s,"next",e)}function s(e){ee(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ne(){return(ne=te(Z().mark((function e(){var t;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.info("[".concat("jellyfin-web","]\nversion: ").concat("10.10.3","\ncommit: ").concat("","\nbuild: ").concat("10.10.3")),window.Events=w.A,window.TaskButton=g.A,(0,b.pageClassOn)("viewshow","standalonePage",(function(){document.querySelector(".skinHeader").classList.add("noHeaderRight")})),(0,b.pageClassOn)("viewhide","standalonePage",(function(){document.querySelector(".skinHeader").classList.remove("noHeaderRight")})),e.next=7,(0,b.serverAddress)();case 7:return(t=e.sent)&&o.A.initApiClient(t),(0,p.n_)(),e.next=12,d.Ay.defaultModule("core"),d.Ay.loadStrings({name: "core",translations:f});case 12:return w.A.on(o.A,"localusersignedin",d.Ay.updateCurrentCulture),w.A.on(o.A,"localusersignedout",d.Ay.updateCurrentCulture),document.title=d.Ay.translateHtml(document.title,"core"),h.A.tv&&!h.A.android?(console.debug("using system fonts with explicit sizes"),n.e(28163).then(n.bind(n,28163))):(console.debug("using default fonts"),n.e(32942).then(n.bind(n,32942)),n.e(78902).then(n.bind(n,78902))),h.A.iOS&&n.e(68525).then(n.bind(n,68525)),e.next=19,re();case 19:return w.A.on(a.g,"resume",(function(){var e;null===(e=o.A.currentApiClient())||void 0===e||e.ensureWebSocket()})),o.A.getApiClients().forEach((function(e){w.A.off(e,"requestfail",c.appRouter.onRequestFail),w.A.on(e,"requestfail",c.appRouter.onRequestFail)})),w.A.on(o.A,"apiclientcreated",(function(e,t){w.A.off(t,"requestfail",c.appRouter.onRequestFail),w.A.on(t,"requestfail",c.appRouter.onRequestFail)})),e.next=24,o.A.connect();case 24:return o.A.firstConnection=e.sent,e.next=27,ae();case 27:h.A.tv||h.A.xboxOne||h.A.ps4||Promise.all([n.e(12011),n.e(57949),n.e(55802),n.e(19029)]).then(n.bind(n,35300)),a.g.supports("remotecontrol")&&(Promise.resolve().then(n.bind(n,86663)),n.e(28567).then(n.bind(n,28567))),a.g.supports("physicalvolumecontrol")&&!h.A.touch||n.e(91737).then(n.bind(n,91737)),(navigator.mediaSession||window.NativeShell)&&n.e(21857).then(n.bind(n,21857)),h.A.tv||h.A.xboxOne||(n.e(22424).then(n.bind(n,22424)),navigator.serviceWorker&&"cordova"!==window.appMode&&"android"!==window.appMode?navigator.serviceWorker.register("serviceworker.js").then((function(){return console.log("serviceWorker registered")})).catch((function(e){return console.log("error registering serviceWorker: "+e)})):console.warn("serviceWorker unsupported"),window.Notification&&n.e(44184).then(n.bind(n,78983))),oe(),y.Ay.enable(),s.default.enable();case 31:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return ie.apply(this,arguments)}function ie(){return(ie=te(Z().mark((function e(){var t;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.groupCollapsed("loading installed plugins"),console.dir(u.X),e.next=4,(0,v.xy)();case 4:return t=e.sent,a.g.supports("remotecontrol")?h.A.chrome||h.A.edgeChromium||h.A.opera||(t=t.filter((function(e){return!e.startsWith("chromecastPlayer")}))):t=t.filter((function(e){return!e.startsWith("sessionPlayer")&&!e.startsWith("chromecastPlayer")})),window.NativeShell&&(t=t.concat(window.NativeShell.getPlugins())),e.prev=7,e.next=10,Promise.all(t.map((function(e){return u.X.loadPlugin(e)})));case 10:console.debug("finished loading plugins"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),console.warn("failed loading plugins",e.t0);case 16:console.groupEnd("loading installed plugins");case 17:case"end":return e.stop()}}),e,null,[[7,13]])})))).apply(this,arguments)}function oe(){var e=o.A.currentApiClient();if(e){var t=fetch(e.getUrl("Branding/Css")).then((function(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()})).catch((function(e){console.warn("Error applying custom css",e)})),n=function(){var e=te(Z().mark((function e(){var n,r;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=document.querySelector("#cssBranding"))||((n=document.createElement("style")).id="cssBranding",document.body.appendChild(n)),r=[],m.currentSettings.disableCustomCss()){e.next=9;break}return e.t0=r,e.next=7,t;case 7:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 9:r.push(m.currentSettings.customCss()),n.textContent=r.join("\n");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();w.A.on(o.A,"localusersignedin",n),w.A.on(o.A,"localusersignedout",n),w.A.on(m.currentSettings,"change",(function(e,t){"disableCustomCss"!=t&&"customCss"!=t||n()})),n()}}function ae(){return se.apply(this,arguments)}function se(){return(se=te(Z().mark((function e(){var t;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=document.getElementById("reactRoot")).innerHTML="",l.Ay.show(),(0,i.H)(t).render(r.createElement(E,{history:T.b}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}w.A.on(O.f,"playbackstop",(function(e,t){var n=t.state;n.NowPlayingItem&&"Video"==n.NowPlayingItem.MediaType&&($=(new Date).getTime())})),new function(){var e,t=this;function n(){e&&(console.debug("Hiding screensaver"),e.hide().then((function(){document.body.classList.remove("screensaver-noScroll")})),e=null),window.removeEventListener("click",n,!0),window.removeEventListener("mousemove",n,!0),window.removeEventListener("keydown",n,!0)}this.isShowing=function(){return null!=e},this.show=function(){var t,r=o.A.currentApiClient();null!=r&&r.isLoggedIn()&&(t=!0);var i=function(e){var t;try{t=m.get("screensaver",!1)}catch(n){t=e?"backdropscreensaver": "logoscreensaver"}var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}: {done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(u.X.ofType(Q.Q.Screensaver));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.id===t)return i}}catch(e){r.e(e)}finally{r.f()}return null}(t);i&&function(t){if(e)throw new Error("An existing screensaver is already active.");console.debug("Showing screensaver "+t.name),document.body.classList.add("screensaver-noScroll"),t.show(),e=t,!1!==t.hideOnClick&&window.addEventListener("click",n,!0),!1!==t.hideOnMouse&&window.addEventListener("mousemove",n,!0),!1!==t.hideOnKey&&window.addEventListener("keydown",n,!0)}(i)},this.hide=function(){n()},setInterval((function(){t.isShowing()||Y.default.idleTime()<X()||(new Date).getTime()-$<X()||O.f.isPlayingVideo()||t.show()}),5e3)},n(10736),function(){ne.apply(this,arguments)}()},5898:function(e,t,n){"use strict";n.d(t,{Mo:function(){return f},Tl:function(){return S},c1:function(){return I},i5:function(){return g},jE:function(){return v}}),n(29305),n(32733),n(84701),n(14382),n(69892),n(76281),n(84734),n(44962),n(89336),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(97747),n(82367);var r=n(77083),i=n(82885),o=n(44797),a=n(93721);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l,u,c,d={rtl: "rtl",ltr: "ltr"},f="en-us",p=["ar","fa","ur","he"],h={},y=!1;function m(){return l}function v(){return u}function g(){var e;return document.documentElement.getAttribute("data-culture")||(navigator.language?navigator.language:navigator.userLanguage?navigator.userLanguage:null!==(e=navigator.languages)&&void 0!==e&&e.length?navigator.languages[0]:f)}function b(e){y=!1;var t,r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}: {done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(p);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(e.includes(o)){y=!0;break}}}catch(e){i.e(e)}finally{i.f()}r=y?d.rtl:d.ltr,document.getElementsByTagName("body")[0].setAttribute("dir",r),document.getElementsByTagName("html")[0].setAttribute("dir",r),r===d.rtl&&n.e(40734).then(n.bind(n,40734))}function w(){var e,t;try{e=i.currentSettings.language()}catch(e){console.error("no language set in user settings")}b(e=e||g()),l=S(e),document.documentElement.setAttribute("lang",l);try{t=i.currentSettings.dateTimeLocale()}catch(e){console.error("no date format set in user settings")}u=t?S(t):l,(0,a.cu)(u),function(e){for(var t in h)x(h[t],e);if(e!==f)for(var n in h)x(h[n],f)}(l)}function x(e,t){return e.dictionaries[t]?Promise.resolve():function(e,t){t=S(t);var r=e.filter((function(e){return S(e.lang)===t}));return r.length||(t=t.replace(/-.*/,""),(r=e.filter((function(e){return S(e.lang)===t}))).length||(r=e.filter((function(e){return S(e.lang)===f})))),new Promise((function(e){if(r.length){var t=r[0].path;n(73125)("./".concat(t)).then((function(t){e(t)})).catch((function(){e({})}))}else e()}))}(e.translations,t).then((function(n){e.dictionaries[t]=n}))}function S(e){return e.replace("_","-").toLowerCase()}function A(e,t){e||(e=j());var n=h[e];return n?n.dictionaries[t]: {}}function P(e){h[e.name]={translations:e.strings||e.translations,dictionaries: {}}}function k(e,t){var n,i,o=A(t,m());return null!==(n=o)&&void 0!==n&&n[e]||null!==(i=o=A(t,f))&&void 0!==i&&i[e]?o[e]:(!o||(0,r.A)(o)?console.warn("Translation dictionary is empty."):console.error("Translation key is missing from dictionary: ".concat(e)),e)}function I(e,t){if(e=e.default||e,t||(t=j()),!t)throw new Error("module cannot be null or empty");var n=e.indexOf("${");if(-1===n)return e;n+=2;var r=e.indexOf("}",n);if(-1===r)return e;var i=e.substring(n,r),o=k(i,t);return I(e=e.replace("${"+i+"}",o),t)}function j(e){return e&&(c=e),c}w(),o.A.on(i.currentSettings,"change",(function(e,t){"language"!==t&&"datetimelocale"!==t||w()})),t.Ay={translate:function(e){for(var t=function(e){var t,n=e.split("#");return n.length>1&&(t=n[0],e=n[1]),k(e,t)}(e),n=1;n<arguments.length;n++)t=t.replaceAll("{"+(n-1)+"}",arguments[n].toLocaleString(l));return t},translateHtml:I,loadStrings:function(e){var t,n=m(),r=[];return"string"==typeof e?t=e:(t=e.name,P(e)),r.push(x(h[t],n)),r.push(x(h[t],f)),Promise.all(r)},defaultModule:j,getCurrentLocale:m,getCurrentDateTimeLocale:v,register:P,updateCurrentCulture:w,getIsRTL:function(){return y},getIsElementRTL:function(e){return window.getComputedStyle?"rtl"==window.getComputedStyle(e,null).getPropertyValue("direction"): "rtl"==e.currentStyle.direction}}},69785:function(e,t,n){n(95021),function(e){"use strict";var t=e.prototype,n=t.parseFromString;try{if((new e).parseFromString("","text/html"))return}catch(e){}t.parseFromString=function(e,t){if(/^\s*text\/html\s*(?:;|$)/i.test(t)){var r=document.implementation.createHTMLDocument("");return r.documentElement.innerHTML=e,r}return n.apply(this,arguments)}}(DOMParser)},79237:function(e,t,n){n(36947),void 0===HTMLElement.prototype.nativeFocus&&function(){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0);var n=Object.defineProperty({},"preventScroll",{get:function(){return e=!0,null}});t.focus(n)}catch(e){}e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollX,n=window.scrollY;this.nativeFocus(),null!=e&&e.preventScroll&&window.scroll(t,n)})}()},29379:function(e,t,n){n(78557),n(90076),function(e){"use strict";var t=e.prototype,n=t.play;t.play=function(){try{var e=n.apply(this,arguments);return"function"==typeof(null==e?void 0:e.then)?e:Promise.resolve()}catch(e){return Promise.reject(e)}}}(HTMLMediaElement)},39603:function(e,t,n){n(64251),function(e){"use strict";try{new e.KeyboardEvent("event",{bubbles:!0,cancelable:!0})}catch(r){var t=e.Event,n=function(e,t){t=t||{};var n=new Event(e,{bubbles:!!t.bubbles,cancelable:!!t.cancelable});return n.view=t.view||document.defaultView,n.key=t.key||t.keyIdentifier||"",n.keyCode=t.keyCode||0,n.code=t.code||"",n.charCode=t.charCode||0,n.char=t.char||"",n.which=t.which||0,n.location=t.location||t.keyLocation||0,n.ctrlKey=!!t.ctrlKey,n.altKey=!!t.altKey,n.shiftKey=!!t.shiftKey,n.metaKey=!!t.metaKey,n.repeat=!!t.repeat,n};n.prototype=t.prototype,e.KeyboardEvent=n}}(window)},82118:function(){!function(e){"use strict";if(e.Headers)try{new e.Headers(void 0)}catch(n){console.debug("patch 'Headers' to accept 'undefined'");var t=e.Headers;e.Headers=function(e){return e?new t(e):new t}}}(window)},84238:function(e,t,n){n(24776),n(36947),n(78557),function(){var e={transform: ["webkitTransform"],transition: ["webkitTransition"]},t=document.createElement("div");function n(n){n in t.style||(e[n]||[]).every((function(e){return!(e in t.style)||(console.debug("polyfill '".concat(n,"' with '").concat(e,"'")),Object.defineProperty(CSSStyleDeclaration.prototype,n,{get:function(){return this[e]},set:function(t){this[e]=t}}),!1)}))}t.style instanceof CSSStyleDeclaration&&(n("transform"),n("transition"))}()},83237:function(e,t,n){"use strict";n.d(t,{Ol:function(){return s},n_:function(){return u},sS:function(){return a}}),n(69703),n(78557),n(23630);var r=n(86191),i=n(47750),o=n(44797);function a(e){if(console.debug("[autocast] %s cast player",e?"enabling": "disabling"),e){var t=i.f.getPlayerInfo();null!=t&&t.id&&localStorage.setItem("autocastPlayerId",t.id)}else localStorage.removeItem("autocastPlayerId")}function s(){var e=localStorage.getItem("autocastPlayerId"),t=i.f.getPlayerInfo();return e&&(null==t?void 0:t.id)===e}function l(){var e=localStorage.getItem("autocastPlayerId");e?(console.debug("[autocast] initializing cast player",e),i.f.getTargets().then((function(t){console.debug("[autocast] playback targets",t);var n=t.find((function(t){return t.id===e}));n?(console.debug("[autocast] found target player",n),i.f.trySetActivePlayer(n.playerName,n)):console.debug("[autocast] selected cast player not found")}))):console.debug("[autocast] no active cast player")}function u(){console.debug("[autoCast] initializing connection listener"),r.A.getApiClients().forEach((function(e){o.A.off(e,"websocketopen",l),o.A.on(e,"websocketopen",l)})),o.A.on(r.A,"apiclientcreated",(function(e,t){o.A.off(t,"websocketopen",l),o.A.on(t,"websocketopen",l)}))}},34789:function(e,t,n){"use strict";var r,i;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("netcast")||-1!==e.indexOf("web0s")}n(29305),n(32733),n(84701),n(69892),n(76281),n(84734),n(44962),n(89336),n(78557),n(96054),n(95021),n(73687),n(99425),n(83994),n(53819),n(93062),n(46968),n(82367);var s=navigator.userAgent,l=function(e){e=(e=e.toLowerCase()).replace(/(motorola edge)/,"").trim();var t,n=/(edg)[ /]([\w.]+)/.exec(e)||/(edga)[ /]([\w.]+)/.exec(e)||/(edgios)[ /]([\w.]+)/.exec(e)||/(edge)[ /]([\w.]+)/.exec(e)||/(opera)[ /]([\w.]+)/.exec(e)||/(opr)[ /]([\w.]+)/.exec(e)||/(chrome)[ /]([\w.]+)/.exec(e)||/(safari)[ /]([\w.]+)/.exec(e)||/(firefox)[ /]([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],r=/(version)[ /]([\w.]+)/.exec(e),i=/(ipad)/.exec(e)||/(iphone)/.exec(e)||/(windows)/.exec(e)||/(android)/.exec(e)||[],o=n[1]||"";"edge"===o&&(i=[""]),"opr"===o&&(o="opera"),r&&r.length>2&&(t=r[2]),t=t||n[2]||"0";var a=parseInt(t.split(".")[0],10);return isNaN(a)&&(a=0),{browser:o,version:t,platform:i[0]||"",versionMajor:a}}(s),u={};if(l.browser&&(u[l.browser]=!0,u.version=l.version,u.versionMajor=l.versionMajor),l.platform&&(u[l.platform]=!0),u.edgeChromium=u.edg||u.edga||u.edgios,u.chrome||u.edgeChromium||u.edge||u.opera||-1===s.toLowerCase().indexOf("webkit")||(u.safari=!0),u.osx=-1!==s.toLowerCase().indexOf("mac os x"),u.osx&&!u.iphone&&!u.ipod&&!u.ipad&&navigator.maxTouchPoints>1&&(u.ipad=!0),-1!==s.toLowerCase().indexOf("playstation 4")&&(u.ps4=!0,u.tv=!0),function(e){for(var t=["mobi","ipad","iphone","ipod","silk","gt-p1000","nexus 7","kindle fire","opera mini"],n=e.toLowerCase(),r=0,i=t.length;r<i;r++)if(-1!==n.indexOf(t[r]))return!0;return!1}(s)&&(u.mobile=!0),-1!==s.toLowerCase().indexOf("xbox")&&(u.xboxOne=!0,u.tv=!0),u.animate="undefined"!=typeof document&&null!=document.documentElement.animate,u.hisense=s.toLowerCase().includes("hisense"),u.tizen=-1!==s.toLowerCase().indexOf("tizen")||null!=window.tizen,u.vidaa=s.toLowerCase().includes("vidaa"),u.web0s=a(),u.edgeUwp=u.edge&&(-1!==s.toLowerCase().indexOf("msapphost")||-1!==s.toLowerCase().indexOf("webview")),u.web0s)u.web0sVersion=function(e){if(e.chrome){if(-1!==navigator.userAgent.toLowerCase().indexOf("netcast"))return void console.warn("Unable to detect webOS version - NetCast");if(e.versionMajor>=94)return 23;if(e.versionMajor>=87)return 22;if(e.versionMajor>=79)return 6;if(e.versionMajor>=68)return 5;if(e.versionMajor>=53)return 4;if(e.versionMajor>=38)return 3;if(e.versionMajor>=34)return 2;if(e.versionMajor>=26)return 1}else{if(e.versionMajor>=538)return 2;if(e.versionMajor>=537)return 1}console.error("Unable to detect webOS version")}(u),delete u.chrome,delete u.safari;else if(u.tizen){var c=navigator.appVersion.match(/Tizen (\d+).(\d+)/);u.tizenVersion=parseInt(c[1],10),delete u.chrome,delete u.safari}else u.orsay=-1!==s.toLowerCase().indexOf("smarthub");u.edgeUwp&&(u.edge=!0),u.tv=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("oculusbrowser")&&(-1!==e.indexOf("tv")||-1!==e.indexOf("samsungbrowser")||-1!==e.indexOf("viera")||a())}(),u.operaTv=u.tv&&-1!==s.toLowerCase().indexOf("opr/"),(u.mobile||u.tv)&&(u.slow=!0),("undefined"!=typeof document&&"ontouchstart"in window||navigator.maxTouchPoints>0)&&(u.touch=!0),u.keyboard=function(e){return!!(e.touch||e.xboxOne||e.ps4||e.edgeUwp||e.tv)}(u),u.supportsCssAnimation=function(e){if(e&&(!0===i||!1===i))return i;if(!0===r||!1===r)return r;var t=!1,n=document.createElement("div");if(void 0!==n.style.animationName&&(t=!0),!1===t&&e){var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}: {done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(["Webkit","O","Moz"]);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(void 0!==n.style[l+"AnimationName"]){t=!0;break}}}catch(e){s.e(e)}finally{s.f()}}return e?i=t:r=t},u.iOS=u.ipad||u.iphone||u.ipod,u.iOS&&(u.iOSVersion=function(){if(/iP(hone|od|ad)|MacIntel/.test(navigator.platform))for(var e=0,t=[/OS (\d+)_(\d+)_?(\d+)?/,/Version\/(\d+)/];e<t.length;e++){var n=t[e],r=navigator.appVersion.match(n);if(r)return[parseInt(r[1],10),parseInt(r[2]||0,10),parseInt(r[3]||0,10)]}return[]}(),u.iOSVersion&&u.iOSVersion.length>=2&&(u.iOSVersion=u.iOSVersion[0]+u.iOSVersion[1]/10)),t.A=u},57634:function(e,t,n){"use strict";n.d(t,{A:function(){return I},L:function(){return k}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(84734),n(44962),n(86584),n(89336),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(96054),n(95021),n(73687),n(99425),n(83994),n(93062),n(64062),n(23630),n(82367);var r,i,o,a=n(34789),s=n(90381),l=n(82885);function u(e){return u="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},u(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return!!(a.A.tizen||a.A.xboxOne||a.A.web0s||t.supportsHevc)||!a.A.ps4&&!!e.canPlayType&&(e.canPlayType('video/mp4; codecs="hvc1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hvc1.1.0.L120"').replace(/no/,"")||e.canPlayType('video/mp4; codecs="hev1.1.0.L120"').replace(/no/,""))}function h(e){return a.A.tizenVersion>=5.5||a.A.web0sVersion>=5||!!e.canPlayType&&e.canPlayType('video/mp4; codecs="av01.0.15M.08"').replace(/no/,"")&&e.canPlayType('video/mp4; codecs="av01.0.15M.10"').replace(/no/,"")}function y(){return null==o&&(o=m()||null!=window.MediaSource),o}function m(){if(a.A.tizen)return!0;var e=document.createElement("video");return!(!e.canPlayType("application/x-mpegURL").replace(/no/,"")&&!e.canPlayType("application/vnd.apple.mpegURL").replace(/no/,""))}function v(e){return!!(a.A.edgeUwp||a.A.tizen||a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/,"")}function g(e){return!(!a.A.tizen&&!a.A.web0s)||!(a.A.iOS&&a.A.iOSVersion<11)&&e.canPlayType('audio/mp4; codecs="ec-3"').replace(/no/,"")}function b(e){var t;if("flac"===e||"asf"===e){if(a.A.tizen||a.A.web0s||a.A.edgeUwp)return!0}else if("wma"===e){if(a.A.tizen||a.A.edgeUwp)return!0}else if("opus"===e){if(a.A.web0s)return a.A.web0sVersion>=3.5;t='audio/ogg; codecs="opus"'}else if("alac"===e){if(a.A.iOS||a.A.osx&&a.A.safari)return!0}else if("mp2"===e)return!1;return"webma"===e?t="audio/webm": "mp2"===e?t="audio/mpeg":t||(t="audio/"+e),!!document.createElement("audio").canPlayType(t).replace(/no/,"")}function w(){return a.A.tizen||a.A.web0s||a.A.edgeUwp}function x(e){return a.A.tizen||a.A.web0s||a.A.edgeUwp||e.canPlayType('video/mp4; codecs="vc-1"').replace(/no/,"")}function S(e){var t;return null!==(t=e.supportsHdr10)&&void 0!==t?t:a.A.tizen||a.A.web0s||a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)||a.A.edgeChromium&&a.A.versionMajor>=121||a.A.chrome&&!a.A.mobile||a.A.firefox&&a.A.osx&&!a.A.iphone&&!a.A.ipod&&!a.A.ipad&&a.A.versionMajor>=100}function A(e){var t;return null!==(t=e.supportsDolbyVision)&&void 0!==t?t:a.A.safari&&(a.A.iOS&&a.A.iOSVersion>=13||a.A.osx)}var P=null;function k(e){return!!e.audioTracks&&!a.A.firefox&&(a.A.tizenVersion>=5.5||!a.A.tizen)&&(a.A.web0sVersion>=4||!a.A.web0sVersion)}function I(e){var t;e=e||{};var n=12e7,o=document.createElement("video"),u=function(e,t){var n=parseInt(l.allowedAudioChannels(),10);if(n>0)return n;if(e.audioChannels)return e.audioChannels;var r=a.A.safari||a.A.chrome||a.A.edgeChromium||a.A.firefox||a.A.tv||a.A.ps4||a.A.xboxOne,i=v(t)||g(t),o=function(){if(null!=P)return P;P=-1;var e=window.AudioContext||window.webkitAudioContext||!1;if(e){var t=new e;P=t.destination.maxChannelCount}return P}();return i&&r?o>6?o: 6:o>2?r?o: 2:o>0?o:r?6: 2}(e,o),I=o.canPlayType('video/webm; codecs="vp8"').replace(/no/,""),j=o.canPlayType('video/webm; codecs="vp9"').replace(/no/,""),T=a.A.safari&&a.A.versionMajor>=17&&!!document.createElement("audio").canPlayType('audio/x-caf; codecs="opus"').replace(/no/,""),C=["vorbis"],E=function(e){return!(a.A.vidaa||!a.A.tizen&&!a.A.web0s&&!e.canPlayType("video/x-matroska").replace(/no/,"")&&!e.canPlayType("video/mkv").replace(/no/,"")&&(!a.A.edgeChromium||!a.A.windows)&&!a.A.edgeUwp)}(o),L={MaxStreamingBitrate:n,MaxStaticBitrate: 1e8,MusicStreamingTranscodingBitrate:Math.min(n,384e3),DirectPlayProfiles: []},_=[],O=[],M=[],R=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="avc1.640029, mp3"').replace(/no/,""),D=e.supportsMp2VideoAudio;null==D&&(D=a.A.edgeUwp||a.A.tizen||a.A.web0s,R&&(a.A.chrome||a.A.edgeChromium||a.A.firefox&&a.A.versionMajor>=83)&&(D=!0),a.A.android&&(D=!1));var N=a.A.xboxOne?null===(t=window.screen)||void 0===t?void 0:t.width:null;e.maxVideoWidth&&(N=e.maxVideoWidth);var F=o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/,""),z=function(e){return!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.64001E, mp4a.40.34"').replace(/no/,""))}(o),U=v(o),V=g(o),B=function(e){return!(!a.A.tizen&&!a.A.web0s)||!!e.canPlayType&&(e.canPlayType('application/x-mpegurl; codecs="avc1.42E01E, ac-3"').replace(/no/,"")||e.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, ac-3"').replace(/no/,""))}(o);F&&(_.push("aac"),O.push("aac"),M.push("aac")),R&&_.push("mp3"),(a.A.safari||R&&!a.A.ps4)&&O.push("mp3"),z&&M.push("mp3"),U&&(_.push("ac3"),a.A.edgeChromium&&M.push("ac3"),V&&(_.push("eac3"),a.A.edgeChromium&&M.push("eac3")),B&&(O.push("ac3"),M.push("ac3"),V&&(O.push("eac3"),M.push("eac3")))),D&&(_.push("mp2"),O.push("mp2"),M.push("mp2"));var q=s.A.enableDts()||e.supportsDts;null==q&&(q=function(e){return!(a.A.tizenVersion>=4||a.A.web0sVersion>=5&&a.A.web0sVersion<23)&&(!(!e.canPlayType('video/mp4; codecs="dts-"').replace(/no/,"")&&!e.canPlayType('video/mp4; codecs="dts+"').replace(/no/,""))||null)}(o)),q&&(_.push("dca"),_.push("dts")),(a.A.tizen||a.A.web0s)&&(_.push("pcm_s16le"),_.push("pcm_s24le")),(s.A.enableTrueHd()||e.supportsTrueHd)&&_.push("truehd"),a.A.tizen&&_.push("aac_latm"),b("opus")?(_.push("opus"),C.push("opus"),a.A.tizen&&O.push("opus"),M.push("opus")):T&&(_.push("opus"),C.push("opus"),M.push("opus")),b("flac")&&!a.A.tizen&&(_.push("flac"),M.push("flac")),b("alac")&&(_.push("alac"),M.push("alac")),_=_.filter((function(t){return-1===(e.disableVideoAudioCodecs||[]).indexOf(t)})),O=O.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)})),M=M.filter((function(t){return-1===(e.disableHlsVideoAudioCodecs||[]).indexOf(t)}));var H=[],G=[],W=[],Y=[];h(o)&&(a.A.safari||!a.A.mobile&&(a.A.edgeChromium||a.A.firefox||a.A.chrome||a.A.opera))&&Y.push("av1"),p(o,e)&&(a.A.edgeChromium||a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome&&(!a.A.android||a.A.versionMajor>=105)||a.A.opera&&!a.A.mobile)&&Y.push("hevc"),function(e){var t;return!(null===(t=e.canPlayType)||void 0===t||!t.call(e,'video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""))}(o)&&(H.push("h264"),W.push("h264"),Y.push("h264")),p(o,e)&&(H.push("hevc"),(a.A.tizen||a.A.web0s||a.A.vidaa)&&W.push("hevc")),w()&&H.push("mpeg2video"),x(o)&&H.push("vc1"),a.A.tizen&&H.push("msmpeg4v2"),I&&G.push("vp8"),j&&(a.A.iOS||a.A.firefox&&a.A.osx||H.push("vp9"),(a.A.safari||a.A.edgeChromium||a.A.chrome||a.A.firefox)&&Y.push("vp9"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&G.push("vp9")),h(o)&&(H.push("av1"),(!a.A.safari||a.A.safari&&a.A.versionMajor>=15&&a.A.versionMajor<17)&&G.push("av1")),(!a.A.safari&&I||a.A.tizen)&&_.push("vorbis"),G.length&&L.DirectPlayProfiles.push({Container: "webm",Type: "Video",VideoCodec:G.join(","),AudioCodec:C.join(",")}),H.length&&L.DirectPlayProfiles.push({Container: "mp4,m4v",Type: "Video",VideoCodec:H.join(","),AudioCodec:_.join(",")}),E&&H.length&&L.DirectPlayProfiles.push({Container: "mkv",Type: "Video",VideoCodec:H.join(","),AudioCodec:_.join(",")}),["m2ts","wmv","ts","asf","avi","mpg","mpeg","flv","3gp","mts","trp","vob","vro","mov"].map((function(t){return function(e,t,n,r){var i=!1,o=e,s=[];switch(e){case"asf":case"wmv":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,t=[];break;case"avi":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,a.A.tizenVersion>=4&&(s.push("h264"),p(n,r)&&s.push("hevc"));break;case"mpg":case"mpeg":i=a.A.tizen||a.A.web0s||a.A.edgeUwp;break;case"flv":case"3gp":case"mts":case"trp":case"vob":case"vro":i=a.A.tizen;break;case"mov":i=a.A.safari||a.A.tizen||a.A.web0s||a.A.chrome||a.A.edgeChromium||a.A.edgeUwp,s.push("h264");break;case"m2ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),x(n)&&s.push("vc1"),w()&&s.push("mpeg2video");break;case"ts":i=a.A.tizen||a.A.web0s||a.A.edgeUwp,s.push("h264"),(a.A.tizen||a.A.web0s)&&p(n,r)&&s.push("hevc"),x(n)&&s.push("vc1"),w()&&s.push("mpeg2video"),o="ts,mpegts"}return i?{Container:o,Type: "Video",VideoCodec:s.join(","),AudioCodec:t.join(",")}: null}(t,_,o,e)})).filter((function(e){return null!=e})).forEach((function(e){L.DirectPlayProfiles.push(e)})),["opus","mp3","mp2","aac","flac","alac","webma","wma","wav","ogg","oga"].filter(b).forEach((function(e){"mp3"!=e||z||L.DirectPlayProfiles.push({Container: "ts",AudioCodec: "mp3",Type: "Audio"}),"flac"===e&&s.A.alwaysRemuxFlac()?L.DirectPlayProfiles.push({Container: "mp4",AudioCodec: "flac",Type: "Audio"}): "mp3"===e&&s.A.alwaysRemuxMp3()||L.DirectPlayProfiles.push({Container:e,Type: "Audio"}),"opus"!==e&&"webma"!==e||L.DirectPlayProfiles.push({Container: "webm",AudioCodec:e,Type: "Audio"}),"aac"!==e&&"alac"!==e||(L.DirectPlayProfiles.push({Container: "m4a",AudioCodec:e,Type: "Audio"}),L.DirectPlayProfiles.push({Container: "m4b",AudioCodec:e,Type: "Audio"}))})),T&&L.DirectPlayProfiles.push({Container: "mp4",AudioCodec: "opus",Type: "Audio"}),L.TranscodingProfiles=[];var Q=a.A.iOS||a.A.osx||a.A.edge||!m(),K=l.preferFmp4HlsContainer();(a.A.safari||a.A.tizen||a.A.web0s)&&!(a.A.tizenVersion>=5||a.A.web0sVersion>=3.5||a.A.iOS&&a.A.iOSVersion>=11||a.A.osx)&&(K=!1),y()&&!1!==a.A.enableHlsAudio&&L.TranscodingProfiles.push({Container:K?"mp4": "ts",Type: "Audio",AudioCodec: "aac",Context: "Streaming",Protocol: "hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2": "1",BreakOnNonKeyFrames:Q,EnableAudioVbrEncoding:!s.A.disableVbrAudio()}),["aac","mp3","opus","wav"].filter(b).forEach((function(e){L.TranscodingProfiles.push({Container:e,Type: "Audio",AudioCodec:e,Context: "Streaming",Protocol: "http",MaxAudioChannels:u.toString()})})),["opus","mp3","aac","wav"].filter(b).forEach((function(e){L.TranscodingProfiles.push({Container:e,Type: "Audio",AudioCodec:e,Context: "Static",Protocol: "http",MaxAudioChannels:u.toString()})})),y()&&!1!==e.enableHls&&(Y.length&&M.length&&K&&(L.DirectPlayProfiles.push({Container: "hls",Type: "Video",VideoCodec:Y.join(","),AudioCodec:M.join(",")}),L.TranscodingProfiles.push({Container: "mp4",Type: "Video",AudioCodec:M.join(","),VideoCodec:Y.join(","),Context: "Streaming",Protocol: "hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2": "1",BreakOnNonKeyFrames:Q})),W.length&&O.length&&(L.DirectPlayProfiles.push({Container: "hls",Type: "Video",VideoCodec:W.join(","),AudioCodec:O.join(",")}),L.TranscodingProfiles.push({Container: "ts",Type: "Video",AudioCodec:O.join(","),VideoCodec:W.join(","),Context: "Streaming",Protocol: "hls",MaxAudioChannels:u.toString(),MinSegments:a.A.iOS||a.A.osx?"2": "1",BreakOnNonKeyFrames:Q}))),L.ContainerProfiles=[],L.CodecProfiles=[];var X=k(o),$=[];o.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/,"")||$.push({Condition: "NotEquals",Property: "AudioProfile",Value: "HE-AAC"}),X||$.push({Condition: "Equals",Property: "IsSecondaryAudio",Value: "false",IsRequired:!1}),$.length&&L.CodecProfiles.push({Type: "VideoAudio",Codec: "aac",Conditions:$});var J=[],Z=[];if(parseInt(l.allowedAudioChannels(),10)>0&&(J.push({Condition: "LessThanEqual",Property: "AudioChannels",Value:u.toString(),IsRequired:!1}),Z.push({Condition: "LessThanEqual",Property: "AudioChannels",Value:u.toString(),IsRequired:!1})),X||Z.push({Condition: "Equals",Property: "IsSecondaryAudio",Value: "false",IsRequired:!1}),J.length&&L.CodecProfiles.push({Type: "Audio",Conditions:J}),Z.length&&L.CodecProfiles.push({Type: "VideoAudio",Conditions:Z}),a.A.web0s){var ee,te=[{Condition: "LessThanEqual",Property: "AudioChannels",Value: "2",IsRequired:!1}];L.CodecProfiles.push({Type: "VideoAudio",Codec: "flac",Conditions:te});var ne=[];L.TranscodingProfiles.forEach((function(e){if("Video"===e.Type){var t=e.AudioCodec.split(",");if(t.includes("flac")){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]: {};t%2?d(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);n.AudioCodec="flac",n.ApplyConditions=[].concat(function(e){if(Array.isArray(e))return c(e)}(r=n.ApplyConditions||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e): "Arguments"===n||/^(?:Ui|I)nt(?: 8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),te),ne.push(n),e.AudioCodec=t.filter((function(e){return"flac"!=e})).join(",")}}var r})),(ee=L.TranscodingProfiles).push.apply(ee,ne)}var re=42,ie="high|main|baseline|constrained baseline";(a.A.tizen||a.A.web0s||o.canPlayType('video/mp4; codecs="avc1.640833"').replace(/no/,""))&&(re=51),(a.A.tizenVersion>=5&&window.NativeShell||o.canPlayType('video/mp4; codecs="avc1.640834"').replace(/no/,""))&&(re=52),!o.canPlayType('video/mp4; codecs="avc1.6e0033"').replace(/no/,"")||a.A.safari||a.A.iOS||a.A.web0s||a.A.edge||a.A.mobile||a.A.tizen||(ie+="|high 10");var oe=120,ae="main";(o.canPlayType('video/mp4; codecs="hvc1.1.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.1.4.L123"').replace(/no/,""))&&(oe=123),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L123"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L123"').replace(/no/,""))&&(oe=123,ae="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L153"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L153"').replace(/no/,""))&&(oe=153,ae="main|main 10"),(o.canPlayType('video/mp4; codecs="hvc1.2.4.L183"').replace(/no/,"")||o.canPlayType('video/mp4; codecs="hev1.2.4.L183"').replace(/no/,""))&&(oe=183,ae="main|main 10");var se=15;o.canPlayType('video/mp4; codecs="av01.0.16M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.16M.10"').replace(/no/,"")&&(se=16),o.canPlayType('video/mp4; codecs="av01.0.17M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.17M.10"').replace(/no/,"")&&(se=17),o.canPlayType('video/mp4; codecs="av01.0.18M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.18M.10"').replace(/no/,"")&&(se=18),o.canPlayType('video/mp4; codecs="av01.0.19M.08"').replace(/no/,"")&&o.canPlayType('video/mp4; codecs="av01.0.19M.10"').replace(/no/,"")&&(se=19);var le="SDR",ue="SDR",ce="SDR";if(a.A.tizenVersion>=3&&(le+="|DOVIWithSDR"),S(e)&&(le+="|HDR10",ue+="|HDR10",ce+="|HDR10",a.A.tizenVersion>=3&&(le+="|DOVIWithHDR10")),function(e){var t;return null!==(t=e.supportsHlg)&&void 0!==t?t:S(e)}(e)&&(le+="|HLG",ue+="|HLG",ce+="|HLG",a.A.tizenVersion>=3&&(le+="|DOVIWithHLG")),A(e)){var de=function(e){if(a.A.xboxOne)return[5,8];var t=[];return e.canPlayType&&(e.canPlayType('video/mp4; codecs="dvh1.05.06"').replace(/no/,"")&&t.push(5),(e.canPlayType('video/mp4; codecs="dvh1.08.06"').replace(/no/,"")||a.A.web0sVersion>=4)&&t.push(8)),t}(o);de.includes(5)&&(le+="|DOVI"),de.includes(8)&&(le+="|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR"),function(e){var t;return null===(t=e.canPlayType)||void 0===t?void 0:t.call(e,'video/mp4; codecs="dav1.10.06"').replace(/no/,"")}(o)&&(ce+="|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR")}var fe=[{Condition: "NotEquals",Property: "IsAnamorphic",Value: "true",IsRequired:!1},{Condition: "EqualsAny",Property: "VideoProfile",Value:ie,IsRequired:!1},{Condition: "EqualsAny",Property: "VideoRangeType",Value: "SDR",IsRequired:!1},{Condition: "LessThanEqual",Property: "VideoLevel",Value:re.toString(),IsRequired:!1}],pe=[{Condition: "NotEquals",Property: "IsAnamorphic",Value: "true",IsRequired:!1},{Condition: "EqualsAny",Property: "VideoProfile",Value:ae,IsRequired:!1},{Condition: "EqualsAny",Property: "VideoRangeType",Value:le,IsRequired:!1},{Condition: "LessThanEqual",Property: "VideoLevel",Value:oe.toString(),IsRequired:!1}],he=[{Condition: "EqualsAny",Property: "VideoRangeType",Value:ue,IsRequired:!1}],ye=[{Condition: "NotEquals",Property: "IsAnamorphic",Value: "true",IsRequired:!1},{Condition: "EqualsAny",Property: "VideoProfile",Value: "main",IsRequired:!1},{Condition: "EqualsAny",Property: "VideoRangeType",Value:ce,IsRequired:!1},{Condition: "LessThanEqual",Property: "VideoLevel",Value:se.toString(),IsRequired:!1}];a.A.edgeUwp||a.A.tizen||a.A.web0s||(fe.push({Condition: "NotEquals",Property: "IsInterlaced",Value: "true",IsRequired:!1}),pe.push({Condition: "NotEquals",Property: "IsInterlaced",Value: "true",IsRequired:!1})),N&&(fe.push({Condition: "LessThanEqual",Property: "Width",Value:N.toString(),IsRequired:!1}),pe.push({Condition: "LessThanEqual",Property: "Width",Value:N.toString(),IsRequired:!1}),ye.push({Condition: "LessThanEqual",Property: "Width",Value:N.toString(),IsRequired:!1}));var me=(function(){var e=!1;if(a.A.tizen)try{e=!webapis.productinfo.isUdPanelSupported(),console.debug("isTizenFhd = "+e)}catch(e){console.error("isUdPanelSupported() error code = "+e.code)}var t=null;return a.A.ps4?t=8e6:a.A.xboxOne?t=12e6:a.A.tizen&&e&&(t=2e7),t}()||"").toString(),ve=me,ge=me,be=me;if(ve&&fe.push({Condition: "LessThanEqual",Property: "VideoBitrate",Value:ve,IsRequired:!0}),ge&&pe.push({Condition: "LessThanEqual",Property: "VideoBitrate",Value:ge,IsRequired:!0}),be&&ye.push({Condition: "LessThanEqual",Property: "VideoBitrate",Value:be,IsRequired:!0}),a.A.safari&&(pe.push({Condition: "EqualsAny",Property: "VideoCodecTag",Value: "hvc1|dvh1",IsRequired:!0}),pe.push({Condition: "LessThanEqual",Property: "VideoFramerate",Value: "60",IsRequired:!0})),a.A.iOS&&a.A.iOSVersion<13){var we={Type: "Video",Codec: "h264",Container: "ts",Conditions:fe.filter((function(e){return"VideoLevel"!==e.Property}))};we.Conditions.push({Condition: "LessThanEqual",Property: "VideoLevel",Value: "42",IsRequired:!1}),L.CodecProfiles.push(we);var xe={Type: "Video",Codec: "h264",Container: "mp4",Conditions:fe.filter((function(e){return"VideoLevel"!==e.Property}))};xe.Conditions.push({Condition: "LessThanEqual",Property: "VideoLevel",Value: "42",IsRequired:!1}),L.CodecProfiles.push(xe)}a.A.safari&&s.A.enableHi10p()&&L.CodecProfiles.push({Type: "Video",Container: "hls",SubContainer: "mp4",Codec: "h264",Conditions: [{Condition: "EqualsAny",Property: "VideoProfile",Value:ie+"|high 10",IsRequired:!1}]}),L.CodecProfiles.push({Type: "Video",Codec: "h264",Conditions:fe}),a.A.web0s&&A(e)&&L.CodecProfiles.push({Type: "Video",Container: "-mp4,ts",Codec: "hevc",Conditions: [{Condition: "EqualsAny",Property: "VideoRangeType",Value:le.split("|").filter((function(e){return!e.startsWith("DOVI")})).join("|"),IsRequired:!1}]}),L.CodecProfiles.push({Type: "Video",Codec: "hevc",Conditions:pe}),L.CodecProfiles.push({Type: "Video",Codec: "vp9",Conditions:he}),L.CodecProfiles.push({Type: "Video",Codec: "av1",Conditions:ye});var Se=[];me&&Se.push({Condition: "LessThanEqual",Property: "VideoBitrate",Value:me}),N&&Se.push({Condition: "LessThanEqual",Property: "Width",Value:N.toString(),IsRequired:!1}),Se.length&&L.CodecProfiles.push({Type: "Video",Conditions:Se}),L.SubtitleProfiles=[];var Ae=s.A.get("subtitleburnin"),Pe="true"===s.A.get("subtitlerenderpgs");return"all"!==Ae&&((a.A.tizen||(null==r&&(r=null!=document.createElement("video").textTracks),r))&&L.SubtitleProfiles.push({Format: "vtt",Method: "External"}),!1===e.enableSsaRender||e.isRetry||"allcomplexformats"===Ae||(L.SubtitleProfiles.push({Format: "ass",Method: "External"}),L.SubtitleProfiles.push({Format: "ssa",Method: "External"})),null==i&&(i=null!=document.createElement("canvas").getContext("2d")),i&&!1!==e.enablePgsRender&&!e.isRetry&&Pe&&"allcomplexformats"!==Ae&&"onlyimageformats"!==Ae&&L.SubtitleProfiles.push({Format: "pgssub",Method: "External"})),L.ResponseProfiles=[],L.ResponseProfiles.push({Type: "Video",Container: "m4v",MimeType: "video/mp4"}),L}},98320:function(e,t,n){"use strict";n.d(t,{Rt:function(){return a},YU:function(){return l},mk:function(){return i}}),n(84734),n(67593),n(96054),n(95021),n(53819);var r=n(5898);function i(e,t){var n=e.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|([+-])(\d{2}):(\d{2}))?/);if(!n)throw new Error("Couldn't parse ISO 8601 date string '"+e+"'");var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var o=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);if(n[7]>0&&(o+=Math.round(1e3*n[7])),"Z"!==n[8]&&n[10]){var a=60*n[10]*60*1e3;n[11]&&(a+=60*n[11]*1e3),"-"===n[9]?o-=a:o+=a}else!1===t&&(o+=6e4*new Date(o).getTimezoneOffset());return new Date(o)}var o=function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}();function a(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleString(n,t)}return e.toLocaleString()}function s(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleTimeString(n,t)}return e.toLocaleTimeString()}function l(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}return a(e)}t.Ay={parseISO8601Date:i,getDisplayRunningTime:function(e){var t=36e9,n=6e8,i=[],o=e/t;(o=Math.floor(o))&&i.push(o.toLocaleString(r.Ay.getCurrentDateTimeLocale()));var a=(e-=o*t)/n;e-=(a=Math.floor(a))*n,a=a<10&&o?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+a.toLocaleString(r.Ay.getCurrentDateTimeLocale()):a.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(a);var s=e/1e7;return s=(s=Math.floor(s))<10?(0).toLocaleString(r.Ay.getCurrentDateTimeLocale())+s.toLocaleString(r.Ay.getCurrentDateTimeLocale()):s.toLocaleString(r.Ay.getCurrentDateTimeLocale()),i.push(s),i.join(":")},getDisplayDuration:function(e){var t=Math.round(e/6e8)||1,n=Math.floor(t/60),r=t%60,i=[];return n>0&&i.push("".concat(n,"h")),i.push("".concat(r,"m")),i.join(" ")},toLocaleDateString:function(e,t){if(!e)throw new Error("date cannot be null");if(t=t||{},o){var n=r.Ay.getCurrentDateTimeLocale();if(n)return e.toLocaleDateString(n,t)}var i=function(e){var t=[];for(var n in e)t.push({name:n,value:e[n]});return t}(t);if(1===i.length&&"weekday"===i[0].name){var a=[];return a[0]="Sun",a[1]="Mon",a[2]="Tue",a[3]="Wed",a[4]="Thu",a[5]="Fri",a[6]="Sat",a[e.getDay()]}return e.toLocaleDateString()},toLocaleString:a,getDisplayTime:function(e){if(!e)throw new Error("date cannot be null");if("string"==typeof e)try{e=i(e,!0)}catch(t){return e}if(o)return s(e,{hour: "numeric",minute: "2-digit"});var t=s(e),n=t.toLowerCase();if(-1!==n.indexOf("am")||-1!==n.indexOf("pm")){var r=e.getHours()%12,a=e.getHours()>11?"pm": "am";r||(r=12);var l=e.getMinutes();l<10&&(l="0"+l),t=r+(l=":"+l)+a}else{var u=t.split(":");u.length>2&&(u.length=2,t=u.join(":"))}return t},isRelativeDay:function(e,t){if(!e)throw new Error("date cannot be null");var n=new Date,r=n.getDate()+t;return n.setDate(r),e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===r},toLocaleTimeString:s,supportsLocalization:function(){return o}}},47629:function(e,t,n){"use strict";function r(e,t){for(var n=0,r=t.length;n<r;n++)if(e.contains(t[n]))return!0;return!1}n.d(t,{f:function(){return u},q2:function(){return l}}),n(84734),n(26448),n(36947),n(95021),n(93062);var i,o,a=!1;try{var s=Object.defineProperty({},"capture",{get:function(){return a=!0,null}});window.addEventListener("test",null,s)}catch(e){}function l(e,t,n,r){var i=r||{};a||(i=i.capture),e.addEventListener(t,n,i)}function u(e,t,n,r){var i=r||{};a||(i=i.capture),e.removeEventListener(t,n,i)}function c(){i=null}var d,f,p=[480,720,1280,1440,1920,2560,3840,5120,7680];function h(){if(d)return d;var e=document.createElement("div"),t={animation: "animationend",OAnimation: "oAnimationEnd",MozAnimation: "animationend",WebkitAnimation: "webkitAnimationEnd"};for(var n in t)if(void 0!==e.style[n])return d=t[n],t[n];return d="animationend"}t.Ay={parentWithAttribute:function(e,t,n){for(;n?e.getAttribute(t)!==n:!e.getAttribute(t);){var r;if(null===(r=e=e.parentNode)||void 0===r||!r.getAttribute)return null}return e},parentWithClass:function(e,t){for(Array.isArray(t)||(t=[t]);!e.classList||!r(e.classList,t);)if(!(e=e.parentNode))return null;return e},parentWithTag:function(e,t){for(Array.isArray(t)||(t=[t]);-1===t.indexOf(e.tagName||"");)if(!(e=e.parentNode))return null;return e},addEventListener:l,removeEventListener:u,getWindowSize:function(){return i||(i={innerHeight:window.innerHeight,innerWidth:window.innerWidth},o||(o=!0,l(window,"orientationchange",c,{passive:!0}),l(window,"resize",c,{passive:!0}))),i},getScreenWidth:function(){var e=window.innerWidth,t=window.innerHeight;return t>e&&(e=t*(16/9)),p.sort((function(t,n){return Math.abs(e-t)-Math.abs(e-n)})),p[0]},setElementTitle:function(e,t,n){e.setAttribute("title",t),e.setAttribute("aria-label",n)},whichTransitionEvent:function(){if(f)return f;var e=document.createElement("div"),t={transition: "transitionend",OTransition: "oTransitionEnd",MozTransition: "transitionend",WebkitTransition: "webkitTransitionEnd"};for(var n in t)if(void 0!==e.style[n])return f=t[n],t[n];return f="transitionend"},whichAnimationEvent:h,whichAnimationCancelEvent:function(){return h().replace("animationend","animationcancel").replace("AnimationEnd","AnimationCancel")}}},38490:function(e,t,n){"use strict";n.r(t),n.d(t,{handleCommand:function(){return v},idleTime:function(){return d},notify:function(){return u},notifyMouseMove:function(){return c},off:function(){return y},on:function(){return h},select:function(){return f}});var r=n(47750),i=n(9164),o=n(70267),a=n(47629),s=n(22622),l=(new Date).getTime();function u(){l=(new Date).getTime(),v("unknown")}function c(){l=(new Date).getTime()}function d(){return(new Date).getTime()-l}function f(e){e.click()}var p=0;function h(e,t){p++,a.Ay.addEventListener(e,"command",t,{})}function y(e,t){p&&p--,a.Ay.removeEventListener(e,"command",t,{})}var m={};function v(e,t){l=(new Date).getTime();var n=t?t.sourceElement:null;if(n&&(n=i.A.focusableParent(n)),!n){n=document.activeElement||window;var a=document.querySelectorAll(".dialogContainer .dialog.opened"),u=a.length?a[a.length-1]:null;u&&!u.contains(n)&&(n=u)}if(p){var c=new CustomEvent("command",{detail: {command:e},bubbles:!0,cancelable:!0});if(!n.dispatchEvent(c))return}var d={up:function(){i.A.moveUp(n)},down:function(){i.A.moveDown(n)},left:function(){i.A.moveLeft(n)},right:function(){i.A.moveRight(n)},home:function(){o.appRouter.goHome()},settings:function(){o.appRouter.showSettings()},back:function(){o.appRouter.canGoBack()?o.appRouter.back():s.g.supports("exit")&&s.g.exit()},select:function(){f(n)},nextchapter:function(){r.f.nextChapter()},next:function(){r.f.nextTrack()},nexttrack:function(){r.f.nextTrack()},previous:function(){r.f.previousTrack()},previoustrack:function(){r.f.previousTrack()},previouschapter:function(){r.f.previousChapter()},guide:function(){o.appRouter.showGuide()},recordedtv:function(){o.appRouter.showRecordedTV()},livetv:function(){o.appRouter.showLiveTV()},mute:function(){r.f.setMute(!0)},unmute:function(){r.f.setMute(!1)},togglemute:function(){r.f.toggleMute()},channelup:function(){r.f.channelUp()},channeldown:function(){r.f.channelDown()},volumedown:function(){r.f.volumeDown()},volumeup:function(){r.f.volumeUp()},play:function(){r.f.unpause()},pause:function(){r.f.pause()},playpause:function(){r.f.playPause()},stop:function(){var e,t,n;t=m[e="stop"]||0,!((n=(new Date).getTime())-t<1e3||(m[e]=n,0))&&r.f.stop()},changezoom:function(){r.f.toggleAspectRatio()},increaseplaybackrate:function(){r.f.increasePlaybackRate()},decreaseplaybackrate:function(){r.f.decreasePlaybackRate()},changeaudiotrack:function(){r.f.changeAudioStream()},changesubtitletrack:function(){r.f.changeSubtitleStream()},search:function(){o.appRouter.showSearch()},favorites:function(){o.appRouter.showFavorites()},fastforward:function(){r.f.fastForward()},rewind:function(){r.f.rewind()},seek:function(){r.f.seekMs(t)},togglefullscreen:function(){r.f.toggleFullscreen()},disabledisplaymirror:function(){r.f.enableDisplayMirroring(!1)},enabledisplaymirror:function(){r.f.enableDisplayMirroring(!0)},toggledisplaymirror:function(){r.f.toggleDisplayMirroring()},nowplaying:function(){o.appRouter.showNowPlaying()},repeatnone:function(){r.f.setRepeatMode("RepeatNone")},repeatall:function(){r.f.setRepeatMode("RepeatAll")},repeatone:function(){r.f.setRepeatMode("RepeatOne")},unknown:function(){}}[e];void 0!==d?d.call():console.debug("inputManager: tried to process command with no action assigned: ".concat(e))}a.Ay.addEventListener(document,"click",u,{passive:!0}),t.default={handleCommand:v,notify:u,notifyMouseMove:c,idleTime:d,on:h,off:y}},74550:function(e,t,n){"use strict";n(76281),n(84734),n(44962),n(78557),n(90076),n(83994),n(82367);var r=n(34789),i=n(38490),o=n(46782),a=n(90381),s={13: "Enter",19: "Pause",27: "Escape",32: "Space",37: "ArrowLeft",38: "ArrowUp",39: "ArrowRight",40: "ArrowDown",412: "MediaRewind",413: "MediaStop",415: "MediaPlay",417: "MediaFastForward",461: "Back",10009: "Back",10232: "MediaTrackPrevious",10233: "MediaTrackNext",10252: "MediaPlayPause"},l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","BrowserHome","Find"],u=["MediaRewind","MediaStop","MediaPlay","MediaFastForward","MediaTrackPrevious","MediaTrackNext","MediaPlayPause"],c=["INPUT","TEXTAREA"],d=["button","checkbox","color","file","hidden","image","radio","reset","submit"],f=!1;try{f="key"in new KeyboardEvent("keydown")}catch(e){console.error("error checking 'key' field")}if(!f)for(var p=65;p<=90;p++)s[p]=String.fromCharCode(p).toLowerCase();function h(e){return s[e.keyCode]||e.key}function y(e){return-1!=l.indexOf(e)}function m(e){return!(!e||!c.includes(e.tagName)||"INPUT"===e.tagName&&d.includes(e.type))}navigator.getGamepads&&a.A.enableGamepad()&&window.addEventListener("gamepadconnected",(function e(){console.log("Gamepad connected! Attaching gamepadtokey.js script"),window.removeEventListener("gamepadconnected",e),n.e(84348).then(n.bind(n,84348))})),t.Ay={enable:function(){var e="mediaSession"in navigator;window.addEventListener("keydown",(function(t){if(!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)){var n=h(t);if((o.A.tv||!y(n))&&(r.A.tv||!function(e){return u.includes(e)}(n)||!e)){var a=!0;switch(n){case"ArrowLeft":m(document.activeElement)?a=!1:i.default.handleCommand("left");break;case"ArrowUp":i.default.handleCommand("up");break;case"ArrowRight":m(document.activeElement)?a=!1:i.default.handleCommand("right");break;case"ArrowDown":i.default.handleCommand("down");break;case"Back":i.default.handleCommand("back");break;case"Backspace":r.A.tv&&r.A.hisense&&r.A.vidaa?i.default.handleCommand("back"):a=!1;break;case"Escape":o.A.tv?i.default.handleCommand("back"):a=!1;break;case"Find":i.default.handleCommand("search");break;case"BrowserHome":i.default.handleCommand("home");break;case"MediaPlay":i.default.handleCommand("play");break;case"Pause":i.default.handleCommand("pause");break;case"MediaPlayPause":i.default.handleCommand("playpause");break;case"MediaRewind":i.default.handleCommand("rewind");break;case"MediaFastForward":i.default.handleCommand("fastforward");break;case"MediaStop":i.default.handleCommand("stop");break;case"MediaTrackPrevious":i.default.handleCommand("previoustrack");break;case"MediaTrackNext":i.default.handleCommand("nexttrack");break;default:a=!1}a&&(console.debug("disabling default event handling"),t.preventDefault())}}}))},getKeyName:h,isNavigationKey:y}},40787:function(e,t,n){"use strict";var r,i,o,a=n(38490),s=n(9164),l=n(34789),u=n(46782),c=n(47629),d=n(44797),f={},p=(new Date).getTime();function h(){var e=document.body.classList;e.remove("mouseIdle"),e.remove("mouseIdle-tv")}function y(){r&&(r=!1,h(),d.A.trigger(f,"mouseactive"))}function m(){var e;r||(r=!0,(e=document.body.classList).add("mouseIdle"),u.A.tv&&e.add("mouseIdle-tv"),d.A.trigger(f,"mouseidle"))}function v(e){var t=e.screenX||e.clientX,n=e.screenY||e.clientY;if(void 0!==t||void 0!==n){var r=i;r?Math.abs(t-r.x)<10&&Math.abs(n-r.y)<10||(r.x=t,r.y=n,p=(new Date).getTime(),a.default.notifyMouseMove(),y()):i={x:t,y:n}}}function g(e){if("mouse"===(e.pointerType||(u.A.mobile?"touch": "mouse"))&&!r){var t=s.A.focusableParent(e.target);t&&s.A.focus(t)}}function b(){!r&&(new Date).getTime()-p>=5e3&&m()}function w(){o&&(clearInterval(o),o=null),h(),c.Ay.removeEventListener(document,window.PointerEvent?"pointermove": "mousemove",v,{passive:!0}),u.A.mobile||(o||(o=setInterval(b,5e3)),c.Ay.addEventListener(document,window.PointerEvent?"pointermove": "mousemove",v,{passive:!0})),c.Ay.removeEventListener(document,window.PointerEvent?"pointerenter": "mouseenter",g,{capture:!0,passive:!0}),u.A.tv&&!l.A.web0s&&l.A.tv&&c.Ay.addEventListener(document,window.PointerEvent?"pointerenter": "mouseenter",g,{capture:!0,passive:!0})}w(),d.A.on(u.A,"modechange",w),t.Ay={hideCursor:m,showCursor:y}},10736:function(e,t,n){"use strict";n.r(t),n(78557),n(96054),n(23630);var r=n(47750),i=n(38829),o=n(38490),a=n(9164),s=n(70267),l=n(86191),u=n(50764),c=n(41177),d=n(44797),f=n(38783),p={};function h(){o.default.notify()}function y(e,t){var n,l=this,y=null===(n=i.X.firstOfType(f.Q.SyncPlay))||void 0===n?void 0:n.instance;if("Play"===t.MessageType){h();var m=l.serverInfo().Id;"PlayNext"===t.Data.PlayCommand?r.f.queueNext({ids:t.Data.ItemIds,serverId:m}): "PlayLast"===t.Data.PlayCommand?r.f.queue({ids:t.Data.ItemIds,serverId:m}):r.f.play({ids:t.Data.ItemIds,startPositionTicks:t.Data.StartPositionTicks,mediaSourceId:t.Data.MediaSourceId,audioStreamIndex:t.Data.AudioStreamIndex,subtitleStreamIndex:t.Data.SubtitleStreamIndex,startIndex:t.Data.StartIndex,serverId:m})}else if("Playstate"===t.MessageType)"Stop"===t.Data.Command?o.default.handleCommand("stop"): "Pause"===t.Data.Command?o.default.handleCommand("pause"): "Unpause"===t.Data.Command?o.default.handleCommand("play"): "PlayPause"===t.Data.Command?o.default.handleCommand("playpause"): "Seek"===t.Data.Command?r.f.seek(t.Data.SeekPositionTicks): "NextTrack"===t.Data.Command?o.default.handleCommand("next"): "PreviousTrack"===t.Data.Command?o.default.handleCommand("previous"):h();else if("GeneralCommand"===t.MessageType)!function(e,t){switch(console.debug("Received command: "+e.Name),e.Name){case"Select":return void o.default.handleCommand("select");case"Back":return void o.default.handleCommand("back");case"MoveUp":return void o.default.handleCommand("up");case"MoveDown":return void o.default.handleCommand("down");case"MoveLeft":return void o.default.handleCommand("left");case"MoveRight":return void o.default.handleCommand("right");case"PageUp":return void o.default.handleCommand("pageup");case"PageDown":return void o.default.handleCommand("pagedown");case"PlayTrailers":!function(e,t){e.getItem(e.getCurrentUserId(),t).then((function(e){r.f.playTrailers(e)}))}(t,e.Arguments.ItemId);break;case"SetRepeatMode":r.f.setRepeatMode(e.Arguments.RepeatMode);break;case"SetShuffleQueue":r.f.setQueueShuffleMode(e.Arguments.ShuffleMode);break;case"VolumeUp":return void o.default.handleCommand("volumeup");case"VolumeDown":return void o.default.handleCommand("volumedown");case"ChannelUp":return void o.default.handleCommand("channelup");case"ChannelDown":return void o.default.handleCommand("channeldown");case"Mute":return void o.default.handleCommand("mute");case"Unmute":return void o.default.handleCommand("unmute");case"ToggleMute":return void o.default.handleCommand("togglemute");case"SetVolume":h(),r.f.setVolume(e.Arguments.Volume);break;case"SetAudioStreamIndex":h(),r.f.setAudioStreamIndex(parseInt(e.Arguments.Index,10));break;case"SetSubtitleStreamIndex":h(),r.f.setSubtitleStreamIndex(parseInt(e.Arguments.Index,10));break;case"ToggleFullscreen":return void o.default.handleCommand("togglefullscreen");case"GoHome":return void o.default.handleCommand("home");case"GoToSettings":return void o.default.handleCommand("settings");case"DisplayContent":!function(e,t){r.f.isPlayingLocally(["Video","Book"])||s.appRouter.showItem(e.Arguments.ItemId,t.serverId())}(e,t);break;case"GoToSearch":return void o.default.handleCommand("search");case"DisplayMessage":!function(e){var t=e.Arguments;t.TimeoutMs?(0,u.A)({title:t.Header,text:t.Text}):(0,c.A)({title:t.Header,text:t.Text})}(e);break;case"ToggleOsd":case"ToggleContextMenu":case"SendKey":break;case"SendString":a.A.sendText(e.Arguments.String);break;default:console.debug("processGeneralCommand does not recognize: "+e.Name)}h()}(t.Data,l);else if("UserDataChanged"===t.MessageType){if(t.Data.UserId===l.getCurrentUserId())for(var v=0,g=t.Data.UserDataList.length;v<g;v++)d.A.trigger(p,"UserDataChanged",[l,t.Data.UserDataList[v]])}else"SyncPlayCommand"===t.MessageType?null==y||y.Manager.processCommand(t.Data,l): "SyncPlayGroupUpdate"===t.MessageType?null==y||y.Manager.processGroupUpdate(t.Data,l):d.A.trigger(p,t.MessageType,[l,t.Data])}function m(e){d.A.off(e,"message",y),d.A.on(e,"message",y)}l.A.getApiClients().forEach(m),d.A.on(l.A,"apiclientcreated",(function(e,t){m(t)})),window.ServerNotifications=p,t.default=p},90381:function(e,t,n){"use strict";n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(78557),n(96054),n(73687),n(83994),n(90580),n(82367);var r=n(34789),i=n(44797),o=n(44305);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 s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var c=new WeakSet,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),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,c)},(t=[{key: "enableAutoLogin",value:function(e){return void 0!==e&&this.set("enableAutoLogin",e.toString()),(0,o.G4)(this.get("enableAutoLogin"),!0)}},{key: "enableGamepad",value:function(e){return void 0!==e?this.set("enableGamepad",e.toString()):(0,o.G4)(this.get("enableGamepad"),!1)}},{key: "enableSmoothScroll",value:function(e){return void 0!==e?this.set("enableSmoothScroll",e.toString()):(0,o.G4)(this.get("enableSmoothScroll"),!!r.A.tizen)}},{key: "enableSystemExternalPlayers",value:function(e){return void 0!==e&&this.set("enableSystemExternalPlayers",e.toString()),(0,o.G4)(this.get("enableSystemExternalPlayers"),!1)}},{key: "enableAutomaticBitrateDetection",value:function(e,t,n){var r="enableautobitratebitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t&&(n=!0),this.set(r,n.toString())),!(!e||"Audio"!==t)||(0,o.G4)(this.get(r),!0)}},{key: "maxStreamingBitrate",value:function(e,t,n){var r="maxbitrate-"+t+"-"+e;return void 0!==n&&(e&&"Audio"===t||this.set(r,n)),e&&"Audio"===t?15e7:parseInt(this.get(r)||"0",10)||15e5}},{key: "maxStaticMusicBitrate",value:function(e){void 0!==e&&this.set("maxStaticMusicBitrate",e);var t=32e4;return parseInt(this.get("maxStaticMusicBitrate")||t.toString(),10)||t}},{key: "maxChromecastBitrate",value:function(e){return void 0!==e&&this.set("chromecastBitrate1",e),(e=this.get("chromecastBitrate1"))?parseInt(e,10): null}},{key: "maxVideoWidth",value:function(e){return void 0!==e?this.set("maxVideoWidth",e.toString()):parseInt(this.get("maxVideoWidth")||"0",10)||0}},{key: "limitSupportedVideoResolution",value:function(e){return void 0!==e?this.set("limitSupportedVideoResolution",e.toString()):(0,o.G4)(this.get("limitSupportedVideoResolution"),!1)}},{key: "preferredTranscodeVideoCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoCodec",e):this.get("preferredTranscodeVideoCodec")||""}},{key: "preferredTranscodeVideoAudioCodec",value:function(e){return void 0!==e?this.set("preferredTranscodeVideoAudioCodec",e):this.get("preferredTranscodeVideoAudioCodec")||""}},{key: "alwaysBurnInSubtitleWhenTranscoding",value:function(e){return void 0!==e?this.set("alwaysBurnInSubtitleWhenTranscoding",e.toString()):(0,o.G4)(this.get("alwaysBurnInSubtitleWhenTranscoding"),!1)}},{key: "enableDts",value:function(e){return void 0!==e?this.set("enableDts",e.toString()):(0,o.G4)(this.get("enableDts"),!1)}},{key: "enableTrueHd",value:function(e){return void 0!==e?this.set("enableTrueHd",e.toString()):(0,o.G4)(this.get("enableTrueHd"),!1)}},{key: "enableHi10p",value:function(e){return void 0!==e?this.set("enableHi10p",e.toString()):(0,o.G4)(this.get("enableHi10p"),!1)}},{key: "disableVbrAudio",value:function(e){return void 0!==e?this.set("disableVbrAudio",e.toString()):(0,o.G4)(this.get("disableVbrAudio"),!1)}},{key: "alwaysRemuxFlac",value:function(e){return void 0!==e?this.set("alwaysRemuxFlac",e.toString()):(0,o.G4)(this.get("alwaysRemuxFlac"),!1)}},{key: "alwaysRemuxMp3",value:function(e){return void 0!==e?this.set("alwaysRemuxMp3",e.toString()):(0,o.G4)(this.get("alwaysRemuxMp3"),!1)}},{key: "set",value:function(e,t,n){var r=this.get(e,n);localStorage.setItem(u(c,this,f).call(this,e,n),t),r!==t&&i.A.trigger(this,"change",[e])}},{key: "get",value:function(e,t){return localStorage.getItem(u(c,this,f).call(this,e,t))}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function f(e,t){return t&&(e=t+"-"+e),e}t.A=new d},82885:function(e,t,n){"use strict";n.r(t),n.d(t,{UserSettings:function(){return v},allowedAudioChannels:function(){return k},backdropScreensaverInterval:function(){return W},currentSettings:function(){return g},customCss:function(){return ae},dashboardTheme:function(){return B},dateTimeLocale:function(){return z},detailsBanner:function(){return D},disableCustomCss:function(){return se},enableBackdrops:function(){return R},enableBlurhash:function(){return M},enableCinemaMode:function(){return j},enableFastFadein:function(){return O},enableNextVideoInfoOverlay:function(){return C},enableRewatchingInNextUp:function(){return X},enableThemeSongs:function(){return L},enableThemeVideos:function(){return _},enableVideoRemainingTime:function(){return E},get:function(){return A},getComicsPlayerSettings:function(){return ne},getData:function(){return w},getFilter:function(){return oe},getSavedView:function(){return le},getSortValuesLegacy:function(){return ce},getSubtitleAppearanceSettings:function(){return ee},importFrom:function(){return x},language:function(){return F},libraryPageSize:function(){return Q},loadQuerySettings:function(){return J},maxDaysForNextUp:function(){return K},preferFmp4HlsContainer:function(){return I},saveQuerySettings:function(){return Z},saveViewSetting:function(){return ue},screensaver:function(){return G},screensaverTime:function(){return Y},selectAudioNormalization:function(){return T},serverConfig:function(){return P},set:function(){return S},setComicsPlayerSettings:function(){return re},setFilter:function(){return ie},setSubtitleAppearanceSettings:function(){return te},setUserInfo:function(){return b},skin:function(){return q},skipBackLength:function(){return U},skipForwardLength:function(){return V},soundEffects:function(){return $},theme:function(){return H},useEpisodeImagesInNextUpAndResume:function(){return N}}),n(29305),n(32733),n(84701),n(81678),n(14382),n(76281),n(44962),n(20518),n(4754),n(94),n(77575),n(36947),n(83810),n(78557),n(96054),n(90076),n(73687),n(99425),n(83994),n(82367);var r=n(44797),i=n(44305),o=n(34789),a=n(90381);function s(e){return s="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},s(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function c(){var e=this;e.saveTimeout=null,e.currentApiClient.updateDisplayPreferences("usersettings",e.displayPrefs,e.currentUserId,"emby")}var d=["SortBy","SortOrder"],f="-filter",p=["Filters","HasSubtitles","HasTrailer","HasSpecialFeature","HasThemeSong","HasThemeVideo","Genres","OfficialRatings","Tags","VideoTypes","IsSD","IsHD","Is4K","Is3D","IsFavorite","IsMissing","IsUnaired","ParentIndexNumber","SeriesStatus","Years"];function h(e,t){return Object.keys(e).filter((function(e){return t.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{})}var y={verticalPosition: -3},m={langDir: "ltr",pagesPerView: 1},v=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: "setUserInfo",value:function(e,t){if(this.saveTimeout&&clearTimeout(this.saveTimeout),this.currentUserId=e,this.currentApiClient=t,!e)return this.displayPrefs=null,Promise.resolve();var n=this;return t.getDisplayPreferences("usersettings",e,"emby").then((function(e){e.CustomPrefs=e.CustomPrefs||{},n.displayPrefs=e}))}},{key: "getData",value:function(){return this.displayPrefs}},{key: "importFrom",value:function(e){this.displayPrefs=e.getData()}},{key: "set",value:function(e,t,n){var i,o=this.currentUserId,s=this.get(e,n),l=a.A.set(e,t,o);return!1!==n&&this.displayPrefs&&(this.displayPrefs.CustomPrefs[e]=null==t?t:t.toString(),(i=this).saveTimeout&&clearTimeout(i.saveTimeout),i.saveTimeout=setTimeout(c.bind(i),50)),s!==t&&r.A.trigger(this,"change",[e]),l}},{key: "get",value:function(e,t){var n=this.currentUserId;return!1!==t&&this.displayPrefs?this.displayPrefs.CustomPrefs[e]:a.A.get(e,n)}},{key: "serverConfig",value:function(e){var t=this.currentApiClient;return e?t.updateUserConfiguration(this.currentUserId,e):t.getUser(this.currentUserId).then((function(e){return e.Configuration}))}},{key: "allowedAudioChannels",value:function(e){return void 0!==e?this.set("allowedAudioChannels",e,!1):this.get("allowedAudioChannels",!1)||"-1"}},{key: "preferFmp4HlsContainer",value:function(e){return void 0!==e?this.set("preferFmp4HlsContainer",e.toString(),!1):(0,i.G4)(this.get("preferFmp4HlsContainer",!1),o.A.safari||o.A.firefox||o.A.chrome||o.A.edgeChromium)}},{key: "enableCinemaMode",value:function(e){return void 0!==e?this.set("enableCinemaMode",e.toString(),!1):(0,i.G4)(this.get("enableCinemaMode",!1),!0)}},{key: "selectAudioNormalization",value:function(e){return void 0!==e?this.set("selectAudioNormalization",e,!1):this.get("selectAudioNormalization",!1)||"TrackGain"}},{key: "enableNextVideoInfoOverlay",value:function(e){return void 0!==e?this.set("enableNextVideoInfoOverlay",e.toString()):(0,i.G4)(this.get("enableNextVideoInfoOverlay",!1),!0)}},{key: "enableVideoRemainingTime",value:function(e){return void 0!==e?this.set("enableVideoRemainingTime",e.toString()):(0,i.G4)(this.get("enableVideoRemainingTime",!1),!0)}},{key: "enableThemeSongs",value:function(e){return void 0!==e?this.set("enableThemeSongs",e.toString(),!1):(0,i.G4)(this.get("enableThemeSongs",!1),!1)}},{key: "enableThemeVideos",value:function(e){return void 0!==e?this.set("enableThemeVideos",e.toString(),!1):(0,i.G4)(this.get("enableThemeVideos",!1),!1)}},{key: "enableFastFadein",value:function(e){return void 0!==e?this.set("fastFadein",e.toString(),!1):(0,i.G4)(this.get("fastFadein",!1),!0)}},{key: "enableBlurhash",value:function(e){return void 0!==e?this.set("blurhash",e.toString(),!1):(0,i.G4)(this.get("blurhash",!1),!0)}},{key: "enableBackdrops",value:function(e){return void 0!==e?this.set("enableBackdrops",e.toString(),!1):(0,i.G4)(this.get("enableBackdrops",!1),!1)}},{key: "disableCustomCss",value:function(e){return void 0!==e?this.set("disableCustomCss",e.toString(),!1):(0,i.G4)(this.get("disableCustomCss",!1),!1)}},{key: "customCss",value:function(e){return void 0!==e?this.set("customCss",e.toString(),!1):this.get("customCss",!1)}},{key: "detailsBanner",value:function(e){return void 0!==e?this.set("detailsBanner",e.toString(),!1):(0,i.G4)(this.get("detailsBanner",!1),!0)}},{key: "useEpisodeImagesInNextUpAndResume",value:function(e){return void 0!==e?this.set("useEpisodeImagesInNextUpAndResume",e.toString(),!0):(0,i.G4)(this.get("useEpisodeImagesInNextUpAndResume",!0),!1)}},{key: "language",value:function(e){return void 0!==e?this.set("language",e.toString(),!1):this.get("language",!1)}},{key: "dateTimeLocale",value:function(e){return void 0!==e?this.set("datetimelocale",e.toString(),!1):this.get("datetimelocale",!1)}},{key: "skipBackLength",value:function(e){return void 0!==e?this.set("skipBackLength",e.toString()):parseInt(this.get("skipBackLength")||"10000",10)}},{key: "skipForwardLength",value:function(e){return void 0!==e?this.set("skipForwardLength",e.toString()):parseInt(this.get("skipForwardLength")||"30000",10)}},{key: "dashboardTheme",value:function(e){return void 0!==e?this.set("dashboardTheme",e):this.get("dashboardTheme")}},{key: "skin",value:function(e){return void 0!==e?this.set("skin",e,!1):this.get("skin",!1)}},{key: "theme",value:function(e){return void 0!==e?this.set("appTheme",e,!1):this.get("appTheme",!1)}},{key: "screensaver",value:function(e){return void 0!==e?this.set("screensaver",e,!1):this.get("screensaver",!1)}},{key: "backdropScreensaverInterval",value:function(e){return void 0!==e?this.set("backdropScreensaverInterval",e.toString(),!1):parseInt(this.get("backdropScreensaverInterval",!1),10)||5}},{key: "screensaverTime",value:function(e){return void 0!==e?this.set("screensaverTime",e.toString(),!1):parseInt(this.get("screensaverTime",!1),10)||180}},{key: "libraryPageSize",value:function(e){if(void 0!==e)return this.set("libraryPageSize",e.toString(),!1);var t=parseInt(this.get("libraryPageSize",!1),10);return 0===t?0:t||100}},{key: "maxDaysForNextUp",value:function(e){if(void 0!==e)return this.set("maxDaysForNextUp",e.toString(),!1);var t=parseInt(this.get("maxDaysForNextUp",!1),10);return 0===t?0:t||365}},{key: "enableRewatchingInNextUp",value:function(e){return void 0!==e?this.set("enableRewatchingInNextUp",e.toString(),!1):(0,i.G4)(this.get("enableRewatchingInNextUp",!1),!1)}},{key: "soundEffects",value:function(e){return void 0!==e?this.set("soundeffects",e,!1):this.get("soundeffects",!1)}},{key: "loadQuerySettings",value:function(e,t){var n=this.get(e),r=this.get(e+f,!1);return n&&(n=h(JSON.parse(n),d)),r&&(r=h(JSON.parse(r),p)),Object.assign(t,n,r)}},{key: "saveQuerySettings",value:function(e,t){var n=h(t,d),r=h(t,p);this.set(e,JSON.stringify(n)),this.set(e+f,JSON.stringify(r),!1)}},{key: "getSavedView",value:function(e){return this.get(e+"-_view")}},{key: "saveViewSetting",value:function(e,t){return this.set(e+"-_view",t)}},{key: "getSubtitleAppearanceSettings",value:function(e){return e=e||"localplayersubtitleappearance3",Object.assign(y,JSON.parse(this.get(e,!1)||"{}"))}},{key: "setSubtitleAppearanceSettings",value:function(e,t){return t=t||"localplayersubtitleappearance3",this.set(t,JSON.stringify(e),!1)}},{key: "getComicsPlayerSettings",value:function(e){var t=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return Object.assign(m,t[e])}},{key: "setComicsPlayerSettings",value:function(e,t){var n=JSON.parse(this.get("comicsPlayerSettings",!1)||"{}");return n[t]=e,this.set("comicsPlayerSettings",JSON.stringify(n),!1)}},{key: "setFilter",value:function(e,t){return this.set(e,t,!0)}},{key: "getFilter",value:function(e){return this.get(e,!0)}},{key: "getSortValuesLegacy",value:function(e,t){return{sortBy:this.getFilter(e+"-sortby")||t,sortOrder: "Descending"===this.getFilter(e+"-sortorder")?"Descending": "Ascending"}}}],t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),g=new v,b=g.setUserInfo.bind(g),w=g.getData.bind(g),x=g.importFrom.bind(g),S=g.set.bind(g),A=g.get.bind(g),P=g.serverConfig.bind(g),k=g.allowedAudioChannels.bind(g),I=g.preferFmp4HlsContainer.bind(g),j=g.enableCinemaMode.bind(g),T=g.selectAudioNormalization.bind(g),C=g.enableNextVideoInfoOverlay.bind(g),E=g.enableVideoRemainingTime.bind(g),L=g.enableThemeSongs.bind(g),_=g.enableThemeVideos.bind(g),O=g.enableFastFadein.bind(g),M=g.enableBlurhash.bind(g),R=g.enableBackdrops.bind(g),D=g.detailsBanner.bind(g),N=g.useEpisodeImagesInNextUpAndResume.bind(g),F=g.language.bind(g),z=g.dateTimeLocale.bind(g),U=g.skipBackLength.bind(g),V=g.skipForwardLength.bind(g),B=g.dashboardTheme.bind(g),q=g.skin.bind(g),H=g.theme.bind(g),G=g.screensaver.bind(g),W=g.backdropScreensaverInterval.bind(g),Y=g.screensaverTime.bind(g),Q=g.libraryPageSize.bind(g),K=g.maxDaysForNextUp.bind(g),X=g.enableRewatchingInNextUp.bind(g),$=g.soundEffects.bind(g),J=g.loadQuerySettings.bind(g),Z=g.saveQuerySettings.bind(g),ee=g.getSubtitleAppearanceSettings.bind(g),te=g.setSubtitleAppearanceSettings.bind(g),ne=g.getComicsPlayerSettings.bind(g),re=g.setComicsPlayerSettings.bind(g),ie=g.setFilter.bind(g),oe=g.getFilter.bind(g),ae=g.customCss.bind(g),se=g.disableCustomCss.bind(g),le=g.getSavedView.bind(g),ue=g.saveViewSetting.bind(g),ce=g.getSortValuesLegacy.bind(g)},51876:function(e,t,n){"use strict";n.d(t,{$A:function(){return f},$D:function(){return v},Io:function(){return d},T5:function(){return b},Ve:function(){return p},x0:function(){return g},xy:function(){return w}}),n(29305),n(32733),n(51770),n(84701),n(2623),n(69703),n(44962),n(87324),n(89336),n(10849),n(70389),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(23630),n(82367);var r,i=n(68272),o=n(74659);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 s(){s=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function p(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var S={};d(S,l,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,l)&&(S=P);var k=x.prototype=b.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,s,l){var u=p(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==a(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=p(t,n,r);if("normal"===u.type){if(i=r.done?v:y,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),d(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),d(k,c,"Generator"),d(k,l,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function l(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function u(){return c.apply(this,arguments)}function c(){var e;return e=s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.abrupt("return",Promise.resolve(r));case 2:return e.prev=2,e.next=5,(0,o.A)("config.json",{cache: "no-store"});case 5:if((t=e.sent).ok){e.next=8;break}throw new Error("network response was not ok");case 8:return e.next=10,t.json();case 10:return r=e.sent,e.abrupt("return",r);case 14:return e.prev=14,e.t0=e.catch(2),console.warn("failed to fetch the web config file:",e.t0),r=i,e.abrupt("return",r);case 19:case"end":return e.stop()}}),e,null,[[2,14]])})),c=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){l(o,r,i,a,s,"next",e)}function s(e){l(o,r,i,a,s,"throw",e)}a(void 0)}))},c.apply(this,arguments)}function d(){return u().then((function(e){return!!e.includeCorsCredentials})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function f(){return u().then((function(e){return!!e.multiserver})).catch((function(e){return console.log("cannot get web config:",e),!1}))}function p(){return u().then((function(e){return e.servers||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}var h={name: "Dark",id: "dark",default:!0},y=h,m=function(e){if(e){var t=e.find((function(e){return e.default}));if(t)return void(y=t)}y=h};function v(){return u().then((function(e){Array.isArray(e.themes)||console.error("web config is invalid, missing themes:",e);var t=Array.isArray(e.themes)?e.themes:i.themes;return m(t),t})).catch((function(e){return console.log("cannot get web config:",e),m(),i.themes}))}var g=function(){return y};function b(){return u().then((function(e){return e.menuLinks||console.error("web config is invalid, missing menuLinks:",e),e.menuLinks||[]})).catch((function(e){return console.log("cannot get web config:",e),[]}))}function w(){return u().then((function(e){return e.plugins||console.error("web config is invalid, missing plugins:",e),e.plugins||i.plugins})).catch((function(e){return console.log("cannot get web config:",e),i.plugins}))}},13615:function(e,t,n){"use strict";n(78557),n(23630),t.A={enableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.enableFullscreen&&window.NativeShell.enableFullscreen()},disableFullscreen:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.disableFullscreen&&window.NativeShell.disableFullscreen()},openUrl:function(e,t){var n;null!==(n=window.NativeShell)&&void 0!==n&&n.openUrl?window.NativeShell.openUrl(e,t):window.open(e,t||"_blank")},updateMediaSession:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateMediaSession&&window.NativeShell.updateMediaSession(e)},hideMediaSession:function(){var e;null!==(e=window.NativeShell)&&void 0!==e&&e.hideMediaSession&&window.NativeShell.hideMediaSession()},updateVolumeLevel:function(e){var t;null!==(t=window.NativeShell)&&void 0!==t&&t.updateVolumeLevel&&window.NativeShell.updateVolumeLevel(e)},downloadFiles:function(e){var t,n;return null!==(t=window.NativeShell)&&void 0!==t&&t.downloadFiles?(window.NativeShell.downloadFiles(e),!0):!(null===(n=window.NativeShell)||void 0===n||!n.downloadFile||(e.forEach((function(e){window.NativeShell.downloadFile(e)})),0))}}},54048:function(e,t,n){"use strict";n(14382),n(9698),n(78557);var r=n(10736),i=n(5898),o=n(86191),a=n(44797);n(10353),t.A=function(e){function t(){o.A.getApiClient(f).getScheduledTasks({IsEnabled:!0}).then(n)}function n(t){var n=t.filter((function(t){return t.Key==e.taskKey}))[0];if(e.panel&&(n?e.panel.classList.remove("hide"):e.panel.classList.add("hide")),n){"Idle"==n.State?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled"),d.setAttribute("data-taskid",n.Id);var r=(n.CurrentProgressPercentage||0).toFixed(1);if(e.progressElem&&(e.progressElem.value=r,"Running"==n.State?e.progressElem.classList.remove("hide"):e.progressElem.classList.add("hide")),e.lastResultElem){var o=n.LastExecutionResult?n.LastExecutionResult.Status: "";"Failed"==o?e.lastResultElem.html('<span style="color:#FF0000;">('+i.Ay.translate("LabelFailed")+")</span>"): "Cancelled"==o?e.lastResultElem.html('<span style="color:#0026FF;">('+i.Ay.translate("LabelCancelled")+")</span>"): "Aborted"==o?e.lastResultElem.html('<span style="color:#FF0000;">'+i.Ay.translate("LabelAbortedByServerShutdown")+"</span>"):e.lastResultElem.html(o)}}}function s(){var e;e=this.getAttribute("data-taskid"),o.A.getApiClient(f).startScheduledTask(e).then(t)}function l(e,t,r){t.serverId()===f&&n(r)}var u,c,d=e.button,f=ApiClient.serverId();e.panel&&e.panel.classList.add("hide"),"off"==e.mode?(d.removeEventListener("click",s),a.A.off(r.default,"ScheduledTasksInfo",l),o.A.getApiClient(f).sendMessage("ScheduledTasksInfoStop"),u&&clearInterval(u)):(d.addEventListener("click",s),t(),c=o.A.getApiClient(f),u&&clearInterval(u),c.sendMessage("ScheduledTasksInfoStart","1000,1000"),u=setInterval((function(){o.A.getApiClient(f).isMessageChannelOpen()||t()}),5e3),a.A.on(r.default,"ScheduledTasksInfo",l))}},39641:function(e,t,n){"use strict";n(69703),n(78557),n(90076);var r,i=n(51876),o=document.querySelector("#cssTheme");function a(){return(0,i.$D)()}t.A={getThemes:a,setTheme:function(e){return new Promise((function(t){r&&r===e?t():function(e){return a().then((function(t){var n;return e&&(n=t.find((function(t){return t.id===e}))),n||(n=(0,i.x0)()),{stylesheetPath: "themes/"+n.id+"/theme.css",themeId:n.id,color:n.color}}))}(e).then((function(e){if(r&&r===e.themeId)t();else{var n=e.stylesheetPath;o&&(o.removeAttribute("href"),r=null);var i=o;i||((i=document.createElement("link")).id="cssTheme",i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),document.body.appendChild(i));var a=function(e){e.target.removeEventListener("load",a),t()};i.addEventListener("load",a),i.setAttribute("href",n),o=i,r=e.themeId,document.getElementById("themeColor").content=e.color}}))}))}}},89100:function(e,t,n){"use strict";n.r(t),n.d(t,{alert:function(){return R},capabilities:function(){return D},confirm:function(){return U},getConfigurationResourceUrl:function(){return E},getCurrentUser:function(){return A},getCurrentUserId:function(){return I},getPluginUrl:function(){return C},hideLoadingMsg:function(){return F},logout:function(){return T},navigate:function(){return L},onServerChanged:function(){return j},pageClassOn:function(){return V},pageIdOn:function(){return B},processErrorResponse:function(){return M},processPluginConfigurationUpdateResult:function(){return _},processServerConfigurationUpdateResult:function(){return O},selectServer:function(){return N},serverAddress:function(){return P},showLoadingMsg:function(){return z}}),n(29305),n(32733),n(51770),n(84701),n(2623),n(14382),n(69703),n(44962),n(17731),n(86584),n(87324),n(89336),n(10849),n(70389),n(77575),n(36947),n(26437),n(52697),n(78557),n(90076),n(83994),n(64062),n(23630),n(82367);var r=n(86191),i=n(50764),o=n(8566),a=n(70267),s=n(41177),l=n(40532),u=n(5898),c=n(51876),d=n(98320),f=n(89166),p=n(21840),h=n(79754),y=n(92305),m=n(83375),v=n(53678),g=n(64963);function b(e){return b="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},b(e)}function w(){w=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol: {},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function d(e,t,n){try{return{type: "normal",arg:e.call(t,n)}}catch(e){return{type: "throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",y="completed",m={};function v(){}function g(){}function x(){}var S={};u(S,a,(function(){return this}));var A=Object.getPrototypeOf,P=A&&A(A(O([])));P&&P!==n&&r.call(P,a)&&(S=P);var k=x.prototype=v.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==b(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc: "root"}],e.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return g.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:g,configurable:!0}),g.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},I(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(k),u(k,l,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion: {};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg: "return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"): "normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function x(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){x(o,r,i,a,s,"next",e)}function s(e){x(o,r,i,a,s,"throw",e)}a(void 0)}))}}function A(){return window.ApiClient.getCurrentUser(!1)}function P(){return k.apply(this,arguments)}function k(){return k=S(w().mark((function e(){var t,n,r,i,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=window.ApiClient)){e.next=3;break}return e.abrupt("return",Promise.resolve(t.serverAddress()));case 3:return e.next=5,c.Ve();case 5:if(0!==(n=e.sent).length){e.next=12;break}if(i=window.location.href.toLowerCase().lastIndexOf("/web"),!(r=-1!=i?window.location.href.substring(0,i):window.location.origin).startsWith("file:")){e.next=11;break}return e.abrupt("return",Promise.resolve());case 11:n.push(r);case 12:return console.debug("URL candidates:",n),o=n.map((function(e){return fetch("".concat(e,"/System/Info/Public"),{cache: "no-cache"}).then(function(){var t=S(w().mark((function t(n){var r;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.ok){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,n.json();case 5:r=t.sent,t.next=11;break;case 8:return t.prev=8,t.t0=t.catch(2),t.abrupt("return");case 11:return t.abrupt("return",{url:e,config:r});case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){console.error(e)}))})),e.abrupt("return",Promise.all(o).then((function(e){return e.filter((function(e){return null==e?void 0:e.config}))})).then((function(e){var t=e.find((function(e){return!e.config.StartupWizardCompleted}))||e[0];return null==t?void 0:t.url})).catch((function(e){console.error(e)})));case 15:case"end":return e.stop()}}),e)}))),k.apply(this,arguments)}function I(){var e=window.ApiClient;return e?e.getCurrentUserId(): null}function j(e,t,n){r.A.setLocalApiClient(n)}function T(){r.A.logout().then((function(){v.q.clear(),g.Ay.reset(),c.$A().then((function(e){L(e?"selectserver.html": "login.html")}))}))}function C(e){return"configurationpage?name="+encodeURIComponent(e)}function E(e){return ApiClient.getUrl("web/ConfigurationPage",{name:e})}function L(e,t){if(!e)throw new Error("url cannot be null or empty");var n=(0,m.i)();return t&&n&&(e+=n),a.appRouter.show(e)}function _(){o.Ay.hide(),(0,i.A)(u.Ay.translate("SettingsSaved"))}function O(){o.Ay.hide(),(0,i.A)(u.Ay.translate("SettingsSaved"))}function M(e){o.Ay.hide();var t=""+e.status;e.statusText&&(t=e.statusText),(0,s.A)({title:t,text:e.headers?e.headers.get("X-Application-Error-Code"): null})}function R(e){"string"==typeof e?(0,i.A)({text:e}):(0,s.A)({title:e.title||u.Ay.translate("HeaderAlert"),text:e.message}).then(e.callback||function(){})}function D(e){return Object.assign({PlayableMediaTypes: ["Audio","Video"],SupportedCommands: ["MoveUp","MoveDown","MoveLeft","MoveRight","PageUp","PageDown","PreviousLetter","NextLetter","ToggleOsd","ToggleContextMenu","Select","Back","SendKey","SendString","GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","SetShuffleQueue","ChannelUp","ChannelDown","PlayMediaSource","PlayTrailers"],SupportsPersistentIdentifier: "cordova"===window.appMode||"android"===window.appMode,SupportsMediaControl:!0},e.getPushTokenInfo())}function N(){window.NativeShell&&"function"==typeof window.NativeShell.selectServer?window.NativeShell.selectServer():L("selectserver.html")}function F(){o.Ay.hide()}function z(){o.Ay.show()}function U(e,t,n){(0,l.A)(e,t).then((function(){n(!0)})).catch((function(){n(!1)}))}var V=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.classList.contains(t)&&n.call(r,e)}))},B=function(e,t,n){document.addEventListener(e,(function(e){var r=e.target;r.id===t&&n.call(r,e)}))},q={alert:R,capabilities:D,confirm:U,getPluginUrl:C,getConfigurationResourceUrl:E,getCurrentUser:A,getCurrentUserId:I,hideLoadingMsg:F,logout:T,navigate:L,onServerChanged:j,processErrorResponse:M,processPluginConfigurationUpdateResult:_,processServerConfigurationUpdateResult:O,selectServer:N,serverAddress:P,showLoadingMsg:z,datetime:d.Ay,DirectoryBrowser:p.default,dialogHelper:h.default,itemIdentifier:y.default,setBackdropTransparency:f.FB};window.Dashboard=q,t.default=q},27570:function(e,t,n){var r={"./_lib/buildFormatLongFn/index.js": [37658,7,37658],"./_lib/buildLocalizeFn/index.js": [94160,7,94160],"./_lib/buildMatchFn/index.js": [7184,7,7184],"./_lib/buildMatchPatternFn/index.js": [83518,7,83518],"./af/_lib/formatDistance/index.js": [82393,7,82393],"./af/_lib/formatLong/index.js": [70356,7,70356],"./af/_lib/formatRelative/index.js": [62654,7,62654],"./af/_lib/localize/index.js": [79870,7,79870],"./af/_lib/match/index.js": [25242,7,25242],"./af/index.js": [53687,7,53687],"./ar-DZ/_lib/formatDistance/index.js": [31402,7,31402],"./ar-DZ/_lib/formatLong/index.js": [42635,7,42635],"./ar-DZ/_lib/formatRelative/index.js": [79657,7,79657],"./ar-DZ/_lib/localize/index.js": [6753,7,6753],"./ar-DZ/_lib/match/index.js": [61695,7,61695],"./ar-DZ/index.js": [5692,7,5692],"./ar-EG/_lib/formatDistance/index.js": [92364,7,92364],"./ar-EG/_lib/formatLong/index.js": [45101,7,45101],"./ar-EG/_lib/formatRelative/index.js": [59871,7,59871],"./ar-EG/_lib/localize/index.js": [73775,7,73775],"./ar-EG/_lib/match/index.js": [73073,7,73073],"./ar-EG/index.js": [77350,7,77350],"./ar-MA/_lib/formatDistance/index.js": [25742,7,25742],"./ar-MA/_lib/formatLong/index.js": [53823,7,53823],"./ar-MA/_lib/formatRelative/index.js": [83461,7,83461],"./ar-MA/_lib/localize/index.js": [63525,7,63525],"./ar-MA/_lib/match/index.js": [66955,7,66955],"./ar-MA/index.js": [33792,7,33792],"./ar-SA/_lib/formatDistance/index.js": [69260,7,69260],"./ar-SA/_lib/formatLong/index.js": [12557,7,12557],"./ar-SA/_lib/formatRelative/index.js": [41247,7,41247],"./ar-SA/_lib/localize/index.js": [67503,7,67503],"./ar-SA/_lib/match/index.js": [32689,7,32689],"./ar-SA/index.js": [39718,7,39718],"./ar-TN/_lib/formatDistance/index.js": [32894,7,32894],"./ar-TN/_lib/formatLong/index.js": [93551,7,93551],"./ar-TN/_lib/formatRelative/index.js": [51797,7,51797],"./ar-TN/_lib/localize/index.js": [73653,7,73653],"./ar-TN/_lib/match/index.js": [1051,7,1051],"./ar-TN/index.js": [80144,7,80144],"./ar/_lib/formatDistance/index.js": [8117,7,8117],"./ar/_lib/formatLong/index.js": [4800,7,4800],"./ar/_lib/formatRelative/index.js": [37202,7,37202],"./ar/_lib/localize/index.js": [83370,7,83370],"./ar/_lib/match/index.js": [34286,7,34286],"./ar/index.js": [91763,7,91763],"./az/_lib/formatDistance/index.js": [653,7,653],"./az/_lib/formatLong/index.js": [83208,7,83208],"./az/_lib/formatRelative/index.js": [80106,7,80106],"./az/_lib/localize/index.js": [85234,7,85234],"./az/_lib/match/index.js": [15190,7,15190],"./az/index.js": [13115,7,13115],"./be-tarask/_lib/formatDistance/index.js": [6646,7,40085,22063],"./be-tarask/_lib/formatLong/index.js": [79735,7,40085,37658],"./be-tarask/_lib/formatRelative/index.js": [8013,7,90609,52154,43509,22252,40085,7256,81682,44444],"./be-tarask/_lib/localize/index.js": [45821,7,40085,94160],"./be-tarask/_lib/match/index.js": [19363,7,40085,9911],"./be-tarask/index.js": [87096,7,90609,52154,43509,22252,40085,7256,81682,77301],"./be/_lib/formatDistance/index.js": [76463,7,94388,99682],"./be/_lib/formatLong/index.js": [24218,7,94388,37658],"./be/_lib/formatRelative/index.js": [65088,7,90609,52154,43509,22252,94388,7256,81682,11587],"./be/_lib/localize/index.js": [68160,7,94388,94160],"./be/_lib/match/index.js": [38504,7,94388,9911],"./be/index.js": [52469,7,90609,52154,43509,22252,94388,7256,81682,33968],"./bg/_lib/formatDistance/index.js": [36117,7,36117],"./bg/_lib/formatLong/index.js": [62368,7,62368],"./bg/_lib/formatRelative/index.js": [65202,7,90609,65202],"./bg/_lib/localize/index.js": [91786,7,91786],"./bg/_lib/match/index.js": [7662,7,7662],"./bg/index.js": [86707,7,90609,86707],"./bn/_lib/formatDistance/index.js": [14866,7,14866],"./bn/_lib/formatLong/index.js": [6339,7,6339],"./bn/_lib/formatRelative/index.js": [97073,7,97073],"./bn/_lib/localize/index.js": [82681,9,82681],"./bn/_lib/match/index.js": [76068,7,76068],"./bn/index.js": [22356,7,22356],"./bs/_lib/formatDistance/index.js": [10393,7,10393],"./bs/_lib/formatLong/index.js": [27924,7,27924],"./bs/_lib/formatRelative/index.js": [7006,7,7006],"./bs/_lib/localize/index.js": [71934,7,71934],"./bs/_lib/match/index.js": [98618,7,98618],"./bs/index.js": [48631,7,48631],"./ca/_lib/formatDistance/index.js": [242,7,242],"./ca/_lib/formatLong/index.js": [95171,7,95171],"./ca/_lib/formatRelative/index.js": [80625,7,80625],"./ca/_lib/localize/index.js": [41241,7,41241],"./ca/_lib/match/index.js": [24855,7,24855],"./ca/index.js": [29108,7,29108],"./cs/_lib/formatDistance/index.js": [49516,7,49516],"./cs/_lib/formatLong/index.js": [96077,7,96077],"./cs/_lib/formatRelative/index.js": [54847,7,54847],"./cs/_lib/localize/index.js": [72143,7,72143],"./cs/_lib/match/index.js": [35601,7,35601],"./cs/index.js": [92102,7,92102],"./cy/_lib/formatDistance/index.js": [53610,7,53610],"./cy/_lib/formatLong/index.js": [17355,7,17355],"./cy/_lib/formatRelative/index.js": [30121,7,30121],"./cy/_lib/localize/index.js": [59553,7,59553],"./cy/_lib/match/index.js": [64671,7,64671],"./cy/index.js": [12060,7,12060],"./da/_lib/formatDistance/index.js": [25137,7,25137],"./da/_lib/formatLong/index.js": [26908,7,26908],"./da/_lib/formatRelative/index.js": [16566,7,16566],"./da/_lib/localize/index.js": [41286,7,41286],"./da/_lib/match/index.js": [38082,7,38082],"./da/index.js": [60607,7,60607],"./de-AT/_lib/localize/index.js": [64790,7,64790],"./de-AT/index.js": [24879,7,24879],"./de/_lib/formatDistance/index.js": [37821,7,37821],"./de/_lib/formatLong/index.js": [74776,7,74776],"./de/_lib/formatRelative/index.js": [99994,7,77613],"./de/_lib/localize/index.js": [87074,7,87074],"./de/_lib/match/index.js": [67942,7,67942],"./de/index.js": [78283,7,78283],"./el/_lib/formatDistance/index.js": [89903,7,89903],"./el/_lib/formatLong/index.js": [47066,7,47066],"./el/_lib/formatRelative/index.js": [53408,7,53408],"./el/_lib/localize/index.js": [6368,7,6368],"./el/_lib/match/index.js": [17864,7,17864],"./el/index.js": [88981,7,88981],"./en-AU/_lib/formatLong/index.js": [42351,7,42351],"./en-AU/index.js": [44336,7,44336],"./en-CA/_lib/formatDistance/index.js": [19292,7,19292],"./en-CA/_lib/formatLong/index.js": [37117,7,37117],"./en-CA/index.js": [59670,7,59670],"./en-GB/_lib/formatLong/index.js": [35172,7,35172],"./en-GB/index.js": [15015,7,15015],"./en-IE/index.js": [81992,7,81992],"./en-IN/_lib/formatLong/index.js": [65470,7,65470],"./en-IN/index.js": [30745,7,30745],"./en-NZ/_lib/formatLong/index.js": [37625,7,37625],"./en-NZ/index.js": [36962,7,36962],"./en-US/_lib/formatDistance/index.js": [39232,7,39232],"./en-US/_lib/formatLong/index.js": [40465,7,40465],"./en-US/_lib/formatRelative/index.js": [18395,7,18395],"./en-US/_lib/localize/index.js": [48979,7,48979],"./en-US/_lib/match/index.js": [68413,7,68413],"./en-US/index.js": [59258,7,59258],"./en-ZA/_lib/formatLong/index.js": [51664,7,51664],"./en-ZA/index.js": [83619,7,83619],"./eo/_lib/formatDistance/index.js": [59290,7,59290],"./eo/_lib/formatLong/index.js": [87803,7,87803],"./eo/_lib/formatRelative/index.js": [97689,7,97689],"./eo/_lib/localize/index.js": [72241,7,72241],"./eo/_lib/match/index.js": [47279,7,47279],"./eo/index.js": [26668,7,26668],"./es/_lib/formatDistance/index.js": [88918,7,88918],"./es/_lib/formatLong/index.js": [44119,7,44119],"./es/_lib/formatRelative/index.js": [90285,7,90285],"./es/_lib/localize/index.js": [59498,7,59498],"./es/_lib/match/index.js": [47203,7,47203],"./es/index.js": [95992,7,95992],"./et/_lib/formatDistance/index.js": [10455,7,10455],"./et/_lib/formatLong/index.js": [40946,7,40946],"./et/_lib/formatRelative/index.js": [98216,7,98216],"./et/_lib/localize/index.js": [54552,7,54552],"./et/_lib/match/index.js": [32896,7,32896],"./et/index.js": [65005,7,65005],"./eu/_lib/formatDistance/index.js": [90156,7,90156],"./eu/_lib/formatLong/index.js": [25709,7,25709],"./eu/_lib/formatRelative/index.js": [57663,7,57663],"./eu/_lib/localize/index.js": [89775,7,89775],"./eu/_lib/match/index.js": [80401,7,80401],"./eu/index.js": [16614,7,16614],"./fa-IR/_lib/formatDistance/index.js": [8833,7,8833],"./fa-IR/_lib/formatLong/index.js": [83116,7,83116],"./fa-IR/_lib/formatRelative/index.js": [52294,7,52294],"./fa-IR/_lib/localize/index.js": [28982,7,28982],"./fa-IR/_lib/match/index.js": [54738,7,54738],"./fa-IR/index.js": [12143,7,12143],"./fi/_lib/formatDistance/index.js": [40247,7,40247],"./fi/_lib/formatLong/index.js": [6546,7,6546],"./fi/_lib/formatRelative/index.js": [75336,7,75336],"./fi/_lib/localize/index.js": [47352,7,47352],"./fi/_lib/match/index.js": [65312,7,65312],"./fi/index.js": [56941,7,56941],"./fr-CA/_lib/formatLong/index.js": [66124,7,66124],"./fr-CA/index.js": [70831,7,70831],"./fr-CH/_lib/formatLong/index.js": [93855,7,93855],"./fr-CH/_lib/formatRelative/index.js": [46629,7,46629],"./fr-CH/index.js": [68448,7,68448],"./fr/_lib/formatDistance/index.js": [90810,7,90810],"./fr/_lib/formatLong/index.js": [77499,7,77499],"./fr/_lib/formatRelative/index.js": [14553,7,14553],"./fr/_lib/localize/index.js": [73041,7,73041],"./fr/_lib/match/index.js": [59631,7,59631],"./fr/index.js": [83756,7,83756],"./fy/_lib/formatDistance/index.js": [84903,7,84903],"./fy/_lib/formatLong/index.js": [5218,7,5218],"./fy/_lib/formatRelative/index.js": [44574,7,89336],"./fy/_lib/localize/index.js": [3080,7,3080],"./fy/_lib/match/index.js": [50352,7,50352],"./fy/index.js": [45085,7,45085],"./gd/_lib/formatDistance/index.js": [9205,7,9205],"./gd/_lib/formatLong/index.js": [14112,7,14112],"./gd/_lib/formatRelative/index.js": [35090,7,35090],"./gd/_lib/localize/index.js": [44426,7,44426],"./gd/_lib/match/index.js": [60910,7,60910],"./gd/index.js": [84019,7,84019],"./gl/_lib/formatDistance/index.js": [34157,7,34157],"./gl/_lib/formatLong/index.js": [24872,7,24872],"./gl/_lib/formatRelative/index.js": [56778,7,56778],"./gl/_lib/localize/index.js": [70546,7,70546],"./gl/_lib/match/index.js": [52470,7,52470],"./gl/index.js": [78651,7,78651],"./gu/_lib/formatDistance/index.js": [26954,7,26954],"./gu/_lib/formatLong/index.js": [16235,7,16235],"./gu/_lib/formatRelative/index.js": [75209,7,75209],"./gu/_lib/localize/index.js": [88449,7,88449],"./gu/_lib/match/index.js": [57407,7,57407],"./gu/index.js": [76476,7,76476],"./he/_lib/formatDistance/index.js": [42033,7,42033],"./he/_lib/formatLong/index.js": [25148,7,25148],"./he/_lib/formatRelative/index.js": [46902,7,46902],"./he/_lib/localize/index.js": [49702,7,49702],"./he/_lib/match/index.js": [25890,7,25890],"./he/index.js": [71103,7,71103],"./hi/_lib/formatDistance/index.js": [29477,7,29477],"./hi/_lib/formatLong/index.js": [28048,7,28048],"./hi/_lib/formatRelative/index.js": [70242,7,70242],"./hi/_lib/localize/index.js": [49882,9,49882],"./hi/_lib/match/index.js": [8734,7,8734],"./hi/index.js": [59459,7,59459],"./hr/_lib/formatDistance/index.js": [8892,7,8892],"./hr/_lib/formatLong/index.js": [59613,7,59613],"./hr/_lib/formatRelative/index.js": [13231,7,13231],"./hr/_lib/localize/index.js": [56127,7,56127],"./hr/_lib/match/index.js": [68385,7,68385],"./hr/index.js": [42870,7,42870],"./ht/_lib/formatDistance/index.js": [13734,7,13734],"./ht/_lib/formatLong/index.js": [85447,7,85447],"./ht/_lib/formatRelative/index.js": [31421,7,31421],"./ht/_lib/localize/index.js": [685,7,685],"./ht/_lib/match/index.js": [80083,7,80083],"./ht/index.js": [7720,7,7720],"./hu/_lib/formatDistance/index.js": [63585,7,63585],"./hu/_lib/formatLong/index.js": [83180,7,83180],"./hu/_lib/formatRelative/index.js": [7046,7,7046],"./hu/_lib/localize/index.js": [28662,7,28662],"./hu/_lib/match/index.js": [22770,7,22770],"./hu/index.js": [31759,7,31759],"./hy/_lib/formatDistance/index.js": [30869,7,30869],"./hy/_lib/formatLong/index.js": [26368,7,26368],"./hy/_lib/formatRelative/index.js": [56754,7,56754],"./hy/_lib/localize/index.js": [37290,7,37290],"./hy/_lib/match/index.js": [91054,7,91054],"./hy/index.js": [17427,7,17427],"./id/_lib/formatDistance/index.js": [49771,7,49771],"./id/_lib/formatLong/index.js": [72422,7,72422],"./id/_lib/formatRelative/index.js": [91684,7,91684],"./id/_lib/localize/index.js": [6140,7,6140],"./id/_lib/match/index.js": [78588,7,78588],"./id/index.js": [26273,7,26273],"./is/_lib/formatDistance/index.js": [44418,7,44418],"./is/_lib/formatLong/index.js": [82067,7,82067],"./is/_lib/formatRelative/index.js": [31297,7,31297],"./is/_lib/localize/index.js": [4969,7,4969],"./is/_lib/match/index.js": [91719,7,91719],"./is/index.js": [56068,7,56068],"./it-CH/_lib/formatLong/index.js": [40592,7,40592],"./it-CH/index.js": [61027,7,90609,15686],"./it/_lib/formatDistance/index.js": [59867,7,59867],"./it/_lib/formatLong/index.js": [95926,7,95926],"./it/_lib/formatRelative/index.js": [20404,7,90609,45315],"./it/_lib/localize/index.js": [13356,7,13356],"./it/_lib/match/index.js": [10092,7,10092],"./it/index.js": [95697,7,90609,89268],"./ja-Hira/_lib/formatDistance/index.js": [9684,7,9684],"./ja-Hira/_lib/formatLong/index.js": [36293,7,36293],"./ja-Hira/_lib/formatRelative/index.js": [94247,7,94247],"./ja-Hira/_lib/localize/index.js": [88711,7,88711],"./ja-Hira/_lib/match/index.js": [87241,7,87241],"./ja-Hira/index.js": [81790,7,81790],"./ja/_lib/formatDistance/index.js": [91163,7,91163],"./ja/_lib/formatLong/index.js": [45654,7,45654],"./ja/_lib/formatRelative/index.js": [77236,7,77236],"./ja/_lib/localize/index.js": [10540,7,10540],"./ja/_lib/match/index.js": [4588,7,4588],"./ja/index.js": [56785,7,56785],"./ka/_lib/formatDistance/index.js": [52154,7,29773],"./ka/_lib/formatLong/index.js": [29083,7,29083],"./ka/_lib/formatRelative/index.js": [62265,7,62265],"./ka/_lib/localize/index.js": [12849,7,12849],"./ka/_lib/match/index.js": [99932,7,77551],"./ka/index.js": [6828,7,6828],"./kk/_lib/formatDistance/index.js": [25404,7,28629,66825],"./kk/_lib/formatLong/index.js": [9021,7,28629,37658],"./kk/_lib/formatRelative/index.js": [87631,7,90609,28629,33188],"./kk/_lib/localize/index.js": [79839,7,28629,94160],"./kk/_lib/match/index.js": [83457,7,28629,9911],"./kk/index.js": [72278,7,90609,28629,82728],"./km/_lib/formatDistance/index.js": [31974,7,31974],"./km/_lib/formatLong/index.js": [25671,7,25671],"./km/_lib/formatRelative/index.js": [66429,7,66429],"./km/_lib/localize/index.js": [48557,7,48557],"./km/_lib/match/index.js": [78995,7,78995],"./km/index.js": [79336,7,79336],"./kn/_lib/formatDistance/index.js": [68971,7,68971],"./kn/_lib/formatLong/index.js": [48230,7,48230],"./kn/_lib/formatRelative/index.js": [21252,7,21252],"./kn/_lib/localize/index.js": [76892,7,76892],"./kn/_lib/match/index.js": [86479,7,8860],"./kn/index.js": [75681,7,75681],"./ko/_lib/formatDistance/index.js": [3888,7,3888],"./ko/_lib/formatLong/index.js": [39233,7,39233],"./ko/_lib/formatRelative/index.js": [3083,7,3083],"./ko/_lib/localize/index.js": [62083,7,62083],"./ko/_lib/match/index.js": [45645,7,45645],"./ko/index.js": [6282,7,6282],"./lb/_lib/formatDistance/index.js": [94728,7,94728],"./lb/_lib/formatLong/index.js": [5289,7,5289],"./lb/_lib/formatRelative/index.js": [12323,7,12323],"./lb/_lib/localize/index.js": [45995,7,45995],"./lb/_lib/match/index.js": [73557,7,73557],"./lb/index.js": [59186,7,59186],"./lt/_lib/formatDistance/index.js": [59034,7,59034],"./lt/_lib/formatLong/index.js": [89083,7,89083],"./lt/_lib/formatRelative/index.js": [21721,7,21721],"./lt/_lib/localize/index.js": [61745,7,61745],"./lt/_lib/match/index.js": [88559,7,88559],"./lt/index.js": [8140,7,8140],"./lv/_lib/formatDistance/index.js": [87652,7,87652],"./lv/_lib/formatLong/index.js": [11061,7,11061],"./lv/_lib/formatRelative/index.js": [84567,7,90609,27114],"./lv/_lib/localize/index.js": [59127,7,81508],"./lv/_lib/match/index.js": [33625,7,33625],"./lv/index.js": [79534,7,90609,70525],"./mk/_lib/formatDistance/index.js": [68134,7,68134],"./mk/_lib/formatLong/index.js": [72327,7,72327],"./mk/_lib/formatRelative/index.js": [32669,7,90609,34624],"./mk/_lib/localize/index.js": [17133,7,17133],"./mk/_lib/match/index.js": [87219,7,87219],"./mk/index.js": [91752,7,90609,12551],"./mn/_lib/formatDistance/index.js": [69773,7,69773],"./mn/_lib/formatLong/index.js": [36104,7,36104],"./mn/_lib/formatRelative/index.js": [7082,7,7082],"./mn/_lib/localize/index.js": [68402,7,68402],"./mn/_lib/match/index.js": [15126,7,15126],"./mn/index.js": [67515,7,67515],"./ms/_lib/formatDistance/index.js": [49182,7,49182],"./ms/_lib/formatLong/index.js": [21935,7,21935],"./ms/_lib/formatRelative/index.js": [68085,7,68085],"./ms/_lib/localize/index.js": [58389,7,58389],"./ms/_lib/match/index.js": [66907,7,66907],"./ms/index.js": [13872,7,13872],"./mt/_lib/formatDistance/index.js": [18591,7,18591],"./mt/_lib/formatLong/index.js": [86442,7,86442],"./mt/_lib/formatRelative/index.js": [48016,7,48016],"./mt/_lib/localize/index.js": [53872,7,53872],"./mt/_lib/match/index.js": [1912,7,1912],"./mt/index.js": [54693,7,54693],"./nb/_lib/formatDistance/index.js": [42546,7,42546],"./nb/_lib/formatLong/index.js": [55075,7,55075],"./nb/_lib/formatRelative/index.js": [63025,7,63025],"./nb/_lib/localize/index.js": [41049,7,41049],"./nb/_lib/match/index.js": [58807,7,58807],"./nb/index.js": [84020,7,84020],"./nl-BE/_lib/formatDistance/index.js": [11762,7,11762],"./nl-BE/_lib/formatLong/index.js": [93763,7,93763],"./nl-BE/_lib/formatRelative/index.js": [15889,7,15889],"./nl-BE/_lib/localize/index.js": [79033,7,79033],"./nl-BE/_lib/match/index.js": [76183,7,76183],"./nl-BE/index.js": [40852,7,40852],"./nl/_lib/formatDistance/index.js": [20472,7,20472],"./nl/_lib/formatLong/index.js": [73913,7,73913],"./nl/_lib/formatRelative/index.js": [19187,7,19187],"./nl/_lib/localize/index.js": [78747,7,78747],"./nl/_lib/match/index.js": [81477,7,81477],"./nl/index.js": [33858,7,33858],"./nn/_lib/formatDistance/index.js": [45198,7,45198],"./nn/_lib/formatLong/index.js": [63039,7,63039],"./nn/_lib/formatRelative/index.js": [2917,7,2917],"./nn/_lib/localize/index.js": [72389,7,72389],"./nn/_lib/match/index.js": [20779,7,20779],"./nn/index.js": [6464,7,6464],"./oc/_lib/formatDistance/index.js": [50304,7,50304],"./oc/_lib/formatLong/index.js": [35569,7,35569],"./oc/_lib/formatRelative/index.js": [29467,7,29467],"./oc/_lib/localize/index.js": [84499,7,84499],"./oc/_lib/match/index.js": [88637,7,88637],"./oc/index.js": [87738,7,87738],"./pl/_lib/formatDistance/index.js": [18934,7,18934],"./pl/_lib/formatLong/index.js": [1367,7,1367],"./pl/_lib/formatRelative/index.js": [97293,7,90609,69520],"./pl/_lib/localize/index.js": [31773,7,31773],"./pl/_lib/match/index.js": [54147,7,54147],"./pl/index.js": [18264,7,90609,10647],"./pt-BR/_lib/formatDistance/index.js": [87717,7,87717],"./pt-BR/_lib/formatLong/index.js": [50256,7,50256],"./pt-BR/_lib/formatRelative/index.js": [24450,7,24450],"./pt-BR/_lib/localize/index.js": [7802,7,7802],"./pt-BR/_lib/match/index.js": [78654,7,78654],"./pt-BR/index.js": [4003,7,4003],"./pt/_lib/formatDistance/index.js": [47886,7,47886],"./pt/_lib/formatLong/index.js": [46655,7,46655],"./pt/_lib/formatRelative/index.js": [62373,7,62373],"./pt/_lib/localize/index.js": [23845,7,46226],"./pt/_lib/match/index.js": [9611,7,9611],"./pt/index.js": [71680,7,71680],"./ro/_lib/formatDistance/index.js": [71805,7,71805],"./ro/_lib/formatLong/index.js": [4952,7,4952],"./ro/_lib/formatRelative/index.js": [33978,7,33978],"./ro/_lib/localize/index.js": [85794,7,85794],"./ro/_lib/match/index.js": [64422,7,64422],"./ro/index.js": [49931,7,49931],"./ru/_lib/formatDistance/index.js": [95887,7,19156,89206],"./ru/_lib/formatLong/index.js": [3322,7,19156,37658],"./ru/_lib/formatRelative/index.js": [43040,7,90609,19156,33188],"./ru/_lib/localize/index.js": [96672,7,19156,94160],"./ru/_lib/match/index.js": [40968,7,19156,9911],"./ru/index.js": [65685,7,90609,19156,82728],"./sk/_lib/formatDistance/index.js": [27892,7,27892],"./sk/_lib/formatLong/index.js": [73957,7,73957],"./sk/_lib/formatRelative/index.js": [24999,7,90609,53402],"./sk/_lib/localize/index.js": [46516,7,24135],"./sk/_lib/match/index.js": [85065,7,85065],"./sk/index.js": [65758,7,90609,74317],"./sl/_lib/formatDistance/index.js": [94809,7,94809],"./sl/_lib/formatLong/index.js": [58292,7,58292],"./sl/_lib/formatRelative/index.js": [82718,7,82718],"./sl/_lib/localize/index.js": [42206,7,42206],"./sl/_lib/match/index.js": [67322,7,67322],"./sl/index.js": [81508,7,59127],"./sq/_lib/formatDistance/index.js": [16914,7,16914],"./sq/_lib/formatLong/index.js": [45859,7,45859],"./sq/_lib/formatRelative/index.js": [93969,7,93969],"./sq/_lib/localize/index.js": [72409,7,72409],"./sq/_lib/match/index.js": [3767,7,3767],"./sq/index.js": [34644,7,34644],"./sr-Latn/_lib/formatDistance/index.js": [46783,7,46783],"./sr-Latn/_lib/formatLong/index.js": [17290,7,17290],"./sr-Latn/_lib/formatRelative/index.js": [54384,7,54384],"./sr-Latn/_lib/localize/index.js": [8528,7,8528],"./sr-Latn/_lib/match/index.js": [57688,7,57688],"./sr-Latn/index.js": [36165,7,36165],"./sr/_lib/formatDistance/index.js": [74535,7,74535],"./sr/_lib/formatLong/index.js": [77826,7,77826],"./sr/_lib/formatRelative/index.js": [78968,7,78968],"./sr/_lib/localize/index.js": [93384,7,93384],"./sr/_lib/match/index.js": [57104,7,57104],"./sr/index.js": [21789,7,21789],"./sv/_lib/formatDistance/index.js": [29035,7,29035],"./sv/_lib/formatLong/index.js": [1286,7,1286],"./sv/_lib/formatRelative/index.js": [87300,7,87300],"./sv/_lib/localize/index.js": [86748,7,86748],"./sv/_lib/match/index.js": [8444,7,8444],"./sv/index.js": [79681,7,79681],"./ta/_lib/formatDistance/index.js": [31553,7,62934,43015],"./ta/_lib/formatLong/index.js": [27180,7,62934,37658],"./ta/_lib/formatRelative/index.js": [75014,7,62934,65396],"./ta/_lib/localize/index.js": [42454,7,62934,94160],"./ta/_lib/match/index.js": [99378,7,62934,9911],"./ta/index.js": [91407,7,62934,77077],"./te/_lib/formatDistance/index.js": [23789,7,23789],"./te/_lib/formatLong/index.js": [97480,7,97480],"./te/_lib/formatRelative/index.js": [62762,7,62762],"./te/_lib/localize/index.js": [60850,7,60850],"./te/_lib/match/index.js": [59222,7,59222],"./te/index.js": [55355,7,55355],"./th/_lib/formatDistance/index.js": [16526,7,16526],"./th/_lib/formatLong/index.js": [27711,7,27711],"./th/_lib/formatRelative/index.js": [4069,7,4069],"./th/_lib/localize/index.js": [60389,7,60389],"./th/_lib/match/index.js": [25995,7,25995],"./th/index.js": [65920,7,65920],"./tr/_lib/formatDistance/index.js": [59456,7,59456],"./tr/_lib/formatLong/index.js": [89009,7,89009],"./tr/_lib/formatRelative/index.js": [38619,7,38619],"./tr/_lib/localize/index.js": [98931,7,98931],"./tr/_lib/match/index.js": [83357,7,83357],"./tr/index.js": [87034,7,87034],"./ug/_lib/formatDistance/index.js": [93634,7,93634],"./ug/_lib/formatLong/index.js": [37491,7,37491],"./ug/_lib/formatRelative/index.js": [68481,7,68481],"./ug/_lib/localize/index.js": [73769,7,73769],"./ug/_lib/match/index.js": [51239,7,51239],"./ug/index.js": [21188,7,21188],"./uk/_lib/formatDistance/index.js": [93406,7,64983,96612],"./uk/_lib/formatLong/index.js": [60143,7,64983,37658],"./uk/_lib/formatRelative/index.js": [24085,7,90609,52154,43509,22252,7256,64983,81682,74231],"./uk/_lib/localize/index.js": [57365,7,64983,94160],"./uk/_lib/match/index.js": [83035,7,64983,9911],"./uk/index.js": [74544,7,90609,52154,43509,22252,7256,64983,81682],"./uz-Cyrl/_lib/formatDistance/index.js": [93958,7,93958],"./uz-Cyrl/_lib/formatLong/index.js": [16327,7,16327],"./uz-Cyrl/_lib/formatRelative/index.js": [7389,7,7389],"./uz-Cyrl/_lib/localize/index.js": [82381,7,82381],"./uz-Cyrl/_lib/match/index.js": [66995,7,66995],"./uz-Cyrl/index.js": [36392,7,36392],"./uz/_lib/formatDistance/index.js": [30793,7,30793],"./uz/_lib/formatLong/index.js": [76004,7,76004],"./uz/_lib/formatRelative/index.js": [94734,7,94734],"./uz/_lib/localize/index.js": [40622,7,40622],"./uz/_lib/match/index.js": [37418,7,37418],"./uz/index.js": [87399,7,87399],"./vi/_lib/formatDistance/index.js": [75783,7,75783],"./vi/_lib/formatLong/index.js": [1986,7,1986],"./vi/_lib/formatRelative/index.js": [16504,7,16504],"./vi/_lib/localize/index.js": [53736,7,53736],"./vi/_lib/match/index.js": [67248,7,67248],"./vi/index.js": [2077,7,2077],"./zh-CN/_lib/formatDistance/index.js": [94238,7,94238],"./zh-CN/_lib/formatLong/index.js": [6223,7,6223],"./zh-CN/_lib/formatRelative/index.js": [13141,7,90609,13960],"./zh-CN/_lib/localize/index.js": [22837,7,22837],"./zh-CN/_lib/match/index.js": [48315,7,48315],"./zh-CN/index.js": [57488,7,90609,90207],"./zh-HK/_lib/formatDistance/index.js": [53054,7,53054],"./zh-HK/_lib/formatLong/index.js": [13135,7,13135],"./zh-HK/_lib/formatRelative/index.js": [88309,7,88309],"./zh-HK/_lib/localize/index.js": [22197,7,22197],"./zh-HK/_lib/match/index.js": [46555,7,46555],"./zh-HK/index.js": [1488,7,1488],"./zh-TW/_lib/formatDistance/index.js": [21654,7,21654],"./zh-TW/_lib/formatLong/index.js": [26839,7,26839],"./zh-TW/_lib/formatRelative/index.js": [39373,7,39373],"./zh-TW/_lib/localize/index.js": [79357,7,79357],"./zh-TW/_lib/match/index.js": [62275,7,62275],"./zh-TW/index.js": [1368,7,1368]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(i,16|t[1])}))}i.keys=function(){return Object.keys(r)},i.id=27570,e.exports=i},72524:function(e,t,n){"use strict";n.d(t,{A:function(){return F},b:function(){return N}});var r=n(62540),i=n(63696),o=n(9055),a=n(87404),s=n(7603),l=n(66359),u=n(4022),c=function(e){var t=e.isHidden,o=void 0!==t&&t;return(0,i.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(47027)]).then(n.bind(n,73233))}),[]),(0,r.jsxs)("div",{style:o?{display: "none"}:void 0,children: [(0,r.jsx)("div",{className: "mainDrawer hide",children:(0,r.jsx)("div",{className: "mainDrawer-scrollContainer scrollContainer focuscontainer-y"})}),(0,r.jsx)("div",{className: "skinHeader focuscontainer-x"}),(0,r.jsx)("div",{className: "mainDrawerHandle"})]})},d=n(5271),f=n(46782),p=n(64174),h=f.A.experimental?{left: {md:p.d}}: {},y=function(){return(0,i.useEffect)((function(){Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(57549)]).then(n.bind(n,85420))}),[]),(0,r.jsxs)(r.Fragment,{children: [(0,r.jsx)(d.A,{className: "backdropContainer",sx:h}),(0,r.jsx)("div",{className: "backgroundContainer"})]})},m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)},v=n(44797),g="HISTORY_UPDATE",b=function(){function e(e){this._router=e,this._router.subscribe((function(e){console.debug("[RouterHistory] history update",e),v.A.trigger(document,g,[e])})),this.createHref=e.createHref}return Object.defineProperty(e.prototype,"action",{get:function(){return this._router.state.historyAction},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this._router.state.location},enumerable:!1,configurable:!0}),e.prototype.back=function(){this._router.navigate(-1)},e.prototype.forward=function(){this._router.navigate(1)},e.prototype.go=function(e){this._router.navigate(e)},e.prototype.push=function(e,t){this._router.navigate(e,{state:t})},e.prototype.replace=function(e,t){this._router.navigate(e,{state:t,replace:!0})},e.prototype.block=function(){throw new Error("`history.block()` is not implemented")},e.prototype.listen=function(e){var t=function(t,n){return e({action:n.historyAction,location:n.location})};return v.A.on(document,g,t),function(){return v.A.off(document,g,t)}},e}(),w=n(40181),x=n(77402),S=n(28626),A=n(43226),P=n(45950),k={palette: {mode: "dark",primary: {main: "#00a4dc"},secondary: {main: "#aa5cc3"},background: {default: "#101010",paper: "#202020"},action: {selectedOpacity:.2},starIcon: {main: "#f2b01e"},error: {main: "#cb272a"}},typography: {fontFamily:'"Noto Sans", sans-serif',button: {textTransform: "none"},h1: {fontSize: "1.8rem"},h2: {fontSize: "1.5rem"},h3: {fontSize: "1.17rem"}},components: {MuiAlert: {styleOverrides: {message: {flexGrow: 1}}},MuiButton: {defaultProps: {variant: "contained"},variants: [{props: {size: "large"},style: {fontSize: "1rem",fontWeight: "bold"}}]},MuiFormControl: {defaultProps: {variant: "filled"}},MuiFormHelperText: {styleOverrides: {root: {fontSize: "1rem"}}},MuiTextField: {defaultProps: {variant: "filled"}},MuiListItemIcon: {styleOverrides: {root: {minWidth: 36}}},MuiListSubheader: {styleOverrides: {root: {backgroundColor: "inherit",position: "initial"}}},MuiListItemText: {styleOverrides: {inset: {paddingLeft: 36}}}}},I=(0,A.A)((0,P.A)({},k,{palette: {mode: "light",background: {default: "#d5e9f2",paper: "#fff"}},components: {MuiAppBar: {styleOverrides: {colorPrimary: {backgroundColor: "#bcbcbc"}}}}})),j=(0,A.A)((0,P.A)({},k,{palette: {background: {paper: "#011432"}}})),T=(0,A.A)(k),C={appletv:I,blueradiance:j,dark:T,light:(0,A.A)((0,P.A)({},k,{palette: {mode: "light",background: {default: "#f2f2f2",paper: "#e8e8e8"}},components: {MuiAppBar: {styleOverrides: {colorPrimary: {backgroundColor: "#e8e8e8"}}}}})),purplehaze:(0,A.A)((0,P.A)({},k,{palette: {background: {paper: "#000420"},primary: {main: "#48c3c8"},secondary: {main: "#ff77f1"}}})),wmc:(0,A.A)((0,P.A)({},k,{palette: {background: {paper: "#0c2450"}}}))},E=T;var L=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},_=function(e){var t=e.children,n=L((0,i.useState)(!1),2),o=n[0],l=n[1],u=L((0,i.useState)(E),2),c=u[0],d=u[1],f=(0,a.zy)(),p=function(){var e=(0,S.Q)(),t=e.theme,n=e.dashboardTheme,r=(0,x.U)().defaultTheme;return{theme:t||(null==r?void 0:r.id),dashboardTheme:n||(null==r?void 0:r.id)}}(),h=p.theme,y=p.dashboardTheme;return(0,i.useEffect)((function(){var e;l((e=f.pathname,[s.DASHBOARD_APP_PATHS.Dashboard,s.DASHBOARD_APP_PATHS.PluginConfig].some((function(t){return e.startsWith("/".concat(t))}))))}),[f.pathname]),(0,i.useEffect)((function(){var e;d((e=o?y:h)?(console.info('[getTheme] getting theme "%s"',e),Object.keys(C).includes(e)?C[e]:(console.warn('[getTheme] theme "%s" not found; returning default theme',e),E)):(console.info("[getTheme] no theme id; returning default theme"),E))}),[y,o,h]),(0,r.jsx)(w.A,{theme:c,children:t})},O=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},M=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},R="experimental"===localStorage.getItem("layout"),D=(0,o.Ge)([{element:(0,r.jsx)((function(){var e=(0,a.zy)(),t=Object.values(s.DASHBOARD_APP_PATHS).some((function(t){return e.pathname.startsWith("/".concat(t))}));return(0,r.jsxs)(_,{children: [(0,r.jsx)(y,{}),(0,r.jsx)(c,{isHidden:R||t}),(0,r.jsx)(a.sv,{})]})}),{}),children:M(M(M([],O(R?l.EXPERIMENTAL_APP_ROUTES:u.STABLE_APP_ROUTES),!1),O(s.DASHBOARD_APP_ROUTES),!1),[{path: "!/*",Component:function(){var e=(0,a.zy)(),t=(0,i.useMemo)((function(){var t={search:e.search,hash:e.hash};return e.pathname.startsWith("/!/")?m(m({},t),{pathname:e.pathname.substring(2)}):e.pathname.startsWith("/!")?m(m({},t),{pathname:e.pathname.replace(/^\/!/,"/")}):e.pathname.startsWith("!")?m(m({},t),{pathname:e.pathname.substring(1)}):void 0}),[e]);return t?(console.warn("[BangRedirect] You are using a deprecated URL format. This will stop working in a future Jellyfin update."),(0,r.jsx)(a.C5,{replace:!0,to:t})): null}}],!1)}]),N=function(e){return new b(e)}(D);function F(){return(0,r.jsx)(o.pg,{router:D})}},39244:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_ADMIN_ROUTES:function(){return i}});var r=n(51218),i=[{path: "activity",type:r.k.Dashboard},{path: "playback/trickplay",type:r.k.Dashboard},{path: "plugins/:pluginId",page: "plugins/plugin",type:r.k.Dashboard},{path: "users",type:r.k.Dashboard},{path: "users/access",type:r.k.Dashboard},{path: "users/add",type:r.k.Dashboard},{path: "users/parentalcontrol",type:r.k.Dashboard},{path: "users/password",type:r.k.Dashboard},{path: "users/profile",type:r.k.Dashboard}]},4877:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_ADMIN_ROUTES:function(){return r}});var r=[{path: "/dashboard",pageProps: {controller: "dashboard/dashboard",view: "dashboard/dashboard.html"}},{path: "settings",pageProps: {controller: "dashboard/general",view: "dashboard/general.html"}},{path: "networking",pageProps: {controller: "dashboard/networking",view: "dashboard/networking.html"}},{path: "devices",pageProps: {controller: "dashboard/devices/devices",view: "dashboard/devices/devices.html"}},{path: "devices/edit",pageProps: {controller: "dashboard/devices/device",view: "dashboard/devices/device.html"}},{path: "libraries",pageProps: {controller: "dashboard/library",view: "dashboard/library.html"}},{path: "libraries/display",pageProps: {controller: "dashboard/librarydisplay",view: "dashboard/librarydisplay.html"}},{path: "playback/transcoding",pageProps: {controller: "dashboard/encodingsettings",view: "dashboard/encodingsettings.html"}},{path: "logs",pageProps: {controller: "dashboard/logs",view: "dashboard/logs.html"}},{path: "libraries/metadata",pageProps: {controller: "dashboard/metadataImages",view: "dashboard/metadataimages.html"}},{path: "libraries/nfo",pageProps: {controller: "dashboard/metadatanfo",view: "dashboard/metadatanfo.html"}},{path: "playback/resume",pageProps: {controller: "dashboard/playback",view: "dashboard/playback.html"}},{path: "plugins/catalog",pageProps: {controller: "dashboard/plugins/available/index",view: "dashboard/plugins/available/index.html"}},{path: "plugins/repositories",pageProps: {controller: "dashboard/plugins/repositories/index",view: "dashboard/plugins/repositories/index.html"}},{path: "livetv/guide",pageProps: {controller: "livetvguideprovider",view: "livetvguideprovider.html"}},{path: "recordings",pageProps: {controller: "livetvsettings",view: "livetvsettings.html"}},{path: "livetv",pageProps: {controller: "livetvstatus",view: "livetvstatus.html"}},{path: "livetv/tuner",pageProps: {controller: "livetvtuner",view: "livetvtuner.html"}},{path: "plugins",pageProps: {controller: "dashboard/plugins/installed/index",view: "dashboard/plugins/installed/index.html"}},{path: "tasks/edit",pageProps: {controller: "dashboard/scheduledtasks/scheduledtask",view: "dashboard/scheduledtasks/scheduledtask.html"}},{path: "tasks",pageProps: {controller: "dashboard/scheduledtasks/scheduledtasks",view: "dashboard/scheduledtasks/scheduledtasks.html"}},{path: "keys",pageProps: {controller: "dashboard/apikeys",view: "dashboard/apikeys.html"}},{path: "playback/streaming",pageProps: {view: "dashboard/streaming.html",controller: "dashboard/streaming"}}]},7603:function(e,t,n){"use strict";n.r(t),n.d(t,{DASHBOARD_APP_PATHS:function(){return g},DASHBOARD_APP_ROUTES:function(){return b}});var r=n(62540),i=n(63696),o=n(94180),a=n(39244),s=n(51218),l=n(37881),u=n(4877),c=n(87404),d=n(86191),f=n(62156),p=n(5898),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)},y=n(34569),m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},v=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},g={Dashboard: "dashboard",MetadataManager: "metadata",PluginConfig: "configurationpage"},b=[{element:(0,r.jsx)(o.A,{isAdminRequired:!0}),children: [{lazy:function(){return Promise.all([n.e(45642),n.e(55931),n.e(90609),n.e(23247),n.e(60815),n.e(16304),n.e(81771),n.e(1270),n.e(41823),n.e(72577)]).then(n.bind(n,40059))},children: [{path:g.Dashboard,children:v(v([],m(a.ASYNC_ADMIN_ROUTES.map(s.G)),!1),m(u.LEGACY_ADMIN_ROUTES.map(l.I)),!1),errorElement:(0,r.jsx)(y.A,{pageClasses: ["type-interior"]})},(0,l.I)({path:g.MetadataManager,pageProps: {controller: "edititemmetadata",view: "edititemmetadata.html"}}),{path:g.PluginConfig,element:(0,r.jsx)((function(e){var t=e.view,n=(0,c.zy)();return(0,i.useEffect)((function(){var e;e={url:n.pathname+n.search,state:n.state,autoFocus:!1,options: {supportsThemeMedia:!1,enableMediaControl:!0}},f.A.tryRestoreView(e).catch((function(r){return i=void 0,o=void 0,s=function(){var i,o;return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(a){switch(a.label){case 0:return(null==r?void 0:r.cancelled)?[3,2]: [4,null==(i=d.A.currentApiClient())?void 0:i.get(i.getUrl(t+n.search)).then((function(e){return p.Ay.translateHtml(e)}))];case 1:o=a.sent(),f.A.loadView(h(h({},e),{view:o})),a.label=2;case 2:return[2]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function r(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}l((s=s.apply(i,o||[])).next())}));var i,o,a,s}))}),[t,n.pathname,n.search]),null}),{view: "/web/configurationpage"})}]}]}]},76617:function(e,t,n){"use strict";n.d(t,{A:function(){return B}});var r=n(62540),i=n(63696),o=n(94075),a=n(5271),s=n(77890),l=n(31522),u=n(34907),c=n(18509),d=n(20541),f=n(47750),p=n(5898),h=n(44797),y=n(2129),m=n(78965),v=n(2111),g=n(82535),b=n(65559),w=n(52974),x=n(38829),S=n(88884),A=n(83838),P=n(20462),k=n(11313),I=n(68355),j=n(34789),T=function(e){var t=e.target;if(!t.deviceType&&t.isLocalPlayer)return j.A.tv?(0,r.jsx)(I.A,{}):j.A.mobile?(0,r.jsx)(P.A,{}):(0,r.jsx)(S.A,{});switch(t.deviceType){case"smartphone":return(0,r.jsx)(P.A,{});case"tablet":return(0,r.jsx)(k.A,{});case"desktop":return(0,r.jsx)(S.A,{});case"cast":return(0,r.jsx)(l.A,{});case"tv":return(0,r.jsx)(I.A,{});default:return(0,r.jsx)(A.A,{})}},C="app-remote-play-menu",E=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=!!x.X.plugins.find((function(e){return"chromecast"===e.id})),s=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)([]),2),l=s[0],u=s[1];return(0,i.useEffect)((function(){var e,t,r,i;n&&(e=void 0,t=void 0,r=void 0,i=function(){var e;return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:return e=u,[4,f.f.getTargets()];case 1:return e.apply(void 0,[t.sent()]),[2]}}))},new(r||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))).catch((function(e){console.error("[AppRemotePlayMenu] unable to get playback targets",e)}))}),[n,u]),(0,r.jsxs)(b.A,{anchorEl:t,anchorOrigin: {vertical: "bottom",horizontal: "right"},transformOrigin: {vertical: "top",horizontal: "right"},id:C,keepMounted:!0,open:n,onClose:o,children: [!a&&[(0,r.jsxs)(w.A,{disabled:!0,children: [(0,r.jsx)(v.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(g.A,{children:p.Ay.translate("GoogleCastUnsupported")})]},"cast-unsupported-item"),(0,r.jsx)(m.A,{},"cast-unsupported-divider")],l.map((function(e){var t;return(0,r.jsxs)(w.A,{onClick:function(){return function(e){f.f.trySetActivePlayer(e.playerName,e),o()}(e)},children: [(0,r.jsx)(v.A,{children:(0,r.jsx)(T,{target:e})}),(0,r.jsx)(g.A,{primary:e.appName?"".concat(e.name," - ").concat(e.appName):e.name,secondary:null===(t=e.user)||void 0===t?void 0:t.Name})]},e.id)}))]})},L=n(32629),_=n(37001),O=n(29862),M=n(91120),R=n(48080),D=n(9055),N=n(83237),F=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},z="app-remote-play-active-menu",U=function(e){var t=e.anchorEl,n=e.open,o=e.onMenuClose,a=e.playerInfo,s=F((0,i.useState)(f.f.enableDisplayMirroring()),2),l=s[0],u=s[1],c=(null==a?void 0:a.supportedCommands)&&-1!==a.supportedCommands.indexOf("DisplayContent"),d=(0,i.useCallback)((function(){f.f.enableDisplayMirroring(!l),u(!l)}),[l,u]),h=F((0,i.useState)((0,N.Ol)()),2),y=h[0],x=h[1],S=(0,i.useCallback)((function(){(0,N.sS)(!y),x(!y)}),[y]),A=(null==a?void 0:a.deviceName)||(null==a?void 0:a.name),P=(0,i.useCallback)((function(){-1!==f.f.getSupportedCommands().indexOf("EndSession")?R.A.show({buttons: [{name:p.Ay.translate("Yes"),id: "yes"},{name:p.Ay.translate("No"),id: "no"}],text:p.Ay.translate("ConfirmEndPlayerSession",A)}).then((function(e){o(),"yes"===e&&f.f.getCurrentPlayer().endSession(),f.f.setDefaultPlayerActive()})).catch((function(){})):(o(),f.f.setDefaultPlayerActive())}),[o,A]);return(0,r.jsxs)(b.A,{anchorEl:t,anchorOrigin: {vertical: "bottom",horizontal: "right"},transformOrigin: {vertical: "top",horizontal: "right"},id:z,keepMounted:!0,open:n,onClose:o,MenuListProps: {"aria-labelledby": "remote-play-active-subheader",subheader:(0,r.jsx)(M.A,{component: "div",id: "remote-play-active-subheader",children:A})},children: [c&&(0,r.jsxs)(w.A,{onClick:d,children: [l&&(0,r.jsx)(v.A,{children:(0,r.jsx)(L.A,{})}),(0,r.jsx)(g.A,{inset:!l,children:p.Ay.translate("EnableDisplayMirroring")})]}),(0,r.jsxs)(w.A,{onClick:S,children: [y&&(0,r.jsx)(v.A,{children:(0,r.jsx)(L.A,{})}),(0,r.jsx)(g.A,{inset:!y,children:p.Ay.translate("EnableAutoCast")})]}),(0,r.jsx)(m.A,{}),(0,r.jsxs)(w.A,{component:D.N_,to: "/queue",onClick:o,children: [(0,r.jsx)(v.A,{children:(0,r.jsx)(O.A,{})}),(0,r.jsx)(g.A,{children:p.Ay.translate("HeaderRemoteControl")})]}),(0,r.jsx)(m.A,{}),(0,r.jsxs)(w.A,{onClick:P,children: [(0,r.jsx)(v.A,{children:(0,r.jsx)(_.A,{})}),(0,r.jsx)(g.A,{children:p.Ay.translate("Disconnect")})]})]})},V=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},B=function(){var e=(0,c.A)(),t=V((0,i.useState)(f.f.getPlayerInfo()),2),n=t[0],y=t[1],m=(0,i.useCallback)((function(){y(f.f.getPlayerInfo())}),[y]);(0,i.useEffect)((function(){return h.A.on(f.f,"playerchange",m),function(){h.A.off(f.f,"playerchange",m)}}),[m]);var v=V((0,i.useState)(null),2),g=v[0],b=v[1],w=Boolean(g),x=(0,i.useCallback)((function(e){b(e.currentTarget)}),[b]),S=(0,i.useCallback)((function(){b(null)}),[b]),A=V((0,i.useState)(null),2),P=A[0],k=A[1],I=Boolean(P),j=(0,i.useCallback)((function(e){k(e.currentTarget)}),[k]),T=(0,i.useCallback)((function(){k(null)}),[k]);return(0,r.jsxs)(r.Fragment,{children: [n&&!n.isLocalPlayer?(0,r.jsx)(a.A,{sx: {alignSelf: "center"},children:(0,r.jsx)(d.A,{title:p.Ay.translate("ButtonCast"),children:(0,r.jsx)(s.A,{variant: "text",size: "large",startIcon:(0,r.jsx)(o.A,{}),"aria-label":p.Ay.translate("ButtonCast"),"aria-controls":z,"aria-haspopup": "true",onClick:j,color: "inherit",sx: {color:e.palette.primary.main},children:n.deviceName||n.name})})}):(0,r.jsx)(d.A,{title:p.Ay.translate("ButtonCast"),children:(0,r.jsx)(u.A,{size: "large","aria-label":p.Ay.translate("ButtonCast"),"aria-controls":C,"aria-haspopup": "true",onClick:x,color: "inherit",children:(0,r.jsx)(l.A,{})})}),(0,r.jsx)(E,{open:w,anchorEl:g,onMenuClose:S}),(0,r.jsx)(U,{open:I,anchorEl:P,onMenuClose:T,playerInfo:n})]})}},5824:function(e,t,n){"use strict";n.d(t,{A:function(){return O}});var r=n(62540),i=n(68136),o=n(47565),a=n(34907),s=n(20541),l=n(63696),u=n(38829),c=n(69410),d=n(5898),f=n(38783),p=n(73187),h=n(24851),y=n(40749),m=n(32683),v=n(584),g=n(41911),b=n(51493),w=n(18915),x=n(78965),S=n(2111),A=n(82535),P=n(91120),k=n(65559),I=n(52974),j=n(61586),T=function(){var e=(0,c.gf)().api;return(0,j.I)({queryKey: ["SyncPlay","Groups"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,r=void 0,o=function(){return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(n){switch(n.label){case 0:return e?[4,(0,p.u)(e).syncPlayGetGroups(t)]:(console.warn("[fetchSyncPlayGroups] No API instance available"),[2]);case 1:return[2,n.sent().data]}}))},new((i=void 0)||(i=Promise))((function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function s(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}l((o=o.apply(n,r||[])).next())}));var n,r,i,o}(e,{signal:n})},enabled:!!e})},C=n(44797),E=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},L="app-sync-play-menu",_=function(e){var t,o,a=e.anchorEl,s=e.open,j=e.onMenuClose,_=E((0,l.useState)(),2),O=_[0],M=_[1],R=(0,c.gf)(),D=R.__legacyApiClient__,N=R.api,F=R.user,z=E((0,l.useState)(),2),U=z[0],V=z[1],B=Boolean(U);(0,l.useEffect)((function(){var e;M(null===(e=u.X.firstOfType(f.Q.SyncPlay))||void 0===e?void 0:e.instance)}),[]);var q=T().data,H=(0,l.useCallback)((function(){N&&F&&((0,p.u)(N).syncPlayCreateGroup({newGroupRequestDto: {GroupName:d.Ay.translate("SyncPlayGroupDefaultTitle",F.Name)}}).catch((function(e){console.error("[SyncPlayMenu] failed to create a SyncPlay group",e)})),j())}),[N,j,F]),G=(0,l.useCallback)((function(){N&&((0,p.u)(N).syncPlayLeaveGroup().catch((function(e){console.error("[SyncPlayMenu] failed to leave SyncPlay group",e)})),j())}),[N,j]),W=(0,l.useCallback)((function(e){N&&((0,p.u)(N).syncPlayJoinGroup({joinGroupRequestDto: {GroupId:e}}).catch((function(e){console.error("[SyncPlayMenu] failed to join SyncPlay group",e)})),j())}),[N,j]),Y=(0,l.useCallback)((function(){return e=void 0,t=void 0,i=function(){return function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(e){switch(e.label){case 0:return O?[4,Promise.all([n.e(45568),n.e(2217)]).then(n.bind(n,45568))]: [2];case 1:return new(0,e.sent().default)(D,O.Manager.getTimeSyncCore(),{groupInfo:U}).embed().catch((function(e){e&&console.error("[SyncPlayMenu] Error creating SyncPlay settings editor",e)})),j(),[2]}}))},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}));var e,t,r,i}),[D,U,j,O]),Q=(0,l.useCallback)((function(){D&&(null==O||O.Manager.resumeGroupPlayback(D),j())}),[D,j,O]),K=(0,l.useCallback)((function(){D&&(null==O||O.Manager.haltGroupPlayback(D),j())}),[D,j,O]),X=(0,l.useCallback)((function(e,t){var n;V(O&&t&&null!==(n=O.Manager.getGroupInfo())&&void 0!==n?n:void 0)}),[O]);(0,l.useEffect)((function(){if(O)return C.A.on(O.Manager,"enabled",X),function(){C.A.off(O.Manager,"enabled",X)}}),[X,O]);var $=[];B?((null==O?void 0:O.Manager.isPlaylistEmpty())||(null==O?void 0:O.Manager.isPlaybackActive())?(null==O?void 0:O.Manager.isPlaybackActive())&&$.push((0,r.jsxs)(I.A,{onClick:K,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("LabelSyncPlayHaltPlayback")})]},"sync-play-stop-playback")):$.push((0,r.jsxs)(I.A,{onClick:Q,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("LabelSyncPlayResumePlayback")})]},"sync-play-start-playback")),$.push((0,r.jsxs)(I.A,{onClick:Y,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(w.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("Settings")})]},"sync-play-settings")),$.push((0,r.jsx)(x.A,{},"sync-play-controls-divider")),$.push((0,r.jsxs)(I.A,{onClick:G,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("LabelSyncPlayLeaveGroup")})]},"sync-play-exit"))):(null==q?void 0:q.length)||(null===(t=null==F?void 0:F.Policy)||void 0===t?void 0:t.SyncPlayAccess)===i.r.CreateAndJoinGroups?(q&&q.length>0&&(q.forEach((function(e){var t;$.push((0,r.jsxs)(I.A,{onClick:function(){return e.GroupId&&W(e.GroupId)},children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(A.A,{primary:e.GroupName,secondary:null===(t=e.Participants)||void 0===t?void 0:t.join(", ")})]},e.GroupId))})),$.push((0,r.jsx)(x.A,{},"sync-play-groups-divider"))),(null===(o=null==F?void 0:F.Policy)||void 0===o?void 0:o.SyncPlayAccess)===i.r.CreateAndJoinGroups&&$.push((0,r.jsxs)(I.A,{onClick:H,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(h.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("LabelSyncPlayNewGroupDescription")})]},"sync-play-new-group"))):$.push((0,r.jsxs)(I.A,{disabled:!0,children: [(0,r.jsx)(S.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(A.A,{primary:d.Ay.translate("LabelSyncPlayNoGroups")})]},"sync-play-unavailable"));var J=B?{"aria-labelledby": "sync-play-active-subheader",subheader:(0,r.jsx)(P.A,{component: "div",id: "sync-play-active-subheader",children:null==U?void 0:U.GroupName})}:void 0;return(0,r.jsx)(k.A,{anchorEl:a,anchorOrigin: {vertical: "bottom",horizontal: "right"},transformOrigin: {vertical: "top",horizontal: "right"},id:L,keepMounted:!0,open:s,onClose:j,MenuListProps:J,children:$})},O=function(){var e=(0,c.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,l.useState)(null),2),n=t[0],p=t[1],h=Boolean(n),y=(0,l.useCallback)((function(e){p(e.currentTarget)}),[p]),m=(0,l.useCallback)((function(){p(null)}),[p]);return(null==e?void 0:e.Policy)&&e.Policy.SyncPlayAccess===i.r.None||0===u.X.ofType(f.Q.SyncPlay).length?null:(0,r.jsxs)(r.Fragment,{children: [(0,r.jsx)(s.A,{title:d.Ay.translate("ButtonSyncPlay"),children:(0,r.jsx)(a.A,{size: "large","aria-label":d.Ay.translate("ButtonSyncPlay"),"aria-controls":L,"aria-haspopup": "true",onClick:y,color: "inherit",children:(0,r.jsx)(o.A,{})})}),(0,r.jsx)(_,{open:h,anchorEl:n,onMenuClose:m})]})}},24786:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(21643)},21643:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return i}});var r=n(51218),i=[{path: "home.html",page: "home",type:r.k.Experimental},{path: "quickconnect",page: "quickConnect"},{path: "search.html",page: "search"},{path: "userprofile.html",page: "user/userprofile"},{path: "movies.html",page: "movies",type:r.k.Experimental},{path: "tv.html",page: "shows",type:r.k.Experimental},{path: "music.html",page: "music",type:r.k.Experimental},{path: "livetv.html",page: "livetv",type:r.k.Experimental},{path: "mypreferencesdisplay.html",page: "user/display",type:r.k.Experimental},{path: "homevideos.html",page: "homevideos",type:r.k.Experimental}]},77285:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(3312),i=n(38274)},3312:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path: "addserver.html",pageProps: {controller: "session/addServer/index",view: "session/addServer/index.html"}},{path: "selectserver.html",pageProps: {controller: "session/selectServer/index",view: "session/selectServer/index.html"}},{path: "login.html",pageProps: {controller: "session/login/index",view: "session/login/index.html"}},{path: "forgotpassword.html",pageProps: {controller: "session/forgotPassword/index",view: "session/forgotPassword/index.html"}},{path: "forgotpasswordpin.html",pageProps: {controller: "session/resetPassword/index",view: "session/resetPassword/index.html"}},{path: "wizardremoteaccess.html",pageProps: {controller: "wizard/remote/index",view: "wizard/remote/index.html"}},{path: "wizardfinish.html",pageProps: {controller: "wizard/finish/index",view: "wizard/finish/index.html"}},{path: "wizardlibrary.html",pageProps: {controller: "dashboard/library",view: "wizard/library.html"}},{path: "wizardsettings.html",pageProps: {controller: "wizard/settings/index",view: "wizard/settings/index.html"}},{path: "wizardstart.html",pageProps: {controller: "wizard/start/index",view: "wizard/start/index.html"}},{path: "wizarduser.html",pageProps: {controller: "wizard/user/index",view: "wizard/user/index.html"}}]},38274:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path: "details",pageProps: {controller: "itemDetails/index",view: "itemDetails/index.html"}},{path: "list.html",pageProps: {controller: "list",view: "list.html"}},{path: "lyrics",pageProps: {controller: "lyrics",view: "lyrics.html"}},{path: "mypreferencesmenu.html",pageProps: {controller: "user/menu/index",view: "user/menu/index.html"}},{path: "mypreferencescontrols.html",pageProps: {controller: "user/controls/index",view: "user/controls/index.html"}},{path: "mypreferenceshome.html",pageProps: {controller: "user/home/index",view: "user/home/index.html"}},{path: "mypreferencesplayback.html",pageProps: {controller: "user/playback/index",view: "user/playback/index.html"}},{path: "mypreferencessubtitles.html",pageProps: {controller: "user/subtitles/index",view: "user/subtitles/index.html"}},{path: "queue",pageProps: {controller: "playback/queue/index",view: "playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}}]},66359:function(e,t,n){"use strict";n.r(t),n.d(t,{EXPERIMENTAL_APP_ROUTES:function(){return h}});var r=n(62540),i=(n(63696),n(87404)),o=n(94180),a=n(51218),s=n(37881),l=n(34569),u=n(24786),c=n(77285),d=n(13993),f=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},h=[{path: "/*",lazy:function(){return Promise.all([n.e(45642),n.e(55931),n.e(23247),n.e(16304),n.e(81771),n.e(55456)]).then(n.bind(n,1021))},children:p([{element:(0,r.jsx)(o.A,{isUserRequired:!0}),children:p(p(p([],f(u.ASYNC_USER_ROUTES.map(a.G)),!1),f(c.LEGACY_USER_ROUTES.map(s.I)),!1),[{path: "video",element:(0,r.jsx)(d.default,{})}],!1),ErrorBoundary:l.A},{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to: "/home.html"})}],f(c.LEGACY_PUBLIC_ROUTES.map(s.I)),!1)}]},13993:function(e,t,n){"use strict";n.r(t);var r=n(62540),i=n(5271),o=n(61667),a=n(63696),s=n(76617),l=n(5824),u=n(78248),c=n(55219),d=n(42538),f=n(44797);t.default=function(){var e=(0,a.useRef)(document),t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,a.useState)(!0),2),n=t[0],p=t[1],h=function(e,t){p(t)};return(0,a.useEffect)((function(){var t=e.current;return t&&f.A.on(t,d.B.SHOW_VIDEO_OSD,h),function(){t&&f.A.off(t,d.B.SHOW_VIDEO_OSD,h)}}),[]),(0,r.jsxs)(r.Fragment,{children: [(0,r.jsx)(o.A,{in:n,easing: "fade-out",children:(0,r.jsx)(i.A,{sx: {position: "absolute",top: 0,left: 0,right: 0,color: "white"},children:(0,r.jsx)(u.A,{isDrawerAvailable:!1,isDrawerOpen:!1,isUserMenuAvailable:!1,buttons:(0,r.jsxs)(r.Fragment,{children: [(0,r.jsx)(l.A,{}),(0,r.jsx)(s.A,{})]})})})}),(0,r.jsx)(c.A,{controller: "playback/video/index",view: "playback/video/index.html",type: "video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0})]})}},94738:function(e,t,n){"use strict";var r;n.d(t,{M:function(){return r}}),function(e){e.None="None",e.AskToSkip="AskToSkip",e.Skip="Skip"}(r||(r={}))},57178:function(e,t,n){"use strict";var r;n.d(t,{g:function(){return r}}),function(e){e.Error="error",e.FullscreenChange="fullscreenchange",e.ItemStarted="itemstarted",e.ItemStopped="itemstopped",e.MediaStreamsChange="mediastreamschange",e.Pause="pause",e.PlaybackStart="playbackstart",e.PlaybackStop="playbackstop",e.PlaylistItemAdd="playlistitemadd",e.PlaylistItemMove="playlistitemmove",e.PlaylistItemRemove="playlistitemremove",e.PromptSkip="promptskip",e.RepeatModeChange="repeatmodechange",e.ShuffleModeChange="shufflequeuemodechange",e.Stopped="stopped",e.TimeUpdate="timeupdate",e.Unpause="unpause",e.VolumeChange="volumechange"}(r||(r={}))},73025:function(e,t,n){"use strict";n.d(t,{O:function(){return s},_:function(){return l}});var r,i=n(41087),o=n(94738),a=((r={})[i.w.Intro]=o.M.AskToSkip,r[i.w.Outro]=o.M.AskToSkip,r),s=function(e){return"".concat("segmentTypeAction","__").concat(e)};function l(e,t){var n=e.get(s(t),!1),r=a[t]||o.M.None;return n||r}},34945:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r.ASYNC_USER_ROUTES}});var r=n(12446)},12446:function(e,t,n){"use strict";n.r(t),n.d(t,{ASYNC_USER_ROUTES:function(){return r}});var r=[{path: "quickconnect",page: "quickConnect"},{path: "search.html",page: "search"},{path: "userprofile.html",page: "user/userprofile"}]},98372:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r.LEGACY_PUBLIC_ROUTES},LEGACY_USER_ROUTES:function(){return i.LEGACY_USER_ROUTES}});var r=n(7451),i=n(70373)},7451:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_PUBLIC_ROUTES:function(){return r}});var r=[{path: "addserver.html",pageProps: {controller: "session/addServer/index",view: "session/addServer/index.html"}},{path: "selectserver.html",pageProps: {controller: "session/selectServer/index",view: "session/selectServer/index.html"}},{path: "login.html",pageProps: {controller: "session/login/index",view: "session/login/index.html"}},{path: "forgotpassword.html",pageProps: {controller: "session/forgotPassword/index",view: "session/forgotPassword/index.html"}},{path: "forgotpasswordpin.html",pageProps: {controller: "session/resetPassword/index",view: "session/resetPassword/index.html"}},{path: "wizardremoteaccess.html",pageProps: {controller: "wizard/remote/index",view: "wizard/remote/index.html"}},{path: "wizardfinish.html",pageProps: {controller: "wizard/finish/index",view: "wizard/finish/index.html"}},{path: "wizardlibrary.html",pageProps: {controller: "dashboard/library",view: "wizard/library.html"}},{path: "wizardsettings.html",pageProps: {controller: "wizard/settings/index",view: "wizard/settings/index.html"}},{path: "wizardstart.html",pageProps: {controller: "wizard/start/index",view: "wizard/start/index.html"}},{path: "wizarduser.html",pageProps: {controller: "wizard/user/index",view: "wizard/user/index.html"}}]},70373:function(e,t,n){"use strict";n.r(t),n.d(t,{LEGACY_USER_ROUTES:function(){return r}});var r=[{path: "details",pageProps: {controller: "itemDetails/index",view: "itemDetails/index.html"}},{path: "list.html",pageProps: {controller: "list",view: "list.html"}},{path: "livetv.html",pageProps: {controller: "livetv/livetvsuggested",view: "livetv.html"}},{path: "lyrics",pageProps: {controller: "lyrics",view: "lyrics.html"}},{path: "music.html",pageProps: {controller: "music/musicrecommended",view: "music/music.html"}},{path: "mypreferencesmenu.html",pageProps: {controller: "user/menu/index",view: "user/menu/index.html"}},{path: "mypreferencescontrols.html",pageProps: {controller: "user/controls/index",view: "user/controls/index.html"}},{path: "mypreferencesdisplay.html",pageProps: {controller: "user/display/index",view: "user/display/index.html"}},{path: "mypreferenceshome.html",pageProps: {controller: "user/home/index",view: "user/home/index.html"}},{path: "mypreferencesplayback.html",pageProps: {controller: "user/playback/index",view: "user/playback/index.html"}},{path: "mypreferencessubtitles.html",pageProps: {controller: "user/subtitles/index",view: "user/subtitles/index.html"}},{path: "tv.html",pageProps: {controller: "shows/tvrecommended",view: "shows/tvrecommended.html"}},{path: "video",pageProps: {controller: "playback/video/index",view: "playback/video/index.html",type: "video-osd",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path: "queue",pageProps: {controller: "playback/queue/index",view: "playback/queue/index.html",isFullscreen:!0,isNowPlayingBarEnabled:!1,isThemeMediaSupported:!0}},{path: "home.html",pageProps: {controller: "home",view: "home.html"}},{path: "movies.html",pageProps: {controller: "movies/moviesrecommended",view: "movies/movies.html"}}]},4022:function(e,t,n){"use strict";n.r(t),n.d(t,{STABLE_APP_ROUTES:function(){return h}});var r=n(62540),i=n(87404),o=(n(63696),n(94180)),a=n(51218),s=n(37881),l=n(34569),u=n(13258),c=n(34945),d=n(98372),f=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},h=[{path: "/*",Component:function(){return(0,r.jsx)(u.A,{children:(0,r.jsx)(i.sv,{})})},children:p([{element:(0,r.jsx)(o.A,{isUserRequired:!0}),children:p(p([],f(c.ASYNC_USER_ROUTES.map(a.G)),!1),f(d.LEGACY_USER_ROUTES.map(s.I)),!1),ErrorBoundary:l.A},{index:!0,element:(0,r.jsx)(i.C5,{replace:!0,to: "/home.html"})}],f(d.LEGACY_PUBLIC_ROUTES.map(s.I)),!1)}]},13258:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(64963);t.A=function(e){var t=e.children;return(0,i.useEffect)((function(){return function(){o.Ay.reset()}}),[]),(0,r.jsxs)(r.Fragment,{children: [(0,r.jsx)("div",{className: "mainAnimatedPages skinBody"}),(0,r.jsx)("div",{className: "skinBody",children:t})]})}},94180:function(e,t,n){"use strict";var r,i=n(62540),o=n(63696),a=n(87404),s=n(41177),l=n(84849),u=n(86191),c=n(5898),d=n(33073),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,i,o={label: 0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys: [],ops: []},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};!function(e){e.Home="/home.html",e.Login="/login.html",e.SelectServer="/selectserver.html",e.StartWizard="/wizardstart.html"}(r||(r={})),t.A=function(e){var t=e.isAdminRequired,n=void 0!==t&&t,h=e.isUserRequired,y=void 0===h||h,m=(0,a.Zp)(),v=(0,a.zy)(),g=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,o.useState)(!0),2),b=g[0],w=g[1],x=(0,o.useCallback)((function(e){return f(void 0,void 0,void 0,(function(){var t,n;return p(this,(function(i){switch(i.label){case 0:switch(e.State){case d.K.SignedIn:return[3,1];case d.K.ServerSignIn:return[3,2];case d.K.ServerSelection:return[3,3];case d.K.ServerUpdateNeeded:return[3,4]}return[3,8];case 1:return console.debug("[ConnectionRequired] already logged in, redirecting to home"),m(r.Home),[2];case 2:return v.pathname===r.Login?w(!1):(console.debug("[ConnectionRequired] not logged in, redirecting to login page",v),t=encodeURIComponent(v.pathname+v.search),m("".concat(r.Login,"?serverid=").concat(e.ApiClient.serverId(),"&url=").concat(t))),[2];case 3:return v.pathname===r.SelectServer?w(!1):(console.debug("[ConnectionRequired] redirecting to select server page"),m(r.SelectServer)),[2];case 4:return i.trys.push([4,6,,7]),[4,(0,s.A)({text:c.Ay.translate("ServerUpdateNeeded","https://github.com/jellyfin/jellyfin"),html:c.Ay.translate("ServerUpdateNeeded",'<a href="https://github.com/jellyfin/jellyfin">https: //github.com/jellyfin/jellyfin</a>')})];case 5:return i.sent(),[3,7];case 6:return n=i.sent(),console.warn("[ConnectionRequired] failed to show alert",n),[3,7];case 7:return console.debug("[ConnectionRequired] server update required, redirecting to select server page"),m(r.SelectServer),[2];case 8:return console.warn("[ConnectionRequired] unhandled connection state",e.State),[2]}}))}))}),[v.pathname,m]),S=(0,o.useCallback)((function(e){return f(void 0,void 0,void 0,(function(){var t,n,i;return p(this,(function(o){switch(o.label){case 0:if(e.State!==d.K.ServerSignIn)return[3,5];o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch("".concat(e.ApiClient.serverAddress(),"/System/Info/Public"),{cache:"no-cache"})];case 2:if(!(t=o.sent()).ok)throw new Error("Public system info request failed");return[4,t.json()];case 3:return(null==(n=o.sent())?void 0:n.StartupWizardCompleted)?[3,5]:(u.A.setLocalApiClient(e.ApiClient),console.info("[ConnectionRequired] startup wizard is not complete, redirecting there"),m(r.StartWizard),[2]);case 4:return i=o.sent(),console.error("[ConnectionRequired] checking wizard status failed",i),[2];case 5:return x(e).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2]}}))}))}),[x,m]),A=(0,o.useCallback)((function(){return f(void 0,void 0,void 0,(function(){var e,t,r,i,o,a,s;return p(this,(function(l){switch(l.label){case 0:if(e=u.A.currentApiClient(),!n&&!y||(null==e?void 0:e.isLoggedIn()))return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),console.warn("[ConnectionRequired] unauthenticated user attempted to access user route"),t=x,[4,u.A.connect()];case 2:return t.apply(void 0,[l.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[3,4];case 3:return r=l.sent(),console.warn("[ConnectionRequired] error bouncing from user route",r),[3,4];case 4:return[2];case 5:if(!n)return[3,11];l.label=6;case 6:return l.trys.push([6,10,,11]),[4,null==e?void 0:e.getCurrentUser()];case 7:return i=l.sent(),(null===(s=null==i?void 0:i.Policy)||void 0===s?void 0:s.IsAdministrator)?[3,9]:(console.warn("[ConnectionRequired] normal user attempted to access admin route"),o=x,[4,u.A.connect()]);case 8:return o.apply(void 0,[l.sent()]).catch((function(e){console.error("[ConnectionRequired] failed to bounce",e)})),[2];case 9:return[3,11];case 10:return a=l.sent(),console.warn("[ConnectionRequired] error bouncing from admin route",a),[2];case 11:return w(!1),[2]}}))}))}),[x,n,y]);return(0,o.useEffect)((function(){var e=u.A.currentApiClient(),t=u.A.firstConnection;console.debug("[ConnectionRequired] connection state",null==t?void 0:t.State),u.A.firstConnection=null,t&&t.State!==d.K.SignedIn&&!(null==e?void 0:e.isLoggedIn())?S(t).catch((function(e){console.error("[ConnectionRequired] could not start wizard",e)})):A().catch((function(e){console.error("[ConnectionRequired] could not validate user access",e)}))}),[S,A]),b?(0,i.jsx)(l.A,{}):(0,i.jsx)(a.sv,{})}},65242:function(e,t,n){"use strict";var r=n(62540),i=n(63696),o=n(62156);t.A=function(e){var t=e.children,n=e.id,a=e.className,s=void 0===a?"":a,l=e.title,u=e.isBackButtonEnabled,c=void 0===u||u,d=e.isMenuButtonEnabled,f=void 0!==d&&d,p=e.isNowPlayingBarEnabled,h=void 0===p||p,y=e.isThemeMediaSupported,m=void 0!==y&&y,v=e.backDropType,g=(0,i.useRef)(null);return(0,i.useEffect)((function(){o.A.hideView()}),[]),(0,i.useEffect)((function(){var e,t,n,r,i={bubbles:!0,cancelable:!1,detail:{isRestored:!1,options:{enableMediaControl:h,supportsThemeMedia:m}}};null===(e=g.current)||void 0===e||e.dispatchEvent(new CustomEvent("viewbeforeshow",i)),null===(t=g.current)||void 0===t||t.dispatchEvent(new CustomEvent("pagebeforeshow",i)),null===(n=g.current)||void 0===n||n.dispatchEvent(new CustomEvent("viewshow",i)),null===(r=g.current)||void 0===r||r.dispatchEvent(new CustomEvent("pageshow",i))}),[g,h,m]),(0,r.jsx)("div",{ref:g,id:n,"data-role":"page",className:"page ".concat(s),"data-title":l,"data-backbutton":c,"data-menubutton":f,"data-backdroptype":v,children:t})}},64174:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(62540),i=n(5271),o=n(27538),a=n(87322),s=n(96073),l=(n(63696),n(34789)),u=240;t.A=function(e){var t=e.children,n=e.open,c=void 0!==n&&n,d=e.onClose,f=e.onOpen;return(0,s.A)((function(e){return e.breakpoints.up("md")}))?(0,r.jsx)(o.Ay,{sx:{width:u,flexShrink:0,"& .MuiDrawer-paper":{width:u,paddingBottom:"4.2rem",boxSizing:"border-box"}},variant:"permanent",anchor:"left",children:t}):(0,r.jsx)(a.A,{anchor:"left",open:c,onClose:d,onOpen:f,disableDiscovery:l.A.iOS,ModalProps:{keepMounted:!0},children:(0,r.jsx)(i.A,{role:"presentation",onClick:d,onKeyDown:d,children:t})})}},81965:function(e,t,n){"use strict";var r=n(62540),i=(n(63696),n(1047)),o=n(18509),a=n(69410);t.A=function(e){var t,n=e.user,s=(0,a.gf)().api,l=(0,o.A)();return n?(0,r.jsx)(i.A,{alt:null!==(t=n.Name)&&void 0!==t?t:void 0,src:s&&n.Id&&n.PrimaryImageTag?"".concat(s.basePath,"/Users/").concat(n.Id,"/Images/Primary?tag=").concat(n.PrimaryImageTag):void 0,sx:{bgcolor:l.palette.primary.dark,color:"inherit"}}):null}},84849:function(e,t,n){"use strict";var r=n(63696),i=n(8566);t.A=function(){return(0,r.useEffect)((function(){return i.Ay.show(),function(){i.Ay.hide()}}),[]),null}},8566:function(e,t,n){"use strict";var r,i={show:function(){var e;r||((e=document.createElement("div")).setAttribute("dir","ltr"),e.classList.add("docspinner"),e.classList.add("mdl-spinner"),e.innerHTML='<div class="mdl-spinner__layer mdl-spinner__layer-1"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-2"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-3"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div><div class="mdl-spinner__layer mdl-spinner__layer-4"><div class="mdl-spinner__circle-clipper mdl-spinner__left"><div class="mdl-spinner__circle mdl-spinner__circleLeft"></div></div><div class="mdl-spinner__circle-clipper mdl-spinner__right"><div class="mdl-spinner__circle mdl-spinner__circleRight"></div></div></div>',document.body.appendChild(e),r=e),r.classList.add("mdlSpinnerActive")},hide:function(){r&&r.classList.remove("mdlSpinnerActive")}};window.Loading=i,t.Ay=i},51218:function(e,t,n){"use strict";n.d(t,{G:function(){return s},k:function(){return r}});var r,i=n(62540),o=n(63696);!function(e){e[e.Stable=0]="Stable",e[e.Experimental=1]="Experimental",e[e.Dashboard=2]="Dashboard"}(r||(r={}));var a=function(e,t){switch(t){case r.Dashboard:return n(38601)("./".concat(e));case r.Experimental:return n(29561)("./".concat(e));case r.Stable:return n(92950)("./".concat(e))}},s=function(e){var t=e.path,n=e.page,s=e.type,l=void 0===s?r.Stable:s;return{path:t,lazy:function(){return e=void 0,r=void 0,u=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(r){switch(r.label){case 0:return[4,a(null!=n?n:t,l)];case 1:return e=r.sent().default,[2,{element:(0,i.jsx)(o.StrictMode,{children:(0,i.jsx)(e,{})})}]}}))},new((s=void 0)||(s=Promise))((function(t,n){function i(e){try{a(u.next(e))}catch(e){n(e)}}function o(e){try{a(u.throw(e))}catch(e){n(e)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,o)}a((u=u.apply(e,r||[])).next())}));var e,r,s,u}}}},34569:function(e,t,n){"use strict";var r=n(62540),i=n(51890),o=n(50947),a=n(5271),s=n(8676),l=n(99851),u=n(4452),c=n.n(u),d=n(63696),f=n(87404),p=n(8566),h=n(65242);t.A=function(e){var t=e.pageClasses,n=void 0===t?["libraryPage"]:t,u=(0,f.r5)();return(0,d.useEffect)((function(){p.Ay.hide()}),[]),(0,r.jsx)(h.A,{id:"errorBoundary",className:c()("mainAnimatedPage",n),children:(0,r.jsx)(a.A,{className:"content-primary",children:(0,r.jsxs)(i.A,{severity:"error",children:[(0,r.jsx)(o.A,{children:u.name}),(0,r.jsx)(l.A,{children:u.message}),u.stack&&(0,r.jsx)(s.A,{variant:"outlined",sx:{marginTop:1,backgroundColor:"transparent"},children:(0,r.jsx)(a.A,{component:"pre",sx:{overflow:"auto",margin:2,maxHeight:"25rem"},children:u.stack})})]})})})}},37881:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(62540),i=(n(63696),n(55219)),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e){return{path:e.path,element:(0,r.jsx)(i.A,o({},e.pageProps))}}},78248:function(e,t,n){"use strict";n.d(t,{A:function(){return z}});var r=n(62540),i=n(43855),o=n(96358),a=n(5271),s=n(34907),l=n(57326),u=n(20541),c=n(63696),d=n(70267),f=n(69410),p=n(5898),h=n(81965),y=n(18850),m=n(79396),v=n(37001),g=n(41829),b=n(97217),w=n(46499),x=n(22342),S=n(44572),A=n(90012),P=n(78965),k=n(2111),I=n(82535),j=n(65559),T=n(52974),C=n(9055),E=n(22622),L=n(89100),_=n(38935),O=n(61586),M=function(){var e=(0,f.gf)();return(0,O.I)({queryKey:["QuickConnect","Enabled"],queryFn:function(t){var n,r,i,o,a,s,l=t.signal;return n=e,r={signal:l},i=void 0,o=void 0,s=function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(t){switch(t.label){case 0:if(!(e=n.api))throw new Error("No API instance available");return[4,(0,_.k)(e).getQuickConnectEnabled(r)];case 1:return[2,t.sent().data]}}))},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function r(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}l((s=s.apply(i,o||[])).next())}))}})},R="app-user-menu",D=function(e){var t,n=e.anchorEl,i=e.open,o=e.onMenuClose,a=(0,f.gf)().user,s=M().data,l=(0,c.useCallback)((function(){var e;null===(e=window.NativeShell)||void 0===e||e.openClientSettings(),o()}),[o]),u=(0,c.useCallback)((function(){E.g.exit(),o()}),[o]),d=(0,c.useCallback)((function(){L.default.logout(),o()}),[o]),h=(0,c.useCallback)((function(){L.default.selectServer(),o()}),[o]);return(0,r.jsxs)(j.A,{anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},id:R,keepMounted:!0,open:i,onClose:o,children:[(0,r.jsxs)(T.A,{component:C.N_,to:"/userprofile.html?userId=".concat(null==a?void 0:a.Id),onClick:o,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(y.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("Profile")})]}),(0,r.jsxs)(T.A,{component:C.N_,to:"/mypreferencesmenu.html",onClick:o,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(S.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("Settings")})]}),E.g.supports("clientsettings")&&[(0,r.jsx)(P.A,{},"client-settings-divider"),(0,r.jsxs)(T.A,{onClick:l,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(m.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("ClientSettings")})]},"client-settings-button")],(null===(t=null==a?void 0:a.Policy)||void 0===t?void 0:t.IsAdministrator)&&[(0,r.jsx)(P.A,{},"admin-links-divider"),(0,r.jsxs)(T.A,{component:C.N_,to:"/dashboard",onClick:o,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(g.A,{})}),(0,r.jsx)(I.A,{primary:p.Ay.translate("TabDashboard")})]},"admin-dashboard-link"),(0,r.jsxs)(T.A,{component:C.N_,to:"/metadata",onClick:o,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(b.A,{})}),(0,r.jsx)(I.A,{primary:p.Ay.translate("MetadataManager")})]},"admin-metadata-link")],(0,r.jsx)(P.A,{}),s&&(0,r.jsxs)(T.A,{component:C.N_,to:"/quickconnect",onClick:o,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(x.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("QuickConnect")})]}),E.g.supports("multiserver")&&(0,r.jsxs)(T.A,{onClick:h,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(A.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("SelectServer")})]}),(0,r.jsxs)(T.A,{onClick:d,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(w.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("ButtonSignOut")})]}),E.g.supports("exitmenu")&&[(0,r.jsx)(P.A,{},"exit-menu-divider"),(0,r.jsxs)(T.A,{onClick:u,children:[(0,r.jsx)(k.A,{children:(0,r.jsx)(v.A,{})}),(0,r.jsx)(I.A,{children:p.Ay.translate("ButtonExitApp")})]},"exit-menu-button")]]})},N=function(){var e=(0,f.gf)().user,t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,c.useState)(null),2),n=t[0],i=t[1],o=Boolean(n),a=(0,c.useCallback)((function(e){i(e.currentTarget)}),[i]),l=(0,c.useCallback)((function(){i(null)}),[i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{title:p.Ay.translate("UserMenu"),children:(0,r.jsx)(s.A,{size:"large",edge:"end","aria-label":p.Ay.translate("UserMenu"),"aria-controls":R,"aria-haspopup":"true",onClick:a,color:"inherit",sx:{padding:0},children:(0,r.jsx)(h.A,{user:e})})}),(0,r.jsx)(D,{open:o,anchorEl:n,onMenuClose:l})]})},F=function(){d.appRouter.back().catch((function(e){console.error("[AppToolbar] error calling appRouter.back",e)}))},z=function(e){var t=e.buttons,n=e.children,c=e.isDrawerAvailable,h=e.isDrawerOpen,y=e.onDrawerButtonClick,m=void 0===y?function(){}:y,v=e.isUserMenuAvailable,g=void 0===v||v,b=(0,f.gf)().user,w=Boolean(b),x=d.appRouter.canGoBack();return(0,r.jsxs)(l.A,{variant:"dense",sx:{flexWrap:{xs:"wrap",lg:"nowrap"}},children:[w&&c&&(0,r.jsx)(u.A,{title:p.Ay.translate(h?"MenuClose":"MenuOpen"),children:(0,r.jsx)(s.A,{size:"large",edge:"start",color:"inherit","aria-label":p.Ay.translate(h?"MenuClose":"MenuOpen"),onClick:m,children:(0,r.jsx)(o.A,{})})}),x&&(0,r.jsx)(u.A,{title:p.Ay.translate("ButtonBack"),children:(0,r.jsx)(s.A,{size:"large",edge:w&&c?void 0:"start",color:"inherit","aria-label":p.Ay.translate("ButtonBack"),onClick:F,children:(0,r.jsx)(i.A,{})})}),n,(0,r.jsx)(a.A,{sx:{display:"flex",flexGrow:1,justifyContent:"flex-end"},children:t}),w&&g&&(0,r.jsx)(a.A,{sx:{flexGrow:0},children:(0,r.jsx)(N,{})})]})}},55219:function(e,t,n){"use strict";var r=n(25127),i=n(63696),o=n(87404),a=n(5898),s=n(62156),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)},u=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},d=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},f=function(e,t,r){return u(void 0,void 0,void 0,(function(){var i,o,u;return c(this,(function(c){switch(c.label){case 0:return[4,Promise.all([n(7062)("./".concat(e)),n(7062)("./".concat(t)).then((function(e){return a.Ay.translateHtml(e)}))])];case 1:return i=d.apply(void 0,[c.sent(),2]),o=i[0],u=i[1],s.A.loadView(l(l({},r),{controllerFactory:o,view:u})),[2]}}))}))};t.A=function(e){var t=e.controller,n=e.view,a=e.type,l=e.isFullscreen,d=void 0!==l&&l,p=e.isNowPlayingBarEnabled,h=void 0===p||p,y=e.isThemeMediaSupported,m=void 0!==y&&y,v=e.transition,g=(0,o.zy)(),b=(0,o.wQ)();return(0,i.useEffect)((function(){var e;e={url:g.pathname+g.search,type:a,state:g.state,autoFocus:!1,fullscreen:d,transition:v,options:{supportsThemeMedia:m,enableMediaControl:h}},b!==r.rc.Pop?(console.debug("[ViewManagerPage] loading view [%s]",n),f(t,n,e)):(console.debug("[ViewManagerPage] restoring view [%s]",n),s.A.tryRestoreView(e).catch((function(r){return u(void 0,void 0,void 0,(function(){return c(this,(function(i){return(null==r?void 0:r.cancelled)?[2]:(console.debug("[ViewManagerPage] restore failed; loading view [%s]",n),[2,f(t,n,e)])}))}))})))}),[t,n,a,d,h,m,v,g.pathname,g.search]),null}},10989:function(e,t,n){"use strict";n.d(t,{Jb:function(){return r},Y_:function(){return o},wi:function(){return i}});var r=1e4,i=1e3*r,o=60*i},69410:function(e,t,n){"use strict";n.d(t,{Kv:function(){return d},gf:function(){return c}});var r=n(62540),i=n(63696),o=n(86191),a=n(44797),s=n(75384),l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=(0,i.createContext)({}),c=function(){return(0,i.useContext)(u)},d=function(e){var t=e.children,n=l((0,i.useState)(),2),c=n[0],d=n[1],f=l((0,i.useState)(),2),p=f[0],h=f[1],y=l((0,i.useState)(),2),m=y[0],v=y[1],g=(0,i.useMemo)((function(){return{__legacyApiClient__:c,api:p,user:m}}),[p,c,m]);return(0,i.useEffect)((function(){var e;null===(e=o.A.currentApiClient())||void 0===e||e.getCurrentUser().then((function(e){return t(void 0,e)})).catch((function(e){console.info("[ApiProvider] Could not get current user",e)}));var t=function(e,t){v(t),t.ServerId&&d(o.A.getApiClient(t.ServerId))},n=function(){d(void 0),v(void 0)};return a.A.on(o.A,"localusersignedin",t),a.A.on(o.A,"localusersignedout",n),function(){a.A.off(o.A,"localusersignedin",t),a.A.off(o.A,"localusersignedout",n)}}),[d,v]),(0,i.useEffect)((function(){h(c?(0,s.C)(c):void 0)}),[c,h]),(0,r.jsx)(u.Provider,{value:g,children:t})}},66911:function(e,t,n){"use strict";n.d(t,{H:function(){return l},I:function(){return s}});var r=n(42247),i=n(8280),o=n(61586),a=n(69410),s=function(e,t,n){return(0,i.j)({queryKey:["User",t,"Items",n],queryFn:function(i){var o=i.signal;return function(e,t,n,i){return o=void 0,a=void 0,l=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(o){switch(o.label){case 0:if(!e)throw new Error("No API instance available");if(!n)throw new Error("No item ID provided");return[4,(0,r.P)(e).getItem({userId:t,itemId:n},i)];case 1:return[2,o.sent().data]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}i((l=l.apply(o,a||[])).next())}));var o,a,s,l}(e,t,n,{signal:o})},staleTime:1e3,enabled:!!e&&!!t&&!!n})},l=function(e){var t=(0,a.gf)(),n=t.api,r=t.user;return(0,o.I)(s(n,null==r?void 0:r.Id,e))}},77402:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(63696),i=n(60182);function o(){var e=(0,i.IB)().themes,t=(0,r.useMemo)((function(){return null==e?void 0:e.find((function(e){return e.default}))}),[e]);return{themes:e||[],defaultTheme:t}}},28626:function(e,t,n){"use strict";n.d(t,{Q:function(){return f},w:function(){return p}});var r=n(62540),i=n(63696),o=n(5898),a=n(82885),s=n(44797),l=n(69410),u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c={Theme:"appTheme",DashboardTheme:"dashboardTheme",DateTimeLocale:"datetimelocale",Language:"language"},d=(0,i.createContext)({}),f=function(){return(0,i.useContext)(d)},p=function(e){var t=e.children,n=u((0,i.useState)(),2),f=n[0],p=n[1],h=u((0,i.useState)(),2),y=h[0],m=h[1],v=u((0,i.useState)(),2),g=v[0],b=v[1],w=u((0,i.useState)(o.Mo),2),x=w[0],S=w[1],A=(0,l.gf)().user,P=(0,i.useMemo)((function(){return{theme:f,dashboardTheme:y,dateTimeLocale:g,locale:x}}),[f,y,g,x]),k=(0,i.useCallback)((function(){p(a.currentSettings.theme()),m(a.currentSettings.dashboardTheme()),b(a.currentSettings.dateTimeLocale()),S(a.currentSettings.language())}),[]),I=(0,i.useCallback)((function(e,t){t&&Object.values(c).includes(t)&&k()}),[k]);return(0,i.useEffect)((function(){return s.A.on(a.currentSettings,"change",I),function(){s.A.off(a.currentSettings,"change",I)}}),[I]),(0,i.useEffect)((function(){k()}),[k,A]),(0,r.jsx)(d.Provider,{value:P,children:t})}},60182:function(e,t,n){"use strict";n.d(t,{AQ:function(){return u},IB:function(){return l}});var r=n(62540),i=n(63696),o=n(68272),a=n(74659),s=(0,i.createContext)(o),l=function(){return(0,i.useContext)(s)},u=function(e){var t=e.children,n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(o),2),l=n[0],u=n[1];return(0,i.useEffect)((function(){var e,t,n,r;(e=void 0,t=void 0,n=void 0,r=function(){var e,t,n;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,a.A)("config.json",{cache:"no-store"})];case 1:if(!(e=r.sent()).ok)throw new Error("network response was not ok");return[4,e.json()];case 2:return t=r.sent(),u(t),[3,4];case 3:return n=r.sent(),console.warn("[WebConfigProvider] failed to fetch config file",n),[3,4];case 4:return[2]}}))},new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))).catch((function(){}))}),[u]),(0,r.jsx)(s.Provider,{value:l,children:t})}},10838:function(e,t,n){"use strict";n.r(t),n.d(t,{centerFocus:function(){return f},getPosition:function(){return a},toCenter:function(){return s},toStart:function(){return l}});var r=n(9164),i=n(47629);function o(e){return e.getBoundingClientRect?e.getBoundingClientRect():{top:0,left:0,width:void 0,height:void 0}}function a(e,t,n){var r=o(e),i=o(t),a=n?i.left-r.left:i.top-r.top,s=n?i.width:i.height;s||0===s||(s=t[n?"offsetWidth":"offsetHeight"]);var l=n?e.scrollLeft:e.scrollTop;a+=l;var u=n?e.offsetWidth:e.offsetHeight;return{start:a,center:a-u/2+s/2,end:a-u+s,size:s,isVisible:a>=l&&a+s<=l+u}}function s(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.center,0):e.scrollTo(0,i.center):n?e.scrollLeft=Math.round(i.center):e.scrollTop=Math.round(i.center))}function l(e,t,n,r){var i=a(e,t,n);r&&i.isVisible||(e.scrollTo?n?e.scrollTo(i.start,0):e.scrollTo(0,i.start):n?e.scrollLeft=Math.round(i.start):e.scrollTop=Math.round(i.start))}function u(e,t,n){var i=r.A.focusableParent(e.target);i&&s(t,i,n)}function c(e){u(e,this,!0)}function d(e){u(e,this,!1)}var f={on:function(e,t){e.setAttribute("data-scroll-mode-".concat(t?"x":"y"),"custom"),t?i.Ay.addEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.addEventListener(e,"focus",d,{capture:!0,passive:!0})},off:function(e,t){e.removeAttribute("data-scroll-mode-".concat(t?"x":"y")),t?i.Ay.removeEventListener(e,"focus",c,{capture:!0,passive:!0}):i.Ay.removeEventListener(e,"focus",d,{capture:!0,passive:!0})}};t.default={getPosition:a,centerFocus:f,toCenter:s,toStart:l}},58961:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r=n(11444),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=i(i({},r.D),{Timer:"Timer",SeriesTimer:"SeriesTimer",AudioPodcast:"AudioPodcast"})},42538:function(e,t,n){"use strict";var r;n.d(t,{B:function(){return r}}),function(e){e.SET_TABS="SET_TABS",e.SHOW_VIDEO_OSD="SHOW_VIDEO_OSD"}(r||(r={}))},80262:function(e,t,n){"use strict";var r;n.d(t,{F:function(){return r}}),function(e){e.ASS_RENDER_ERROR="ASS_RENDER_ERROR",e.FATAL_HLS_ERROR="FATAL_HLS_ERROR",e.MEDIA_DECODE_ERROR="MEDIA_DECODE_ERROR",e.MEDIA_NOT_SUPPORTED="MEDIA_NOT_SUPPORTED",e.NETWORK_ERROR="NETWORK_ERROR",e.NO_MEDIA_ERROR="NO_MEDIA_ERROR",e.PLAYER_ERROR="PLAYER_ERROR",e.SERVER_ERROR="SERVER_ERROR"}(r||(r={}))},38783:function(e,t,n){"use strict";var r;n.d(t,{Q:function(){return r}}),function(e){e.MediaPlayer="mediaplayer",e.PreplayIntercept="preplayintercept",e.Screensaver="screensaver",e.SyncPlay="syncplay"}(r||(r={}))},53089:function(e,t,n){"use strict";function r(e,t){if(!e)return!0;var n=!1;return"string"==typeof e&&(e.startsWith("-")&&(n=!0,e=e.substring(1)),e=e.split(",")),!(e=e.filter((function(e){return e}))).length||("string"==typeof t&&(t=t.split(",")),(t=t.filter((function(e){return e}))).some((function(t){return e.includes(t)}))?!n:n)}n.d(t,{q:function(){return r}})},93721:function(e,t,n){"use strict";n.d(t,{Fq:function(){return c},JK:function(){return p},OE:function(){return h},QC:function(){return d},cu:function(){return f}});var r=n(62864),i=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},a={af:"af",ar:"ar-DZ","be-by":"be","bg-bg":"bg",bn:"bn",ca:"ca",cs:"cs",cy:"cy",da:"da",de:"de",el:"el","en-gb":"en-GB","en-us":"en-US",eo:"eo",es:"es","es-ar":"es","es-do":"es","es-mx":"es",et:"et",eu:"eu",fa:"fa-IR",fi:"fi",fr:"fr","fr-ca":"fr-CA",gl:"gl",gsw:"de",he:"he","hi-in":"hi",hr:"hr",hu:"hu",id:"id",is:"is",it:"it",ja:"ja",kk:"kk",ko:"ko","lt-lt":"lt",lv:"lv",ms:"ms",nb:"nb",nl:"nl",nn:"nn",pl:"pl",pt:"pt","pt-br":"pt-BR","pt-pt":"pt",ro:"ro",ru:"ru",sk:"sk","sl-si":"sl",sv:"sv",ta:"ta",th:"th",tr:"tr",uk:"uk",vi:"vi","zh-cn":"zh-CN","zh-hk":"zh-HK","zh-tw":"zh-TW"},s="en-US",l=s,u=r.A;function c(e){return n(27570)("./".concat(e,"/index.js"))}function d(e){return a[e]||a[e.replace(/-.*/,"")]||s}function f(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return console.debug("[dateFnsLocale] updating date-fns locale",e),l=d(e),console.debug("[dateFnsLocale] mapped to date-fns locale",l),[4,c(l)];case 1:return u=t.sent(),[2]}}))}))}function p(){return u}function h(){return{addSuffix:!0,locale:u}}},44797:function(e,t){"use strict";function n(e,t){if(!e)throw new Error("obj cannot be null!");e._callbacks=e._callbacks||{};var n=e._callbacks[t];return n||(e._callbacks[t]=[],n=e._callbacks[t]),n}t.A={on:function(e,t,r){n(e,t).push(r)},off:function(e,t,r){var i=n(e,t),o=i.indexOf(r);-1!==o&&i.splice(o,1)},trigger:function(e,t,r){void 0===r&&(r=[]);var i=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([{type:t}],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(r),!1);n(e,t).slice(0).forEach((function(t){t.apply(e,i)}))}}},74659:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},o=document.createElement("a");function a(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){return o.href=e,n=o.href,[2,new Promise((function(r,i){var o=new XMLHttpRequest;o.onload=function(){var e=o.status;n.startsWith("file:")&&0===e&&(e=200),r(new Response(o.responseText,{status:e}))},o.onerror=function(){i(new TypeError("Local request failed"))},o.open("GET",e),(null==t?void 0:t.cache)&&o.setRequestHeader("Cache-Control",t.cache),o.send(null)}))]}))}))}},33073:function(e,t,n){"use strict";var r;n.d(t,{K:function(){return r}}),function(e){e.SignedIn="SignedIn",e.ServerSignIn="ServerSignIn",e.ServerSelection="ServerSelection",e.ServerUpdateNeeded="ServerUpdateNeeded",e.Unavailable="Unavailable"}(r||(r={}))},97067:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(64680),i=n(58953),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},a=function(e,t,n,a){var s,l,u;if(void 0===n&&(n={}),void 0===a&&(a=!1),t.Id&&(null===(s=t.BackdropImageTags)||void 0===s?void 0:s.length)){var c=a?(0,i.HO)(0,t.BackdropImageTags.length-1):0;return e.getScaledImageUrl(t.Id,o({type:r.y.Backdrop,index:c,tag:t.BackdropImageTags[c]},n))}return t.ParentBackdropItemId&&(null===(l=t.ParentBackdropImageTags)||void 0===l?void 0:l.length)?(c=a?(0,i.HO)(0,t.ParentBackdropImageTags.length-1):0,e.getScaledImageUrl(t.ParentBackdropItemId,o({type:r.y.Backdrop,index:c,tag:t.ParentBackdropImageTags[c]},n))):t.Id&&(null===(u=t.ImageTags)||void 0===u?void 0:u.Primary)?e.getScaledImageUrl(t.Id,o({type:r.y.Primary,tag:t.ImageTags.Primary},n)):void 0}},75384:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(21081),i=function(e){return new r.EX({clientInfo:{name:e.appName(),version:e.appVersion()},deviceInfo:{name:e.deviceName(),id:e.deviceId()}}).createApi(e.serverAddress(),e.accessToken())}},2290:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=40;function a(e){var t,n,r,o={Items:[],StartIndex:0,TotalRecordCount:0};try{for(var a=i(e),s=a.next();!s.done;s=a.next()){var l=s.value;l.Items?l.TotalRecordCount?void 0!==l.StartIndex?(o.Items=null===(r=o.Items)||void 0===r?void 0:r.concat(l.Items),o.TotalRecordCount+=l.TotalRecordCount,o.StartIndex=Math.min(o.StartIndex||0,l.StartIndex)):console.log("[getItems] Retrieved StartIndex is invalid",l.StartIndex):console.log("[getItems] Retrieved TotalRecordCount is invalid",l.TotalRecordCount):console.log("[getItems] Retrieved Items array is invalid",l.Items)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}function s(e,t,n){var i,s=null===(i=null==n?void 0:n.Ids)||void 0===i?void 0:i.split(",");if(!n||!s||s.length<=o)return e.getItems(t,n);var l=function(e,t,n){for(var i,a,s,l=r({},n),u=(null===(i=n.Ids)||void 0===i?void 0:i.split(","))||[],c=[],d=null!==(a=n.Limit)&&void 0!==a?a:1/0,f=0;f<u.length&&f<d;f=s){(s=f+o)>d&&(s=d);var p=u.slice(f,s);l.Ids=p.join(","),c.push(e.getItems(t,l))}return c}(e,t,n);return Promise.all(l).then(a)}},58953:function(e,t,n){"use strict";function r(e,t){return Math.floor(Math.random()*(t-e+1))+e}function i(e,t){return null==e?"":"object"==typeof Intl&&Intl&&"function"==typeof Intl.NumberFormat?e.toLocaleString(t,{style:"percent",maximumFractionDigits:0}):"".concat(Math.round(100*e),"%")}function o(e){return Number.isInteger(e)?0:e.toString().split(".")[1].length}n.d(t,{BY:function(){return i},HO:function(){return r},lf:function(){return o}})},53678:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var r=new(n(53804).E)({defaultOptions:{mutations:{networkMode:"always"},queries:{networkMode:"always"}}})},44305:function(e,t,n){"use strict";function r(e){return!(null==e?void 0:e.trim().length)}function i(e,t){return void 0===t&&(t=!1),"true"!==e&&"false"!==e?t:"false"!==e}function o(e,t){if(void 0===t&&(t=0),!e)return t;var n=parseFloat(e);return isNaN(n)?t:n}n.d(t,{G4:function(){return i},SP:function(){return o},z3:function(){return r}})},83375:function(e,t,n){"use strict";n.d(t,{E:function(){return i},i:function(){return r}});var r=function(){var e=window.location.hash.indexOf("?");return-1!==e?window.location.hash.substring(e):window.location.search?window.location.search:-1!==(e=window.location.href.indexOf("?"))?window.location.href.substring(e):""},i=function(e,t){return t||(t=r()),new URLSearchParams(t).get(e)||""}},38601:function(e,t,n){var r={"./_asyncRoutes":[39244],"./_asyncRoutes.ts":[39244],"./_legacyRoutes":[4877],"./_legacyRoutes.ts":[4877],"./activity":[4092,45642,23247,60815,16304,81771,41823,22940,71187,78214,77481,34208,88788],"./activity.tsx":[4092,45642,23247,60815,16304,81771,41823,22940,71187,78214,77481,34208,88788,76538],"./playback/trickplay":[70298,45642,77756],"./playback/trickplay.tsx":[70298,45642,77756,28418],"./plugins/plugin":[31746,45642,28336,1820,32125,23247,60815,16304,9886,12036,70712,29575],"./plugins/plugin.tsx":[31746,45642,28336,1820,32125,23247,60815,16304,9886,12036,70712,29575,33437],"./routes":[7603],"./routes.tsx":[7603],"./users":[27239,1270,27239,58809],"./users/":[27239,1270,27239,58809],"./users/access":[61726,97636],"./users/access.tsx":[61726,97636,34506],"./users/add":[35175,99075],"./users/add.tsx":[35175,99075,985],"./users/index":[27239,1270,27239,58809],"./users/index.tsx":[27239,1270,27239,58809],"./users/parentalcontrol":[78304,45642,97200],"./users/parentalcontrol.tsx":[78304,45642,97200,26886],"./users/password":[19715,38245],"./users/password.tsx":[19715,38245,64967],"./users/profile":[71005,18373],"./users/profile.tsx":[71005,18373,85767]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=38601,e.exports=i},29561:function(e,t,n){var r={"./asyncRoutes":[24786],"./asyncRoutes/":[24786],"./asyncRoutes/index":[24786],"./asyncRoutes/index.ts":[24786],"./asyncRoutes/user":[21643],"./asyncRoutes/user.ts":[21643],"./home":[52824,45642,4113,45568,73233,81954,27962],"./home.tsx":[52824,4113,38244],"./homevideos":[46365,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,37470],"./homevideos/":[46365,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,37470],"./homevideos/index":[46365,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,37470],"./homevideos/index.tsx":[46365,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,37470],"./legacyRoutes":[77285],"./legacyRoutes/":[77285],"./legacyRoutes/index":[77285],"./legacyRoutes/index.ts":[77285],"./legacyRoutes/public":[3312],"./legacyRoutes/public.ts":[3312],"./legacyRoutes/user":[38274],"./legacyRoutes/user.ts":[38274],"./livetv":[86548,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,73567],"./livetv/":[86548,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,73567],"./livetv/index":[86548,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,73567],"./livetv/index.tsx":[86548,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,73567],"./movies":[85775,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,17420],"./movies/":[85775,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,17420],"./movies/index":[85775,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,17420],"./movies/index.tsx":[85775,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,17420],"./music":[21665,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,75692],"./music/":[21665,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,75692],"./music/index":[21665,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,75692],"./music/index.tsx":[21665,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,75692],"./routes":[66359],"./routes.tsx":[66359],"./shows":[9214,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,49911],"./shows/":[9214,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,49911],"./shows/index":[9214,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,49911],"./shows/index.tsx":[9214,45642,29808,55931,23247,60815,16304,81771,9886,12036,96820,20918,12011,24468,4113,36934,61266,49911],"./user/display":[86779,23247,60815,40815,30010,66935],"./user/display/":[86779,23247,60815,40815,30010,66935],"./user/display/index":[86779,23247,60815,40815,30010,66935],"./user/display/index.tsx":[86779,23247,60815,30010],"./video":[13993],"./video/":[13993],"./video/index":[13993],"./video/index.tsx":[13993]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=29561,e.exports=i},92950:function(e,t,n){var r={"./asyncRoutes":[34945],"./asyncRoutes/":[34945],"./asyncRoutes/index":[34945],"./asyncRoutes/index.ts":[34945],"./asyncRoutes/user":[12446],"./asyncRoutes/user.ts":[12446],"./legacyRoutes":[98372],"./legacyRoutes/":[98372],"./legacyRoutes/index":[98372],"./legacyRoutes/index.ts":[98372],"./legacyRoutes/public":[7451],"./legacyRoutes/public.ts":[7451],"./legacyRoutes/user":[70373],"./legacyRoutes/user.ts":[70373],"./quickConnect":[42118,5190],"./quickConnect/":[42118,5190],"./quickConnect/index":[42118,5190],"./quickConnect/index.tsx":[42118,5190],"./quickConnect/quickConnect.scss":[73828,22587],"./routes":[4022],"./routes.tsx":[4022],"./search":[13789,45642,29808,47588,12011,24468,4113,31669,80187],"./search.tsx":[13789,45642,29808,47588,12011,24468,4113,31669,80187],"./user/userprofile":[66718,16325],"./user/userprofile.tsx":[66718,16325,9959]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=92950,e.exports=i},7062:function(e,t,n){var r={"./dashboard/apikeys":[91155,85198],"./dashboard/apikeys.html":[60113,8512],"./dashboard/apikeys.js":[91155,85198],"./dashboard/dashboard":[32947,45642,29808,1270,12011,24468,32947,79366],"./dashboard/dashboard.html":[88321,616],"./dashboard/dashboard.js":[32947,45642,29808,1270,12011,24468,32947,79366],"./dashboard/dashboard.scss":[65814,32691],"./dashboard/devices/device":[84753,56182],"./dashboard/devices/device.html":[1535,38360],"./dashboard/devices/device.js":[84753,56182],"./dashboard/devices/devices":[28932,29808,1270,12011,28932,19069],"./dashboard/devices/devices.html":[57906,44037],"./dashboard/devices/devices.js":[28932,29808,1270,12011,28932,19069],"./dashboard/encodingsettings":[27455,81482],"./dashboard/encodingsettings.html":[83901,85636],"./dashboard/encodingsettings.js":[27455,81482],"./dashboard/general":[25583,25583,66935],"./dashboard/general.html":[26965,85856],"./dashboard/general.js":[25583,25583,66935],"./dashboard/library":[10856,10856,5007],"./dashboard/library.html":[37278,24839],"./dashboard/library.js":[10856,10856,5007],"./dashboard/librarydisplay":[72816,50463],"./dashboard/librarydisplay.html":[46478,27415],"./dashboard/librarydisplay.js":[72816,50463],"./dashboard/logs":[17784,30307],"./dashboard/logs.html":[1766,70163],"./dashboard/logs.js":[17784,30307],"./dashboard/metadataImages":[49032,45642,81831],"./dashboard/metadataImages.js":[49032,45642,81831],"./dashboard/metadataimages.html":[96862,90767],"./dashboard/metadatanfo":[71609,56376],"./dashboard/metadatanfo.html":[27783,88070],"./dashboard/metadatanfo.js":[71609,56376],"./dashboard/networking":[37677,37677,2217],"./dashboard/networking.html":[92451,19926],"./dashboard/networking.js":[37677,37677,2217],"./dashboard/playback":[7274,16949],"./dashboard/playback.html":[41248,80809],"./dashboard/playback.js":[7274,16949],"./dashboard/plugins/available":[75005,75005,2217],"./dashboard/plugins/available/":[75005,75005,2217],"./dashboard/plugins/available/index":[75005,75005,2217],"./dashboard/plugins/available/index.html":[68438,94327],"./dashboard/plugins/available/index.js":[75005,75005,2217],"./dashboard/plugins/installed":[60057,65603],"./dashboard/plugins/installed/":[60057,65603],"./dashboard/plugins/installed/index":[60057,65603,27664],"./dashboard/plugins/installed/index.html":[44431,64718],"./dashboard/plugins/installed/index.js":[60057,65603,21860],"./dashboard/plugins/repositories":[40833,40833,2217],"./dashboard/plugins/repositories/":[40833,40833,2217],"./dashboard/plugins/repositories/index":[40833,40833,2217],"./dashboard/plugins/repositories/index.html":[69751,46326],"./dashboard/plugins/repositories/index.js":[40833,40833,2217],"./dashboard/scheduledtasks/scheduledtask":[52289,52289,2217],"./dashboard/scheduledtasks/scheduledtask.html":[47311,63092],"./dashboard/scheduledtasks/scheduledtask.js":[52289,52289,2217],"./dashboard/scheduledtasks/scheduledtasks":[81524,1270,43381],"./dashboard/scheduledtasks/scheduledtasks.html":[98946,21513],"./dashboard/scheduledtasks/scheduledtasks.js":[81524,1270,43381],"./dashboard/streaming":[80927,73730],"./dashboard/streaming.html":[62149,88716],"./dashboard/streaming.js":[80927,73730],"./edititemmetadata":[1217,90221],"./edititemmetadata.html":[20510,68529],"./edititemmetadata.js":[1217,90221],"./favorites":[53857,45642,29808,12011,24468,4113,53857,4062],"./favorites.js":[53857,45642,29808,12011,24468,4113,53857,4062],"./home":[15088,45642,4113,45568,73233,81954,27962],"./home.html":[5939,8372],"./home.js":[15088,45642,4113,45568,73233,81954,32762],"./hometab":[66242,45642,29808,12011,24468,4113,56213,18119],"./hometab.js":[66242,45642,29808,12011,24468,4113,56213,18119],"./itemDetails":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,68866,75844],"./itemDetails/":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,68866,75844],"./itemDetails/index":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,68866,75844],"./itemDetails/index.html":[90934,76331],"./itemDetails/index.js":[68866,45642,29808,28336,1820,32125,1270,70712,12011,24468,4113,6940,45568,73233,55802,68866,75844],"./list":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,23416,83715],"./list.html":[68852,52179],"./list.js":[23416,45642,29808,28336,1820,32125,70712,12011,24468,4113,6940,45568,73233,23416,83715],"./livetv.html":[19616,65911],"./livetv/livetvchannels":[69793,45642,29808,12011,24468,64340],"./livetv/livetvchannels.js":[69793,45642,29808,12011,24468,64340],"./livetv/livetvguide":[38193,12011,4113,36934,69212],"./livetv/livetvguide.js":[38193,12011,4113,36934,69212],"./livetv/livetvrecordings":[6157,45642,29808,12011,24468,28588],"./livetv/livetvrecordings.js":[6157,45642,29808,12011,24468,28588],"./livetv/livetvschedule":[21152,45642,29808,12011,24468,96603],"./livetv/livetvschedule.js":[21152,45642,29808,12011,24468,96603],"./livetv/livetvseriestimers":[61470,45642,12011,24468,3365],"./livetv/livetvseriestimers.js":[61470,45642,12011,24468,3365],"./livetv/livetvsuggested":[51070,45642,29808,12011,24468,4113,97101,85757],"./livetv/livetvsuggested.js":[51070,45642,29808,12011,24468,4113,97101,85757],"./livetvguideprovider":[8641,28110],"./livetvguideprovider.html":[76964,87936],"./livetvguideprovider.js":[8641,28110],"./livetvsettings":[58779,90520],"./livetvsettings.html":[47001,90854],"./livetvsettings.js":[58779,90520],"./livetvstatus":[64656,29808,12011,64656,19069],"./livetvstatus.html":[46486,12481],"./livetvstatus.js":[64656,29808,12011,64656,19069],"./livetvtuner":[37868,37868,2217],"./livetvtuner.html":[51642,61765],"./livetvtuner.js":[37868,37868,2217],"./lyrics":[95626,45642,45568,73233,7631],"./lyrics.html":[42512,97543],"./lyrics.js":[95626,45642,45568,73233,7631],"./lyrics.types":[9383,49803],"./lyrics.types.ts":[9383,49803],"./movies/moviecollections":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,49654],"./movies/moviecollections.js":[35115,45642,29808,28336,1820,32125,70712,12011,24468,6940,49654],"./movies/moviegenres":[3776,45642,12011,24468,12975],"./movies/moviegenres.js":[3776,45642,12011,24468,12975],"./movies/movies":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/movies.html":[98849,88300],"./movies/movies.js":[70179,45642,29808,28336,1820,32125,70712,12011,24468,6940,70179,9090],"./movies/moviesrecommended":[4628,45642,29808,12011,24468,4113,45568,73233,37352,48935],"./movies/moviesrecommended.js":[4628,45642,29808,12011,24468,4113,45568,73233,37352,48935],"./movies/movietrailers":[61772,45642,29808,28336,1820,32125,70712,12011,24468,6940,61772,9090],"./movies/movietrailers.js":[61772,45642,29808,28336,1820,32125,70712,12011,24468,6940,61772,9090],"./music/music.html":[54329,61612],"./music/musicalbums":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,9090],"./music/musicalbums.js":[38775,45642,29808,28336,1820,32125,70712,12011,24468,6940,38775,9090],"./music/musicartists":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,9090],"./music/musicartists.js":[43531,45642,29808,28336,1820,32125,70712,12011,24468,6940,43531,9090],"./music/musicgenres":[50959,45642,12011,24468,19830],"./music/musicgenres.js":[50959,45642,12011,24468,19830],"./music/musicplaylists":[67056,45642,12011,24468,23163],"./music/musicplaylists.js":[67056,45642,12011,24468,23163],"./music/musicrecommended":[82604,45642,29808,12011,24468,4113,45568,73233,34128,22255],"./music/musicrecommended.js":[82604,45642,29808,12011,24468,4113,45568,73233,34128,22255],"./music/songs":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./music/songs.js":[47614,45642,29808,28336,1820,32125,70712,12011,24468,6940,50457],"./playback/queue":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,57949,55802,77574],"./playback/queue/":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,57949,55802,77574],"./playback/queue/index":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,57949,55802,77574,3737],"./playback/queue/index.html":[25006,53525],"./playback/queue/index.js":[84688,45642,29808,28336,1820,32125,70712,12011,24468,6940,45568,73233,57949,55802,77574,90283],"./playback/video":[33252,45642,55931,45568,73233,57949,90742,30394],"./playback/video/":[33252,45642,55931,45568,73233,57949,90742,30394],"./playback/video/index":[33252,45642,55931,45568,73233,57949,90742,30394],"./playback/video/index.html":[16818,21777],"./playback/video/index.js":[33252,45642,55931,45568,73233,57949,90742,30394],"./session/addServer":[43060,42462],"./session/addServer/":[43060,42462],"./session/addServer/index":[43060,42462],"./session/addServer/index.html":[11250,15741],"./session/addServer/index.js":[43060,42462],"./session/forgotPassword":[1338,23488],"./session/forgotPassword/":[1338,23488],"./session/forgotPassword/index":[1338,23488],"./session/forgotPassword/index.html":[58680,73167],"./session/forgotPassword/index.js":[1338,23488],"./session/login":[2825,45642,28336,1820,32125,70712,45568,73233,9203,93649],"./session/login/":[2825,45642,28336,1820,32125,70712,45568,73233,9203,93649],"./session/login/index":[2825,45642,28336,1820,32125,70712,45568,73233,9203,93649],"./session/login/index.html":[14999,17244],"./session/login/index.js":[2825,45642,28336,1820,32125,70712,45568,73233,9203,93649],"./session/login/login.scss":[53741,88654],"./session/resetPassword":[86086,70884],"./session/resetPassword/":[86086,70884],"./session/resetPassword/index":[86086,70884],"./session/resetPassword/index.html":[97652,38155],"./session/resetPassword/index.js":[86086,70884],"./session/selectServer":[1179,45642,29808,12011,4113,45568,73233,19845,66259],"./session/selectServer/":[1179,45642,29808,12011,4113,45568,73233,19845,66259],"./session/selectServer/index":[1179,45642,29808,12011,4113,45568,73233,19845,66259],"./session/selectServer/index.html":[44625,89150],"./session/selectServer/index.js":[1179,45642,29808,12011,4113,45568,73233,19845,66259],"./shows/episodes":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/episodes.js":[96747,45642,29808,28336,1820,32125,70712,12011,24468,6940,10442],"./shows/tvgenres":[84055,45642,12011,24468,23230],"./shows/tvgenres.js":[84055,45642,12011,24468,23230],"./shows/tvrecommended":[81268,45642,29808,12011,24468,4113,45568,73233,86471,22255],"./shows/tvrecommended.html":[77674,39783],"./shows/tvrecommended.js":[81268,45642,29808,12011,24468,4113,45568,73233,86471,22255],"./shows/tvshows":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,9090],"./shows/tvshows.js":[57965,45642,29808,28336,1820,32125,70712,12011,24468,6940,57965,9090],"./shows/tvstudios":[3376,45642,12011,24468,98615],"./shows/tvstudios.js":[3376,45642,12011,24468,98615],"./shows/tvupcoming":[98769,45642,29808,12011,24468,17176],"./shows/tvupcoming.js":[98769,45642,29808,12011,24468,17176],"./user/controls":[73053,63549],"./user/controls/":[73053,63549],"./user/controls/index":[73053,63549],"./user/controls/index.html":[97107,44496],"./user/controls/index.js":[73053,63549],"./user/display":[40815,23247,60815,40815,30010,66935],"./user/display/":[40815,23247,60815,40815,30010,66935],"./user/display/index":[40815,23247,60815,40815,30010,66935],"./user/display/index.html":[32197,58122],"./user/display/index.js":[40815,40815,66935],"./user/home":[50813,45642,29808,12011,24468,4113,56213,50813,87362],"./user/home/":[50813,45642,29808,12011,24468,4113,56213,50813,87362],"./user/home/index":[50813,45642,29808,12011,24468,4113,56213,50813,87362],"./user/home/index.html":[38190,94889],"./user/home/index.js":[50813,45642,29808,12011,24468,4113,56213,50813,87362],"./user/menu":[93348,87094],"./user/menu/":[93348,87094],"./user/menu/index":[93348,87094],"./user/menu/index.html":[64866,3109],"./user/menu/index.js":[93348,87094],"./user/playback":[77506,77506,2217],"./user/playback/":[77506,77506,2217],"./user/playback/index":[77506,77506,2217],"./user/playback/index.html":[21464,64819],"./user/playback/index.js":[77506,77506,2217],"./user/subtitles":[9070,57949,9070,92594],"./user/subtitles/":[9070,57949,9070,92594],"./user/subtitles/index":[9070,57949,9070,92594],"./user/subtitles/index.html":[2690,96921],"./user/subtitles/index.js":[9070,57949,9070,92594],"./wizard/finish":[54340,20966],"./wizard/finish/":[54340,20966],"./wizard/finish/index":[54340,20966],"./wizard/finish/index.html":[13810,31029],"./wizard/finish/index.js":[54340,20966],"./wizard/library.html":[18847,99486],"./wizard/remote":[23617,16185],"./wizard/remote/":[23617,16185],"./wizard/remote/index":[23617,16185],"./wizard/remote/index.html":[43887,90612],"./wizard/remote/index.js":[23617,16185],"./wizard/settings":[65858,52744],"./wizard/settings/":[65858,52744],"./wizard/settings/index":[65858,52744],"./wizard/settings/index.html":[39816,95751],"./wizard/settings/index.js":[65858,52744],"./wizard/start":[52665,11997],"./wizard/start/":[52665,11997],"./wizard/start/index":[52665,11997],"./wizard/start/index.html":[49799,53744],"./wizard/start/index.js":[52665,11997],"./wizard/user":[28448,83366],"./wizard/user/":[28448,83366],"./wizard/user/index":[28448,83366],"./wizard/user/index.html":[77878,42421],"./wizard/user/index.js":[28448,83366]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=7062,e.exports=i},11167:function(e,t,n){var r={"./backdropScreensaver/plugin":[53286,86040],"./backdropScreensaver/plugin.js":[53286,86040],"./bookPlayer/plugin":[14447,14447,64633],"./bookPlayer/plugin.js":[14447,14447,64633],"./bookPlayer/style.scss":[42526,17084],"./bookPlayer/tableOfContents":[80245,10905],"./bookPlayer/tableOfContents.js":[80245,10905],"./bookPlayer/template.html":[68104,68672],"./chromecastPlayer/castSenderApi":[9724,6270],"./chromecastPlayer/castSenderApi.js":[9724,6270],"./chromecastPlayer/plugin":[48671,30357],"./chromecastPlayer/plugin.js":[48671,30357,17367],"./comicsPlayer/plugin":[78750,86015,78750,41542],"./comicsPlayer/plugin.js":[78750,86015,78750,41542],"./comicsPlayer/style.scss":[9461,23831],"./experimentalWarnings/plugin":[76066,40810],"./experimentalWarnings/plugin.js":[76066,40810],"./htmlAudioPlayer/plugin":[27907,87903],"./htmlAudioPlayer/plugin.js":[27907,87903,79085],"./htmlVideoPlayer/plugin":[5016,55931,71318],"./htmlVideoPlayer/plugin.js":[5016,55931,71318,47046],"./htmlVideoPlayer/style.scss":[10107,98887],"./logoScreensaver/plugin":[61619,49087],"./logoScreensaver/plugin.js":[61619,49087],"./logoScreensaver/style.scss":[46882,93654],"./pdfPlayer/plugin":[38362,4836],"./pdfPlayer/plugin.js":[38362,4836],"./pdfPlayer/style.scss":[31865,71769],"./photoPlayer/plugin":[7780,70118],"./photoPlayer/plugin.js":[7780,70118],"./playAccessValidation/plugin":[8450,90186],"./playAccessValidation/plugin.js":[8450,90186],"./sessionPlayer/plugin":[9112,64706],"./sessionPlayer/plugin.js":[9112,64706,97458],"./syncPlay/core":[99555,13151,19907,60138,10672],"./syncPlay/core/":[99555,13151,19907,60138,10672],"./syncPlay/core/Controller":[73391,94561],"./syncPlay/core/Controller.js":[73391,94561],"./syncPlay/core/Helper":[20919,65849],"./syncPlay/core/Helper.js":[20919,65849],"./syncPlay/core/Manager":[86004,13151,19907,60138],"./syncPlay/core/Manager.js":[86004,13151,19907,60138,88202],"./syncPlay/core/PlaybackCore":[629,13151],"./syncPlay/core/PlaybackCore.js":[629,13151,82925],"./syncPlay/core/QueueCore":[19907,19907,65849],"./syncPlay/core/QueueCore.js":[19907,19907,65849],"./syncPlay/core/Settings":[4438,14510],"./syncPlay/core/Settings.js":[4438,14510],"./syncPlay/core/index":[99555,13151,19907,60138,10672],"./syncPlay/core/index.js":[99555,13151,19907,60138,10672],"./syncPlay/core/players/GenericPlayer":[16590,2],"./syncPlay/core/players/GenericPlayer.js":[16590,2],"./syncPlay/core/players/PlayerFactory":[24255,56577],"./syncPlay/core/players/PlayerFactory.js":[24255,56577],"./syncPlay/core/timeSync/TimeSync":[67122,83354],"./syncPlay/core/timeSync/TimeSync.js":[67122,83354],"./syncPlay/core/timeSync/TimeSyncCore":[55125,96307],"./syncPlay/core/timeSync/TimeSyncCore.js":[55125,96307],"./syncPlay/core/timeSync/TimeSyncServer":[95937,49755],"./syncPlay/core/timeSync/TimeSyncServer.js":[95937,49755],"./syncPlay/plugin":[55230,13151,19907,60138,927,1680],"./syncPlay/plugin.ts":[55230,13151,19907,60138,927,1680],"./syncPlay/ui/groupSelectionMenu":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.js":[1724,45568,3460],"./syncPlay/ui/groupSelectionMenu.scss":[5389,75637],"./syncPlay/ui/playbackPermissionManager":[39387,52011],"./syncPlay/ui/playbackPermissionManager.js":[39387,52011],"./syncPlay/ui/players/HtmlAudioPlayer":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlAudioPlayer.js":[41443,13151,19907,60138,927,39573],"./syncPlay/ui/players/HtmlVideoPlayer":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/HtmlVideoPlayer.js":[9066,13151,19907,60138,927,40394],"./syncPlay/ui/players/NoActivePlayer":[10699,13151,19907,60138,927],"./syncPlay/ui/players/NoActivePlayer.js":[10699,13151,19907,60138,927,91373],"./syncPlay/ui/players/QueueManager":[16209,29593],"./syncPlay/ui/players/QueueManager.js":[16209,29593],"./syncPlay/ui/settings/SettingsEditor":[45568,45568,2217],"./syncPlay/ui/settings/SettingsEditor.js":[45568,45568,2217],"./syncPlay/ui/settings/editor.html":[70123,18895],"./youtubePlayer/plugin":[8255,70555],"./youtubePlayer/plugin.js":[8255,70555],"./youtubePlayer/style.scss":[41758,49890]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=11167,e.exports=i},73125:function(e,t,n){var r={"./af.json":[18086,23845],"./ar.json":[88506,9785],"./as.json":[62885,47206],"./be-by.json":[69986,34017],"./bg-bg.json":[23018,6377],"./bn.json":[86497,14050],"./bn_BD.json":[13256,37131],"./ca.json":[12921,35994],"./ch.json":[9814,21493],"./cs.json":[83343,1500],"./cy.json":[20833,90210],"./da.json":[98174,96509],"./de.json":[99810,89409],"./el.json":[67800,80571],"./en-gb.json":[24832,46179],"./en-us.json":[20233,79754],"./eo.json":[72661,68950],"./es-ar.json":[49827,39072],"./es-mx.json":[83425,99298],"./es.json":[62854,49146],"./es_419.json":[50700,31807],"./es_DO.json":[29387,22888],"./et.json":[20560,78579],"./eu.json":[8083,39952],"./fa.json":[69924,18775],"./fi.json":[45932,66527],"./fil.json":[13320,33355],"./fo.json":[60706,40257],"./fr-ca.json":[82992,71603],"./fr.json":[80225,65826],"./ga.json":[59069,3134],"./gl.json":[83366,91589],"./gsw.json":[56196,99479],"./gu.json":[51673,99994],"./he.json":[92926,87837],"./hi-in.json":[21782,29397],"./hr.json":[81379,90272],"./hu.json":[7566,46669],"./hy.json":[26346,53961],"./id.json":[19612,79823],"./is-is.json":[12284,15023],"./it.json":[39596,28159],"./ja.json":[96776,8363],"./jbo.json":[31758,8589],"./ka.json":[24609,52162],"./kab.json":[90905,70042],"./kk.json":[87119,60028],"./kn.json":[39040,4867],"./ko.json":[47043,32800],"./kw.json":[82379,85960],"./ky.json":[16697,25370],"./lt-lt.json":[93260,3679],"./lv.json":[25739,82344],"./mg.json":[837,94726],"./mk.json":[24121,52922],"./ml.json":[99459,82355],"./mn.json":[37922,27521],"./mr.json":[55814,87589],"./ms.json":[40769,79714],"./mt.json":[69080,84347],"./my.json":[12175,87580],"./nb.json":[48505,70362],"./ne.json":[50672,30419],"./nl.json":[53707,80424],"./nn.json":[1925,85318],"./pa.json":[54122,11305],"./pl.json":[30985,62634],"./pr.json":[60715,24072],"./pt-br.json":[36860,6735],"./pt-pt.json":[70183,69959],"./pt.json":[69969,41490],"./ro.json":[66998,2709],"./ru.json":[5276,74191],"./si.json":[69665,48834],"./sk.json":[79655,86836],"./sl-si.json":[10433,48962],"./so.json":[40475,30168],"./sq.json":[73529,48666],"./sr.json":[19020,49535],"./sv.json":[95760,29683],"./ta.json":[57294,81197],"./te.json":[36402,72145],"./th.json":[60257,23522],"./tr.json":[66655,30028],"./ug.json":[45581,10350],"./uk.json":[36529,62834],"./ur_PK.json":[35446,10805],"./uz.json":[50886,67813],"./vi.json":[36796,17935],"./zh-cn.json":[45487,12252],"./zh-hk.json":[88159,15852],"./zh-tw.json":[97983,63404],"./zu.json":[48420,94167]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,19)}))}i.keys=function(){return Object.keys(r)},i.id=73125,e.exports=i},68272:function(e){"use strict";e.exports=JSON.parse('{"includeCorsCredentials":false,"multiserver":false,"themes":[{"name":"Apple TV","id":"appletv","color":"#bcbcbc"},{"name":"Blue Radiance","id":"blueradiance","color":"#011432"},{"name":"Dark","id":"dark","color":"#202020","default":true},{"name":"Light","id":"light","color":"#303030"},{"name":"Purple Haze","id":"purplehaze","color":"#000420"},{"name":"WMC","id":"wmc","color":"#0c2450"}],"menuLinks":[],"servers":[],"plugins":["playAccessValidation/plugin","experimentalWarnings/plugin","htmlAudioPlayer/plugin","htmlVideoPlayer/plugin","photoPlayer/plugin","comicsPlayer/plugin","bookPlayer/plugin","youtubePlayer/plugin","backdropScreensaver/plugin","pdfPlayer/plugin","logoScreensaver/plugin","sessionPlayer/plugin","chromecastPlayer/plugin","syncPlay/plugin"]}')}},function(e){e.O(0,[45642,55931,23247,60815,16304,81771,9886,12036,1270,59928,22940,33067,44965,56401,7495,17060,67224,67622,94048,36933,82363,36546,85500,7011,80183,37869],(function(){return 24639,e(e.s=24639)})),e.O()}]);