dotfiles/.config/spicetify/Extracted/Raw/xpui/xpui-routes-track-v2.js

2 lines
27 KiB
JavaScript
Raw Normal View History

2024-07-11 00:01:49 +05:30
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[4179],{49630:(e,a,i)=>{i.d(a,{E:()=>r});var t=i(98340),n=i(43438),s=i(57559),l=i(4637);const r=({album:e,index:a,artistURI:i})=>(0,l.jsx)(t.ZP,{value:"card",index:a,children:(0,l.jsx)(s.i,{index:a,latest:!1,showType:!0,...(0,n.B$)(e,i,e.name)})})},68562:(e,a,i)=>{i.d(a,{R:()=>c});var t=i(3802),n=i(98340),s=i(73972),l=i(43438),r=i(49630),d=i(5488),o=i(4637);const c=({albums:e,artistName:a,artistId:i,artistUri:c,className:m})=>e?(0,o.jsx)(n.ZP,{value:"shelf/albums",children:(0,o.jsx)(d.P,{total:e.totalCount,title:t.ag.get("rich-page.popular-albums-by-artist",{artist:a}),seeAllUri:`${(0,l.GJ)(i)}:discography:${s.VZ.Album.toLowerCase()}`,seeAllLabel:t.ag.get("shelf.see-all"),alwaysShowSeeAll:!0,className:m,children:(0,l.Hr)(e.items).map(((e,a)=>(0,o.jsx)(r.E,{album:e,index:a,artistURI:c},e.uri)))})}):null},48687:(e,a,i)=>{i.d(a,{V:()=>o});var t=i(3802),n=i(98340),s=i(43438),l=i(79823),r=i(5488),d=i(4637);const o=({artistId:e,className:a,fansAlsoLike:i,title:o})=>(0,d.jsx)(n.ZP,{value:"shelf/fans-also-like",children:(0,d.jsx)(r.P,{total:i.length,title:o??t.ag.get("rich-page.fans-also-like"),seeAllUri:`${(0,s.GJ)(e)}:related`,className:a,children:i.map(((e,a)=>(0,d.jsx)(n.ZP,{value:"card",index:a,children:(0,d.jsx)(l.I,{index:a,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})})},30226:(e,a,i)=>{i.d(a,{j:()=>o});var t=i(59496),n=i(56162),s=i(3802),l=i(48607),r=i(29655),d=i(4637);const o=({artistName:e,artistUri:a,headerClassName:i,rowClassName:o,topTracks:c,topTracksTransformer:m,uri:u})=>{const k=(0,t.useMemo)((()=>c?.items.map((e=>m(e,u)))),[c?.items,m,u]),{usePlayContextItem:v}=(0,l.n)({uri:a},{featureIdentifier:"artist"});return k&&k.length>0?(0,d.jsxs)("div",{className:o,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(n.D,{variant:"mesto",children:s.ag.get("rich-page.popular-tracks")}),(0,d.jsx)(n.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:i,children:e})]}),(0,d.jsx)(r.k,{nrTracks:k.length,initialTracks:k,usePlayContextItem:v})]}):null}},35021:(e,a,i)=>{i.d(a,{y:()=>c});var t=i(3802),n=i(98340),s=i(73972),l=i(43438),r=i(49630),d=i(5488),o=i(4637);const c=({artistId:e,artistName:a,artistUri:i,className:c,singles:m})=>m?(0,o.jsx)(n.ZP,{value:"shelf/singles-and-eps",children:(0,o.jsx)(d.P,{total:m.totalCount,title:t.ag.get("rich-page.popular-singles-and-eps-by-artist",{artist:a}),seeAllUri:`${(0,l.GJ)(e)}:discography:${s.VZ.Single.toLowerCase()}`,seeAllLabel:t.ag.get("shelf.see-all"),alwaysShowSeeAll:!0,className:c,children:(0,l.Hr)(m.items).map(((e,a)=>(0,o.jsx)(r.E,{album:e,index:a,artistURI:i},e.uri)))})}):null},89600:(e,a,i)=>{i.r(a),i.d(a,{default:()=>Ba});var t=i(59496),n=i(61740),s=i(89605),l=i(56162),r=i(36844),d=i(96435),o=i(50346),c=i(3802),m=i(4270),u=i(14241),k=i(13655),v=i(35394),g=i(84229),h=i(41226),p=i(16743),N=i(73997),S=i(23627),x=i(77312),y=i(80964),A=i(59200),j=i(25915),b=i(62517),F=i(67565),C=i(66632),L=i(85213);let f=function(e){return e.LOADING="LOADING",e.LOADED="LOADED",e.UNAVAILABLE="UNAVAILABLE",e}({});const T=(0,L.Uy)(((e,a)=>{switch(a.type){case"LYRICS_LOADING":e[a.uri]={status:f.LOADING};break;case"LYRICS_LOADED":e[a.uri]={status:f.LOADED,data:{lyrics:{...a.response.lyrics}}};break;case"LYRICS_ERROR":e[a.uri]={status:f.UNAVAILABLE};break;default:throw new Error(`Unhandled lyrics action with type: ${a.type}`)}}));var I=i(25899),R=i(85270);var P=i(4637);const w={status:f.LOADING},D={status:f.UNAVAILABLE},O=t.createContext(void 0),U=({children:e,initialState:a={}})=>{const i=t.useReducer(T,a);return(0,P.jsx)(O.Provider,{value:i,children:e})},E=(e,a)=>{const i=t.useContext(O);if(void 0===i)throw new Error("useSEOLyrics must be used within a LyricsSEOProvider");if(!e||!(0,o.wj)(e)||a)return D;const[n,s]=i,l=n[e];return l||(s({type:"LYRICS_LOADING",uri:e}),(async e=>{const a=(0,o.EC)(e);return(await R.Zz.getSEOTrackLyrics(I.b.getInstance(),a.id)).body})(e).then((a=>{s({type:"LYRICS_LOADED",uri:e,response:a})}))
//# sourceMappingURL=xpui-routes-track-v2.js.map