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