"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[1076],{13258:(e,t,r)=>{r.d(t,{Z:()=>O});var i=r(96596),a=r(17),n=r(11692),o=r(78743),s=r(30465),d=r(83807),l=r(32787),c=r.n(l),h=r(83533),m=r(38656),g=r(78213),Z=r(45661),u=r(20755),p=r(9271),f=r(42254),y=r(23653);const b=s.Z.getInstance(),A=(0,h.ZP)();async function v(e){const{seedId:t,seedType:r}=e;if(!t||!r)return;const n=m.parse(window.location.href),s=c().parse(n.query||{});let l=null,h=null;if(s.autoplay){const m=c().stringify((0,i.Z)(s,"autoplay")),f=n.resolveObject({search:m?`?${m}`:""}).href;if(window.history.pushState({},"",f),s.playedFrom)l=parseInt(s.playedFrom,10)||o.Z.PLAYER_PLAY;else switch(e.seedType){case y.bV.LIVE:l=o.Z.PROF_LIVE_AUTOPLAY;break;case y.bV.ALBUM:l=o.Z.PROF_ALBUM_AUTOPLAY;break;case y.bV.ARTIST:l=o.Z.PROF_ARTIST_AUTOPLAY;break;case y.bV.FAVORITES:l=o.Z.PROF_FAVORITES_AUTOPLAY;break;case y.bV.TRACK:l=o.Z.PROF_SONG_AUTOPLAY;break;case y.bV.PODCAST:l=o.Z.PROF_EPISODE_AUTOPLAY,h=(0,u.PQ)(A.getState())||(0,a.Z)(await(0,g.Z)(A,p.Xe,(e=>e.length>0)),"[0].id","");break;case y.bV.COLLECTION:l=e.playlistType===d.Z.New4U?o.Z.PROF_NEW4U_AUTOPLAY:o.Z.PROF_PLAYLIST_AUTOPLAY;break;case y.bV.PLAYLIST_RADIO:l=e.playlistType===d.Z.New4U?o.Z.PROF_NEW4U_RADIO_AUTOPLAY:o.Z.PROF_PLAYLIST_RADIO_AUTOPLAY;break;case y.bV.MY_MUSIC:l=o.Z.PROF_MY_SONGS_SONGS;break;default:l=void 0}(0,Z.J9)({mediaId:h,playedFrom:l,stationId:t,stationType:r})}}function O(e){(0,f.W7)(A.getState())||(e.seedType!==y.bV.ARTIST||e.customRadioEnabled)&&(b.set("streamInitTime",Date.now()),b.get("inInit")?n.Z.once(n.E.AD_WARMUP_COMPLETE,(()=>{v(e)})):v(e))}},19981:(e,t,r)=>{r.d(t,{Z:()=>i});const i=(0,r(46255).Z)("br",{target:"ektrrag0"})((({dimension:e,theme:t})=>({margin:e&&`${e(t.dimensions)} auto`})),"")},28153:(e,t,r)=>{function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;ta});const a=(0,r(46255).Z)("div",{target:"ehbvdpp0"})((({showContent:e=!0,theme:t})=>i({animation:`${t.keyframes.fadeIn} ease-in-out 0.3s forwards`,opacity:0},e?{}:{animation:`${t.keyframes.fadeOut} ease-in-out 0.3s forwards`,opacity:1})),"")},52596:(e,t,r)=>{r.d(t,{Z:()=>i});const i=(0,r(33400).ZP)({resolved:{},chunkName:()=>"PodcastCard",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!r.m[t]},importAsync:()=>r.e(293).then(r.bind(r,7638)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return r(t)},resolve:()=>7638})},96025:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var i=r(23587),a=r(17),n=r(19981),o=r(46255);const s=(0,o.Z)("div",{target:"ecjgg1n0"})({name:"1jjo76f",styles:"align-items:center;display:flex;flex-direction:column;margin:1.5rem 0 2.4rem;> div:first-of-type{width:100%;}"});var d=r(51606),l=r(13258),c=r(97216);const h=(0,o.Z)("div",{target:"e1lbmti40"})((({theme:e})=>({backgroundColor:e.colors.gray[300],borderRadius:"99.9rem",height:"1.6rem",marginRight:"1rem",width:"8rem"})),""),m=(0,o.Z)("div",{target:"ecytf3g0"})({name:"1tbzkfl",styles:"display:flex;margin-left:5rem;margin-top:1.5rem;width:calc(100% - 5rem)"}),g=(0,o.Z)("div",{target:"e17zgicg0"})((({theme:e})=>({alignItems:"flex-start",backgroundColor:e.colors.white.primary,borderRadius:"0.3rem",boxShadow:"0px 3px 5px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",justifyContent:"center",marginBottom:"1.3rem",overflow:"hidden",padding:"1.5rem",position:"relative",width:"100%"})),""),Z=(0,o.Z)("div",{target:"esfupx0"})((({theme:e})=>({backgroundColor:e.colors.gray[300],borderRadius:"0.3rem",height:"1.4rem",marginTop:"1rem",marginLeft:"5rem",width:"calc(100% - 10rem)"})),""),u=(0,o.Z)("div",{target:"er4stc20"})({name:"mnpsxa",styles:"align-items:center;display:flex;flex-wrap:nowrap;justify-content:flex-start;margin-bottom:0.5rem;width:100%"}),p=(0,o.Z)("div",{target:"el7q0ak0"})({display:"flex",flexDirection:"column",marginLeft:"2rem",width:"calc(100% - 5rem)"},""),f=(0,o.Z)("div",{target:"ebuf9ay0"})((({theme:e})=>({backgroundColor:e.colors.gray[300],borderRadius:"50%",height:"3rem",width:"3rem"})),""),y=(0,o.Z)("div",{target:"e1s1rzr50"})((({theme:e})=>({backgroundColor:e.colors.gray[300],borderRadius:"0.3rem",height:"1.6rem",marginTop:"1rem",width:"40%"})),""),b=(0,o.Z)("div",{target:"e8qjsyg0"})((({theme:e})=>({backgroundColor:e.colors.gray[300],borderRadius:"0.3rem",height:"1.8rem",width:"85%"})),"");var A=r(34853);const v=function({isExpanded:e=!1}){return(0,A.BX)(g,{children:[(0,A.BX)(u,{children:[(0,A.tZ)(f,{}),(0,A.BX)(p,{children:[(0,A.tZ)(b,{}),(0,A.tZ)(y,{})]})]}),(0,A.BX)(c.Z,{shouldShow:e,children:[(0,A.tZ)(Z,{}),(0,A.tZ)(Z,{}),(0,A.tZ)(Z,{}),(0,A.tZ)(Z,{}),(0,A.tZ)(Z,{}),(0,A.BX)(m,{children:[(0,A.tZ)(h,{}),(0,A.tZ)(h,{})]})]})]})},O=(0,o.Z)("div",{target:"ecf03px0"})((({theme:e})=>({color:e.colors.gray[600],fontSize:e.fonts.size[20],fontWeight:e.fonts.weight.bold,lineHeight:e.fonts.lineHeight[26],marginTop:"1.2rem"})),""),w=(0,o.Z)("img",{target:"e1dixpms0"})({name:"1m4jf31",styles:"height:9.1rem;width:12rem"}),_=(0,o.Z)("div",{target:"ev044i80"})((({theme:e})=>({color:e.colors.gray[400],fontSize:e.fonts.size[14],lineHeight:"2rem",marginBottom:"8rem",marginTop:".8rem"})),""),P=(0,o.Z)("div",{target:"e1emp1mt0"})({name:"f23gi6",styles:"margin-top:6rem;text-align:center"});var S=r(90758),T=r(32420);const L=()=>{const e=(0,S.Z)();return(0,A.BX)(P,{children:[(0,A.tZ)(w,{src:T.cS}),(0,A.tZ)(O,{children:e("These episodes aren't here yet...")}),(0,A.tZ)(_,{children:e("Follow this podcast to be notified when they're ready")})]})};var R=r(87805),I=r(52596),E=r(28153),x=r(9271),k=r(78464),D=r(23653),C=r(96832),U=r(71130);function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t0),[f,y]=(0,C.useState)(void 0),[b,O]=(0,C.useState)(5),[w,_]=(0,C.useState)(Z||[]),[P,T]=(0,C.useState)(o),F=(0,S.Z)(),B=(0,C.useCallback)((async(e,r)=>{const i=m?"startDate-asc":"startDate-desc",n=await t(o,r,e,i),s=(0,a.Z)(n,["links","next"],void 0);y(s),p(!0)}),[o,m]);return(0,C.useEffect)((()=>{o!==P&&(T(o),p(!1)),B(void 0,5)}),[o,m]),(0,C.useEffect)((()=>{const e=u?Z.sort(((e,t)=>{const r=null==e?void 0:e.startDate,i=null==t?void 0:t.startDate;return m?r>i?1:-1:r<=i?1:-1})).slice(0,b):Z;_(e)}),[Z,u]),(0,C.useEffect)((()=>{u&&(B(void 0,5),O(5))}),[m]),(0,C.useEffect)((()=>{g&&(0,l.Z)({seedId:o,seedType:D.bV.PODCAST})}),[o,g]),(0,A.BX)(A.HY,{children:[(0,A.tZ)(c.Z,{shouldShow:!u,children:(0,A.tZ)(E.Z,{children:(0,A.BX)(s,{children:[(0,A.tZ)(v,{isExpanded:!0}),(0,A.tZ)(v,{}),(0,A.tZ)(v,{}),(0,A.tZ)(v,{}),(0,A.tZ)(v,{})]})})}),(0,A.tZ)(c.Z,{shouldShow:u&&0===Z.length,children:(0,A.tZ)(L,{})}),(0,A.tZ)(c.Z,{shouldShow:u&&Z.length>0,children:(0,A.BX)(s,{children:[(0,A.tZ)("div",{children:w.map(((t,i)=>(0,A.tZ)(E.Z,{children:(0,A.tZ)(I.Z,Y({currentlyPlaying:e,episodeDuration:t.duration,isInitiallyExpanded:0===i,isNewEpisode:t.new,pageName:"podcast_profile",playingState:r,playNext:k.next,showPodcastTranscriptions:(null==t?void 0:t.transcriptionAvailable)&&h},t))},`podcast-card-${t.id}`)))}),(0,A.tZ)(n.Z,{}),(0,A.tZ)(c.Z,{shouldShow:!!f,children:(0,A.BX)(R.Z,{onClick:()=>{B(f,5),O(b+5)},children:[F("See More"),(0,A.tZ)(d.Z,{direction:"down"})]})})]})})]})}}}]); //# sourceMappingURL=PodcastEpisodeCards.www.js.map