"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[24871],{24871:function(e,t,i){i.r(t),i.d(t,{loadSections:function(){return v}}),i(14382),i(84734),i(44962),i(78557),i(90076),i(83994),i(82367);var r=i(47629),o=i(5898),a=i(76942),s=i(83375),n=i(24468),l=i(76542),c=i(46782),d=i(8566);function u(){return!c.A.desktop}function h(e,t,i,a,s){var d,h=r.Ay.getWindowSize().innerWidth,v={SortBy:"SortName",SortOrder:"Ascending",Filters:"IsFavorite",Recursive:!0,Fields:"PrimaryImageAspectRatio",CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual",EnableTotalRecordCount:!1};return i&&(v.ParentId=i),s||(v.Limit=6,u()?v.Limit=20:h>=1920?v.Limit=10:h>=1440&&(v.Limit=8)),"MusicArtist"===a.types?d=ApiClient.getArtists(t,v):(v.IncludeItemTypes=a.types,d=ApiClient.getItems(t,v)),d.then((function(t){var i="";if(t.Items.length){if(i+='<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">',!c.A.tv&&v.Limit&&t.Items.length>=v.Limit?(i+='<a is="emby-linkbutton" href="#/list.html?serverId='+ApiClient.serverId()+"&type="+a.types+'&IsFavorite=true" class="more button-flat button-flat-mini sectionTitleTextButton">',i+='<h2 class="sectionTitle sectionTitle-cards">',i+=o.Ay.translate(a.name),i+="</h2>",i+='<span class="material-icons chevron_right" aria-hidden="true"></span>',i+="</a>"):i+='<h2 class="sectionTitle sectionTitle-cards">'+o.Ay.translate(a.name)+"</h2>",i+="</div>",u()){var r="scrollX hiddenScrollX";c.A.tv&&(r+=" smoothScrollX"),i+='<div is="emby-itemscontainer" class="itemsContainer '+r+' padded-left padded-right">'}else i+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">';i+=n.default.getCardsHtml(t.Items,{preferThumb:a.preferThumb,shape:a.shape,centerText:a.centerText&&!0,overlayText:!1!==a.overlayText,showTitle:a.showTitle,showParentTitle:a.showParentTitle,scalable:!0,coverImage:a.coverImage,overlayPlayButton:a.overlayPlayButton,overlayMoreButton:a.overlayMoreButton&&!0,action:a.action,allowBottomPadding:!u(),cardLayout:!1}),i+="</div>"}e.innerHTML=i,l.default.lazyChildren(e)}))}function v(e,t,i,r){d.Ay.show();var o=[{name:"Movies",types:"Movie",id:"favoriteMovies",shape:(0,a.xK)(u()),showTitle:!1,overlayPlayButton:!0},{name:"Shows",types:"Series",id:"favoriteShows",shape:(0,a.xK)(u()),showTitle:!1,overlayPlayButton:!0},{name:"Episodes",types:"Episode",id:"favoriteEpisode",shape:(0,a.UI)(u()),preferThumb:!1,showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Videos",types:"Video,MusicVideo",id:"favoriteVideos",shape:(0,a.UI)(u()),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Artists",types:"MusicArtist",id:"favoriteArtists",shape:(0,a.zP)(u()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Albums",types:"MusicAlbum",id:"favoriteAlbums",shape:(0,a.zP)(u()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Songs",types:"Audio",id:"favoriteSongs",shape:(0,a.zP)(u()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayMoreButton:!0,action:"instantmix",coverImage:!0}],n=(0,s.E)("sectionid");n&&(o=o.filter((function(e){return e.id===n}))),r&&(o=o.filter((function(e){return-1!==r.indexOf(e.id)})));var l=e.querySelector(".favoriteSections");if(!l.innerHTML){for(var c="",v=0,m=o.length;v<m;v++)c+='<div class="verticalSection section'+o[v].id+'"></div>';l.innerHTML=c}for(var y=[],p=0,T=o.length;p<T;p++){var f=o[p];l=e.querySelector(".section"+f.id),y.push(h(l,t,i,f,1===o.length))}Promise.all(y).then((function(){d.Ay.hide()}))}i(1177),t.default={render:v}}}]);