-
Notifications
You must be signed in to change notification settings - Fork 0
/
home._random_digits_.chunk.js
1 lines (1 loc) · 16.2 KB
/
home._random_digits_.chunk.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5177,7425,7282],{27282:function(e,t,n){n.r(t),n.d(t,{getTabsElement:function(){return b},selectedTabIndex:function(){return h},setTabs:function(){return f}}),n(5769),n(63238),n(61418),n(17460),n(14078),n(61013);var r,i,o,s=n(83094),a=n(47518),l=n(47005),c=(n(87861),n(78066),document.querySelector(".skinHeader"));function u(){this.selectedIndex(this.readySelectedIndex),this.readySelectedIndex=null}function d(e){function t(e){if(s.ZP.parentWithTag(e,"input"))return!1;var t=e.classList;return!t||!t.contains("scrollX")&&!t.contains("animatedScrollX")}for(var n=e;null!=n;){if(!t(n))return!1;n=n.parentNode}return!0}function f(e,t,s,f,h,b,v){if(i||(i=c.querySelector(".headerTabs")),!e)return r&&(document.body.classList.remove("withSectionTabs"),i.innerHTML="",i.classList.add("hide"),r=null),{tabsContainer:i,replaced:!1};var m=i;if(r||m.classList.remove("hide"),r!==e){var p=0,y='<div is="emby-tabs"'+(null==t?"":' data-index="'+t+'"')+' class="tabs-viewmenubar"><div class="emby-tabs-slider" style="white-space:nowrap;">'+s().map((function(e){var t,n="emby-tab-button";return!1===e.enabled&&(n+=" hide"),e.cssClass&&(n+=" "+e.cssClass),t=e.href?'<a href="'+e.href+'" is="emby-linkbutton" class="'+n+'" data-index="'+p+'"><div class="emby-button-foreground">'+e.name+"</div></a>":'<button type="button" is="emby-button" class="'+n+'" data-index="'+p+'"><div class="emby-button-foreground">'+e.name+"</div></button>",p++,t})).join("")+"</div></div>";return m.innerHTML=y,window.CustomElements.upgradeSubtree(m),document.body.classList.add("withSectionTabs"),r=e,function(e,t){if(a.Z.touch){var r=function(n,r){d(r)&&e.contains(r)&&t.selectNext()},i=function(n,r){d(r)&&e.contains(r)&&t.selectPrevious()};n.e(5344).then(n.bind(n,85344)).then((function(t){var n=new(0,t.default)(e.parentNode.parentNode);l.Events.on(n,"swipeleft",r),l.Events.on(n,"swiperight",i),e.addEventListener("viewdestroy",(function(){n.destroy()}))}))}}(e,o=m.querySelector('[is="emby-tabs"]')),o.addEventListener("beforetabchange",(function(e){var t=f();if(null!=e.detail.previousIndex){var n=t[e.detail.previousIndex];n&&n.classList.remove("is-active")}var r=t[e.detail.selectedTabIndex];r&&r.classList.add("is-active")})),h&&o.addEventListener("beforetabchange",h),b&&o.addEventListener("tabchange",b),!1!==v&&(o.selectedIndex?o.selectedIndex(t):(o.readySelectedIndex=t,o.addEventListener("ready",u))),{tabsContainer:m,tabs:o,replaced:!0}}return o.selectedIndex(t),{tabsContainer:m,tabs:o,replaced:!1}}function h(e){null!=e?o.selectedIndex(e):o.triggerTabChange()}function b(){return document.querySelector(".tabs-viewmenubar")}},85081:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}}),n(5769),n(63238),n(61418),n(17460),n(14078),n(50987),n(12274),n(3214),n(99785),n(83011),n(20252),n(25901),n(92189),n(91047),n(55849),n(32081);var r=n(55959),i=n(27282),o=n(78695),s=(n(87861),n(86628));function a(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,r.key,r)}}function l(){var e=this.tabControllers;e&&(e.forEach((function(e){e.destroy&&e.destroy()})),this.tabControllers=null),this.view=null,this.params=null,this.currentTabController=null,this.initialTabIndex=null}var c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tabControllers=[],this.view=t,this.params=n;var r=this,s=parseInt(n.tab||this.getDefaultTabIndex(n.parentId));function a(){return t.querySelectorAll(".tabContent")}function c(e){var t=parseInt(e.detail.selectedTabIndex),n=e.detail.previousIndex,i=null==n?null:r.tabControllers[n];i&&i.onPause&&i.onPause(),function(e,t){(function(e){return r.validateTabLoad?r.validateTabLoad(e):Promise.resolve()})(e).then((function(){r.getTabController(e).then((function(n){var i=!n.refreshed;n.onResume({autoFocus:null==t&&o.Z.tv,refresh:i}),n.refreshed=!0,s=e,r.currentTabController=n}))}))}(t,n)}this.initialTabIndex=s,t.addEventListener("viewbeforehide",this.onPause.bind(this)),t.addEventListener("viewbeforeshow",(function(){i.setTabs(t,s,r.getTabs,a,null,c,!1)})),t.addEventListener("viewshow",(function(e){r.onResume(e.detail)})),t.addEventListener("viewdestroy",l.bind(this))}var t,n;return t=e,(n=[{key:"onResume",value:function(){this.setTitle(),r.ZP.clearBackdrop();var e=this.currentTabController;e?e&&e.onResume&&e.onResume({}):i.selectedTabIndex(this.initialTabIndex)}},{key:"onPause",value:function(){var e=this.currentTabController;e&&e.onPause&&e.onPause()}},{key:"setTitle",value:function(){s.appRouter.setTitle("")}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=n(44614);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,r.key,r)}}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=b(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},h.apply(this,arguments)}function b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t){if(t&&("object"===d(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)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}n(78066),n(69523);var y=function(e){!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&&v(e,t)}(l,e);var t,r,i,o,a=(i=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(i);if(o){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function l(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e,t)}return t=l,(r=[{key:"setTitle",value:function(){s.appRouter.setTitle(null)}},{key:"onPause",value:function(){h(p(l.prototype),"onPause",this).call(this,this),document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader")}},{key:"onResume",value:function(e){h(p(l.prototype),"onResume",this).call(this,this,e),document.querySelector(".skinHeader").classList.add("noHomeButtonHeader")}},{key:"getDefaultTabIndex",value:function(){return 0}},{key:"getTabs",value:function(){return[{name:u.ZP.translate("Home")},{name:u.ZP.translate("Favorites")}, { name: u.ZP.translate("CUSTOM_LINK"), href: 'CUSTOM_URL' }]}},{key:"getTabController",value:function(e){if(null==e)throw new Error("index cannot be null");var t="";switch(e){case 0:t="hometab";break;case 1:t="favorites"}var r=this;return n(23935)("./".concat(t)).then((function(t){var n=t.default,i=r.tabControllers[e];return i||(i=new n(r.view.querySelector(".tabContent[data-index='"+e+"']"),r.params),r.tabControllers[e]=i),i}))}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(c)},69523:function(e,t,n){n(5769),n(63238),n(61418),n(17460),n(14078);var r=n(13800),i=n(83094),o=n(78695),s=n(12392),a=n(27515),l=n(47518),c=(n(67752),n(1892)),u=n.n(c),d=n(95760),f=n.n(d),h=n(38311),b=n.n(h),v=n(58192),m=n.n(v),p=n(38060),y=n.n(p),g=n(54865),w=n.n(g),S=n(88101),T={};T.styleTagTransform=w(),T.setAttributes=m(),T.insert=b().bind(null,"head"),T.domAPI=f(),T.insertStyleElement=y(),u()(S.Z,T),S.Z&&S.Z.locals&&S.Z.locals;var x=Object.create(HTMLDivElement.prototype);function L(e){var t=e.detail.command;"end"===t?(a.Z.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===t?(a.Z.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===t&&(a.Z.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}x.createdCallback=function(){this.classList.add("emby-scroller")},x.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},x.toStart=function(e,t){this.scroller&&this.scroller.toStart(e,t)},x.toCenter=function(e,t){this.scroller&&this.scroller.toCenter(e,t)},x.scrollToPosition=function(e,t){this.scroller&&this.scroller.slideTo(e,t)},x.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},x.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},x.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},x.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},x.addScrollEventListener=function(e,t){this.scroller&&i.ZP.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),e,t)},x.removeScrollEventListener=function(e,t){this.scroller&&i.ZP.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),e,t)},x.attachedCallback=function(){this.getAttribute("data-navcommands")&&s.default.on(this,L);var e="false"!==this.getAttribute("data-horizontal"),t=this.querySelector(".scrollSlider");e&&(t.style["white-space"]="nowrap");var c,u=o.Z.desktop&&e&&"false"!==this.getAttribute("data-scrollbuttons"),d={horizontal:e,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:t,scrollBy:200,speed:e?270:240,elasticBounds:1,dragHandle:1,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:u||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:u||"true"===this.getAttribute("data-hidescrollbar"),allowNativeSmoothScroll:"true"===this.getAttribute("data-allownativesmoothscroll")&&!u,allowNativeScroll:!u,forceHideScrollbars:u,requireAnimation:u&&l.Z.edge};this.scroller=new r.Z(this,d),this.scroller.init(),this.scroller.reload(),o.Z.tv&&this.getAttribute("data-centerfocus")&&(this,c=this.scroller,i.ZP.addEventListener(this,"focus",(function(e){var t=a.Z.focusableParent(e.target);t&&c.toCenter(t)}),{capture:!0,passive:!0})),u&&function(e){n.e(2910).then(n.bind(n,22910)).then((function(){e.insertAdjacentHTML("beforebegin",'<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>')}))}(this)},x.pause=function(){var e=this.headroom;e&&e.pause()},x.resume=function(){var e=this.headroom;e&&e.resume()},x.detachedCallback=function(){this.getAttribute("data-navcommands")&&s.default.off(this,L);var e=this.headroom;e&&(e.destroy(),this.headroom=null);var t=this.scroller;t&&(t.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:x,extends:"div"})},87861:function(e,t,n){n(32081),n(67752);var r=n(83094),i=n(13800),o=n(47518),s=n(27515),a=n(78695),l=n(1892),c=n.n(l),u=n(95760),d=n.n(u),f=n(38311),h=n.n(f),b=n(58192),v=n.n(b),m=n(38060),p=n.n(m),y=n(54865),g=n.n(y),w=n(1841),S={};S.styleTagTransform=g(),S.setAttributes=v(),S.insert=h().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=p(),c()(w.Z,S),w.Z&&w.Z.locals&&w.Z.locals,n(87201);var T=Object.create(HTMLDivElement.prototype),x="emby-tab-button",L=x+"-active";function E(e){e.classList.add(L)}function C(e,t,n){var r;e.dispatchEvent(new CustomEvent("beforetabchange",{detail:{selectedTabIndex:t,previousIndex:n}})),null!=n&&n!==t&&(r=null)&&r.classList.remove("is-active")}function P(e){var t=this,n=t.querySelector("."+L),i=r.ZP.parentWithClass(e.target,x);if(i&&i!==n){n&&n.classList.remove(L);var o=n?parseInt(n.getAttribute("data-index")):null;E(i);var s=parseInt(i.getAttribute("data-index"));C(t,s,o),setTimeout((function(){t.selectedTabIndex=s,t.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:s,previousIndex:o}}))}),120),t.scroller&&t.scroller.toCenter(i,!1)}}function I(e){var t=r.ZP.parentWithClass(e.target,x);t&&this.scroller&&this.scroller.toCenter(t,!1)}function Z(e){var t=e.target.parentNode.querySelector(".lastFocused");t&&t.classList.remove("lastFocused"),e.target.classList.add("lastFocused")}function k(e){return e.querySelector("."+L)}function A(e,t){for(var n=e[t];n;){if(n.classList.contains(x)&&!n.classList.contains("hide"))return n;n=n[t]}return null}T.createdCallback=function(){this.classList.contains("emby-tabs")||(this.classList.add("emby-tabs"),this.classList.add("focusable"),r.ZP.addEventListener(this,"click",P,{passive:!0}),a.Z.tv&&r.ZP.addEventListener(this,"focusin",I,{passive:!0}),r.ZP.addEventListener(this,"focusout",Z))},T.focus=function(){var e=this.querySelector("."+L),t=this.querySelector(".lastFocused");t?s.Z.focus(t):e?s.Z.focus(e):s.Z.autoFocus(this)},T.refresh=function(){this.scroller&&this.scroller.reload()},T.attachedCallback=function(){!function(e){if(!e.scroller){var t=e.querySelector(".emby-tabs-slider");t?(e.scroller=new i.Z(e,{horizontal:1,itemNav:0,mouseDragging:1,touchDragging:1,slidee:t,smart:!0,releaseSwing:!0,scrollBy:200,speed:120,elasticBounds:1,dragHandle:1,dynamicHandle:1,clickBar:1,hiddenScroll:!0,requireAnimation:!o.Z.safari,allowNativeSmoothScroll:!0}),e.scroller.init()):(e.classList.add("scrollX"),e.classList.add("hiddenScrollX"),e.classList.add("smoothScrollX"))}}(this);var e=this.querySelector("."+L),t=e?parseInt(e.getAttribute("data-index")):parseInt(this.getAttribute("data-index")||"0");if(-1!==t){this.selectedTabIndex=t;var n=this.querySelectorAll("."+x)[t];n&&E(n)}this.readyFired||(this.readyFired=!0,this.dispatchEvent(new CustomEvent("ready",{})))},T.detachedCallback=function(){this.scroller&&(this.scroller.destroy(),this.scroller=null),r.ZP.removeEventListener(this,"click",P,{passive:!0}),a.Z.tv&&r.ZP.removeEventListener(this,"focusin",I,{passive:!0})},T.selectedIndex=function(e,t){var n=this;if(null==e)return n.selectedTabIndex||0;var r=n.selectedIndex();n.selectedTabIndex=e;var i=n.querySelectorAll("."+x);if(r===e||!1===t){C(n,e,r),n.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:e}}));var o=i[r];E(i[e]),r!==e&&o&&o.classList.remove(L)}else P.call(n,{target:i[e]})},T.selectNext=function(){var e=A(k(this),"nextSibling");e&&P.call(this,{target:e})},T.selectPrevious=function(){var e=A(k(this),"previousSibling");e&&P.call(this,{target:e})},T.triggerBeforeTabChange=function(){C(this,this.selectedIndex())},T.triggerTabChange=function(){this.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:this.selectedIndex()}}))},T.setTabEnabled=function(e,t){var n=this.querySelector('.emby-tab-button[data-index="'+e+'"]');t?n.classList.remove("hide"):n.classList.remove("add")},document.registerElement("emby-tabs",{prototype:T,extends:"div"})},88101:function(e,t,n){var r=n(54933),i=n.n(r),o=n(93476),s=n.n(o)()(i());s.push([e.id,".emby-scroller-container{position:relative}.emby-scroller{margin-left:3.3%;margin-right:3.3%}.itemsContainer>.card>.cardBox{margin-left:0;margin-right:1.2em}.servers>.card>.cardBox{margin-left:.6em;margin-right:.6em}.layout-mobile .emby-scroller,.layout-tv .emby-scroller{margin-left:0;margin-right:0;padding-left:3.3%;padding-right:3.3%}",""]),t.Z=s},1841:function(e,t,n){var r=n(54933),i=n.n(r),o=n(93476),s=n.n(o)()(i());s.push([e.id,".emby-tab-button{background:transparent;border-radius:0;box-shadow:none;box-sizing:border-box;cursor:pointer;display:inline-block;-webkit-flex-shrink:0;flex-shrink:0;font-family:inherit;font-size:inherit;font-weight:600;height:auto;line-height:1.25;margin:0;min-width:0;min-width:auto;outline:none;overflow:hidden;padding:1.5em;position:relative;vertical-align:middle;width:auto}.emby-tab-button.show-focus:focus{background:0!important;-webkit-transform:scale(1.3)!important;transform:scale(1.3)!important}.emby-tabs-slider{position:relative}.tabContent:not(.is-active){display:none}",""]),t.Z=s}}]);