(()=>{var e,t,n,i,r,s,a={60689:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var i=n(422),r=n(21082),s=n(82909),a=n(86070);const o=({uri:e,title:t,clickUrl:n,onClick:o,variant:l,semanticColor:c,testid:u="ad-link"})=>(0,a.jsx)(s.r,{title:t,children:(0,a.jsx)(i.E,{as:"p",variant:l,semanticColor:c,dir:"auto",children:n?(0,a.jsx)(r.N,{style:{color:"inherit"},to:n,dir:"auto","data-testid":u,onClick:o,children:t}):t})},e)},78925:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CtaButton:()=>c,default:()=>u});var i=n(30758),r=n(73301),s=n(71416),a=n(44481),o=n(21082),l=n(86070);const c=({"aria-label":e,text:t,onClick:n,clickUrl:c,backgroundColor:u,className:d})=>{const p=(0,i.useMemo)((()=>{if(!u)return;const e=(0,r.mA)(u);return{...e,text:{...e.text,base:s.LLE}}}),[u]);return(0,l.jsx)(o.N,{"aria-label":e||t,className:d,"data-testid":"ad-cta-button",to:c,onClick:e=>{e.stopPropagation(),n()},children:(0,l.jsx)(a.$,{UNSAFE_colorSet:p,colorSet:"invertedLight",size:"small",children:t})})},u=c},16345:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,L:()=>c});var i=n(62411),r=n(60689),s=n(39148),a=n(63676),o=n(89775),l=n(86070);const c=({item:e,variant:t="bodyMedium",semanticColor:n="textSubdued",surface:c})=>{const{subtitle:u,url:d}=(0,s.b)(e),p=(0,i.wA)();return(0,l.jsx)(r.I,{testid:"context-item-info-ad-subtitle",title:u,variant:t,semanticColor:n,uri:e.uri,clickUrl:d,onClick:()=>{p((0,o.q5)(a.c.ADVERTISER_SUBTITLE,a.V[c]))}})},u=c},8679:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,f:()=>c});var i=n(62411),r=n(60689),s=n(39148),a=n(63676),o=n(89775),l=n(86070);const c=({item:e,surface:t,variant:n="titleSmall",semanticColor:c="textBase"})=>{const u=(0,i.wA)(),{title:d,url:p}=(0,s.b)(e);return d?(0,l.jsx)(r.I,{title:d,variant:n,semanticColor:c,uri:e.uri,clickUrl:p,onClick:()=>{u((0,o.q5)(a.c.ADVERTISER_TITLE,a.V[t]))}}):null},u=c},89848:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>r,G5:()=>s,bT:()=>a,dY:()=>l,mr:()=>c,yU:()=>o});var i=n(30758);const r=(0,i.createContext)({adsAPI:null,homeAds:null}),s=()=>{const{adsAPI:e}=(0,i.useContext)(r);if(null===e)throw new Error("useAdsAPI must be used within a AdsAPIProvider");return e},a=()=>{const{home:e}=s(),t=(0,i.useContext)(r);if(!t.homeAds)throw new Error("useHomeAdsAPI must be used within a HomeAdsProvider");return{...e,...t.homeAds}},o=()=>{const{survey:e}=s();return{...e}},l=()=>s().inStreamApi,c=()=>l().getInStreamAd()},555:(e,t,n)=>{"use strict";n.d(t,{E9:()=>o,NI:()=>u,Qd:()=>a,Zl:()=>c,iT:()=>l,pU:()=>r,un:()=>s});var i=n(68750);const r=2,s=3,a=6,o=8,l=(e,t)=>{const n=e.leavebehindAds;let i=[];return n&&(i=n.map((n=>({adId:n.adId,advertiser:n.advertiser,tagline:n.tagline,displayImage:{src:n?.logoImage||n?.displayImage,alt:`${n.advertiser} logo`},buttonMessage:n.buttonMessage,clickthroughUrl:n.clickthroughUrl,trackingEvents:n.trackingEvents,requestId:e.requestId,lineitemId:n.lineitemId,uri:t})))),i};function c(e){switch(e){case i.ui.PODCAST_SCROLL_NPV:case i.ui.SHOW_PAGE:case i.ui.EPISODE_PAGE:case i.ui.PODCAST_SEE_ALL:return"podcast";case i.ui.MUSIC_NPV:case i.ui.PLAYLIST:case i.ui.MUSIC_SEE_ALL:return"music";case i.ui.UNKNOWN:return"unknown";case i.ui.UNRECOGNIZED:default:return"unrecognized"}}function u(e){switch(e){case i.ui.EPISODE_PAGE:case i.ui.PODCAST_SEE_ALL:case i.ui.PLAYLIST:case i.ui.MUSIC_SEE_ALL:case i.ui.SHOW_PAGE:return o;case i.ui.MUSIC_NPV:case i.ui.PODCAST_SCROLL_NPV:case i.ui.UNKNOWN:case i.ui.UNRECOGNIZED:default:return}}},1378:(e,t,n)=>{"use strict";n.d(t,{x:()=>A});var i=n(97500),r=n.n(i),s=n(422),a=n(45415),o=n(55968),l=n(93523),c=n(56515),u=n(44481),d=n(31417),p=n(881),m=n(95631);const h="lIp2JaiMRS6_yF05q5N9",f="uzQIGWrDxI1E09vQnrXk",g="s58sp4t3h1uU9n_42KqD",E="c0KyMkxeMCWQGE7cR8s_",_="I2hCY2G1sJIBaTtEfJt_",y="bXJ77rNIJ18Y0GfegQdr",v="y9bkifFKNExwjaoINLm9",b="Qsmn7PN8jFZ8tATBCnFs";var S=n(86070);const A=({title:e,description:t,id:n,visible:i,primaryButtonText:A,secondaryButtonText:C,checkboxText:T,onHide:I,onPrimaryButtonClick:O,onSecondaryButtonClick:w=I,onCheckboxClick:N,onCloseClick:R=w,showButtons:P=!0,children:L,placement:D="auto",hideArrow:k,className:x,popperOptions:U,zIndex:M,maxWidth:B,tippyClassName:j,tippyWrapperClassName:F,hideOnClickOutside:V=!0,useSecondaryStyling:G=!1,childRef:H,fadeOut:W=!1,renderInline:z=!0,descriptionId:K})=>(0,S.jsx)(m.W,{renderInline:z,visible:i,placement:D,hideArrow:k,popperOptions:U,className:j,tippyWrapperClassName:F,zIndex:M,maxWidth:B,onHide:V?I:()=>{},childRef:H,fadeOut:W,overlay:(0,S.jsxs)("div",{className:r()(h,x),"data-testid":`${n}-hook`,children:[(0,S.jsxs)("div",{className:f,children:[(0,S.jsx)(s.E,{as:"p",className:g,variant:"bodyMediumBold",children:e}),!P&&(0,S.jsx)(p.a,{size:"sm",className:b,onClick:e=>R?.(e),ariaLabel:d.Ru.get("close"),icon:a.M})]}),(0,S.jsx)(s.E,{as:"p",className:E,variant:"bodySmall",id:K,children:t}),P&&(0,S.jsxs)("div",{className:_,children:[(0,S.jsx)("div",{children:T&&(0,S.jsx)(o.c,{id:"dont.show.onboarding.npv",onChange:N,semanticColor:"essentialBase",className:y,children:(0,S.jsx)(s.E,{variant:"bodySmall",children:T()})})}),(0,S.jsxs)("div",{className:v,children:[C&&(0,S.jsx)(l.H,{onClick:w,size:"small",children:C()}),A&&(G?(0,S.jsx)(c.n,{onClick:O,size:"small",children:A()}):(0,S.jsx)(u.$,{colorSet:"invertedLight",onClick:O,size:"small",children:A()}))]})]})]}),children:L})},94965:(e,t,n)=>{"use strict";n.d(t,{D:()=>p,y:()=>m});var i=n(30758),r=n(62411),s=n(31417),a=n(70243),o=n(57239),l=n(95631),c=n(89402),u=n(7971),d=n(86070);const p=l.d,m=({id:e,options:t,children:n})=>{const l=(0,r.wA)(),m=(0,i.useCallback)((()=>{l((0,a.zL)())}),[l]),h=(0,c.W)(),f={isCTA:!0,placement:p.rightTop,...t,primaryButtonText:()=>s.Ru.get("login"),secondaryButtonText:()=>s.Ru.get("action-trigger.button.not-now"),onLogInteraction:h};return(0,d.jsx)(o.U,{className:u.A.container,id:e,onPrimaryButtonClick:m,options:f,children:n})}},41616:(e,t,n)=>{"use strict";n.d(t,{e:()=>P});var i=n(30758),r=n(97500),s=n.n(r),a=n(79133),o=n.n(a),l=n(85505),c=n(26758),u=n(3292),d=n(86070);const p=({iconSize:e,placeholderText:t})=>t?(0,d.jsx)("svg",{width:(0,u.k)(e),height:(0,u.k)(e),fill:"currentColor",viewBox:"0 0 18 20",xmlns:"http://www.w3.org/2000/svg","data-testid":"user-icon",children:(0,d.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"central",children:t})}):(0,d.jsx)(c.v,{"aria-hidden":"true",size:e,"data-testid":"user-icon"});var m=n(7938);const h="tp8rO9vtqBGPLOhwcdYv",f="Xz3tlahv16UpqKBW5HdK",g="BzunmwrVMyWGpopPJRt2",E="yzLEMgdzXgAnIZZwMHO1",_="ENopS3htmKy15q_QCR2j",y="KdxlBanhDJjzmHfqhP0X",v="Q4hOdDPRDHPhfou2xbDg",b="m95Ymx847hCaxHjmyXKX",S={},A=[l.MS1,l.wfD,l.pfM,l.zDo,l.mZi,l.RQU],C=e=>{if(!S[e]){const t=function(e){let t,n=0;if(0===e.length)return n;for(let i=0,r=e.length;io()(e)[0].toUpperCase(),I=e=>{const t=C(e);return(e=>{const{r:t,g:n,b:i}=e.rgb;return(299*t+587*n+114*i)/1e3>=128})((0,m.j)(t))?l.Ql9:l.ONy},O=({username:e,displayName:t,userIconSize:n,transparent:i,className:r})=>{const a=e&&t,o=a?(e=>({background:C(e),color:I(e)}))(e):{},l=a?{placeholderText:T(t)}:{};return(0,d.jsx)("div",{className:s()(y,r,{[v]:!a,[b]:i}),"data-testid":"placeholder-wrapper",style:o,children:(0,d.jsx)(p,{iconSize:n,...l})})};var w=n(22984),N=n(82935);const R=.93328125,P=(0,i.memo)((function(e){const{label:t,images:n,width:i,className:r,imageClassName:a,withBadge:o,userIconSize:l,testID:c,piled:u,username:p,displayName:m,placeholderClassName:y,customPlaceholder:v,transparent:b}=e,S=(0,N.h)(n,{desiredSize:i}),A=v||(0,d.jsx)(O,{username:p,displayName:m,userIconSize:l,transparent:b,className:y});return(0,d.jsxs)("figure",{className:s()(h,{[g]:o},r),title:t,style:{width:u?i*R:i,height:i,...u&&{marginInlineStart:.03125*i}},"data-testid":c,children:[(0,d.jsx)("div",{className:s()({[E]:u}),style:{width:i,height:i,insetInlineStart:u?-.06671875000000005*i:0},children:S?(0,d.jsx)(w._,{loading:"eager",src:S,alt:t,className:s()(f,a),children:A}):A}),u&&(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"0",width:"0","aria-hidden":"true",children:(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"avatarClipPath",clipPathUnits:"objectBoundingBox",children:(0,d.jsx)("path",{className:_,d:"M 0.0666 0.7497 C 0.104 0.6744 0.125 0.5897 0.125 0.5 C 0.125 0.4103 0.104 0.3256 0.0666 0.2503 C 0.1531 0.1006 0.3148 0 0.5 0 C 0.7761 0 1 0.2239 1 0.5 C 1 0.7761 0.7761 1 0.5 1 C 0.3148 1 0.1531 0.8994 0.0666 0.7497 Z","transform-origin":"0.5 0.5"})})})})]})}))},881:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var i=n(30758),r=n(93523),s=n(99701),a=n(86070);const o=i.forwardRef((function({onClick:e,ariaLabel:t,standalone:n=!1,tabIndex:i=0,className:o="",icon:l,size:c="md",semanticColor:u,condensed:d,condensedAll:p,disableTooltip:m=!1,testId:h,disabled:f=!1,placement:g},E){const _=l,y="sm"===c||"md"===c||"lg"===c?c:void 0,v="small"===c||"medium"===c||"large"===c?c:void 0;return(0,a.jsx)(s.Zp,{label:t,disabled:m,placement:g,children:(0,a.jsx)(r.H,{"data-testid":h,className:o,onClick:e,"aria-label":t,"aria-hidden":n,tabIndex:i,ref:E,iconOnly:_,buttonSize:y,size:v,semanticColor:u,condensed:d,condensedAll:p,disabled:f})})}))},17866:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var i=n(21082),r=n(86070);const s=({href:e,children:t,...n})=>(0,r.jsx)(i.N,{to:e,...n,children:t})},38157:(e,t,n)=>{"use strict";n.d(t,{M:()=>c,e:()=>u});var i=n(30758),r=n(93523),s=n(66460),a=n(31417),o=n(99701),l=n(86070);let c=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});const u=i.forwardRef((function({onClick:e=(()=>{}),size:t=c.md,label:n=a.Ru.get("more"),ariaLabel:i,placement:u,className:d,condensedAll:p,condensed:m=!0},h){return(0,l.jsx)(o.Zp,{label:n,placement:u,children:(0,l.jsx)(r.H,{onClick:e,iconOnly:s.x,size:t,"aria-label":i||n,"aria-haspopup":"menu",ref:h,"data-testid":"more-button",className:d,condensedAll:p,condensed:m})})}))},68594:(e,t,n)=>{"use strict";n.d(t,{D:()=>d});var i=n(97500),r=n.n(i),s=n(99701);const a="Psc33HXPyazZYAAr1tgz",o="VGJz_GOARJ6j02JICvW6",l="VpNHGG5ZhoxQ8AqW709S",c="P7395UzhjxLUlLZvj5fb";var u=n(86070);const d=function(e){const{children:t,active:n=!1,focus:i=!0,label:d,onClick:p,noBackground:m=!1,className:h}=e;return(0,u.jsx)(s.Zp,{label:d,children:(0,u.jsx)("button",{className:r()(a,h,{[c]:n,[o]:m,[l]:i}),onClick:p,"aria-label":d,children:t})})}},51281:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var i=n(30758),r=n(31417),s=n(75134),a=n(43743),o=n(38996),l=n(85353),c=n(65462),u=n(78516),d=n(67668),p=n(13155),m=n(86070);const h=i.memo((function({images:e,name:t,uri:n,type:i,year:h,sharingInfo:f,latest:g,showType:E,onClick:_,delegatePlayback:y=!1,isPlaying:v,onPlay:b,index:S,navigationUrl:A,variant:C,isRestricted:T}){const I=g?r.Ru.get("artist.latest-release"):h,O=(0,d.V)(),w=E&&I?`${I} • `:I,N=T&&!O;return(0,m.jsx)(c.h,{menu:(0,m.jsx)(u.h,{uri:n,sharingInfo:f}),children:(0,m.jsx)(s.Z,{variant:C,onClick:_,featureIdentifier:"album",headerText:t,uri:n,isDownloadable:!0,index:S,delegatePlayback:y,isPlaying:v,onPlay:b,navigationUrl:A,renderCardImage:()=>(0,m.jsx)(a.M,{images:e}),renderSubHeaderContent:()=>(0,m.jsxs)(o.c,{children:[N&&(0,m.jsx)(l.$,{}),!!w&&(0,m.jsx)("time",{dateTime:(h||"").toString(),children:w}),E&&(0,p.C)(i)]})})})}))},75134:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D,_:()=>P});var i=n(30758),r=n(97500),s=n.n(r),a=n(85387),o=n(11966),l=n(73203),c=n(19221),u=n(14343),d=n(43182),p=n(91008),m=n(31417),h=n(98211),f=n(21082),g=n(60281),E=n(34733),_=n(18113),y=n(44875),v=n(98811),b=n(27012),S=n(37410),A=n(89402),C=n(38501),T=n(28340),I=n(50671),O=n(21549),w=n(66387),N=n(43560),R=n(86070);let P=function(e){return e.Default="default",e.Compact="compact",e}({});const L=e=>e.delegateNavigation?(0,R.jsx)(R.Fragment,{children:e.children}):(0,R.jsx)(f.N,{className:N.A.cardTitleWrapper,to:e.to,search:e.search,pathname:e.pathname,children:e.children}),D=({onClick:e=(()=>{}),delegatePlayback:t=!1,delegateLogging:n=!1,delegateNavigation:r=!1,playInsteadOfNavigating:f=!1,isPlaying:D,onPlay:k=(()=>{}),onContextMenu:x=(()=>{}),onTouchStart:U=(()=>{}),onTouchEnd:M=(()=>{}),featureIdentifier:B,uri:j,renderCardImage:F,renderSubHeaderContent:V=(()=>null),isPlayable:G=!0,isDownloadable:H=!1,headerText:W,hasNewEpisodeIndicator:z,className:K,playUri:Y=j,playOptions:q,albumURI:$,testId:Z,ariaPlayLabel:Q,ariaPauseLabel:J,index:X,navigationUrl:ee,requestId:te,dragMimeType:ne,variant:ie=P.Default,logCardImpressions:re,showTitle:se=!0})=>{const ae=ie!==P.Compact&&"function"==typeof V,oe=(0,a.Zp)(),le=(0,A.W)(),ce=$?`?highlight=${j}`:"",ue=(0,u.NC)(C.wMq),{draggable:de,onDragStart:pe}=(0,b.P)({itemUris:[j],itemMimeTypes:ne?[ne]:[],dragLabelText:W}),{spec:me,logger:he,UBIFragment:fe}=(0,O.r)(d.y,{data:{uri:j,position:X,reason:te??""}}),ge=(0,I.t)(me),Ee=$||j,_e=(0,p.o_h)(Ee,{parseUnknown:!0}),ye=(0,S.W)({type:"link",uri:Ee}),{isPlaying:ve,togglePlay:be,isActive:Se}=(0,T.P)({uri:Y},{featureIdentifier:B},q);let Ae=ve;t&&"boolean"==typeof D&&(Ae=D);const Ce=(0,i.useCallback)((()=>{let e=me.cardPlayButtonFactory().hitPause({itemToBePaused:j});Ae||(e=Se?me.cardPlayButtonFactory().hitResume({itemToBeResumed:j}):me.cardPlayButtonFactory().hitPlay({itemToBePlayed:j}));const i=he.logInteraction(e);if(k(j,i),n||le({targetUri:j,intent:Ae?"pause":"play",type:"click"}),t){if("function"!=typeof k)throw Error("No delegate playback handler provided")}else be({loggingParams:i})}),[n,t,Se,Ae,he,le,k,me,be,j]),Te=(0,i.useCallback)((()=>{le({targetUri:j,intent:"navigate",type:"click"});const e=me.hitUiNavigate({destination:ee??j});he.logInteraction(e)}),[he,ee,le,me,j]),Ie=(0,y.a)(j,W),Oe=(0,v.O)(j,W),we=()=>{"playlist-v2"===_e?.type&&Ie({category:y.w.PlaylistClicks})},Ne=()=>{"track"===_e?.type&&Oe({category:v.U.TrackClicks})},Re=(0,i.useCallback)((()=>{if(e(j),f)return void Ce();if(r)return;let t;Te(),_e&&(t=_e.toURLPath(!0)+ce);let n=ee??t;n=ye?(0,w.hF)(n||""):n,n&&oe(n)}),[e,j,f,r,Te,_e,ee,ye,Ce,ce,oe]);return(0,R.jsx)(fe,{spec:me,children:(0,R.jsx)(_.E,{uri:j,trigger:_.l.OnMouseDown,children:(0,R.jsx)(o.Z,{ref:re?ge:null,onContextMenu:x,onTouchStart:U,onTouchEnd:M,"data-testid":Z,onDragStart:pe,className:s()(N.A.cardContainer,K,"Card",{[N.A.scrollAnimation]:ue}),id:`${j}-${X}`,size:"md",variant:"naked",onClick:()=>{Re(),we(),Ne()},title:(0,R.jsx)(L,{delegateNavigation:r,to:$??j,search:ce,pathname:ee,children:(0,R.jsxs)(l.Z,{variant:ie===P.Default?"ballad":"bodySmall",lineClamp:2,title:W,className:N.A.cardTitle,onClick:()=>{Re(),we(),Ne()},dir:"auto",style:se?{}:{height:0},children:[z&&(0,R.jsx)(g.Tc,{className:N.A.newEpisodeIndicator}),(0,R.jsx)("span",{className:s()({[N.A.spotifyOwnedHeaderText]:!se}),children:W})]})}),subtitle:ae?(0,R.jsx)(c.j,{variant:"mesto",lineClamp:2,as:"div",dir:"auto",children:V(he,me)}):void 0,draggable:de,trailing:H&&(0,R.jsx)(h.M,{uri:j,className:N.A.DownloadStatusIndicator,size:"small"}),media:(0,R.jsxs)("div",{className:N.A.imageContainer,children:[F(),G&&(0,R.jsx)("div",{className:s()(N.A.PlayButtonContainer,{[N.A.PlayButtonContainerVisible]:Ae}),children:(0,R.jsx)(E.R,{isPlaying:Ae,onClick:Ce,ariaPlayLabel:Q??m.Ru.get("playlist.a11y.play",W),ariaPauseLabel:J??m.Ru.get("playlist.a11y.pause",W)})})]})})})})}},43743:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var i=n(97500),r=n.n(i),s=n(5765),a=n(22984),o=n(63096),l=n(98305),c=n(86070);const u=e=>(0,c.jsx)(s.e,{size:"xxlarge",...e}),d=e=>{const{children:t,isHero:n=!1,isCircular:i=!1,FallbackComponent:s=u,images:d=[],color:p,desiredSize:m=300,desiredLabel:h="standard",loadingMode:f="lazy",is1DCardHeader:g=!1}=e,E=(0,o.g)(d,{desiredSize:m,desiredLabel:h}),_={"--card-color":p??""};return(0,c.jsx)("div",{className:r()(l.A.imageWrapper,{[l.A.hero]:n,[l.A.circular]:i}),style:_,children:(0,c.jsxs)("div",{children:[(0,c.jsx)(a._,{className:r()(l.A.image,{[l.A.circular]:i,[l.A.headerImage]:g}),src:E?.url,loading:f,testid:"card-image",fadeIn:!0,children:s&&(0,c.jsx)("div",{className:l.A.imagePlaceholder,children:(0,c.jsx)(s,{"aria-hidden":!0,"data-testid":"card-image-fallback"})})}),t]})})}},38996:(e,t,n)=>{"use strict";n.d(t,{c:()=>p});var i=n(30758),r=n(97500),s=n.n(r),a=n(422);const o="i6jA7UnVNDJFGlAgtutp",l="LaSOZAQLcR1DzFgdKrUx",c="JS9WYvoqyy3vUXqMt5Hv",u="qZH56jw74skju8uLzuF3";var d=n(86070);const p=i.memo((function({isHero:e,children:t,lineClamp:n=2}){return(0,d.jsx)(a.E,{as:"div",variant:"bodySmall",className:s()(o,{[u]:e,[l]:1===n,[c]:2===n}),semanticColor:"textSubdued",children:t})}))},86573:(e,t,n)=>{"use strict";n.d(t,{U:()=>M});var i=n(30758),r=n(422),s=n(31417),a=n(75134),o=n(43743),l=n(38996),c=n(97500),u=n.n(c);const d="SlbzF58tYfJdBqTpDBZE",p="VFWaXWtN61bTc_4UOexe",m="C3sIZDdL9EfwMJcSgl8t";var h=n(86070);const f=({children:e,className:t})=>(0,h.jsx)("span",{className:u()(d,t),children:e}),g=e=>(0,h.jsx)("span",{className:u()(e.className,p,{[m]:e.noSeparator}),children:e.children});var E=n(58920),_=n(23838);const y="GSY8YnDV4YNR_W53fPhi",v="dQYtZdjVyebpK221a_JU",b=(0,i.memo)((function(e){const{src:t,description:n,...s}=e,[a,o]=(0,i.useState)("inherit");return(0,i.useEffect)((()=>{t&&async function(e){const{colorRaw:t}=await(0,_.extractColors)(e),{h:n,s:i,l:r}=t.hsl,s=`hsl(${360*n}, ${100*i}%, ${Math.min(100*r,30)}%)`;o(s)}(t)}),[t]),t?(0,h.jsx)("div",{className:y,style:{backgroundColor:a},"data-testid":"episode-fallback-image-container",children:(0,h.jsx)("div",{className:v,children:(0,h.jsx)(r.E,{as:"p",variant:"titleSmall",children:n})})}):(0,h.jsx)(E.L,{...s,size:"xxlarge"})}));var S=n(89994),A=n(81288),C=n(65462),T=n(50496),I=n(70275),O=n(99701),w=n(21082),N=n(60281),R=n(33593),P=n(27012),L=n(99041),D=n(18663),k=n(79225),x=n(63096);const U="Qb8_f8zfu_KeMGbDtEOO",M=({description:e,isExplicit:t,images:n,name:c,uri:u,durationMilliseconds:d,releaseDate:p,resume_point:m,showImages:E,sharingInfo:_,is19PlusOnly:y,isHero:v,onClick:M,testId:B,index:j,requestId:F,color:V,episodeShow:G,variant:H,logCardImpressions:W=!1,hasAssociatedVideo:z})=>{let K;const Y=p?new Date(p):void 0,q=Y&&!isNaN(Y.getTime())&&!isNaN(d),$=(0,x.g)(E,{desiredSize:48}),Z=(0,N.hD)(u,Y?.toISOString(),m?.resume_position_ms,m?.fully_played),Q=G?.uri||"",{draggable:J,onDragStart:X}=(0,P.P)({itemUris:[Q],dragLabelText:G?.name}),ee=(0,i.useCallback)((()=>{M?.(Q)}),[M,Q]),te=(0,h.jsxs)(h.Fragment,{children:[t&&!y&&(0,h.jsx)(g,{className:U,noSeparator:!0,children:(0,h.jsx)(L.U,{})}),y&&(0,h.jsx)(g,{className:U,noSeparator:!0,children:(0,h.jsx)(D.q,{size:16})})]}),ne=q&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g,{children:(0,k.gD)(Y)}),(0,h.jsx)(g,{children:s.Ru.get("episode.length",Math.ceil(d/6e4))})]});return K=v?(0,h.jsx)(S.A,{index:j,onClick:M,headerText:c,featureIdentifier:"episode",uri:u,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:Z,renderCardImage:()=>(0,h.jsx)(o.M,{isHero:!0,images:n,color:V,FallbackComponent:t=>(0,h.jsx)(b,{...t,description:e,src:$&&$.url})}),renderSubHeaderContent:()=>(0,h.jsx)(l.c,{isHero:!0,children:(0,h.jsxs)(f,{children:[te,z&&(0,h.jsx)(g,{children:(0,h.jsx)(R.T,{separator:""})}),(0,h.jsx)(g,{children:(0,h.jsx)(A.t,{children:s.Ru.get("card.tag.episode")})}),ne,G&&(0,h.jsx)(g,{children:(0,h.jsx)(O.Zp,{label:G?.name,showDelay:O.uF,children:(0,h.jsx)(r.E,{as:"span",children:(0,h.jsx)(C.h,{menu:(0,h.jsx)(I.H,{uri:Q}),children:(0,h.jsx)(w.N,{draggable:J,to:Q,onDragStart:X,dir:"auto",onClick:ee,children:G?.name})})})})})]})}),testId:B,requestId:F,logCardImpressions:W}):(0,h.jsx)(a.Z,{variant:H,index:j,onClick:M,headerText:c,featureIdentifier:"episode",uri:u,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:Z,renderCardImage:()=>(0,h.jsx)(o.M,{images:n,color:V,FallbackComponent:t=>(0,h.jsx)(b,{...t,description:e,src:$&&$.url})}),renderSubHeaderContent:()=>(0,h.jsx)(l.c,{children:(0,h.jsxs)(f,{children:[te,z&&(0,h.jsx)(R.T,{separator:""}),ne]})}),testId:B,requestId:F,logCardImpressions:W}),(0,h.jsx)(C.h,{menu:(0,h.jsx)(T.b,{uri:u,sharingInfo:_}),children:K})}},89994:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var i=n(30758),r=n(97500),s=n.n(r),a=n(85387),o=n(43182),l=n(91008),c=n(422),u=n(40935),d=n(21082),p=n(60281);const m="XLAiqekZxk4Z7Nok9a58",h="A49BHvl5C1wTQ0ZGCq6V",f="Jiy7CZomKxCOUMtOMwF_";var g=n(86070);const E=i.memo((function({search:e,children:t,to:n,onClick:i,isHero:r,title:s,hasNewEpisodeIndicator:a=!1,navigationUrl:o,disableLink:l=!1}){const E=r?"titleMedium":"bodyMediumBold",_=(0,g.jsxs)(c.E,{as:"div",variant:E,className:h,paddingBottom:u.vw,semanticColor:"textBase",children:[a&&(0,g.jsx)(p.Tc,{className:f}),t]});return l?_:(0,g.jsx)(d.N,{to:n,onClick:i,title:s,className:m,dir:"auto",search:e,pathname:o,children:_})}));var _=n(38996),y=n(98211),v=n(34733),b=n(27012),S=n(37410),A=n(89402),C=n(28340),T=n(50671),I=n(21549),O=n(66387);const w="mXNT9H2GU7lDW4cGx0q1",N="ouEZqTcvcvMfvezimm_J",R="pueeb339I8KrXZr0SDm1",P="cofBW8sjoBtMAmzDgqKt",L="Ykx_9AV9dI9vTLVV2b7h",D="NI1OxoVdokxENPAjoeOk",k="eUHZjKB8k8xrDIVk_cy9",x=e=>{const{onClick:t=(()=>{}),onContextMenu:n=(()=>{}),onTouchStart:r=(()=>{}),onTouchEnd:c=(()=>{}),delegatePlayback:u=!1,delegateLogging:d=!1,delegateNavigation:p=!1,playInsteadOfNavigating:m=!1,isPlaying:h,onPlay:f=(()=>{}),featureIdentifier:x,uri:U,renderCardImage:M,renderSubHeaderContent:B=(()=>null),isPlayable:j=!0,isDownloadable:F=!1,headerText:V,hasNewEpisodeIndicator:G=!1,className:H,playUri:W=U,playOptions:z,albumURI:K,testId:Y,ariaPlayLabel:q,ariaPauseLabel:$,index:Z,requestId:Q,dragMimeType:J,getSignifierContent:X=(()=>null),logCardImpressions:ee=!1}=e,te=(0,a.Zp)(),ne=(0,A.W)(),ie=K?`?highlight=${U}`:"",re=K||U,se=(0,S.W)({type:"link",uri:re}),{draggable:ae,onDragStart:oe}=(0,b.P)({itemUris:[U],itemMimeTypes:J?[J]:[],dragLabelText:V}),le=(0,i.useCallback)((e=>{e.target===e.currentTarget&&oe(e)}),[oe]),{spec:ce,logger:ue,UBIFragment:de}=(0,I.r)(o.y,{data:{uri:U,position:Z,reason:Q??""}}),{isPlaying:pe,isActive:me,togglePlay:he}=(0,C.P)({uri:W},{featureIdentifier:x},z);let fe=pe;u&&"boolean"==typeof h&&(fe=h);const ge=(0,i.useCallback)((()=>{let e=ce.cardPlayButtonFactory().hitPause({itemToBePaused:U});fe||(e=me?ce.cardPlayButtonFactory().hitResume({itemToBeResumed:U}):ce.cardPlayButtonFactory().hitPlay({itemToBePlayed:U}));const t=ue.logInteraction(e);if(f(U,t),d||ne({targetUri:U,intent:fe?"pause":"play",type:"click"}),u){if("function"!=typeof f)throw Error("No delegate playback handler provided")}else he({loggingParams:t})}),[d,u,me,fe,ue,ne,f,ce,he,U]),Ee=(0,i.useCallback)((()=>{ne({targetUri:U,intent:"navigate",type:"click"});const e=ce.hitUiNavigate({destination:U});ue.logInteraction(e)}),[ue,ne,ce,U]),_e=(0,i.useCallback)((()=>{if(t(U),m)return void ge();if(p)return;Ee();const e=(0,l.o_h)(re).toURLPath(!0),n=se?(0,O.hF)(`${e}${ie}`):`${e}${ie}`;te(n)}),[t,U,m,p,Ee,re,se,ie,te,ge]),ye=(0,T.t)(ce);return(0,g.jsx)(de,{spec:ce,children:(0,g.jsx)("div",{className:s()(w,H),onContextMenu:n,onTouchStart:r,onTouchEnd:c,"data-testid":Y,ref:ee?ye:null,children:(0,g.jsxs)("div",{draggable:ae,onDragStart:le,className:R,children:[M(),(0,g.jsxs)("div",{className:P,children:[(0,g.jsx)(E,{to:K||U,search:ie,onClick:Ee,isHero:!0,title:V,hasNewEpisodeIndicator:G,children:V}),B?(0,g.jsx)(_.c,{isHero:!0,children:B(ue,ce)}):null,X()]}),F&&(0,g.jsx)(y.M,{uri:U,className:L,size:"small"}),j&&(0,g.jsx)("div",{className:s()(D,{[k]:fe}),children:(0,g.jsx)(v.R,{isPlaying:fe,onClick:ge,ariaPlayLabel:q,ariaPauseLabel:$})}),(0,g.jsx)("div",{onClick:_e,className:N,"data-testid":"herocard-click-handler"})]})})})}},81288:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});var i=n(97500),r=n.n(i),s=n(422);const a="hSL9Sb4ko4GNvUVuPQOw";var o=n(86070);const l=({semanticColor:e,className:t,children:n})=>n?(0,o.jsx)(s.E,{variant:"bodySmall",semanticColor:e,className:r()(a,t),children:n}):null},85353:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var i=n(81231);const r="m0QxD0cLU3Jpd338szjv";var s=n(86070);const a=()=>(0,s.jsx)(i.u,{className:r,size:"xsmall",semanticColor:"textBase"})},26344:(e,t,n)=>{"use strict";n.d(t,{T:()=>f});var i=n(30758),r=n(97500),s=n.n(r),a=n(422),o=n(93523),l=n(44481),c=n(44971);const u="RVgHI2ejYct8LjT1AO7m",d="m0yIuS1Q6XRA5R4PNEhl",p="X05XDhpQJ7THPHfgbUk1",m="MIsUJlamzLYuAlvPbmZz";var h=n(86070);const f=(0,i.forwardRef)((({onClose:e=(()=>{}),onOutside:t,isOpen:n=!0,titleText:i,descriptionText:r,cancelText:f,confirmText:g,confirmLabel:E,onConfirm:_,allowHTML:y=!1,shouldCloseOnEsc:v=!0,shouldCloseOnOverlayClick:b=!0,shouldFocusAfterRender:S=!0,width:A=420,...C},T)=>(0,h.jsx)(c.A,{animated:!0,shouldCloseOnEsc:v,shouldCloseOnOverlayClick:b,overlayClassName:d,onRequestClose:t??e,contentLabel:C["aria-label"],isOpen:n,shouldFocusAfterRender:S,...C,children:(0,h.jsxs)("div",{ref:T,className:s()("encore-light-theme",u),style:"number"==typeof A?{width:A}:A,children:[(0,h.jsx)(a.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:i}),r&&(y?(0,h.jsx)(a.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:r},"data-testid":"confirm-dialog-description"}):(0,h.jsx)(a.E,{as:"p",variant:"bodySmall",semanticColor:"textBase","data-testid":"confirm-dialog-description",children:r})),(0,h.jsxs)("div",{className:p,children:[f&&(0,h.jsx)(o.H,{onClick:e,semanticColor:"textBase",className:m,children:f}),(0,h.jsx)(l.$,{"aria-label":E,autoFocus:!0,onClick:_,className:m,children:g})]})]})})))},58192:(e,t,n)=>{"use strict";n.d(t,{n:()=>y});var i=n(91008),r=n(31417),s=n(39148),a=n(21082),o=n(75497),l=n(13947),c=n(45627),u=n(5805),d=n(4861),p=n(85907),m=n(86070);const h=({item:e,onClick:t})=>(0,m.jsx)(m.Fragment,{children:e.artists.map(((n,s)=>{const o=(0,i.o_h)(n.uri)?.toURLPath(!0);return(0,m.jsxs)("span",{children:[s>0?r.Ru.getSeparator():null,o?(0,m.jsx)(a.N,{to:o,"data-testid":`context-item-info-${e.type}`,dir:"auto",onClick:t,children:n.name}):(0,m.jsx)("span",{dir:"auto",children:n.name})]},s)}))}),f=({item:e,onClick:t})=>{const{show:n}=e,r=(0,i.o_h)(n.uri)?.toURLPath(!0);return r?(0,m.jsx)(a.N,{to:r,"data-testid":"context-item-info-show",dir:"auto",onClick:t,children:n.name}):(0,m.jsx)("span",{dir:"auto",children:n.name})},g=({item:e,onClick:t})=>{const{book:n}=e,r=(0,i.o_h)(n.uri)?.toURLPath(!0);return r?(0,m.jsx)(a.N,{to:r,"data-testid":"context-item-info-book",dir:"auto",onClick:t,children:n.name}):(0,m.jsx)("span",{dir:"auto",children:n.name})},E={"data-testid":"context-item-info-ad-subtitle"},_=({item:e,onClick:t})=>{const n=(0,s.b)(e);return n.url?(0,m.jsx)("a",{...E,onClick:e=>{t?.(e,n.url||void 0)},href:n.url??void 0,rel:"noopener noreferrer",target:"_blank",dir:"auto",children:n.subtitle}):(0,m.jsx)("span",{dir:"auto",children:n.subtitle})},y=({item:e,onClick:t})=>(0,u.v)(e)||(0,d.v)(e)?(0,m.jsx)(h,{item:e,onClick:t}):(0,c.p)(e)?(0,m.jsx)(f,{item:e,onClick:t}):(0,l.d)(e)?(0,m.jsx)(g,{item:e,onClick:t}):(0,o.N)(e)?(0,m.jsx)(_,{item:e,onClick:t}):(0,p.d)(e)},83654:(e,t,n)=>{"use strict";n.d(t,{R:()=>m});var i=n(91008),r=n(21082),s=n(46983),a=n(75497),o=n(13947),l=n(45627),c=n(5805),u=n(4861),d=n(85907),p=n(86070);const m=({item:e,children:t,onClick:n,adUrl:m})=>{const{isSongVideoPlayingVideo:h}=(0,s.k)(),f=m??function(e,{isVideoPlaying:t=!1}){if((0,c.v)(e)){const n=t?e.artists[0].uri:e.album.uri;return(0,i.o_h)(n)?.toURLPath(!0)}if((0,l.p)(e)||(0,o.d)(e)||(0,u.v)(e))return(0,i.o_h)(e?.uri)?.toURLPath(!0);(0,a.N)(e)||(0,d.k)(e)}(e,{isVideoPlaying:h});return(0,c.v)(e)&&e.isLocal?(0,p.jsx)(p.Fragment,{children:t}):(0,c.v)(e)||(0,l.p)(e)||(0,o.d)(e)||(0,u.v)(e)?void 0===f?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(r.N,{"data-testid":"context-item-link",to:f,onClick:n,children:t}):(0,a.N)(e)?f?(0,p.jsx)("a",{"data-testid":"context-item-info-ad-title",onClick:e=>{n?.(e,f)},href:f,rel:"noopener noreferrer",target:"_blank",children:t}):(0,p.jsx)(p.Fragment,{children:t}):(0,d.d)(e)}},75830:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(26639),r=n(86070);const s=({children:e,...t})=>(0,r.jsx)(i.t,{...t,action:"toggle",trigger:"click",children:e})},26639:(e,t,n)=>{"use strict";n.d(t,{t:()=>A});var i=n(30758),r=n(3956),s=n(30503);var a=n(52162),o=n(44672),l=n(86070);const c=({menu:e,onClickOutside:t,children:n,trigger:c,offset:u,placement:d,isOpen:p,preventScrollingWhileOpen:m,triggerRef:h,position:f,getReferenceClientRect:g,onShow:E,onHide:_,appendTo:y,interactive:v=!0})=>{const b=(0,i.useRef)(null),S=(0,i.useRef)(null);((e,t)=>{(0,i.useEffect)((()=>{const n=e=>{t.current&&!t.current.contains(e.target)&&e.preventDefault()};if(e){const e={passive:!1};window.addEventListener("mousewheel",n,e),window.addEventListener("touchmove",n,e)}return()=>{window.removeEventListener("mousewheel",n),window.removeEventListener("touchmove",n)}}),[e,t])})(p&&m,b);const{updateAfterFirstLayout:A,cancel:C}=((e,t)=>{const n=(0,i.useRef)(0),r=(0,i.useCallback)((()=>{cancelAnimationFrame(n.current)}),[]),s=(0,i.useCallback)((()=>{e.current&&0!==e.current?.getBoundingClientRect().width?(t.current?.popperInstance?.update(),cancelAnimationFrame(n.current)):n.current=requestAnimationFrame(s)}),[e,t]);return(0,i.useEffect)((()=>()=>{cancelAnimationFrame(n.current)}),[s]),{updateAfterFirstLayout:s,cancel:r}})(b,S),T=(0,i.useCallback)((e=>{C(),e.reference.removeAttribute("data-context-menu-open"),_()}),[C,_]);(0,i.useEffect)((()=>{const e=S.current;if(!e||!e.reference||"click"===c)return()=>{};const t=e.reference,n=T.bind(void 0,e);return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)}}),[b,S,T,c]);let I=null;g?I=g:"right-click"!==c&&h||(I=()=>({width:0,height:0,top:f?.y??0,bottom:f?.y??0,left:f?.x??0,right:f?.x??0,x:0,y:0,toJSON:()=>{}}));const O=(0,i.useMemo)((()=>{return[(e=t,{name:"hideOnContextMenu",defaultValue:!0,fn:function(t){function n(n){e?e(t,n):t.hide()}function i(e){e.currentTarget instanceof Element&&(e.currentTarget.closest("[data-tippy-root]")||n(e))}const r=(0,s.e)(!1);return{onShow(){r?.addEventListener("contextmenu",n,{once:!0}),r?.addEventListener("touchstart",i,{passive:!0})},onHide(){r?.removeEventListener("contextmenu",n),r?.removeEventListener("touchstart",i)}}}})];var e}),[t]);return(0,l.jsxs)(l.Fragment,{children:[n,p&&(0,l.jsx)(r.Ay,{onCreate:e=>{S.current=e},onShow:e=>{A(),e.reference.setAttribute("data-context-menu-open","true"),E?.(e)},onHide:T,visible:p,plugins:O,render:t=>(0,l.jsx)(o.pZ,{value:"contextmenu",children:(0,l.jsx)("div",{ref:b,id:a.v,"data-placement":t["data-placement"],"data-testid":"context-menu",children:p?e:null})}),arrow:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}},{name:"arrow",options:{padding:10}}]},placement:d,onClickOutside:(e,n)=>{t?.(e,n)},interactive:v,offset:u,...y?{appendTo:y}:{},reference:h,getReferenceClientRect:I,aria:{expanded:"hover-or-focus"!==c&&"auto"}})]})};var u=n(17763);const d=({toggleContextMenu:e,children:t})=>(0,l.jsx)(l.Fragment,{children:i.cloneElement(t,{onClick:n=>{t.props.onClick?.(n),e(n)}})}),p=({openContextMenu:e,children:t})=>{const n=(0,u.Oj)();return(0,l.jsx)(l.Fragment,{children:i.cloneElement(t,{onFocus:n=>{document.documentElement.classList.contains("no-focus-outline")||(t.props.onFocus?.(n),e(n))},onBlur:e=>{t.props.onBlur?.(e),n({type:"close"})},onMouseEnter:n=>{t.props.onMouseEnter?.(n),e(n)},onMouseLeave:e=>{t.props.onMouseLeave?.(e),n({type:"close"})}})})};var m=n(44577);const h=({openContextMenu:e,children:t})=>{const n=(0,u.Oj)(),{isTouching:r}=(0,u.fd)(),s=(0,i.useRef)(),a=(0,i.useRef)();return(0,l.jsx)(l.Fragment,{children:i.cloneElement(t,{onContextMenu:n=>{t.props.onContextMenu?.(n),r||e(n),n.stopPropagation()},onTouchStart:e=>{s.current=Date.now(),a.current=e.touches[0],t.props.onTouchStart?.(e),n({type:"touch",value:!0})},onTouchEnd:i=>{t.props.onTouchEnd?.(i);const r=((e,t)=>{let n;for(let i=0;i20||Math.abs(i)>20}return!1}return!1})(i,a);var o;(o=s.current)&&Date.now()-500>o&&!r&&(n({type:"touch",value:!1}),e(i)),document.body.hasAttribute("data-dragging-type")&&document.body.removeAttribute("data-dragging-type")}})})},f=({openContextMenu:e,children:t})=>(0,l.jsx)(l.Fragment,{children:i.cloneElement(t,{onContextMenu:n=>{t.props.onContextMenu?.(n),e(n),n.stopPropagation()}})}),g=({openContextMenu:e,children:t})=>(0,m.g)()?(0,l.jsx)(f,{openContextMenu:e,children:t}):(0,l.jsx)(h,{openContextMenu:e,children:t});var E=n(89887);const _=(0,i.forwardRef)((function({isOpen:e,handleContextMenu:t,trigger:n,children:r},s){return(0,E.d)(r)?(0,l.jsx)(l.Fragment,{children:r(e,t,s)}):"click"===n?(0,l.jsx)(d,{toggleContextMenu:t,children:r}):"right-click"===n?(0,l.jsx)(g,{openContextMenu:t,children:r}):"hover-or-focus"===n?(0,l.jsx)(p,{openContextMenu:t,children:r}):(0,l.jsx)(l.Fragment,{children:(0,i.cloneElement)(r,{ref:s})})}));function y(e){if(!e)return{x:0,y:0};if(function(e){return"touchend"===e.type||"touchstart"===e.type}(e))return{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(function(e){if("clientX"in e&&"clientY"in e)return 0!==e.clientX&&0!==e.clientY;return!1}(e))return{x:e.clientX,y:e.clientY};const t=e.target.getBoundingClientRect();return{x:t.x+t.width/2,y:t.y+t.height}}var v=n(49355),b=n(27102);const S=({children:e,menu:t,action:n="toggle",trigger:r="click",renderInline:s=!1,offset:a=[0,8],placement:o="bottom-start",preventScrollingWhileOpen:d=!0,onShow:p,onHide:m,onClickOutside:h,snapshotReferenceElementPositionWhileOpen:f=!1,autoUpdate:g=!0,interactive:E=!0})=>{const S=(0,u.Oj)(),A=(0,u.fd)(),C=(0,v.M)({action:n,menu:t}),T=(0,b.ZY)();(0,i.useEffect)((()=>{g&&S({type:"update",menu:t})}),[g,S,t]);const I=(0,i.useCallback)((()=>{S({type:"close"})}),[S]),O=(0,i.useMemo)((()=>A.triggerElement&&f?A.triggerElement.getBoundingClientRect():null),[A.isOpen]);return(0,l.jsx)(c,{onClickOutside:(e,t)=>{h?h(I,e,t):I()},placement:o,trigger:r,offset:a,preventScrollingWhileOpen:d,triggerRef:A.triggerElement??void 0,appendTo:!T||s?void 0:()=>T.body,isOpen:A.isOpen,position:y(A.event),menu:A.menu,onShow:p,onHide:(...e)=>{I(),m?.(...e)},getReferenceClientRect:O?()=>O:null,interactive:E,children:(0,l.jsx)(_,{isOpen:A.isOpen,handleContextMenu:C,trigger:r,children:e})})},A=e=>(0,l.jsx)(u.SF,{children:(0,l.jsx)(S,{...e})})},65462:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var i=n(26639),r=n(86070);const s=e=>(0,r.jsx)(i.t,{...e,action:"open",trigger:"right-click"})},10994:(e,t,n)=>{"use strict";n.d(t,{W:()=>m});var i=n(30758),r=n(97500),s=n.n(r),a=n(17763),o=n(51414),l=n(78464),c=n(48486),u=n(35163),d=n(31854),p=n(86070);const m=({children:e,onClose:t,getInitialFocusElement:n,onFocusVerticalItem:r,...m})=>{const h=(0,a.Oj)(),f=(0,i.useCallback)((()=>{t?.(),h({type:"close"})}),[h,t]),g=(0,i.useCallback)((e=>{h({type:"modifierKeyHeld",value:e.altKey||e.ctrlKey})}),[h]);return(0,p.jsx)(l.s,{onError:e=>(0,u.Jy)(e,"Menu"),children:(0,p.jsx)(o.R,{children:(0,p.jsx)(c.e,{className:s()("encore-dark-theme","encore-layout-themes",d.A.menu),onClose:f,onKeyDown:g,onKeyUp:g,getInitialFocusElement:n,onFocusVerticalItem:r,...m,children:e})})})}},41874:(e,t,n)=>{"use strict";n.d(t,{y:()=>c});var i=n(97500),r=n.n(i),s=n(49971),a=n(88091),o=n(31854),l=n(86070);const c=({children:e,divider:t})=>(0,l.jsx)(a.u,{className:o.A.menuItem,children:(0,l.jsx)(s.Z,{className:r()(o.A.menuHeading,"ellipsis-one-line",{[o.A.dividerBefore]:"before"===t,[o.A.dividerAfter]:"after"===t}),variant:"finaleBold",dir:"auto","aria-hidden":!0,children:e})})},12864:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var i=n(30758),r=n(97500),s=n.n(r),a=n(75943),o=n(49971),l=n(17763),c=n(36646),u=n(39464),d=n(88091),p=n(31854),m=n(86070);const h=({children:e,disabled:t,divider:n,onClick:r=(()=>{}),leadingIcon:h,trailingIcon:f,elementRef:g,CheckedIcon:E=a.i,autoClose:_=!0,innerClassName:y,semanticColor:v,...b})=>{const S=(0,l.Oj)(),A=(0,i.useRef)(null),C=(0,i.useCallback)((e=>{A.current=e,g&&g(e)}),[g]),{handleMouseEnter:T,handleMouseMove:I,handleMouseLeave:O,handleFocus:w}=(0,c.t)(A),N=(0,i.useCallback)((e=>{e.stopPropagation(),r(e),!t&&_&&S({type:"close"})}),[r,t,_,S]),R=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,m.jsx)(d.u,{className:p.A.menuItem,children:(0,m.jsxs)(u.H,{className:s()(p.A.menuItemButton,{[p.A.disabled]:t,[p.A.dividerBefore]:"before"===n||"both"===n,[p.A.dividerAfter]:"after"===n||"both"===n}),"aria-disabled":t,onClick:N,onFocus:w,onMouseEnter:T,onMouseMove:I,onMouseLeave:O,onContextMenu:R,ref:C,...b,children:[h,(0,m.jsx)(o.Z,{variant:"mesto",dir:"auto",className:s()("ellipsis-one-line",p.A.menuItemLabel,y),semanticColor:v,children:e}),f,b["aria-checked"]&&E&&(0,m.jsx)(E,{iconSize:16,semanticColor:v})]})})}},32032:(e,t,n)=>{"use strict";n.d(t,{g:()=>g});var i=n(30758),r=n(3956),s=n(49971),a=n(36072),o=n(97500),l=n.n(o),c=n(36646),u=n(39464),d=n(88091),p=n(31854),m=n(86070);const h=(0,i.forwardRef)((function({children:e,disabled:t=!1,onClick:n=(()=>{}),setIsOpen:r,onTouchStart:s,outerRef:a,divider:o},h){const{handleMouseEnter:f,handleMouseMove:g,handleMouseLeave:E,handleFocus:_}=(0,c.t)(a,r),y=(0,i.useCallback)((e=>{e.stopPropagation(),n(e)}),[n]),v=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,m.jsx)(d.u,{className:p.A.menuItem,children:(0,m.jsx)(u.H,{className:l()(p.A.menuItemButton,{[p.A.disabled]:t,[p.A.dividerBefore]:"before"===o,[p.A.dividerAfter]:"after"===o}),onClick:y,onFocus:_,onMouseEnter:f,onMouseMove:g,onMouseLeave:E,onTouchStart:s,onContextMenu:v,ref:h,role:"menuitem",children:e})})}));var f=n(33689);const g=({displayText:e,depth:t=1,children:n,divider:o,placement:l="right-start",onOpenChange:c,onClick:u,disabled:d,leadingIcon:g,menuBoundary:E=document.body})=>{const[_,y]=(0,i.useState)(!1),v=(0,i.useRef)(null),b=(0,i.useCallback)((()=>{y((e=>!e))}),[]),S=(0,i.useRef)(c);return S.current=c,(0,i.useEffect)((()=>S.current?.(_)),[_]),(0,m.jsx)(r.Ay,{render:()=>(0,m.jsx)(f.Q,{className:p.A.menu,depth:t,children:n}),offset:[0,0],interactive:!0,visible:_,arrow:!1,animation:!1,placement:l,popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0,padding:10}},{name:"flip",options:{boundary:E}}]},children:(0,m.jsxs)(h,{divider:o,setIsOpen:y,onTouchStart:b,ref:v,outerRef:v,onClick:u,disabled:d,children:[(0,m.jsxs)("div",{className:p.A.subMenuLeading,children:[g,(0,m.jsx)(s.Z,{variant:"mesto",dir:"auto",className:"ellipsis-one-line",children:e})]}),(0,m.jsx)("span",{children:(0,m.jsx)(a.J,{className:p.A.subMenuIcon,iconSize:16,"aria-hidden":"true"})})]})})}},17763:(e,t,n)=>{"use strict";n.d(t,{Oj:()=>c,SF:()=>d,fd:()=>o});var i=n(30758),r=n(86070);const s={isOpen:!1,modifierKeyHeld:!1,isTouching:!1,menu:null,event:null,triggerElement:null},a=(0,i.createContext)(s);function o(){const e=i.useContext(a);if(void 0===e)throw new Error("useContextMenuState must be used within a ContextMenuProvider");return e}const l=(0,i.createContext)((()=>{}));function c(){const e=i.useContext(l);if(void 0===e)throw new Error("useContextMenuDispatch must be used within a ContextMenuProvider");return e}function u(e,t){switch(t.type){case"open":return{...e,menu:t.menu,isOpen:!0,event:t.event,triggerElement:t.triggerElement};case"toggle":return{...e,isOpen:!e.isOpen,menu:e.isOpen?null:t.menu,event:t.event,triggerElement:t.triggerElement};case"modifierKeyHeld":return{...e,modifierKeyHeld:t.value};case"touch":return{...e,isTouching:t.value};case"close":return{...s};case"update":return{...e,menu:t.menu};default:throw new Error("Unknown action recieved!")}}const d=({children:e})=>{const[t,n]=(0,i.useReducer)(u,s);return(0,r.jsx)(l.Provider,{value:n,children:(0,r.jsx)(a.Provider,{value:t,children:e})})}},51414:(e,t,n)=>{"use strict";n.d(t,{P:()=>a,R:()=>l});var i=n(30758);var r=n(52162),s=n(86070);const a=(0,i.createContext)({registerCloseCallback:()=>{},closeToDepth:()=>{},isOnPathToSubmenu:()=>!1}),o=()=>()=>{},l=({children:e})=>{const t=(0,i.useRef)([]),n=(0,i.useRef)(),l=o(),c=(0,i.useCallback)(((e,i)=>{t.current.push(e),n.current=i}),[]),u=(0,i.useCallback)((e=>{for(n.current=void 0;t.current.length>e;){const e=t.current.pop();e&&e(!1)}}),[]),d=(0,i.useCallback)(((e,t)=>{const i=document.getElementById(r.v),s=!t&&n.current?.x===e.x&&n.current?.y===e.y;if(!n.current||!i||s)return!1;const a=Array.from(i.querySelectorAll('[role="menu"]')).sort(((e,t)=>parseInt(e.getAttribute("data-depth")||"0",10)-parseInt(t.getAttribute("data-depth")||"0",10))).pop();if(!a)return!1;const o=a.getBoundingClientRect();let l=o.left;n.current.x>o.right&&(l=o.right);const c=n.current,u={x:l,y:o.top},d={x:l,y:o.bottom},p={x:u.x-c.x,y:u.y-c.y},m={x:d.x-c.x,y:d.y-c.y},h=(e,t)=>e.x*t.y-e.y*t.x,f=(h(e,m)-h(c,m))/h(p,m),g=-1*(h(e,p)-h(c,p))/h(p,m),E=f>0&&g>0&&f+g<1||Math.abs(e.x-c.x)+Math.abs(e.y-c.y)<=1;return E}),[l]),p=(0,i.useMemo)((()=>({registerCloseCallback:c,closeToDepth:u,isOnPathToSubmenu:d})),[c,u,d]);return(0,s.jsx)(a.Provider,{value:p,children:e})}},49355:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var i=n(30758),r=n(17763);const s=({action:e,menu:t})=>{const n=(0,r.Oj)();return(0,i.useCallback)(((i,r)=>{i.persist(),i.preventDefault(),n({type:e,event:i,triggerElement:i.currentTarget,menu:r||t})}),[t,n,e])}},35897:(e,t,n)=>{"use strict";n.d(t,{r:()=>p});var i=n(30758),r=n(62411),s=n(64442),a=n(31417),o=n(6045),l=n(12864),c=n(44672),u=n(86070);const d=({divider:e})=>{const t=(0,r.wA)(),n=(0,i.useCallback)((()=>{t((0,o.$c)())}),[t]);return(0,u.jsx)(l.D,{role:"menuitem",divider:e,onClick:n,leadingIcon:(0,u.jsx)(s.G,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("context-menu.about-recommendations")})},p=i.memo((function(e){return(0,u.jsx)(c.pZ,{value:"about-recommendations",children:(0,u.jsx)(d,{...e})})}))},10285:(e,t,n)=>{"use strict";n.d(t,{K:()=>C});var i=n(30758),r=n(84116),s=n(91008),a=n(31417),o=n(12864),l=n(57776);n(59147);const c=new l.l("queryAlbumTrackUris","query","a2a17981f8439ca1798f56260277d9d7800ec0ca7040053b564e0f975d8aa344",null);var u=n(89402),d=n(44672),p=n(81834),m=n(87182),h=n(58685),f=n(608),g=n(29074),E=n(33329),_=n(86070);const y=e=>({uri:e,uid:null}),v=({uris:e,divider:t,spec:n,logger:s})=>{const l=(0,u.W)(),c=(0,m.z)(),d=(0,i.useCallback)((()=>{let t;if(l({intent:"add-to-queue",type:"click"}),n&&s){const i=1===e.length?((e,t,n)=>t.logInteraction(e.addToQueueButtonFactory().hitAddItemToQueue({itemToAddToQueue:n})))(n,s,e[0]):((e,t,n)=>t.logInteraction(e.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:n})))(n,s,e.length);t=i.interactionId}c.addToQueue(e.map(y),{interactionId:t})}),[l,c,e,n,s]);return(0,_.jsx)(o.D,{role:"menuitem",divider:t,onClick:d,leadingIcon:(0,_.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})};function b(e){return"track"in e&&"string"==typeof e.track.uri}const S=({uris:e,spec:t,logger:n})=>{const s=(0,u.W)(),l=(0,m.z)(),{request:d}=(0,i.useContext)(p.j),h=(0,i.useCallback)((async()=>{s({intent:"add-to-queue",type:"click"}),t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}));const i=await d(c,{uri:e[0],offset:0,limit:100});if("Album"!==i?.data?.albumUnion.__typename)return;const r=(i?.data.albumUnion.tracksV2.items||[]).filter(b).map((e=>e.track.uri));l.addToQueue(r.map(y))}),[n,s,l,d,t,e]);return(0,_.jsx)(o.D,{role:"menuitem",onClick:h,leadingIcon:(0,_.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})},A=({uris:e,spec:t,logger:n})=>{const s=(0,u.W)(),l=(0,m.z)(),c=(0,g.m)(),d=(0,i.useCallback)((async()=>{s({intent:"add-to-queue",type:"click"});const i=(await c.getContents(e[0],{limit:100})).items.filter((e=>!!e)).map((e=>e.uri));t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:i.length})),l.addToQueue(i.map(y))}),[n,s,l,c,t,e]);return(0,_.jsx)(o.D,{role:"menuitem",onClick:d,leadingIcon:(0,_.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-to-queue")})},C=i.memo((function(e){const{uri:t}=(0,f.f)(),n={...e,logger:(0,E.s)()},i=(0,h.o)((e=>(e?.restrictions?.disallowAddToQueueReasons||[]).length>0));if(!t||i)return null;let r=(0,_.jsx)(v,{...n});return(0,s._Tv)(e.uris[0])?r=(0,_.jsx)(S,{...n}):(0,s.tbX)(e.uris[0])&&(r=(0,_.jsx)(A,{...n})),(0,_.jsx)(d.pZ,{value:"add-to-queue",children:r})}))},59521:(e,t,n)=>{"use strict";n.d(t,{m:()=>f});var i=n(30758),r=n(34475),s=n(31417),a=n(12864),o=n(17763),l=n(90360),c=n(6837),u=n(44672),d=n(33329),p=n(33234),m=n(86070);const h=({uri:e,sharingInfo:t,displayText:n,divider:u,isPrivatePlaylist:h=!1,spec:f,playlistType:g})=>{const{modifierKeyHeld:E}=(0,o.fd)(),{onCopyLink:_}=(0,c.L)({sharingInfo:t,uri:e,interactionData:{intent:"share",type:"click"},playlistType:g}),y=(0,d.s)(),{onCopyLink:v}=(0,l.J)({uri:e,permissionLevel:"VIEWER"}),b=(0,i.useCallback)((()=>{E?(0,p.l)(e):h?v():_(),y.logInteraction(f.copyLinkButtonFactory().hitCopyToClipboard())}),[E,h,y,f,e,v,_]);return(0,m.jsx)(a.D,{role:"menuitem",divider:u,onClick:b,leadingIcon:(0,m.jsx)(r._,{semanticColor:"textSubdued",size:"small"}),children:E?s.Ru.get("context-menu.copy-spotify-uri"):n})},f=i.memo((function(e){return(0,m.jsx)(u.pZ,{value:"copy-link",children:(0,m.jsx)(h,{...e})})}))},199:(e,t,n)=>{"use strict";n.d(t,{u:()=>M,d:()=>B});var i=n(30758),r=n(1820),s=n(46607),a=n(31417),o=n(12864),l=n(48014),c=n(32032),u=n(422),d=n(50912),p=n(42156),m=n(16273),h=n(50486),f=n(14343),g=n(39566),E=n(38501),_=n(15420),y=n(35035);const v=864e5,b=5e3;function S(e,t=!1){const n=(0,g.n)(),i=(0,f.NC)(E.z53,{loadingValue:!1}),r=(0,_.B)(),s=n&&i&&r.getCapabilities().canRemoteDownload,a=(0,m.jE)(),{data:o}=(0,h.I)({queryKey:["useOfflineContextForDevices",e],queryFn:()=>r.getContextForDevices(e),gcTime:v,staleTime:0,refetchInterval:t&&b,enabled:s,placeholderData:()=>a.getQueriesData({queryKey:["useOfflineContextForDevices"]})?.find((([e,t])=>!!t))?.[1]?.map((e=>({...e,contextDownloadAvailability:y.kw.NO,contextDownloadPercentage:0})))});return s?o??[]:[]}var A=n(53133),C=n(33329),T=n(85907),I=n(86070);function O(e){switch(e){case y.kw.NO:return(0,I.jsx)(s.i,{size:"small",semanticColor:"textBase"});case y.kw.WAITING:case y.kw.DOWNLOADING:return(0,I.jsx)(u.E,{semanticColor:"textSubdued",children:(0,I.jsx)(d.C,{size:16})});case y.kw.YES:return(0,I.jsx)(r.F,{size:"small",semanticColor:"textBrightAccent"});default:return(0,T.k)(e),null}}const w=({name:e,deviceId:t,cacheId:n,type:r,deviceType:s,clientPlatform:c,contextDownloadAvailability:u,isLocal:d,uri:h,spec:f,addDownloadPrerequisites:g,localDownloadAvailability:E})=>{const v=(0,C.s)(),b=(0,_.B)(),{enqueueSnackbar:S}=(0,A.d)(),T=function(){const e=(0,m.jE)();return(0,i.useCallback)((t=>e.invalidateQueries({queryKey:["useOfflineContextForDevices",t]})),[e])}(),w=(0,l.V)(),N=(0,p.tf)(r),R=d?E:u,P=R!==y.kw.NO,L=R===y.kw.YES,D={remoteClientPlatform:c.toString(),remoteDeviceId:t,remoteDeviceType:s.toString()};return(0,I.jsx)(o.D,{onClick:async()=>{let i;P?(w(h,d?void 0:{deviceId:t,cacheId:n,deviceName:e,clientPlatform:c,deviceType:s}),i=L?d?f.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:h}):f.remoteDeviceDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:h,...D}):d?f.downloadButtonFactory().hitStopDownload({itemToStopDownload:h}):f.remoteDeviceDownloadButtonFactory().hitStopDownloadToRemoteDevice({itemToStopDownload:h,...D})):(g(),b.addDownload(h,{deviceId:t,cacheId:n}),i=d?f.downloadButtonFactory().hitDownload({itemToDownload:h}):f.remoteDeviceDownloadButtonFactory().hitDownloadToRemoteDevice({itemToDownload:h,...D}),S(a.Ru.get("web-player.remote-downloads.feedback.downloading-to-remote-device",e))),T(h),v.logInteraction(i)},"aria-checked":P,role:"menuitemcheckbox",leadingIcon:(0,I.jsx)(N,{iconSize:16,semanticColor:"textSubdued"}),trailingIcon:O(R),CheckedIcon:null,children:d?a.Ru.get("web-player.remote-downloads.context-menu.this-computer"):e})};var N=n(24533);var R=n(37178),P=n(44672),L=n(13787);const D=({uri:e,divider:t,addToLibrary:n=!0,showUri:r,canDownload:o,spec:l})=>{const u=(0,C.s)(),[d,p]=(0,i.useState)(!1),m=S(e,d),h=(0,R.W)(),f=function(e,t=!0,n){const[r,s]=(0,N.A)(e),[a,o]=(0,N.A)(n);return(0,i.useCallback)((()=>{!r&&t?s(!0):!t&&n&&(a||o(!0))}),[t,r,a,s,o,n])}(e,n,r),{availability:g}=(0,L.$)(e,o),E=(0,i.useMemo)((()=>l.downloadToDeviceSubmenuFactory()),[l]);return(0,I.jsx)(c.g,{displayText:a.Ru.get("contextmenu.download"),depth:1,placement:h?"left-start":"right-start",divider:t,onOpenChange:e=>{p(e),e&&u.logImpression(E.impression())},leadingIcon:(0,I.jsx)(s.i,{semanticColor:"textSubdued",size:"small"}),children:(0,I.jsx)(P.pZ,{value:"download",children:m.map((t=>(0,I.jsx)(w,{uri:e,spec:E,addDownloadPrerequisites:f,localDownloadAvailability:g,...t},t.cacheId)))})})};var k=n(89402);const x=({uri:e,divider:t,addToLibrary:n=!0,showUri:c,canDownload:u,spec:d})=>{const p=(0,k.W)(),m=(0,C.s)(),[h,f]=(0,N.A)(e),[g,E]=(0,N.A)(c),{capability:_,availability:v,addDownload:b}=(0,L.$)(e,u),S=(0,l.V)(),A=(0,i.useCallback)((()=>{if(_===y.vs.NO_PERMISSION)return;let t;p({targetUri:e,intent:v!==y.kw.NO?"remove-from-download":"download",type:"click"}),v!==y.kw.NO?(S(e),t=d.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e})):(!h&&n?f(!0):!n&&c&&(g||E(!0)),b(),t=d.downloadButtonFactory().hitDownload({itemToDownload:e})),m.logInteraction(t)}),[_,v,b,S,h,m,p,f,d,e,n,c,g,E]);return _===y.vs.NO_CAPABILITY||_===y.vs.NO_PERMISSION_HIDE?null:(0,I.jsx)(o.D,{divider:t,onClick:A,role:"menuitemcheckbox",disabled:_===y.vs.NO_PERMISSION,leadingIcon:v!==y.kw.NO?(0,I.jsx)(r.F,{semanticColor:"textBrightAccent",size:"small"}):(0,I.jsx)(s.i,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.download")})},U=e=>{const t=S(e.uri).some((({isLocal:e})=>!e))?D:x;return(0,I.jsx)(t,{...e})},M=i.memo((function(e){return(0,I.jsx)(P.pZ,{value:"download-episode",children:(0,I.jsx)(U,{...e})})})),B=i.memo((function(e){return(0,I.jsx)(P.pZ,{value:"download-playlist",children:(0,I.jsx)(U,{...e})})}))},56349:(e,t,n)=>{"use strict";n.d(t,{ET:()=>S,T5:()=>b,jK:()=>A});var i=n(30758),r=n(62411),s=n(91488),a=n(45415),o=n(78350),l=n(95089),c=n(36749),u=n(31417),d=n(98293),p=n(12864),m=n(89402),h=n(39566),f=n(44672),g=n(20784),E=n(24533),_=n(21549),y=n(86070);const v=i.memo((function({uri:e,divider:t,saveSuccess:n,removeSuccess:s,removeLabel:a,saveLabel:o,useDialog:l=!1,initialState:u=!1,leadingIconAdd:f,leadingIconRemove:v}){const b=(0,r.wA)(),S=(0,m.W)(),A=!(0,h.n)(),[C,T]=(0,E.A)(e,u),I=(0,g.f)(),{spec:O,logger:w}=(0,_.r)(c.F,{data:{uri:e}}),N=(0,i.useCallback)((()=>{const t=O.followButtonFactory();l&&C?b((0,d.aw)(e)):(S({targetUri:e,intent:C?"remove-from-library":"add-to-library",type:"click"}),T(!C),C?(w.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),s&&b(s(e))):(w.logInteraction(t.hitFollow({itemToBeFollowed:e})),n&&b(n(e))))}),[O,l,C,b,e,S,T,w,s,n]);return(0,y.jsx)(p.D,{role:"menuitem",divider:t,disabled:A&&!I?.getCapabilities().canModifyOffline,onClick:N,leadingIcon:C?v:f,children:C?a:o})})),b=i.memo((function({uri:e,divider:t,useDialog:n,initialState:i=!1}){return(0,y.jsx)(f.pZ,{value:"follow-artist",children:(0,y.jsx)(v,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(s.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(a.M,{semanticColor:"textBrightAccent",size:"small"})})})})),S=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1}){return(0,y.jsx)(f.pZ,{value:"follow-playlist",children:(0,y.jsx)(v,{uri:e,divider:t,removeLabel:u.Ru.get("contextmenu.remove-from-library"),saveLabel:u.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(o.P,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(l.k,{semanticColor:"textBrightAccent",size:"small"})})})})),A=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1}){return(0,y.jsx)(f.pZ,{value:"follow-show",children:(0,y.jsx)(v,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:n,initialState:i,leadingIconAdd:(0,y.jsx)(s.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,y.jsx)(a.M,{semanticColor:"textBrightAccent",size:"small"})})})}))},47041:(e,t,n)=>{"use strict";n.d(t,{Jn:()=>h,V9:()=>f,du:()=>g,fe:()=>E});var i=n(90694),r=n(81162),s=n(58920),a=n(17978),o=n(91008),l=n(31417),c=n(12864),u=n(37410),d=n(66387),p=n(86070);const m=({uri:e,queryParams:t="",displayText:n,divider:i,leadingIcon:r})=>{const s=(0,u.W)({type:"link",uri:e}),a=(0,o.o_h)(e),l=`${(0,o.o_h)(a)?.toURLPath(!0)||""}${t}`,m=s?(0,d.hF)(l):l;return(0,p.jsx)(c.D,{role:"menuitem",divider:i,to:m,leadingIcon:r,children:n})},h=({uri:e,contextUri:t,divider:n,displayText:r=l.Ru.get("contextmenu.go-to-artist"),hideLeadingIcon:s=!1})=>e!==t?(0,p.jsx)(m,{divider:n,uri:e,displayText:r,leadingIcon:!s&&(0,p.jsx)(i.r,{semanticColor:"textSubdued",size:"small"})}):null,f=({uri:e,contextUri:t,highlightedUri:n,divider:i})=>e!==t?(0,p.jsx)(m,{divider:i,uri:e,displayText:l.Ru.get("contextmenu.go-to-album"),queryParams:`?highlight=${n}`,leadingIcon:(0,p.jsx)(r.I,{semanticColor:"textSubdued",size:"small"})}):null,g=({uri:e,contextUri:t,divider:n})=>e!==t?(0,p.jsx)(m,{divider:n,uri:e,displayText:l.Ru.get("context-menu.episode-page-link"),leadingIcon:(0,p.jsx)(s.L,{semanticColor:"textSubdued",size:"small"})}):null,E=({uri:e,contextUri:t,divider:n})=>e!==t?(0,p.jsx)(m,{divider:n,uri:e,displayText:l.Ru.get("contextmenu.go-to-audiobook"),leadingIcon:(0,p.jsx)(a.l,{semanticColor:"textSubdued",size:"small"})}):null},20772:(e,t,n)=>{"use strict";n.d(t,{z:()=>T});var i=n(30758),r=n(85387),s=n(422),a=n(43318),o=n(91008),l=n(31417),c=n(12864),u=n(97500),d=n.n(u),p=n(88091),m=n(31854),h=n(86070);const f=({children:e,disabled:t,className:n})=>(0,h.jsx)(p.u,{className:m.A.menuItem,children:(0,h.jsx)("div",{role:"menuitem","aria-disabled":t,className:d()(m.A.menuItemStatic,n),children:e})});var g=n(89402),E=n(6102),_=n(39566),y=n(44672),v=n(72671);var b=n(98822),S=n(33329);const A="aDmzyffYDLrlNO5zDfIA",C=({uri:e,displayText:t,divider:n,spec:u})=>{const d=(0,r.Zp)(),p=!(0,_.n)(),m=(0,g.W)(),y=(0,b.A)(),C=(0,E.p)(),T=(0,S.s)(),I=(0,i.useCallback)((async()=>{m({targetUri:e,intent:"go-to-radio",type:"click"});const t=await((e,t)=>e.build().withHost(v.mz).withPath(`/seed_to_playlist/${t}`).withQueryParameters({"response-format":"json"}).withoutMarket().withEndpointIdentifier("/seed_to_playlist/{uri}").send())(y,e),[n]=t.body.mediaItems,i=(0,o.o_h)(n.uri).toURLPath(!0);u&&T.logInteraction(u.navigateButtonFactory({identifier:"go-to-radio"}).hitUiNavigate({destination:i})),d(i)}),[m,e,u,y,d,T]);if(!C){const e=l.Ru.get("contextmenu.go-to-radio-dsa");return(0,h.jsxs)(f,{disabled:!0,className:A,children:[(0,h.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:t}),(0,h.jsx)(s.E,{variant:"marginal",semanticColor:"textSubdued",as:"p",children:e})]})}return(0,h.jsx)(c.D,{role:"menuitem",divider:n,disabled:p,onClick:I,leadingIcon:(0,h.jsx)(a.v,{semanticColor:"textSubdued",size:"small"}),children:t})},T=i.memo((function(e){return(0,h.jsx)(y.pZ,{value:"go-to-radio",children:(0,h.jsx)(C,{...e})})}))},34139:(e,t,n)=>{"use strict";n.d(t,{x:()=>g});var i=n(30758),r=n(97896),s=n(12864),a=n(84029),o=n(80870),l=n(89402),c=n(11595),u=n(44672),d=n(87182),p=n(24620),m=n(33329),h=n(86070);const f=({uri:e,divider:t,spec:n,type:u})=>{const f=(0,l.W)(),g=(0,i.useContext)(a.wv),E=(0,d.z)().getState(),_=(0,o.n)(u),y=(0,m.s)(),{getShareUri:v}=(0,c.X)(),b=(0,i.useCallback)((async()=>{const t=await v(e);f({intent:"share",type:"click"}),y.logInteraction(n.shareEmbedButtonFactory({uri:e}).hitUiReveal());const i=E?.item?.uri,r=(0,p.s)(E);g({type:"open",uri:t,currentTrackUri:i,currentPosition:r,entityType:u})}),[f,y,n,e,E,u,g,v]);return(0,h.jsx)(s.D,{role:"menuitem",divider:t,onClick:b,leadingIcon:(0,h.jsx)(r.D,{semanticColor:"textSubdued",size:"small"}),children:_})},g=i.memo((function(e){return(0,h.jsx)(u.pZ,{value:"ewg-open",children:(0,h.jsx)(f,{...e})})}))},21489:(e,t,n)=>{"use strict";n.d(t,{q:()=>y});var i=n(30758),r=n(62411),s=n(3074),a=n.n(s),o=n(87560),l=n(11446),c=n(31417),u=n(12864),d=n(29195),p=n(89402),m=n(44672),h=n(44577),f=n(33329),g=n(86070);function E(){let e=a().create().hex;return e=e.replace(/-/g,""),e.substr(0,16)}const _=i.memo((function({uri:e,context:t,divider:n,spec:r}){const s=(0,d.vh)(),a=(0,p.W)(),m=(0,f.s)(),h=(0,i.useCallback)((()=>{const n=`${e}${t?`?context=${encodeURIComponent(t)}`:""}`;a({targetUri:n,intent:"open-in-app",type:"click"}),m.logInteraction(r.openInDesktopButtonFactory().hitOpenApp({destination:e,app:"desktop"})),s.send((0,l.N)({link:window.location.href,entity_uri:n,source:"open-in-app",deeplink_session_id:E()})),window.open(n)}),[e,t,a,m,r,s]);return(0,g.jsx)(u.D,{role:"menuitem",divider:n,onClick:h,leadingIcon:(0,g.jsx)(o.D,{semanticColor:"textSubdued",size:"small"}),children:c.Ru.get("contextmenu.open_desktop_app")})})),y=i.memo((function(e){const{isPWA:t,isDesktop:n}=(0,r.d4)((e=>e.platform));return t||n||(0,h.g)()?null:(0,g.jsx)(m.pZ,{value:"open-in-app",children:(0,g.jsx)(_,{...e})})}))},67865:(e,t,n)=>{"use strict";n.d(t,{k:()=>y});var i=n(30758),r=n(95420),s=n(44778),a=n(31417),o=n(12864),l=n(3602),c=n(44672),u=n(20817),d=n(26184),p=n(20784),m=n(33329),h=n(7307),f=n(85907),g=n(86070);const E=(e,t,n)=>{switch(t){case h.c.FOLDER:return e?a.Ru.get("contextmenu.unpin-folder"):a.Ru.get("contextmenu.pin-folder");case h.c.PLAYLIST:case h.c.LIKED_SONGS:case h.c.YOUR_EPISODES:case h.c.LOCAL_FILES:return(0,l.c0)(n)?e?a.Ru.get("contextmenu.unpin-dj"):a.Ru.get("contextmenu.pin-dj"):e?a.Ru.get("contextmenu.unpin-playlist"):a.Ru.get("contextmenu.pin-playlist");case h.c.ALBUM:return e?a.Ru.get("contextmenu.unpin-album"):a.Ru.get("contextmenu.pin-album");case h.c.ARTIST:return e?a.Ru.get("contextmenu.unpin-artist"):a.Ru.get("contextmenu.pin-artist");case h.c.SHOW:return e?a.Ru.get("contextmenu.unpin-show"):a.Ru.get("contextmenu.pin-show");case h.c.AUDIOBOOK:return e?a.Ru.get("contextmenu.unpin-audiobook"):a.Ru.get("contextmenu.pin-audiobook");case h.c.PRE_RELEASE_ALBUM:return e?a.Ru.get("contextmenu.unpin-prerelease-album"):a.Ru.get("contextmenu.pin-prerelease-album");case h.c.PRE_RELEASE_BOOK:return e?a.Ru.get("contextmenu.unpin-prerelease-audiobook"):a.Ru.get("contextmenu.pin-prerelease-audiobook");case h.c.CONCERT:return e?a.Ru.get("contextmenu.unpin-event"):a.Ru.get("contextmenu.pin-event");default:return(0,f.k)(t),""}},_=({uri:e,canPin:t,isPinned:n,type:a,divider:l,spec:c})=>{const h=(0,m.s)(),f=(0,p.f)(),_=(0,i.useCallback)((()=>{t===u.oT.NO_IN_FOLDER?f.getEvents().emit(d.UV.UPDATE_PIN_ERROR,{reason:d.uL.NO_PIN_IN_FOLDER,uri:e}):n?(f.unpin(e),c&&h.logInteraction(c.pinButtonFactory().hitUnpinItem({itemToUnpin:e}))):(f.pin(e),c&&h.logInteraction(c.pinButtonFactory().hitPinItem({itemToPin:e})))}),[t,f,e,n,h,c]);return(0,g.jsx)(o.D,{role:"menuitem",divider:l,onClick:_,leadingIcon:n?(0,g.jsx)(r.H,{semanticColor:"textBrightAccent",size:"small"}):(0,g.jsx)(s.z,{semanticColor:"textSubdued",size:"small"}),children:E(n,a,e)})},y=i.memo((function(e){return(0,g.jsx)(c.pZ,{value:"pin-action",children:(0,g.jsx)(_,{...e})})}))},66251:(e,t,n)=>{"use strict";n.d(t,{R:()=>m});var i=n(30758),r=n(62411),s=n(17918),a=n(84287),o=n(36749),l=n(98293),c=n(12864),u=n(39566),d=n(21549),p=n(86070);const m=i.memo((function({uri:e,rateLabel:t,metadata:n}){const m=!(0,u.n)(),h=(0,r.wA)(),{spec:f,logger:g}=(0,d.r)(o.F,{data:{uri:e}}),E=(0,i.useCallback)((async()=>{const t=f.rateButtonFactory();g.logInteraction(t.hitUiReveal()),h((0,l.eH)(e,n))}),[h,g,n,f,e]),_=n?.rating?.rating;return(0,p.jsx)(c.D,{role:"menuitem",disabled:m,onClick:E,leadingIcon:_?(0,p.jsx)(s.j,{size:"small",semanticColor:"textSubdued"}):(0,p.jsx)(a.a,{size:"small",semanticColor:"textSubdued"}),children:t})}))},20211:(e,t,n)=>{"use strict";n.d(t,{D:()=>f});var i=n(30758),r=n(36558),s=n(91008),a=n(31417),o=n(12864),l=n(89402),c=n(44672),u=n(29074),d=n(11893),p=n(31),m=n(86070);const h=e=>{const t=(0,u.m)(),{removeItems:n}=(0,p.x)(e.playlistUri),{uris:s,uids:c,divider:h,playlistUri:f,removePlaylistItems:g=n,canBeRemoved:E}=e,_=(0,l.W)(),y=(0,d.J)(f),{hasUidsGeneratedFromIndicies:v}=t.getCapabilities(),b=(0,i.useCallback)((()=>{_({targetUri:f,intent:"playlisting",type:"click"});const e=s.map(((e,t)=>({uri:e,uid:c[t]||""})));g(e)}),[_,f,g,c,s]);return v&&!c.every((e=>Number.isInteger(Number(e))))?null:E||y?.canRemove?(0,m.jsx)(o.D,{role:"menuitem",divider:h,onClick:b,leadingIcon:(0,m.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.remove-from-playlist")}):null},f=i.memo((function(e){return(0,s.tbX)(e.playlistUri)?(0,m.jsx)(c.pZ,{value:"remove-from-playlist",children:(0,m.jsx)(h,{...e})}):null}))},40717:(e,t,n)=>{"use strict";n.d(t,{c:()=>h});var i=n(30758),r=n(36558),s=n(91008),a=n(31417),o=n(12864),l=n(89402),c=n(44672),u=n(87182),d=n(33329),p=n(86070);const m=({uids:e,uris:t,contextUri:n,divider:c,spec:m})=>{const h=(0,l.W)(),f=(0,u.z)(),g=(0,d.s)(),E=(0,i.useMemo)((()=>e.map(((e,n)=>({uid:e,uri:t[n]})))),[e,t]),_=(0,i.useCallback)((()=>{h({intent:"remove-from-queue",type:"click"}),g.logInteraction(m.removeFromQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length})),f.removeFromQueue(E)}),[h,g,m,t.length,f,E]);return n&&"queue"===(0,s.o_h)(n)?.id?(0,p.jsx)(o.D,{role:"menuitem",divider:c,onClick:_,leadingIcon:(0,p.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.remove-from-queue")}):null},h=i.memo((function(e){return(0,p.jsx)(c.pZ,{value:"remove-from-queue",children:(0,p.jsx)(m,{...e})})}))},69476:(e,t,n)=>{"use strict";n.d(t,{P:()=>v});var i=n(30758),r=n(38767),s=n(91008),a=n(71075),o=n(31417),l=n(12864),c=n(39566),u=n(10721),d=n(30157);var p=n(19862),m=n(44672),h=n(19329),f=n(28340),g=n(86931),E=n(33329),_=n(86070);const y=({uri:e,currentUserUri:t,canReportUser:n,divider:m,spec:y})=>{const[v,b]=(0,i.useState)(!1),S=(0,d.N)(u.u),A=(0,E.s)(),C=!(0,c.n)();(0,i.useEffect)((()=>{(0,s.tbX)(e)&&S.canReportPlaylist(e,t).then(b),(0,s.ecE)(e)&&b(!0),(0,s.APS)(e)&&b(!!n),((0,s.WB1)(e)||(0,a.gH)(e)||(0,s.eI1)(e))&&b(!0)}),[e,t,n,S]);const{openURLWithSessionTransfer:T}=(0,h.L)(),{isActive:I}=(0,f.P)({uri:e},{featureIdentifier:"context_menu"}),[O]=(0,g.S)(1e3,(t=>t.item?.uri===e)),w=(0,i.useCallback)((async()=>{if(!v)return;const t=await S.getReportURL(e,I?O:null);T(t),y&&A.logInteraction(y.reportButtonFactory().hitUiNavigate({destination:e}))}),[v,S,e,I,O,T,y,A]);return S.isURIReportable(e)&&e!==t?(0,_.jsx)(l.D,{role:"link",divider:m,disabled:!v||C,onClick:w,leadingIcon:(0,_.jsx)(r.Y,{semanticColor:"textSubdued",size:"small"}),trailingIcon:(0,_.jsx)(p.p,{size:"small"}),children:o.Ru.get("contextmenu.report")}):null},v=i.memo((function(e){return(0,_.jsx)(m.pZ,{value:"report",children:(0,_.jsx)(y,{...e})})}))},42213:(e,t,n)=>{"use strict";n.d(t,{N7:()=>y,TR:()=>_,tt:()=>b,zD:()=>v});var i=n(30758),r=n(62411),s=n(95089),a=n(78350),o=n(31417),l=n(98293),c=n(12864),u=n(89402),d=n(39566),p=n(44672),m=n(20784),h=n(24533),f=n(33329),g=n(86070);const E=i.memo((function({uri:e,divider:t,removeLabel:n,saveLabel:o,useDialog:p=!1,initialState:E=!1,spec:_}){const y=(0,r.wA)(),v=(0,u.W)(),b=!(0,d.n)(),[S,A]=(0,h.A)(e,E),C=(0,m.f)(),T=(0,f.s)(),I=(0,i.useCallback)((()=>{p&&S?y((0,l.aw)(e)):(v({targetUri:e,intent:S?"remove-from-library":"add-to-library",type:"click"}),A(!S),S?T.logInteraction(_.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e})):T.logInteraction(_.saveButtonFactory().hitLike({itemToBeLiked:e})))}),[p,S,y,e,v,A,T,_]);return(0,g.jsx)(c.D,{role:"menuitem",divider:t,disabled:b&&!C?.getCapabilities().canModifyOffline,onClick:I,leadingIcon:S?(0,g.jsx)(s.k,{semanticColor:"textBrightAccent",size:"small"}):(0,g.jsx)(a.P,{semanticColor:"textSubdued",size:"small"}),children:S?n:o})})),_=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,g.jsx)(p.pZ,{value:"save-track",children:(0,g.jsx)(E,{uri:e,divider:t,removeLabel:o.Ru.get("remove_from_your_liked_songs"),saveLabel:o.Ru.get("save_to_your_liked_songs"),useDialog:n,initialState:i,spec:r})})})),y=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,g.jsx)(p.pZ,{value:"save-episode",children:(0,g.jsx)(E,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-your-episodes"),saveLabel:o.Ru.get("contextmenu.save-to-your-episodes"),useDialog:n,initialState:i,spec:r})})})),v=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,g.jsx)(p.pZ,{value:"save-album",children:(0,g.jsx)(E,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,spec:r})})})),b=i.memo((function({uri:e,divider:t,useDialog:n=!1,initialState:i=!1,spec:r}){return(0,g.jsx)(p.pZ,{value:"save-book",children:(0,g.jsx)(E,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:n,initialState:i,spec:r})})}))},32381:(e,t,n)=>{"use strict";n.d(t,{i:()=>g});var i=n(30758),r=n(90680),s=n(98010),a=n(14343),o=n(31417),l=n(12864),c=n(48926),u=n(53133),d=n(38501),p=n(44672),m=n(33329),h=n(86070);const f=({spec:e,divider:t})=>{const[n,p]=(0,c.J)(),{enqueueSnackbar:f}=(0,u.d)(),g=e.canvasVideosFactory(),E=(0,m.s)(),_=(0,i.useCallback)((()=>{E.logInteraction(g.toggleCanvasVideosFactory().hitToggleState(n?{stateBeforeToggle:"show_canvas_video",stateAfterToggle:"show_static_artwork"}:{stateBeforeToggle:"show_static_artwork",stateAfterToggle:"show_canvas_video"})),n?(p(!1),f(o.Ru.get("contextmenu.looping-visuals-hide.feedback"))):(p(!0),f(o.Ru.get("contextmenu.looping-visuals-show.feedback")))}),[g,n,f,p,E]);return(0,a.NC)(d.yJ8)!==d.NtL.CONTROL?(0,h.jsx)(l.D,{role:"menuitem",onClick:_,divider:t,leadingIcon:n?(0,h.jsx)(r.d,{semanticColor:"textSubdued",size:"small"}):(0,h.jsx)(s.C,{semanticColor:"textSubdued",size:"small"}),children:n?o.Ru.get("contextmenu.looping-visuals-hide"):o.Ru.get("contextmenu.looping-visuals-show")}):null},g=i.memo((function(e){return(0,h.jsx)(p.pZ,{value:"add-to-existing",children:(0,h.jsx)(f,{...e})})}))},78305:(e,t,n)=>{"use strict";n.d(t,{I:()=>p});var i=n(30758),r=n(62411),s=n(68372),a=n(98293),o=n(12864),l=n(89402),c=n(44672),u=n(86070);const d=({uri:e,displayText:t,divider:n,ubiLogger:c,contextMenuSpec:d})=>{const p=(0,r.wA)(),m=(0,l.W)(),h=(0,i.useMemo)((()=>d.showCreditsFactory()),[d]),f=(0,i.useCallback)((async()=>{c.logInteraction(h.hitUiReveal()),m({targetUri:e,intent:"show-credits",type:"click"}),p((0,a.P0)(!0,e))}),[e,p,m,c,h]);return(0,u.jsx)(o.D,{role:"menuitem",divider:n,onClick:f,leadingIcon:(0,u.jsx)(s.L,{semanticColor:"textSubdued",size:"small"}),children:t})},p=i.memo((function(e){return(0,u.jsx)(c.pZ,{value:"show-credits",children:(0,u.jsx)(d,{...e})})}))},58033:(e,t,n)=>{"use strict";n.d(t,{o:()=>W});var i=n(30758),r=n(60623),s=n(91008),a=n(31417),o=n(12864),l=n(97500),c=n.n(l),u=n(32032),d=n(62411),p=n(89126),m=n(2963),h=n(44672),f=n(29074);function g(e){return e.isLoaded&&!e.isOwnedBySelf&&e.canAdd}var E=n(33329),_=n(13719),y=n(86070);const v=({uris:e,playlist:t,disabled:n,divider:r,spec:a,children:l})=>{const c=(0,f.m)(),u=(0,d.wA)(),h=(0,E.s)(),v=(0,i.useCallback)((async()=>{let n=e;if((0,s.tbX)(e[0])){n=(await c.getContents(e[0])).items.filter(_.P).map((e=>e.uri))}if(1===e.length){const n=a?.addToOtherPlaylistFactory().hitAddToPlaylist({playlist:t.uri,itemToBeAdded:e[0]});n&&h.logInteraction(n)}u((0,m.io)(t.uri,n))}),[h,a,e,u,t.uri,c]);return(0,y.jsx)(o.D,{role:"menuitem",divider:r,onClick:v,disabled:n,trailingIcon:g({isLoaded:t.isLoaded,isOwnedBySelf:t.isOwnedBySelf,canAdd:t.canAdd})?(0,y.jsx)(p.B,{size:"small"}):null,children:l??t.name})},b=i.memo((function(e){return(0,y.jsx)(h.pZ,{value:"add-to-existing",children:(0,y.jsx)(v,{...e})})}));var S=n(30493);const A=({uris:e,reference:t,displayText:n,divider:a,spec:l})=>{const{createPlaylistFromAlbum:c,createPlaylistFromTracks:u,createPlaylistFromPlaylist:d}=(0,S.A)(),p=(0,f.m)(),m=(0,E.s)(),h=(0,i.useCallback)((async()=>{let n;const i=null!==t?{after:t}:{before:"start"};if(n=(0,s._Tv)(e[0])?await c(e[0],i):(0,s.tbX)(e[0])?await d(e[0],i):await u(e,i),1===e.length){const t=l.addToPlaylistButtonFactory().hitAddToPlaylist({playlist:n??"",itemToBeAdded:e[0]});t&&m.logInteraction(t)}}),[m,l,e,c,t,d,u]);return(0,s.tbX)(e[0])&&!p.getCapabilities().canFetchAllTracks?null:(0,y.jsx)(o.D,{role:"menuitem",divider:a,onClick:h,leadingIcon:(0,y.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),children:n})},C=i.memo((function(e){return(0,y.jsx)(h.pZ,{value:"new-playlist",children:(0,y.jsx)(A,{...e})})}));var T=n(27163),I=n(28506),O=n(34839);function w(e){const{item:t,filter:n}=e,i=(0,y.jsx)(I.M,{searchWords:[n],textToHighlight:t.displayTitle});return(0,y.jsx)(b,{...e,children:(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{dir:"auto",className:O.A.addToPlaylistTitle,children:i}),t.displaySubtitle?(0,y.jsxs)("div",{dir:"auto",className:O.A.addToPlaylistSubtitle,children:[(0,y.jsx)(T.h,{size:"small"}),(0,y.jsx)(I.M,{searchWords:[n],textToHighlight:t.displaySubtitle})]}):null]})})}var N=n(87621),R=n(39464),P=n(88091),L=n(5723);const D=()=>(0,y.jsx)(P.u,{className:L.A.filterPlaylistSearch,children:(0,y.jsx)(R.H,{role:"menuitem",as:"div",children:(0,y.jsx)(N.S,{alwaysExpanded:!0,placeholder:a.Ru.get("contextmenu.find-playlist")})})});var k=n(63214),x=n(35598),U=n(39795),M=n(37178),B=n(78565),j=n(52028);const F=({uris:e,reference:t,items:n,displayText:r,depth:s,spec:o,leadingIcon:l,menuBoundary:d})=>{const p=(0,M.W)(),{filter:m}=(0,i.useContext)(U.g),h=1===s,f=(0,i.useMemo)((()=>0===m.length?n:(0,k.G)(m,n)),[m,n]);return(0,y.jsx)(u.g,{displayText:r,depth:s,placement:p?"left-start":"right-start",leadingIcon:l,menuBoundary:d,children:(0,y.jsxs)("div",{className:c()({[j.A.filterPlaylistSearchContainer]:h}),style:{"--context-menu-submenu-length":n.filter((e=>(0,B.sA)(e)||(0,B.Af)(e)&&e.canAdd)).length},children:[h&&(0,y.jsx)(D,{}),(0,y.jsx)(C,{divider:"after",uris:e,reference:t,displayText:a.Ru.get("web-player.aligned-curation.contextmenu.new-playlist"),spec:o}),f.map((t=>(0,B.sA)(t)?(0,y.jsx)(F,{reference:t,uris:e,items:t.items,displayText:t.name,depth:s+1,spec:o},t.uri):(0,B.Af)(t)&&t.canAdd?(0,x.A)(t)?(0,y.jsx)(w,{uris:e,playlist:t,item:t,filter:m??"",spec:o},t.uri):(0,y.jsx)(b,{uris:e,playlist:t,spec:o},t.uri):null))]})})},V=e=>(0,y.jsx)(U.s,{uri:`spotify:internal:foldersubmenu:${e.reference?.uri??"root"}`,children:(0,y.jsx)(F,{...e})});var G=n(7884);const H=i.memo((function({uris:e,isSmartRecommendation:t,isPlaylist:n,spec:l,isEmpty:c,menuBoundary:u}){const d=(0,f.m)();let p=a.Ru.get("contextmenu.add-to-playlist");t?p=a.Ru.get("contextmenu.add-to-another-playlist"):n&&(p=a.Ru.get("contextmenu.add-playlist-to-other-playlist"));const m=(0,G.u)();return(0,s.tbX)(e[0])&&!d.getCapabilities().canFetchAllTracks?null:c?(0,y.jsx)(o.D,{role:"menuitem",leadingIcon:(0,y.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),disabled:!0,children:p}):(0,y.jsx)(h.pZ,{value:"add-to-playlist",children:(0,y.jsx)(i.Suspense,{fallback:null,children:(0,y.jsx)(V,{uris:e,items:m?.items||[],reference:null,displayText:p,depth:1,spec:l,leadingIcon:(0,y.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),menuBoundary:u})})})})),W=e=>(0,y.jsx)(H,{...e})},78516:(e,t,n)=>{"use strict";n.d(t,{h:()=>v});var i=n(30758),r=n(31417),s=n(10994),a=n(10285),o=n(59521),l=n(20772),c=n(34139),u=n(21489),d=n(67865),p=n(42213),m=n(58033),h=n(42162),f=n(44672),g=n(20817),E=n(78774),_=n(7307),y=n(86070);const v=i.memo((function({uri:e,sharingInfo:t,canPin:n=g.oT.NO,isPinned:i=!1,useDialogForUnfollow:v=!1,isInLibrary:b}){const{spec:S}=(0,E.o)(e);return(0,y.jsx)(f.pZ,{value:"album",children:(0,y.jsxs)(s.W,{children:[(0,y.jsx)(p.zD,{uri:e,useDialog:v,initialState:b,spec:S}),(0,y.jsx)(a.K,{spec:S,uris:[e]}),(0,y.jsx)(l.z,{spec:S,divider:"after",uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio")}),n!==g.oT.NO&&(0,y.jsx)(d.k,{uri:e,canPin:n,isPinned:i,type:_.c.ALBUM,spec:S}),(0,y.jsx)(m.o,{spec:S,uris:[e]}),(0,y.jsxs)(h.h,{divider:"before",children:[(0,y.jsx)(o.m,{uri:e,spec:S,sharingInfo:t,displayText:r.Ru.get("context-menu.copy-album-link")}),(0,y.jsx)(c.x,{spec:S,uri:e,type:_.c.ALBUM})]}),(0,y.jsx)(u.q,{spec:S,divider:"before",uri:e})]})})}))},7520:(e,t,n)=>{"use strict";n.d(t,{t:()=>I});var i=n(30758),r=n(31417),s=n(10994),a=n(59521),o=n(56349),l=n(20772),c=n(34139),u=n(21489),d=n(67865),p=n(69476),m=n(42162),h=n(93110),f=n(18716),g=n(12864),E=n(8506),_=n(44672),y=n(33329),v=n(86070);const b=({uri:e,divider:t,spec:n})=>{const s=(0,y.s)(),[a,o]=(0,E.D)(e),l=(0,i.useCallback)((async()=>{a?(s.logInteraction(n.banArtistButtonFactory().hitRemoveHideEntity({entityToRemoveHide:e})),o(!1)):(o(!0),s.logInteraction(n.banArtistButtonFactory().hitHideEntity({entityToHide:e})))}),[a,s,o,n,e]),c=a?r.Ru.get("artist.ban-label.unban"):r.Ru.get("artist.ban-label.ban");return(0,v.jsx)(g.D,{role:"menuitem",divider:t,disabled:void 0===a,onClick:l,leadingIcon:a?(0,v.jsx)(h.V,{semanticColor:"essentialNegative",size:"small"}):(0,v.jsx)(f.r,{semanticColor:"textSubdued",size:"small"}),children:c})},S=i.memo((e=>(0,v.jsx)(_.pZ,{value:"ban-artist",children:(0,v.jsx)(b,{...e})})));var A=n(20817),C=n(78774),T=n(7307);const I=i.memo((function({uri:e,sharingInfo:t,canPin:n=A.oT.NO,isPinned:i=!1,useDialogForUnfollow:h=!1,isInLibrary:f}){const{spec:g}=(0,C.o)(e);return(0,v.jsx)(_.pZ,{value:"artist",children:(0,v.jsxs)(s.W,{children:[(0,v.jsx)(o.T5,{uri:e,useDialog:h,initialState:f}),(0,v.jsx)(S,{uri:e,spec:g}),n!==A.oT.NO&&(0,v.jsx)(d.k,{uri:e,canPin:n,isPinned:i,type:T.c.ARTIST,spec:g}),(0,v.jsx)(l.z,{uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio"),spec:g}),(0,v.jsx)(p.P,{spec:g,uri:e}),(0,v.jsxs)(m.h,{children:[(0,v.jsx)(a.m,{spec:g,uri:e,sharingInfo:t,displayText:r.Ru.get("contextmenu.share.copy-artist-link")}),(0,v.jsx)(c.x,{spec:g,uri:e,type:T.c.ARTIST})]}),(0,v.jsx)(u.q,{spec:g,divider:"before",uri:e})]})})}))},47863:(e,t,n)=>{"use strict";n.d(t,{p:()=>D});var i=n(30758),r=n(14343),s=n(31417),a=n(10994),o=n(59521),l=n(47041),c=n(95089),u=n(75943),d=n(12864),p=n(79401),m=n(44672),h=n(33329),f=n(86070);const g=({uri:e,divider:t,spec:n})=>{const{isMarkedAsFinished:r,markAsFinished:a,markAsUnfinished:o}=(0,p.z)(e),l=(0,h.s)(),m=(0,i.useCallback)((()=>{r?(l.logInteraction(n.markAsFinishedButtonFactory().hitMarkAsUnplayed({itemUnplayed:e})),o()):(l.logInteraction(n.markAsFinishedButtonFactory().hitMarkAsPlayed({itemPlayed:e})),a())}),[r,l,n,e,o,a]);return(0,f.jsx)(d.D,{role:"menuitem",divider:t,onClick:m,testid:"mark-as-finished-or-unplayed",leadingIcon:r?(0,f.jsx)(c.k,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(u.i,{semanticColor:"textSubdued",size:"small"}),children:r?s.Ru.get("contextmenu.mark-as-not-started"):s.Ru.get("contextmenu.mark-as-finished")})},E=i.memo((function(e){return(0,f.jsx)(m.pZ,{value:"mark-as-finished",children:(0,f.jsx)(g,{...e})})}));var _=n(34139),y=n(21489),v=n(67865),b=n(66251),S=n(20211),A=n(69476),C=n(42213),T=n(58033),I=n(42162),O=n(38501),w=n(20817),N=n(62270),R=n(96571),P=n(78774),L=n(7307);const D=i.memo((function({uri:e,uid:t,contextUri:n,sharingInfo:i,canPin:c=w.oT.NO,isPinned:u=!1,useDialogForUnfollow:d=!1,isInLibrary:p,includeGoToAudiobook:h,canBeRemovedFromPlaylist:g,isPreRelease:D=!1}){const{spec:k}=(0,P.o)(e),x=(0,r.NC)(O.skl),U=(0,r.NC)(O.oFv),{data:M}=(0,R.W)(e),B=(0,N.T)();return(0,f.jsx)(m.pZ,{value:"show",children:(0,f.jsxs)(a.W,{children:[!D&&(0,f.jsx)(T.o,{spec:k,uris:[e]}),t&&(0,f.jsx)(S.D,{uris:[e],uids:[t],playlistUri:n||"",canBeRemoved:g}),(0,f.jsx)(C.tt,{uri:e,useDialog:d,initialState:p,spec:k}),U&&B.capabilities.canMarkAsFinished&&(0,f.jsx)(E,{uri:e,divider:"after",spec:k}),h&&(0,f.jsx)(l.fe,{uri:e,contextUri:n,divider:"after"}),x&&!D&&(0,f.jsx)(b.R,{uri:e,rateLabel:s.Ru.get("web-player.audiobooks.rating.rateThisAudiobook"),metadata:M}),c!==w.oT.NO&&(0,f.jsx)(v.k,{uri:e,canPin:c,isPinned:u,type:L.c.AUDIOBOOK,spec:k}),D?(0,f.jsx)(o.m,{spec:k,uri:e,sharingInfo:i,displayText:s.Ru.get("context-menu.copy-book-link")}):(0,f.jsxs)(I.h,{children:[(0,f.jsx)(o.m,{spec:k,uri:e,sharingInfo:i,displayText:s.Ru.get("context-menu.copy-book-link")}),(0,f.jsx)(_.x,{spec:k,uri:e,type:L.c.AUDIOBOOK})]}),(0,f.jsx)(A.P,{spec:k,uri:e}),(0,f.jsx)(y.q,{spec:k,divider:"before",uri:e})]})})}))},62648:(e,t,n)=>{"use strict";n.d(t,{r:()=>u});var i=n(30758),r=n(10994),s=n(10285),a=n(40717),o=n(44672),l=n(78774),c=n(86070);const u=i.memo((function({uri:e,removeFromQueueData:t}){const{spec:n}=(0,l.o)(e);return(0,c.jsx)(o.pZ,{value:"chapter",children:(0,c.jsxs)(r.W,{children:[(0,c.jsx)(s.K,{spec:n,uris:[e]}),t&&(0,c.jsx)(a.c,{spec:n,uids:t.uid?[t.uid]:[],uris:[e],contextUri:t.contextUri})]})})}))},50496:(e,t,n)=>{"use strict";n.d(t,{b:()=>k});var i=n(30758),r=n(14343),s=n(31417),a=n(10994),o=n(10285),l=n(59521),c=n(199),u=n(47041),d=n(95089),p=n(75943),m=n(12864),h=n(48905),f=n(44672),g=n(20784),E=n(86070);const _=({uri:e,isPlayed:t,onChange:n=(()=>{}),divider:r})=>{const a=(0,g.f)(),{add:o,remove:l}=(0,h.p)("markedasfinished"),c=(0,i.useCallback)((()=>{t?(a.markAsUnPlayed(e),l(e)):(a.markAsPlayed(e),o(e)),n(!t)}),[t,n,a,e,o,l]);return a.getCapabilities()?.canMarkEpisodesAsDone?(0,E.jsx)(m.D,{role:"menuitem",divider:r,onClick:c,testid:"mark-as-played-or-unplayed","data-test-state":t?"played":"unplayed",leadingIcon:t?(0,E.jsx)(d.k,{semanticColor:"textBrightAccent",size:"small"}):(0,E.jsx)(p.i,{semanticColor:"textSubdued",size:"small"}),children:t?s.Ru.get("contextmenu.mark-as-not-started"):s.Ru.get("contextmenu.mark-as-finished")}):null},y=i.memo((function(e){return(0,E.jsx)(f.pZ,{value:"mark-as-played",children:(0,E.jsx)(_,{...e})})}));var v=n(34139),b=n(21489),S=n(20211),A=n(40717),C=n(69476),T=n(42213),I=n(58033),O=n(62648),w=n(42162),N=n(38501),R=n(18464),P=n(41031),L=n(78774),D=n(7307);const k=i.memo((function({uri:e,isPlayed:t=null,contextUri:n,uid:i,sharingInfo:d,onMarkAsPlayed:p=(()=>{}),canBeRemovedFromPlaylist:m,provider:h}){const g=(0,R.d)(e),{spec:_}=(0,L.o)(e),k=(0,r.NC)(N.qht,{loadingValue:!1});if(void 0===g?.episodeOrChapter)return null;const x=g.episodeOrChapter;if((0,P.Gr)(x))return(0,E.jsx)(O.r,{uri:e});const U=!(x.podcastSubscription.isPaywalled&&!x.podcastSubscription.isUserSubscribed),M="autoplay"===h;return g?.episodeOrChapter?(0,E.jsx)(f.pZ,{value:"episode",children:(0,E.jsxs)(a.W,{children:[(0,E.jsx)(I.o,{spec:_,uris:[e]}),i&&(0,E.jsx)(S.D,{uris:[e],uids:[i],playlistUri:n||"",canBeRemoved:m}),(0,E.jsx)(T.N7,{uri:e,spec:_}),(0,E.jsx)(o.K,{spec:_,uris:[e]}),i&&!M&&(0,E.jsx)(A.c,{spec:_,uids:[i],uris:[e],contextUri:n}),(0,E.jsx)(c.u,{spec:_,uri:e,canDownload:U}),(0,E.jsx)(u.du,{uri:e,contextUri:n}),null!==t&&(0,E.jsx)(y,{uri:e,isPlayed:t,onChange:p}),(0,E.jsxs)(w.h,{divider:"before",children:[(0,E.jsx)(l.m,{spec:_,uri:e,sharingInfo:d,displayText:s.Ru.get("context-menu.copy-episode-link")}),(0,E.jsx)(v.x,{spec:_,uri:e,type:D.c.EPISODE})]}),k&&(0,E.jsx)(C.P,{spec:_,uri:e}),(0,E.jsx)(b.q,{divider:"before",uri:e,spec:_,context:n})]})}):null}))},62046:(e,t,n)=>{"use strict";n.d(t,{I:()=>h});var i=n(30758),r=n(90694),s=n(31417),a=n(32032),o=n(47041),l=n(57776),c=n(59147);const u=new l.l("queryTrackArtists","query","47fe6e7ca333272699906da2964bfa38336c2aa28303489997404a82bd46e056",null);var d=n(37178),p=n(44672),m=n(86070);const h=i.memo((function({trackUri:e,contextUri:t,menuBoundary:n}){let i=[];const l=(h={uri:e},(0,c.I)(u,h,f));var h,f;"Track"===l.data?.trackUnion.__typename&&(i=l.data.trackUnion.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))));const g=(0,d.W)();return(0,m.jsx)(a.g,{displayText:s.Ru.get("contextmenu.go-to-artist"),depth:1,placement:g?"left-start":"right-start",leadingIcon:(0,m.jsx)(r.r,{semanticColor:"textSubdued",size:"small"}),menuBoundary:n,children:(0,m.jsx)(p.pZ,{value:"go-to-artist",children:i.map((({uri:e,name:n})=>(0,m.jsx)(o.Jn,{displayText:n,uri:e,contextUri:t,hideLeadingIcon:!0},e)))})})}))},76720:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var i=n(30758),r=n(10994),s=n(10285),a=n(20211),o=n(40717),l=n(42213),c=n(58033),u=n(44672),d=n(78774),p=n(86070);const m=i.memo((function({uri:e,uid:t,contextUri:n,canBeRemovedFromPlaylist:i}){const{spec:m}=(0,d.o)(e);return(0,p.jsx)(u.pZ,{value:"local-file",children:(0,p.jsxs)(r.W,{children:[(0,p.jsx)(c.o,{spec:m,uris:[e]}),t&&(0,p.jsx)(a.D,{uris:[e],uids:[t],playlistUri:n||"",canBeRemoved:i}),(0,p.jsx)(l.TR,{uri:e,spec:m}),(0,p.jsx)(s.K,{spec:m,uris:[e]}),t&&(0,p.jsx)(o.c,{spec:m,uids:[t],uris:[e],contextUri:n})]})})}))},42162:(e,t,n)=>{"use strict";n.d(t,{h:()=>u});var i=n(30758),r=n(52439),s=n(31417),a=n(32032),o=n(37178),l=n(44672),c=n(86070);const u=i.memo((function({children:e,divider:t,menuBoundary:n}){const i=(0,o.W)();return(0,c.jsx)(l.pZ,{value:"share",children:(0,c.jsx)(a.g,{divider:t,displayText:s.Ru.get("contextmenu.share"),placement:i?"left-start":"right-start",leadingIcon:(0,c.jsx)(r.C,{semanticColor:"textSubdued",size:"small"}),menuBoundary:n,children:e})})}))},70275:(e,t,n)=>{"use strict";n.d(t,{H:()=>T});var i=n(30758),r=n(14343),s=n(31417),a=n(10994),o=n(59521),l=n(56349),c=n(34139),u=n(21489),d=n(67865),p=n(66251),m=n(69476),h=n(47863),f=n(42162),g=n(37160),E=n(38501),_=n(44672),y=n(20817),v=n(96571),b=n(41031),S=n(78774),A=n(7307),C=n(86070);const T=i.memo((function({uri:e,sharingInfo:t,canPin:n=y.oT.NO,isPinned:i=!1,useDialogForUnfollow:T,isInLibrary:I}){const{spec:O}=(0,S.o)(e),w=(0,r.NC)(E.yt8,{loadingValue:!1}),N=(0,r.NC)(E.skl),{data:R}=(0,v.W)(e),P=(0,g.N)(e),L=N&&!P;return R&&(0,b.Go)(R)?(0,C.jsx)(h.p,{uri:e,sharingInfo:t,useDialogForUnfollow:!0,isInLibrary:I}):(0,C.jsx)(_.pZ,{value:"show",children:(0,C.jsxs)(a.W,{children:[(0,C.jsx)(l.jK,{uri:e,useDialog:T,initialState:I}),L&&(0,C.jsx)(p.R,{uri:e,rateLabel:s.Ru.get("web-player.show.rating.rateShow"),metadata:R}),n!==y.oT.NO&&(0,C.jsx)(d.k,{uri:e,canPin:n,isPinned:i,type:A.c.SHOW,spec:O}),(0,C.jsxs)(f.h,{children:[(0,C.jsx)(o.m,{spec:O,uri:e,sharingInfo:t,displayText:s.Ru.get("context-menu.copy-show-link")}),(0,C.jsx)(c.x,{spec:O,uri:e,type:A.c.SHOW})]}),w&&(0,C.jsx)(m.P,{spec:O,uri:e}),(0,C.jsx)(u.q,{spec:O,divider:"before",uri:e})]})})}))},54622:(e,t,n)=>{"use strict";n.d(t,{P:()=>$});var i=n(30758),r=n(43956),s=n(31417),a=n(10994),o=n(35897),l=n(58154),c=n(91008),u=n(12864),d=n(38165),p=n(11893),m=n(86070);const h=({uri:e,uid:t,contextUri:n,spec:r,logger:a,divider:o})=>{const p=(0,i.useCallback)((()=>{let t;n&&(0,c.tbX)(n)?t=r.addRecommendationFactory().hitAddToPlaylist({playlist:n??"",itemToBeAdded:e}):n&&(0,c.Z0m)(n)&&(t=r.addRecommendationFactory().hitLike({itemToBeLiked:e})),t&&a.logInteraction(t)}),[n,a,r,e]),{addRecommendation:h,canAddRecommendation:f}=(0,d.t)({uri:e,uid:t,contextUri:n,onAddRecommendation:p});return f?(0,m.jsx)(u.D,{role:"menuitem",divider:o,onClick:h,leadingIcon:(0,m.jsx)(l.v,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.add-recommendation-to-this-playlist")}):null},f=e=>{const t=(0,p.J)(e.contextUri);return t?.canAdd?(0,m.jsx)(h,{...e}):null},g=e=>e.contextUri&&(0,c.tbX)(e.contextUri)?(0,m.jsx)(f,{...e}):e.contextUri&&(0,c.Z0m)(e.contextUri)?(0,m.jsx)(h,{...e}):null;var E=n(10285),_=n(8518),y=n(20421),v=n(53377),b=n(57270),S=n(33329);const A=({contextUri:e,trackUri:t,spec:n,isBanned:r,canBan:a,canRemoveFromContext:o,contextName:l})=>{const{ban:c,unBan:d}=(0,y.N)(t,e,l),p=(0,S.s)(),h=(0,b.b)(e,t,r),f=(0,v.A)(t,e,o,h),g=r||h,E=(0,i.useCallback)((()=>{g?(d(),p.logInteraction(n.hideTrackButtonFactory().hitRemoveHideEntity({entityToRemoveHide:t}))):(c(),p.logInteraction(n.hideTrackButtonFactory().hitHideEntity({entityToHide:t})))}),[g,d,p,n,t,c]);return a||f?(0,m.jsx)(u.D,{role:"menuitem",onClick:E,leadingIcon:g?(0,m.jsx)(_.P,{semanticColor:"textNegative",size:"small"}):(0,m.jsx)(_.P,{semanticColor:"textSubdued",size:"small"}),children:g?s.Ru.get("web-player.feedback.hidden"):s.Ru.get("web-player.feedback.hide-song")}):null},C=e=>{const t=(0,p.J)(e.contextUri);return t?(0,m.jsx)(A,{canRemoveFromContext:t.canRemove,...e}):null},T=i.memo((function(e){return(0,c._Tv)(e.contextUri)||e.canBan?(0,m.jsx)(A,{canRemoveFromContext:!1,...e}):(0,c.tbX)(e.contextUri)?(0,m.jsx)(C,{...e}):null}));var I=n(59521),O=n(47041),w=n(20772),N=n(34139),R=n(21489),P=n(20211),L=n(40717),D=n(36558);const k=({uri:e,uid:t,contextUri:n,spec:r,logger:a,divider:o})=>{const l=(0,i.useCallback)((()=>{a.logInteraction(r.removeRecommendationFactory().hitRemoveRecommendation({contextUri:n??"",recommendedItemUri:e}))}),[n,a,r,e]),{removeRecommendation:c,canRemoveRecommendation:p}=(0,d.t)({uri:e,uid:t,contextUri:n,onRemoveRecommendation:l});return p?(0,m.jsx)(u.D,{role:"menuitem",divider:o,onClick:c,leadingIcon:(0,m.jsx)(D.x,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.remove-recommendation")}):null};var x=n(42213),U=n(32381),M=n(78305),B=n(58033),j=n(62046),F=n(42162),V=n(9541),G=n(47694),H=n(44672),W=n(78774),z=n(21549),K=n(7307);const Y=i.memo((function({uri:e,uid:t,artists:n=[],albumUri:i,contextUri:l,sharingInfo:c,removePlaylistItems:u,isSmartRecommendation:d,entityContextUri:p=l,canBeRemovedFromPlaylist:h,canBan:f=!1,isBanned:_=!1,contextName:y,provider:v,showCanvasAction:b=!1,menuBoundary:S}){const{spec:A,logger:C,UBIFragment:D}=(0,z.r)(r.w,{data:{uri:e}}),{spec:V}=(0,W.o)(e),Y="autoplay"===v||d;return(0,m.jsx)(D,{spec:A,children:(0,m.jsx)(H.pZ,{value:"track","data-testid":"track-menu",children:(0,m.jsxs)(a.W,{children:[d&&p?(0,m.jsx)(g,{uri:e,uid:t,contextUri:p,spec:A,logger:C}):null,d&&p?(0,m.jsx)(k,{uri:e,uid:t,contextUri:p,spec:A,logger:C,divider:"after"}):null,(0,m.jsx)(B.o,{spec:V,uris:[e],isSmartRecommendation:d,menuBoundary:S}),t&&!Y?(0,m.jsx)(P.D,{uris:[e],uids:[t],playlistUri:l||"",removePlaylistItems:u,canBeRemoved:h}):null,(0,m.jsx)(x.TR,{uri:e,spec:V}),(0,m.jsx)(E.K,{spec:V,uris:[e]}),t&&(0,m.jsx)(L.c,{spec:V,uids:[t],uris:[e],contextUri:l}),l&&(0,m.jsx)(T,{contextUri:l,trackUri:e,isBanned:_,canBan:f,contextName:y,spec:V}),(0,m.jsx)(G._,{contextUri:p,uri:e,spec:V}),(0,m.jsx)(w.z,{spec:V,uri:e,displayText:s.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),n.length>1?(0,m.jsx)(j.I,{trackUri:e,contextUri:l,menuBoundary:S}):(0,m.jsx)(O.Jn,{uri:n?.[0]?.uri,contextUri:l}),(0,m.jsx)(O.V9,{uri:i,contextUri:l,highlightedUri:e}),(0,m.jsx)(M.I,{uri:e,displayText:s.Ru.get("contextmenu.show-credits"),ubiLogger:C,contextMenuSpec:A}),b&&(0,m.jsx)(U.i,{spec:V}),(0,m.jsxs)(F.h,{divider:"before",menuBoundary:S,children:[(0,m.jsx)(I.m,{spec:V,uri:e,sharingInfo:c,displayText:s.Ru.get("context-menu.copy-track-link")}),(0,m.jsx)(N.x,{spec:V,uri:e,type:K.c.TRACK})]}),Y&&(0,m.jsx)(o.r,{divider:"before"}),(0,m.jsx)(R.q,{spec:V,divider:"before",uri:e,context:l})]})})})})),q=e=>{const{showCanvasToggleInContextMenu:t}=(0,V.a)({tryAvoidGraphQLFetching:!1});return(0,m.jsx)(Y,{...e,showCanvasAction:t})},$=i.memo((function({canSwitchVisuals:e,...t}){return e?(0,m.jsx)(q,{...t}):(0,m.jsx)(Y,{...t,showCanvasAction:!1})}))},51804:(e,t,n)=>{"use strict";n.d(t,{o:()=>L});var i=n(30758),r=n(43956),s=n(31417),a=n(10994),o=n(10285),l=n(59521),c=n(47041),u=n(20772),d=n(34139),p=n(21489),m=n(20211),h=n(40717),f=n(42213),g=n(32381),E=n(78305),_=n(58033),y=n(62046),v=n(42162),b=n(9541),S=n(47694),A=n(28389),C=n(44672),T=n(58685),I=n(78774),O=n(21549),w=n(7307),N=n(86070);const R=i.memo((function({uri:e,uid:t,artists:n=[],albumUri:i,contextUri:b,sharingInfo:R,removePlaylistItems:P,canBeRemovedFromPlaylist:L,showCanvasAction:D=!1}){const k=(0,T.o)((e=>e),((e,t)=>e?.item?.uri===t?.item?.uri)),x=k?.item?.uri,U=(0,A.i)(e),M=x===e,{spec:B,logger:j,UBIFragment:F}=(0,O.r)(r.w,{data:{uri:U}}),{spec:V}=(0,I.o)(e);return(0,N.jsx)(F,{spec:B,children:(0,N.jsx)(C.pZ,{value:"track","data-testid":"track-menu",children:(0,N.jsxs)(a.W,{children:[M&&(0,N.jsx)(_.o,{spec:V,uris:[U]}),M&&t&&(0,N.jsx)(m.D,{uris:[U],uids:[t],playlistUri:b||"",removePlaylistItems:P,canBeRemoved:L}),M&&(0,N.jsx)(f.TR,{uri:U,spec:V}),(0,N.jsx)(o.K,{spec:V,uris:[e]}),t&&(0,N.jsx)(h.c,{spec:V,uids:[t],uris:[e],contextUri:b}),(0,N.jsx)(S._,{uri:e,contextUri:b,spec:V}),M&&(0,N.jsx)(u.z,{spec:V,uri:U,displayText:s.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),n.length>1?(0,N.jsx)(y.I,{trackUri:e,contextUri:b}):(0,N.jsx)(c.Jn,{uri:n?.[0]?.uri,contextUri:b}),(0,N.jsx)(c.V9,{uri:i,contextUri:b,highlightedUri:U}),(0,N.jsx)(E.I,{uri:U,displayText:s.Ru.get("contextmenu.show-credits"),ubiLogger:j,contextMenuSpec:B}),D&&(0,N.jsx)(g.i,{spec:V}),(0,N.jsxs)(v.h,{divider:"before",children:[(0,N.jsx)(l.m,{spec:V,uri:e,sharingInfo:R,displayText:s.Ru.get("context-menu.copy-track-link")}),(0,N.jsx)(d.x,{spec:V,uri:e,type:w.c.TRACK})]}),(0,N.jsx)(p.q,{spec:V,divider:"before",uri:e,context:b})]})})})})),P=e=>{const{showCanvasToggleInContextMenu:t}=(0,b.a)({tryAvoidGraphQLFetching:!1});return(0,N.jsx)(R,{...e,showCanvasAction:t})},L=i.memo((function({canSwitchVisuals:e,...t}){return e?(0,N.jsx)(P,{...t}):(0,N.jsx)(R,{...t,showCanvasAction:!1})}))},35879:(e,t,n)=>{"use strict";n.d(t,{N:()=>m});var i=n(30758),r=n(97500),s=n.n(r),a=n(97844),o=n(22984);const l="H0HbpIM3UrcupWIAjLWu",c="W0TACB7OY0iXtKVOtEhY",u="zmOtW0vqqn1qpZrtQ_w9",d="FqmFsMhuF4D0s35Z62Js";var p=n(86070);const m=(0,i.memo)((function({imgSrc:e,className:t,onClick:n,type:i,width:r,height:m,loading:h="lazy"}){const f=s()(l,t,{[c]:!m});return(0,p.jsxs)("div",{className:f,style:{width:r,height:m},onClick:n,"aria-hidden":"true",children:[(0,p.jsx)("div",{className:u,children:(0,p.jsx)(a.s,{type:i})}),(0,p.jsx)(o._,{testid:"cover-art-image",loading:h,src:e,className:d})]})}))},15292:(e,t,n)=>{"use strict";n.d(t,{Q:()=>f});var i=n(51778),r=n(31417),s=n(30758),a=n(10495),o=n(90224);var l=n(2679),c=n(58685),u=n(75497),d=n(45627),p=n(5805),m=n(86070);function h(e){return e.includes("Spotify")?e:`Spotify – ${e}`}const f=({children:e,usePlayingItem:t})=>{let n=h(e);(e=>{const{mainLandmarkRef:t}=(0,a.JT)(),n=(0,o.J)(),i=n.location?.state?.preventMoveFocus,r=(0,s.useRef)(n.length<2);r.current=n.length<2,(0,s.useLayoutEffect)((()=>{const n=t.current;n&&e&&n.setAttribute("aria-label",e),i||r.current||!n||n.focus({preventScroll:!0})}),[e,t,i])})(e);const{isPlaying:f}=(0,l.GK)(),g=(0,c.o)((e=>e?.item));return g&&(f||t)&&((0,p.v)(g)?n=[g.name,g.artists.map((e=>e.name)).join(r.Ru.getSeparator())].join(" • "):(0,d.p)(g)?n=[g.name,g.show.name].join(" • "):(0,u.N)(g)&&(n=h(r.Ru.get("ad-formats.advertisement")))),(0,m.jsx)(i.mg,{defaultTitle:"Spotify",defer:!1,children:(0,m.jsx)("title",{children:n})})}},98211:(e,t,n)=>{"use strict";n.d(t,{M:()=>g});var i=n(30758),r=n(97500),s=n.n(r),a=n(1820),o=n(31417),l=n(50912),c=n(50342),u=n(13787),d=n(69285),p=n(35035),m=n(3292);const h="hcxPtZcvjM07S6ydT685";var f=n(86070);const g=i.memo((function({uri:e,className:t,size:n="small",as:i="div"}){const{availability:r}=(0,u.$)(e),g=(0,d.e)(e);return r===p.kw.NO?null:(0,f.jsx)(i,{className:s()(h,t),children:r===p.kw.DOWNLOADING?(0,f.jsx)(c.C,{percentage:g.percentage,size:(0,m.k)(n)}):r===p.kw.WAITING?(0,f.jsx)(l.C,{size:(0,m.k)(n)}):r===p.kw.YES?(0,f.jsx)(a.F,{size:n,title:o.Ru.get("shared.library.filter.downloaded")}):null})}))},50912:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(30758),r=n(86070);const s=(0,i.memo)((function({size:e}){const t=2e3,n=20*Math.PI,i=n-.8*n,s=Math.floor(Date.now()%t*360/t);return(0,r.jsx)("svg",{height:e,role:"img",width:e,viewBox:"0 0 24 24",children:(0,r.jsx)("circle",{strokeDasharray:`${n} ${n}`,strokeDashoffset:i,stroke:"currentColor",strokeWidth:"2",fill:"transparent",r:10,cx:"12",cy:"12",children:(0,r.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${s} 12 12`,to:`${360+s} 12 12`,dur:"2000ms",repeatCount:"indefinite"})})})}))},84029:(e,t,n)=>{"use strict";n.d(t,{Fx:()=>o,id:()=>c,wv:()=>a});var i=n(30758),r=n(86070);const s={isOpen:!1,uri:""},a=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,uri:t.uri,currentTrackUri:t.currentTrackUri,currentPosition:t.currentPosition,entityType:t.entityType,isOpen:!0};case"close":return{...s,isOpen:!1};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,r.jsx)(a.Provider,{value:n,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},21951:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,e:()=>l});var i=n(31417),r=n(94965),s=n(86070);const a="entityHeaderAdd",o={placement:r.D.bottomLeft,zIndex:1,getTitle:({triggerAction:e})=>((e||{}).type,i.Ru.get("action-trigger.save-library")),getDescription:({triggerAction:e})=>((e||{}).type,i.Ru.get("action-trigger.logged-out-continue"))},l=({children:e})=>(0,s.jsx)(r.y,{id:a,options:o,"data-testid":"login-trigger",children:e})},78464:(e,t,n)=>{"use strict";n.d(t,{s:()=>c});var i=n(1648),r=n(30758),s=n(90224),a=n(86070);const o=({error:e,resetError:t})=>{const n=(0,s.J)();return(0,r.useEffect)((()=>{const e=n.listen((()=>{t?.()}));return()=>{e()}}),[n,t]),null},l=({fallback:e,children:t})=>(0,a.jsx)(r.Suspense,{fallback:e,children:t}),c=({Fallback:e=o,suspenseFallback:t,children:n,onError:r})=>(0,a.jsx)(l,{fallback:t??null,children:(0,a.jsx)(i.tH,{fallback:({error:t,componentStack:n,resetError:i})=>(0,a.jsx)(e,{error:t,componentStack:n,resetError:i}),onError:r,children:n})})},8398:(e,t,n)=>{"use strict";n.d(t,{x:()=>m});var i=n(30758),r=n(97500),s=n.n(r),a=n(422),o=n(44481),l=n(44971);const c="KIbfbFDao0SHpZsKoKZD",u="yZh70k8am9QCTKmucbwo";var d=n(86070);const p=()=>window.location.reload(),m=(0,i.memo)((function({headingMessage:e,message:t,onDismissDialog:n=p,isOpen:i=!1,buttonLabel:r,animated:m,isRemoteConfigInitialized:h=!0}){const f=h?l.A:l.h;return(0,d.jsx)(f,{isOpen:i,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:e,animated:m,children:(0,d.jsxs)("div",{className:s()(c,"encore-light-theme"),children:[(0,d.jsx)(a.E,{variant:"titleSmall",as:"h1",children:e}),(0,d.jsx)(a.E,{as:"p",variant:"bodyMedium",children:t}),(0,d.jsx)("div",{className:u,children:(0,d.jsx)(o.$,{onClick:n,autoFocus:!0,children:r})})]})})}))},76553:(e,t,n)=>{"use strict";n.d(t,{ErrorPage:()=>m});var i=n(422),r=n(44481),s=n(31417),a=n(95695),o=n(27301);const l="QSYXf8dYOffYgwkMd5eC",c="wSIDh56L1NbjcQQJ5Vkj",u="AMqcnfR0iNvTMp3AZpze",d="SoFH2YPXp1wuOt2fe2tg";var p=n(86070);const m=({errorName:e})=>{const t={cdmerror:{logoLink:o.S5,header:s.Ru.get("error-page.header.cdmerror"),subtext:s.Ru.get("error-page.subtext.cdmerror"),cta:{title:s.Ru.get("error-page.cta.cdmerror"),url:"https://support.spotify.com/article/web-player-help/?utm_source=open&utm_campaign=drm_error&utm_medium=web"}},max_subscriptions_reached:{header:s.Ru.get("error-page.header.max_subscriptions_reached"),subtext:s.Ru.get("error-page.subtext.max_subscriptions_reached")},artist_videos_not_supported:{header:s.Ru.get("error-page.header.expression_not_supported"),subtext:"",cta:{title:s.Ru.get("error-page.not-found.home"),url:"https://open.spotify.com"}}}[e]||{};return(0,p.jsxs)("div",{className:l,"data-testid":"error-page",children:[t.logoLink?(0,p.jsx)(a.A,{className:c,customLink:t.logoLink}):(0,p.jsx)(a.A,{className:c,noLink:!0}),(0,p.jsxs)("div",{className:u,children:[t.header&&(0,p.jsx)(i.E,{as:"h1",variant:"titleLarge",semanticColor:"textBase",dir:"auto",children:t.header}),t.subtext&&(0,p.jsx)(i.E,{as:"h2",variant:"bodyMedium",semanticColor:"textBase",dir:"auto",children:t.subtext})]}),t.cta&&(0,p.jsx)(r.$,{onClick:()=>{t?.cta?.url&&(window.location.href=t.cta.url)},className:d,colorSet:"brightAccent",children:t.cta.title})]})}},87621:(e,t,n)=>{"use strict";n.d(t,{S:()=>w});var i=n(30758),r=n(97500),s=n.n(r),a=n(40638),o=n(66371),l=n(45415),c=n(31417),u=n(99701),d=n(39795),p=n(48655),m=n(43004),h=n(48994),f=n(13087);const g="JzZyf6OGCGtdscOZGt8Y",E="t6HIrX67Lp80Nj6tGauz",_="wCl7pMTEE68v1xuZeZiB",y="QZhV0hWVKlExlKr266jo",v="iiNt4l0UwY2wL42vyBc2",b="uAJxc_psYWeimY8N9bH9",S="KAydWoHSkQRqhQ1vkVwK",A="_bjbHn5TABOW2s5LsEGX",C="CIVozJ8XNPJ60uMN23Yg",T="EsqEJ_NPrHsPkTbX4FW8";var I=n(86070);const O=e=>(0,h.x)(p.W.FILTER,e),w=i.memo((function({alwaysExpanded:e=!1,placeholder:t,filterBoxApiRef:n,outerRef:r,onFilter:p,onClear:h,onActivate:w,clearOnEscapeInElementRef:N,debounceFilterChangeTimeout:R=200,expandDirection:P="left",fullWidth:L=!1,useExpandCallback:D=O}){const{filter:k,setFilter:x}=(0,i.useContext)(d.g),[U,M]=(0,i.useState)(e||!!k),[B,j]=(0,i.useState)(k),F=(0,i.useRef)(null),V=(0,i.useRef)(null),G=r??F;!function(e){const t=(0,f.m)();(0,i.useEffect)((()=>(t.enableMenuItem(e),()=>{t.disableMenuItem(e)})),[t,e])}(m.D.FILTER);const H=(0,a.YQ)(((e,t=!1)=>{p&&!t&&p(e),x(e)}),R,{leading:!1,trailing:!0,maxWait:1e3}),W=(0,i.useCallback)((()=>{h?.(),j(""),H("",!0)}),[h,H]);(0,i.useImperativeHandle)(n,(()=>({clearFilter:W})));const z=(0,i.useCallback)((()=>{!1!==w?.()&&(M(!0),G.current?.focus())}),[M,G,w]);D(z);const K=(0,i.useCallback)((e=>{const t=e.currentTarget.value;j(t),H(t)}),[H,j]),Y=(0,i.useCallback)((()=>{B||e||M(!1)}),[B,e,M]),q=(0,i.useCallback)((t=>{"Escape"===t.key&&(B?(t.stopPropagation(),W()):e||(M(!1),V.current?.focus()))}),[e,W,B]);return(0,i.useEffect)((()=>{const e=e=>{"Escape"===e.key&&N?.current?.contains(e.target)&&W()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[W,N]),(0,I.jsx)(u.Zp,{label:t,disabled:U||!t,children:(0,I.jsxs)("div",{className:s()(g,{[E]:U}),role:"search",children:[(0,I.jsx)("input",{ref:G,className:s()(y,{[v]:L}),role:"searchbox",maxLength:80,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:t,onChange:K,onKeyDown:q,onBlur:Y,value:B,"aria-hidden":!U,tabIndex:U?void 0:-1}),(0,I.jsxs)("div",{className:b,children:[(0,I.jsx)("span",{className:A,children:(0,I.jsx)(o.C,{size:"small",className:C,"aria-hidden":!0})}),B&&(0,I.jsx)("button",{className:T,onClick:e=>{e.stopPropagation(),W(),G.current?.focus()},"aria-label":c.Ru.get("search.a11y.clear-input"),children:(0,I.jsx)(l.M,{size:"small"})})]}),(0,I.jsx)("button",{className:s()(_,{[S]:"right"===P}),onClick:z,"data-testid":"expand-button","aria-hidden":U,tabIndex:U?-1:void 0,"aria-label":t,ref:V,children:(0,I.jsx)(o.C,{size:"small",className:C})})]})})}))},62435:(e,t,n)=>{"use strict";n.d(t,{J:()=>a,s:()=>s});var i=n(30758),r=n(86070);const s=i.createContext(null),a=({children:e})=>{const t=(0,i.useRef)(null);return(0,r.jsx)(s.Provider,{value:t,children:e})}},57239:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,h:()=>l});var i=n(30758),r=n(1378);var s=n(72750),a=n(36025),o=n(86070);const l=function(e){let t=e,n=[];return{addListener:e=>{n.push(e)},removeListener:e=>{n=n.filter((t=>t!==e))},get:()=>t,set:e=>{t=e(t),n.forEach((e=>{e(t)}))}}}({triggerId:null,triggerAction:null}),c=({id:e,children:t,childRef:n,options:{placement:c,isCTA:u,intentPrimaryButton:d="login",getDescription:p,getTitle:m,hideArrow:h,shouldHideOnOutsideClick:f=(()=>!0),shouldHideOnScroll:g=!1,fadeOut:E=!1,popperOptions:_,zIndex:y,maxWidth:v,tippyClassName:b,primaryButtonText:S,secondaryButtonText:A,checkboxText:C,useSecondaryStyling:T,onLogInteraction:I,tippyWrapperClassName:O,renderInline:w},onPrimaryButtonClick:N=(()=>{}),onSecondaryButtonClick:R,onCheckboxClick:P,className:L,onHide:D,onShow:k})=>{const x=u?"tooltip-with-cta":"tooltip-without-cta",[{triggerId:U,triggerAction:M},B]=function(e){const t=(0,i.useState)()[1];return(0,i.useEffect)((()=>(e.addListener(t),()=>{e.removeListener(t)})),[e,t]),[e.get(),e.set]}(l),j=Boolean(U&&U===e),F=(0,i.useCallback)((e=>{e.stopPropagation();const t=(0,a.cX)((0,a.KY)(void 0,!0),"spotify_web_player").toString();I?.({itemIdSuffix:x,intent:d,type:"click",targetUri:t}),B((e=>({...e,triggerAction:null,triggerId:null}))),N()}),[N,I,B,x,d]),V=(0,i.useCallback)((e=>t=>{t.stopPropagation&&t.stopPropagation(),I?.({intent:"close-upsell",type:"click",itemIdSuffix:`${x}/${e}`}),B((e=>({...e,triggerAction:null,triggerId:null})))}),[I,B,x]);(0,i.useEffect)((()=>{D&&k&&(j?k():D())}),[D,k,j]);const G=(0,i.useRef)(!1);(0,i.useEffect)((()=>{!G.current&&j&&(I?.({intent:"open-upsell",type:"view",itemIdSuffix:x}),G.current=!0),G.current&&!j&&(G.current=!1)}),[I,x,j]);const H=(0,i.useCallback)((()=>{g&&j&&B((e=>({...e,triggerAction:null,triggerId:null})))}),[B,g,j]);(0,s.g)(H);const W=m({triggerAction:M}),z=p({triggerAction:M}),K=f({triggerAction:M});return(0,o.jsx)(r.x,{placement:c,className:L,tippyClassName:b,tippyWrapperClassName:O,popperOptions:_,zIndex:y,maxWidth:v,title:W,description:z,hideArrow:h,id:e,visible:j,showButtons:u,hideOnClickOutside:K,onHide:V("backdrop"),onSecondaryButtonClick:R??V("close-button"),onPrimaryButtonClick:F,primaryButtonText:S,secondaryButtonText:A,onCheckboxClick:P,checkboxText:C,useSecondaryStyling:T,childRef:n,fadeOut:E,renderInline:w,children:t})}},44971:(e,t,n)=>{"use strict";n.d(t,{h:()=>E,A:()=>_});var i=n(97500),r=n.n(i),s=n(76595),a=n.n(s);const o="lij5P44ZbO8C0Oh8ZJtb",l="x3YuUrWGHgimbC8VFa2e",c="qQItFS8myykGhpxMYzyA",u="I3zkdnuhFFrZ1Rr1BJhb",d="AvH27oyRpOm17rom9Bnt",p="sXrNbiybT8RKnisJnpV3",m="qh9X1aEYVqtUP2alr32V",h="F9EQJ9z0gxjxglXhzCcg",f="zogFp9G1AEqb8AKOd5BO";var g=n(86070);const E=e=>{const{isOpen:t,contentLabel:n,children:i,className:s,overlayClassName:E,animated:_,animation:y,shouldFocusAfterRender:v=!0,...b}=e;let S=0;return _?S=300:y?.closeTimeoutMs&&(S=y.closeTimeoutMs),(0,g.jsx)(a(),{className:{base:r()(f,{[o]:_},[y?.modal?.base,s]),afterOpen:r()({[l]:_},[y?.modal?.afterOpen]),beforeClose:r()({[c]:_},[y?.modal?.beforeClose])},overlayClassName:{base:r()(u,{[d]:_},[y?.overlay?.base,E]),afterOpen:r()({[p]:_},[y?.overlay?.afterOpen]),beforeClose:r()({[m]:_},[y?.overlay?.beforeClose])},bodyOpenClassName:h,isOpen:t,...S?{closeTimeoutMS:S}:{},shouldFocusAfterRender:v,preventScroll:!0,ariaHideApp:!1,contentLabel:n,...b,children:i})},_=e=>(0,g.jsx)(E,{...e})},28506:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var i=n(11170),r=n.n(i);const s={highlightedText:"M0E2Al6URHV3iyoDbvi_"};var a=n(86070);function o({searchWords:e,textToHighlight:t,...n}){return 0===e.length||e.every((e=>!e))?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(r(),{highlightClassName:s.highlightedText,searchWords:e,textToHighlight:t,autoEscape:!0,...n})}},14703:(e,t,n)=>{"use strict";n.d(t,{$X:()=>f,cU:()=>p,wI:()=>h});var i=n(30758),r=n(85505),s=n(89848),a=n(47095),o=n(36475),l=n(36620),c=n(81834),u=n(63096),d=n(86070);const p=e=>{const t=(0,u.g)(e.images);return{uri:e.uri,imageUrl:t?.url}},m=(0,i.createContext)({fetchMultipleColors:()=>{},resetColor:()=>{},setColorFromUri:()=>{},clearColor:()=>{}}),h=({children:e})=>{const t=(0,a.as)(),{request:n}=(0,i.useContext)(c.j),[u,p]=(0,i.useState)({}),[h,f]=(0,i.useState)(r.l0o),{extractedHomeAdColor:[g]}=(0,s.bT)(),E=(0,i.useCallback)((()=>{t((0,a.Mo)(g?.colorRaw||h))}),[h,t,g]),_=(0,i.useCallback)((()=>{t((0,a.Hf)())}),[t]),y=(0,i.useCallback)((e=>{const n=u[e];t((0,a.Mo)(n||r.l0o))}),[t,u]),v=(0,i.useCallback)((async e=>{const t={};(await(0,l.j)(n,e.map((e=>e.imageUrl||"")))).forEach((({colorRaw:n},i)=>{const r=n.toCSS(o.a.HEX);t[e[i].uri]=r,0===i&&f(r)})),p(t)}),[n]),b=(0,i.useMemo)((()=>({fetchMultipleColors:v,resetColor:E,setColorFromUri:y,clearColor:_})),[v,E,y,_]);return(0,d.jsx)(m.Provider,{value:b,children:e})};function f(){const e=(0,i.useContext)(m);if(null===e)throw new Error("Trying to use 'ShortcutsColorContext' without 'ShortcutsColorProvider'!");return e}},99701:(e,t,n)=>{"use strict";n.d(t,{Zp:()=>E,uF:()=>g,WO:()=>f});var i=n(30758),r=n(97500),s=n.n(r),a=n(94079),o=n(17763),l=n(27102);const c="nYdM55iHFByRTzJUmx9X",u="sNOxi993vqYCWYgo_N3H",d="z_29i58eLFLK50jAs_4a";var p=n(86070);const m=({children:e,className:t,showDelay:n=200})=>{const[r,m]=i.useState(!1),h=(0,o.Oj)(),f=(0,l.ZY)(),g=(0,i.useRef)(null),E=(0,i.useRef)(!0);return(0,i.useEffect)((()=>(E.current=!0,()=>{E.current=!1}))),(0,i.useEffect)((()=>{const e=setTimeout((()=>{E.current&&(m(!0),f?.addEventListener("click",t,{once:!0}))}),n);function t(){E.current&&(m(!1),h({type:"close"}),clearTimeout(e))}return()=>{f?.removeEventListener("click",t),clearTimeout(e)}}),[f,n,h]),(0,p.jsx)(a.A,{in:r,timeout:200,unmountOnExit:!0,classNames:{enter:u,enterActive:d},nodeRef:g,children:(0,p.jsx)("div",{className:s()(c,t),ref:g,children:e})})};var h=n(6038);const f="hover-or-focus-tooltip",g=1e3,E=({label:e,children:t,renderInline:n,showDelay:i,disabled:r,placement:s="top",labelClassName:a})=>(0,p.jsx)(h.y,{action:"open",trigger:"hover-or-focus",placement:s,interactive:!1,content:r?null:(0,p.jsx)(m,{showDelay:i,className:a,children:(0,p.jsx)("span",{id:f,role:"tooltip",children:e})}),renderInline:n,children:t})},78592:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(86070);const r=({className:e,name:t})=>(0,i.jsx)("svg",{height:16,role:"img",width:16,viewBox:"0 0 24 24",className:e,name:t,"aria-hidden":"true",children:(0,i.jsx)("circle",{cx:"50%",cy:"50%",r:"6",fill:"currentColor"})})},22212:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var i=n(31417);const r="BuzoTjBZd1UqCn6DmFJr",s="HKamyJi9H31s99erfVyG";var a=n(86070);const o=()=>(0,a.jsxs)("div",{className:s,children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"12px",width:"56px",x:"0px",y:"0px",viewBox:"0 0 1 100",xmlSpace:"preserve","data-testid":"loadingIcon",children:[(0,a.jsx)("circle",{className:r,cx:"-140",cy:"50",r:"32"}),(0,a.jsx)("circle",{className:r,cx:"0",cy:"50",r:"32"}),(0,a.jsx)("circle",{className:r,cx:"140",cy:"50",r:"32"})]}),(0,a.jsx)("span",{className:"hidden-visually",children:i.Ru.get("page.loading")})]})},64094:(e,t,n)=>{"use strict";n.d(t,{w:()=>D});var i=n(30758),r=n(21743),s=n(91008),a=n(31417),o=n(86573),l=n(78464),c=n(57776),u=n(59147);const d=new c.l("seoRecommendedPodcastPopularEpisode","query","bb8d245043df5c05a1152554e2339cfb9901e12342062c7a27f67477ebea2d01",null);var p=n(71056),m=n(74024),h=n(55645),f=n(62411),g=n(25797),E=n(2244),_=n(14343),y=n(29195),v=n(67668),b=n(32963),S=n(38501),A=n(86551),C=n(36061),T=n(95175);var I=n(92255),O=n(16157),w=n(53149),N=n(75049),R=n(7307),P=n(86070);const L=({className:e,title:t,uri:n,isFullPage:l=!1,...c})=>{const{data:p}=(R={uri:n},(0,u.I)(d,R,L));var R,L;const D=p?.seoRecommendedPodcastPopularEpisode.items,k=function(e){return(e||[]).filter((e=>{return n=t=e.data,"NotFound"!==n?.__typename&&"GenericError"!==n?.__typename&&"Episode"===t.__typename;var t,n}))}(D),x=k.length,U=(0,s.o_h)(n)?.id,M=k.map((e=>e.data.uri)),B=`${n}|Popular Episodes|[${M}]`,j=(0,m.A)(B);(0,i.useEffect)((()=>{j()}),[j]);const F=(0,h.x)(n),V=e=>{F({category:h.J.ClicksLink,destinationUrl:(0,s.o_h)(e)?.toURL()})},{ref:G,inView:H}=(0,r.Wx)({threshold:0}),W=(e=>{const t=(0,v.V)(),n=(0,y.vh)(),r=(0,_.NC)(S.GwQ),s=(0,f.d4)(C.F6),a=(0,f.d4)(A.JJ);return(0,i.useCallback)((async()=>{const i={category:"popular_episodes_ilr_component_visible",action:"viewed",variant:r,label:"dwp",os:(0,b.f)(),context:e,country:s?a:"",sp_t:(0,T.v8)("sp_t")};t?n.send((0,E.r)(i)):n.send((0,g._)(i))}),[a,n,t,s,r,e])})(n);(0,i.useEffect)((()=>{H&&W()}),[H,W]);const z=l?{}:{seeAllUri:`spotify:app:show:${U}:more-popular-episodes`};return(0,P.jsx)(I.$,{elementRef:G,className:e,title:t,seeAllLabel:a.Ru.get("shelf.see-all"),total:x,fullPage:l,showAll:l,testId:c["data-testid"],onClickShelfSeeAll:()=>{F({category:h.J.ShowAll})},onClickShelfTitle:()=>{F({category:h.J.TitleClick})},...z,children:k?.map((({data:e},t)=>{const i="Podcast"===e.podcastV2?.data?.__typename?e.podcastV2.data:null;return(0,P.jsx)(o.U,{description:e.description??"",images:e.coverArt?.sources??[],name:e.name,uri:e.uri,durationMilliseconds:e.duration.totalMilliseconds,releaseDate:(0,N.JO)(e.releaseDate),resume_point:{resume_position_ms:e.playedState.playPositionMilliseconds,fully_played:e.playedState.state===O._w.Completed},showImages:i?.coverArt?.sources??[],isExplicit:(0,w.V)(e.contentRating),is19PlusOnly:(0,w.r)(e.contentRating),sharingInfo:e.sharingInfo,index:t,onClick:V},n)}))})},D=e=>{const t=(0,p.D)({entityType:R.c.SHOW,componentType:"shelf",uri:e.uri});return(0,P.jsx)(l.s,{onError:t,children:(0,P.jsx)(L,{...e})})}},11627:(e,t,n)=>{"use strict";n.d(t,{b:()=>g});var i=n(91008),r=n(31417),s=n(78464),a=n(57776),o=n(59147);const l=new a.l("similarAlbumsBasedOnThisTrack","query","0a4051fc4af251d30db9cc41c41457b969eb573a74841a155f85688c47482cc0",null);var c=n(71056);var u=n(63800),d=n(92255),p=n(7307),m=n(67947),h=n(86070);const f=({uri:e,className:t,title:n,isFullPage:s=!1,...a})=>{const c={uri:e,limit:50,seoExperimentId:m.R7.TRACK_SIMILAR_ALBUMS,albumsOnly:!0},{data:p}=((e,t)=>(0,o.I)(l,e,t))(c),f=p?.seoRecommendedTrackAlbum.totalCount,g=p?.seoRecommendedTrackAlbum.items,E=(g||[]).filter((e=>(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"Album"===e.__typename;var t})(e.data)));if(0===f)return null;const _=(0,i.o_h)(e)?.id,y=`spotify:app:track:${_}:more-like-this`;return(0,h.jsx)(d.$,{total:f,title:n||r.Ru.get("internal-link-recommender.recommended-releases"),seeAllUri:y,seeAllLabel:r.Ru.get("shelf.see-all"),fullPage:s,showAll:s,className:t,testId:a["data-testid"],children:E.map((({data:e},t)=>(0,h.jsx)(u.K,{album:e,index:t,artistURI:e.artists.items[0].uri},e.uri)))})},g=e=>{const t=(0,c.D)({entityType:p.c.TRACK,componentType:"shelf",uri:e.uri});return(0,h.jsx)(s.s,{onError:t,children:(0,h.jsx)(f,{...e})})}},50845:(e,t,n)=>{"use strict";n.d(t,{O:()=>c,U:()=>u});var i=n(30758),r=n(9856),s=n.n(r),a=n(422),o=n(28956),l=n(86070);const c=e=>{switch(e){case"mod":return"macOS"===s().getParser(window.navigator.userAgent).getOSName()?"⌘":"Ctrl";case"command":return"⌘";case"alt":return"macOS"===s().getParser(window.navigator.userAgent).getOSName()?"⌥":"Alt";case"shift":case"ctrl":case"space":return e[0].toUpperCase()+e.slice(1);case"up":return"↑";case"right":return"→";case"down":return"↓";case"left":return"←";default:return e.toUpperCase()}},u=(0,i.memo)((function({children:e}){return(0,l.jsx)(a.E,{as:"kbd",variant:"bodyMedium",className:o.A.key,children:c(e)})}))},21082:(e,t,n)=>{"use strict";n.d(t,{N:()=>p});var i=n(30758),r=n(60749),s=n(91008),a=n(37410),o=n(89402),l=n(30147),c=n(87182),u=n(66387),d=n(86070);const p=(0,i.memo)((0,i.forwardRef)((function(e,t){const{to:n,pageId:p,onClick:g,children:E,draggable:_=!1,state:y,search:v,pathname:b,tabIndex:S,stopPropagation:A=!1,...C}=e,T=(0,o.W)(),I=(0,c.z)(),O=(0,i.useContext)(l.ql),w=b||(0,s.o_h)(n,{parseUnknown:!0}),N=m(w)?w.toURLPath(!0):w,R=(0,s.o_h)(N,{parseUnknown:!0}),P=(0,a.W)({uri:R?.toURI(),type:"link"}),L={onClick:(0,i.useCallback)((e=>{T({intent:"navigate",type:"click",targetUri:n}),A&&e.stopPropagation(),g&&g(e,(0,s.o_h)(n,{parseUnknown:!0})?.toURI())}),[T,n,A,g]),draggable:_,...C},D={pageId:p,...y,referrer:e.referrer||O||I.getReferrer()};if(w){let e,n;e=m(w)?P?(0,u.hF)(w.toURLPath(!0)):w.toURLPath(!0):P?(0,u.hF)(w):w;const i=e.split("?");return i.length>1&&(e=i[0],n=i[1]),(0,d.jsx)(r.N_,{...L,ref:t,to:{pathname:e,search:v??n},state:D,tabIndex:S,children:E})}const k=v?`${n}${v}`:n;return(0,d.jsx)("a",{...L,ref:t,href:k,target:"_blank",rel:(x=L.rel,[...f,...x?.split(" ").filter((e=>h.has(e)))??[]].join(" ")),tabIndex:S,children:E});var x})));function m(e){return!!e&&"string"!=typeof e}const h=new Set(["nofollow"]),f=["noopener"]},92202:(e,t,n)=>{"use strict";n.d(t,{LoadingPage:()=>g});var i=n(30758),r=n(97500),s=n.n(r),a=n(59042),o=n(422),l=n(51560),c=n(31417),u=n(22212);function d(e,t){switch(t.type){case"LOADING":return{...e,loading:!0};case"ERROR":return{...e,loading:!1,error:!0};default:return e}}var p=n(39566);const m="K7fGF95OD9aI3zdYnFXg";var h=n(86070);const f=({loading:e=!0})=>(0,h.jsx)("div",{className:s()(m,"contentSpacing"),children:e?(0,h.jsx)(u.m,{}):null}),g=e=>{const{hasError:t,errorMessage:n,loadOffline:r=!1,timeoutInMs:u}=e,g=(0,p.n)(),[E,_,y]=function(e,t,n=3e4){const[r,s]=(0,i.useReducer)(d,{loading:!1,error:e});return(0,i.useEffect)((()=>{if(e)return s({type:"ERROR"}),()=>{};const t=setTimeout((()=>{s({type:"LOADING"})}),200);return()=>{clearTimeout(t)}}),[e]),(0,i.useEffect)((()=>{let e;return t&&(e=window.setTimeout((()=>{s({type:"ERROR"})}),n)),()=>{clearTimeout(e)}}),[r.loading,t,n]),[r.loading,t,r.error]}(t,g,u),[v,b]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{const e=setTimeout((()=>{b(!0)}),1e3);return()=>{clearTimeout(e)}}),[]),_||r?y?(0,h.jsxs)("div",{className:s()(m,"contentSpacing"),children:[(0,h.jsx)(l.b,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:n}),(0,h.jsx)(o.E,{as:"p",variant:"bodyMedium",children:c.Ru.get("error.not_found.body")})]}):v?(0,h.jsx)(f,{loading:E}):(0,h.jsx)("div",{"data-testid":"loading-page"}):(0,h.jsxs)("div",{className:s()(m,"contentSpacing"),children:[(0,h.jsx)(a.P,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:c.Ru.get("offline.feedback-text")})]})}},82909:(e,t,n)=>{"use strict";n.d(t,{r:()=>E});var i=n(30758),r=n(97500),s=n.n(r),a=n(19830);var o=n(37178),l=n(34990),c=n(99644);const u="eSMjmiD29Ox35O95waw6",d="y6bXimbi8JAcblOFxTap",p="EOLjmX4qyDsRvnxBK0JO",m="aMhBfOqJxn4jKzFN07Lg",h="W5cB_o0XkkU7Q8tlTGxq",f="PGSe59fD1Hwc9yUM2d3U";var g=n(86070);const E=({children:e,title:t,speed:n=.2,pauseAtEndEdgeDurationMs:r=1200,initialMouseIntDelayMs:E=200,startAnimationOnMount:_=!0,startAnimationOnMountDelayMs:y=1e3,iterationCount:v="single",iterationCountOnTouchDevices:b="infinite",scrollMethod:S="transform",equalGradientWidth:A})=>{const C=(0,i.useRef)(null),T=(0,i.useRef)(null),I=(0,i.useRef)(null),O=(0,i.useRef)(0),w=(0,i.useRef)("scrolling"),N=(0,o.W)()?"rtl":"ltr",R=(0,i.useRef)("ltr"),P=(0,i.useRef)(v),L=(0,l.j)(),D=(0,a.U)("(any-pointer: coarse)"),k=(0,i.useRef)({initialMouseInteraction:null,animationOnMount:null}),x=(0,i.useCallback)((()=>I.current&&C.current?I.current.clientWidth-C.current.clientWidth:0),[]),U=(0,i.useCallback)((()=>"rtl"===R.current?1:-1),[R]),M=(0,i.useCallback)((()=>{const e=x();return e>0&&N!==R.current?0+-1*U()*e:0}),[x,N,U]),B=(0,i.useCallback)((()=>{I.current?.style.setProperty("--trans-x",`${M()}px`)}),[M]),j=(0,i.useCallback)((e=>{C.current?.classList.toggle(p,e)}),[]),F=(0,i.useCallback)((()=>{if(L)return;if(O.current)return;let e=!1,t=0,i=1,s=!1;const a=o=>{const l=x();if(l<=0)return;let c=!0,u=t;if(e){if(s)j(!1),o>s+r&&(s=!1);else if("paused"===w.current);else{u+=i*(60*(o-e)/1e3)*n,u>l?(i*=-1,s=o,u=l):u<0&&(i*=-1,s=o,u=0,c="infinite"===P.current)}if(u!==t&&j(!0),t=u,"transform"===S){const e=U()*t+M();I.current?.style.setProperty("--trans-x",`${e}px`),T.current.scrollLeft=0}else"scroll"===S&&(T.current.scrollLeft=t)}e=o,O.current=0,c&&(O.current=requestAnimationFrame(a))};w.current="scrolling",a(0)}),[L,x,S,r,n,j,U,M]),V=(0,i.useCallback)((()=>O.current),[]),G=(0,i.useCallback)((()=>{w.current="paused"}),[]),H=(0,i.useCallback)((()=>{w.current="scrolling"}),[]),W=(0,i.useCallback)((()=>{cancelAnimationFrame(O.current),w.current="paused",O.current=0;const e=x();j(e>0)}),[x,j]),z=(0,i.useCallback)((()=>{Object.values(k.current).forEach((e=>e&&clearTimeout(e)))}),[]),K=(0,i.useCallback)((e=>{V()?G():"focus"!==e&&(k.current.initialMouseInteraction=setTimeout(F,E))}),[F,G,E,V]),Y=(0,i.useCallback)((()=>{k.current.initialMouseInteraction&&clearTimeout(k.current.initialMouseInteraction),V()&&H()}),[H,V]);return(0,i.useEffect)((()=>{_&&(k.current.animationOnMount&&clearTimeout(k.current.animationOnMount),k.current.animationOnMount=setTimeout(F,y))}),[F,y,_]),(0,i.useEffect)((()=>()=>{W(),z(),B()}),[W,z,B]),(0,i.useEffect)((()=>{const e=I.current?.children[0];e&&(R.current=getComputedStyle(e).direction,"rtl"===R.current&&C.current?.classList.add(m)),B()}),[N,M,B]),(0,c.w)({onResize:()=>{W(),B()},refOrElement:C,observeOnly:"width"}),(0,i.useEffect)((()=>{D&&(P.current=b)}),[D,b]),(0,g.jsx)("div",{ref:C,className:s()(u,A&&d),onMouseOver:()=>K("mouse"),onFocus:()=>K("focus"),onMouseOut:Y,onBlur:Y,title:L&&t?t:void 0,children:(0,g.jsx)("div",{ref:T,className:h,children:(0,g.jsx)("div",{ref:I,className:s()(f,A&&d),children:e})})})}},47660:(e,t,n)=>{"use strict";n.d(t,{k:()=>m});var i=n(30758),r=n(62411),s=n(60749),a=n(31417),o=n(89402),l=n(2092),c=n(87182),u=n(66387),d=n(77008),p=n(86070);const m=(0,i.memo)((0,i.forwardRef)((function(e,t){const{onClick:n,to:m,referrer:h,navigationalRoot:f,...g}=e,E=(0,c.z)(),_=a.Ru.getLocaleForURLPath(),y=(0,r.d4)(l.M),v=(0,r.d4)(l.N),b=(0,u.CW)(m),S=(0,d.p)({urlLocale:_,entity:b,localeFeatureFlag:y,entityFeatureFlag:v,type:"link"})?(0,u.hF)(m):m,A=(0,o.W)(),C=(0,i.useCallback)((e=>{A({intent:"navigate",type:"click",targetUri:S}),n&&n(e)}),[A,n,S]);return(0,p.jsx)(s.k2,{ref:t,draggable:!1,end:e.end,to:S,state:{referrer:h||E.getReferrer(),navigationalRoot:f},"aria-label":e["aria-label"],tabIndex:e.tabIndex,onClick:C,...g,children:e.children})})))},60281:(e,t,n)=>{"use strict";n.d(t,{Ih:()=>g,Tc:()=>f,hD:()=>h});var i=n(30758),r=n(97500),s=n.n(r),a=n(91008),o=n(31417),l=n(99701);const c="atZHmMpyVJ8qoM6YbYdA",u="lokp6OWWTWj_WazpVjAR";var d=n(86070);const p=6048e5,m=3e5;function h(e,t,n,i=!1){const r=(0,a.gHQ)(e),s=function(e){const t=new Date;return!!e&&Math.floor(t.getTime()-Date.parse(e))m}(i,n);return r&&s&&!o}const f=i.memo((function({className:e,label:t}){const n=t||o.Ru.get("type.newEpisode");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Zp,{label:n,children:(0,d.jsx)("span",{className:s()(c,e),"aria-label":n})}),t]})})),g=i.memo((function({isMusicAndTalk:e,className:t}){const n=e?o.Ru.get("type.newEpisode"):o.Ru.get("type.newPodcastEpisode");return(0,d.jsx)(f,{label:n,className:s()(u,t)})}))},83812:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var i=n(30758),r=n(14343),s=n(86070);const a=({renderOldExperience:e=(()=>null),renderNewExperience:t=(()=>null),forceNewExperience:n,property:i})=>(0,r.NC)(i)||n?t():e(),o=({suspenseFallback:e=null,renderNewExperience:t,renderOldExperience:n,forceNewExperience:r=!1,property:o})=>(0,s.jsx)(i.Suspense,{fallback:e,children:(0,s.jsx)(a,{renderNewExperience:t,renderOldExperience:n,forceNewExperience:r,property:o})})},39498:(e,t,n)=>{"use strict";n.d(t,{i:()=>s});const i={arrow:"aYmHu0jEKnESRGVwWKTv"};var r=n(86070);function s(){return(0,r.jsx)("div",{"data-popper-arrow":"",className:i.arrow})}},21263:(e,t,n)=>{"use strict";n.d(t,{Y:()=>u});var i=n(30758),r=n(97500),s=n.n(r),a=n(39498);const o="upjpI9SI9f9UWlL8aUrH",l="SALoRLwOZHo954l1kF8b";var c=n(86070);const u=(0,i.forwardRef)((({colorSet:e="encore-announcement-set",children:t},n)=>{const[r,u]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{const e=setTimeout((()=>{u(!0)}),1e3);return()=>clearTimeout(e)}),[]),(0,c.jsxs)("div",{ref:n,className:s()(e,o,{[l]:r}),role:"tooltip",children:[t,(0,c.jsx)(a.i,{})]})}))},90696:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var i=n(30758),r=n(75285),s=(n(97335),n(38521));var a=n(86070);r.ae.plugin(r.lW);const o=(0,i.memo)((function({className:e,children:t,options:n,style:r,onInstanceCreated:o}){const l=function(){const[e,t]=(0,i.useState)("mouse");return(0,i.useEffect)((()=>{const e=e=>{t(e.pointerType)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}}),[]),e}(),c=(0,i.useRef)(null),[u]=(0,s.d)({defer:!1,options:{update:{elementEvents:[],...n?.update},scrollbars:{theme:"os-theme-spotify",autoHide:"mouse"===l?"leave":"never",autoHideDelay:800,clickScroll:!0,autoHideSuspend:!1,...n?.scrollbars},...n},events:{initialized:o}});return(0,i.useLayoutEffect)((()=>{c.current&&u(c.current)}),[u]),(0,a.jsx)("div",{"data-overlayscrollbars-initialize":!0,style:r,ref:c,className:e,children:t})}))},34733:(e,t,n)=>{"use strict";n.d(t,{H:()=>h,R:()=>f});var i=n(30758),r=n(68049),s=n(81231),a=n(73265),o=n(44481),l=n(93523),c=n(31417),u=n(99701),d=n(35352);const p="ix_8kg3iUb9VS5SmTnBY";var m=n(86070);let h=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({});const f=i.memo((0,i.forwardRef)((function(e,t){const{onClick:n,isPlaying:i,locked:f,version:g=h.primary,size:E="medium",disabled:_=!1,children:y,ariaPauseLabel:v,ariaPlayLabel:b,isLoading:S,condensedAll:A=!1,...C}=e,T=e=>{const{currentTarget:t,detail:r}=e;n(e),i||(0,d.aX)(e,"play/resume"),r>0&&t&&t.blur()};let I=c.Ru.get("play"),O=r.A;f?(I=c.Ru.get("mwp.header.content.unavailable"),O=s.u):i?(I=v??c.Ru.get("pause"),O=a._):I=b??I;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u.Zp,{label:I,showDelay:u.uF,children:(0,m.jsx)("div",{className:p,children:(()=>{const e={iconOnly:O,size:E,onClick:T,disabled:_||S,"aria-label":I,ref:t,"data-testid":"play-button",...C};switch(g){case h.secondary:return(0,m.jsx)(o.$,{...e,colorSet:"invertedLight"});case h.transparent:return(0,m.jsx)(l.H,{...e,semanticColor:"textBase",condensedAll:A});default:return(0,m.jsx)(o.$,{...e})}})()})}),y]})})))},63352:(e,t,n)=>{"use strict";n.d(t,{$$:()=>o,NV:()=>s,Pj:()=>u,iE:()=>l});var i=n(30758),r=n(86070);let s=function(e){return e.TITLE="title",e.DESCRIPTION="description",e.NONE="NONE",e}({});const a={isOpen:!1,isImagePickerOpen:!1,playlistDetails:{uri:"",name:"",description:"",image:void 0},focusedElement:s.NONE},o=(0,i.createContext)(void 0),l=(0,i.createContext)(a);function c(e,t){switch(t.type){case"open":return{...e,isOpen:!0,playlistDetails:t.playlistDetails,focusedElement:t.focusedElement||s.NONE};case"close":return{...a};case"openWithImagePicker":return{...e,isOpen:!0,isImagePickerOpen:!0,playlistDetails:t.playlistDetails,focusedElement:s.NONE};default:throw new Error("Unknown action received!")}}const u=({children:e})=>{const[t,n]=(0,i.useReducer)(c,a);return(0,r.jsx)(o.Provider,{value:n,children:(0,r.jsx)(l.Provider,{value:t,children:e})})}},95631:(e,t,n)=>{"use strict";n.d(t,{W:()=>p,d:()=>d});var i=n(30758),r=n(23137),s=n(97500),a=n.n(s),o=n(74180),l=n(27102);const c="bkFQH4uasL3pXqN9eDSi";var u=n(86070);const d={top:"top",topRight:"top-end",topLeft:"top-start",left:"left",leftTop:"left-start",leftBottom:"left-end",bottom:"bottom",bottomLeft:"bottom-start",bottomRight:"bottom-end",right:"right",rightTop:"right-start",rightBottom:"right-end",auto:"auto"},p=({visible:e,overlay:t,placement:n,children:s,childRef:d,maxWidth:p=336,hideArrow:m=!1,className:h="",tippyWrapperClassName:f,popperOptions:g={},onHide:E,zIndex:_,fadeOut:y=!1,useLazyMounting:v=!1,renderInline:b=!0,theme:S="activation",triggerTarget:A,offset:C=[0,14],aria:T,animation:I=!0,keepChildrenMounted:O=!1,colorSet:w="encore-announcement-set"})=>{const[N,R]=(0,i.useState)(!1),{isOnboardingComplete:P}=(0,o.er)(),L=(0,i.useMemo)((()=>({onMount:()=>R(!0),onHidden:()=>R(!1)})),[]),D=e&&P,k=(0,i.useCallback)(((e,t)=>E?.(t)),[E]),x=(0,l.ZY)();return O||D||y?(0,u.jsx)(i.Suspense,{fallback:s??null,children:(0,u.jsx)(r.Ay,{animation:!!I&&"shift-toward-subtle",maxWidth:p,aria:T,visible:D,theme:S,placement:n||"auto",interactive:!0,arrow:!m,content:N||!v?t:"",className:a()(h,w),onClickOutside:k,popperOptions:g,zIndex:_,offset:C,reference:d,triggerTarget:A,...v&&L,appendTo:!x||b?void 0:()=>x.body,children:(0,u.jsx)("div",{className:a()(c,f),children:s})})}):(0,u.jsx)(u.Fragment,{children:s})}},18113:(e,t,n)=>{"use strict";n.d(t,{E:()=>b,l:()=>y});var i=n(30758),r=n(14343),s=n(91008),a=n(49419),o=n(35523),l=n(26413),c=n(95446),u=n(96533),d=n(57764);const p=e=>{const t=(0,l.U)(e,c.RB),{metadataOptions:n,contentsOptions:i}=(0,u.$)(t,"");return(0,d.r)(e,n,i)},m=({children:e,callback:t,hoverDelayMs:n=200})=>{const r=(0,i.useRef)();return i.cloneElement(e,{onMouseEnter:i=>{r.current=setTimeout(t,n),e.props.onMouseEnter?.(i)},onMouseLeave:t=>{clearTimeout(r.current),e.props.onMouseLeave?.(t)}})},h=({children:e,callback:t,...n})=>i.cloneElement(e,{onMouseDown:n=>{t(),e.props.onMouseDown?.(n)},...n}),f=({children:e,callback:t})=>{const n=(0,i.useRef)(t);return(0,i.useEffect)((()=>{n.current()}),[]),e};var g=n(38501),E=n(85907),_=n(86070);let y=function(e){return e[e.OnMouseDown=0]="OnMouseDown",e[e.OnHover=1]="OnHover",e[e.OnRender=2]="OnRender",e}({});const v=e=>{const t=(e=>{const t=(0,s.o_h)(e);switch(t?.type){case s.NQG.ALBUM:return a.w;case s.NQG.PLAYLIST:case s.NQG.PLAYLIST_V2:return p;case s.NQG.ARTIST:return o.R;default:return()=>()=>{}}})(e.uri)(e.uri);switch(e.trigger){case y.OnMouseDown:return(0,_.jsx)(h,{callback:t,children:e.children});case y.OnHover:return(0,_.jsx)(m,{callback:t,hoverDelayMs:e.hoverDelayMs,children:e.children});case y.OnRender:return(0,_.jsx)(f,{callback:t,children:e.children});default:return(0,E.d)(e)}},b=({uri:e,trigger:t,children:n,...s})=>{const a=(0,r.NC)(g.JhO,{loadingValue:!1}),o=i.cloneElement(n,s);return a?(0,_.jsx)(i.Fragment,{children:(0,_.jsx)(v,{uri:e,trigger:t,children:o})},e):o}},70196:(e,t,n)=>{"use strict";n.d(t,{E:()=>u});var i=n(30758),r=n(3956),s=n(14343),a=n(43361),o=n(74180),l=n(38501),c=n(86070);function u({children:e,refClassName:t,content:n,offset:u,placement:d,isVisible:p,isOnboarding:m=!1}){const h=(0,i.useRef)(null),f=(0,s.NC)(l.zJD),{isOnboardingComplete:g}=(0,o.er)(),E=p&&f&&(m?!g:g),_=(0,i.useRef)(null);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{role:"presentation",ref:h,className:t,children:e}),E&&(0,c.jsx)(r.Ay,{visible:!0,interactive:!0,aria:{expanded:!0},arrow:!0,placement:d,offset:u,appendTo:a.D,reference:h,onShow:e=>{e.reference.setAttribute("data-open","true"),e.popper.style.setProperty("view-transition-name",`popover-${e.id}`)},onHide:e=>{e.reference.removeAttribute("data-open"),e.popper.style.removeProperty("view-transition-name")},render:e=>(0,c.jsx)("div",{ref:_,"data-placement":e["data-placement"],"data-testid":"popover",children:n}),popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}},{name:"arrow",options:{padding:10}}]}})]})}},50342:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var i=n(30758);const r="PcjBXoPwLAnvPiTQx79g",s="kMVnZekiwoVgg0Vjd418";var a=n(86070);const o=20*Math.PI,l=i.memo((function({percentage:e,size:t,ariaValueText:n},i){const l=o-e/100*o;return(0,a.jsxs)("svg",{height:t,width:t,viewBox:"0 0 24 24",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e),...n?{"aria-valuetext":n}:{},...i,children:[(0,a.jsx)("circle",{className:r,r:"10",cx:"12",cy:"12"}),(0,a.jsx)("circle",{"data-testid":"circleColor",className:s,strokeDasharray:`${o} ${o}`,strokeDashoffset:`${l}`,r:"10",cx:"12",cy:"12"}),(0,a.jsx)("rect",{width:"6",height:"6",fill:"white",x:"9",y:"9"})]})}))},63800:(e,t,n)=>{"use strict";n.d(t,{K:()=>o});var i=n(51281),r=n(37491),s=n(44672),a=n(86070);const o=({album:e,index:t,artistURI:n,onClick:o})=>(0,a.jsx)(s.pZ,{value:"card",index:t,children:(0,a.jsx)(i.R,{index:t,latest:!1,showType:!0,onClick:o,...(0,r.m)(e,n,e.name)})})},97503:(e,t,n)=>{"use strict";n.d(t,{Ad:()=>a,O_:()=>s,wK:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)({ids:[],setIds:()=>{},dropOriginUri:void 0,setDropOriginUri:()=>{},sectionId:0,setSectionId:()=>{},draggingIsInProgress:!1,setDraggingIsInProgress:()=>{}}),a=({children:e})=>{const[t,n]=(0,i.useState)([]),[a,o]=(0,i.useState)(void 0),[l,c]=(0,i.useState)(0),[u,d]=(0,i.useState)(!1),p=(0,i.useMemo)((()=>({ids:t,setIds:n,dropOriginUri:a,setDropOriginUri:o,sectionId:l,setSectionId:c,draggingIsInProgress:u,setDraggingIsInProgress:d})),[t,n,a,o,l,c,u,d]);return(0,r.jsx)(s.Provider,{value:p,children:e})};function o(){return(0,i.useContext)(s).ids}},10495:(e,t,n)=>{"use strict";n.d(t,{JT:()=>o,ZC:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({children:e,mainLandmarkRef:t,lyricsCinemaRef:n,leftSidebarRef:a,rightSidebarRef:o,topBarRef:l,nowPlayingBarRef:c,mainContentRef:u})=>{const d=(0,i.useMemo)((()=>({mainLandmarkRef:t,lyricsCinemaRef:n,leftSidebarRef:a,rightSidebarRef:o,nowPlayingBarRef:c,topBarRef:l,mainContentRef:u})),[t,n,a,o,l,c,u]);return(0,r.jsx)(s.Provider,{value:d,children:e})},o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("GlobalElementRefsContext used without being initialized.");return e}},87257:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,g:()=>u});var i=n(30758),r=n(40638),s=n(78505),a=n(30147),o=n(13268);const l=30;function c(){const e=parseInt(o.A.TRACKLIST_HEADER_HEIGHT,10),t=s.uC+e;u((0,a.v7)(),t,30)}function u(e,t=l,n=l,s=l,a=200){const o=(0,r.YQ)((t=>{if(!e.current)return;const n=t<0?-1:1,i=100*t*t;e.current.scrollTop=e.current.scrollTop+n*i}),50,{leading:!0,trailing:!1,maxWait:50}),c=(0,i.useCallback)((()=>{if(!e.current)return;let i=0,r=0,l=null,c=Date.now(),u=0;const d=e.current.getBoundingClientRect(),p=()=>{l&&window.cancelAnimationFrame(l),l=null,o.cancel()},m=()=>{o(u),l=window.requestAnimationFrame(m)},h=e=>{i=e.clientY,r=e.clientX,u=(()=>{const{top:e,right:o,bottom:l,left:u}=d;if(!(r>=u&&r<=o))return 0;const p=e,m=e+t+s,h=l-n-s,f=l;let g=0;const E=i>=p&&i<=m,_=i>=h&&i<=f,y=Date.now()-c;if(E&&y>a)if(ia&&(g=i>f-s?1:(i-h)/(f-n-h));return E||_||(c=Date.now()),g})(),0!==u?l??=window.requestAnimationFrame(m):p()},f=()=>{p(),document.removeEventListener("dragover",h)};document.addEventListener("dragend",f,{once:!0}),document.addEventListener("drop",f,{once:!0}),document.addEventListener("pointerup",f,{once:!0}),document.addEventListener("dragover",h)}),[s,n,t,a,e,o]);(0,i.useEffect)((()=>(document.addEventListener("dragstart",c),()=>{document.removeEventListener("dragstart",c)})),[c])}},39795:(e,t,n)=>{"use strict";n.d(t,{g:()=>o,s:()=>l});var i=n(30758),r=n(92654),s=n(86070);const a=(0,r.vt)((e=>({lastFilterState:"",lastFilteredUri:"",setLastState:(t,n)=>{e({lastFilterState:t,lastFilteredUri:n})}}))),o=(0,i.createContext)({setFilter:()=>{throw new Error("setFilter must be used within a FilterProvider")},filter:""}),l=({uri:e,children:t})=>{const{lastFilterState:n,lastFilteredUri:r,setLastState:l}=a.getState(),[c,u]=(0,i.useState)(r===e?n:""),d=(0,i.useCallback)((t=>{u(t),l(t,e)}),[l,e]),p=(0,i.useMemo)((()=>({filter:c,setFilter:d})),[c,d]);return(0,s.jsx)(o.Provider,{value:p,children:t})}},26413:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,U:()=>l});var i=n(30758),r=n(62021),s=n(86070);const a=e=>Boolean(e);function o({uri:e,children:t,defaultState:n,sortContext:o,localStorageKey:l="sortedState",validator:c=a}){const[u={},d]=(0,r.x)(l,{}),p=(0,i.useRef)(u);(0,i.useEffect)((()=>{p.current=u}));const m=(0,i.useCallback)((t=>{if(JSON.stringify(t)===JSON.stringify(n)){const t={...p.current};delete t[e],d(t)}else d({...p.current,[e]:t})}),[n,d,e]),h=(0,i.useMemo)((()=>{const t=u[e];return{sortState:c(t)?t:n,setSortState:m}}),[u,e,c,n,m]);return(0,s.jsx)(o.Provider,{value:h,children:t})}const l=(e,t,n="sortedState",i=a)=>{const[s={}]=(0,r.x)(n,{}),o=s[e];return i(o)?o:t}},73043:(e,t,n)=>{"use strict";n.d(t,{k:()=>O});var i=n(30758),r=n(97500),s=n.n(r),a=n(68933),o=n(79784),l=n(97548),c=n(14343),u=n(31417),d=n(21082),p=n(422);const m="a7lvtXATo3HALtrsOHtO";var h=n(86070);const f=(0,i.memo)((function(e){const{link:t,pageId:n,className:i,label:r,state:a,pathname:o,onClick:l}=e;return(0,h.jsx)(d.N,{to:t,className:s()(m,i),pageId:n,state:a,pathname:o,"data-testid":e["data-testid"],onClick:l,children:(0,h.jsx)(p.E,{variant:"bodySmallBold",semanticColor:"textSubdued",children:r||u.Ru.get("search.see-all")})})}));var g=n(95420),E=n(44778),_=n(25187);const y="zrhBuOxDFi27sjfNkHYd",v=({uri:e})=>{const{shelfURIs:t,addURI:n,removeURI:r}=(0,_.T)(),s=t.includes(e),a=(0,i.useCallback)((()=>{s?r(e):n(e)}),[s,e,n,r]);return s?(0,h.jsx)(g.H,{semanticColor:"textBrightAccent",size:"small",onClick:a,className:y}):(0,h.jsx)(E.z,{semanticColor:"textSubdued",size:"small",onClick:a,className:y})};var b=n(38501);const S="_WZEvLWCKIvdsvaCs6x5",A="LkM9BnGveKGlS4FvuwBa",C="KpzkVLd9fh2ZrKqZoFg5",T="MVQhEntGN2lszQdk9z4m",I="ag7k_TUtB1kcSDM06CkY",O=i.memo((({pretitle:e,trailing:t,title:n,titleVariant:i="titleSmall",subtitle:r,titleMedia:p,titleUri:m,seeAllUri:g,seeAllLabel:E=u.Ru.get("shelf.see-all"),seeAllProps:_,pageId:y,showSeeAll:O,className:w,onClickTitle:N,onClickSeeAll:R,titleMediaCircle:P})=>{const L=(0,c.NC)(b._Ie),D=n.replace(/\s/g,"-").toLowerCase();return(0,h.jsx)(l.v,{"data-testid":"rich-title-row-shelf-header",id:D,variant:"naked",paddingInlineStart:"none",paddingInlineEnd:"none",className:s()(S,w),title:(()=>{const e=m||g;return(0,h.jsxs)(a.d,{semanticColor:"textBase",lineClamp:1,variant:i,as:"h2",className:s()(C),children:[e?(0,h.jsx)(d.N,{"data-testid":"see-all-link",to:e,pageId:y,onClick:N,children:n}):n,L&&y&&(0,h.jsx)("div",{className:A,children:(0,h.jsx)(v,{uri:y})})]})})(),pretitle:e?(0,h.jsx)(a.d,{variant:"marginal",semanticColor:"textSubdued",children:e}):null,subtitle:r?(0,h.jsx)(a.d,{variant:"bodySmall",semanticColor:"textSubdued",children:r}):null,media:p?(0,h.jsx)(o.C,{className:I,src:p,circle:P}):null,trailing:void 0!==t?t:O&&g?(0,h.jsx)(f,{link:g,className:T,pageId:y,onClick:R,label:E,..._}):null})}))},92255:(e,t,n)=>{"use strict";n.d(t,{$:()=>f,Y:()=>m});var i=n(30758),r=n(97500),s=n.n(r),a=n(78464),o=n(73043),l=n(11153),c=n(20489),u=n(35163),d=n(69262),p=n(86070);const m=260,h=i.memo((function({title:e,titleUri:t,subtitle:n,pretitle:r,titleMedia:a,titleMediaCircle:u,trailing:h,children:f,seeAllUri:g,showAll:E,className:_="",total:y,testId:v="component",id:b,seeAllLabel:S,alwaysShowSeeAll:A=!1,showSeeAll:C=!0,onClickShelfTitle:T,onClickShelfSeeAll:I,elementRef:O,renderSubHeader:w,rowGap:N,colGap:R,withEncoreCards:P=!0,fullPage:L=!1,minNrCardsToRender:D=10,rowTruncationMethod:k="floor"}){const[x,U]=(0,i.useState)(0),[M,B]=(0,i.useState)(1),j=(0,c.R)(),F=(0,i.useCallback)((e=>{const{columnCount:t}=e;if(U(t),E)B(1/0);else{const n=j.getMaxRowCount?.(e)??1,i="floor"===k?Math.floor:Math.ceil,r=Math.max(1,Math.min(i((y??1/0)/t),n));B(r)}}),[y,E,j,k]),V=(0,i.useCallback)((({columnCount:e})=>{let t=Math.max(D,e)*M;return M>1&&(t=e*M),(0,p.jsx)(p.Fragment,{children:E?f:Array.isArray(f)&&f.flat().filter(((e,n)=>nx||A)&&C&&!E),H=M*x;return(0,p.jsxs)("section",{ref:O,className:s()(_,d.A.shelf,"Shelf",{[d.A.withEncoreCards]:P,[d.A.fullPage]:L}),"data-shelf":"shelf","data-testid":`${v}-shelf`,"aria-label":e??"",style:{"--shelf-min-height":`${m}px`},children:[e&&(0,p.jsx)("div",{className:d.A.header,children:(0,p.jsx)(o.k,{seeAllUri:g,seeAllLabel:S,pageId:b,showSeeAll:G,onClickTitle:T,onClickSeeAll:I,title:e,titleUri:t,subtitle:n,pretitle:r,titleMedia:a,titleMediaCircle:u,trailing:h,titleVariant:L?"titleMedium":void 0})}),w&&(0,p.jsx)("div",{className:d.A.subHeader,children:w()}),(0,p.jsx)(l.E,{className:s()(d.A.shelfGrid,{[d.A.singleRow]:!E,[`nrVisibleCards-${H}`]:!E}),render:V,onLayoutChange:F,rowGap:N,colGap:R,rowCount:M})]})}));h.displayName="BaseShelf";const f=e=>(0,p.jsx)(a.s,{onError:e=>{(0,u.Jy)(e,"Shelf")},children:(0,p.jsx)(h,{...e})})},95695:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(97500),r=n.n(i),s=n(47660);const a="liKqY2CEkAKTwX2SfNCu",o="fwTMCeAaUoWDj9WcQbgy",l="bEEDwYBSsninmQ7a4QK9";var c=n(86070);const u=({className:e,noLink:t=!1,customLink:n="/",hasText:i=!1})=>{const u="Spotify",d=(0,c.jsxs)("svg",{viewBox:"0 0 167.5 167.5",className:r()(l),children:[(0,c.jsx)("title",{children:u}),(0,c.jsx)("path",{fill:"currentColor",d:"M83.7 0C37.5 0 0 37.5 0 83.7c0 46.3 37.5 83.7 83.7 83.7 46.3 0 83.7-37.5 83.7-83.7S130 0 83.7 0zM122 120.8c-1.4 2.5-4.6 3.2-7 1.7-19.8-12-44.5-14.7-73.7-8-2.8.5-5.6-1.2-6.2-4-.2-2.8 1.5-5.6 4-6.2 32-7.3 59.6-4.2 81.6 9.3 2.6 1.5 3.4 4.7 1.8 7.2zM132.5 98c-2 3-6 4-9 2.2-22.5-14-56.8-18-83.4-9.8-3.2 1-7-1-8-4.3s1-7 4.6-8c30.4-9 68.2-4.5 94 11 3 2 4 6 2 9zm1-23.8c-27-16-71.6-17.5-97.4-9.7-4 1.3-8.2-1-9.5-5.2-1.3-4 1-8.5 5.2-9.8 29.6-9 78.8-7.2 109.8 11.2 3.7 2.2 5 7 2.7 10.7-2 3.8-7 5-10.6 2.8z"})]}),p=(0,c.jsxs)("svg",{viewBox:"0 0 1134 340",className:r()(o),children:[(0,c.jsx)("title",{children:u}),(0,c.jsx)("path",{fill:"currentColor",d:"M8 171c0 92 76 168 168 168s168-76 168-168S268 4 176 4 8 79 8 171zm230 78c-39-24-89-30-147-17-14 2-16-18-4-20 64-15 118-8 162 19 11 7 0 24-11 18zm17-45c-45-28-114-36-167-20-17 5-23-21-7-25 61-18 136-9 188 23 14 9 0 31-14 22zM80 133c-17 6-28-23-9-30 59-18 159-15 221 22 17 9 1 37-17 27-54-32-144-35-195-19zm379 91c-17 0-33-6-47-20-1 0-1 1-1 1l-16 19c-1 1-1 2 0 3 18 16 40 24 64 24 34 0 55-19 55-47 0-24-15-37-50-46-29-7-34-12-34-22s10-16 23-16 25 5 39 15c0 0 1 1 2 1s1-1 1-1l14-20c1-1 1-1 0-2-16-13-35-20-56-20-31 0-53 19-53 46 0 29 20 38 52 46 28 6 32 12 32 22 0 11-10 17-25 17zm95-77v-13c0-1-1-2-2-2h-26c-1 0-2 1-2 2v147c0 1 1 2 2 2h26c1 0 2-1 2-2v-46c10 11 21 16 36 16 27 0 54-21 54-61s-27-60-54-60c-15 0-26 5-36 17zm30 78c-18 0-31-15-31-35s13-34 31-34 30 14 30 34-12 35-30 35zm68-34c0 34 27 60 62 60s62-27 62-61-26-60-61-60-63 27-63 61zm30-1c0-20 13-34 32-34s33 15 33 35-13 34-32 34-33-15-33-35zm140-58v-29c0-1 0-2-1-2h-26c-1 0-2 1-2 2v29h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v58c0 23 11 35 34 35 9 0 18-2 25-6 1 0 1-1 1-2v-21c0-1 0-2-1-2h-2c-5 3-11 4-16 4-8 0-12-4-12-12v-54h30c1 0 2-1 2-2v-22c0-1-1-2-2-2h-30zm129-3c0-11 4-15 13-15 5 0 10 0 15 2h1s1-1 1-2V93c0-1 0-2-1-2-5-2-12-3-22-3-24 0-36 14-36 39v5h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v89c0 1 1 2 2 2h26c1 0 1-1 1-2v-89h25l37 89c-4 9-8 11-14 11-5 0-10-1-15-4h-1l-1 1-9 19c0 1 0 3 1 3 9 5 17 7 27 7 19 0 30-9 39-33l45-116v-2c0-1-1-1-2-1h-27c-1 0-1 1-1 2l-28 78-30-78c0-1-1-2-2-2h-44v-3zm-83 3c-1 0-2 1-2 2v113c0 1 1 2 2 2h26c1 0 1-1 1-2V134c0-1 0-2-1-2h-26zm-6-33c0 10 9 19 19 19s18-9 18-19-8-18-18-18-19 8-19 18zm245 69c10 0 19-8 19-18s-9-18-19-18-18 8-18 18 8 18 18 18zm0-34c9 0 17 7 17 16s-8 16-17 16-16-7-16-16 7-16 16-16zm4 18c3-1 5-3 5-6 0-4-4-6-8-6h-8v19h4v-6h4l4 6h5zm-3-9c2 0 4 1 4 3s-2 3-4 3h-4v-6h4z"})]}),m=i?p:d;return t?(0,c.jsx)("div",{className:r()(a,e),children:m}):n.startsWith("https://")?(0,c.jsx)("a",{href:n,className:r()(a,e),children:m}):(0,c.jsx)(s.k,{to:n,className:r()(a,e),children:m})}},94141:(e,t,n)=>{"use strict";n.d(t,{z:()=>d});var i=n(30758),r=n(97500),s=n.n(r),a=n(42871),o=n(6217);const l="qSTDtICR1fiIGRni1cwy",c="CUSHxAzlZWmBNuM0o1Vq";var u=n(86070);const d=({children:e,className:t,arrowClassName:n,disableAutoFocus:r})=>{const d=(0,i.useRef)(null);return(0,o.s)(),(0,a.i)({ref:r?{current:null}:d,preventScroll:!0}),(0,u.jsxs)("div",{...r&&{tabIndex:-1},ref:d,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},className:s()(l,t),children:[e,(0,u.jsx)("div",{"data-popper-arrow":"",className:s()(c,n)})]})}},6038:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(26639),r=n(86070);const s=({children:e,content:t,...n})=>(0,r.jsx)(i.t,{renderInline:!0,preventScrollingWhileOpen:!1,placement:"top-start",menu:t,...n,children:e})},47179:(e,t,n)=>{"use strict";n.d(t,{J:()=>s,X:()=>a});var i=n(30758),r=n(86070);const s=i.createContext({}),a=({children:e})=>{const[t,n]=i.useState(),a=(0,i.useMemo)((()=>({elementRef:t,setElementRef:n})),[t]);return(0,r.jsx)(s.Provider,{value:a,children:e})}},43393:(e,t,n)=>{"use strict";n.d(t,{Nx:()=>a,lr:()=>s,q8:()=>o});var i=n(85387),r=n(98704);const s=()=>"/"===(0,i.zy)().pathname,a=()=>"/home"===(0,i.zy)().pathname,o=(e,t)=>{const n=t?350:80;return(0,r.i)(e,n,10)}},95446:(e,t,n)=>{"use strict";n.d(t,{RB:()=>u,cL:()=>d,dh:()=>c,gc:()=>o,sn:()=>p,ws:()=>l});var i=n(30758),r=n(26413),s=n(4266),a=n(86070);const o=[s.$.ADDED_AT,s.$.TITLE_AND_ARTIST,s.$.TITLE,s.$.ARTIST,s.$.ALBUM],l=[s.$.INDEX,s.$.TITLE_AND_ARTIST,s.$.TITLE,s.$.ARTIST,s.$.ALBUM,s.$.DURATION],c=[s.$.INDEX,s.$.TITLE_AND_AUTHOR,s.$.TITLE,s.$.ADDED_AT],u={column:null,order:s.H.NONE},d=(0,i.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a TracksSortProvider")},sortState:u}),p=i.memo((function({uri:e,children:t}){return(0,a.jsx)(r.E,{uri:e,defaultState:u,sortContext:d,children:t})}))},33593:(e,t,n)=>{"use strict";n.d(t,{T:()=>E,l:()=>g});var i=n(30758),r=n(97500),s=n.n(r),a=n(422),o=n(25910),l=n(14343),c=n(31417),u=n(38501);const d="nOw3c5b4tD945Qcv8oV4",p="KxVesa2Eh_xZFQYF4bD6",m="oqJVgvlTYGkVITI6tm0z";var h=n(86070);const f=(0,i.memo)((({separator:e="•",iconSize:t="small",className:n,variant:i="bodySmall",isTrack:r=!1,isCollapsible:l=!0})=>{const u=r?c.Ru.get("card.tag.music-video"):c.Ru.get("card.tag.video");return(0,h.jsxs)(a.E,{as:"span",className:s()(d,n,{[p]:l}),"aria-label":u,title:u,children:[(0,h.jsx)(o.B,{size:t}),(0,h.jsx)(a.E,{as:"span",variant:i,className:m,children:u}),!!e.length&&(0,h.jsx)(a.E,{as:"span",variant:i,className:m,children:e})]})})),g=(0,i.memo)((({separator:e,isCollapsible:t})=>(0,l.NC)(u.LX5)?(0,h.jsx)(f,{separator:e,isTrack:!0,isCollapsible:t}):null)),E=(0,i.memo)((({separator:e,...t})=>(0,h.jsx)(f,{separator:e,...t})))},96111:(e,t,n)=>{"use strict";n.d(t,{o:()=>r});var i=n(86070);function r({children:e,...t}){return(0,i.jsxs)("label",{className:"hidden-visually",children:[e,(0,i.jsx)("input",{...t})]})}},89218:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,U:()=>r});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},29586:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,U:()=>r});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},75032:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var i=n(30758),r=n(86070);const s=(0,i.memo)((()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.25 3C0.25 2.0335 1.0335 1.25 2 1.25H5.375V2.75H2C1.86193 2.75 1.75 2.86193 1.75 3V5.42857H0.25V3ZM14 2.75H10.625V1.25H14C14.9665 1.25 15.75 2.0335 15.75 3V5.42857H14.25V3C14.25 2.86193 14.1381 2.75 14 2.75ZM1.75 10.5714V13C1.75 13.1381 1.86193 13.25 2 13.25H5.375V14.75H2C1.0335 14.75 0.25 13.9665 0.25 13V10.5714H1.75ZM14.25 13V10.5714H15.75V13C15.75 13.9665 14.9665 14.75 14 14.75H10.625V13.25H14C14.1381 13.25 14.25 13.1381 14.25 13Z",fill:"currentColor"})})))},44948:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var i=n(30758),r=n(36485);const s=()=>{const e=(0,i.useContext)(r.g);if(null===e)throw new Error("useAmbientMode must be used within a CinemaProvider");return e}},36485:(e,t,n)=>{"use strict";n.d(t,{g:()=>r,y:()=>s});var i=n(30758);const r=(0,i.createContext)(null),s=(0,i.createContext)(null)},43080:(e,t,n)=>{"use strict";n.d(t,{s:()=>r,y:()=>s});var i=n(30758);const r=(0,i.createContext)(null),s=(0,i.createContext)(null)},65367:(e,t,n)=>{"use strict";n.d(t,{HomeHeader:()=>g,W:()=>f});var i=n(30758),r=n(97500),s=n.n(r),a=n(62411),o=n(85505),l=n(50279),c=n(39566),u=n(87386);const d="S4OmZ_IZexmZ5dasPqW5",p="B9yNi5FlwGJt0nMEM5HS",m="t7wxxKMe3KK9hcr93xna";var h=n(86070);const f=()=>(0,a.d4)(l.t$),g=(0,i.memo)((function(){const e=(0,u.A)(o.l0o),t=!(0,c.n)(),n=f();return(0,h.jsx)("div",{className:s()(d,{[m]:t,[p]:n}),style:{backgroundColor:e}})}))},25187:(e,t,n)=>{"use strict";n.d(t,{T:()=>l,i:()=>o});var i=n(30758),r=n(62021),s=n(86070);const a=(0,i.createContext)({shelfURIs:[],addURI:()=>{},removeURI:()=>{}}),o=({children:e})=>{const[t,n]=(0,r.x)("homePins","[]"),o=JSON.parse(t).map((e=>e.includes("spotify:section")?e:`spotify:section:${e}`)),l=(0,i.useCallback)((e=>{n(JSON.stringify([...o,e].map((e=>e.replace("spotify:section:","")))))}),[o,n]),c=(0,i.useCallback)((e=>{n(JSON.stringify(o.filter((t=>t!==e))))}),[o,n]),u=(0,i.useMemo)((()=>({shelfURIs:o,addURI:l,removeURI:c})),[o,l,c]);return(0,s.jsx)(a.Provider,{value:u,children:e})},l=()=>(0,i.useContext)(a)},49980:(e,t,n)=>{"use strict";n.d(t,{JI:()=>c,ZZ:()=>d,iL:()=>u});var i=n(30758),r=n(85907),s=n(86070);function a(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,r.d)(t)}}const o=(0,i.createContext)(void 0),l=(0,i.createContext)((()=>{})),c=({children:e})=>{const[t,n]=(0,i.useReducer)(a,{isOpen:!1});return(0,s.jsx)(l.Provider,{value:n,children:(0,s.jsx)(o.Provider,{value:t,children:e})})};function u(){const e=(0,i.useContext)(o);if(void 0===e)throw new Error("useLanguageSelectionModalState must be used within a LanguageSelectionModalContextProvider");return e}function d(){const e=(0,i.useContext)(l);if(void 0===e)throw new Error("useLanguageSelectionModalDispatch must be used within a LanguageSelectionModalDispatchContextProvider");return e}},19341:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var i=n(35879),r=n(39566),s=n(82935),a=n(55868),o=n(86070);const l=({item:e,size:t,maxSize:n=t,desiredLabel:l="",className:c})=>{const u=!(0,r.n)(),d=(0,s.h)(e?.images??void 0,{desiredSize:n,desiredLabel:l});let p=(0,a.m)({imageUriOrUrl:d});return u&&d&&(p=d),(0,o.jsx)("div",{className:c,children:(0,o.jsx)(i.N,{loading:"eager",imgSrc:p,width:t,height:t,type:e?.type})})}},82804:(e,t,n)=>{"use strict";n.d(t,{l:()=>R});var i=n(97500),r=n.n(i),s=n(45740),a=n(31417),o=n(70521),l=n(30758),c=n(25910),u=n(422),d=n(93523),p=n(14343),m=n(59965),h=n(40339),f=n(53328),g=n(8428),E=n(31193),_=n(909),y=n(38501),v=n(87182),b=n(58685),S=n(19555),A=n(21549),C=n(18665),T=n(86070);const I=(0,l.memo)((()=>(0,T.jsx)(c.B,{size:"xsmall"}))),O=(0,l.memo)((({size:e="xsmall",className:t,separator:n="•",variant:i="marginal",isTrack:s,isSmallWidth:o})=>{const O=(0,v.z)(),w=a.Ru.get("npv.song-videos.switch-to-video"),{signals:N,uri:R}=(0,b.o)((e=>({signals:e?.signals,uri:e?.item?.uri}))),{videoPlayerMode:P}=(0,E.d)(),{spec:L,logger:D}=(0,A.r)(m.p6,{data:{identifier:P===_.K.cinemaLegacy?m.gw.CINEMA:m.gw.DESKTOP}}),k=L.musicVideoLabelFactory({uri:R||""}),{isActive:x,panelSend:U}=(0,h.AI)(g.Z.NowPlayingView),M=(0,h.Ev)(f.$S.NPV_BUTTON_CLICK),B=(0,l.useCallback)((()=>{D.logInteraction(k.hitPlay({itemToBePlayed:R||""})),O.sendSignal(S.L.SWITCH_TO_VIDEO),!x&&M&&U(f.$S.NPV_BUTTON_CLICK)}),[M,x,D,U,O,k,R]),j=(0,p.NC)(y.LX5);if(null===N||null===R||!N?.includes(S.L.SWITCH_TO_VIDEO))return null;if(!j)return null;const F="xsmall"===e?I:c.B;return(0,T.jsxs)("div",{className:C.A.npbSwitchButtonContainer,children:[(0,T.jsx)(d.Q,{onClick:B,iconLeading:F,iconOnly:o?F:void 0,size:"small",style:{padding:"0",transform:"none",minBlockSize:"0"},className:r()(C.A.npbSwitchButton,t),"aria-label":w,as:"div",title:w,tabIndex:-1,children:!o&&(0,T.jsx)(u.E,{as:"span",variant:i,className:C.A.label,children:s?a.Ru.get("card.tag.music-video"):a.Ru.get("card.tag.video")})}),(0,T.jsx)(u.E,{as:"span",variant:i,className:C.A.label,children:n})]})}));var w=n(7307),N=n(92942);const R=({item:e,className:t,enableVideoButton:n=!1,size:i="small",variant:l,isSmallWidth:c})=>{const u=e.type===w.c.TRACK;return(0,T.jsxs)("div",{className:r()(t,{[N.A.xsmallBadges]:"xsmall"===i}),children:[(0,o.N)(e)&&(0,T.jsx)(s.R,{semanticColor:"textPositive",title:a.Ru.get("web-player.smart-shuffle.icon-hover-label"),size:i,"data-testid":"enhance-badge"}),n&&(0,T.jsx)(O,{size:i,variant:l,isTrack:u,isSmallWidth:c})]})}},93298:(e,t,n)=>{"use strict";n.d(t,{d:()=>ne});var i=n(97500),r=n.n(i),s=n(82804),a=n(30758),o=n(72184),l=n(422),c=n(31417),u=n(99701),d=n(57776),p=n(59147);const m=new d.l("episodeSponsoredContent","query","a5c1fe722b60c29ad247ea3df57ace52043382a7f080d525f58745db78a42618",null);var h=n(26122),f=n(92942),g=n(86070);const E=({item:e})=>{const t=(0,a.useRef)(null),n=(0,h.K)({ref:t}),i=(r=e.metadata?.["podcast.contains_sponsored_content"],"false"!==r&&("true"===r||void 0));var r;const s=void 0===i&&"episode"===e.type,{data:d}=(E=e,_={enabled:s,gcTime:36e5,staleTime:18e5},(0,p.I)(m,E,_));var E,_;const y="Episode"===d?.episodeUnionV2.__typename&&d?.episodeUnionV2.containsSponsoredContent;return i??y?(0,g.jsx)(u.Zp,{label:c.Ru.get("playback-info.dsa-promotional-content"),disabled:!n,children:(0,g.jsxs)("div",{className:f.A.pretitle,children:[(0,g.jsx)("div",{children:(0,g.jsx)(o.p,{size:"xsmall"})}),(0,g.jsx)(l.E,{variant:"marginal",semanticColor:"textSubdued",ref:t,className:f.A.ellipsis,children:c.Ru.get("playback-info.dsa-promotional-content")})]})}):null};var _=n(16345),y=n(44119),v=n(82909),b=n(52255),S=n(13009),A=n(29475);const C=()=>{const e=(0,S.A)(),{isPuffinPanelActive:t,togglePuffin:n}=(0,b.c)(),i=(0,a.useCallback)((()=>{t||n()}),[t,n]);return e===A.Yn.LOSSLESS||e===A.Yn.LOSSLESS_24?(0,g.jsx)("button",{className:f.A.qualityLabel,onClick:i,children:c.Ru.get("web-player.pigeon.audio-quality.lossless")}):null};var T=n(91008),I=n(58192),O=n(65462),w=n(47863),N=n(76123),R=n(27012);const P=({item:e,onClick:t})=>{const{book:n}=e,i=(0,T.o_h)(n.uri)?.toURLPath(!0),{draggable:r,onDragStart:s}=(0,R.P)({itemUris:[n.uri],itemMimeTypes:[N.fl.AUDIOBOOKS],dragLabelText:e.book.name});return i?(0,g.jsx)(O.h,{menu:(0,g.jsx)(w.p,{uri:n.uri}),children:(0,g.jsx)("span",{draggable:r,onDragStart:s,children:(0,g.jsx)(I.n,{item:e,onClick:t})})}):(0,g.jsx)("span",{dir:"auto",children:n.name})};var L=n(70275);const D=({item:e,onClick:t})=>{const{show:n}=e,i=(0,T.o_h)(n.uri)?.toURLPath(!0),{draggable:r,onDragStart:s}=(0,R.P)({itemUris:[n.uri],dragLabelText:n.name});return i?(0,g.jsx)(O.h,{menu:(0,g.jsx)(L.H,{uri:n.uri}),children:(0,g.jsx)("span",{draggable:r,onDragStart:s,children:(0,g.jsx)(I.n,{item:e,onClick:t})})}):(0,g.jsx)("span",{dir:"auto",children:n.name})};var k=n(7520),x=n(21082);const U=({item:e,onClick:t})=>{const{draggable:n,onDragStart:i}=(0,R.P)();return(0,g.jsx)(g.Fragment,{children:e.artists.map(((e,r)=>{const s=(0,T.o_h)(e.uri)?.toURLPath(!0);return(0,g.jsxs)("span",{children:[r>0?c.Ru.getSeparator():null,s?(0,g.jsx)(O.h,{menu:(0,g.jsx)(k.t,{uri:e.uri}),children:(0,g.jsx)(x.N,{to:s,"data-testid":"context-item-info-artist",dir:"auto",draggable:n,onDragStart:t=>{i(t,{itemUris:[e.uri],dragLabelText:e.name})},onClick:t,children:e.name})}):(0,g.jsx)("span",{dir:"auto",children:e.name})]},r)}))})},M=({item:e,onClick:t})=>{const{draggable:n,onDragStart:i}=(0,R.P)();return(0,g.jsx)(g.Fragment,{children:e.artists.map(((e,r)=>{const s=(0,T.o_h)(e.uri)?.toURLPath(!0);return(0,g.jsxs)("span",{children:[r>0?c.Ru.getSeparator():null,s?(0,g.jsx)(O.h,{menu:(0,g.jsx)(k.t,{uri:e.uri}),children:(0,g.jsx)(x.N,{to:s,"data-testid":"context-item-info-artist",dir:"auto",draggable:n,onClick:t,onDragStart:t=>{i(t,{itemUris:[e.uri],dragLabelText:e.name})},children:e.name})}):(0,g.jsx)("span",{dir:"auto",children:e.name})]},r)}))})};var B=n(24324),j=n(68388),F=n(75497),V=n(13947),G=n(45627),H=n(5805),W=n(4861),z=n(85907);const K=({item:e,referrer:t,onClick:n,typeVariant:i="marginal"})=>{let s=null;const a=(0,F.N)(e)?y.Q.getAdSubtitle():e.name,o=(0,j.j)();if((0,H.v)(e))s=(0,g.jsx)(U,{item:e,onClick:n});else if((0,G.p)(e))s=(0,g.jsx)(D,{item:e,onClick:n});else if((0,V.d)(e))s=(0,g.jsx)(P,{item:e,onClick:n});else if((0,F.N)(e)){if(t===B.G.NPV)return null;s=(0,g.jsx)(_.A,{item:e,surface:"NPB",variant:"marginal"})}else(0,W.v)(e)?s=(0,g.jsx)(M,{item:e,onClick:n}):(0,z.d)(e);return(0,g.jsxs)("div",{className:r()(f.A.subtitle,f.A.subtitleWithGap),children:[(0,g.jsx)(v.r,{title:a,children:(0,g.jsx)(l.E,{"data-testid":"context-item-info-subtitles",as:"div",variant:i,className:f.A.subtitle,semanticColor:"textSubdued",children:s})},e.uri),o&&t===B.G.NPB&&(0,g.jsx)(C,{})]})};var Y=n(8679),q=n(83654),$=n(99977);const Z=({item:e,context:t,onClick:n})=>(0,g.jsx)(O.h,{menu:(0,g.jsx)($.W,{context:t,item:e}),children:(0,g.jsx)(q.R,{item:e,onClick:n,children:e.name})});var Q=n(73395);const J=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,R.P)({itemUris:[e.uri],dragLabelText:(0,Q.r)(e)});return(0,g.jsx)(O.h,{menu:(0,g.jsx)($.W,{context:t,item:e}),children:(0,g.jsx)("span",{draggable:i,onDragStart:r,children:(0,g.jsx)(q.R,{item:e,onClick:n,children:e.name})})})},X=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,R.P)();return(0,g.jsx)(O.h,{menu:(0,g.jsx)($.W,{context:t,item:e}),children:(0,g.jsx)("span",{draggable:i,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,Q.r)(e)})},children:(0,g.jsx)(q.R,{item:e,onClick:n,children:e.name})})})},ee=({item:e,context:t,onClick:n})=>{const{draggable:i,onDragStart:r}=(0,R.P)();return(0,g.jsx)(O.h,{menu:(0,g.jsx)($.W,{context:t,item:e}),children:(0,g.jsx)("span",{draggable:i,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,Q.r)(e)})},children:(0,g.jsx)(q.R,{item:e,onClick:n,children:e.name})})})},te=({context:e,item:t,onClick:n,typeVariant:i="bodySmall"})=>{let r=null;const s=(0,F.N)(t)?y.Q.getAdTitle(t)??t.name:t.name;return(0,G.p)(t)?r=(0,g.jsx)(J,{onClick:n,item:t,context:e}):(0,H.v)(t)?r=(0,g.jsx)(X,{onClick:n,item:t,context:e}):(0,V.d)(t)?r=(0,g.jsx)(Z,{onClick:n,item:t,context:e}):(0,F.N)(t)?r=(0,g.jsx)(Y.A,{item:t,surface:"NPB",variant:"bodySmall"}):(0,W.v)(t)?r=(0,g.jsx)(ee,{onClick:n,item:t,context:e}):(0,z.d)(t),(0,g.jsx)("div",{className:f.A.title,children:(0,g.jsx)(v.r,{title:s,children:(0,g.jsx)(l.E,{"data-testid":"context-item-info-title",as:"div",variant:i,className:f.A.text,dir:"auto",children:r})},t.uri)})},ne=({context:e,item:t,referrer:n,className:i,titleTypeVariant:a,subtitleTypeVariant:o,onTitleClick:l,onSubtitleClick:c,enableVideoButton:u=!1,size:d="small"})=>(0,g.jsxs)("div",{className:r()(i,f.A.container),children:[n!==B.G.NPV&&(0,g.jsx)(E,{item:t}),(0,g.jsx)(te,{context:e,item:t,onClick:(e,t)=>l?.(t),typeVariant:a,isNowPlayingView:n===B.G.NPV}),(0,g.jsx)(s.l,{className:f.A.badges,item:t,enableVideoButton:u,size:d}),(0,g.jsx)(K,{item:t,onClick:(e,t)=>c?.(t),typeVariant:o,referrer:n})]})},24324:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});let i=function(e){return e.NPV="npv",e.NPB="npb",e}({})},99977:(e,t,n)=>{"use strict";n.d(t,{W:()=>g});var i=n(62648),r=n(50496),s=n(76720),a=n(54622),o=n(51804),l=n(70521),c=n(46983),u=n(3602),d=n(13947),p=n(45627),m=n(5805),h=n(4861),f=n(86070);const g=({context:e,item:t,canSwitchVisuals:n=!1})=>{const{isSongVideo:g}=(0,c.k)(),E=g?o.o:a.P;return(0,m.v)(t)?t.isLocal?(0,f.jsx)(s.A,{uid:t.uid??"",uri:t.uri,contextUri:e.uri}):(0,f.jsx)(E,{uid:t.uid??"",uri:t.uri,albumUri:t.album.uri,artists:t.artists,contextUri:e.uri??"",isSmartRecommendation:(0,l.N)(t),provider:t.provider,canSwitchVisuals:n}):(0,p.p)(t)?(0,f.jsx)(r.b,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):(0,d.d)(t)?(0,f.jsx)(i.r,{uri:t.uri}):(0,u.bJ)(e,t)?null:(0,h.v)(t)?(0,f.jsx)(a.P,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??"",provider:t.provider,canSwitchVisuals:n}):null}},4100:(e,t,n)=>{"use strict";n.d(t,{k:()=>p});var i=n(30758),r=n(422),s=n(56515),a=n(31417),o=n(95143),l=n(31193),c=n(909),u=n(29634),d=n(86070);const p=()=>{const{setVideoPlayerUIFlag:e}=(0,l.d)(),{close:t}=(0,u.H)(),n=(0,i.useCallback)((()=>{e(c.n.documentPip,!1),t()}),[t,e]);return(0,d.jsx)("div",{children:(0,d.jsxs)(o.V,{children:[(0,d.jsx)(r.E,{variant:"bodySmall",children:a.Ru.get("web-player.now-playing-view.video.playing-in-pip")}),(0,d.jsx)(s.n,{onClick:n,size:"small",children:a.Ru.get("web-player.now-playing-view.video.return-playback")})]})})}},95143:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});const i={VideoPlaceholder:"Z_lhw3kk_krs5GqxYAPn"};var r=n(86070);function s({children:e}){return(0,r.jsx)("div",{className:i.VideoPlaceholder,children:e})}},20602:(e,t,n)=>{"use strict";n.d(t,{V:()=>_});var i=n(30758),r=n(56515),s=n(422),a=n(31417),o=n(62868),l=n(95143),c=n(40339),u=n(53328),d=n(8428),p=n(43013),m=n(79237),h=n(62642),f=n(41434),g=n(86070);const E=()=>{const{panelSend:e}=(0,c.AI)(d.Z.DevicePicker,d.Z.DevicePickerOverlay),t=(0,i.useCallback)((()=>{e(u.$S.DEVICE_PICKER_BUTTON_CLICK),(0,o.I)("DEVICE-PICKER")}),[e]);return(0,g.jsx)(r.n,{size:"small",onClick:t,children:a.Ru.get("web-player.connect.device-picker.select-another-device")})},_=()=>{const{remoteDeviceName:e,connectionStatus:t}=(0,m.v)((e=>{const t=(0,p.V)(e);return{remoteDeviceName:t.remoteDevice?.name,connectionStatus:t.connectionStatus}}),f.a);let n="";return e&&t===h.zP.CONNECTING?n=a.Ru.get("web-player.connect.bar.connecting-state",{device_name:e}):e&&t===h.zP.CONNECTED&&(n=a.Ru.get("web-player.connect.bar.connected-state",{device_name:e})),(0,g.jsx)("div",{children:(0,g.jsxs)(l.V,{children:[(0,g.jsx)(s.E,{variant:"bodySmall",children:n}),(0,g.jsx)(E,{})]})})}},72911:(e,t,n)=>{"use strict";n.d(t,{Qr:()=>d,er:()=>u});var i=n(30758),r=n(14343),s=n(92828),a=n(38501),o=n(62021),l=n(86070);const c=(0,i.createContext)(void 0),u=()=>{const e=(0,i.useContext)(c);if(!e)throw new Error("useOnboardingNewUser must be used within an OnboardingNewUserProvider");return e},d=({children:e})=>{const t=(0,r.NC)(a.dz_,{loadingValue:!1}),[n,u]=(0,o.x)("onboarding-status:new-user",s.B.SEARCH),[d,p]=(0,i.useState)(t?n:s.B.COMPLETED),m=(0,i.useCallback)((e=>{p((t=>{if(t!==e)return t;switch(t){case s.B.SEARCH:return u(s.B.ARTIST_CARD),s.B.ARTIST_CARD;case s.B.ARTIST_CARD:return u(s.B.PLAY_BUTTON),s.B.PLAY_BUTTON;case s.B.PLAY_BUTTON:return u(s.B.COMPLETED),s.B.COMPLETED;default:return t}}))}),[u]),h=(0,i.useCallback)((e=>t&&e===d),[d,t]),f=(0,i.useCallback)((()=>{p(s.B.COMPLETED),u(s.B.COMPLETED)}),[u]),g=(0,i.useMemo)((()=>({currentStep:d,shouldStepBeVisible:h,tryTriggerNextStep:m,finishOnboarding:f,isOnboardingComplete:d===s.B.COMPLETED||!t})),[d,f,t,h,m]);return(0,l.jsx)(c.Provider,{value:g,children:e})}},52624:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>g,pF:()=>f,wk:()=>h});var i=n(30758),r=n(97191),s=n(62411),a=n(14343),o=n(8428),l=n(68411),c=n(4214),u=n(39566),d=n(38501),p=n(37842),m=n(86070);const h=(0,i.createContext)(null),f=({playerAPI:e,children:t})=>{const n=(0,a.NC)(d.eWj),o=(0,a.NC)(d.ZDY),f=(0,p.q)(),g=(0,c.E)(),E=(0,s.Pj)(),_=!(0,u.n)(),y=(0,i.useMemo)((()=>{const t={isAutoToggleNPVEnabled:g,isQueueOnRightPanelEnabled:n,isPeekEnabled:o};return(0,l.BV)(e,f,E,t,_)}),[g,n,o,e,f,E,_]),[v,b]=(0,i.useState)(y.initialState),S=(0,i.useMemo)((()=>(0,r.U4)(y).start()),[y]),A=(0,i.useCallback)((e=>{(e.changed??!0)&&b(e)}),[]);(0,i.useEffect)((()=>{const e=S.subscribe(A);return()=>e.unsubscribe()}),[S]);const C=(0,i.useMemo)((()=>[v,S,y]),[v,S,y]);return(0,m.jsx)(h.Provider,{value:C,children:t})};function g(e){switch(e){case o.Z.BuddyFeed:return l.$S.BUDDY_FEED_BUTTON_CLICK;case o.Z.NowPlayingView:return l.$S.NPV_BUTTON_CLICK;case o.Z.PuffinActivation:case o.Z.Puffin:return l.$S.PUFFIN_BUTTON_CLICK;case o.Z.Queue:return l.$S.QUEUE_BUTTON_CLICK;case o.Z.DevicePicker:return l.$S.DEVICE_PICKER_BUTTON_CLICK;case o.Z.Disabled:default:return l.$S.PANEL_CLOSE_CLICK}}},97121:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(4601);function r(){const[e]=(0,i.s)();return e.value}},4601:(e,t,n)=>{"use strict";n.d(t,{s:()=>s});var i=n(30758),r=n(52624);function s(){const e=(0,i.useContext)(r.wk);if(!e)throw new Error("usePanelStateMachine() must be used within a PanelStateMachineContextProvider");return e}},85172:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});var i=n(30758),r=n(71416),s=n(87560),a=n(86070);const o=i.memo((({fadeIn:e=!0})=>{const t={background:`linear-gradient(180deg, #202124 0%, ${r.vyq} 21.35%)`,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},n={width:"117px",height:"117px",maxWidth:"50vw",maxHeight:"50vh",color:r.imx,aspectRatio:"1 / 1",animation:e?"300ms ease-out forwards fadein":"none",opacity:e?0:1};return(0,a.jsxs)("div",{style:t,children:[e&&(0,a.jsx)("style",{children:"@keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}"}),(0,a.jsx)(s.D,{style:n})]})}))},82992:(e,t,n)=>{"use strict";n.d(t,{S:()=>c,K:()=>u});var i=n(30758);const r={BREAKPOINT_VERTICAL_MEDIUM:"170px",BREAKPOINT_VERTICAL_SMALL:"132px",BREAKPOINT_HORIZONTAL_SMALL:"299px"};function s(e,t=r){const n=function(e,t){if(!e)return"DEFAULT";if(e<=parseInt(t.BREAKPOINT_VERTICAL_SMALL,10))return"SMALL";if(e<=parseInt(t.BREAKPOINT_VERTICAL_MEDIUM,10))return"MEDIUM";return"DEFAULT"}(e?.innerHeight,t),i=function(e,t){if(!e)return"DEFAULT";if(e<=parseInt(t.BREAKPOINT_HORIZONTAL_SMALL,10))return"SMALL";return"DEFAULT"}(e?.innerWidth,t);return{horizontal:i,vertical:n,height:e?.innerHeight,width:e?.innerWidth}}var a=n(27102),o=n(86070);const l=(0,i.createContext)({horizontal:"DEFAULT",vertical:"DEFAULT",height:0,width:0}),c=({children:e})=>{const t=(0,a.ox)(),[n,r]=(0,i.useState)((()=>s(t)));return(0,i.useEffect)((()=>{const e=()=>{const{vertical:e,horizontal:i,height:a,width:o}=s(t);e===n.vertical&&i===n.horizontal||r({vertical:e,horizontal:i,height:a,width:o}),r({vertical:e,horizontal:i,height:a,width:o})};return t?.addEventListener("resize",e),()=>{t?.removeEventListener("resize",e)}}),[n.horizontal,n.vertical,t]),(0,o.jsx)(l.Provider,{value:n,children:e})},u=()=>{const e=(0,i.useContext)(l);if(void 0===e)throw new Error("usePiPMiniPlayerSize must be used within a PiPSizeProvider");return e}},29195:(e,t,n)=>{"use strict";n.d(t,{mv:()=>s,rP:()=>r,vh:()=>a});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e}function a(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getEventSender()}},27438:(e,t,n)=>{"use strict";n.d(t,{VV:()=>a,cM:()=>o,nI:()=>c});var i=n(30758),r=n(86070);const s={isOpen:!1,uri:null},a=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,isOpen:!0,uri:t.uri};case"close":return{...s};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,r.jsx)(a.Provider,{value:n,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},7460:(e,t,n)=>{"use strict";n.d(t,{GM:()=>c,Mj:()=>a,qS:()=>s,vB:()=>u});var i=n(30758),r=n(86070);const s=(e,t)=>({type:"OPEN",name:e,handle:t}),a=e=>({type:"CLOSE",name:e});function o(e,t){switch(t.type){case"OPEN":{const{name:n,handle:i}=t;return e.map.has(n)?e:(e.map.set(n,i),{...e,map:e.map})}case"CLOSE":{const{name:n}=t;return e.map.delete(n)?{...e,map:e.map}:e}}return e}const l=(0,i.createContext)(null),c=({children:e})=>{const t={map:new Map},[n,s]=(0,i.useReducer)(o,t),a=(0,i.useMemo)((()=>[n,s]),[n,s]);return(0,r.jsx)(l.Provider,{value:a,children:e})};function u(){const e=(0,i.useContext)(l);if(null===e)throw new Error("Trying to use 'PopupWindowContext' without 'PopupWindowProvider'!");return e}},15357:(e,t,n)=>{"use strict";n.d(t,{$y:()=>l,Nf:()=>u,Qc:()=>c});var i=n(30758),r=n(85907);function s(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,r.d)(t)}}var a=n(86070);const o=(0,i.createContext)(void 0),l=({children:e})=>{const t=(0,i.useReducer)(s,{isOpen:!1});return(0,a.jsx)(o.Provider,{value:t,children:e})},c=()=>{const e=(0,i.useContext)(o);if(!e)throw new Error("useSearchModalState must be used within SearchModalProvider");const[t]=e;return t},u=()=>{const e=(0,i.useContext)(o);if(!e)throw new Error("useSearchModalDispatch must be used within SearchModalProvider");const[,t]=e;return t}},81360:(e,t,n)=>{"use strict";n.d(t,{$F:()=>f,MB:()=>g,Qe:()=>p,bA:()=>h,ji:()=>m});var i=n(31417),r=n(21082),s=n(99041),a=n(18663),o=n(16157),l=n(7307),c=n(85907),u=n(86070);const d={[o.pb.Podcasts]:["podcasts","podcastAndEpisodes"],[o.pb.Episodes]:["episodes","podcastAndEpisodes"],[o.pb.TopResults]:["topResults","topResults"],[o.pb.Artists]:["artists","artists"],[o.pb.Albums]:["albums","albums"],[o.pb.Playlists]:["playlists","playlists"],[o.pb.Tracks]:["tracks","tracks"],[o.pb.Audiobooks]:["audiobooks","audiobooks"],[o.pb.Genres]:["genres","genres"],[o.pb.Users]:["users","users"]},p=(e,t,n)=>{const i=e?.chipOrder?.items??[];return Array.from(i.reduce(((i,r)=>{if(!r.typeName)return i;if(!n&&r.typeName===o.pb.TopResults)return i;const[s,a]=d[r.typeName];return a&&s&&(t===a||e?.[s]?.items?.length)?(i.add(a),i):i}),new Set([])))},m=e=>{switch(e.type){case l.c.ALBUM:case l.c.ARTIST:case l.c.AUDIOBOOK:case l.c.EPISODE:case l.c.GENRE:case l.c.PLAYLIST:case l.c.USER:case l.c.SHOW:case l.c.PRE_RELEASE_ALBUM:case l.c.PRE_RELEASE_BOOK:return e.images;case l.c.TRACK:return e.album?.images??[];default:return(0,c.k)(e),[]}},h=e=>{switch(e.type){case l.c.TRACK:case l.c.EPISODE:return(0,u.jsxs)(u.Fragment,{children:[e.isExplicit&&(0,u.jsx)(s.U,{}),e.is19PlusOnly&&(0,u.jsx)(a.q,{size:16})]});default:return[]}},f=e=>{switch(e.type){case l.c.ALBUM:case l.c.PRE_RELEASE_ALBUM:case l.c.TRACK:return e.artists.flatMap(((e,t)=>[t>0&&i.Ru.getSeparator(),(0,u.jsx)(r.N,{to:e.uri,dir:"auto",tabIndex:-1,children:e.name},e.uri)]));case l.c.ARTIST:return i.Ru.get("card.tag.artist");case l.c.SHOW:return e.publisher;case l.c.EPISODE:return e.show&&(0,u.jsx)(r.N,{to:e.show?.uri,dir:"auto",tabIndex:-1,children:e.show?.name},e.show?.uri);case l.c.GENRE:return i.Ru.get("card.tag.genre");case l.c.PLAYLIST:return(0,u.jsx)(r.N,{to:e.owner.uri,dir:"auto",tabIndex:-1,children:e.owner.displayName},e.owner.uri);case l.c.PRE_RELEASE_BOOK:case l.c.AUDIOBOOK:return e.authorName;case l.c.USER:return i.Ru.get("card.tag.profile");default:return(0,c.k)(e),[]}},g=e=>{switch(e){case"album":case"artist":case"track":case"playlist":case"playlist-v2":case"episode":case"show":return!0;default:return!1}}},61360:(e,t,n)=>{"use strict";n.d(t,{j:()=>o,t:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useSettingsAPI must be used within a SettingsProvider");return e}},19616:(e,t,n)=>{"use strict";n.d(t,{SnackbarProvider:()=>A,J:()=>v,B:()=>S});var i=n(30758),r=n(93240);function s(e){const{timeout:t,style:n={},mode:i}=e;return{duration:"object"==typeof t?t[i]||0:t,easing:n.transitionTimingFunction,delay:n.transitionDelay}}const a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o=e=>`${Math.round(e)}ms`;function l(e=["all"],t){const{duration:n=300,easing:i=a.easeInOut,delay:r=0}=t||{};return(Array.isArray(e)?e:[e]).map((e=>{const t="string"==typeof n?n:o(n),s="string"==typeof r?r:o(r);return`${e} ${t} ${i} ${s}`})).join(",")}var c=n(59390),u=n(86070);const d={entering:{opacity:1},entered:{opacity:1}},p=(0,i.forwardRef)(((e,t)=>{const{children:n,in:a,timeout:o=0,style:p,onEnter:m,onEntered:h,onExit:f,onExited:g,...E}=e,_=(0,i.useRef)(null),y=(0,c.S)([_,n.ref,t]);return(0,u.jsx)(r.eB,{appear:!0,in:a,nodeRef:_,onEnter:(e,t)=>{const n=s({style:p,timeout:o,mode:"enter"});e.style.transition=l("opacity",n),m&&m(e,t)},onEntered:h,onExit:e=>{const t=s({style:p,timeout:o,mode:"exit"});e.style.transition=l("opacity",t),f&&f(e)},onExited:g,timeout:o,...E,children:(e,t)=>(0,i.cloneElement)(n,{style:{opacity:0,visibility:"exited"!==e||a?void 0:"hidden",...d[e],...p,...n.props.style},ref:y,...t})})}));var m=n(87101),h=n(69261),f=n(19610);function g({message:e}){return(0,u.jsx)(m.O,{children:(0,u.jsx)(f.P,{center:(0,u.jsx)(h.z,{children:e})})})}const E=(0,i.forwardRef)((({id:e,style:t,children:n},i)=>{const{closeSnackbar:s}=(0,r.dh)();return(0,u.jsx)("div",{ref:i,role:"status",id:e?String(e):void 0,style:t,onClick:()=>{s(e)},children:n})})),_=(0,i.forwardRef)((({message:e,id:t,style:n},i)=>(0,u.jsx)(E,{id:t,style:n,ref:i,children:(0,u.jsx)(g,{message:e})}))),y={snackbarContainer:"SmJ9PevS7h5IWNQ3K9z3",snackbar:"yrSYBVErq__9yOFyugns"},v=(0,i.createContext)({current:[]}),b=(0,i.createContext)((()=>{})),S=()=>(0,i.useContext)(b);function A({children:e,domRootRef:t}){const n=(0,i.useRef)([]),[s,a]=(0,i.useState)(null);return(0,u.jsx)(r.n,{maxSnack:3,domRoot:s??t?.current??void 0,anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{containerRoot:y.snackbarContainer,root:y.snackbar},TransitionComponent:p,Components:{default:_,headless:E},preventDuplicate:!0,disableWindowBlurListener:!0,onEnter:(e,t,i)=>{n.current.push(i)},onExit:(e,t)=>{n.current=n.current.filter((e=>e!==t))},children:(0,u.jsx)(v.Provider,{value:n,children:(0,u.jsx)(b.Provider,{value:a,children:e})})})}},5590:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var i=n(93523),r=n(86070);function s({ctaText:e,onCtaClick:t}){return(0,r.jsx)(i.H,{semanticColor:"textBrightAccent",onClick:t,condensedAll:!0,size:"small","aria-hidden":"true",children:e})}},69261:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var i=n(422),r=n(86070);function s({children:e}){return(0,r.jsx)(i.E,{variant:"bodyMedium",semanticColor:"textBase",children:e})}},19610:(e,t,n)=>{"use strict";n.d(t,{P:()=>l});const i="TcJ5lUfQ25AJNoCrWO5Z",r="xaCo5LWfBMxqfWjUA3o2",s="r4Hbxvv02KfOVeZ_v335",a="Hkw5_oNxFTDAuh5Bdw6Q";var o=n(86070);const l=({leading:e,center:t,trailing:n})=>(0,o.jsxs)("div",{className:i,children:[e?(0,o.jsx)("div",{className:r,children:e}):null,(0,o.jsx)("div",{className:s,children:t}),n?(0,o.jsx)("div",{className:a,children:n}):null]})},87101:(e,t,n)=>{"use strict";n.d(t,{O:()=>l});var i=n(97500),r=n.n(i),s=n(34901);const a="RQREWe_yBdtc_g6eC3wQ";var o=n(86070);const l=({children:e})=>(0,o.jsx)(s.a,{variant:"elevated",className:r()("encore-light-theme","encore-layout-themes",a),children:e})},63779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=n(30758),r=n(48517),s=n(31417),a=n(29195),o=n(53133),l=n(33234);const c=()=>{const{enqueueSnackbar:e}=(0,o.d)(),t=(0,a.vh)();return(0,i.useCallback)((async n=>{try{if(!n)return;await(0,l.l)(n.shareableUrl);const i=(0,r.c)({share_id:n?.shareId,entity_uri:n?.spotifyUri,share_url:n?.shareableUrl});t.send(i),e(s.Ru.get("web-player.social-connect.invitation-modal.success-toast-message"))}catch(e){TypeError}}),[e,t])}},49533:(e,t,n)=>{"use strict";n.d(t,{d:()=>y,S:()=>_});var i=n(30758),r=n(94119),s=n(92654),a=n(49346),o=n(67789),l=n(14343),c=n(40404),u=n(85574),d=n.n(u),p=n(25224);var m=n(38501),h=n(86070);const f={siteId:"",sessionId:"",startTime:-1,adId:"",eventData:"",url:""},g=(0,i.createContext)(null),E=(0,r.y)((0,a.eh)((0,o.D)((e=>({status:p.Z.INITIALIZING,session:f,setStatus:t=>e((()=>({status:t}))),setSession:t=>e((()=>({session:{...t}}))),resetSession:()=>e((()=>({session:{...f}})))})))));function _(e){const t=(0,i.useContext)(g);if(!t)throw new Error("Must be used within ");return(0,s.Pj)(t,e)}const y=({children:e,eventSender:t})=>{const[n]=(0,i.useState)(E),r=(0,l.NC)(m.CVw),s=(0,i.useCallback)((e=>{((e,t,n,i=!1)=>{const{siteId:r,sessionId:s,startTime:a}=t,o=(0,c.b)({site_id:r,session_id:s,elapsed_seconds:Date.now()-a,event_type:e});i&&d().info(o),n.send(o)})(e,n.getState().session,t,r)}),[t,r,n]),a=(0,i.useCallback)((e=>{var t,i;r&&(t=e,i=n.getState().session,t===p.Z.PRESENTED?d().info("vtec-startup step 0: Presented"):t===p.Z.DISMISSED?d().info("vtec-cleanup: Dismissed"):t===p.Z.RESOLVING_SITE_STARTED?d().info(`vtec-startup step 1 (RESOLVE-SITE): Fetching site for lookup token: ${i.siteId}`):t===p.Z.RESOLVING_SITE_SUCCEEDED?d().info(`vtec-startup step 1 (RESOLVE-SITE): Fetched site for lookup token: ${i.siteId}`):t===p.Z.RESOLVING_SITE_FAILED?d().error(`vtec-startup step 1 (RESOLVE-SITE): Failed fetching site for lookup token: ${i.siteId}`):t===p.Z.AUTHENTICATION_STARTED?d().info(`vtec-startup step 2 (AUTH): Starting auth process for url: ${i.siteId}`):t===p.Z.AUTHENTICATION_SUCCEEDED?d().info(`vtec-startup step 2 (AUTH): Auth completed for url: ${i.siteId}`):t===p.Z.AUTHENTICATION_FAILED?d().info(`vtec-startup step 2 (AUTH): Auth Error for url ${i.siteId}`):t===p.Z.PAGE_LOAD_STARTED?d().info(`vtec-startup step 2 (LOAD-SITE): Loading site for lookup token: ${i.siteId}`):t===p.Z.PAGE_LOAD_SUCCEEDED?d().info(`vtec-startup step 2 (LOAD-SITE): Fetched site for lookup token: ${i.siteId}`):t===p.Z.PAGE_LOAD_FAILED?d().error(`vtec-startup step 2 (LOAD-SITE): Failed fetching site for lookup token: ${i.siteId}`):t===p.Z.SHARE_EVENT?d().info(`vtec-share: success ${i.siteId}`):t===p.Z.ERROR&&d().error(`error: ${i.siteId}`))}),[n,r]);return(0,i.useEffect)((()=>{const e=n.subscribe((e=>e.status),(e=>{a(e),s(e)}));return()=>{e()}}),[a,s,n]),(0,h.jsx)(g.Provider,{value:n,children:e})}},29899:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,z:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(void 0),a=({value:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},4158:(e,t,n)=>{"use strict";n.d(t,{U:()=>p,o:()=>m});var i=n(30758),r=n(69707),s=n(13834),a=n(85907);const o=(e,t)=>{if(e.state?.navigationalRoot)return e.state?.navigationalRoot;if(e.state?.referrer&&e.state?.referrer!==t?.state?.referrer)switch(e.state.referrer){case"buddy_feed":return s.g.BUDDY_FEED;case"now_playing_bar":return s.g.NOW_PLAYING_BAR;case"user_profile":return s.g.PROFILE;case"playlists_sidebar":return s.g.PLAYLISTS_SIDEBAR;case"deeplink":return s.g.DEEP_LINK;case"home":return s.g.HOME;case"search":return s.g.SEARCH;case"your_library":return s.g.COLLECTION;case"now_playing_panel":return s.g.NOW_PLAYING_PANEL;case"whats_new_panel":return s.g.WHATS_NEW_PANEL;case"voice":case"other":case"PlayerHarmony_UnknownReferrer":case"PlayerOverture_UnknownReferrer":case"PlayerStub_UnknownReferrer":case"PlayerCore_UnknownReferrer":case"infinite-playback":break;default:(0,a.k)(e.state.referrer)}return t?.state?.navigationalRoot};class l{locationKeys=[];constructor(e,t){this.history=e,this.ubiLogger=t,this.unsubscribe=this.listen()}listen(){return this.onLocationChange(this.history.location),this.history.listen(this.onLocationChange)}onLocationChange=e=>{const t=this.location;if(e!==t){if(e.state={...e.state,navigationalRoot:o(e,t)},e.key){this.locationKeys.includes(e.key)||(this.locationKeys=[...this.locationKeys,e.key]);const n=this.locationKeys.indexOf(e.key),i=t?.key?this.locationKeys.indexOf(t.key):-1;this.direction=n>i?r.$.FORWARD:r.$.BACK}this.location=e}};getNavigationReason(e){const{location:t,action:n}=this.history;return this.pageView?"POP"===n?this.direction:t.state?.navigationReason:e===s.g.DEEP_LINK?r.$.DEEP_LINK:r.$.CLIENT_STARTED}reportPageView=e=>{const{location:t,action:n}=this.history;this.onLocationChange(t);const i=e.pageId&&e.pageId===this.pageView?.pageId&&e.entityUri===this.pageView?.entityUri,a=function(e,t){const n=e.pageId===r.$h.WATCHFEED,i=t?.pageId===r.$h.WATCHFEED&&e.pageId===r.$h.HOME;return!n&&!i}(e,this.pageView),o=t.pathname===this.pageView?.pathname;if(i||o&&a)return;const l=e?.navigationalRoot??t.state?.navigationalRoot??s.g.DEEP_LINK,c="POP"!==n?t.state?.interactionId??this.ubiLogger.getInteractionId(e.entityUri):void 0;this.pageView={pageId:e.pageId,entityUri:e.entityUri,navigationalRoot:l,navigationReason:this.getNavigationReason(l),pathname:t.pathname,interactionId:c},t.state={...t.state,navigationalRoot:l};const u={navigationalRoot:this.pageView.navigationalRoot??s.g.UNKNOWN,pageId:this.pageView.pageId??"UNKNOWN",entityUri:this.pageView.entityUri??"UNKNOWN"},d=document.hasFocus();this.pageView.navigationReason===r.$.CLIENT_STARTED?this.ubiLogger.logClientStarted({...u,navigationReason:this.pageView.navigationReason},d):this.pageView.interactionId?this.ubiLogger.logNavigation({...u,interactionId:this.pageView.interactionId}):this.ubiLogger.logNavigation({...u,navigationReason:this.pageView.navigationReason??r.$.UNKNOWN})}}var c=n(90224),u=n(33329),d=n(86070);const p=(0,i.createContext)(void 0),m=({children:e})=>{const t=(0,c.J)(),n=(0,u.s)(),r=(0,i.useMemo)((()=>new l(t,n)),[t,n]);return(0,i.useEffect)((()=>()=>r.unsubscribe()),[r]),(0,d.jsx)(p.Provider,{value:r,children:e})}},4088:(e,t,n)=>{"use strict";n.d(t,{C:()=>b});var i=n(30758),r=n(97500),s=n.n(r),a=n(77192),o=n(31417),l=n(68594),c=n(75830),u=n(10994),d=n(41874),p=n(12864),m=n(44672),h=n(86070);const f=({languages:e=[],activeLanguage:t,onSelectLanguage:n,onClose:i})=>(0,h.jsx)(m.pZ,{value:"subtitles",children:(0,h.jsxs)(u.W,{onClose:i,getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,h.jsx)(d.y,{divider:"after",children:o.Ru.get("subtitles-picker.heading")}),(0,h.jsx)(p.D,{onClick:()=>{n(null)},"aria-checked":!t,role:"menuitemradio",children:o.Ru.get("subtitles-picker.option_off")}),e.map((e=>(0,h.jsxs)(p.D,{onClick:()=>{n(e)},role:"menuitemradio","aria-checked":"string"==typeof t&&e.toLowerCase()===t.toLowerCase(),children:[g(e)," ",`(${o.Ru.get("subtitles-picker.autogenerated")})`]},e)))]})});function g(e){const[t]=e.toLowerCase().split("-");let n="";switch(t){case"zh":n=o.Ru.get("subtitles-picker.option_zh");break;case"cs":n=o.Ru.get("subtitles-picker.option_cs");break;case"nl":n=o.Ru.get("subtitles-picker.option_nl");break;case"en":n=o.Ru.get("subtitles-picker.option_en");break;case"fi":n=o.Ru.get("subtitles-picker.option_fi");break;case"fr":n=o.Ru.get("subtitles-picker.option_fr");break;case"de":n=o.Ru.get("subtitles-picker.option_de");break;case"el":n=o.Ru.get("subtitles-picker.option_el");break;case"hu":n=o.Ru.get("subtitles-picker.option_hu");break;case"id":n=o.Ru.get("subtitles-picker.option_id");break;case"it":n=o.Ru.get("subtitles-picker.option_it");break;case"ja":n=o.Ru.get("subtitles-picker.option_ja");break;case"ms":n=o.Ru.get("subtitles-picker.option_ms");break;case"pl":n=o.Ru.get("subtitles-picker.option_pl");break;case"pt":n=o.Ru.get("subtitles-picker.option_pt");break;case"es":n=o.Ru.get("subtitles-picker.option_es");break;case"sv":n=o.Ru.get("subtitles-picker.option_sv");break;case"tr":n=o.Ru.get("subtitles-picker.option_tr");break;case"vi":n=o.Ru.get("subtitles-picker.option_vi");break;default:n=e}return e.endsWith("-x-cc")&&(n+=" [CC]"),n}const E=e=>(0,h.jsx)(i.Suspense,{fallback:null,children:(0,h.jsx)(f,{...e})});var _=n(8989);const y="kp5i7dvcsEBZWMIuo1TD",v="loN1ed02PI2vp_IgVbC8",b=i.memo((function({renderInline:e=!1,noBackground:t,iconSize:n="small",className:r,onToggle:u}){const{isSupported:d,availableLanguages:p,preferredLanguage:m,setPreferredLanguage:f}=(0,_.K)(),g=(0,i.useRef)(!1),b=(0,i.useCallback)((()=>u?.(!g.current)),[u]);if(!d||0===p.length)return null;const S=null!==m;return(0,h.jsx)(c.b,{renderInline:e,menu:(0,h.jsx)(E,{onSelectLanguage:f,languages:p,activeLanguage:m}),onShow:()=>{g.current=!0},onHide:()=>{g.current=!1},children:(0,h.jsx)(l.D,{noBackground:t,active:S,label:o.Ru.get("subtitles-picker.heading"),className:s()(r,{[y]:!S,[v]:S}),onClick:b,children:(0,h.jsx)(a.j,{size:n})})})}))},63453:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var i=n(30758),r=n(10994),s=n(35897),a=n(86070);const o=i.memo((()=>(0,a.jsx)(r.W,{children:(0,a.jsx)(s.r,{divider:"before"})})))},28450:(e,t,n)=>{"use strict";n.d(t,{n:()=>H});var i=n(30758),r=n(97500),s=n.n(r),a=n(422),o=n(43182),l=n(31417),c=n(53187),u=n(75830),d=n(65462),p=n(34733),m=n(63453),h=n(21743),f=n(33625),g=n(46097),E=n(710),_=n(134),y=n(24500),v=n(30147),b=n(34990),S=n(99644),A=n(43640),C=n(14636),T=n(86070);const I=18.5/169;function O(e,t,n,i){const r=new A.q(e.x,e.y);if(i){const e=t/2*I*i.xScale,s=t/2*I*i.yScale,a=(n-i.beginTime)/i.duration,o=(i.clockwise?1:-1)*a*2*Math.PI;r.x+=e*Math.cos(o),r.y+=s*Math.sin(o)}const s=new Path2D;return s.arc(r.x,r.y,t,0,2*Math.PI),s}const w=({forceAlwaysInView:e,layerColors:t})=>{const n=(0,i.useRef)(null),r=(0,i.useRef)(null),s=(0,i.useRef)(0),a=(0,v.v7)(),{ref:o,inView:l}=(0,h.Wx)({root:a.current,initialInView:!1}),c=(0,g.cf)(t),u=(0,i.useCallback)((()=>{if(!n.current)return;const e=n.current.getContext("2d");if(!e)return;const t=performance.now();s.current=s.current||t;const i=t-s.current,r=n.current.width/window.devicePixelRatio;e.clearRect(0,0,n.current.width,n.current.height),function(e,t,n,i){const r=new A.q(t/2,t/2),s=(0,g.L1)(t),a=(0,g.e0)(s);e.lineWidth=a;for(const{color:t,idleAnimation:a}of i)e.strokeStyle=t,e.stroke(O(r,s,n,a))}(e,r,i,c)}),[c]),d=l||e,p=(0,i.useCallback)((()=>{if(!n.current?.parentElement)return;const{offsetWidth:e,offsetHeight:t}=n.current.parentElement,i=Math.min(e,t),r=window.devicePixelRatio||1,s=i*r;n.current.width=s,n.current.height=s,n.current.style.width=`${i}px`,n.current.style.height=`${i}px`;const a=n.current.getContext("2d");a?.scale(r,r)}),[]);return(0,S.w)({onResize:(0,C.s)(p)(200),refOrElement:r}),(0,i.useEffect)((()=>{if(!d)return()=>{};let e,t=null;const n=i=>{(null===t||(t?i-t:0)>=1e3/60)&&(u(),t=i),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>{e&&cancelAnimationFrame(e)}}),[u,d]),(0,T.jsx)("div",{ref:r,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,T.jsx)("canvas",{style:{width:"100%",height:"100%"},ref:e=>{o(e),n.current=e,p()}})})},N=({forceAlwaysInView:e})=>{const t=(0,b.j)(),{context:n}=(0,f.L)()||{context:null,item:null},i={rear:(0,y.p)(n?.metadata?.["narration.jellyfish.bottom.color"],_.ve),middle:(0,y.p)(n?.metadata?.["narration.jellyfish.mid.color"],_.yA),fore:(0,y.p)(n?.metadata?.["narration.jellyfish.top.color"],_.DM)};return t?(0,T.jsx)(E.D,{animateSource:!1,layerColors:i}):(0,T.jsx)(w,{forceAlwaysInView:e,layerColors:i})};var R=n(59343),P=n(30349),L=n(50671),D=n(21549);const k="R6tJVUj68B9ruCCW3onB",x="diX3qTISyTDEx7TNJrxf",U="hcZhIWbB_uHEr2Zu61Mz",M="mWMNdMyzjQTUamoKvI3n",B="LT_9lqpf7DbYVqytlXKg",j="OrAzTU2IM8kYjcoNVliq",F="UDj7VTgRt15O8xLzVGE0",V="syVH7w1vO4Cq92dzuz2o",G="G6jC6RfEbQSTpAmpKIdq",H=({uri:e,title:t,description:n,forceAlwaysInView:r})=>{const{maybeAddDJToLibrary:h}=(0,P.F)(),{context:f}=(0,R._)({featureIdentifier:"your_dj_home_card",referrerIdentifier:"home"}),{togglePlay:g,isActive:E,isPlaying:_}=f,y=(0,T.jsx)(m.g,{}),{spec:v,logger:b}=(0,D.r)(o.y,{data:{uri:e,position:0,reason:""}}),S=(0,i.useCallback)((()=>{let t;E?t=_?v.cardPlayButtonFactory().hitPause({itemToBePaused:e}):v.cardPlayButtonFactory().hitResume({itemToBeResumed:e}):(t=v.cardPlayButtonFactory().hitPlay({itemToBePlayed:e}),h());const n=b.logInteraction(t);g({loggingParams:n})}),[g,E,_,b,v,e,h]),A=(0,i.useCallback)((e=>{"Enter"===e.code&&g()}),[g]),C=(0,L.t)(v);return(0,T.jsx)(d.h,{menu:y,children:(0,T.jsx)("div",{className:s()(k),children:(0,T.jsxs)("div",{className:x,onClick:S,onKeyDown:A,tabIndex:0,role:"button",ref:C,children:[(0,T.jsx)("div",{className:U,children:(0,T.jsx)("div",{className:M,children:(0,T.jsx)(N,{forceAlwaysInView:r})})}),(0,T.jsxs)("div",{className:B,children:[(0,T.jsxs)("div",{className:j,children:[(0,T.jsx)(a.E,{variant:"titleLarge",semanticColor:"textBase",children:t}),(0,T.jsx)("span",{className:V,children:"BETA"})]}),(0,T.jsx)(a.E,{variant:"bodySmall",className:F,children:n}),(0,T.jsxs)("div",{className:G,onClick:e=>{e.stopPropagation()},children:[(0,T.jsx)(p.R,{onClick:S,version:p.H.secondary,isPlaying:_,size:"medium"}),(0,T.jsx)(u.b,{menu:y,children:(0,T.jsx)(c.e,{size:c.M.xs,label:l.Ru.get("more.label.context",t)})})]})]})]})})})}},710:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var i=n(86070);const r=({animateSource:e,repeatCount:t="indefinite",layerColors:n})=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",width:"300",height:"300",viewBox:"0 0 300 300",style:{width:"100%",height:"100%"},children:[e&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("defs",{children:[(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_2_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0504202;0.092437;0.1344538;0.1764706;0.2184874;0.2605042;0.302521;0.3445378;0.3865546;0.4285714;0.4705882;0.512605;0.5546218;0.5966387;0.6386555;0.6806723;0.7226891;0.7647059;0.8067227;0.8487395;0.8907563;0.9327731;0.9747899;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_2_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0504202;0.092437;0.1344538;0.1764706;0.2184874;0.2605042;0.302521;0.3445378;0.3865546;0.4285714;0.4705882;0.512605;0.5546218;0.5966387;0.6386555;0.6806723;0.7226891;0.7647059;0.8067227;0.8487395;0.8907563;0.9327731;0.9747899;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_1_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0252101;0.0672269;0.1092437;0.1512605;0.1932773;0.2352941;0.2773109;0.3193277;0.3613445;0.4033613;0.4453782;0.487395;0.5294118;0.5714286;0.6134454;0.6554622;0.697479;0.7394958;0.7815126;0.8235294;0.8655462;0.907563;0.9495798;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_1_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0252101;0.0672269;0.1092437;0.1512605;0.1932773;0.2352941;0.2773109;0.3193277;0.3613445;0.4033613;0.4453782;0.487395;0.5294118;0.5714286;0.6134454;0.6554622;0.697479;0.7394958;0.7815126;0.8235294;0.8655462;0.907563;0.9495798;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_0_G_D_0_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0420168;0.0840336;0.1260504;0.1680672;0.210084;0.2521008;0.2941176;0.3361345;0.3781513;0.4201681;0.4621849;0.5042017;0.5462185;0.5882353;0.6302521;0.6722689;0.7142857;0.7563025;0.7983193;0.8403361;0.8823529;0.9243697;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{repeatCount:t,dur:"1.9833333s",begin:"0s",xlinkHref:`#${e}_R_G_L_0_G_D_1_P_0`,fill:"freeze",attributeName:"d",attributeType:"XML",from:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",to:"M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keyTimes:"0;0.0420168;0.0840336;0.1260504;0.1680672;0.210084;0.2521008;0.2941176;0.3361345;0.3781513;0.4201681;0.4621849;0.5042017;0.5462185;0.5882353;0.6302521;0.6722689;0.7142857;0.7563025;0.7983193;0.8403361;0.8823529;0.9243697;1",values:"M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 36.95,-78.5 57.25,-58.51 C77.98,-38.1 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.11,-81.16 61.42,-61.17 C82.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 51.11,-91.16 71.42,-71.17 C92.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 34.11,-74.66 54.42,-54.67 C75.15,-34.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.61,-81.16 62.92,-61.17 C83.65,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.61,-91.16 70.92,-71.17 C91.65,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 26.61,-70.66 46.92,-50.67 C67.65,-30.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 37.11,-78.16 57.42,-58.17 C78.15,-37.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 40.11,-80.66 60.42,-60.67 C81.15,-40.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 42.11,-81.16 62.42,-61.17 C83.15,-40.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 41.61,-83.66 61.92,-63.67 C82.65,-43.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-90.66 70.42,-70.67 C91.15,-50.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 50.11,-91.16 70.42,-71.17 C91.15,-50.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ;M0 -112.5 C30.75,-112.5 58.61,-98.66 78.92,-78.67 C99.65,-58.27 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z ",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,i.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"2s",from:"0",to:"1",xlinkHref:`#${e}_time_group`})]})}),(0,i.jsxs)("g",{id:"_R_G",children:[(0,i.jsxs)("g",{id:"_R_G_L_2_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,i.jsx)("path",{id:`${e}_R_G_L_2_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,i.jsx)("path",{id:`${e}_R_G_L_2_G_D_1_P_0`,stroke:n.rear,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]}),(0,i.jsxs)("g",{id:"_R_G_L_1_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,i.jsx)("path",{id:`${e}_R_G_L_1_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,i.jsx)("path",{id:`${e}_R_G_L_1_G_D_1_P_0`,stroke:n.middle,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]}),(0,i.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,i.jsx)("path",{id:`${e}_R_G_L_0_G_D_0_P_0`,fill:"#000000",fillOpacity:"0",fillRule:"nonzero",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "}),(0,i.jsx)("path",{id:`${e}_R_G_L_0_G_D_1_P_0`,stroke:n.fore,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -112.5 C30.75,-112.5 58.61,-100.16 78.92,-80.17 C99.65,-59.77 112.5,-31.39 112.5,0 C112.5,31 99.96,59.08 79.68,79.42 C59.31,99.86 31.13,112.5 0,112.5 C-31.38,112.5 -59.77,99.65 -80.17,78.92 C-100.16,58.62 -112.5,30.75 -112.5,0 C-112.5,-31.25 -99.75,-59.53 -79.18,-79.92 C-58.85,-100.06 -30.88,-112.5 0,-112.5z "})]})]}),(0,i.jsx)("g",{id:`#${e}_time_group`})]})},27012:(e,t,n)=>{"use strict";n.d(t,{O:()=>c.O9,P:()=>f});var i=n(30758),r=n(31186),s=n(422),a=n(91008);const o="vb8kSzIiZbfkwqWZROkW",l="_w3sHVCUhYgvQar5WNHw";var c=n(76123),u=n(97503),d=n(75411),p=n(13719),m=n(86070);const h=({text:e})=>(0,m.jsx)(s.E,{variant:"bodyMedium",dir:"auto",children:e}),f=e=>{const{setIds:t,setDropOriginUri:n,setSectionId:s}=(0,i.useContext)(u.O_),{supportsDragAndDrop:f}=(0,d._)();return{draggable:f,onDragStart:(i,u)=>{if(!f)return;const{itemUris:d=[],itemMimeTypes:g=[],dragLabelText:E="",contextUri:_="",sectionId:y=0,dropOriginUri:v="",itemIds:b}={...e,...u};i.defaultPrevented||t(b??d),n(v),s(y),window.addEventListener("click",(()=>{document.body.removeAttribute("data-dragging-type")}),{once:!0});const S=d.map((e=>(0,a.o_h)(e))).filter(p.P),A=S.map((e=>e?.toURL()));if(0===S.length||i.metaKey)return void i.preventDefault();i.dataTransfer.setData("text/x-spotify-context",_),i.dataTransfer.setData("text/uri-list",A.join("\n")),i.dataTransfer.setData("text/plain",A.join("\n")),i.dataTransfer.setData("text/x-spotify-section",`${y||0}`);const C={};S.forEach(((e,t)=>{const n=g[t]??c.O9[e.type];n&&(C[n]??=[],C[n].push(e.toURI()))})),document.body.setAttribute("data-dragging-type",Object.keys(C).join(" ")),Object.entries(C).forEach((([e,t])=>{i.dataTransfer.setData(e,t.join("\n"))})),b?.length===d.length&&i.dataTransfer.setData(c.fl.UIDS,b.join("\n"));const T=(0,r.renderToString)((0,m.jsx)(h,{text:E}));if("function"==typeof i.dataTransfer.setDragImage){const e=function(e){const t=document.createElement("p");t.className=l,t.innerHTML=e;const n=document.createElement("div");return n.className=o,document.body.appendChild(t),document.body.appendChild(n),{element:t,remove(){requestAnimationFrame((()=>{t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n)}))}}}(T);i.dataTransfer.setDragImage(e.element,0,0),e.remove()}}}}},26122:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(30758),r=n(99644);const s=({ref:e})=>{const[t,n]=(0,i.useState)(!1);return(0,r.w)({refOrElement:e,observeOnMount:!0,onResize:()=>{e.current&&n(e.current?.offsetWidth{"use strict";n.d(t,{W:()=>c});var i=n(62411),r=n(91008),s=n(31417),a=n(21020),o=n(7307),l=n(77008);const c=({type:e,uri:t})=>{const n=(0,i.d4)(a.MU),c=(0,i.d4)(a.NR);if(void 0===t)return!1;const u=s.Ru.getLocaleForURLPath(),d=t===o.c.HOME?t:(0,r.o_h)(t)?.type;return(0,l.p)({localeFeatureFlag:n,entityFeatureFlag:c,urlLocale:u,entity:d,type:e})}},78294:(e,t,n)=>{"use strict";n.d(t,{J:()=>a,r:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null);function a(){const e=(0,i.useContext)(s);if(null===e)throw new Error("Trying to use 'useOvertureRegisterContext()' without 'OvertureRegisterProvider'");return e}const o=({children:e})=>{const[t,n]=(0,i.useState)({uris:new Map}),a=(0,i.useCallback)(((e,t)=>{n((n=>{const i=new Map(n.uris);return i.set(e,t),{uris:i}}))}),[]),o=(0,i.useCallback)((e=>{n((t=>{const n=new Map(t.uris);return n.delete(e),{uris:n}}))}),[]),l=(0,i.useCallback)((e=>t.uris.get(e)),[t.uris]),c=(0,i.useMemo)((()=>({registerURI:a,unregisterURI:o,getStateForURI:l,state:t})),[a,o,l,t]);return(0,r.jsx)(s.Provider,{value:c,children:e})}},35585:(e,t,n)=>{"use strict";var i=n(99576),r=n(61397),s=n(14343),a=n(22388),o=n(21885),l=n(30561),c=n(31417);const u="PWA_DISPLAY_MODE_CHANGED";var d=n(78566),p=n(98293),m=n(51778),h=n(62411),f=n(17763),g=n(84029),E=n(78464),_=n(30758);const y="FKzolQvIeUcXEOsjtw8l",v="rLrSnwagmkEsLoI1InYT",b="qqVgbIIvqVxAT7KPTjM6",S="HMyLin1O_6Ae2odnit1u",A="Fe4_ZnxnNSMxu7vzbntV",C="fGX1fnzBkGAAMfMxDXDe",T="uMdsIJ2RlIvMQObefThj",I="ucE6L4XRyB9F_RXDPVuR",O="uKyQmBSHiTyLvZlrFHLE",w="D1z00v8mUgOxx_my43Yq";var N=n(86070);const R=(0,_.memo)((function(){return(0,N.jsxs)("div",{className:y,children:[(0,N.jsx)("div",{className:v,children:(0,N.jsxs)("svg",{className:b,width:"232",height:"704",viewBox:"0 0 232 704",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("path",{fill:"#000",d:"M0 0h227v704H0z"}),(0,N.jsx)("path",{d:"M29.887 130.123A8.47 8.47 0 0032.5 124a8.5 8.5 0 10-8.5 8.5 8.454 8.454 0 005.125-1.73l4.401 5.153.76-.649-4.399-5.151zM24 131.5c-4.136 0-7.5-3.364-7.5-7.5s3.364-7.5 7.5-7.5 7.5 3.364 7.5 7.5-3.364 7.5-7.5 7.5zM29.16 158.597l-.913.406 7.797 17.513.914-.406-7.798-17.513zM18.5 176.5h1v-18h-1v18zm6 0h1v-18h-1v18z",fill:"#757575"}),(0,N.jsx)("path",{fill:"#404040",d:"M53 162h122v11H53zM64 258h95v11H64z"}),(0,N.jsx)("path",{fill:"#fff",d:"M16 248h32v32H16z"}),(0,N.jsx)("path",{d:"M38 263h-5v-5h-2v5h-5v2h5v5h2v-5h5v-2z",fill:"#000"}),(0,N.jsx)("path",{fill:"url(#paint0_linear)",d:"M16 292h32v32H16z"}),(0,N.jsx)("path",{d:"M37.797 302.727a4.057 4.057 0 00-5.488-.253.558.558 0 01-.31.112.531.531 0 01-.31-.112 4.054 4.054 0 00-5.488.253 4.05 4.05 0 00-1.194 2.883c0 1.089.424 2.113 1.168 2.855l4.462 5.223a1.791 1.791 0 002.726 0l4.435-5.195a4.052 4.052 0 001.195-2.883 4.057 4.057 0 00-1.196-2.883z",fill:"#fff"}),(0,N.jsx)("path",{fill:"#404040",d:"M64 303h79v11H64z"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 353h142v11H16zM16 395h53v11H16zM16 437h98v11H16zM16 479h143v11H16zM16 521h97v11H16z",opacity:"0.6"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 218h71v11H16z"}),(0,N.jsx)("path",{d:"M25.501 73.078L34 77.984V91h-6v-7h-5v7h-6V78.024l8.501-4.946zm-.002-1.156L16 77.449V92h8v-7h3v7h8V77.407l-9.501-5.485z",fill:"#616161"}),(0,N.jsx)("path",{fill:"#404040",d:"M53 78h122v11H53zM53 120h122v11H53z"}),(0,N.jsx)("defs",{children:(0,N.jsxs)("linearGradient",{id:"paint0_linear",x1:"0",y1:"308",x2:"32",y2:"340",gradientUnits:"userSpaceOnUse",children:[(0,N.jsx)("stop",{stopColor:"#450AF5"}),(0,N.jsx)("stop",{offset:"1",stopColor:"#C4EFD9"})]})})]})}),(0,N.jsxs)("div",{className:S,children:[(0,N.jsx)("div",{className:A,children:(0,N.jsxs)("svg",{width:"125",height:"95",viewBox:"0 0 125 95",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{x:"0",y:"31",width:"125",height:"32",rx:"16",fill:"#282828"}),(0,N.jsx)("path",{d:"M992 59c6.627 0 12-5.373 12-12s-5.373-12-12-12-12 5.373-12 12 5.373 12 12 12z",fill:"#404040"}),(0,N.jsx)("path",{fill:"#404040",d:"M1014 42h66v11h-66z"})]})}),(0,N.jsxs)("div",{children:[(0,N.jsxs)("div",{className:C,children:[(0,N.jsxs)("div",{className:T,children:[(0,N.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,N.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,N.jsxs)("div",{className:I,children:[(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,N.jsxs)("div",{className:C,children:[(0,N.jsxs)("div",{className:T,children:[(0,N.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,N.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,N.jsxs)("div",{className:I,children:[(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,N.jsxs)("div",{className:C,children:[(0,N.jsxs)("div",{className:T,children:[(0,N.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,N.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,N.jsxs)("div",{className:I,children:[(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,N.jsxs)("svg",{className:O,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,N.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]})]})]}),(0,N.jsxs)("div",{className:w,children:[(0,N.jsx)("div",{children:(0,N.jsx)("svg",{width:"175",height:"40",viewBox:"0 0 175 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fill:"#404040",d:"M53 5h122v11H53zM53 23h101v11H53zM0 0h40v40H0z"})})}),(0,N.jsx)("div",{children:(0,N.jsxs)("svg",{width:"216",height:"48",viewBox:"0 0 216 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,N.jsx)("path",{d:"M12.5 22.8l.7-.8c-1.1-1.3-2.7-2-4.3-2v1c1.3 0 2.6.6 3.5 1.6l.1.2zm7.5 4.7c-1.2 0-2.3-.5-3.2-1.3l-.6.8c1 1 2.4 1.5 3.8 1.5V30l3.5-2-3.5-2v1.5zm0-6V23l3.5-2-3.5-2v1.5c-1.6 0-3.2.7-4.2 2l-3.4 3.9c-.9 1-2.2 1.6-3.5 1.6v1c1.6 0 3.2-.7 4.2-2l3.4-3.9c.9-1 2.2-1.6 3.5-1.6zM61 18.5l-8 4.619V19h-2v10h2v-4.119l8 4.619v-11zM163 20v4.119l-8-4.619v11l8-4.619V30h2V20h-2zM197.5 21h4.5v1.5l3.5-2-3.5-2V20h-4.5c-2.5 0-4.5 2-4.5 4.5 0 .6.1 1.2.4 1.8l.9-.5c-.2-.4-.3-.8-.3-1.3 0-1.9 1.6-3.5 3.5-3.5zm9.1 1.7l-.9.5c.2.4.3.8.3 1.3 0 1.9-1.6 3.5-3.5 3.5H198v-1.5l-3.5 2 3.5 2V29h4.5c2.5 0 4.5-2 4.5-4.5 0-.6-.1-1.2-.4-1.8z",fill:"#fff"}),(0,N.jsx)("circle",{cx:"108",cy:"24",r:"20",fill:"#fff"}),(0,N.jsx)("path",{d:"M100 16h16v16h-16V16z",fill:"#fff"}),(0,N.jsx)("path",{d:"M104.018 30l10.392-6-10.392-6v12z",fill:"#000"})]})}),(0,N.jsx)("div",{children:(0,N.jsx)("svg",{width:"99",height:"16",viewBox:"0 0 99 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{d:"M1 2v5l4.33-2.5L1 2zm0 12h14v-1H1v1zm0-4h14V9H1v1zm7-5v1h7V5H8zM92.945 1.379l-.652.763A7.968 7.968 0 0194.863 8a7.972 7.972 0 01-2.57 5.858l.651.763a8.966 8.966 0 00.001-13.242zm-2.272 2.66l-.651.763a4.484 4.484 0 01-.001 6.397l.651.763a5.48 5.48 0 001.691-3.961c0-1.557-.65-2.962-1.69-3.962zM80 5v6h2.804L88 14V2l-5.196 3H80zm7-1.268v8.536L83.072 10H81V6h2.072L87 3.732zM40 2.5v8c0 .55.45 1 1 1h5v-1h-5v-8h5v-1h-5c-.55 0-1 .45-1 1zM43 14c0 .275.225.5.5.5H46v-1h-2.5c-.275 0-.5.225-.5.5zM55 1.5h-6c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-11c0-.55-.45-1-1-1zm0 12h-6v-11h6v11zm-3-8A.75.75 0 1052 4a.75.75 0 000 1.5zm0 6a2 2 0 100-4 2 2 0 000 4zm0-3c.551 0 1 .449 1 1 0 .551-.449 1-1 1-.551 0-1-.449-1-1 0-.551.449-1 1-1z",fill:"#fff"})})})]})]})}));var P=n(8398);const L=_.memo((function(){return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(P.x,{isOpen:!0,isRemoteConfigInitialized:!1,headingMessage:c.Ru.get("error-dialog.generic.header"),message:c.Ru.get("error-dialog.generic.body"),buttonLabel:c.Ru.get("fatal-error.button-label")}),(0,N.jsx)(R,{})]})}));var D=n(14703),k=n(41750),x=n(87182);const U=()=>{const e=(0,x.z)(),t=(0,h.Pj)(),n=(0,_.useRef)(),i=(0,k.S)();return(0,_.useEffect)((()=>{n.current=i}),[i]),(0,_.useEffect)((()=>navigator&&navigator.mediaSession?(navigator.mediaSession.setActionHandler("previoustrack",(()=>{const t=n.current?.isOpen;t||e.skipToPrevious()})),navigator.mediaSession.setActionHandler("nexttrack",(()=>{const t=n.current?.isOpen;t||e.skipToNext()})),navigator.mediaSession.setActionHandler("play",(()=>{const t=n.current?.isOpen;t||e.resume()})),navigator.mediaSession.setActionHandler("pause",(()=>{const t=n.current?.isOpen;t||e.pause()})),()=>{navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null),navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null)}):()=>{}),[e,t]),null};var M=n(15281),B=n(909),j=n(72762),F=n(87464),V=n(90326),G=n(75497),H=n(13947),W=n(45627),z=n(5805),K=n(4861),Y=n(85907);function q(e){return e?.map((({url:e,width:t,height:n})=>({src:e,sizes:`${t}x${n}`})))??[]}function $(e){window.navigator.mediaSession&&(window.navigator.mediaSession.metadata=function(e){return(0,z.v)(e)?new window.MediaMetadata({title:e.name,artist:e.artists.map((e=>e.name)).join(c.Ru.getSeparator()),album:e.album.name,artwork:q(e.images)}):(0,W.p)(e)?new window.MediaMetadata({title:e.name,artist:e.artists?.map((e=>e.name)).join(c.Ru.getSeparator())||"",album:e.show.name,artwork:q(e.images)}):(0,H.d)(e)?new window.MediaMetadata({title:e.name,artist:e.artists?.map((e=>e.name)).join(c.Ru.getSeparator())||"",album:e.book.name,artwork:q(e.images)}):(0,G.N)(e)?new window.MediaMetadata({title:c.Ru.get("ad-formats.advertisement"),artist:"",album:"",artwork:q(e.images)}):(0,K.v)(e)||void 0===e?new window.MediaMetadata({title:"",artist:"",album:"",artwork:[]}):(0,Y.d)(e)}(e))}const Z=()=>((0,V.p)(F.gd.UPDATE,(({data:e})=>$(e?.item??void 0))),null),Q=()=>{const e=(0,h.d4)(M.c)===B.K.pip;return!(0,j.Ek)()||e?(0,N.jsx)(Z,{}):null};var J=n(96131),X=n(30339),ee=n(71494),te=n(65149),ne=n(91008);function ie(e=""){const t=`https://open.spotify.com${e}`;let n="";const i=/^\/\w+\/([a-zA-Z0-9]+)[/\w+]*/.exec(e);i&&(n=i[1]);let r=e,s=e;const a=e.match(/^\/search\/(.*)\/(.*)/);return/^\/genre\//.test(e)||/^\/view\//.test(e)?s="/browse/genres":"/"===e?(s="/browse",r="/browse/featured"):"/browse/charts"===e?s="/charts":"/collection/tracks"===e?s="/collection/songs":"/search"===e?s="/search":a?(s="podcasts"===a[2]?"/search/shows":`/search/${a[2]}`,r=`/search/${a[2]}`):e.match(/\/search\/(?.*)/)?(s="/search",r="/search/results"):"/download"===e?s="/upsell":"/queue"===e?s="/nowplaying/queue":/^\/artist\/[a-zA-Z0-9]+\/related/.test(e)?(r=(0,ne.ITr)(n).toString(),s="/artist/related"):/^\/artist\/[a-zA-Z0-9]+\/about/.test(e)?(r=(0,ne.ITr)(n).toString(),s="/artist/about"):/^\/artist\/[a-zA-Z0-9]+\/concerts/.test(e)?(r=(0,ne.ITr)(n).toString(),s="/artist/concerts"):(0,ne.ecE)(t)?(r=(0,ne.ITr)(n).toString(),s="/artist"):(0,ne.tbX)(t)?(r=(0,ne.Pse)(n).toString(),s="/playlist"):(0,ne._Tv)(t)?(r=(0,ne.Q00)(n).toString(),s="/album"):(0,ne.gHQ)(t)?(r=(0,ne.iMK)(n).toString(),s="/episode"):(0,ne.WB1)(t)?(r=(0,ne.Mci)(n).toString(),s="/shows"):(0,ne.APS)(t)?(r=(0,ne.Qjr)(n).toString(),s="/profile"):(0,ne.U_m)(t)&&(r=(0,ne.Mce)(n).toString(),s="/track"),{viewUri:r,mappedPageId:s}}var re=n(83747);const se="#login";var ae=n(85387);var oe=n(16565);class le extends _.Component{constructor(e){super(e);const{eventSender:t,location:n,isAnonymous:i}=this.props;t.send(de(n.pathname,i))}shouldComponentUpdate(e){const{eventSender:t,navigationType:n,location:i,isAnonymous:r}=e,{location:s}=this.props,a=i.hash===se||s.hash===se;return(0,J.j)(i,s)||n===X.rc.Replace||a||((0,oe.D)(i.pathname),t.send(function(e,t=!1){const{viewUri:n,mappedPageId:i}=ie(e),r={page:i,type:"exit",view_uri:n};return t?(0,te.s)(r):(0,ee.x)(r)}(s.pathname,r)),t.send(de(i.pathname,r))),!1}render(){return null}}const ce=(0,h.Ng)((function(e,t){return{...t,isAnonymous:e.session.isAnonymous}}))((ue=le,e=>{const t=(0,ae.zy)(),n=(0,ae.Zp)(),i=(0,ae.wQ)(),r=(0,ae.g)();return(0,N.jsx)(ue,{...e,navigate:n,navigationType:i,location:t,params:r})}));var ue;function de(e,t=!1){const{viewUri:n,mappedPageId:i}=ie(e),r={page:i,type:"enter",view_uri:n};return t?(0,te.s)(r):(0,ee.x)(r)}var pe=n(63352),me=n(58833),he=n(89848);var fe=n(99623),ge=n(29195);const Ee=({fetchHomeAd:e,setHomeAd:t,adsSlotConfig:n,fetchRef:i})=>{const r=(0,ge.vh)();return{fetchAndSetHomeAd:(0,_.useMemo)((()=>e&&n?.hpto?async()=>{const n=e();i.current=n;try{t(n);const e=await n;i.current===n&&t(e)}catch(e){i.current===n&&t(void 0);const s=e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message?e.message:String(e);r.send((0,fe.G)({error_type:"fetchHPTOSlotFailure",error_message:s,request_type:"hpto"}))}}:void 0),[r,i,e,t,n])}};function _e(e){const[t,n]=(0,_.useState)(!1);return(0,_.useEffect)((()=>n(!1)),[e]),{dismissed:t,dismiss(){n(!0)}}}function ye(){const e=(0,_.useState)(),t=(0,_.useRef)(e[0]);return{imageUrlToExtractHomeAdColorFrom:(0,_.useState)(),extractedHomeAdColor:[e[0],function(n){t.current=n,e[1](n)}],extractedHomeAdColorRef:t}}const ve=_.useState;var be=n(38501);const Se=()=>({allowSwitchingBetweenHomeAdsAndHpto:(0,s.NC)(be.htx)});var Ae=n(74647);const Ce=_.useState;var Te=n(36012);function Ie({adsSlotConfig:e}){const t=(0,ae.Zp)(),[i,r]=Ce(),s=e&&Te.r.hpto in e;return(0,_.useEffect)((()=>{if(!s)return()=>{};const e=(async()=>{const e=await Promise.resolve().then(n.bind(n,2448)),{slotsClient:i,adsCoreConnector:s}=e,a=await Promise.resolve().then(n.bind(n,36916)),{AdSlotEvent_AdSlotEventType:o,SubSlotRequest:l}=a;return await s.addNewSlot(Te.r.hpto),await s.enableSlot(Te.r.hpto),i.subSlot(l.fromPartial({slotId:Te.r.hpto}),(({adSlotEvent:e})=>{e?.eventType===o.AVAILABLE&&"true"===e.ad?.metadata?.is_preview&&(r(e.ad),t("/"))}))})();return()=>{e.then((e=>e.cancel()))}}),[s,t,r]),{previewHomeAd:i,setPreviewHomeAd:r}}function Oe({fetchHomeAd:e,adsSlotConfig:t,enableLegacyHptoContainerLoader:n}){const{homeAd:i,setHomeAd:r}=function(){const[e,t]=ve();return{homeAd:e,setHomeAd:t}}(),{fetchAndSetHomeAd:s}=(a={fetchHomeAd:e,setHomeAd:r,adsSlotConfig:t},{...Ee({...a,fetchRef:(0,_.useRef)()})});var a;return function({enableLegacyHptoContainerLoader:e}={}){const{allowSwitchingBetweenHomeAdsAndHpto:t}=Se(),n=(0,h.wA)();(0,_.useEffect)((()=>{!t&&e&&n((0,Ae.T)())}),[e,t,n])}({enableLegacyHptoContainerLoader:n}),{setHomeAd:r,fetchAndSetHomeAd:s,homeAd:i,...ye(),..._e(i),...Ie({adsSlotConfig:t})}}const we=({instance:e,children:t})=>{const{adsSlotConfig:n}=function({getAdsSlotConfig:e}){const[t,n]=(0,_.useState)();return(0,_.useEffect)((function(){e?.().then(n)}),[e]),{adsSlotConfig:t}}({getAdsSlotConfig:e?.config.getAdsSlotConfig}),i=Oe({adsSlotConfig:n,...e?.home}),r=(0,_.useMemo)((()=>({adsAPI:e||null,homeAds:i})),[i,e]);return(0,N.jsx)(he.Cp.Provider,{value:r,children:t})};var Ne=n(29586),Re=n(89218),Pe=n(25187),Le=n(38540),De=n(53328),ke=n(61360),xe=n(71151),Ue=n(31684),Me=n(29064),Be=n(82162);const je=({children:e,providers:t})=>{if(void 0===e)throw new Error("MultiProvider requires children!");return t.reduceRight(((e,t)=>(0,_.cloneElement)(t,void 0,e)),(0,N.jsx)(_.Fragment,{children:e}))};var Fe=n(98822),Ve=n(25016);const Ge=({instance:e,children:t})=>(0,N.jsx)(Ve.c.Provider,{value:e,children:t});var He=n(53481);const We=({instance:e,children:t})=>(0,N.jsx)(He.b.Provider,{value:e,children:t});var ze=n(81834);const Ke=({request:e,children:t})=>{const n=(0,_.useMemo)((()=>({request:e})),[e]);return(0,N.jsx)(ze.j.Provider,{value:n,children:t})};var Ye=n(23805);const qe=({instance:e,children:t})=>(0,N.jsx)(Ye.M.Provider,{value:e,children:t});var $e=n(77153),Ze=n(23442),Qe=n(33329),Je=n(34814);const Xe=({instance:e,children:t})=>(0,N.jsx)(Je.J.Provider,{value:e,children:t}),et=({instance:e,children:t})=>(0,N.jsx)(ge.rP.Provider,{value:e,children:t}),tt=({platform:e,children:t})=>{const n=(0,x.z)(),i=[(0,N.jsx)(et,{instance:e}),(0,N.jsx)(Le.D,{}),(0,N.jsx)(Ke,{request:e.getGraphQLLoader()}),(0,N.jsx)(Me.J,{platformData:e.getPlatformData()}),(0,N.jsx)(Be.P,{configuration:e.getRemoteConfiguration()}),(0,N.jsx)(we,{instance:e.getAdManagers()}),(0,N.jsx)($e.A,{instance:e.getSingAlongAPI()}),(0,N.jsx)(Ze.a,{value:null}),(0,N.jsx)(Qe.V,{instance:e.getUBILogger()}),(0,N.jsx)(xe.Z,{instance:e.getCollectionPlatformAPI()}),(0,N.jsx)(Ue.m,{instance:e.getEqualizerAPI()}),(0,N.jsx)(Ne.U.Provider,{value:e.getBuddyFeedAPI()}),(0,N.jsx)(Re.U.Provider,{value:e.getBuddyFeedLegacyAPI()}),(0,N.jsx)(De.pF,{playerAPI:n}),(0,N.jsx)(ke.t,{instance:e.getSettingsAPI()}),(0,N.jsx)(Fe.U,{instance:e.getRequestBuilder()}),(0,N.jsx)(Ge,{instance:e.getAudioOutputDevicesAPI()}),(0,N.jsx)(We,{instance:e.getExternalAccessoryAPI()}),(0,N.jsx)(qe,{instance:e.getPlaybackFiltersAPI()}),(0,N.jsx)(Xe,{instance:e.getUrlDispenserServiceClient()}),(0,N.jsx)(me.K,{}),(0,N.jsx)(Pe.i,{})];return(0,N.jsx)(je,{providers:i,children:t})};var nt=n(27438),it=n(7460),rt=n(49533),st=n(4158);const at=({history:e,children:t})=>{const[n,i]=(0,_.useState)((()=>({location:e.location,action:e.action})));return(0,_.useLayoutEffect)((()=>{e.listen(((e,t)=>i({location:e,action:t})))}),[e]),(0,N.jsx)(ae.Ix,{location:n.location,navigationType:n.action,navigator:e,children:t})};var ot=n(47095),lt=n(46466),ct=n(6202),ut=n(16273),dt=n(21152),pt=n(4564),mt=n(95175),ht=n(62478);const ft=()=>(0,mt.v8)("sp_key"),gt=e=>{const t=(0,ht.V)(),n=(()=>{const e=ft();return setInterval((()=>{e!==ft()&&window.location.reload()}),5e3)})();t.on(l.TransportEvent.LOGGED_OUT,(()=>{clearInterval(n),e()}))};const Et=864e5,_t=({platform:e,children:t})=>{const n=(0,s.NC)(be.QMQ),i=(0,j.Ek)()?"always":void 0,r=new lt.E({defaultOptions:{queries:{gcTime:0,networkMode:i},mutations:{networkMode:i}}});if((0,_.useEffect)((()=>{var e;gt((()=>{(0,pt.k)()})),e=()=>{console.log("Detected hard reload. Deleting persisted cache."),(0,pt.k)()},window.addEventListener("keydown",(t=>{const n=(t.ctrlKey||t.metaKey)&&t.shiftKey&&"R"===t.key.toUpperCase(),i=t.ctrlKey&&"F5"===t.key.toUpperCase();(n||i)&&e()}))}),[]),(0,_.useEffect)((()=>{n||(0,pt.k)()}),[n]),n){const n=(0,pt.Z)(),i=e.getSession(),s=["v1",e.username,i.locale,i.market];return(0,N.jsx)(dt.t,{client:r,persistOptions:{persister:n,buster:s.join(":"),maxAge:Et,hydrateOptions:{defaultOptions:{queries:{gcTime:Et}}},dehydrateOptions:{shouldDehydrateQuery:e=>!!e.meta?.persist&&(0,ct.XS)(e)}},children:t})}return(0,N.jsx)(ut.Ht,{client:r,children:t})};var yt=n(92202),vt=n(17061);var bt=n(97500),St=n.n(bt),At=n(74180),Ct=n(27042);function Tt(){const e=(0,s.NC)(be.g3o),t=(0,h.wA)();return(0,_.useEffect)((()=>{e&&t((0,Ct.$h)("dev"))}),[e,t]),null}function It(){const e=(0,s.NC)(be.SqX),t=(0,h.wA)();return(0,_.useEffect)((()=>{t((0,Ct.ab)(e))}),[e,t]),null}function Ot(){const e=(0,h.wA)(),[t,n]=(0,_.useState)(!1),{isOnboardingComplete:i}=(0,At.er)();return i?t?(0,N.jsxs)(_.Suspense,{fallback:null,children:[(0,N.jsx)(Tt,{}),(0,N.jsx)(It,{})]}):(e(p.yk()),n(!0),null):null}var wt=n(68144),Nt=n(44672),Rt=n(91508);const Pt=({children:e})=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Rt.M,{children:e})});var Lt=n(90696),Dt=n(10495),kt=n(75444),xt=n(73075),Ut=n.n(xt),Mt=n(96111),Bt=n(37178),jt=function(e){return e[e.DOWN=-1]="DOWN",e[e.NONE=0]="NONE",e[e.UP=1]="UP",e}(jt||{});const Ft=10,Vt=({ranges:e,size:t,onResize:n,label:i,placement:r,elementRef:s,decreaseSizeKeyboardCombination:a,increaseSizeKeyboardCombination:o,afterResizing:l})=>{const[c,u]=(0,_.useState)(!1),d=(0,Bt.W)(),p=(0,_.useCallback)(((t,n=jt.NONE)=>{if(e.some((([e,n])=>e<=t&&t<=n)))return t;switch(n){case jt.NONE:{const[n,i]=e.slice().sort((([e,n],[i,r])=>Math.min(Math.abs(e-t),Math.abs(n-t))-Math.min(Math.abs(i-t),Math.abs(r-t))))[0];return t(e[i-1]?.[1]??0){const s=e[r+1]?.[0]??1/0;return i{if(!s.current)return null;const t=s.current.getBoundingClientRect();return"inline-start"===r?d?e-t.left:t.right-e:"inline-end"===r?d?t.right-e:e-t.left:null}),[r,s,d]),h=(0,_.useCallback)((e=>{if(null==e)return;const t=0!==e||c?Math.trunc(p(e)):0;n(t)}),[p,n,c]);if(Number.isNaN(t)){const t=(e[0][1]-e[0][0])/2;console.error(`[LayoutResizer] css property value is not a number. Defaulting to ${t}`),h(t)}const f=(0,_.useCallback)((()=>{u(!0);const e=t,n=e=>{r.startsWith("inline")?h(m(e.clientX)):h(m(e.clientY))};document.addEventListener("pointerup",(()=>{u(!1),document.removeEventListener("pointermove",n),l?.(e,t)}),{once:!0}),document.addEventListener("pointermove",n)}),[l,m,h,t,r]);(0,_.useEffect)((()=>(a&&Ut().bind(a,(()=>{h(p(t-Ft,-1))})),o&&Ut().bind(o,(()=>{h(p(t+Ft,1))})),()=>{a&&Ut().unbind(a),o&&Ut().unbind(o)})),[a,p,o,h,t]);const g=e[0][0],E=e[e.length-1][1];return(0,N.jsxs)(N.Fragment,{children:[c&&(0,N.jsx)("div",{className:"LayoutResizer__resize-overlay"}),(0,N.jsx)("div",{"data-testid":"LayoutResizer__resize-bar",onPointerDown:f,className:St()("LayoutResizer__resize-bar",{"LayoutResizer__resize-bar--resizing":c,"LayoutResizer__inline-start":"inline-start"===r,"LayoutResizer__inline-end":"inline-end"===r,"LayoutResizer__block-start":"block-start"===r,"LayoutResizer__block-end":"block-end"===r}),onDoubleClick:()=>{const n=e.findIndex((([e])=>e===t)),i=e.findIndex((([e,n])=>n===t));if(-1!==i){const t=e.at(i+1);t&&h(t[0])}else if(-1!==n){const t=e.at(n-1);t&&h(t[1])}},children:(0,N.jsx)(Mt.o,{className:"LayoutResizer__input",type:"range",min:g,max:E,onChange:function(e){if(c)return;const n=t;let i=parseInt(e.target.value,10);i=p(i,Math.sign(i-t)),h(i),l?.(n,i)},value:t,step:Ft,children:i})})]})};var Gt=n(3714),Ht=n(36150),Wt=n(21200),zt=n(84523),Kt=n(62844),Yt=n(21549);const qt=({elementRef:e})=>{const{spec:t,logger:n}=(0,Yt.r)(kt.j,{data:{identifier:"yourlibraryx"}}),i=(0,Kt.vW)(),{isGridView:r}=(0,zt.t)(),{size:s,setSize:a,minMaxRanges:o}=(0,Wt.y)(),l=(0,Bt.W)();let u="default";i===Kt.fX.COLLAPSED?u="collapsed":i===Kt.fX.EXPANDED&&(u=r?"expanded_grid":"expanded_list");const d=(0,_.useCallback)(((e,i)=>{e!==i&&n.logInteraction(t.sidebarFactory({uri:"",identifier:u}).dragUiResize({startSizePx:e,endSizePx:i}))}),[n,u,t]),p=(0,_.useCallback)((e=>{document.documentElement.style.setProperty("--left-sidebar-width",`${e}`)}),[]);return(0,_.useLayoutEffect)((()=>{p(s)}),[s,p]),(0,N.jsx)(Vt,{elementRef:e,placement:"inline-end",label:c.Ru.get("resize.sidebar"),onResize:a,size:s,ranges:o,decreaseSizeKeyboardCombination:l?(0,Ht.p)(Gt.r.NPV_SIDEBAR_DECREASE_WIDTH):(0,Ht.p)(Gt.r.YLX_SIDEBAR_DECREASE_WIDTH),increaseSizeKeyboardCombination:l?(0,Ht.p)(Gt.r.NPV_SIDEBAR_INCREASE_WIDTH):(0,Ht.p)(Gt.r.YLX_SIDEBAR_INCREASE_WIDTH),afterResizing:d})};var $t=n(30147);const Zt={},Qt=e=>null===e.match(/\/search\/(\w+|\W+){1,}/gi)?e:"search-result",Jt=({scrollNodeRef:e,children:t,scrollNodeChildRef:n})=>{const i=(0,_.useRef)(""),r=(0,ae.zy)(),s=(0,ae.wQ)(),a=(0,_.useCallback)((()=>{if(!e.current)return()=>{};const t=Qt(r.pathname),n=Zt[t];let i;if(n&&"POP"===s){const t=Date.now(),r=()=>{!e.current||Date.now()>t+3e3?clearInterval(i):e.current.scrollHeight>=n+e.current.offsetHeight&&(e.current.scrollTop=n,clearInterval(i))};i=setInterval(r,50),r()}else e.current.scrollTop=0;return()=>{clearInterval(i)}}),[r.pathname,s,e]);(0,_.useMemo)((()=>{if(!e.current)return;const t=Qt(i.current);Zt[t]=e.current.scrollTop,i.current=r.pathname}),[r.pathname,e]),(0,_.useLayoutEffect)((()=>a()),[r.pathname,a,e]);const o=(0,_.useMemo)((()=>({scrollNodeRef:e,scrollNodeChildRef:n})),[e,n]);return(0,N.jsx)($t.bi.Provider,{value:o,children:t})};var Xt=n(62435),en=n(32714),tn=n(35163);var nn=n(27102);const rn=e=>{const t=(0,nn.ZY)()??document;(0,_.useEffect)((()=>{if(!e)return;const n=e=>{const t=e.target;["INPUT","TEXTAREA"].includes(t.tagName)||e.preventDefault()};return t.addEventListener("contextmenu",n),()=>{t.removeEventListener("contextmenu",n)}}),[t,e])};var sn=n(9856),an=n.n(sn);var on=n(49980),ln=n(18753),cn=n(13087),un=n(87257),dn=n(98712),pn=n(51354),mn=n(66583);const hn="T0fKO6B7LQSCE_VaSM1P",fn={[dn.E.SMALL]:0,[dn.E.MEDIUM]:600,[dn.E.LARGE]:1024},gn=(0,_.forwardRef)((({children:e},t)=>{(0,un.$)();const n=(0,_.useRef)(null);(0,_.useImperativeHandle)(t,(()=>n.current),[n]);const{breakpoint:i}=(0,mn.x)(fn,n);return(0,N.jsx)("main",{ref:n,className:hn,tabIndex:-1,children:(0,N.jsx)(pn.o.Provider,{value:i,children:e})})}));var En=n(47179),_n=n(67668),yn=n(86551),vn=n(65094);let bn=new class{get(){return vn.t5}};new class{get(){return vn.tE}};let Sn=new class{get(){return vn.wi}};var An=n(24281);const Cn=()=>{const[e,t]=(0,_.useState)(!1),{pathname:n}=location,i=(0,h.d4)(yn.JJ),r=(0,_n.V)(),[s,a]=(0,_.useState)(null),o=bn.get(),l=Sn.get();return(0,_.useEffect)((()=>{a((0,An.w)(window.navigator.userAgent))}),[]),(0,_.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[n]),e&&null!==s?(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(o,{language:c.Ru.getLocaleForSmartling(),market:i.toLowerCase(),excludePlanLinks:s,children:(0,N.jsx)(l,{hideWebPlayerLink:!0,hideLegalLinks:r})})}):(0,N.jsx)(N.Fragment,{})};var Tn=n(97503),In=n(43393),On=n(78505),wn=n(65367),Nn=n(90841),Rn=n(40339),Pn=n(8428),Ln=n(87386),Dn=n(72750),kn=n(98704),xn=n(55760);const Un="ZQftYELq0aOsg6tPbVbV",Mn="H1bRFdpa3qfekTVTeDwC",Bn=parseInt(xn.A.MINIMUM_HEADER_HEIGHT,10);function jn({children:e}){const t=(0,h.d4)((e=>e.ui.unsupportedBrowser.isOpen)),n=(0,Rn.XB)(),i=(0,s.NC)(be.ZDY),r=(0,In.lr)(),a=(0,In.Nx)(),o=(0,wn.W)(),l=(0,Ln.A)(),{isActive:c}=(0,Nn.$)(),u=(0,_.useRef)(-1),d=(0,_.useRef)(null),p=(0,_.useCallback)((e=>{const t=e.target.scrollTop;let n;n=r||a?(0,In.q8)(t,o):void 0===l?(0,kn.i)(t,On.uC):c?0:(0,kn.i)(t,Bn,140+On.uC),Number(u.current).toPrecision(2)!==Number(n).toPrecision(2)&&requestAnimationFrame((()=>{d.current&&d.current.style.setProperty("--top-bar-opacity",`${Number(n).toPrecision(2)}`)})),u.current=n}),[l,r,a,c,o]);return(0,Dn.g)(p,{executeOnceOnStart:!0}),(0,N.jsx)("div",{className:St()(Un,{[Mn]:t}),ref:d,"data-right-sidebar-hidden":!i&&n===Pn.Z.Disabled,children:e})}const Fn="mMjg1Gizg9kYk8ILoTdp",Vn=(0,_.forwardRef)((function({children:e},t){return(0,N.jsx)("div",{ref:t,className:Fn,children:e})}));let Gn=function(e){return e.Default="default",e.Tuna="tuna",e}({});const Hn=({children:e})=>(0,N.jsx)(N.Fragment,{children:e}),Wn=()=>({applicationMode:{mode:Gn.Default,params:{}},setApplicationMode:()=>{throw new Error("setApplicationMode must be used within a ApplicationModeProvider")}}),zn="BdcvqBAid96FaHAmPYw_";function Kn({children:e}){const{leftSidebarRef:t}=(0,Dt.JT)(),{applicationMode:n}=Wn();return n.mode!==Gn.Default?null:(0,N.jsx)("div",{id:"Desktop_LeftSidebar_Id",ref:t,className:zn,children:e})}const Yn="lHJd4oSttKLxkxuoZ0Lr",qn="wM72343CksOCaL3bZvKK",$n=(0,_.lazy)((async()=>{const{YourLibraryX:e}=await Promise.all([n.e(4151),n.e(711),n.e(7287),n.e(7607),n.e(2979),n.e(6457)]).then(n.bind(n,69660));return{default:e}})),Zn=()=>(0,N.jsx)(N.Fragment,{children:(0,N.jsx)("div",{className:St()(Yn,qn),children:(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)($n,{})})})}),Qn="lYpiKR_qEjl1jGGyEvsA";function Jn(){return(0,N.jsx)("nav",{className:Qn,"aria-label":c.Ru.get("sidebar.a11y.landmark-label"),children:(0,N.jsx)(Nt.pZ,{value:"nav-bar",children:(0,N.jsx)(Zn,{})})})}const Xn="jEMA2gVoLgPQqAFrPhFw";function ei({children:e}){const{applicationMode:t}=Wn(),{mainContentRef:n}=(0,Dt.JT)();return t.mode!==Gn.Default?null:(0,N.jsx)("div",{ref:n,className:Xn,children:e})}var ti=n(91631),ni=n(90813),ii=n(18870),ri=n(43013),si=n(79237),ai=n(19464);const oi=()=>{const e=(0,si.v)((e=>{const t=(0,ri.V)(e);return t.isPlayingRemotely&&void 0!==t.remoteDevice?.name&&void 0!==t.remoteDevice?.type})),t=(0,_.useContext)(ai.a);return e||(t?.active??!1)},li="OTfMDdomT5S7B5dbYTT8",ci="_Ze_0b0pjvJRB6Yrccef",ui="mYWHdrNeGjAdTOD28xSj",di="bENvsWd8JrCmuFulkXpg",pi="GS3Plog6THw80YGUPTYo";function mi({children:e}){const{rightSidebarRef:t}=(0,Dt.JT)(),n=(0,ti.h)(),i=(0,ni.S)(),r=(0,h.d4)((e=>e.ui.fullscreenMode.isOpen)),s=oi(),{applicationMode:a}=Wn();return(0,At.er)().shouldStepBeVisible(ii.B.SEARCH)||a.mode!==Gn.Default?null:(0,N.jsx)("div",{ref:t,className:St()(li,{[ci]:"closed"!==i,[ui]:n,[di]:r,[pi]:s}),children:e})}const hi="JG5J9NWJkaUO9fiKECMA";function fi({children:e}){const{nowPlayingBarRef:t}=(0,Dt.JT)(),{applicationMode:n}=Wn();return n.mode!==Gn.Default?null:(0,N.jsx)("div",{ref:t,className:hi,children:e})}var gi=n(8143);const Ei=(0,_.lazy)((()=>new Promise((e=>{const t=Promise.all([n.e(4151),n.e(8497),n.e(3848),n.e(7607),n.e(1113),n.e(3667)]).then(n.bind(n,94796)).then((e=>({default:e.PiPMiniPlayer}))),i=new Promise((e=>{setTimeout(e,300)}));Promise.all([t,i]).then((t=>{e(t[0])}))})))),_i=_.memo((()=>{const e=(0,h.d4)((e=>e.platform.isDeveloperMode));return rn(!e),null}));var yi=n(85172),vi=n(82992);n(77567);var bi=n(95752),Si=n(28999),Ai=n(71156);const Ci="pip-mini-player",Ti={OS_MACOS:"spotify__os--is-macos",OS_WINDOWS:"spotify__os--is-windows",CONTAINER_DESKTOP:"spotify__container--is-desktop",CONTAINER_WEB:"spotify__container--is-web"};function Ii(e,t,n){!function(e,t){e.querySelector("html")?.classList.remove(...t)}(n,Object.values(Ti));const i=function(e,t){const n=["no-focus-outline"];return t===bi.f.macOS?n.push(Ti.OS_MACOS):t===bi.f.Windows&&n.push(Ti.OS_WINDOWS),e===ln.m.Desktop?n.push(Ti.CONTAINER_DESKTOP):e===ln.m.Web&&n.push(Ti.CONTAINER_WEB),n}(e,t);!function(e,t){t.forEach((t=>{e.querySelector("html")?.classList.add(t)}))}(n,i)}const Oi=e=>{const t=Array.from(document.getElementsByTagName("script")).filter((e=>e.src?.includes("xpui.js")))?.[0]?.src.replace(/\/[^/]+$/,"")??"";return{scripts:[`${t}/${Ci}.js`,`${t}/vendor~${Ci}.js`],styles:[`${t}/${Ci}.css`,`${t}/vendor~${Ci}.css`]}},wi=e=>{const t=(0,ge.mv)();(0,_.useLayoutEffect)((()=>{if(!e)return;const{pipResources:n}=(0,Si.C)("config"),{scripts:i,styles:r}=Oi();e.document.body.style.margin="0",e.document.body.style.padding="0",e.document.body.style.overflow="hidden",e.document.body.style.height="100%",Ii(t.container,t.operatingSystem,e.document),Ai.M.setup(e.document),i.map((t=>((e,t)=>{const n=document.createElement("script");n.setAttribute("src",e),t.document.head.appendChild(n)})(t,e))),r.map((t=>((e,t)=>{const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),t.document.body.prepend(n)})(t,e)))}),[e,t])};var Ni=n(29634);const Ri=_.memo((()=>{const{capabilities:{isEnabled:e},isOpen:t,close:n}=(0,Ni.H)(),i=(0,_.useCallback)(n,[n]),r=window.documentPictureInPicture?.window??null;var s,a;if(wi(r),s=r,a=window,(0,_.useEffect)((()=>{s&&a&&["lang","dir"].forEach((e=>{const t=a.document.documentElement.getAttribute(e);null!==t&&s.document.documentElement.setAttribute(e,t)}))}),[s,a]),(0,_.useEffect)((()=>{}),[]),!e||!t||!r)return null;const o=r;return(0,gi.createPortal)((0,N.jsx)(E.s,{onError:i,children:(0,N.jsxs)(nn.IF,{handle:o,children:[(0,N.jsx)(_i,{}),(0,N.jsx)(vi.S,{children:(0,N.jsx)(_.Suspense,{fallback:(0,N.jsx)(yi.B,{}),children:(0,N.jsx)(Ei,{})})})]})}),r.document.body)}));var Pi=n(20375),Li=n(93827);class Di extends Li.V{}var ki=n(65645),xi=(n(44074),n(82935)),Ui=n(7307),Mi=n(55868);const Bi=640;class ji{_events=new Di;graphicsRef=null;currentImageUrl=null;getCapabilities(){return{isEnabled:!0,supportsVideo:!1,supportsAds:!1,supportsConnect:!1,supportsOffline:!1}}getEvents(){return this._events}async open(e){const t=this.getOrCreateGraphics();await this.updateGraphicsFromPlayerState(t,e);const n=this.getPictureInPictureElement();return n===t.video||(await this.requestPictureInPicture(t,(()=>{this.close()})),this._events.emitSync("visibility_change",!0)),n??null}async updateGraphicsFromPlayerState(e,t){const n=this.getImageURLFromPlayerState(t);null!==n?await this.drawImage(e,n):this.close()}close(){this.getPictureInPictureElement()&&document.exitPictureInPicture(),this.disposeGraphics(),this._events.emitSync("visibility_change",!1)}isAllowed(e,t,n){const i=e?.hasContext??!1,r=e?.item?.type===Ui.c.EPISODE&&"audio"!==e?.item.mediaType;return!!i&&(!!(n??!0)&&!r)}getCurrentState(){return this.getPictureInPictureElement()?"open":"closed"}syncWithPlayerState(e){const t=e?.hasContext??!1,n=e?.isPaused??!1,i=this.getPictureInPictureElement();!t||n?i?.pause():i?.play();const r=this.getOrCreateGraphics();this.updateGraphicsFromPlayerState(r,e)}getOrCreateGraphics(){return this.graphicsRef??=this.createGraphics(),this.graphicsRef}disposeGraphics(){this.graphicsRef=null,this.currentImageUrl=null}createGraphics(){const e=document.createElement("canvas");e.width=Bi,e.height=Bi;const t=e.getContext("2d"),n=document.createElement("video");return n.srcObject=e.captureStream(),n.muted=!0,{context:t,video:n}}async drawImage({context:e,video:t},n){if(this.currentImageUrl===n)return;this.currentImageUrl=n;const i=new Image;i.crossOrigin="anonymous",i.src=(0,Mi.m)({imageUriOrUrl:n,desiredMosaicSize:Bi}),await i.decode(),e.drawImage(i,0,0,Bi,Bi),await t.play()}getImageURLFromPlayerState(e){const t=e?.item?.images??[];return(0,xi.h)(t,{desiredSize:Bi})??null}async requestPictureInPicture({video:e},t){try{await e.requestPictureInPicture(),e.addEventListener("leavepictureinpicture",t,{once:!0})}catch(e){(0,ki.v)(e)}}getPictureInPictureElement(){if(document.pictureInPictureElement)return document.pictureInPictureElement}static isSupported(){return!1}}var Fi=n(62642),Vi=n(46845);function Gi(e,t){return an().getParser(navigator.userAgent).satisfies({[e]:`>=${t}`})??!1}class Hi{#e=new Di;#t=null;#n;constructor(e=!1){this.#n=e}getCapabilities(){return{isEnabled:!0,supportsVideo:!0,supportsAds:!0,supportsConnect:!0,supportsOffline:this.#n}}getEvents(){return this.#e}async open(e){if(!Hi.isSupported())return null;const t=this.getDocumentPictureInPictureElement()?.window;if(t){if(t===this.#t)return this.#t;t.close()}const{width:n,height:i}=this.getInitialWindowSize(e?.item),r=await this.createWindow(n,i);return void 0===r?(this.close(),null):(this.#t=r,this.#t.addEventListener("pagehide",(()=>{this.close()}),{once:!0}),this.#e.emitSync("visibility_change",!0),this.#t)}close(){this.#t&&(this.#t.close(),this.#t=null),this.#e.emitSync("visibility_change",!1)}isAllowed(e,t,n){return!(!(e?.hasContext??!1)&&t===Fi.zP.NOT_CONNECTED)}getCurrentState(){return this.#t?"open":"closed"}syncWithPlayerState(e){}getInitialWindowSize(e){let t=300,n=300;if(e){(0,W.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType)&&(t=425,n=300)}return{width:t,height:n}}async createWindow(e,t){return await(this.getDocumentPictureInPictureElement()?.requestWindow({width:e,height:t}))}getDocumentPictureInPictureElement(){return window.documentPictureInPicture}static isSupported(){return"documentPictureInPicture"in window&&((0,Vi.Ek)()||Gi("chrome",119)||Gi("edge",127))}}class Wi{getCapabilities(){return{isEnabled:!1,supportsVideo:!1,supportsAds:!1,supportsConnect:!1,supportsOffline:!1}}getEvents(){return new Di}open(){return Promise.resolve(void 0)}close(){}isAllowed(e,t,n){return!1}getCurrentState(){return"closed"}syncWithPlayerState(){}}const zi=()=>{const e=(0,Be.g)(),[t]=(0,_.useState)((()=>{if(navigator.webdriver)return new Wi;if(Hi.isSupported()){if(e.localConfiguration.getValue(be.Tb_)){return new Hi(!0)}}return ji.isSupported()?new ji:new Wi}));return t};var Ki=n(78119);var Yi=n(6102);var qi=n(58685),$i=n(41434);function Zi(){if(Qi())try{navigator.mediaSession.setActionHandler("enterpictureinpicture",null)}catch(e){}}function Qi(){return"mediaSession"in navigator}const Ji=_.memo((({pipInstance:e})=>((e=>{const{connectionStatus:t,isActiveDeviceLocal:n}=(0,si.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),$i.a),i=(0,qi.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),r=(0,_.useRef)(i);r.current=i;const s=(0,_.useMemo)((()=>e.isAllowed(i,t,n)),[t,n,e,i]);(0,_.useEffect)((()=>{if(Qi()){try{s?navigator.mediaSession.setActionHandler("enterpictureinpicture",(t=>{e.open(r.current)})):Zi()}catch(e){}return()=>{Zi()}}}),[e,s])})(e),null)));var Xi=n(60749),er=n(1017),tr=n(54415);const nr=_.createContext({}),ir=({children:e})=>{const[t,n]=_.useState(!0),i=(0,_.useMemo)((()=>({isGlobalNavDraggable:t,setIsGlobalNavDraggable:n})),[t,n]);return(0,N.jsx)(nr.Provider,{value:i,children:e})};var rr=n(93523),sr=n(44481),ar=n(70243),or=n(99701);function lr(e){return"1"===e.employee}var cr=n(86723),ur=n(27236),dr=n(5689),pr=n(7699);const mr="YyUcY0HTiYikUOwhh29d",hr=(e,t)=>{if(!t)return null;const n=((e,t)=>{const[n=1,i=0,r=0,s=0]=e.split("."),[a=1,o=0,l=0,c=0]=t.split("."),u=1e9*Number(n)+1e6*Number(i)+1e4*Number(r)+Number(s);return 1e9*Number(a)+1e6*Number(o)+1e4*Number(l)+Number(c)-u})(e,t);return n>=2e4?"negative":n>=1e3?"warning":n>=500?"announcement":null},fr=()=>{const e=(0,dr.k)(),t=(0,ur.t)(),n=(0,_.useCallback)((()=>{t.prepareUpdate()}),[t]),i=(0,_.useCallback)((()=>{t.applyUpdate()}),[t]),[r,s]=(0,_.useState)(null),a=e?.version;if((0,_.useEffect)((()=>{t.getVersionInfo().then((e=>{const t=e.containerVersion.split(".");5===t.length&&t.pop(),s(t.join("."))}))}),[t]),e?.state===pr.D.UPDATE_NONE)return null;if(!r||!a)return null;const o=hr(r,a);if(!o)return null;switch(e?.state){case pr.D.UPDATE_AVAILABLE:return(0,N.jsx)(or.Zp,{label:c.Ru.get("release-notifier.update-available",a),children:(0,N.jsx)(sr.$,{size:"small",colorSet:o,onClick:n,className:mr,children:a})});case pr.D.UPDATE_PROCESSING:return(0,N.jsx)(or.Zp,{label:c.Ru.get("release-notifier.update-processing",a),children:(0,N.jsx)(sr.$,{size:"small",colorSet:o,disabled:!0,onClick:i,className:mr,children:a})});case pr.D.UPDATE_READY:return(0,N.jsx)(or.Zp,{label:c.Ru.get("release-notifier.update-ready",a),children:(0,N.jsx)(sr.$,{size:"small",colorSet:o,onClick:i,className:mr,children:a})});default:return null}},gr=()=>{const{settings:e}=(0,cr.t0)();return lr(e.values)?(0,N.jsx)(fr,{}):null},Er=()=>(0,N.jsx)(gr,{});var _r=n(422),yr=n(50559),vr=n(51560),br=n(94079),Sr=n(94141),Ar=n(6038),Cr=n(89402);const Tr="400ms",Ir="Y22srYwXssaWnfD1MXis",Or="WIGgdAaAzrXm7f_loaXi",wr="IebnAuNOhIG5mDVNJQ5M",Nr="N3juGUCH1EhEzmffNHAp",Rr="uObDRTsYYQmLhK7QzuFF",Pr="rSvmoStBWe2Cft5bw9ya",Lr="g_OLJCea3ISA_OEZXMld",Dr="eUtkhxZmvSKe4G9vJbvG",kr="y0CwI5JkA0h0OyLFf53Q",xr="FannkPV_e2vWawF9QgVA",Ur="JbIx9RVHwxVXRbXAJaeN",Mr="CtNz_OQHOZ5Z0mJMHjzw";let Br=function(e){return e.ERROR="ERROR",e.NOTICE="NOTICE",e}({});const jr=(0,_.memo)((function(e){const{children:t,feedbackType:n,tooltip:i,itemId:r,display:s=!0,minimized:a=!1,spec:o}=e,l=(0,_.useRef)(null),c=(0,Cr.W)(),u=(0,Qe.s)();return(0,N.jsx)(br.A,{in:s,timeout:parseInt(Tr,10),unmountOnExit:!0,onEnter:()=>{a||l.current?.classList.add(xr)},onEntered:()=>{a||l.current?.classList.add(Mr)},onExited:()=>{a||l.current?.classList.remove(Mr)},classNames:{enter:Lr,enterActive:Dr,exitActive:kr},nodeRef:l,children:(0,N.jsx)(Nt.pZ,{value:r,children:(0,N.jsx)("div",{className:St()(Ir,{[Ur]:!a}),children:(0,N.jsx)(Ar.y,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,N.jsx)(Sr.z,{className:St()({[Pr]:n===Br.ERROR}),children:(0,N.jsx)("div",{children:i})}),renderInline:!1,children:(0,N.jsx)("button",{className:St()(Or,{[Rr]:i,[wr]:n===Br.ERROR,[Nr]:n===Br.NOTICE}),onClick:()=>{c({intent:"toggle",type:"click"}),o&&u.logInteraction(o.hitUiReveal())},ref:l,"data-testid":r,children:t})})})})})}));var Fr=n(39566),Vr=n(67174),Gr=n(79701),Hr=n(72680),Wr=n(97701);const zr="P8EYxpJkrSRcmY5CFfgZ",Kr="oMR8tk4wMj9_exGQeapz",Yr="qq3uDmbXwv31FKawHDIg",qr="B64o12iyKiKF4s8uuClS";function $r(e){if(null===e)return null;const t=Math.abs(Date.now()-e.getTime());if(t<1e3)return null;const{hours:n,minutes:i,seconds:r}=(0,Wr.S)(t),s=(0,Vr.j)({h:n,m:i,s:r});return c.Ru.get("authorization-status.retrying",s)}const Zr=({retryAt:e})=>{const t=(0,Gr.v)(),[n,i]=(0,_.useState)($r(e)),r=(0,f.Oj)();return(0,_.useEffect)((()=>{const t=window.setInterval((()=>{i($r(e))}),500);return()=>{window.clearInterval(t)}}),[e,i]),(0,N.jsxs)("div",{className:zr,children:[(0,N.jsx)(_r.E,{as:"p",variant:"bodyMediumBold",children:c.Ru.get("authorization-status.title")}),(0,N.jsx)("span",{className:Kr,children:n??c.Ru.get("authorization-status.reconnecting")}),(0,N.jsxs)("div",{className:Yr,children:[(0,N.jsx)(rr.H,{semanticColor:"textBase",buttonSize:yr.$.sm,onClick:()=>{r({type:"close"})},children:c.Ru.get("authorization-status.dismiss")}),(0,N.jsx)(sr.$,{className:qr,buttonSize:yr.$.sm,onClick:()=>t.tryAuthorize(),children:c.Ru.get("authorization-status.retry")})]})]})},Qr=({minimized:e,spec:t})=>{const n=(0,Fr.n)(),{isAuthorized:i,retryAt:r}=(0,Hr.Y)();return(0,s.NC)(be.ueo)?(0,N.jsxs)(jr,{feedbackType:Br.ERROR,minimized:e,display:n&&!i,spec:t,tooltip:(0,N.jsx)(Zr,{retryAt:r}),itemId:"authorization-status-indicator",children:[(0,N.jsx)(vr.b,{size:"small"}),c.Ru.get("authorization-status.badge")]}):null};var Jr=n(72184),Xr=n(94303),es=n(91128),ts=n(83327);const ns="PYPe3hJJmzsQV6XoN3Cl",is="mqsHTSdyZwgRvD2Kylc1",rs=()=>{const e=(0,Qe.s)(),{spec:t}=(0,Yt.r)(Xr.V,{}),n=(0,f.Oj)(),i=(0,h.wA)(),r=(0,_.useCallback)((()=>{n({type:"close"}),i(es.r8.actions.open()),e.logInteraction(t.learnMoreButtonFactory().hitUiReveal())}),[i,e,n,t]);return(0,N.jsxs)(_r.E,{className:ns,variant:"bodySmall",children:[c.Ru.get("topBar.dsa-indicator"),(0,N.jsx)(rr.H,{className:is,onClick:r,condensedAll:!0,size:"small",semanticColor:"textBase",children:c.Ru.get("topBar.dsa-cta")})]})},ss=({spec:e})=>{const t=(0,Yi.p)();return(0,N.jsx)(ts.r,{spec:e,children:(0,N.jsx)(jr,{feedbackType:Br.NOTICE,minimized:!0,display:!t,tooltip:(0,N.jsx)(rs,{}),itemId:"dsa-mode-status-indicator",spec:e,children:(0,N.jsx)(Jr.p,{size:"small"})})})};var as=n(59042);const os=({minimized:e,spec:t})=>{const n=!(0,Fr.n)();return(0,N.jsxs)(jr,{feedbackType:Br.NOTICE,minimized:e,display:n,spec:t,tooltip:c.Ru.get("offline.callout-disconnected"),itemId:"offline-status-indicator",children:[(0,N.jsx)(as.P,{size:"small"}),c.Ru.get("offline.badge")]})};var ls=n(83773),cs=n(56488),us=n(30157);var ds=n(66530);function ps(){const e=(0,us.N)(cs.H),[t,n]=(0,_.useState)(!1),i=(0,ds.a)();(0,_.useEffect)((()=>{const t=e.subscribeToPrivateSession((e=>{i()&&n(e)}));return()=>{t()}}),[e,i]);return{isPrivateSession:t,setPrivateSession:(0,_.useCallback)((t=>{e.setPrivateSession(t)}),[e])}}const ms=({minimized:e,spec:t})=>{const{isPrivateSession:n}=ps();return(0,N.jsxs)(jr,{feedbackType:Br.NOTICE,minimized:e,display:n,tooltip:c.Ru.get("private-session.badge"),spec:t,itemId:"private-session-indicator",children:[(0,N.jsx)(ls.y,{size:"small"}),c.Ru.get("private-session.badge")]})};var hs=n(19830);const fs=_.memo((function(e){const t=(0,hs.U)("(max-width: 1023px)"),n=(0,_.useMemo)((()=>e.spec?.privateSessionButtonFactory()),[e.spec]),i=(0,_.useMemo)((()=>e.spec?.offlineButtonFactory()),[e.spec]),r=(0,_.useMemo)((()=>e.spec?.authorizationButtonFactory()),[e.spec]),s=(0,_.useMemo)((()=>e.spec?.dsaModeButtonFactory()),[e.spec]);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ms,{spec:n,minimized:t}),(0,N.jsx)(os,{spec:i,minimized:t}),(0,N.jsx)(Qr,{spec:r,minimized:t}),(0,N.jsx)(ss,{spec:s})]})}));var gs=n(46607),Es=n(17866),_s=n(88598),ys=n(1773),vs=n(53133);function bs(e,t){switch(t.type){case"installed":return{...e,installed:!0};case"before-install":return{...e,deferredPrompt:t.prompt,canBeInstalled:!0};default:return e}}const Ss=_.memo((({logger:e,spec:t})=>{const n=(0,h.wA)(),i=(0,ge.vh)(),r=(0,_n.V)(),{enqueueSnackbar:s}=(0,vs.d)(),[a,o]=(0,_.useReducer)(bs,{deferredPrompt:void 0,installed:!1,canBeInstalled:!1});(0,_.useEffect)((()=>{const e=()=>{o({type:"installed"}),s(c.Ru.get("pwa.confirm"));const e={action_type:"unknown",action_intent:"pwa-installed",target_uri:"/pwa-install-confirmation",item_id:"pwa",view_uri:"/unknown",page:"/page"};i.send(r?(0,ys.o)(e):(0,_s.x)(e))},t=e=>{e.preventDefault(),o({type:"before-install",prompt:e})};return window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",e),()=>{window.removeEventListener("beforeinstallprompt",t),window.removeEventListener("appinstalled",e)}}),[n,s,i,r]);const l=(0,_.useCallback)((n=>{if(n.preventDefault(),t&&e){const n=t.installPwaButtonFactory().hitInstallApp({appName:"pwa"});e.logInteraction(n)}a.deferredPrompt&&a.deferredPrompt.prompt()}),[t,e,a.deferredPrompt]),{canBeInstalled:u,installed:d}=a;return!u||d?null:(0,N.jsx)(sr.$,{colorSet:"overMedia",size:"small",onClick:l,iconLeading:gs.i,children:(0,N.jsx)(_r.E,{variant:"bodySmallBold",className:"ellipsis-one-line",children:c.Ru.get("pwa.download-app")})})}));var As=n(99644);const Cs=_.memo((({shouldCalloutPWA:e,spec:t,logger:n})=>{const i=(0,_.useCallback)((()=>{if(!t||!n)return;const e=t.installAppButtonFactory().hitNavigateToExternalUri({destination:"/download"});n.logInteraction(e)}),[n,t]),[r,s]=(0,_.useState)(!1),a=(0,_.useRef)(null);if((0,As.w)({onResize:({width:e})=>{a.current?.scrollWidth&&e!e||e.type!==Ns.Gs,getTitle:({triggerAction:e})=>e?.type===ws.no.SAVE_PRERELEASE?c.Ru.get("action-trigger.log-in-or-sign-up"):c.Ru.get("action-trigger.logged-out"),getDescription:({triggerAction:e})=>{switch(e?.type){case Ts.gK.ADD_TO_QUEUE:return c.Ru.get("action-trigger.logged-out-queue");case ws.$k.START_RADIO:return c.Ru.get("action-trigger.logged-out-radio");case ws.no.SAVE_TRACK:return c.Ru.get("action-trigger.log-in-like-action");case ws.no.SAVE_ALBUM:return c.Ru.get("action-trigger.save-album");case ws.no.SAVE_PRERELEASE:return c.Ru.get("web-player.prerelease.album_anonymous_presave");case ws.tf.FOLLOW_USER:return c.Ru.get("action-trigger.log-in-follow-profile");case Ns.Gs:return"track"===e?.entityType?c.Ru.get("action-trigger.logged-out-full-track"):c.Ru.get("action-trigger.logged-out-synced");default:return c.Ru.get("action-trigger.logged-out-continue")}}},Ps=({children:e})=>(0,N.jsx)(Is.y,{id:Os.d,options:Rs,children:e});var Ls=n(50671);const Ds=({...e})=>{const{spec:t}=(0,Yt.r)(tr.x,{}),n=(0,_.useMemo)((()=>t.upgradeButtonFactory()),[t]),i=(0,Ls.t)(n);return(0,N.jsx)(sr.$,{...e,style:{flexShrink:0},ref:i,size:"small",onClick:e.onClick,"aria-label":c.Ru.get("upgrade.tooltip.title"),title:c.Ru.get("upgrade.tooltip.title"),colorSet:"invertedLight","data-testid":"upgrade-button",children:c.Ru.get("upgrade.button")})};var ks=n(45415),xs=n(86066),Us=n(71416),Ms=n(41616),Bs=n(75830),js=n(78592),Fs=n(75392),Vs=n(10994),Gs=n(12864),Hs=n(28497),Ws=n(74992);function zs(e,t){return t?(0,Ws.r)(e):(0,Hs._)(e)}var Ks=n(32963),Ys=n(19862),qs=n(27301);const $s=({divider:e,visible:t})=>{const n=(0,ge.vh)(),i=(0,_n.V)(),r=(0,_.useCallback)((()=>{n.send(zs({category:"masthead",action:"click",label:"download-link",destination_url:qs.Kw,context:window.location.href,os:(0,Ks.f)(),variant:"a"},i))}),[n,i]);return t?(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",href:qs.Kw,onClick:r,target:"_blank",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),children:c.Ru.get("download.download")}):null};var Zs=n(39405),Qs=n(54454);const Js=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,h.wA)(),r=(0,Qs.k)(),{url:s,isExternal:a}=r,o=(0,_.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:s})),i((0,Zs.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[t,n,s,i]);return a?(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),onClick:o,target:"_blank",href:s,children:c.Ru.get("navbar.premium")}):(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",onClick:o,to:s,children:c.Ru.get("navbar.premium")})},Xs=({divider:e,visible:t})=>{const n=(0,ge.vh)(),i=(0,_n.V)(),r=(0,_.useCallback)((()=>{n.send(zs({category:"masthead",action:"click",label:"support-link",destination_url:qs.nw,context:window.location.href,os:(0,Ks.f)(),variant:"a"},i))}),[n,i]);return t?(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",href:qs.nw,onClick:r,target:"_blank",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),children:c.Ru.get("user.support")}):null},ea="8px",ta="odcjv30UQnjaTv4sylc0",na="KAq2kDjXj2VS4eXrFL4i",ia="ERyo7m5f00o7ToFdGMCD",ra="LKfKy7bXKmlkMEANVJMS",sa="y5mR1se0HqD3uewF5Eb6",aa="PrOCaGCRoGw7XaycfkTl",oa="tU7KjNh_lnoniCY_3zHQ",la="kD6L2BtiukbMHbIwCNef",ca="VdLuku6YQT4tNLT6ojlD",ua="FZ4y0Q61kFpjJzUjCvSa",da="YqPjzOfhtzbCf_QD3P1f",pa="pEG0W4wkbkrOYURhz82H",ma=()=>{const e=(0,h.d4)((e=>e.platform.isDesktop)),{spec:t,logger:n}=(0,Yt.r)(Fs.d,{});return(0,_.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]),e?null:(0,N.jsx)("div",{className:ia,children:(0,N.jsxs)(Vs.W,{children:[(0,N.jsx)(Js,{ubiSpec:t,ubiLogger:n}),(0,N.jsx)(Xs,{visible:!0}),(0,N.jsx)($s,{visible:!0})]})})};function ha(e){if(null===e)return null;const t=e["multiuserplan-member-type"],n=parseInt(e["multiuserplan-current-size"]||"1",10);switch(t){case"FAMILY_MANAGER":return{plan:"family",currentSize:n};case"DUO_MANAGER":return{plan:"duo",currentSize:n};default:return null}}var fa=n(19329);const ga=`${qs.xD}?utm_source=spotify&utm_medium=menu&utm_campaign=your_account`,Ea=({divider:e,ubiLogger:t,ubiSpec:n})=>{const{openURLWithSessionTransfer:i}=(0,fa.L)();return(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),onClick:()=>{t.logInteraction(n.goToAccountPageRowFactory().hitUiNavigate({destination:ga})),i(ga)},children:c.Ru.get("user.account")})};var _a=n(32032),ya=n(42767);const va=()=>{const{settings:e}=(0,cr.t0)(),t=lr(e.values),{show:n}=(0,ya.j)();return t?(0,N.jsxs)(_a.g,{displayText:"Debug Tools",children:[(0,N.jsx)(Gs.D,{role:"menuitem",onClick:()=>n(),children:"Debug Window"}),!1,(0,N.jsx)(Gs.D,{role:"menuitem",to:"/debug/locales",children:"Locales"})]}):null};var ba=n(78412);const Sa=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,h.wA)(),r=(0,_.useCallback)((()=>{t.logInteraction(n.logOutRowFactory().hitLogout()),i((0,ba.wH)())}),[i,t,n]);return(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",onClick:r,"data-testid":"user-widget-dropdown-logout",children:c.Ru.get("user.log-out")})},Aa=({divider:e,planAttributes:t,ubiSpec:n,ubiLogger:i})=>{const{openURLWithSessionTransfer:r}=(0,fa.L)(),s="duo"===t.plan?"https://www.spotify.com/account/duo/":"https://www.spotify.com/account/family/";return(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),onClick:()=>{i.logInteraction(n.goToPlanManagementFactory().hitNavigateToExternalUri({destination:s})),r(s)},children:(0,N.jsxs)("span",{className:da,children:["duo"===t.plan?c.Ru.get("user.setup-duo"):c.Ru.get("user.setup-family"),t.currentSize<=1&&(0,N.jsx)(js.Z,{className:aa,name:"dot-icon"})]})})},Ca=({visible:e,divider:t,ubiSpec:n,ubiLogger:i})=>{const{isPrivateSession:r,setPrivateSession:s}=ps(),a=(0,_.useCallback)((()=>{i.logInteraction(n.togglePrivateSessionRowFactory().hitSetSettingField()),s(!r)}),[s,r,i,n]);return e?(0,N.jsx)(Gs.D,{divider:t,role:"menuitemcheckbox","aria-checked":r,onClick:a,children:c.Ru.get("user.private-session")}):null},Ta="/preferences",Ia=({divider:e,ubiLogger:t,ubiSpec:n})=>(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",to:Ta,onClick:()=>{t.logInteraction(n.goToSettingsRowFactory().hitUiNavigate({destination:Ta}))},children:c.Ru.get("user.settings")}),Oa=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,dr.k)(),r=(0,ur.t)(),s=(0,_.useCallback)((()=>{t.logInteraction(n.updateClientRowFactory().hitUiHide()),r.applyUpdate()}),[r,t,n]);return i?.state!==pr.D.UPDATE_READY?null:(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",onClick:s,trailingIcon:(0,N.jsx)(js.Z,{className:aa}),"data-testid":"user-widget-update-available",children:c.Ru.get("user.update-client")})},wa=({divider:e})=>{const t=(0,h.wA)(),n=(0,_.useCallback)((e=>{e.preventDefault(),t((0,p.as)())}),[t]);return(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",trailingIcon:(0,N.jsx)(js.Z,{className:ca}),onClick:n,href:"",target:"_blank",children:c.Ru.get("user.unable-to-update")})};var Na=n(82432),Ra=n(36061);const Pa=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,h.wA)(),r=(0,Na.D)("loggedin_upgrade_menu"),s=(0,Qs.k)(),{url:a,isExternal:o}=s,l=(0,_.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:a})),i((0,Zs.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[i,a,t,n]);return(0,h.d4)((e=>(0,Ra.Yb)(e)))?o?(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",trailingIcon:(0,N.jsx)(Ys.p,{size:"small"}),onClick:l,target:"_blank",href:r(a),children:c.Ru.get("upgrade.tooltip.title")}):(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",onClick:l,to:r(a),children:c.Ru.get("upgrade.tooltip.title")}):null},La=({divider:e,ubiSpec:t,ubiLogger:n})=>{const i=(0,h.d4)((e=>e.session.user?.uri)),r=(0,x.z)();if(!i)return null;const s=(0,ne.o_h)(i).toURLPath(!0);return(0,N.jsx)(Gs.D,{divider:e,role:"menuitem",to:s,onClick:()=>{n.logInteraction(t.goToUserProfileRowFactory().hitUiNavigate({destination:s})),r.setReferrer("user_profile")},children:c.Ru.get("card.tag.profile")})};var Da=n(21743);const ka="KROerAKSuwZBbse9iJT_",xa="Sv1KnjVg3ekpKXQ06hx1",Ua="lgapDocKw68LlwEMOEe_",Ma="X0f9yl0vfdlQU4bX4p2Q",Ba="ELJKm9oK4ojPrEohxqWu",ja="GRIcLOxMVgF_nrfnY4Uv",Fa="ECeOpd1vpoOavSRlnAvd",Va="eUqphQq1C_Rpj86v0C76",Ga="q_y6r1A1e8D5uNZ_Menz",Ha="jG4F9TThOut3mIchASGW",Wa="SuKZtj8PyNFy4RV6GSem",za="SO8ZVeRnaa3OYx4hD5WZ",Ka="FSi_NkGvBacIY9AQ3Enf",Ya="RRTp4ESOekxPGhzyjzt5",qa="KFhPNPSqzSZjHtAi0Kqz",$a="O84I6j6mdxtM8lakjPzR",Za="WATiQKibA4mYnP3g6KaM",Qa="y77CgOUQOe6c5bjVe4GX",Ja="QeUrkqvHAbXSveKN2wCu",Xa=()=>(0,N.jsx)("div",{className:St()(Ma,Ba,ja),children:(0,N.jsx)(_r.E,{semanticColor:"textSubdued",variant:"marginal",children:c.Ru.get("web-player.notification-center.empty-state")})});var eo=n(37458);const to=({lastItemRef:e})=>(0,N.jsx)("div",{className:St()(Ma,Ba),ref:e,children:(0,N.jsx)(eo.a3,{semanticColor:"textSubdued","aria-labelledby":c.Ru.get("page.loading")})});var no=n(32255),io=n(69624);const ro=({primaryImages:e})=>(0,N.jsx)("div",{className:Ha,children:e.length>1?(0,N.jsx)("div",{className:Ka,children:e.map(((t,n)=>(0,N.jsx)("div",{className:Ya,style:{zIndex:e.length-n},children:(0,N.jsx)(Ms.e,{imageClassName:Va,placeholderClassName:Va,label:"notificationAvatar",width:32,images:[{url:t.image_url}],userIconSize:"medium",username:t.displayName,displayName:t.displayName})},n)))}):(0,N.jsx)(Ms.e,{images:e.map((e=>({url:e.image_url}))),userIconSize:"large",label:"notificationAvatar",width:48,username:e[0]?.displayName,displayName:e[0]?.displayName})}),so=({primaryImage:e,secondaryImage:t})=>(0,N.jsxs)("div",{className:Ha,children:[(0,N.jsx)(no.b,{className:Wa,images:[{url:e.image_url}],iconSize:"medium",size:io.Qe.SIZE_40,type:Ui.c.PLAYLIST,title:e.displayName}),(0,N.jsx)(Ms.e,{className:za,imageClassName:Va,placeholderClassName:Va,label:"notificationAvatar",width:24,images:[{url:t.image_url}],userIconSize:"small",username:t.displayName,displayName:t.displayName})]});var ao=n(56386),oo=n.n(ao),lo=n(26122),co=n(1533);const uo=({title:e,timestamp:t})=>{let n=0;const i=(0,_.useRef)(null),r=(0,lo.K)({ref:i}),s=(0,_.useMemo)((()=>(0,co.Z)(Date.parse(t)).replace(/\s+/g,"")),[t]);return(0,N.jsxs)("div",{className:qa,children:[(0,N.jsx)(_r.E,{variant:"bodySmall",semanticColor:"textBase",style:{"--timestamp-text":`'${s}'`},className:Za,ref:i,children:oo()(e.text?.text,/(\$\d+)/g,((t,i)=>{const r=(0,N.jsx)(_r.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e.text_values[n].text},i);return n++,r}))}),r&&(0,N.jsx)(_r.E,{variant:"marginal",semanticColor:"textSubdued",className:$a,children:s})]})},po=()=>(0,N.jsx)("div",{className:Ja});let mo=function(e){return e.UNKNOWN_STATE="UNKNOWN_STATE",e.UNREAD="UNREAD",e.READ="READ",e.CLICKED="CLICKED",e[e.UNRECOGNIZED=NaN]="UNRECOGNIZED",e}({});const ho=({notification:e,markAsRead:t})=>{const{ref:n,inView:i}=(0,Da.Wx)();return(0,_.useEffect)((()=>{i&&e.state===mo.UNREAD&&t(e.notification_id)}),[i,t,e.notification_id,e.state]),(0,N.jsxs)("div",{className:Ga,ref:n,children:[(0,N.jsx)(ro,{primaryImages:e.primary_images}),(0,N.jsx)(uo,{title:e.title,timestamp:e.event_timestamp}),e.state===mo.UNREAD&&(0,N.jsx)("div",{className:Qa,children:(0,N.jsx)(po,{})})]})},fo=({notification:e,markAsRead:t})=>{const{ref:n,inView:i}=(0,Da.Wx)();return(0,_.useEffect)((()=>{i&&e.state===mo.UNREAD&&t(e.notification_id)}),[i,t,e.notification_id,e.state]),(0,N.jsxs)("div",{className:Ga,ref:n,children:[(0,N.jsx)(so,{primaryImage:e.primary_image,secondaryImage:e.secondary_image}),(0,N.jsx)(uo,{title:e.title,timestamp:e.event_timestamp}),e.state===mo.UNREAD&&(0,N.jsx)("div",{className:Qa,children:(0,N.jsx)(po,{})})]})};var go=n(1599),Eo=n(72671);const _o=async(e,t)=>{const n=go.n.getInstance();await n.build().withHost(Eo.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({notification_ids:e,state:t}).withPath("/UpdateNotificationState").send()};var yo=n(5993);const vo=()=>{const{data:e,isLoading:t,fetchNextPage:n,hasNextPage:i}=(0,yo.q)({queryKey:["notifications"],queryFn:async({pageParam:e})=>await(async e=>{const t=go.n.getInstance();return(await t.build().withHost(Eo.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({check_further_unread:!0,cursor:e,limit:20}).withPath("/GetNotifications").send()).body})(e),initialPageParam:void 0,getPreviousPageParam:e=>e.reverse_cursor,getNextPageParam:e=>e.forward_cursor,gcTime:18e5,staleTime:6e5});return{notifications:e?.pages.map((e=>e.notifications)).flat()??[],isLoading:t,hasNextPage:i,fetchNextPage:n}};var bo=n(39464),So=n(88091);const Ao=({notifications:e,fetchNextPage:t,hasNextPage:n})=>{const i=(0,ae.Zp)(),r=(0,f.Oj)(),{ref:s,inView:a}=(0,Da.Wx)();(0,_.useEffect)((()=>{a&&t()}),[t,a]);const o=(0,_.useCallback)((async e=>{_o([e],mo.READ)}),[]),l=(0,_.useCallback)((async e=>{_o([e],mo.CLICKED)}),[]),u=(0,_.useCallback)((e=>{const t=(0,ne.o_h)(e.single_notification?.action?.uri??e.double_notification?.action?.uri).toURLPath(!0);i(t),r({type:"close"})}),[r,i]),d=(0,_.useCallback)((()=>e.map(((e,t)=>{const n=e.single_notification?.notification_id??e.double_notification?.notification_id;return(0,N.jsx)(So.u,{children:(0,N.jsx)(bo.H,{role:"menuitem",className:St()(Ma,Fa),onClick:()=>{l(n),u(e)},children:(i=e,Object.prototype.hasOwnProperty.call(i,"single_notification")?(0,N.jsx)(ho,{notification:e.single_notification,markAsRead:o}):(0,N.jsx)(fo,{notification:e.double_notification,markAsRead:o}))})},t);var i}))),[l,o,u,e]);return(0,N.jsxs)("div",{className:ka,children:[(0,N.jsx)(_r.E,{variant:"bodyMediumBold",semanticColor:"textBase",className:Ua,children:c.Ru.get("web-player.notification-center.button-label")}),e.length>0?(0,N.jsxs)("div",{className:xa,children:[d(),n&&(0,N.jsx)(to,{lastItemRef:s})]}):(0,N.jsx)(Xa,{})]})},Co=()=>{const{notifications:e,isLoading:t,hasNextPage:n,fetchNextPage:i}=vo();return t?(0,N.jsx)("div",{className:ka,children:(0,N.jsx)(to,{})}):(0,N.jsx)(Ao,{notifications:e,hasNextPage:n,fetchNextPage:i})},To="sp_pfhp",Io="pfhp",Oo=()=>{const e=(0,mt.v8)(To),t=(()=>{const e=new URLSearchParams(window.location.search),t=e.get(Io);return t&&(e.delete(Io),window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}?${e}`)),t})();return t&&t!==e?((0,mt.n0)({name:To,value:t,days:30}),t):e},wo=()=>{if("undefined"==typeof window)return!1;return"2c2ccb58-8a92-4713-a1c0-8b43b3090b49"===Oo()};var No=n(82381);const Ro=()=>{const{setIsGlobalNavDraggable:e}=(0,_.useContext)(nr),t=(0,h.d4)((e=>e.platform.isDesktop)),{spec:n,logger:i}=(0,Yt.r)(Fs.d,{});(0,_.useEffect)((()=>{i.logImpression(n.impression())}),[i,n]),(0,_.useEffect)((()=>(e?.(!1),()=>{e?.(!0)})),[e]);const r=(0,No.k)(),a=ha(r.data),o=(0,s.NC)(be.y2l);return(0,N.jsx)("div",{"data-testid":"user-widget-menu",className:ia,children:(0,N.jsxs)(Vs.W,{children:[(0,N.jsx)(Ea,{ubiSpec:n,ubiLogger:i}),a&&(0,N.jsx)(Aa,{planAttributes:a,ubiSpec:n,ubiLogger:i}),(0,N.jsx)(La,{ubiSpec:n,ubiLogger:i}),(0,N.jsx)(Pa,{ubiSpec:n,ubiLogger:i}),(0,N.jsx)(Xs,{visible:wo()}),(0,N.jsx)($s,{visible:!t&&wo()}),(0,N.jsx)(Ca,{visible:t,ubiSpec:n,ubiLogger:i}),(0,N.jsx)(Ia,{divider:"after",ubiSpec:n,ubiLogger:i}),r?.data?.["client-deprecated"]&&(0,N.jsx)(wa,{}),(0,N.jsx)(Oa,{ubiSpec:n,ubiLogger:i})," ",t&&(0,N.jsx)(va,{}),(0,N.jsx)(Sa,{ubiSpec:n,ubiLogger:i,divider:o?"after":void 0}),o&&(0,N.jsx)(Co,{})]})})};var Po=n(50486);const Lo=()=>{const e=(0,s.NC)(be.y2l),{data:t}=(0,Po.I)({queryKey:["notification-unread-status"],queryFn:async()=>await(async()=>{const e=go.n.getInstance();return(await e.build().withHost(Eo.dv).withJsonContentType().withoutMarket().withMethod("POST").withPath("/GetUserHasUnreadNotification").send()).body})(),enabled:e,staleTime:6e5,refetchInterval:e=>!e.state.data?.userHasUnreadNotification&&108e5});return t?.userHasUnreadNotification??!1};var Do=n(1447);const ko=e=>{const t=(0,h.d4)((e=>e.session.user)),n=(0,dr.k)(),i=ha((0,No.k)().data),r=!!i&&i.currentSize<=1,a=(0,s.NC)(be.y2l),o=Lo(),l=a&&o;if(!t&&wo())return(0,N.jsx)(Bs.b,{offset:[0,parseInt(ea,10)],placement:"bottom-end",menu:(0,N.jsx)(ma,{}),children:(e,t,n)=>(0,N.jsx)("button",{className:St()(ta),type:"button",onClick:t,ref:n,"data-testid":"unauth-user-widget-link",children:e?(0,N.jsx)(ks.M,{size:"small","aria-hidden":"true"}):(0,N.jsx)(xs.d,{size:"small","aria-hidden":"true"})})});if(!t)return null;const u=t.display_name||t.id,d=t.display_name?.charAt(0).toUpperCase(),p=t?.images.length||!t.display_name,m=(0,Do.nj)(t?.avatarBackgroundColor||0),f=()=>(0,N.jsxs)("div",{className:ua,children:[(0,N.jsx)("span",{className:sa,children:c.Ru.get("user.update-available")}),(0,N.jsx)(js.Z,{className:St()(aa,{[oa]:!p},la)})]}),g="var(--background-elevated-base)",E={backgroundColor:p?g:`#${m}`,color:Us.Ql9,lineHeight:"32px"},_=p?(0,N.jsx)(Ms.e,{label:u,width:t?.images.length?32:24,images:t?.images,userIconSize:"small",testID:"user-widget-avatar",transparent:!0,className:St()({[pa]:t?.images.length})}):(0,N.jsx)(_r.E,{variant:"bodySmallBold","data-testid":"username-first-letter",style:E,className:ra,children:d});return(0,N.jsx)(Bs.b,{offset:[0,parseInt(ea,10)],placement:"bottom-end",menu:(0,N.jsx)(Ro,{}),children:(t,i,s)=>(0,N.jsx)(or.Zp,{label:u,children:(0,N.jsxs)(rr.H,{className:na,onClick:t=>{e.onClick?.(t),i(t)},style:{backgroundColor:g},ref:s,condensedAll:!0,"aria-label":u,"data-testid":"user-widget-link",semanticColor:"textBase",children:[_,(n?.state===pr.D.UPDATE_READY||r||l)&&(0,N.jsx)(f,{})]})})})};var xo=n(82400),Uo=n(89126),Mo=n(62868);const Bo="WtC1lGbmQRplD6JBhNFU",jo=({onClick:e,tooltipLabel:t,ariaLabel:n,className:i,testId:r,children:s,restoreFocusKey:a,disabled:o})=>(0,N.jsx)(or.Zp,{label:t,children:(0,N.jsx)(rr.H,{"aria-label":n,onClick:e,size:"small",condensedAll:!0,"data-testid":r,className:St()(Bo,i),"data-restore-focus-key":a,disabled:o,children:s})}),Fo=De.$S.BUDDY_FEED_BUTTON_CLICK,Vo=()=>{const{isActive:e,panelSend:t}=(0,Rn.AI)(Pn.Z.BuddyFeed,Pn.Z.BuddyFeedOverlay),{isSupported:n}=(0,Ne.C)().getCapabilities(),i=(0,Fr.n)(),r=(0,_.useCallback)((()=>{const n=e;t(Fo),n||(0,Mo.I)("BUDDY-FEED")}),[e,t]);return n?(0,N.jsx)(jo,{tooltipLabel:i?c.Ru.get("buddy-feed.friend-activity"):c.Ru.get("offline.feedback-text"),ariaLabel:c.Ru.get("buddy-feed.friend-activity"),onClick:r,testId:"friend-activity-button",restoreFocusKey:Pn.Z.BuddyFeed,disabled:!i,children:e?(0,N.jsx)(xo.F,{size:"small",semanticColor:"textBase"}):(0,N.jsx)(Uo.B,{size:"small"})}):null},Go=De.$S.BUDDY_FEED_BUTTON_CLICK,Ho=()=>{const{isActive:e,panelSend:t}=(0,Rn.AI)(Pn.Z.BuddyFeed,Pn.Z.BuddyFeedOverlay),{isSupported:n}=(0,Re.C)().getCapabilities(),i=(0,Fr.n)(),r=(0,_.useCallback)((()=>{const n=e;t(Go),n||(0,Mo.I)("BUDDY-FEED")}),[e,t]);return n?(0,N.jsx)(jo,{tooltipLabel:i?c.Ru.get("buddy-feed.friend-activity"):c.Ru.get("offline.feedback-text"),ariaLabel:c.Ru.get("buddy-feed.friend-activity"),onClick:r,testId:"friend-activity-button",restoreFocusKey:Pn.Z.BuddyFeed,disabled:!i,children:e?(0,N.jsx)(xo.F,{size:"small",semanticColor:"textBase"}):(0,N.jsx)(Uo.B,{size:"small"})}):null};var Wo=n(64637),zo=n(53467),Ko=n(41540),Yo=n(81138),qo=n(90224),$o=n(27963);const Zo="agh_IHo91VhyFTnp5BzM",Qo="XVC0Gr8G4SXM0a98jbqC",Jo="K8ygfuFNcx2tNcNv09JH";function Xo(){const{name:e}=Yo.lo;return[e]}const el=()=>{const e=(0,ae.Zp)(),t=(0,ae.zy)(),n=(0,qo.J)(),i=(0,Fr.n)(),r="/content-feed"===t.pathname,s=r,[a,o]=(0,_.useState)(!1),{request:l}=(0,_.useContext)(ze.j),u=(0,ut.jE)(),{spec:d,logger:p}=(0,Yt.r)(Ko.q,{});(0,_.useEffect)((()=>{let e=!1;const t=setInterval((async()=>{let t;try{t=await(0,$o.c)(l,Yo.jF,{})}catch{return}if(t?.errors)return;const n=t?.data?.whatsNewFeedHasNewItems||!1;if(n&&!e){const e=d.notificationsBellToggleFactory().notificationsIndicatorFactory().impression();p.logImpression(e),o(!0),u.invalidateQueries({queryKey:Xo()})}e=n}),144e5);return()=>{clearInterval(t)}}),[p,u,l,d]);const m=()=>(0,N.jsxs)("div",{className:Zo,"data-testid":"notification-dot",children:[(0,N.jsx)("span",{className:Qo,children:c.Ru.get("new_releases")}),(0,N.jsx)(js.Z,{className:Jo})]}),h=(0,_.useCallback)((()=>{r?(p.logInteraction(d.notificationsBellToggleFactory().hitUiNavigateBack()),n.length>1?n.goBack():e("/")):(o(!1),p.logInteraction(d.notificationsBellToggleFactory().hitUiNavigate({destination:"spotify:app:content-feed"})),e("/content-feed"))}),[r,p,d,n,e]);return(0,N.jsxs)(jo,{tooltipLabel:c.Ru.get("web-player.whats-new-feed.button-label"),ariaLabel:c.Ru.get("web-player.whats-new-feed.button-label"),testId:"whats-new-feed-button",onClick:h,disabled:!i,children:[s?(0,N.jsx)(Wo.c,{size:"small",semanticColor:"textBase"}):(0,N.jsx)(zo.a,{size:"small"}),a&&(0,N.jsx)(m,{})]})};var tl=n(90036),nl=n(44577),il=n(2588);const rl=(0,_.forwardRef)((({className:e},t)=>{const n=(0,Cr.W)(),i=(0,h.wA)(),r=(0,_n.V)(),{spec:a,logger:o}=(0,Yt.r)(tr.x,{}),l=(0,hs.U)("(max-width: 849px)"),u=wo()&&r&&l,d=(0,_.useCallback)((()=>{i((0,ar.Ai)()),n({intent:"signup",type:"click"})}),[i,n]),p=(0,_.useCallback)((()=>{i((0,ar.zL)()),n({intent:"login",type:"click"})}),[i,n]),m=(0,_.useCallback)((()=>{i((0,ar.NM)()),n({intent:"upgrade-to-premium",type:"click"})}),[i,n]),{openURLWithSessionTransfer:f}=(0,fa.L)(),g=(0,ae.Zp)(),E=(e,t)=>{t?f(e):g(e)},y=(0,_.useMemo)((()=>a.upgradeButtonFactory()),[a]),{shouldShowUpgradeButton:v,onUpgradeClick:b}=(0,tl.i)(y,o),S=(0,hs.U)("(min-width: 1024px)"),{isDesktop:A,isPWA:C,shouldCalloutPWA:T}=(0,h.d4)((e=>e.platform)),I=(0,_.useCallback)((()=>{o.logInteraction(a.profileButtonFactory().hitUiReveal())}),[o,a]),O=(0,s.NC)(be.t84)?Vo:Ho,w=(0,Qs.k)(),R=(0,_.useMemo)((()=>{const e=new URL(w.url);return e.searchParams.set("ref","jam"),e}),[w]);return(0,N.jsxs)("div",{className:St()(e,il.A.topbarContentRight),ref:t,children:[(0,N.jsx)(fs,{spec:a}),r&&wo()&&!l?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(rr.H,{condensed:!0,onClick:()=>{m(),E(R.href,w.isExternal)},className:il.A.topNavBarLinks,children:c.Ru.get("navbar.premium")}),(0,N.jsx)(rr.H,{condensed:!0,onClick:()=>E(qs.nw),className:il.A.topNavBarLinks,children:c.Ru.get("user.support")}),(0,N.jsx)(rr.H,{condensed:!0,onClick:()=>E(qs.Kw),className:il.A.topNavBarLinks,children:c.Ru.get("download.download")}),(0,N.jsx)("div",{className:il.A.topNavBarSeparator})]}):(0,N.jsx)(N.Fragment,{}),(0,N.jsx)(Er,{}),v&&S&&(0,N.jsx)(Ds,{onClick:b,className:il.A.UpgradeButton}),!r&&!A&&!C&&!(0,nl.g)()&&(0,N.jsx)(Cs,{shouldCalloutPWA:T,logger:o,spec:a}),r&&(0,N.jsxs)("div",{className:il.A.loginButtons,children:[(0,N.jsx)(rr.H,{className:il.A.signupButton,onClick:d,"data-testid":"signup-button",children:c.Ru.get("sign_up")}),(0,N.jsx)(Ps,{children:(0,N.jsx)(sr.$,{colorSet:"invertedLight",onClick:p,"data-testid":"login-button",children:c.Ru.get("login")})})]}),!r&&(0,N.jsxs)("div",{className:St()(il.A.globalNavBar,il.A.topBarRightButtonContainer),children:[(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(el,{})}),(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(O,{})})]}),(!r||u)&&(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(ko,{onClick:I})})]})}));var sl=n(85961),al=n(47186);const ol=(e,t)=>e[0]===t[0]&&e[1]===t[1],ll=({className:e})=>{const{spec:t,logger:n}=(0,Yt.r)(tr.x,{}),i=(0,ae.Zp)(),[r,s]=(()=>{const[e,t]=(0,h.d4)((e=>[e.ui.history.canGoBack,e.ui.history.canGoForward]),ol);return[e,t]})(),a=(0,_.useCallback)((()=>{n.logInteraction(t.backButtonFactory().hitUiNavigateBack()),i(-1)}),[n,i,t]),o=(0,_.useCallback)((()=>{n.logInteraction(t.forwardButtonFactory().hitUiNavigateForwardInHistory()),i(1)}),[n,i,t]);return(0,N.jsxs)("div",{className:St()(e,il.A.globalNavBarHistoryButtonsContainer),children:[(0,N.jsx)(or.Zp,{label:c.Ru.get("navbar.go-back"),children:(0,N.jsx)(rr.H,{size:"medium",iconOnly:sl.g,condensed:!0,"data-testid":"top-bar-back-button","aria-label":c.Ru.get("navbar.go-back"),disabled:!r,onClick:a,className:il.A.globalNavBarHistoryButton})}),(0,N.jsx)(or.Zp,{label:c.Ru.get("navbar.go-forward"),children:(0,N.jsx)(rr.H,{size:"medium",iconOnly:al.V,condensed:!0,"data-testid":"top-bar-forward-button","aria-label":c.Ru.get("navbar.go-forward"),disabled:!s,onClick:o,className:il.A.globalNavBarHistoryButton})})]})};var cl=n(60623),ul=n(5765),dl=n(27163),pl=n(36688);const ml=()=>(0,N.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:27,height:24,fill:"none",children:[(0,N.jsx)("circle",{cx:17.455,cy:8.727,r:8.727,fill:"#000"}),(0,N.jsx)("circle",{cx:8.727,cy:15.273,r:8.727,fill:"#16D0A6"}),(0,N.jsx)("path",{fill:"#FCE54F",fillRule:"evenodd",d:"M17.18 17.446a8.728 8.728 0 0 1-8.179-10.9 8.728 8.728 0 0 1 8.18 10.9Z",clipRule:"evenodd"})]});var hl=n(97548);const fl="uPBdyakIUOjrDAp7wIoR",gl="DkGnXBLg7mJqJ4VRS6Ag",El="yDdtQxGIyqWU3GNrntPu",_l=({title:e,subtitle:t,icon:n,onClick:i,actionId:r})=>(0,N.jsx)(Gs.D,{role:"menuitem",onClick:i,className:fl,children:(0,N.jsx)(hl.v,{id:r,variant:"naked",className:gl,title:e,subtitle:t,leading:(0,N.jsx)("div",{className:El,children:n})})});var yl=n(33625);const vl=()=>{const{spec:e,logger:t}=(0,Yt.r)(tr.x,{}),n=(0,_.useMemo)((()=>e.createMenuButtonFactory().globalCreateMenuFactory()),[e]),i=(0,yl.L)();return{logOpenCreateMenu:(0,_.useCallback)((()=>{const n=e.createMenuButtonFactory().hitUiReveal();t.logInteraction(n)}),[t,e]),logCreatePlaylist:(0,_.useCallback)((()=>{const e=n.createPlaylistOptionFactory().hitCreatePlaylist();t.logInteraction(e)}),[n,t]),logCreateFolder:(0,_.useCallback)((()=>{const e=n.createFolderOptionFactory().hitCreateFolder();t.logInteraction(e)}),[n,t]),logCreateBlend:(0,_.useCallback)((()=>{const e=n.createBlendOptionFactory().hitUiNavigate({destination:"/blend/invitation"});t.logInteraction(e)}),[n,t]),logCreateJam:(0,_.useCallback)((()=>{const e=n.createJamOptionFactory().hitUiNavigate({destination:i?.item?.uri??""});t.logInteraction(e)}),[n,t,i?.item?.uri])}};var bl=n(90142),Sl=n(30493),Al=n(46069);const Cl=()=>{const{createPlaylist:e}=(0,Sl.A)(),{createFolder:t}=(0,Al.Z)(),n=(0,ae.Zp)(),i=(0,bl.Y)(),{logCreatePlaylist:r,logCreateFolder:s,logCreateBlend:a,logCreateJam:o}=vl(),l=(0,_.useCallback)((()=>{r(),e(c.Ru.get("playlist.default_playlist_name"),{before:"start"})}),[e,r]),u=(0,_.useCallback)((async()=>{s(),t(c.Ru.get("playlist.default_folder_name"),{before:"start"})}),[t,s]),d=(0,_.useCallback)((async()=>{a(),n("/blend/invitation")}),[a,n]),p=(0,_.useCallback)((async()=>{o(),i()}),[i,o]);return(0,N.jsxs)(Vs.W,{children:[(0,N.jsx)(_l,{actionId:"global-create-playlist",title:"Playlist",subtitle:"Create, collaborate, and mix",onClick:l,icon:(0,N.jsx)(ul.e,{size:"small",semanticColor:"textSubdued"})}),(0,N.jsx)(_l,{actionId:"global-create-folder",title:"Folder",subtitle:"Organize your playlists",onClick:u,icon:(0,N.jsx)(dl.h,{size:"small",semanticColor:"textSubdued"})}),(0,N.jsx)(_l,{actionId:"global-create-blend",title:"Blend",subtitle:"Compare your tastes with friends",onClick:d,icon:(0,N.jsx)(ml,{})}),(0,N.jsx)(_l,{actionId:"global-create-jam",title:"Jam",subtitle:"Listen together from anywhere",onClick:p,icon:(0,N.jsx)(pl.V,{size:"small",semanticColor:"textSubdued"})})]})},Tl="wp7mZFPzV7Qmo51F0NA_",Il="obd_bH64Snp1npdw29XM",Ol="AonZ39aVKATRTjY28Uww",wl="Dp3xccI7c2f_JSJ8OHYu",Nl="pIM9jg__39NIpOvXG89b",Rl="nmAHq8nfXRtoQmKU1gaF",Pl="gj5VcIUC9oD2p4BsxzGE",Ll="lj0eGI6WEtfxFX7irC03",Dl="axu7kRtHOzwIb8b14FT6",kl="VUXMMFKWudUWE1kIXZoS",xl="pKJyyZ_7ei9TgOxrTFHX",Ul="BsOjYbxeNtBwDGjKRYG3",Ml=()=>{const{logOpenCreateMenu:e}=vl();return(0,N.jsx)(Bs.b,{menu:(0,N.jsx)(Cl,{}),onShow:e,children:(0,N.jsx)(rr.H,{iconOnly:cl.u,className:St()(Il,kl)})})};var Bl=n(11540),jl=n(19666);const Fl=({className:e})=>{const{spec:t,logger:n}=(0,Yt.r)(tr.x,{}),i=(0,ae.Zp)(),r=(0,ae.zy)(),s="/"===r.pathname||"/home"===r.pathname;return(0,N.jsx)(or.Zp,{label:c.Ru.get("view.web-player-home"),children:(0,N.jsx)(rr.H,{iconOnly:s?Bl.x:jl.H,className:St()(e,Il,kl,{[Ol]:s}),"aria-label":c.Ru.get("view.web-player-home"),"data-testid":"home-button",onClick:()=>{const e=t.homeButtonFactory().hitUiNavigate({destination:"spotify:app:home"});n.logInteraction(e),i("/")}})})};var Vl=n(21263),Gl=n(70196),Hl=n(73204),Wl=n(77141);const zl="fmZ0hU6ImbDQi5qGWLvF",Kl="kOrgVj4dtioqHnXeX9Ui",Yl=()=>{const e=(0,Hl.J)("search");return(0,N.jsxs)(Vl.Y,{ref:e,"aria-labelledby":"tooltipTitle tooltipSubtitle",children:[(0,N.jsx)(_r.E,{as:"p",variant:"bodyMedium",paddingBottom:"tighter-2",id:"tooltipTitle",children:c.Ru.get("web-player.onboarding-new-user.step-search")}),(0,N.jsx)(_r.E,{variant:"marginal",id:"tooltipSubtitle",children:c.Ru.get("web-player.onboarding-new-user.step-count",1,ii.c)})]})},ql=({children:e})=>{const{shouldStepBeVisible:t}=(0,At.er)();return(0,N.jsx)(Wl.s,{active:t(ii.B.SEARCH),children:(0,N.jsx)("div",{className:Kl,children:(0,N.jsx)(Gl.E,{isOnboarding:!0,isVisible:t(ii.B.SEARCH),refClassName:zl,content:(0,N.jsx)(Yl,{}),children:e})})})};var $l=n(40638),Zl=n(49863),Ql=n(66371),Jl=n(60627),Xl=n(5673),ec=n(78141),tc=n(10181),nc=n(89775),ic=n(50845),rc=n(38107),sc=n(56515),ac=n(88451),oc=n(26344),lc=n(73265),cc=n(68049),uc=n(86563),dc=n(68933),pc=n(21082),mc=n(81360),hc=n(32999);const fc="qgxVpjYtxLSzXuRb1DLt",gc="ka4wGy_b04LNCthHIH1N",Ec="CPqBiLSmPraw0XkjjBp6",_c="XFJcBNfnUfPHtwtYAkdx",yc="V5kle5COkVEN5X6CkL7q",vc="c4tFCPbYwVHGfqMSeDbS",bc="dSiGMhFfPa7d2yEwV3yE",Sc="S37aRGXzbqbG049CEylp",Ac="yc0gfCvIaGSEMoWUQCVA",Cc="A5mSopU8ZkrqFtMhrJae",Tc="recent-searches-item-",Ic=(0,_.memo)((({entity:e,index:t,focusedElement:n,isPlaying:i,onClearItemClick:r,onClick:s,onPlayClick:a})=>{const o=(0,hc._)(),l=(0,_.useRef)(null);(0,_.useEffect)((()=>{n&&l.current?.scrollIntoView({behavior:"auto",block:"nearest"})}),[n]);const u=e.type===Ui.c.ARTIST||e.type===Ui.c.USER?no.u.CIRCLE:no.u.ROUNDED_CORNERS,d=(0,mc.ji)(e),p=e.type!==Ui.c.USER&&e.type!==Ui.c.PRE_RELEASE_ALBUM&&e.type!==Ui.c.PRE_RELEASE_BOOK,m=Boolean(n),h="play-button"===n&&p,f="remove-item-button"===n;return(0,N.jsx)(hl.v,{ref:l,hasFocus:m,variant:"naked",hoverAnimationDuration:"0ms",hoverBackgroundColor:"backgroundTintedHighlight",activeBackgroundColor:"backgroundTintedHighlight",size:"sm",onClick:s,isRedundantOnClick:!0,role:"link",id:`${Tc}${t}`,className:St()(_c,{[yc]:m}),media:(0,N.jsxs)("div",{className:St()({[fc]:p}),children:[(0,N.jsx)(no.b,{fadeIn:!0,images:o(d??[],48),shape:u,size:io.Qe.SIZE_48,iconSize:"medium",type:e.type,title:e.name,loadingMode:"eager"}),p&&(0,N.jsx)("div",{className:St()(gc,{[Ec]:u===no.u.CIRCLE,[Sc]:h}),children:(0,N.jsx)(rr.H,{hover:h,focus:h,iconOnly:i?lc._:cc.A,onClick:a,"aria-label":i?c.Ru.get("playlist.a11y.pause",e.name):c.Ru.get("playlist.a11y.play",e.name),size:"medium",tabIndex:-1})})]}),subtitle:(0,N.jsxs)(uc.j,{"line-clamp":1,className:Ac,children:[(0,mc.bA)(e),(0,N.jsx)("span",{className:Cc,children:(0,mc.$F)(e)})]}),title:(0,N.jsx)(pc.N,{to:e.uri,tabIndex:-1,children:(0,N.jsx)(dc.d,{lineClamp:1,children:e.name})}),trailing:(0,N.jsx)(rr.H,{className:St()(vc,{[bc]:f}),focus:f,"aria-label":c.Ru.get("remove"),iconOnly:ks.M,size:"small",onClick:()=>r(e.uri),tabIndex:-1})},e.uri)}));var Oc=n(31409),wc=n(37163),Nc=n(16581);const Rc="_b3hhmbWtOY8_1M1mM1H",Pc="j4xi27AJ3oy5qZ8CGhhQ",Lc="dM_TEJo05MxBvrLzfNrW",Dc="ODl7TwNawIfBwiZv1Czg",kc="CVuGEUIxLkNKpMds8AFS",xc="upGmCR5y3yDImbt6sHOl",Uc="IYex0sXu8fnCz1FqFbRe",Mc="xlLQHgpip3xYOwRYpwun",Bc="c5zycBhSdLGTqsceZhiB",jc="nBGzYhSIK1A7qANmTnpk",Fc="GimJ6fo6WOYPyWNVpSr1",Vc="YxfuYxT7HHkLxLlty5O0",Gc="sxCQ4toOdQ6hMN2rU8Kn",Hc="b7r2WRiu5f9Q99qmyreh",Wc="M9l40ptEBXPm03dU3X1k",zc="EJttP30F1zYHeAw7ISHb",Kc="R69APjfNV0o9tAbfrWZf",Yc="MdMAXXFPalD99eigsBug",qc="BV0jjn_h5TtMMl8YKuZ0",$c="recent-searches-dropdown",Zc=(0,_.memo)((({inputRef:e,setSelectedRecentSearchItemId:t})=>{const{searchHistory:n,clearSearchHistory:i}=(0,Oc.k)(),{mainLandmarkRef:r}=(0,Dt.JT)(),s=(0,_.useRef)(null),a=(0,ae.Zp)(),[o,l]=(0,_.useState)(!1),{spec:u,logger:d}=(0,Yt.r)(ac.a,{data:{uri:"spotify:app:recent-searches"}}),p=(0,_.useCallback)((e=>{const t=u.recentSearchesItemFactory({uri:e}).removeRecentSearchesItemButtonFactory().hitRemoveRecentSearchesItem();d.logInteraction(t),i(e)}),[i,u,d]),{isPlaying:m,currentlyPlayingContextUri:h}=(0,qi.o)((e=>({isPlaying:(0,Nc.uW)(e)===wc.i.PLAYING,currentlyPlayingContextUri:e?.context.uri??null})),$i.a),f=(0,x.z)(),g=(0,_.useCallback)((e=>{const t=(0,ne.o_h)(e.uri);if(null!==t){const n=u.recentSearchesItemFactory({uri:e.uri}).hitUiNavigate({destination:e.uri});d.logInteraction(n),a(t.toURLPath(!0)),requestAnimationFrame((()=>{r.current&&r.current.focus()}))}}),[d,r,a,u]),E=(0,_.useCallback)((e=>{const t=(0,ne.o_h)(e);if(!(0,mc.MB)(t?.type))return;const n=u.recentSearchesItemFactory({uri:e}),i=n.pauseRecentSearchesItemButtonFactory().hitPause({itemToBePaused:e}),r=n.playRecentSearchesItemButtonFactory().hitPlay({itemToBePlayed:e});m&&h===e?(f.pause(),d.logInteraction(i)):m||h!==e?(f.play({uri:e},{featureIdentifier:"search",referrerIdentifier:"search"}),d.logInteraction(r)):(f.resume(),d.logInteraction(r))}),[f,m,h,u,d]),[y,v]=(0,_.useState)(-1),[b,S]=(0,_.useState)("entire-item");return(0,_.useEffect)((()=>{-1===y&&s.current?.scrollIntoView()}),[y]),(0,_.useEffect)((()=>{const r=e.current,s=e=>{if(!(r?.value&&r?.value.length>0))switch(e.key){case"ArrowUp":(e=>{e.preventDefault();const n=Math.max(y-1,0);v(n),t(`${Tc}${n}`),S("entire-item")})(e);break;case"ArrowDown":(e=>{e.preventDefault();const i=Math.min(y+1,n.length-1);v(i),t(`${Tc}${i}`),S("entire-item")})(e);break;case"ArrowLeft":(e=>{e.preventDefault(),"entire-item"===b?S("play-button"):"remove-item-button"===b&&S("entire-item")})(e);break;case"ArrowRight":(e=>{e.preventDefault(),"entire-item"===b?S("remove-item-button"):"play-button"===b&&S("entire-item")})(e);break;case"Enter":(e=>{e.preventDefault();const t=n[y];t&&(e.shiftKey&&"entire-item"===b?E(t.uri):"entire-item"===b?g(t):"play-button"===b?E(t.uri):"remove-item-button"===b&&i(t.uri))})(e)}};r?.addEventListener("keydown",s);const a=()=>{v(-1),t(void 0)};return r?.addEventListener("focus",a),()=>{r?.removeEventListener("keydown",s),r?.removeEventListener("focus",a)}}),[i,e,g,n,n.length,y,b,t,E]),0===n.length?null:(0,N.jsxs)("div",{className:jc,id:$c,role:"listbox",children:[(0,N.jsxs)(Lt.a,{className:Fc,children:[(0,N.jsx)(_r.E,{as:"p",ref:s,variant:"bodyMediumBold",semanticColor:"textBase",className:Vc,children:c.Ru.get("search.title.recent-searches")}),(0,N.jsx)(rc.b,{condensedAll:!0,role:"listbox",children:n.map(((e,t)=>(0,N.jsx)(Ic,{focusedElement:y===t?b:void 0,entity:e,index:t,isPlaying:m&&h===e.uri,onClick:()=>g(e),onPlayClick:()=>E(e.uri),onClearItemClick:p},e.uri)))}),(0,N.jsx)(sc.n,{onClick:()=>{l(!0)},size:"small",className:Gc,children:c.Ru.get("search.clear-recent-searches")})]}),(0,N.jsx)(oc.T,{onClose:()=>{l(!1)},isOpen:o,onConfirm:()=>{(()=>{const e=u.clearButtonFactory().hitClearRecentSearches();d.logInteraction(e),i()})(),l(!1)},"aria-label":c.Ru.get("search.clear-recent-searches-dialog.title"),titleText:c.Ru.get("search.clear-recent-searches-dialog.title"),descriptionText:c.Ru.get("search.clear-recent-searches-dialog.description"),confirmText:c.Ru.get("search.clear-recent-searches-dialog.confirm-button"),cancelText:c.Ru.get("search.clear-recent-searches-dialog.cancel-button")})]})}));var Qc=n(25575),Jc=n(48655),Xc=n(48994);const eu=(0,_.memo)((function({onFocus:e,onLeadingIconClick:t,inputRef:n}){const i=(0,ae.zy)(),r="/search"===i.pathname,s=(0,ae.Zp)(),{currentStep:a,tryTriggerNextStep:o}=(0,At.er)(),{setIsGlobalNavDraggable:l}=(0,_.useContext)(nr),u=(0,_.useRef)(null),d=n||u,p=(0,_.useRef)(null),m=(0,$t.v7)(),{mainLandmarkRef:f}=(0,Dt.JT)(),g=(0,h.wA)(),[{category:E,query:y},v]=(0,Qc.o)(),b=(0,_.useCallback)((()=>d.current?.value||""),[d]),S=(0,_.useCallback)((e=>{d.current&&(d.current.value=e)}),[d]),[A,C]=(0,_.useState)(void 0),{spec:T}=(0,Yt.r)(tr.x,{}),{spec:I,logger:O}=(0,Yt.r)(tc.F,{}),[w,R]=(()=>{const[e,t]=(0,_.useState)(!1);return[e,e=>{"compositionstart"===e.type&&t(!0),"compositionend"===e.type&&t(!1)}]})(),P=(0,At.er)().shouldStepBeVisible(ii.B.SEARCH),L=(0,$l.YQ)((e=>{const t=I.keyStrokeChangeSearchQuery({searchQueryString:e}),{interactionId:n}=O.logInteraction(t),i=a===ii.B.ARTIST_CARD||a===ii.B.SEARCH;v(e,i?"artists":E,!1,n),o(ii.B.SEARCH),m.current&&(m.current.scrollTop=0)}),200,{trailing:!0}),D=(0,_.useCallback)(((e=!1)=>{d.current!==document.activeElement&&(p.current=document.activeElement,d.current&&d.current.focus()),e&&d.current?.select()}),[d]);(0,Xc.x)(Jc.W.SHOW_SEARCH,(()=>D(!0))),(0,_.useEffect)((()=>{a===ii.B.SEARCH&&D()}),[a,D]),(({location:e,searchQuery:t,setValue:n,isEnabled:i})=>{const r=(0,_.useRef)(e.key),s=e.key;(0,_.useEffect)((()=>{r.current!==s&&i&&(n(t),r.current=s)}),[s,t,n,i])})({location:i,searchQuery:y,setValue:S,isEnabled:!L.isPending()});const k=()=>{d.current&&d.current.focus();const e=I.hitTextClear();e&&O.logInteraction(e),S("")},x=e=>{e.preventDefault();const t=b();t&&O.logInteraction(I.keyStrokeSearch());const n=(0,ne.o_h)(t,{parseUnknown:!0});if(n?.type===ne.NQG.AD){const e=(0,ne.cEw)(n.id);if(n.id===e)return;g((0,nc.gt)(n.id))}else n?(L.cancel(),s(`${n.toURLPath(!0)}${(e=>{try{return new URL(e).search}catch(e){return""}})(t)}`,{state:{preventMoveFocus:!0,redirectToHome:(0,ne.crr)(n)}})):t?L(t):s("/search",{state:{preventMoveFocus:!0}});t&&f.current&&f.current.focus()},U=c.Ru.get("search.search-for-label");return(0,N.jsx)("div",{className:St()(Rc,{[Bc]:P}),children:(0,N.jsx)(Zl.E,{as:"form",onSubmit:x,role:"search",className:Hc,onClick:t,iconLeading:(0,N.jsx)(or.Zp,{label:c.Ru.get("navbar.search"),children:(0,N.jsxs)("div",{children:[(0,N.jsx)(rr.H,{className:zc,condensed:!0,iconOnly:Ql.C,"aria-label":c.Ru.get("navbar.search"),onClick:t}),(0,N.jsx)(Ql.C,{"data-testid":"search-icon",className:Wc,"aria-hidden":!0,size:"xlarge"})]})}),iconTrailing:""!==b()?(0,N.jsx)(or.Zp,{label:c.Ru.get("search.a11y.clear-input"),children:(0,N.jsx)(rr.H,{className:Yc,condensed:!0,"data-testid":"clear-button",iconOnly:ks.M,"aria-label":c.Ru.get("search.a11y.clear-input"),onClick:k})}):(0,N.jsx)(or.Zp,{label:c.Ru.get("browse"),children:(0,N.jsx)("div",{className:qc,children:(0,N.jsx)(rr.H,{condensedAll:!0,"data-testid":"browse-button",iconOnly:r?Jl.q:Xl.K,"aria-label":c.Ru.get("browse"),onClick:e=>{const t=T.browseButtonFactory().hitUiNavigate({destination:"spotify:app:search"});O.logInteraction(t),e.preventDefault(),e.stopPropagation(),s("/search",{state:{fromBrowse:!0}})},className:r?Pc:""})})}),children:(0,N.jsxs)("div",{className:Dc,children:[(0,N.jsx)(ec.Z,{role:"combobox","aria-owns":$c,"aria-controls":$c,"aria-expanded":!0,"aria-activedescendant":A,"data-testid":"search-input","data-top-bar-search":!0,className:St()(kc,Kc),type:"search",spellCheck:!1,placeholder:U,ref:d,onKeyDown:e=>{const t=b();if("Escape"===e.key&&t&&k(),"Enter"===e.key&&""!==t){if(w)return;x(e)}},onFocus:t=>{const n=b();l?.(""!==n);const i=null===t.relatedTarget;e?.(i)},onBlur:()=>l?.(!0),onChange:e=>{if(!e.currentTarget)return;const t=e.currentTarget.value;l?.(""!==t),L(t)},onCompositionStart:R,onCompositionEnd:R}),(0,N.jsxs)("div",{className:St()(Lc),"aria-hidden":"true",children:[(0,N.jsx)("span",{className:xc,children:U}),(0,N.jsx)("span",{className:Uc,children:(0,Ht.p)(Gt.r.OPEN_SEARCH_MODAL).at(0)?.split("+").map((e=>(0,N.jsx)(_r.E,{as:"kbd",variant:"bodyMedium",className:Mc,children:(0,ic.O)(e)},e)))})]}),(0,N.jsx)(Zc,{inputRef:d,setSelectedRecentSearchItemId:C})]})})})}));var tu=n(55926);const nu=e=>{if(!e.current)return!1;return e.current.offsetWidth>400},iu=e=>!!e.current&&(e.current===document.activeElement||""!==e.current.value),ru=(e,t)=>!!e.current&&(e.current.offsetLeft<=t&&t<=e.current.offsetLeft+e.current.offsetWidth),su=({topBarRef:e,className:t})=>{const{spec:n,logger:i}=(0,Yt.r)(tr.x,{}),r=(0,ae.zy)(),a=(0,ae.Zp)(),o=(0,tu.c)(),{isGlobalNavDraggable:l}=(0,_.useContext)(nr),c=(0,s.NC)(be.xWh,{loadingValue:!1}),[u,d]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,f]=(0,_.useState)(!1),g=(0,_.useRef)(null),E=(0,_.useRef)(null),y=(0,_.useRef)(null),v=(0,_.useRef)(null),b=(0,_.useRef)(null),S=(0,ti.h)(),A=(0,_.useRef)(!1);(0,_.useEffect)((()=>{E.current&&(E.current.tabIndex=p&&!h?-1:0)}),[p,h]);const C=(0,_.useCallback)((({width:t})=>{t&&(b?.current&&t!==b.current&&(A.current=t>b.current),b.current=t),((e,t,n,i,r)=>{if(!n.current||!t.current||!e.current)return;const s=n.current,a=Math.max(350,Math.min(546,.5*s.offsetWidth)),o=ru(e,s.offsetWidth/2-a/2)||ru(e,s.offsetWidth/2+a/2)||ru(t,s.offsetWidth/2-a/2)||ru(t,s.offsetWidth/2+a/2);i!==o&&r(o)})(y,v,e,u,d),((e,t,n,i)=>{e.current&&(nu(e)&&!0===t&&n?i(!1):nu(e)||!1!==t||n||i(!0))})(g,A.current,p,m),((e,t,n)=>{e.current&&iu(e)&&(t||n(!0))})(E,h,f)}),[h,e,p,u]);var T,I,O;(0,As.w)({refOrElement:e,onResize:C}),T=v,I=()=>{e.current&&C({width:null})},O={subtree:!0,childList:!0},(0,_.useEffect)((()=>{if(T.current){const e=new MutationObserver(I);return e.observe(T.current,O),()=>e.disconnect()}return()=>{}}),[T,I,O]);const w=(0,_.useCallback)((()=>{if(!r.pathname.startsWith("/search")){const e=n.searchInputFactory().hitUiNavigate({destination:"spotify:app:search"});i.logInteraction(e),a("/search",{state:{preventMoveFocus:!0}})}}),[n,i,r,a]),R=(0,_.useCallback)((e=>{e?.preventDefault(),e?.stopPropagation(),iu(E)||f(!h);(!p||p&&!h)&&E.current?.focus()}),[h,p]);return(0,N.jsxs)("div",{className:St()(Tl,t,xl,{[kl]:!l,[Dl]:u||p,searchInputCollapsed:p,forceExpandSearchInput:h,[Ul]:S}),ref:e,id:"global-nav-bar","data-testid":"global-nav-bar",children:[(0,N.jsx)("div",{className:Nl,ref:y,children:o?(0,N.jsx)(Xi.N_,{to:"/",className:Rl,children:(0,N.jsx)(er.G,{height:32,condensed:!0})}):(0,N.jsx)(ll,{className:kl})}),(0,N.jsx)("div",{className:Pl,children:(0,N.jsxs)("div",{className:Ll,ref:g,children:[(0,N.jsx)(Fl,{className:wl}),(0,N.jsx)(ql,{children:(0,N.jsx)(eu,{inputRef:E,onLeadingIconClick:R,onFocus:e=>{f(!0),!0===e&&w()}})}),c&&(0,N.jsx)(Ml,{})]})}),(0,N.jsx)(rl,{className:kl,ref:v})]})},au=e=>{const{applicationMode:t}=Wn();return t.mode!==Gn.Default?null:(0,N.jsx)(su,{...e})};var ou=n(18131),lu=n(3168);const cu=({elementRef:e})=>{const{item:t}=(0,qi.o)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),{spec:n,logger:i}=(0,Yt.r)(ou.t,{data:{uri:t?.uri??""}}),{min:r,max:a,size:o,setSize:l}=(0,lu.f)(),u=(0,_.useMemo)((()=>[[r,a]]),[r,a]),d=(0,Rn.XB)(),p=(0,s.NC)(be.ZDY),m=(0,Bt.W)(),h=(0,_.useCallback)(((e,t)=>{e!==t&&i.logInteraction(n.npvUiResizeFactory().dragUiResize({startSizePx:e,endSizePx:t}))}),[i,n]),f=(0,_.useCallback)((e=>{document.documentElement.style.setProperty("--right-sidebar-width",`${e}`)}),[]);return(0,_.useLayoutEffect)((()=>{d===Pn.Z.Disabled&&p?f(24):f(o)}),[d,p,f,o]),d===Pn.Z.Disabled?null:(0,N.jsx)(Vt,{elementRef:e,placement:"inline-start",label:c.Ru.get("resize.sidebar"),onResize:l,size:o,ranges:u,decreaseSizeKeyboardCombination:m?(0,Ht.p)(Gt.r.YLX_SIDEBAR_DECREASE_WIDTH):(0,Ht.p)(Gt.r.NPV_SIDEBAR_DECREASE_WIDTH),increaseSizeKeyboardCombination:m?(0,Ht.p)(Gt.r.YLX_SIDEBAR_INCREASE_WIDTH):(0,Ht.p)(Gt.r.NPV_SIDEBAR_INCREASE_WIDTH),afterResizing:h})},uu=(0,_.createContext)(null);var du=n(11945),pu=n(47782);const mu=({children:e})=>{const[t,n]=(0,_.useState)(!1),[i,r]=(0,_.useState)(""),s=(0,_.useRef)(null),a=(0,pu.O)(),o=(0,du.C)(),l=(0,h.wA)(),c=(0,_.useCallback)((e=>{t?(o(i),r(""),n(!1),l((0,p.np)())):(e&&r(e),a.startActiveDiscovery(),n(!0),l((0,p.ae)()))}),[t,o,i,l,a]),u=(0,_.useMemo)((()=>({triggerRef:s,toggleDevicePicker:c,isPickerOpen:t})),[c,t]);return(0,N.jsx)(uu.Provider,{value:u,children:e})};var hu=n(44456);const fu=()=>((0,hu.q)(),null),gu=()=>{const e=(0,k.S)().isOpen,{applicationMode:t}=Wn();return e||t.mode===Gn.Tuna?null:(0,N.jsx)(fu,{})},Eu=_.lazy((async()=>await Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(1683),n.e(2327),n.e(1206)]).then(n.bind(n,98626)).then((e=>({default:e.RootDialogs}))))),_u=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Eu,{...e})}),yu="n35onAKKhHJEsZf3IPpZ",vu=({children:e})=>(0,N.jsx)("div",{className:yu,children:e}),bu="YbTP7qcaa54vyybbeTir",Su=(0,_.forwardRef)((function({children:e,className:t},n){return(0,N.jsx)("div",{ref:n,className:St()(bu,t),children:e})}));var Au=n(43361);const Cu=()=>(0,N.jsx)("div",{id:Au.K,style:{zIndex:"1"}}),Tu=()=>null,Iu=_.lazy((async()=>{const{LyricsCinemaModeContainer:e}=await Promise.all([n.e(4151),n.e(9928),n.e(1706),n.e(2183)]).then(n.bind(n,84204));return{default:e}})),Ou=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Iu,{})}),wu=_.lazy((async()=>{const{NowPlayingBar:e}=await Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(3848),n.e(7607),n.e(1113),n.e(9403),n.e(3322)]).then(n.bind(n,73661));return{default:e}})),Nu=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(wu,{})}),Ru=_.lazy((async()=>{const{WatchFeedViewContainer:e}=await Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(777)]).then(n.bind(n,96867));return{default:e}})),Pu=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Ru,{})}),Lu=_.lazy((async()=>{const{SnackbarProvider:e}=await Promise.resolve().then(n.bind(n,19616));return{default:e}})),Du=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Lu,{...e})}),ku=_.lazy((async()=>{const{FeedbackBar:e}=await n.e(8552).then(n.bind(n,15747));return{default:e}})),xu=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(ku,{...e})}),Uu=_.lazy((async()=>{const{PageErrorTemplate:e}=await Promise.all([n.e(4151),n.e(352)]).then(n.bind(n,33216));return{default:e}})),Mu=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Uu,{})}),Bu=_.lazy((async()=>{const{TopBar:e}=await n.e(5094).then(n.bind(n,15252));return{default:e}})),ju=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Bu,{})}),Fu=_.lazy((async()=>{const{Billboard:e}=await n.e(8588).then(n.bind(n,31240));return{default:e}})),Vu=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Fu,{})}),Gu=_.lazy((async()=>{const{LeaderboardComponent:e}=await n.e(9500).then(n.bind(n,7873));return{default:e}})),Hu=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Gu,{})}),Wu=_.lazy((async()=>{const{FullscreenModeContainer:e}=await Promise.all([n.e(4151),n.e(8497),n.e(3848),n.e(7607),n.e(1113),n.e(1955)]).then(n.bind(n,53466));return{default:e}})),zu=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Wu,{...e})}),Ku=_.lazy((async()=>{const{VideoPlayer:e}=await Promise.all([n.e(4151),n.e(7607),n.e(7988)]).then(n.bind(n,69711));return{default:e}})),Yu=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Ku,{...e})});var qu=n(82516),$u=n(97697),Zu=n(97330);const Qu={"-200":.694444418,"-150":.7607257962,"-100":.8333333135,"-50":.9128709435,0:1,50:1.095445156,100:1.200000048,150:1.314534187,200:1.440000057,250:1.577440977,300:1.728000045,350:1.892929196,400:2.073600054};var Ju=n(78294),Xu=n(72911),ed=n(92828);const td="RMhp6CH5pXRI1XuARX8n",nd=({children:e})=>(0,Xu.er)().shouldStepBeVisible(ed.B.SEARCH)?(0,N.jsx)("div",{className:td,children:e}):(0,N.jsx)(N.Fragment,{children:e});var id=n(36485),rd=n(43080),sd=n(34801);const ad=()=>{const{spec:e,logger:t}=(0,Yt.r)(sd.n,{}),n=(0,_.useCallback)(((n,i="")=>{t.logInteraction(e.toggleAudioVideoButtonFactory({identifier:n}).hitPlay({itemToBePlayed:i}))}),[t,e]),i=(0,_.useCallback)((n=>{t.logInteraction(e.fullscreenButtonFactory()[n?"hitUiReveal":"hitUiHide"]())}),[t,e]),r=(0,_.useCallback)((n=>{t.logInteraction(e.subtitlesButtonFactory()[n?"hitUiReveal":"hitUiHide"]())}),[t,e]),s=(0,_.useCallback)((()=>{t.logInteraction(e.peekButtonFactory().hitUiReveal())}),[t,e]),a=(0,_.useCallback)((()=>{t.logInteraction(e.closeButtonFactory().hitUiHide())}),[t,e]),o=(0,_.useCallback)((n=>{t.logInteraction(e.switchVariantFactory({identifier:n}).hitUiReveal())}),[t,e]),l=(0,_.useCallback)((n=>{t.logInteraction(e.ambientModeFactory()[n?"autoUiReveal":"autoUiHide"]())}),[t,e]),c=(0,_.useCallback)((n=>{t.logInteraction(e.contextTitleFactory({uri:n}).hitUiNavigate({destination:n}))}),[t,e]);return(0,_.useMemo)((()=>({logAudioVideoToggleClick:n,logFullscreenButtonClick:i,logSubtitlesButtonClick:r,logShowNPVButtonClick:s,logCloseButtonClick:a,logSwitchVariantClick:o,logContextTitleClick:c,logAmbientModeTransition:l})),[l,n,a,c,i,s,r,o])};var od=n(1961);function ld(e,t,n){if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&"startViewTransition"in document){document.startViewTransition((()=>{(0,gi.flushSync)((()=>{e()}))})).finished.then(t,n)}else e(),t?.()}var cd=n(31193),ud=n(95058);const dd="QgD5n5t4yCMPYSrZ9Ecl",pd="UYfM3JDxgszh9Gi_q4NV",md="kl0_TyO1NHFm45Umh87i",hd="UnqxYX3t2DLqLrnAP4Jy";function fd({children:e}){const{leftSidebarRef:t,mainContentRef:n}=(0,Dt.JT)(),[i,r]=(0,_.useState)(od.z.CLOSED),[s,a]=(0,_.useState)(!1),{logAmbientModeTransition:o}=ad(),l=(0,us.N)(ud.Z),{setVideoPlayerUIFlag:c}=(0,cd.d)(),u=(0,_.useRef)(!1),d=(0,_.useCallback)((e=>{if(u.current!==e){e&&l.setWindowButtonsVisibility(!1),a(e),o(e);const t=null!==document.fullscreenElement;e||t||l.setWindowButtonsVisibility(!0)}u.current=e}),[o,l]),p=(0,_.useCallback)((e=>{const i=document.getElementById("global-nav-bar");i?.classList.add(hd),t.current?.classList.add(md),t.current?.classList.remove(pd),n.current?.classList.remove(pd);const s=()=>{e===od.z.NOW_PLAYING_VIEW&&(t.current?.classList.add(pd),n.current?.classList.add(pd)),i?.classList.remove(hd),t.current?.classList.remove(md);null!==document.fullscreenElement||l.setWindowButtonsVisibility(!0)};ld((()=>{t.current?.classList.toggle(dd,e===od.z.NOW_PLAYING_VIEW),n.current?.classList.toggle(dd,e===od.z.NOW_PLAYING_VIEW),e!==od.z.NOW_PLAYING_VIEW&&(c(B.n.cinema,!1),a(!1)),r(e)}),s,s)}),[t,n,l,c]);return(0,N.jsx)(rd.y.Provider,{value:p,children:(0,N.jsx)(rd.s.Provider,{value:i,children:(0,N.jsx)(id.y.Provider,{value:d,children:(0,N.jsx)(id.g.Provider,{value:s,children:e})})})})}var gd=n(95079);const Ed=({title:e,link:t,onClick:n,className:i})=>e?t?(0,N.jsx)(Xi.N_,{to:t,onClick:n,children:(0,N.jsx)(_d,{title:e,className:i})}):(0,N.jsx)(_d,{title:e,className:i}):null;function _d({className:e,title:t}){return(0,N.jsx)(_r.E,{variant:"bodyMediumBold",className:e,semanticColor:"textBase",children:t})}var yd=n(35879),vd=n(46159),bd=n(38157),Sd=n(75032);const Ad=(0,_.memo)((()=>(0,N.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,N.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.12 1.25V3.67857C12.12 3.81664 12.2319 3.92857 12.37 3.92857H15.75V5.42857H12.37C11.4035 5.42857 10.62 4.64507 10.62 3.67857V1.25H12.12ZM3.87998 3.67895V1.279H5.37998V3.67895C5.37998 4.64545 4.59648 5.42895 3.62998 5.42895H0.26998V3.92895H3.62998C3.76805 3.92895 3.87998 3.81702 3.87998 3.67895ZM10.62 12.2785C10.62 11.3116 11.4039 10.529 12.37 10.529H15.75V12.029H12.37C12.2315 12.029 12.12 12.1409 12.12 12.2785V14.739H10.62V12.2785ZM3.63091 12.0603H0.25V10.5603H3.63091C4.5983 10.5603 5.38 11.3447 5.38 12.3103V14.7389H3.88V12.3103C3.88 12.1714 3.76809 12.0603 3.63091 12.0603Z",fill:"currentColor"})})));var Cd=n(44948),Td=n(61301),Id=n(70123),Od=n(78400);const wd="s5XoTreeKWcvy7aQT62A",Nd="GHBfpr3HMHJwMLpVYV54",Rd="pHKCWYLEfXteboHZwjIH",Pd="XWJtATtk3_2VpHc4YOaI",Ld="FGDXWUCBzcBCatIhAK9T",Dd="BDO0NdPNcKT8Zfwr7bCq",kd="pRnninATMpy3HDTSr5o0",xd="I3Xw3ZxNec6tSUJaGFfD",Ud="YlQykmErZCEnhw18vfgA",Md="BlefThKb7viY6qEBS_vT",Bd="dFz3mTMCEntyqsdPM0FF",jd="Fcj8mAN1eZK2tUKIgSB3",Fd="bLzfnxEGEY4gss5lmLxy",Vd="h4EuLz4_twkL_M8f9Wbn",Gd="FtBeeW2Daid2UdE8fe7D",Hd="fKmsXdNRoTkGICvsbOgI",Wd="NJrwgEr7XcvEnQhrGNUu",zd="CNxUJDLHdeb0t0Mckrca",Kd="kflPy_mvGLyJR3mkh04x",Yd="ELSmDYJtrr7_ktB1jf97",qd="emkheWXbOlILniETBtEv",$d="DMm03qTsAQRiHan4x2_X",Zd="l9Qu5hTVqTZAaLybbOWB";function Qd(e){return(0,z.v)(e)||(0,K.v)(e)||(0,W.p)(e)||(0,H.d)(e)?e.name:(0,G.N)(e)?"":(0,Y.d)(e)}const Jd=({item:e,context:t,UBICallbacks:n})=>{const{logFullscreenButtonClick:i,logCloseButtonClick:r}=n,s=(0,Td.l)(),a=(0,Cd.h)(),{isInFullScreen:o,isFullScreenSupported:l,toggleFullScreen:u}=(0,Od.H)(document.body),d=(0,qi.o)((e=>(0,G.N)(e?.item??void 0))),p=(0,_.useCallback)((()=>{i(!o),u()}),[o,i,u]);return(0,N.jsxs)("div",{className:St()("encore-over-media-set",Zd),children:[!d&&(0,N.jsx)(Bs.b,{menu:(0,N.jsx)(Id.W,{context:t,item:e}),children:(0,N.jsx)(bd.e,{className:kd,size:"small",condensed:!1,label:c.Ru.get("more.label.context",e?Qd(e):"")})}),l&&!d&&(0,N.jsx)(or.Zp,{label:o?c.Ru.get("web-player.cinema-mode.fullscreen.exit"):c.Ru.get("web-player.cinema-mode.fullscreen.enter"),children:(0,N.jsx)(rr.H,{className:kd,iconOnly:o?Ad:Sd.T,size:"small",onClick:p,"aria-label":o?c.Ru.get("web-player.cinema-mode.fullscreen.exit"):c.Ru.get("web-player.cinema-mode.fullscreen.enter")})}),!o&&(0,N.jsx)(or.Zp,{label:c.Ru.get("web-player.cinema-mode.minimize"),children:(0,N.jsx)(rr.H,{className:St()(kd,{[Wd]:a&&d}),iconOnly:vd.b,size:"small",onClick:()=>{r(),(0,Mo.I)("NPV_OPEN_CINEMA_MODE_BUTTON"),s(od.z.CLOSED)},"aria-label":c.Ru.get("web-player.cinema-mode.minimize")})})]})};var Xd=n(79292),ep=n(81162),tp=n(65600),np=n(90694),ip=n(45097),rp=n(8989);const sp=({variant:e,hasHeroImage:t,onVariantChange:n,setHasControls:i,UBICallbacks:r})=>{const{logSwitchVariantClick:s,logSubtitlesButtonClick:a}=r,o=(0,_.useCallback)((e=>{const t=e.currentTarget.value;"artwork"!==t&&"hero"!==t||(n(t),s(t))}),[s,n]),{isSupported:l,availableLanguages:u}=(0,rp.K)(),d=l&&0!==u.length;let p="video"!==e,m="video"!==e&&t;const h="video"===e&&d;p!==m&&(p=!1,m=!1);const f=p||m||h;return(0,_.useEffect)((()=>{i(f)}),[f,i]),f?(0,N.jsxs)("div",{role:"radiogroup","aria-label":c.Ru.get("web-player.cinema-mode.fullscreen.media-control-options"),className:St()("encore-over-media-set",Zd),children:[p&&(0,N.jsx)(or.Zp,{label:c.Ru.get("web-player.cinema-mode.artwork-mode"),children:(0,N.jsx)(rr.H,{role:"radio",value:"artwork","aria-checked":"artwork"===e,className:St()(kd,{[Vd]:"artwork"===e}),iconOnly:"artwork"===e?Xd.v:ep.I,size:"small","aria-label":c.Ru.get("web-player.cinema-mode.artwork-mode"),onClick:o})}),m&&(0,N.jsx)(or.Zp,{label:c.Ru.get("web-player.cinema-mode.hero-mode"),children:(0,N.jsx)(rr.H,{role:"radio",value:"hero","aria-checked":"hero"===e,className:St()(kd,{[Vd]:"hero"===e}),iconOnly:"hero"===e?tp.P:np.r,size:"small","aria-label":c.Ru.get("web-player.cinema-mode.hero-mode"),onClick:o})}),h&&(0,N.jsx)(ip.C,{iconSize:"small",renderInline:!0,noBackground:!0,className:St()("encore-over-media-set",Fd),onToggle:a})]}):null};var ap=n(83812),op=n(37948),lp=n(33449),cp=n(82846),up=n(23300),dp=n(43329);const pp=(0,_.forwardRef)((({setEncoreCSSVariables:e,children:t,style:n,className:i},r)=>{const s=(0,cp.w)({contrast:"highContrast"}),a=(0,cp.w)({contrast:"higherContrast"});let o={"--cinema-mode-bg-color-from":s?.["--background-base"],"--cinema-mode-bg-color-to":a?.["--background-base"],...n};return e&&(o={...o,...s}),(0,N.jsx)("div",{className:i,style:o,ref:r,children:t})})),mp=(0,_.forwardRef)((({imageUrl:e,...t},n)=>{const{data:i}=(0,up.g)(e?[e]:[]);return(0,N.jsx)(lp.d,{dynamicColors:i,children:(0,N.jsx)(pp,{...t,ref:n})})})),hp=(0,_.forwardRef)((({imageUrl:e,children:t,className:n,style:i},r)=>{const s={...i,"--cinema-mode-bg-color-from":(0,op.z)(e,void 0,"colorLight"),"--cinema-mode-bg-color-to":(0,op.z)(e,void 0,"colorDark")};return(0,N.jsx)("div",{className:n,style:s,ref:r,children:t})})),fp=(0,_.forwardRef)(((e,t)=>(0,N.jsx)(ap.u,{property:dp.HO,renderNewExperience:()=>(0,N.jsx)(mp,{...e,ref:t}),renderOldExperience:()=>(0,N.jsx)(hp,{...e,ref:t})})));var gp=n(57776),Ep=n(59147);const _p=new gp.l("queryNpvCinemaArtist","query","57dc9e029c5083ee2f436c385981d8c5d44a0cca2982c5e48c7cb5b785c5e05e",null);const yp=e=>{const t=function(e){if(!e)return null;switch(e.type){case Ui.c.TRACK:case Ui.c.EPISODE:case Ui.c.CHAPTER:case Ui.c.UNKNOWN:return e.artists?.at(0)?.uri??null;case Ui.c.AD:return null;default:return(0,Y.k)(e),null}}(e),{data:n}=(i={artistUri:t??""},r={gcTime:18e5,staleTime:12e5,enabled:!!t},(0,Ep.I)(_p,i,r));var i,r;return"Artist"===n?.artistUnion.__typename?n.artistUnion:null};var vp=n(4100),bp=n(20602);const Sp="gbmk2WQ9l8znVQyvUFBY",Ap="Gi_KZDd1DK3BeebKNKI2",Cp=_.memo((()=>{const e=(()=>{const e=(0,ri.l)(),{videoPlayerMode:t}=(0,cd.d)();return!!(0,yl.L)()&&(t===B.K.documentPip||t===B.K.pip?"pip":!!e&&"connect")})(),t=_.useMemo((()=>{switch(e){case"pip":return(0,N.jsx)(vp.k,{});case"connect":return(0,N.jsx)(bp.V,{});case!1:return null;default:return(0,Y.k)(e),null}}),[e]);return t?(0,N.jsx)("div",{className:Ap,children:t}):null})),Tp=_.memo((({variant:e})=>{const t="video"===e;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("div",{hidden:!t,id:"VideoPlayerCinema_ReactPortal",className:Sp}),t&&(0,N.jsx)(Cp,{})]})}));var Ip=n(46983);var Op=n(79961),wp=n(19223),Np=n(65723),Rp=n(19616),Pp=n(47060),Lp=n(8268),Dp=n(3602),kp=n(31058),xp=n(83158),Up=n(63096);const Mp="800",Bp="cinema-mode-container-animation",jp="cinema-mode-container-animation-reverse",Fp="M8he015HRnzLwz3JDRfC",Vp="SIxjinFx99__InePXrAQ",Gp="tzarBt9wVoeDHawFPP0D",Hp="IsRjGOZx7PxUfbBZO8RA",Wp="xlarge",zp=_.memo((({context:e,item:t,variant:n,onVariantChange:i,ambientMode:r,UBICallbacks:a})=>{const o=(0,Rp.B)(),{setVideoPlayerUIFlag:l}=(0,cd.d)(),c=(e=>{const t=(0,_.useRef)(!1),{uri:n,isSongVideo:i}=(0,Ip.k)();return e===n&&(t.current=i),t.current})(t.uri),{title:u,link:d}=(0,kp.g)(t,e),p=(0,Dp.bJ)(e,t),{nowPlayingBarRef:m,topBarRef:h}=(0,Dt.JT)(),f=_.useRef(null),g=(0,xi.h)(t.images??void 0,{desiredSize:640,desiredLabel:Wp});(0,_.useLayoutEffect)((()=>{l(B.n.cinema,!0)}),[l]),(0,xp.M)({desiredSize:640,desiredLabel:Wp});const E=yp(t);(()=>{const e=(0,qi.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));yp(e)})();const y=(0,ni.S)();(()=>{const e=(0,x.z)(),t=(0,_.useRef)(!1),n=(0,_.useCallback)((n=>{t.current?t.current=!1:e[n](15e3)}),[e]),i=(0,_.useCallback)(((n,i)=>{n.repeat&&(e[i](5e3),t.current=!0)}),[e]),r=(0,_.useCallback)((()=>{n("seekForward")}),[n]),s=(0,_.useCallback)((()=>{n("seekBackward")}),[n]),a=(0,$l.dh)((e=>{i(e,"seekForward")}),100),o=(0,$l.dh)((e=>{i(e,"seekBackward")}),100);(0,hu.N)(["right"],r,{eventType:"keyup"}),(0,hu.N)(["right"],a,{allowRepeat:!0}),(0,hu.N)(["left"],s,{eventType:"keyup"}),(0,hu.N)(["left"],o,{allowRepeat:!0})})();const v=!(0,s.NC)(dp.HO),b=(0,_.useMemo)((()=>{const e=E?.headerImage?.data;if("ImageV2"===e?.__typename)return(0,Up.g)(e.sources.map(Up.R))}),[E]),S=!!b,A={};"hero"===n&&S&&(A["--cinema-mode-bg-image"]=`url(${b.url})`),(0,_.useEffect)((()=>{S||"hero"!==n||i("artwork")}),[S,i,n]);const{isAdPlaying:C,isPlayingVideoAd:T}=(0,qi.o)((e=>{const t=e?.item??void 0,n=(0,G.N)(t);return{isAdPlaying:n,isPlayingVideoAd:(0,Nc.A3)(e)&&n}}),$i.a),I=y===od.z.NOW_PLAYING_VIEW&&C&&!T,O=(0,G.N)(t),w=O?t.url??void 0:void 0,R=(0,_.useCallback)((()=>{O&&(window.location.href=w??"")}),[w,O]),[P,L]=(0,_.useState)(!1),{logContextTitleClick:D,logAudioVideoToggleClick:k}=a;return(0,N.jsx)(Wl.s,{containerElements:[h.current,f.current,m.current],active:!0,children:(0,N.jsx)(fp,{setEncoreCSSVariables:"artwork"===n,imageUrl:g,className:St()(wd,{[Pd]:"hero"===n,[Nd]:"video"===n,[Rd]:r,"encore-over-media-set":v}),style:A,ref:o,children:(0,N.jsxs)("div",{ref:f,tabIndex:-1,children:[(0,N.jsxs)("div",{className:St()(Ld,Vp,{[Hd]:r&&!C,[Gp]:r}),children:[(0,N.jsx)(Ed,{className:Ud,title:u,link:d,onClick:()=>{D(e.uri)}}),(0,N.jsxs)("div",{className:xd,children:[!C&&(0,N.jsx)(sp,{item:t,variant:n,hasHeroImage:S,onVariantChange:i,setHasControls:L,UBICallbacks:a}),!c&&!C&&P&&(0,N.jsx)("div",{className:qd,children:(0,N.jsx)("div",{className:Dd})}),c&&(0,N.jsx)(Pp.L,{className:St()("encore-over-media-set",Gd),onClick:k}),(0,N.jsx)(Jd,{item:t,context:e,UBICallbacks:a})]})]}),"artwork"===n&&(p?(0,N.jsx)("div",{className:St()(Md,Fp),children:(0,N.jsx)(Lp.aU,{})}):(0,N.jsx)(yd.N,{className:St()(Md,Bd,Fp,{[jd]:O}),imgSrc:g,loading:"eager",onClick:R})),(0,N.jsx)(Tp,{variant:n}),r&&"video"!==n&&!C&&(0,N.jsx)("div",{className:St()(zd,Hp),children:(0,N.jsxs)("div",{className:Kd,children:["hero"===n&&(0,N.jsx)(wp.b,{className:Yd,desiredLabel:"small",size:92,item:t}),(0,N.jsx)(Np.d,{context:e,item:t,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium"})]})}),I&&O&&(0,N.jsx)(Op.h,{item:t,className:$d})]})})})}));var Kp=n(22949),Yp=n(37488),qp=n(2679);const $p=(e,t,n)=>!!n||(!t||(!!(e=>{if(null===e)return!1;const t=document.elementFromPoint(e.x,e.y),n=t?.closest(Kp.nu);return n instanceof HTMLElement&&"false"!==n.dataset.preventsAmbientMode})(e)||(null!==document.activeElement?.closest(Kp.oj)||(!!document.querySelector("#context-menu")||!!(()=>{const e=document.querySelectorAll(`[aria-modal="true"]:not([hidden]):not([aria-label="${c.Ru.get("ad-formats.advertisement")}"])`);if(0===e.length)return!1;for(const t of e){if(!("checkVisibility"in t)||"function"!=typeof t.checkVisibility)return!1;if(t.checkVisibility())return!0}return!1})())))),Zp=()=>{const e=(()=>{const e=(0,_.useContext)(id.y);if(!e)throw new Error("useAmbientDispatch must be used within a CinemaProvider");return e})(),t=(0,Yp.j)(),n=(0,_.useRef)(null),i=(0,s.NC)(be.ikI),r=(0,_.useRef)(null),{isPlaying:a}=(0,qp.GK)(),o=(0,_.useRef)(!1),l=(0,_.useCallback)((()=>!$p(r.current,a,o.current)&&(e(!0),!0)),[a,e]),c=(0,_.useCallback)((()=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{l()||c()}),1e3*i)}),[i,l]),u=(0,_.useCallback)((()=>{e(!1),c()}),[c,e]),d=(0,$l.YQ)(u,100,{leading:!0,trailing:!1,maxWait:1e3*(i-1)});(0,_.useEffect)((()=>{if(!t)return()=>{};const e=e=>{r.current={x:e.clientX,y:e.clientY},d()},i=e=>{"Tab"===e.key&&d()};return document.addEventListener("pointermove",e),document.addEventListener("keydown",i),()=>{document.removeEventListener("pointermove",e),document.removeEventListener("keydown",i),n.current&&clearTimeout(n.current)}}),[d,t,e]),(0,_.useEffect)((()=>{const e=()=>{o.current=!0},t=()=>{o.current=!1};return document.addEventListener("pointerdown",e),document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("pointerup",t)}}),[]),(0,_.useEffect)((()=>{const e=()=>{r.current=null};return document.addEventListener("pointerleave",e),()=>{document.removeEventListener("pointerleave",e)}}),[]),(0,_.useEffect)((()=>{t?u():l()}),[l,u,t])};var Qp=n(39582),Jp=n(86394);const Xp=e=>"audio"===e?"artwork":"video",em=_.memo((()=>{const e=function(){const e=(0,qi.o)((e=>e),yl.F),t=(0,_.useRef)(e?.item);if(null===e)return null;e.item&&(t.current=e.item);const{context:n,index:i}=e;return null===t.current||void 0===t.current?null:{context:n,item:t.current,index:i}}(),t=(0,Qp.l)(),[n,i]=(0,_.useState)(e?Xp(e.item.mediaType):"artwork"),r=(0,Cd.h)(),s=ad();(()=>{const e=(0,Qp.l)(),t=(0,ae.zy)(),n=(0,_.useRef)(t);(0,_.useEffect)((()=>{t!==n.current&&e(od.z.CLOSED)}),[t,e])})(),(()=>{const e=(0,Qp.l)(),t=(0,_.useCallback)((()=>{e(od.z.CLOSED)}),[e]);(0,Jp.m)(t)})(),Zp(),(0,_.useEffect)((()=>{e||t(od.z.CLOSED)}),[e,t]),(0,_.useLayoutEffect)((()=>{e?.item.mediaType&&i(Xp(e.item.mediaType))}),[e?.item.mediaType]);const a=parseInt(Mp,10),o=(()=>{const{currentContextUri:e,currentItemUri:t,nextItemUri:n,previousItemUri:i}=(0,qi.o)((e=>({currentContextUri:e?.context.uri,currentItemUri:e?.item?.uri,nextItemUri:e?.nextItems.at(0)?.uri,previousItemUri:e?.previousItems.at(0)?.uri})),((e,t)=>e.currentContextUri===t.currentContextUri&&e.currentItemUri===t.currentItemUri&&e.nextItemUri===t.nextItemUri&&e.previousItemUri===t.previousItemUri)),r=(0,_.useRef)(e),s=(0,_.useRef)(n),a=(0,_.useRef)(i);if(!t||!e)return;if(e!==r.current)return;let o;return t&&(t===s.current?o="next":t===a.current&&(o="previous")),s.current=n,a.current=i,r.current=e,o})();let l;if("next"===o?l=Bp:"previous"===o&&(l=jp),!e)return null;const c=(0,N.jsx)(zp,{context:e.context,item:e.item,variant:n,onVariantChange:i,ambientMode:r,UBICallbacks:s});return"video"===e?.item.mediaType?c:e?(0,N.jsx)(gd.A,{childFactory:e=>(0,_.cloneElement)(e,{classNames:l,timeout:a}),children:(0,N.jsx)(br.A,{in:!0,appear:!1,timeout:a,classNames:l,children:c},e.item.uri)}):null}));var tm=n(2650);const nm="QdB2YtfEq0ks5O4QbtwX",im="PZX553lOrpQetFlWCrWO",rm="FWlHsHhD0hSw1ldIXnOF",sm="poe3QmyrczMfT4aZNIok",am="FKsek3qI2lalTOUrGVqP",om=()=>{const e=(0,tm.S)(),t=(0,s.NC)(be.mzn),n=(()=>{const e=(0,tm.S)(),t=(0,Qp.l)(),n=(0,Rn.XB)(),i=(0,_.useRef)(e),r=(0,_.useRef)(n),[s,a]=(0,_.useState)(!1);return(0,_.useEffect)((()=>{i.current!==e?a(!1):e===od.z.NOW_PLAYING_VIEW&&r.current!==n&&(n===Pn.Z.Disabled?t(od.z.CLOSED):ld((()=>{n!==Pn.Z.NowPlayingView?a(!0):a(!1)}))),r.current=n,i.current=e}),[n,e,t]),s})(),i=(0,Cd.h)(),r=(0,h.d4)((e=>e.ui.fullscreenMode.isOpen)),a=oi();return null!==e&&e!==od.z.CLOSED&&t?(0,N.jsx)("div",{className:St()(nm,{[im]:n,[rm]:i,[sm]:r,[am]:a}),children:e===od.z.NOW_PLAYING_VIEW&&(0,N.jsx)(em,{})}):null};var lm=n(74177),cm=n(65794);const um=()=>({isExpanded:(0,Rn.XB)()!==Pn.Z.Disabled});var dm=n(26340);function pm({children:e,UBICallbacks:t}){const{isExpanded:n}=um(),i=(0,s.NC)(be.ZDY),r=(0,_.useDeferredValue)(n),{logShowNPVButtonClick:a}=t,o=(0,Rn._Y)(),l=(0,_.useCallback)((()=>{a(),o(De.$S.NPV_BUTTON_CLICK)}),[a,o]);return i?(0,N.jsxs)("div",{className:St()(dm.A.peek,{[dm.A.expanded]:n,[dm.A.collapsed]:!n,[dm.A.deferredCollapsed]:!r}),children:[(0,N.jsx)("div",{className:dm.A.peekContent,"aria-hidden":!n,inert:n?void 0:"",children:e}),(0,N.jsx)("div",{className:dm.A.overlay,onClick:l,children:(0,N.jsx)(or.Zp,{label:c.Ru.get("web-player.now-playing-view.label"),children:(0,N.jsx)(rr.H,{"aria-label":c.Ru.get("web-player.now-playing-view.label"),iconOnly:sl.g,size:"small",className:dm.A.overlayButton})})})]}):(0,N.jsx)(N.Fragment,{children:e})}const mm=_.lazy((async()=>{const{PanelSection:e}=await Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(2826),n.e(1008),n.e(1435),n.e(7287),n.e(3848),n.e(4900),n.e(9927),n.e(9901),n.e(702),n.e(2119),n.e(5281),n.e(2032),n.e(2979),n.e(9928),n.e(8082),n.e(871),n.e(9403),n.e(6704),n.e(319)]).then(n.bind(n,5446));return{default:e}})),hm=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(mm,{})});var fm=n(97121);const gm="XOawmCGZcQx4cesyNfVO";function Em({children:e}){const t=(0,fm.X)(),{size:n}=(0,Rn.Zf)();let i=n;return(0,s.NC)(be.ZDY)||t!==Pn.Z.Disabled||(i=0),(0,N.jsx)("div",{style:{width:`${i}px`},className:gm,children:e})}const _m=()=>{const e=ad();return(0,N.jsx)(pm,{UBICallbacks:e,children:(0,N.jsx)(Em,{children:(0,N.jsx)(hm,{})})})};function ym({children:e}){const t=(0,s.NC)(be.ZDY),{isExpanded:n}=um(),i=(0,_.useDeferredValue)(n);return t?(0,N.jsx)("div",{className:St()(dm.A.counterWeight,{[dm.A.collapsed]:!n,[dm.A.deferredCollapsed]:!i}),children:e}):(0,N.jsx)(N.Fragment,{children:e})}var vm=n(78813),bm=n(9473);const Sm="cKAAyrqpVEsxnhtvNHou",Am="HRQp773shLo1JL0Df_og",Cm="zQW9tqtrDIkVB6G8W3OO",Tm="VC5colbrFupwXehpaNuE",Im="n0OfVH5OdDa9YY7NXzN1",Om=()=>{const e=(0,h.wA)(),t=(0,Td.l)(),n=(0,ti.h)(),{title:i}=(0,kp.$)(),{setVideoPlayerUIFlag:r}=(0,cd.d)(),s=(0,_.useCallback)((()=>{(0,Mo.I)("NPV_OPEN_CINEMA_MODE_BUTTON"),t(bm.z.CLOSED),e((0,vm.Oc)()),r(B.n.cinema,!1)}),[e,t,r]);return(0,N.jsxs)("div",{className:Sm,children:[(0,N.jsx)(Ed,{className:Tm,title:i,link:null}),(0,N.jsx)("div",{className:Am,children:(0,N.jsx)(rr.H,{className:St()(Cm,{[Im]:n}),iconOnly:vd.b,size:"small",onClick:s,"aria-label":c.Ru.get("web-player.cinema-mode.minimize")})})]})},wm="s7uecZlry8EhjpjrnnfZ",Nm=({children:e})=>(0,N.jsx)("div",{className:wm,children:e}),Rm="OVKZsyH3mdzKXFaoAHQk",Pm="E_OoEHbEoXwIM_hCPvBL",Lm=()=>{const e=(0,ni.S)(),t=(0,ti.h)(),n=(0,qi.o)((e=>{const t=e?.item??void 0;return(0,Nc.A3)(e)&&(0,G.N)(t)}));return e===bm.z.NOW_PLAYING_VIEW&&n?(0,N.jsxs)(Su,{className:t?Rm:Pm,children:[(0,N.jsx)(Om,{}),(0,N.jsx)("div",{className:"VTO__modal-slot"})]}):(0,N.jsx)(Nm,{children:(0,N.jsx)("div",{className:"VTO__modal-slot"})})},Dm=e=>e?Math.trunc(e/50):0,km=e=>{const{accessTokenIsSet:t,onClose:n,onBrowserNotSupported:i,onCloseFullscreenMode:r,onCloseWatchFeed:a,onReachUsableState:o,isVideoSupported:l,isDesktop:u,billboardMinimized:d,isDeveloperMode:p,adsEnabled:m,children:f}=e,g=(0,cn.m)(),y=(0,j.My)(),v=y===ln.m.Desktop,b=(0,_.useRef)(null),S=(0,_.useRef)(null),A=(0,_.useRef)(null),C=(0,_.useRef)(null),T=(0,_.useRef)(null),I=(0,_.useRef)(null),O=(0,_.useRef)(null),w=(0,_.useRef)(null),R=(0,_.useRef)(null),P=(0,_.useRef)(null),L=(0,_.useRef)(null),D=(0,_.useRef)(null),k=(0,_.useRef)(null),x=zi(),U=(0,s.NC)(be.mzn),M=(0,$u.t)(),[{data:B}]=(0,qu.K)(M.viewportZoom),F=function(e,t){return e!==ln.m.Desktop&&(e!==ln.m.PWA&&("/lyrics"!==t.pathname&&!(0,nl.g)()))}(y,(0,ae.zy)());(e=>{const t=(0,ae.Zp)();(0,_.useEffect)((()=>{const n=n=>{e&&(3===n.button?(t(-1),n.preventDefault()):4===n.button&&t(1))};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}}),[e,t])})(v),rn(!p),(({onBrowserNotSupported:e,onReachUsableState:t})=>{(0,_.useEffect)((()=>{const n=an().getParser(window.navigator.userAgent);n.satisfies({chrome:"<62"})||n.satisfies({edge:"<16"})?e(c.Ru.get("browser_upgrade_notice",n.getBrowserName())):t("home")}),[e,t])})({onBrowserNotSupported:i,onReachUsableState:o}),function(){const e=(0,$u.t)(),[{data:t}]=(0,qu.K)(e.viewportZoom),n=(0,cn.m)();(0,_.useEffect)((()=>{const e=Math.round(t??0).toString(),i=Zu.b*Qu[e];n.setTitlebarHeight(i)}),[t,n])}(),(()=>{const e=(0,cm.Z)(),t=e.getCapabilities(),n=t.canZoomIn&&t.canZoomOut;(0,_.useEffect)((()=>{if(!n)return()=>{};const t=t=>{if(t.ctrlKey){t.preventDefault();const n=t.deltaY;if(0===n)return;n>0?e.zoomOut():e.zoomIn()}},i=e=>{"Control"===e.key&&window.addEventListener("wheel",t,{passive:!1})};window.addEventListener("keydown",i);const r=e=>{"Control"===e.key&&window.removeEventListener("wheel",t)};return window.addEventListener("keyup",r),()=>{window.removeEventListener("wheel",t),window.removeEventListener("keydown",i),window.removeEventListener("keyup",r)}}),[e,n])})();const{handleDrop:V,handleDragStart:G,handleDragEnd:H,handleDragOver:W}=(()=>{const e=(0,_.useCallback)((e=>{e.preventDefault(),document.body.removeAttribute("data-dragging-type")}),[]),t=(0,_.useCallback)((e=>{document.body.removeAttribute("data-dragging-type")}),[]),n=(0,_.useCallback)((e=>{e.preventDefault()}),[]);return{handleDrop:e,handleDragStart:(0,_.useCallback)((e=>{e.target instanceof Element&&"true"!==e.target.getAttribute("draggable")&&(e.preventDefault(),e.stopPropagation())}),[]),handleDragEnd:t,handleDragOver:n}})();(()=>{const e=(0,ut.jE)();(0,Ki.L)((()=>{e.invalidateQueries({queryKey:["useAddToPlaylistListData"]})}))})(),(()=>{const e=(0,_.useRef)(!0),t=(0,Yi.p)(),n=(0,ut.jE)();(0,_.useEffect)((()=>{e.current?e.current=!1:(n.invalidateQueries(),n.removeQueries({type:"inactive"}))}),[t,n])})(),(0,Rn.bF)();const z=(0,lm.G)();(0,_.useEffect)((()=>{window&&window.history&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual")}),[]),(0,_.useEffect)((()=>{g.notifyReadyStateReached()}),[g]);const K=(0,_.useMemo)((()=>[(0,N.jsx)(Jt,{scrollNodeRef:D,scrollNodeChildRef:k}),(0,N.jsx)(En.X,{}),(0,N.jsx)(Dt.ZC,{mainLandmarkRef:S,lyricsCinemaRef:O,leftSidebarRef:P,rightSidebarRef:L,nowPlayingBarRef:C,mainContentRef:T,topBarRef:A}),(0,N.jsx)(Pt,{}),(0,N.jsx)(At.Qr,{}),(0,N.jsx)(mu,{}),(0,N.jsx)(wt.k,{}),(0,N.jsx)(Xt.J,{}),(0,N.jsx)(en.$,{}),(0,N.jsx)(on.JI,{}),(0,N.jsx)(Tn.Ad,{}),(0,N.jsx)(Pi.n,{instance:x}),(0,N.jsx)(Du,{domRootRef:R}),(0,N.jsx)(ai.F,{}),(0,N.jsx)(Hn,{}),(0,N.jsx)(ir,{}),(0,N.jsx)(Ju.r,{}),(0,N.jsx)(fd,{})]),[x]),Y=(0,h.d4)((e=>e.ui.unsupportedBrowser));return(0,N.jsxs)(je,{providers:K,children:[(0,N.jsxs)("div",{"data-testid":"root",className:St()("Root","global-nav","centered-layout"),style:{"--panel-gap":`${On.KV}px`,"--zoom-level":Dm(B)},onDrop:V,onDragOver:W,onDragStart:G,onDragEnd:H,ref:b,children:[(0,N.jsx)(xu,{message:Y.isOpen?Y.message:null,allowHTML:!0,onClose:n,isNotSupported:!0}),(0,N.jsxs)(jn,{children:[(0,N.jsx)(au,{topBarRef:A}),(0,N.jsxs)(Kn,{children:[(0,N.jsx)(Jn,{}),(0,N.jsx)(qt,{elementRef:P})]}),(0,N.jsx)(fi,{children:(0,N.jsx)(Nu,{})}),(0,N.jsx)(ei,{children:(0,N.jsxs)(ym,{children:[(0,N.jsx)(Nt.pZ,{value:"top-bar",children:(0,N.jsx)(ju,{})}),(0,N.jsxs)("div",{className:"main-view-container",children:[(0,N.jsx)("div",{className:"under-main-view"}),(0,N.jsx)(Lt.a,{className:St()("main-view-container__scroll-node",{"main-view-container__scroll-node--offset-topbar":z}),onInstanceCreated:e=>{D.current=e.elements().viewport},children:(0,N.jsx)("div",{ref:k,className:St()("main-view-container__scroll-node-child"),style:{minHeight:`calc(100vh - ${On.uC}px - ${On.fO}px - 519px)`},children:(0,N.jsx)(gn,{ref:S,children:(0,N.jsxs)(E.s,{Fallback:()=>(0,N.jsx)(Mu,{}),onError:e=>(0,tn.Jy)(e,"Root"),children:[f,F&&(0,N.jsx)("div",{className:"main-view-container__mh-footer-container",children:(0,N.jsx)(Cn,{})})]})})})}),l&&(0,N.jsx)(Yu,{fullscreenModeRef:w,cinemaModeRef:I})]}),(0,N.jsx)(Ou,{}),t&&m&&(0,N.jsx)(Hu,{}),u&&(0,N.jsx)("div",{className:St()("",{"Root__ads-container-desktop--is-hidden":!d}),children:(0,N.jsx)(Vu,{})})]})}),(0,N.jsxs)(mi,{children:[(0,N.jsx)(_m,{}),(0,N.jsx)(cu,{elementRef:L})]}),(0,N.jsx)(om,{}),(0,N.jsx)("div",{id:"lyrics-cinema",className:"Root__lyrics-cinema",ref:O}),(0,N.jsx)(Vn,{ref:I}),(0,N.jsx)(Vn,{ref:R}),(0,N.jsx)(Lm,{}),(0,N.jsx)(vu,{children:(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Tu,{})})}),(0,N.jsx)(vu,{children:(0,N.jsx)(Cu,{})}),(0,N.jsx)(Su,{children:(0,N.jsx)(nd,{})})]}),(0,N.jsx)(_u,{isDesktop:u}),(0,N.jsx)(E.s,{onError:e=>{a(),(0,tn.Jy)(e,"WatchFeedView")},children:(0,N.jsx)(Pu,{})}),!U&&(0,N.jsx)(E.s,{onError:e=>{r(),(0,tn.Jy)(e,"FullscreenMode")},children:(0,N.jsx)(zu,{videoRef:w})}),(0,N.jsx)(Ri,{}),(0,N.jsx)(Ji,{pipInstance:x})]}),(0,N.jsx)(Ot,{}),(0,N.jsx)(gu,{})]})};const xm=n(76553).ErrorPage;var Um=n(25009),Mm=n(92336);let Bm=function(e){return e.LOGGING_CATEGORY="l2l",e.LOGGING_CATEGORY_MWP="l2l-mwp",e}({});function jm({isPremiumUser:e,locationSearch:t,navigate:n,logNavigation:i,showDialog:r}){const s=!!(a=t)&&"1"===new URLSearchParams(a).get(Bm.LOGGING_CATEGORY);var a;s&&(i(s),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(Bm.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(t,n),s&&!e&&r())}var Fm=n(25797),Vm=n(2244);const Gm="sp_s2l";var Hm=function(e){return e.LOGGING_CATEGORY="s2l",e.LOGGING_CATEGORY_MWP="s2l-mwp",e}(Hm||{});const Wm=(e,{os:t="",country:n=""})=>{const i={category:"in_app_message",action:"display",label:"download",destination_url:"open.spotify.com",os:t,country:n,context:window.location.search};return e?(0,Vm.r)(i):(0,Fm._)(i)};function zm({locationSearch:e,navigate:t,logDialog:n,showDialog:i}){(function(e){if(!e)return!1;const t=new URLSearchParams(e);return Boolean(t.get(Hm.LOGGING_CATEGORY))})(e)&&(n(),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(Hm.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(e,t),i())}function Km(){const e=(0,mt.v8)(Gm);return e?JSON.parse(decodeURIComponent(e)):null}const Ym=function({children:e}){(()=>{const{localConfiguration:e}=(0,Be.g)();(0,_.useEffect)((()=>{const t=(0,tn.sV)(),n=[...(0,Mm.v6)()].reduce(((t,n)=>{const i=e.getValue(n.name);return t[`rc.${n.name}`]=i,t}),{});t.setTags(n)}),[e])})();const t=(0,ae.Zp)(),n=(0,ae.zy)(),i=(0,h.wA)(),r=(0,ge.mv)(),{close:s}=(0,Um.P)(),a=(0,h.d4)((e=>e.session.accessToken)),o=(0,h.d4)((e=>e.ui.errorPage)),l=(0,cn.m)(),c=(0,h.d4)((e=>e.platform.isDesktop?e.ads.root.adsEnabled:!!e.session.productState?.ads&&1===parseInt(e.session.productState.ads,10))),u=(0,h.d4)((e=>!!e.ads.billboard&&e.ads.billboard.isMinimized)),{isDesktop:d,isDeveloperMode:m,isVideoSupported:f}=(0,h.d4)((e=>e.platform)),g=o.isError,E=o.name,y=!!a;(0,_.useEffect)((()=>{l.notifyViewLoaded(n.pathname)}),[l,n.pathname]);const v=(0,_n.V)();(0,_.useEffect)((()=>{zm({locationSearch:n.search,navigate:t,logDialog:()=>{r.getEventSender().send(Wm(v,{os:(0,Ks.f)()}))},showDialog:()=>{i(p.mi())}})}),[i,n.search,t,r,v]),(0,_.useEffect)((()=>{jm({isPremiumUser:!1,locationSearch:n.search,navigate:t,logNavigation:()=>r.getEventSender().send((0,vt.Q)({category:"open",action:"pageview",label:"login",destination_url:"open.spotify.com",os:(0,Ks.f)()})),showDialog:()=>{i(p.Jp())}})}));const b=(0,_.useCallback)((e=>{l.notifyUsableStateReached(e)}),[l]),S=(0,_.useCallback)((()=>{i(p.BZ())}),[i]),A=(0,_.useCallback)((e=>{i(p.Gz(e))}),[i]),C=(0,_.useCallback)((()=>{i(p.rF())}),[i]),T=(0,_.useCallback)((()=>{s({resumePlayback:!0})}),[s]);return g?(0,N.jsx)(xm,{errorName:E}):(0,N.jsx)(km,{billboardMinimized:u,isVideoSupported:f,onReachUsableState:b,accessTokenIsSet:y,onClose:S,onBrowserNotSupported:A,onCloseFullscreenMode:C,onCloseWatchFeed:T,isDesktop:d,isDeveloperMode:m,adsEnabled:c,children:e})};var qm=n(21996);const $m=({action:e,context:t,country:n,variant:i})=>({action:e,context:t,country:n,category:"brotli-exp-metrics",label:"dwp",sp_t:(0,mt.v8)("sp_t"),os:(0,qm.f)(),variant:i});var Zm=n(63058);const Qm=[...Object.values(Zm.h).map((e=>`generated-locales/web-player/${e}`)),"build/web-player/web-player","build/error-page/error-page","js/retargeting-pixels","js/gtm","build/web-player/pip-mini-player","build/web-player/vendor~web-player","build/web-player/encore~web-player"],Jm=e=>e.reduce(((e,t)=>{const n=t.name.split("/cdn/")[1];return n&&0!==t.transferSize&&(e=>Qm.some((t=>new RegExp(t).test(e))))(n)?(e[n]={bytesTransferred:t.transferSize,latency:Number((t.responseEnd-t.responseStart).toFixed(2))},e):e}),{});var Xm=n(69707);const eh=_.lazy((async()=>{const{SeeAllPlaylistLeavebehinds:e}=await Promise.all([n.e(4151),n.e(5040)]).then(n.bind(n,16888));return{default:e}})),th=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(eh,{})});var nh=n(90559),ih=n(82973);const rh=_.lazy((async()=>{const{LoadingPage:e}=await Promise.resolve().then(n.bind(n,92202));return{default:e}})),sh=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(rh,{...e})}),ah=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(310),n.e(3211),n.e(2826),n.e(1008),n.e(4900),n.e(9901),n.e(8865)]).then(n.bind(n,53926)).then((e=>({default:e.AlbumPrerelease})))));var oh=n(41715);const lh=e=>(0,N.jsx)(oh.e,{pageId:Xm.$h.PRERELEASE,children:e}),ch=()=>{const{id:e}=(0,ae.g)();if(!e)return lh((0,N.jsx)(sh,{hasError:!0,errorMessage:c.Ru.get("error.not_found.title.album")}));const t=(0,ne.jsG)(e);return lh((0,N.jsx)(ah,{uri:t.toString()},e))},uh=()=>(0,N.jsx)(ae.qh,{path:"/prerelease/:id",element:(0,N.jsx)(ch,{})},"album-prerelease"),dh=_.lazy((async()=>{const{ErrorPage:e}=await Promise.resolve().then(n.bind(n,76553));return{default:e}})),ph=({errorName:e})=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(dh,{errorName:e})}),mh=()=>[(0,N.jsx)(ae.qh,{path:"/artist-videos",element:(0,N.jsx)(ph,{errorName:"artist_videos_not_supported"})},"artist-videos")],hh=()=>null;var fh=n(84213);function gh(e){return`spotify:section:${e.replace(/^section/,"")}`}const Eh=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(1435),n.e(2537),n.e(6266)]).then(n.bind(n,60053)).then((e=>({default:e.BrowsePage}))))),_h=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(1435),n.e(2537),n.e(6266)]).then(n.bind(n,48226)).then((e=>({default:e.BrowseSection}))))),yh=({id:e})=>{if(e.startsWith("section"))return(0,N.jsx)(_h,{uri:gh(e)});const t=function(e){return/^(section)?[0-9A-Za-z_-]{22}$/.test(e)}(e)?function(e){return`spotify:page:${e}`}(e):function(e){return`spotify:genre:${e}`}(e);return(0,N.jsx)(Eh,{uri:t})},vh=e=>`spotify:cultural-moment:hub:${e}`,bh=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(1683),n.e(3211),n.e(3838)]).then(n.bind(n,55802)))),Sh=()=>{const{id:e=""}=(0,ae.g)();return(0,N.jsx)(bh,{uri:vh(e),id:e})},Ah=_.lazy((async()=>{const{EpisodeMoreLikeThis:e}=await Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(6486),n.e(1677),n.e(399)]).then(n.bind(n,99092));return{default:e}})),Ch=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Ah,{})});var Th=n(52975);const Ih=_.lazy((async()=>{const{HomeChipsRowWithEmptyStates:e}=await Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(6486),n.e(7287),n.e(2537),n.e(4328),n.e(8161),n.e(6234),n.e(9319),n.e(2233)]).then(n.bind(n,72591));return{default:e}})),Oh=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Ih,{})}),wh=_.lazy((async()=>{const{HomeHeader:e}=await Promise.resolve().then(n.bind(n,65367));return{default:e}})),Nh=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(wh,{})});var Rh=n(26921);const Ph=_.lazy((async()=>{const{OfflineEmptyState:e}=await n.e(2630).then(n.bind(n,38154));return{default:e}})),Lh=({showDownloadInformation:e})=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Ph,{showDownloadInformation:e})});var Dh=n(23936),kh=n(37410),xh=n(33558);const Uh=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(711),n.e(4003),n.e(4312)]).then(n.bind(n,257)))),Mh=(0,_.lazy)((()=>n.e(5885).then(n.bind(n,66010)))),Bh=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(1683),n.e(1435),n.e(3569)]).then(n.bind(n,61103)))),jh=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(6486),n.e(7287),n.e(2537),n.e(4328),n.e(8161),n.e(6234),n.e(9319)]).then(n.bind(n,8677)))),Fh=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(6486),n.e(7287),n.e(2537),n.e(4328),n.e(1621)]).then(n.bind(n,25512)))),Vh=(0,_.lazy)((async()=>{const{HomeSubfeedWithRedirect:e}=await Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(6486),n.e(7287),n.e(2537),n.e(4328),n.e(8161),n.e(6234),n.e(9319),n.e(347)]).then(n.bind(n,80062));return{default:e}})),Gh=()=>{const{sectionId:e}=(0,ae.g)();return(0,N.jsx)(Fh,{uri:`spotify:section:${e}`})},Hh=({isDesktop:e,isPremium:t,isOffline:n})=>n?e&&t?(0,N.jsx)(Bh,{}):(0,N.jsx)(Lh,{showDownloadInformation:!1}):(0,N.jsx)(jh,{}),Wh=({isDesktop:e,isOffline:t})=>{const n=(0,Rh.f)()!==Th.e,{allowSwitchingBetweenHomeAdsAndHpto:i}=Se();return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Nh,{}),e&&n&&(i?(0,N.jsx)(Mh,{}):(0,N.jsx)(Uh,{})),!t&&(0,N.jsx)(Oh,{}),(0,N.jsx)(ae.sv,{})]})};var zh=n(2983);const Kh=new Map,Yh=(e,t=[])=>{(0,_.useEffect)((()=>(Kh.set(e,!0),()=>{Kh.delete(e)})),[...t,e])},qh="/launch-miniplayer",$h=()=>{const e=(()=>{const{open:e,isOpen:t,canOpen:n}=(0,Ni.H)();return(0,_.useCallback)((()=>{n&&!t&&e()}),[n,t,e])})();return(0,_.useEffect)((()=>{e()}),[e]),Yh((t=>t.pathname===qh&&(e(),!0)),[e]),(0,N.jsx)(zh.$,{to:"/"})},Zh=_.lazy((async()=>{const{PlaylistFormatRedirectWithParams:e}=await n.e(2205).then(n.bind(n,61114));return{default:e}})),Qh=e=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Zh,{...e})});var Jh=n(25013),Xh=n(21020),ef=n(66387),tf=n(77008);const nf=_.lazy((()=>Promise.all([n.e(4151),n.e(1109),n.e(6488)]).then(n.bind(n,41109)))),rf=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(nf,{})}),sf=()=>(0,Jh.X)()?(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.EXPLORE_PREMIUM,pageId:Xm.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,N.jsx)(rf,{})}):(0,N.jsx)(zh.$,{to:"/"});var af=n(94329),of=n(75610);const lf=_.lazy((()=>Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(310),n.e(2826),n.e(1008),n.e(7498),n.e(1460)]).then(n.bind(n,13129)))),cf=_.lazy((()=>Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(310),n.e(2826),n.e(1008),n.e(6704),n.e(7498),n.e(7790)]).then(n.bind(n,24825)))),uf=({queueView:e})=>{const{openQueue:t}=(0,of.R)();return(0,_.useLayoutEffect)((()=>{t(e)}),[]),null};var df=n(98471);const pf=()=>{const e=(0,s.NC)(be.eWj,{loadingValue:!1}),{openQueue:t}=(0,df.R)();return Yh((n=>!!e&&("/queue"===n.pathname?(t(af.p.QUEUE),!0):"/history"===n.pathname&&(t(af.p.HISTORY),!0)))),e?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ae.qh,{path:"/queue",element:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(uf,{queueView:af.p.QUEUE}),(0,N.jsx)(zh.$,{to:"/"})]})},"/queue"),(0,N.jsx)(ae.qh,{path:"/history",element:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(uf,{queueView:af.p.HISTORY}),(0,N.jsx)(zh.$,{to:"/"})]})},"/history")]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ae.qh,{path:"/queue",element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.NOW_PLAYING_BAR,pageId:Xm.$h.NOWPLAYING_QUEUE,children:(0,N.jsx)(cf,{})})}),(0,N.jsx)(ae.qh,{path:"/history",element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.NOW_PLAYING_BAR,pageId:Xm.$h.NOWPLAYING_HISTORY,children:(0,N.jsx)(lf,{})})})]})};var mf=n(17385);const hf=_.lazy((async()=>{const{ShowMoreLikeThis:e}=await Promise.all([n.e(4151),n.e(9033)]).then(n.bind(n,5522));return{default:e}})),ff=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(hf,{})});var gf=n(15292),Ef=n(64094);const _f=_.memo((function(){const{showId:e=""}=(0,ae.g)(),t=(e=>`spotify:show:${e}`)(e);return(0,N.jsxs)("div",{className:"contentSpacing",children:[(0,N.jsx)(gf.Q,{children:c.Ru.get("internal-link-recommender.popular-episodes")}),(0,N.jsx)(Ef.w,{uri:t,isFullPage:!0,title:c.Ru.get("internal-link-recommender.popular-episodes")})]})})),yf=_.lazy((async()=>{const{ParticipantListPage:e}=await Promise.all([n.e(4151),n.e(4295),n.e(2826),n.e(987)]).then(n.bind(n,7800));return{default:e}})),vf=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(yf,{})});var bf=n(48713),Sf=n(75950),Af=n(47756),Cf=n(61612),Tf=n(6530);const If=()=>{const{id:e}=(0,ae.g)(),t=(0,h.wA)(),n=(0,Cf.M)(),i=(0,Sf.C)();return(0,_.useEffect)((()=>{if(!e)return;const r=Nf(n,i,e);r&&t(r)}),[t,e,n,i]),(0,N.jsx)(zh.$,{to:"/"})},Of=()=>{const e=(0,Cf.M)(),t=(0,Sf.C)(),n=(0,bl.Y)(),i=(0,ae.zy)();return(0,_.useEffect)((()=>{if(t===Tf.lz.PREMIUM&&e===Tf._H.ENABLED){const e=(0,ne.o_h)(i.pathname);n(e&&(0,ne.p3P)(e)?e:void 0)}}),[n,t,i.pathname,e]),(0,N.jsx)(zh.$,{to:"/"})},wf=()=>{const e=(0,h.wA)(),t=(0,Cf.M)(),n=(0,ae.Zp)(),i=(0,Sf.C)(),r=(0,bl.Y)();return Yh((s=>{const a=(0,ne.o_h)(s.pathname??""),o=a&&(0,ne.crr)(a)&&(l=s.pathname,!Object.values(bf.S).includes(l));var l;if(a&&(0,ne.p3P)(a))return r(a),!0;if(o){const r=Nf(t,i,a.id);return!!r&&(e(r),s.state?.redirectToHome&&n("/"),!0)}return!1}),[t,i]),[(0,N.jsx)(ae.qh,{path:bf.S.PARTICIPANTS_PAGE,element:(0,N.jsx)(oh.e,{pageId:Xm.$h.SOCIAL_LISTENING_PARTICIPANTLIST,children:(0,N.jsx)(vf,{})})},"social-session-participant-page"),(0,N.jsx)(ae.qh,{path:"/socialsession/:id",Component:If},"social-session-invitation-fallback"),(0,N.jsx)(ae.qh,{path:"/jam/:contextType?/:id?/:play?",Component:Of},"jam-creation-fallback")]};function Nf(e,t,n){return t===Tf.lz.NONE?(0,p.A9)(Af.EL.ERROR):e===Tf._H.RESTRICTED?(0,p.A9)(Af.EL.REDIRECT,n):e===Tf._H.ENABLED?(0,p.A9)(Af.EL.JOIN,n):null}var Rf=n(11627);const Pf=_.memo((function(){const{trackId:e=""}=(0,ae.g)(),t=(e=>`spotify:track:${e}`)(e);return(0,N.jsxs)("div",{className:"contentSpacing",children:[(0,N.jsx)(gf.Q,{children:c.Ru.get("internal-link-recommender.more-recommended-releases")}),(0,N.jsx)(Rf.b,{uri:t,isFullPage:!0,title:c.Ru.get("internal-link-recommender.more-recommended-releases")})]})})),Lf=_.lazy((async()=>{const{WhatsNewFeed:e}=await Promise.all([n.e(4151),n.e(8497),n.e(6486),n.e(7287),n.e(4084)]).then(n.bind(n,16847));return{default:e}})),Df=()=>(0,N.jsx)(_.Suspense,{fallback:null,children:(0,N.jsx)(Lf,{})}),kf=()=>(0,_n.V)()?(0,N.jsx)(zh.$,{to:"/"}):(0,N.jsx)(Df,{});var xf=n(134),Uf=n(59343);const Mf=`/playlist/${xf.wn}`,Bf=()=>{const{metadata:e,error:t,context:n}=(0,Uf._)(),{triggerPlay:i,isPlaying:r}=n,s=(0,h.wA)();return{isLoading:!e&&!t,callback:(0,_.useCallback)((()=>{e?r||i():s((0,p.eN)())}),[r,i,s,e])}},jf=()=>{const{isLoading:e,callback:t}=Bf();return(0,_.useEffect)((()=>{e||t()}),[e,t]),e?null:(0,N.jsx)(zh.$,{to:"/"})};var Ff=n(57666),Vf=n(68750),Gf=n(93049),Hf=n(66534);const Wf=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(1845)]).then(n.bind(n,56546))));var zf=n(13353);const Kf=(0,_.lazy)((()=>Promise.all([n.e(4151),n.e(1845)]).then(n.bind(n,56546))));function Yf(){const e=(0,ae.zy)(),t=`/${(0,ae.g)()["*"]??""}${e.search}`,n=e.pathname+e.search;return(0,N.jsx)(ae.C5,{to:t===n?`/${e.search}`:t,replace:!0})}var qf=n(55671),$f=n(93004),Zf=n(68507);const Qf=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(310),n.e(1683),n.e(3211),n.e(2826),n.e(1008),n.e(3848),n.e(4900),n.e(9927),n.e(9901),n.e(5281),n.e(5962)]).then(n.bind(n,91483)))),Jf=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(2826),n.e(1008),n.e(1435),n.e(3848),n.e(4900),n.e(9927),n.e(9901),n.e(702),n.e(2119),n.e(5281),n.e(2032),n.e(8082),n.e(871),n.e(1408)]).then(n.bind(n,59726)))),Xf=_.lazy((()=>n.e(3890).then(n.bind(n,42311)))),eg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(310),n.e(3211),n.e(2826),n.e(1008),n.e(4900),n.e(9901),n.e(5281),n.e(8082),n.e(6863)]).then(n.bind(n,88180)))),tg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(2826),n.e(1008),n.e(2327),n.e(9480)]).then(n.bind(n,40701)))),ng=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(1683),n.e(3211),n.e(1435),n.e(9209)]).then(n.bind(n,92425)))),ig=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(3211),n.e(2826),n.e(1008),n.e(7287),n.e(3848),n.e(4900),n.e(9927),n.e(702),n.e(2119),n.e(1504),n.e(7900),n.e(371),n.e(8828)]).then(n.bind(n,99940)))),rg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(3211),n.e(6486),n.e(9927),n.e(1677),n.e(1504),n.e(371),n.e(6080)]).then(n.bind(n,37955)))),sg=_.lazy((()=>Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(310),n.e(3211),n.e(2826),n.e(1008),n.e(3848),n.e(702),n.e(4389)]).then(n.bind(n,32728)))),ag=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(1683),n.e(3211),n.e(7287),n.e(2032),n.e(5783)]).then(n.bind(n,84699)))),og=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(2826),n.e(1008),n.e(1435),n.e(6486),n.e(7287),n.e(2537),n.e(1677),n.e(6872),n.e(7125)]).then(n.bind(n,53294)))),lg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(2537),n.e(6872),n.e(2889)]).then(n.bind(n,92752)))),cg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(8497),n.e(8882),n.e(711),n.e(310),n.e(1683),n.e(3211),n.e(2826),n.e(1008),n.e(6486),n.e(3848),n.e(4900),n.e(9927),n.e(702),n.e(2119),n.e(2979),n.e(1504),n.e(7900),n.e(2355)]).then(n.bind(n,52780)))),ug=_.lazy((()=>n.e(4496).then(n.bind(n,37924)))),dg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(711),n.e(310),n.e(1683),n.e(1435),n.e(7287),n.e(2537),n.e(6234),n.e(5663)]).then(n.bind(n,12099)))),pg=_.lazy((()=>Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(3211),n.e(6486),n.e(1677),n.e(482),n.e(8606)]).then(n.bind(n,87769)))),mg=_.lazy((()=>Promise.all([n.e(4151),n.e(8497),n.e(8882),n.e(310),n.e(3211),n.e(2826),n.e(1008),n.e(6486),n.e(1677),n.e(482),n.e(9528)]).then(n.bind(n,951)))),hg=_.lazy((()=>Promise.all([n.e(4151),n.e(1785)]).then(n.bind(n,90852)))),fg=_.lazy((()=>Promise.all([n.e(4151),n.e(9928),n.e(1706),n.e(6505)]).then(n.bind(n,29696)))),gg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(42)]).then(n.bind(n,98582)))),Eg=_.lazy((()=>Promise.all([n.e(4151),n.e(4295),n.e(42)]).then(n.bind(n,32690)))),_g=_.lazy((()=>n.e(8212).then(n.bind(n,13648)))),yg=_.lazy((()=>Promise.all([n.e(4151),n.e(1109),n.e(1396)]).then(n.bind(n,5929)))),vg=_.lazy((()=>Promise.all([n.e(4151),n.e(3211),n.e(7241)]).then(n.bind(n,74069)))),bg=_.lazy((()=>Promise.all([n.e(4151),n.e(5523)]).then(n.bind(n,8361)))),Sg=e=>{const{viewId:t=""}=(0,ae.g)();return t===mf.r?(0,N.jsx)(dg,{...e}):(0,N.jsx)(yh,{id:t})},Ag=({RoutesComponent:e=ae.BV})=>{const t=(0,Zf.o)();return(0,N.jsxs)(e,{children:[(0,N.jsx)(ae.qh,{path:"tracks",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.COLLECTION_SONGS,children:(0,N.jsx)(ig,{})})}),(0,N.jsx)(ae.qh,{path:"episodes",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.COLLECTION_PODCASTS_EPISODES,children:(0,N.jsx)(rg,{})})}),(0,N.jsx)(ae.qh,{path:"your-episodes",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.COLLECTION_PODCASTS_EPISODES,children:(0,N.jsx)(rg,{})})}),t.canFetchAllTracks&&(0,N.jsx)(ae.qh,{path:"local-files",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.LOCALFILES,children:(0,N.jsx)(sg,{})})}),(0,N.jsx)(ae.qh,{path:"/*",element:(0,N.jsx)(zh.$,{to:"/collection/tracks"})})]})},Cg=e=>{const{playlistId:t}=(0,ae.g)();return(0,_.createElement)(cg,{...e,key:t})},Tg=e=>{const{artistId:t}=(0,ae.g)();return(0,_.createElement)(Jf,{...e,key:t})},Ig=e=>{const{albumId:t}=(0,ae.g)();return(0,_.createElement)(Qf,{...e,key:t})},Og=e=>{const{showId:t}=(0,ae.g)();return(0,_.createElement)(pg,{...e,key:t})},wg=({RoutesComponent:e=ae.BV})=>{const t=(0,ae.zy)();(()=>{const e=(0,qo.J)(),t=(0,_.useRef)("");(0,_.useEffect)((()=>e.block(((e,n)=>{let i=!1;for(const[t]of Kh)t(e,n)&&(i=!0);const r=e.pathname+e.search+e.hash;if("PUSH"===n&&t.current===r&&(i=!0),i)return!1;t.current=r}))),[e])})();const n=(0,h.d4)((e=>e.features.enableShows)),{isDesktop:i,isBrowser:r}=(0,h.d4)((e=>e.platform)),{isAnonymous:a,productState:o}=(0,h.d4)(Ra.Ht),l="premium"===o?.product,u=!(0,Fr.n)();(0,Ff.K)(),function(){const{finishOnboarding:e,currentStep:t}=(0,Xu.er)(),n=(0,ae.RQ)("/search/:query/:category"),i=(0,ae.RQ)("/search/*"),r=(0,ae.RQ)("/artist/:artistUri");(0,_.useEffect)((()=>{t!==ed.B.ARTIST_CARD?t===ed.B.PLAY_BUTTON&&(r||e()):i&&null!==n&&"artists"!==n?.params.category?e():i||r||e()}),[t,e,i,n,r])}(),function(){const{finishOnboarding:e,currentStep:t}=(0,Xu.er)(),n=(0,ae.RQ)("/artist/:artistUri"),i=(0,ae.RQ)("/search/*"),[r,s]=(0,_.useState)(!1);(0,V.p)(F.gd.UPDATE,(e=>{!r&&e.data?.hasContext&&s(!0)})),(0,_.useEffect)((()=>{(t===ed.B.PLAY_BUTTON&&n||t===ed.B.ARTIST_CARD&&i)&&r&&e()}),[t,e,r,n,i])}();const{allEpisodeAdsRoute:d}={allEpisodeAdsRoute:(0,N.jsx)(ae.qh,{path:(0,Gf.c)(Hf.ob),element:(0,N.jsx)(Wf,{surface:Vf.ui.PODCAST_SEE_ALL})},"all-episode-ads")},{allShowAdsRoute:p}={allShowAdsRoute:(0,N.jsx)(ae.qh,{path:(0,zf.q)(Hf.yA),element:(0,N.jsx)(Kf,{surface:Vf.ui.PODCAST_SEE_ALL})},"all-show-ads")},m=(({isDesktop:e,isPremium:t,isOffline:n})=>{const i=(0,kh.W)({type:"locale",uri:"home"});return[(0,N.jsxs)(ae.qh,{path:"/",element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.HOME,pageId:Xm.$h.HOME,entityUri:"spotify:app:home",children:(0,N.jsx)(Wh,{isDesktop:e,isPremium:t,isOffline:n})}),children:[(0,N.jsx)(ae.qh,{path:"/home",element:(0,N.jsx)(Vh,{})},"home-subfeed"),(0,N.jsx)(ae.qh,{index:!0,element:(0,N.jsx)(Hh,{isDesktop:e,isPremium:t,isOffline:n})})]},"home"),i?xh.NW.map((i=>(0,N.jsxs)(ae.qh,{path:`/${xh.CT}${i}`,element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.HOME,pageId:Xm.$h.HOME,entityUri:"spotify:app:home",children:(0,N.jsx)(Wh,{isDesktop:e,isPremium:t,isOffline:n})}),children:[(0,N.jsx)(ae.qh,{path:`/${xh.CT}${i}/home`,element:(0,N.jsx)(Vh,{})},"home-subfeed"),(0,N.jsx)(ae.qh,{index:!0,element:(0,N.jsx)(Hh,{isDesktop:e,isPremium:t,isOffline:n})})]},"home-i18n"))):null,(0,N.jsx)(ae.qh,{path:"/section/:sectionId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.HOME_DRILLDOWN,children:(0,N.jsx)(Gh,{})})},"home-section")]})({isDesktop:i,isPremium:l,isOffline:u}),f=(()=>{const{isLoading:e,callback:t}=Bf();return Yh((n=>n.pathname===Mf&&(e||t(),!0)),[e,t]),(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(ae.qh,{path:Mf,element:(0,N.jsx)(jf,{})},Mf)})})(),g=(0,N.jsx)(ae.qh,{path:qh,element:(0,N.jsx)($h,{})},qh),E=[(0,N.jsx)(ae.qh,{path:"/cultural-moment/hub/:id",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CULTURALMOMENTSHUB,children:(0,N.jsx)(Sh,{})})},"cultural-moment-hub")],y=uh(),v=pf(),b=(0,N.jsx)(ae.qh,{path:"/content-feed",element:(0,N.jsx)(kf,{})}),S=(()=>{const e=c.Ru.getLocaleForURLPath(),t=(0,h.d4)(Xh.MU),n=(0,h.d4)(Xh.NR),i=(0,tf.p)({localeFeatureFlag:t,entityFeatureFlag:n,urlLocale:e,entity:Ui.c.PREMIUM,type:"link"})?(0,ef.hF)("/premium"):"/premium";return(0,N.jsx)(ae.qh,{path:i,element:(0,N.jsx)(sf,{})})})(),A=wf(),C=mh(),T=(0,s.NC)(be.DKh),I=!(0,nl.g)(),O=(0,ih.e)(),w=(0,nh.z)(),R=(0,nh.$)(),P=(0,fh.H)();return(0,N.jsxs)(e,{children:[(0,N.jsx)(ae.qh,{path:"/user/:userId/collection/your-episodes",element:(0,N.jsx)(zh.$,{to:"/collection/episodes"})}),(0,N.jsx)(ae.qh,{path:"/user/:userId/collection/album/:albumId",element:(0,N.jsx)(zh.$,{to:"/album/:albumId"})}),(0,N.jsx)(ae.qh,{path:"/user/:userId/collection/artist/:artistId",element:(0,N.jsx)(zh.$,{to:"/artist/:artistId/saved"})}),(0,N.jsx)(ae.qh,{path:"/user/:userId/playlist/:playlistId",element:(0,N.jsx)(zh.$,{to:"/playlist/:playlistId"})}),(0,N.jsx)(ae.qh,{path:"/browse/genres",element:(0,N.jsx)(zh.$,{to:"/genre/hub-browse-grid"})}),(0,N.jsx)(ae.qh,{path:"/browse/newreleases",element:(0,N.jsx)(zh.$,{to:"/genre/new-releases-page"})}),(0,N.jsx)(ae.qh,{path:"/browse/discover",element:(0,N.jsx)(zh.$,{to:"/genre/discover-page"})}),(0,N.jsx)(ae.qh,{path:"/browse/charts",element:(0,N.jsx)(zh.$,{to:"/genre/browse-charts-tab"})}),(0,N.jsx)(ae.qh,{path:"/browse/featured",element:(0,N.jsx)(zh.$,{to:"/"})}),(0,N.jsx)(ae.qh,{path:"/browse",element:(0,N.jsx)(zh.$,{to:"/"})}),(0,N.jsx)(ae.qh,{path:`/playlist/${$f.iU}`,element:(0,N.jsx)(zh.$,{to:"/collection/episodes"})}),(0,N.jsx)(ae.qh,{path:`/playlist/${$f._J}`,element:(0,N.jsx)(zh.$,{to:"/collection/tracks"})}),qf.BG.map((e=>(0,N.jsx)(ae.qh,{path:e,element:(0,N.jsx)(zh.$,{to:qf.yf})},e))),(0,N.jsx)(ae.qh,{path:"/internal/recs/playlist/:playlistId",element:(0,N.jsx)(zh.$,{to:"/playlist/:playlistId"})}),(0,N.jsx)(ae.qh,{path:"/settings",element:(0,N.jsx)(zh.$,{to:"/"})}),a?[(0,N.jsx)(ae.qh,{path:"/collection/*",element:(0,N.jsx)(zh.$,{to:"/"})},"collection-redirect")]:[(0,N.jsx)(ae.qh,{path:"/collection",element:(0,N.jsx)(zh.$,{to:"/collection/tracks"})},"collection-redirect")],m,f,g,E,y,C,v,b,S,A,(0,N.jsx)(ae.qh,{path:"/user/:userId/collection",element:(0,N.jsx)(zh.$,{to:{search:t.search,pathname:"/collection/tracks"}})}),(0,N.jsx)(ae.qh,{path:"/search/*",element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.SEARCH,children:(0,N.jsx)(og,{})})}),(0,N.jsx)(ae.qh,{path:"/recent-searches",element:(0,N.jsx)(oh.e,{navigationalRoot:Dh.g.SEARCH,pageId:Xm.$h.SEARCH_RECENT,children:(0,N.jsx)(lg,{})})}),(0,N.jsx)(ae.qh,{path:"/collection/*",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(Ag,{RoutesComponent:e})})}),(0,N.jsx)(ae.qh,{path:"/artist/:artistId/*",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(Tg,{})})}),(0,N.jsx)(ae.qh,{path:"/album/:albumId/*",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.ALBUM,children:(0,N.jsx)(Ig,{})})}),(0,N.jsx)(ae.qh,{path:"/playlist-format/:title",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(Qh,{isAnonymous:a})})}),(0,N.jsx)(ae.qh,{path:"/playlist-format/:title/:category",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(Qh,{isAnonymous:a})})}),(0,N.jsx)(ae.qh,{path:"/track/:trackId/*",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.TRACK,children:r?(0,N.jsx)(eg,{}):(0,N.jsx)(Xf,{})})}),(0,N.jsx)(ae.qh,{path:"/track/:trackId/more-like-this",element:O?(0,N.jsx)(Pf,{}):(0,N.jsx)(zh.$,{to:"/"})},"more-like-this-track"),(0,N.jsx)(ae.qh,{path:"/playlist/:playlistId/see-all-ads",element:(0,N.jsx)(th,{})}),(0,N.jsx)(ae.qh,{path:"/playlist/:playlistId/*",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.PLAYLIST,children:(0,N.jsx)(Cg,{})})}),(0,N.jsx)(ae.qh,{path:"/user/:username/folder/:folderId",element:(0,N.jsx)(zh.$,{to:"/"})}),(0,N.jsx)(ae.qh,{path:"/folder/:folderId/*",element:(0,N.jsx)(zh.$,{to:"/"})}),(0,N.jsx)(ae.qh,{path:"/user/:userId/*",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(tg,{})})}),(0,N.jsx)(ae.qh,{path:"/genre/corona_news_podcasts",element:(0,N.jsx)(zh.$,{to:"/genre/corona_news_podcasts-page"})}),(0,N.jsx)(ae.qh,{path:"/genre/:viewId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.GENRE,children:(0,N.jsx)(Sg,{})})}),(0,N.jsx)(ae.qh,{path:"/view/:viewId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.HOME_DRILLDOWN,children:(0,N.jsx)(Sg,{})})}),(0,N.jsx)(ae.qh,{path:"/concerts-page",element:(0,N.jsx)(zh.$,{to:"/concerts"})}),(0,N.jsx)(ae.qh,{path:"/concerts/location/:location",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CONCERTS,children:(0,N.jsx)(ag,{})})}),(0,N.jsx)(ae.qh,{path:"/concerts/location/:location/genre/:id",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CONCERTS,children:(0,N.jsx)(ag,{})})}),(0,N.jsx)(ae.qh,{path:"/concerts/genre/:id",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CONCERTS,children:(0,N.jsx)(ag,{})})}),(0,N.jsx)(ae.qh,{path:"/concerts",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CONCERTS,children:(0,N.jsx)(ag,{})})}),(0,N.jsx)(ae.qh,{path:"/concert/:concertId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.CONCERTS_CONCERT,children:(0,N.jsx)(ng,{})})}),T&&(0,N.jsx)(ae.qh,{path:"/venue/:venueId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.VENUE,children:(0,N.jsx)(vg,{})})}),I&&false,(0,N.jsx)(ae.qh,{path:"/lyrics",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.LYRICS,children:(0,N.jsx)(fg,{format:"fullscreen"})})}),(0,N.jsx)(ae.qh,{path:"/preferences",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.SETTINGS,navigationalRoot:Dh.g.SETTINGS,children:(0,N.jsx)(hg,{})})}),(0,N.jsx)(ae.qh,{path:"/premium",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,N.jsx)(yg,{})})}),(0,N.jsx)(ae.qh,{path:"/radio/:entity/:id",element:(0,N.jsx)(zh.$,{to:"/:entity/:id"})}),(0,N.jsx)(ae.qh,{path:"/station/:entity/:id",element:(0,N.jsx)(zh.$,{to:"/:entity/:id"})}),(0,N.jsx)(ae.qh,{path:"/new/playlist",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(ug,{})})}),(0,N.jsx)(ae.qh,{path:"/blend/taste-match/:invitationId",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.BLEND_TASTE_MATCH,children:(0,N.jsx)(gg,{})})}),(0,N.jsx)(ae.qh,{path:"/blend/invitation",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.BLEND_INVITATION,children:(0,N.jsx)(Eg,{})})}),(0,N.jsx)(ae.qh,{path:"/_pong",element:(0,N.jsx)(_g,{})}),(0,N.jsx)(ae.qh,{path:"/blend/invitation-page",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.BLEND_INVITATION,children:(0,N.jsx)(Eg,{})})}),(0,N.jsx)(ae.qh,{path:"/blend/ci/:playlistId",element:(0,N.jsx)(zh.$,{to:"/playlist/:playlistId"})}),(0,N.jsx)(ae.qh,{path:"/__noul__",element:(0,N.jsx)(Yf,{})}),(0,N.jsx)(ae.qh,{path:"/__noul__/*",element:(0,N.jsx)(Yf,{})}),n?[(0,N.jsx)(ae.qh,{path:"/browse/podcasts",element:(0,N.jsx)(zh.$,{to:"/genre/podcasts-web"})},"podcasts"),p,(0,N.jsx)(ae.qh,{path:Hf.e2,element:(0,N.jsx)(Og,{})},Hf.e2),(0,N.jsx)(ae.qh,{path:"/show/:showId/more-like-this",element:r?(0,N.jsx)(ff,{}):(0,N.jsx)(zh.$,{to:"/"})},"more-like-this-shows"),(0,N.jsx)(ae.qh,{path:"/show/:showId/more-popular-episodes",element:w||R?(0,N.jsx)(_f,{}):(0,N.jsx)(zh.$,{to:"/"})},"more-popular-episodes"),(0,N.jsx)(ae.qh,{path:"/episode/:episodeId/more-like-this",element:r?(0,N.jsx)(Ch,{}):(0,N.jsx)(zh.$,{to:"/"})},"more-like-this-episodes"),d,(0,N.jsx)(ae.qh,{path:Hf.Ch,element:(0,N.jsx)(mg,{})},"episode")]:[(0,N.jsx)(ae.qh,{path:"/browse/podcasts",element:(0,N.jsx)(zh.$,{to:"/"})},"podcasts"),(0,N.jsx)(ae.qh,{path:"/show/*",element:(0,N.jsx)(zh.$,{to:"/"})},"show"),(0,N.jsx)(ae.qh,{path:"/episode/*",element:(0,N.jsx)(zh.$,{to:"/"})},"episode")],(0,N.jsx)(ae.qh,{path:"/site/:lookupToken",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.THESTAGE,children:(0,N.jsx)(bg,{})})}),(0,N.jsx)(ae.qh,{path:"/presents/:lookupToken",element:(0,N.jsx)(oh.e,{pageId:Xm.$h.THESTAGE,children:(0,N.jsx)(bg,{})})}),xh.NW.map((e=>((e,t,n)=>[(0,N.jsx)(ae.qh,{path:`/${xh.CT}${t}/track/:trackId`,element:(0,N.jsx)(oh.e,{pageId:Xm.$h.TRACK,children:e?(0,N.jsx)(eg,{}):(0,N.jsx)(Xf,{})})},"locale_track"),(0,N.jsx)(ae.qh,{path:`/${xh.CT}${t}/track/:trackId/more-like-this`,element:(0,N.jsx)(oh.e,{pageId:Xm.$h.TRACK,children:n?(0,N.jsx)(Pf,{}):(0,N.jsx)(zh.$,{to:"/"})})},"locale_track_more_like_this"),(0,N.jsx)(ae.qh,{path:`/${xh.CT}${t}/artist/:artistId/*`,element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(Tg,{})})},"locale_artist"),(0,N.jsx)(ae.qh,{path:`/${xh.CT}${t}/album/:albumId`,element:(0,N.jsx)(oh.e,{pageId:Xm.$h.ALBUM,children:(0,N.jsx)(Qf,{})})},"locale_album"),(0,N.jsx)(ae.qh,{path:`/${xh.CT}${t}/premium`,element:(0,N.jsx)(oh.e,{pageId:Xm.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,N.jsx)(yg,{})})},"locale_premium")])(r,e,O))),null,!1,P?(0,N.jsx)(ae.qh,{path:"/author/:authorId",element:(0,N.jsx)(oh.e,{children:(0,N.jsx)(hh,{})})}):null]})},Ng=(0,_.memo)((function(){return(()=>{const[e,t]=(0,_.useState)(),n=(0,ge.vh)(),i=(0,h.d4)(yn.JJ),r=(0,_n.V)(),a=(0,s.NC)(be.HI4),o=(0,_.useCallback)((()=>{const e=performance.mark("pageEnd");t(e.startTime/1e3)}),[t]);(0,_.useEffect)((()=>(window.addEventListener("load",o),()=>{window.removeEventListener("load",o)})),[o]),(0,_.useEffect)((()=>{if(e){const t=$m({action:"load-time",context:JSON.stringify({loadTime:`${e.toFixed(2)}s`}),country:i,variant:a});r?n.send((0,Vm.r)(t)):n.send((0,Fm._)(t))}}),[i,n,r,e,a])})(),(()=>{const e=(0,ge.vh)(),t=(0,h.d4)(yn.JJ),n=(0,_n.V)(),i=(0,s.NC)(be.HI4),r=Jm(performance.getEntriesByType("resource"));(0,_.useEffect)((()=>{if(Object.keys(r).length>0){const s=$m({action:"bytes-transferred-latency-per-resource",context:JSON.stringify(r),country:t,variant:i});n?e.send((0,Vm.r)(s)):e.send((0,Fm._)(s))}}),[t,e,n,r,i])})(),(0,N.jsx)(Ym,{children:(0,N.jsx)(_.Suspense,{fallback:(0,N.jsx)(yt.LoadingPage,{hasError:!1,errorMessage:"",loadOffline:(0,j.Ek)()}),children:(0,N.jsx)(wg,{})})})}));var Rg=n(75411),Pg=n(99724),Lg=n(22183);const Dg=({registry:e,children:t})=>{const n=(0,_.useContext)(Pg.N);return null!==n&&(e=(0,Lg.I)([e,n])),(0,N.jsx)(Pg.N.Provider,{value:e,children:t})};var kg=n(62152);const xg=({store:e,platform:t})=>{const n=[(0,N.jsx)(nn.IF,{}),(0,N.jsx)(Rg.G,{}),(0,N.jsx)(it.GM,{}),(0,N.jsx)(m.vd,{}),(0,N.jsx)(_t,{platform:t}),(0,N.jsx)(ot.xy,{}),(0,N.jsx)(D.wI,{}),(0,N.jsx)(pe.Pj,{}),(0,N.jsx)(nt.nI,{}),(0,N.jsx)(f.SF,{}),(0,N.jsx)(g.id,{}),(0,N.jsx)(kg.k7,{}),(0,N.jsx)(st.o,{}),(0,N.jsx)(hc.yd,{isWebPSupported:t.isWebPSupported}),(0,N.jsx)(rt.d,{eventSender:t.getEventSender()})];return(0,N.jsx)(at,{history:t.getHistory(),children:(0,N.jsx)(E.s,{onError:e=>(0,tn.Jy)(e,"App"),Fallback:L,children:(0,N.jsx)(h.Kq,{store:e,children:(0,N.jsx)(Dg,{registry:t.getRegistry(),children:(0,N.jsxs)(tt,{platform:t,children:[(0,N.jsx)(ce,{eventSender:t.getEventSender()}),(0,N.jsxs)(je,{providers:n,children:[(0,N.jsx)(Q,{}),(0,N.jsx)(U,{}),(0,N.jsx)(Ng,{})]})]})})})})})},Ug={pop:"POP",push:"PUSH",replace:"REPLACE"};function Mg(e,t){return{canGoBack:e>0,canGoForward:e{window?.performance?.mark&&e&&window.performance.mark(e)},Gg=(e,t,n)=>window?.performance?.measure&&window?.performance?.getEntriesByName&&e&&t&&n?(window.performance.measure(n,e,t),window.performance.getEntriesByName(n)):[];function Hg(e){return e.container===ln.m.Desktop}var Wg=n(78951),zg=n(88065);const Kg={version:"1.1.64.510",date:new Date(2021,6,20)};function Yg(){if((0,j.My)()!==ln.m.Desktop)return!0;const e=function(){const e=window.navigator.userAgent.match(j.aS);return e?.groups?.version??null}();if(!e)return!0;const t=function(e){const t=Kg.version.split(".")[2],[,n,i]=e.split(".");if("1"!==n)return new Date;const r=parseInt(t,10),s=parseInt(i,10);if(isNaN(s))return new Date;const a=s-r,o=new Date(Kg.date.getTime());return o.setDate(o.getDate()+14*a),o}(e);return n=t,((new Date).getTime()-n.getTime())/864e5<30;var n}const qg=.001,$g="https://de32132fc06e4b28965ecf25332c3a25@o22381.ingest.sentry.io/114855";const Zg=e=>{const t=(e.transaction||"").replace(/^\/intl-[A-Za-z]{2}/i,"/");return e.transaction=t,e};function Qg(){const{error:e,transaction:t}={error:qg,transaction:0};return{sampleRate:e,tracesSampleRate:t,debug:!1,beforeSendTransaction:Zg}}var Jg=n(30503),Xg=n(47481);var eE=n(43863),tE=n(61767),nE=n(11446),iE=n(3074),rE=n.n(iE);function sE(){return rE().create().hex.replace(/-/g,"").substr(0,16)}const aE=(e,t)=>{const n=e.url.searchParams.get("dlsi")??sE(),i=navigator.userAgent,r={link:e.url.toString(),entity_uri:e.uri.toURI(),source:i,deeplink_session_id:n};t.send((0,nE.N)(r))},oE=e=>e.searchParams.has("si")||"1"===e.searchParams.get("go")||"1"===e.searchParams.get("wta_deep_link"),lE=e=>oE(e);function cE(e){const t=function(e){const t="https://open.spotify.com/",n="spotify://";return e.startsWith(n)?e.replace(n,t):e.startsWith("spotify:")?(e.replaceAll(":","/"),e.replace("spotify/",t)):e}(e),n=(0,ne.o_h)(t,{parseUnknown:!0});if(!n)return null;const i=function(e){try{return new URL(e).search}catch{return""}}(t),r=new URLSearchParams(i),s=new URL(n.toURL());return r.forEach(((e,t)=>{s.searchParams.set(t,e)})),{url:s,uri:n}}async function uE(e,t){const{uri:n,url:i}=t,r=i.searchParams.get("pt"),s=i.searchParams.get("prid"),a=n.toString();if(r){const t=e.resolve(eE.Ki);e.resolve(tE.O).claimPermissions(a,r),await t.resync(a)}s&&await async function(e,t,n){await e.build().withHost(Eo.p1).withMethod("POST").withPath(`/shared?playlistId=${t}&sharedEntityUri=${n}`).withEndpointIdentifier("/shared").withoutMarket().withResponseType("text").send()}(go.n.getInstance(),a,s)}var dE=n(333),pE=n(16976),mE=n(78006),hE=n(55460),fE=n(15987);const gE=(e,t,n)=>i=>r=>async s=>{const a=r(s);switch(s.type){case nc.QN.ADS_ENABLED:{const r={create:e=>{i.dispatch((0,hE.PS)(e))},canShow:()=>{const e=n.getState();return!("/"===t.location.pathname)&&!(0,Nc.A3)(e)&&!(0,fE.Qv)(e)},isActive:()=>i.getState().ads.billboard.isOpen,minimize:()=>{i.dispatch((0,hE.lb)())},destroy:()=>(i.dispatch((0,hE.c3)()),Promise.resolve())};await e.enable(r);break}case nc.QN.ADS_DISABLED:await e.disable();break;case hE.QN.MINIMIZE_BILLBOARD_AD_VIEW:if(i.getState().ads.sponsoredPlaylist.isVisible)return i.dispatch((0,hE.c3)()),Promise.resolve();e.minimize();break;case hE.QN.CLICK_BILLBOARD_AD_VIEW:e.adClick();break;case hE.QN.IMAGE_LOADED_BILLBOARD_AD_VIEW:e.onRender();break;case hE.QN.ERROR_BILLBOARD_AD_VIEW:e.onError();break;case hE.QN.FINISH_BILLBOARD_AD_VIEW:e.onFinish()}return a};var EE=n(64787);function _E(e){return t=>t=>async n=>{const i=t(n);switch(n.type){case nc.QN.ADS_ENABLED:break;case nc.QN.ADS_DISABLED:case EE.Ws:e.disableLeaderboard();break;case EE.KK:e.setLeaderboardElement(n.element),e.enableLeaderboard();break;case EE.a4:e.onNavigationChanged()}return i}}const yE="SET_AUDIO_AD_INFO",vE=e=>({type:yE,info:e});var bE=n(94784),SE=n(32792);function AE(e,t){return t?{enableAudioIfNotAlreadyEnabled(){if(!t.getEnabled())return t.enable((t=>e.dispatch(vE(t))))},disableAudioIfNotAlreadyDisabled(){if(t.getEnabled())return t.disable()}}:{}}function CE(e,t,n){const i=t.getEvents();return j.Ek()&&i.addListener(SE._.VOLUME,(({data:{volume:e,isLocal:t}})=>{t&&bE.Q.logAudioVolume(e)})),t=>{const{enableAudioIfNotAlreadyEnabled:i,disableAudioIfNotAlreadyDisabled:r}=AE(t,e);return t=>async s=>{const a=t(s);switch(s.type){case nc.QN.ADS_ENABLED:i?.();break;case nc.QN.ADS_DISABLED:r?.();break;case nc.QN.LOG_NOW_PLAYING_AD_CLICK:(0,fE.qc)(n.getState())&&e.logClick(s.eventReason,s.eventSource)}return a}}}var TE=n(99372),IE=n(53247),OE=n(51776);const wE=e=>t=>n=>async i=>{const r=n(i),s=t.getState();switch(i.type){case IE.QN.HPTO_CONTAINER_LOAD:e.subscribeToPreview((e=>{t.dispatch((0,IE.DZ)(e)),t.dispatch((0,IE.zi)())})),e.onRefresh((async()=>{const n=await e.fetchTemplate();t.dispatch((0,IE.bK)(n)),t.dispatch((0,IE.Yg)())}));break;case TE.R:t.dispatch((0,IE.bK)(i.template)),t.dispatch((0,IE.Yg)());break;case IE.QN.HPTO_CONTAINER_MOUNTED:{const n=await e.fetchTemplate();t.dispatch((0,IE.bK)(n)),t.dispatch((0,IE.Yg)());break}case IE.QN.FETCH_CREATIVE:if(s.ads.hpto.preview)break;if(s.ads.hpto.creativeFetchingState===OE.C.FETCHING)break;if(!s.ads.hpto.template)break;if(!s.ads.hpto.hptoContainerMounted)break;if(s.ads.root.isPremium&&s.ads.root.isHptoHidden)break;try{t.dispatch((0,IE.QL)()),await e.fetchCreative(s.ads.hpto.template).then((e=>{t.dispatch((0,IE.Q5)(e))}))}catch(e){console.error(e),t.dispatch((0,IE.Fi)())}break;case IE.t3:e.viewRendered(i.element);break;case IE.QN.HPTO_COMPONENT_NEW_AD_RENDERED:e.logViewed();break;case IE.QN.HPTO_COMPONENT_UNMOUNTED:e.viewDestroyed();break;case nc.QN.ADS_POST_HIDE_HPTO:e.logEvent("event_collapsed");break;case IE.Q6:e.logEvent(i.event,i.context);break;case IE.$4:e.logErrorEvent(i.error);break;case IE.QN.DEBUG_FORCE_REFRESH_HPTO:{const n=await e.fetchTemplate();t.dispatch((0,IE.bK)(n)),t.dispatch((0,IE.Yg)());break}}return r};var NE=n(54165);function RE(e){return t=>n=>async i=>{const r=n(i);switch(i.type){case nc.QN.ADS_ENABLED:e.enable((e=>{t.dispatch((0,NE.Lc)(e))}));break;case nc.QN.ADS_DISABLED:e.disable();break;case NE.Uy:try{const n=await e.requestSponsoredPlaylists();t.dispatch((0,NE.lj)(n))}catch(e){t.dispatch((0,NE.Ei)(e instanceof Error?e:new Error("Unknown error object")))}break;case NE.nk:try{const n=i.playlistUri,r=await e.requestSponsoredPlaylistAd(n);t.dispatch((0,NE.DD)(n,r))}catch(e){t.dispatch((0,NE.wz)(e instanceof Error?e:new Error("Unknown error object")))}break;case NE.zB:e.logEvent(i.message);break;case NE.zc:t.dispatch((0,NE.Lc)(null))}return r}}function PE(e){if(!e)return;const t=e.getElementsByTagName("video"),n=function(e,t){for(const n of e)if(t(n))return n}(t,(e=>"none"!==getComputedStyle(e).display));if(n)return n;const i=t?.[0];return i?(r=i,"none"===getComputedStyle(r).display&&(r.style.display="inline"),i):void 0;var r}const LE=(e,t)=>{if(!t)return;if(!(null===e?.ads?.vto?.info||t.isPaused)){const e=document.getElementsByClassName("VideoPlayer__container")[0];PE(e)?.play()}};var DE=n(30714),kE=n(32641);const xE=(e,t)=>{e.getState().ads.vto.isMinimized||(e.dispatch((0,vm.Oc)()),t.logEvent(DE.ee.COLLAPSED))};function UE(e,t,n){return n?{enableVideoTakeoverIfNotAlreadyEnabled(){if(n.getEnabled())return;const i={onCreated(){e.dispatch((0,vm.Pu)())},onInfo(t){e.dispatch((0,vm.gW)(t))},onFirstReady(){LE(e.getState(),t.getState())},onStarted(){},onEnded:()=>{e.dispatch((0,vm.gW)(null)),e.dispatch((0,vm.W_)()),e.dispatch((0,kE.R)(B.K.none))}};return n.enable(i)},disableVideoTakeoverIfNotAlreadyDisabled(){if(n.getEnabled())return n.disable()}}:{}}const ME=(e,t)=>n=>{const{enableVideoTakeoverIfNotAlreadyEnabled:i,disableVideoTakeoverIfNotAlreadyDisabled:r}=UE(n,t,e);return s=>async a=>{const o=s(a);switch(a.type){case nc.QN.ADS_ENABLED:await(i?.());break;case nc.QN.ADS_DISABLED:await(r?.());break;case vm.QN.VTO_LOG_EVENT:e.logEvent(a.event,a.eventReason,a.eventSource),a.event===DE.ee.CLICKED&&xE(n,e);break;case nc.QN.LOG_NOW_PLAYING_AD_CLICK:(0,fE.Tv)(t.getState())&&(e.logEvent(DE.ee.CLICKED,a.eventReason,a.eventSource),xE(n,e));break;case vm.QN.VTO_NAVIGATION_CHANGE:xE(n,e);break;case vm.QN.MAXIMIZE_VIDEO_AD_VIEW:case vm.QN.MINIMIZE_VIDEO_AD_VIEW:LE(n.getState(),t.getState())}return o}},BE=["/","/premium","/site/:id/:path?","/presents/:id/:path?"],jE=e=>0===e.length?e=>!1:t=>e.some((e=>(0,X.B6)(e,t))),FE="ui.hide_hpto";class VE{constructor(e,t){this.cosmosConnector=e,this.prefs=t}requestPreviewAd(e){return this.cosmosConnector.requestPreviewAd(e)}subscribeToAdsProductState(e){return this.cosmosConnector.subscribeToAdsProductState(e)}subscribeToPremiumState(e){return this.cosmosConnector.subscribeToProductState("catalogue",e)}fakeSubscribe(){}subscribeToHpto(e){const t=FE;return this.prefs.sub({key:t},(({entries:n})=>e({[t]:!!n[t].bool})))}async hideHpto(){const e=FE;await this.prefs.set({entries:{[e]:{bool:!0}}})}}class GE{requestPreviewAd(){return Promise.resolve({})}subscribeToAdsProductState(){return{cancel:()=>{}}}subscribeToPremiumState(){return{cancel:()=>{}}}subscribeToHpto(){return{cancel:()=>{}}}async hideHpto(){}fakeSubscribe(e,t){e(t)}}const HE={subscription:void 0};function WE(e){const t=e?.item??void 0;return(0,W.p)(t)?"audio"===t.mediaType||"mixed"===t.mediaType:!!(0,G.N)(t)&&t.isPodcastAd}const zE=({store:e,adManagers:t,isDesktop:n,playerAPI:i})=>({adsEnabled:r=e.getState().ads.root.adsEnabled,playerState:s=i.getState(),isPodcastContent:a=WE(s)}={})=>{r!==e.getState().ads.root.adsEnabled&&e.dispatch((r?nc.s3:nc.Nb)());const{enableVideoTakeoverIfNotAlreadyEnabled:o,disableVideoTakeoverIfNotAlreadyDisabled:l}=UE(e,i,t?.vto.manager),{enableAudioIfNotAlreadyEnabled:c,disableAudioIfNotAlreadyDisabled:u}=AE(e,t?.audio);return Promise.all(n&&(a||r)?[o?.(),c?.()]:[l?.(),u?.()])};var KE=n(27831),YE=n(9534);const qE=({history:e,isBlockedPath:t,rootApi:n,adManagers:i,isDesktop:r,playerAPI:s})=>a=>{const{handleAdsProductState:o,activateAdsProductStateSubscription:l}=function({rootApi:e,store:t,adManagers:n,isDesktop:i,playerAPI:r,toggleAdManagers:s=zE({store:t,adManagers:n,isDesktop:i,playerAPI:r})}){async function a({playerState:e=r.getState(),isPodcastContent:t=WE(e)}={}){return await s({playerState:e,isPodcastContent:t}),function(...[{ads:n}]){return s({adsEnabled:"1"===n,playerState:e,isPodcastContent:t})}}let o=WE(r.getState());return{handleAdsProductState:a,activateAdsProductStateSubscription:async function(t){const n=WE(t);return null===t||o!==n?(o=n,HE.subscription?.cancel(),HE.subscription=e.subscribeToAdsProductState(await a({playerState:t,isPodcastContent:n}))):HE.subscription}}}({rootApi:n,store:a,adManagers:i,isDesktop:r,playerAPI:s});return s.getEvents().addListener(F.gd.UPDATE,(async({data:e})=>{await l(e)})),i=>async r=>{switch(r.type){case YE.xM:await l(null);break;case KE.O:n.fakeSubscribe(await o(),r.data)}const c=i(r),u=a.getState();if(!u.ads.root.adsEnabled)return c;const d=u.platform.isDesktop,p=d&&u.ads.billboard.isOpen,m=u.ads.sponsoredPlaylist.isVisible,h=u.ads.leaderboard.isEnabled,f=(0,M.c)(u)===B.K.cinemaLegacy;switch(t(e.location.pathname)||(0,fE.Qv)(s.getState())?(p&&a.dispatch((0,hE.ZQ)()),h&&a.dispatch((0,EE.Vp)())):!d||h||p||m||f||a.dispatch((0,EE.yU)()),r.type){case kE.k.SET_VIDEO_UI_FLAG:{const{key:e,value:t}=r;e===B.n.cinemaLegacy&&t&&a.dispatch((0,EE.Vp)());break}case hE.QN.SHOW_BILLBOARD_AD_VIEW:a.dispatch((0,EE.Vp)());break;case NE.Xv:a.dispatch((0,EE.Vp)()),a.dispatch((0,hE.ZQ)());break;case IE.QN.HPTO_PREVIEW_HOME_NAVIGATION:"/"===e.location.pathname||e.push("/");break}return c}};var $E=n(35426);let ZE,QE;const JE=({rootApi:e})=>t=>n=>async i=>{const r=n(i);switch(i.type){case YE.xM:(0,j.My)()===ln.m.Desktop&&(0,$E.z)({_debugForceRefreshHpto:()=>t.dispatch((0,IE.BH)()),overrideSponsoredPlaylistEndpoint:()=>t.dispatch((0,NE.uU)())}),ZE||(ZE=e.subscribeToPremiumState((({catalogue:e})=>{const n="premium"===e;t.dispatch((0,nc.CW)(n))}))),QE||(QE=e.subscribeToHpto((e=>t.dispatch((0,nc.yx)(e["ui.hide_hpto"])))));break;case nc.QN.ADS_POST_HIDE_HPTO:e.hideHpto();break;case KE.O:e.fakeSubscribe((async({catalogue:e})=>{const n="premium"===e;t.dispatch((0,nc.CW)(n)),t.dispatch((0,nc.yx)(!1))}),i.data);break;case nc.QN.TRIGGER_PREVIEW_AD:e.requestPreviewAd(i.adUriHexId)}return r};var XE=n(27241);const e_=(e,t,n,i,r,s)=>{const a=e?new VE(bE.Q,(0,mE.dn)((0,XE.X)())):new GE,o=e?BE:[],{root:l=JE,sponsoredPlaylist:c=RE,orchestrator:u=qE,leaderboard:d=_E,billboard:p=gE,hpto:m=wE,audio:h=CE,videoTakeover:f=ME}=s??{};return[l({rootApi:a}),c(n.sponsoredPlaylist),u({history:t,isBlockedPath:jE(o),rootApi:a,adManagers:n,isDesktop:e,playerAPI:r}),...e?[d(n.leaderboard),p(n.billboard,t,r),m(n.hpto),h(n.audio,i,r),f(n.vto.manager,r)]:[]]},t_={isOpen:!1,imageLoaded:!1,isMinimized:!1,data:{}},n_=(e=t_,t)=>{switch(t.type){case hE.QN.SHOW_BILLBOARD_AD_VIEW:return{...e,isOpen:!0,data:t?.data};case hE.QN.HIDE_BILLBOARD_AD_VIEW:return{...e,isOpen:!1,isMinimized:!1,imageLoaded:!1};case hE.QN.IMAGE_LOADED_BILLBOARD_AD_VIEW:return{...e,imageLoaded:!0};case hE.QN.MANAGER_MINIMIZE_BILLBOARD_AD_VIEW:case hE.QN.MINIMIZE_BILLBOARD_AD_VIEW:return{...e,isMinimized:!0};default:return e}},i_={isEnabled:!1};function r_(e=i_,t){switch(t.type){case EE.TN:return{...e,isEnabled:!0};case EE.Ws:return{...e,isEnabled:!1};default:return e}}const s_={info:null},a_=(e=s_,t)=>t.type===yE?{...e,info:t.info}:e,o_={hptoEnabled:!1,template:null,creative:null,preview:null,creativeFetchingState:OE.C.NOT_FETCHING,hptoContainerMounted:!1,hptoIsStable:!0},l_=(e=o_,t)=>{switch(t.type){case nc.QN.ADS_ENABLED:return{...e,hptoEnabled:!0};case TE.R:case IE.QN.HPTO_CONTAINER_MOUNTED:return{...e,hptoContainerMounted:!0};case IE.QN.HPTO_COMPONENT_UNMOUNTED:return{...e,preview:null,creativeFetchingState:OE.C.NOT_FETCHING,creative:t.data.clearCreative?null:e.creative};case IE.QN.HPTO_CONTAINER_UNMOUNTED:return{...e,hptoContainerMounted:!1};case IE.QN.GOT_TEMPLATE:return{...e,template:t.data};case IE.QN.SET_HPTO_PREVIEW:return{...e,hptoIsStable:!0,preview:t.data};case IE.QN.GOT_CREATIVE:return{...e,creative:t.data,creativeFetchingState:OE.C.FETCHED,hptoIsStable:!0};case IE.QN.FETCHING_CREATIVE:return{...e,creativeFetchingState:OE.C.FETCHING,creative:null};case IE.QN.CREATIVE_FETCH_FAILED:return{...e,creativeFetchingState:OE.C.FAILED,hptoIsStable:!1};default:return e}},c_={sponsoredPlaylist:new Map,isVisible:!1,previewAd:null};function u_(e=c_,t){switch(t.type){case NE.Um:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set("allSponsorships",t.sponsorships)}}(e,t);case NE.Rl:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set(t.playlistUri,t.ad)}}(e,t);case NE.Xv:return{...e,isVisible:!0};case NE.zc:return{...e,isVisible:!1};case NE.Uh:return{...e,previewAd:t.previewAd};default:return e}}const d_={isMinimized:!1,isHidden:!0,info:null},p_=(e=d_,t)=>{switch(t.type){case vm.QN.MINIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!0};case vm.QN.MAXIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!1};case vm.QN.HIDE_VIDEO_AD_VIEW:return{...e,isHidden:!0};case vm.QN.SHOW_VIDEO_AD_VIEW:return{...e,isHidden:!1};case vm.QN.VTO_SET_INFO:return{...e,info:t.info};default:return e}};var m_=n(5545),h_=n(2274);const f_=(0,m_.vy)({adId:null,liked:!1,disliked:!1,feedback:null},(e=>{e.addCase(h_.CJ.LIKE_AD,((e,t)=>{h_.F$.match(t)&&(e.adId=t.payload.adId,e.liked=!0,e.disliked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(h_.CJ.DISLIKE_AD,((e,t)=>{h_.NI.match(t)&&(e.adId=t.payload.adId,e.disliked=!0,e.liked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(h_.CJ.CANCEL_LIKE_AD,((e,t)=>{h_.D$.match(t)&&(e.liked=!1,e.feedback=null)})).addCase(h_.CJ.CANCEL_DISLIKE_AD,((e,t)=>{h_.vA.match(t)&&(e.disliked=!1,e.feedback=null)}))})),g_={adsEnabled:!1,isPremium:!1,isHptoHidden:!0},E_=(e=g_,t)=>{switch(t.type){case nc.QN.ADS_ENABLED:return{...e,adsEnabled:!0};case nc.QN.ADS_DISABLED:return{...e,adsEnabled:!1};case nc.QN.ADS_PREMIUM:return{...e,isPremium:!!t.isPremium};case nc.QN.ADS_HPTO_HIDDEN:return{...e,isHptoHidden:!!t.isHptoHidden};default:return e}};var __=n(65782);const y_={env:__.x,message:null,showPreviewTool:!1},v_=(e=y_,t)=>{switch(t.type){case __.Q.SHOW_IN_APP_MESSAGE:return{...e,message:t.message};case __.Q.DISMISS_IN_APP_MESSAGE:return{...e,message:null};case __.Q.SET_IN_APP_MESSAGING_ENV:return{...e,env:t.env};case __.Q.SHOW_PREVIEW_TOOL:return{...e,showPreviewTool:t.show};default:return e}};var b_=n(99921);const S_=e=>t=>n=>async i=>{const r=n(i);if(i.type===b_.QN.GET_AGE_RESTRICTION_MODAL)try{const n=await e.getDialog(i.uri);t.dispatch((0,b_.eK)(n))}catch{}return r};var A_=n(67485);const C_=e=>t=>n=>{const i=t(n);switch(n.type){case YE.xM:gt((()=>e.dispatch({type:YE.tQ})));break;case YE.tQ:(0,A_.r)(go.n.getInstance()).then((()=>{e.dispatch((0,ba.oM)()),window.location.assign("/")}),((e,t=!1)=>n=>(console.error(n),e&&e(n),t?Promise.reject(n):Promise.resolve(void 0)))())}return i};var T_=n(55569),I_=n.n(T_),O_=n(12620),w_=n(24105),N_=n(42156);const R_="urn:x-cast:com.spotify.chromecast.secure.v1";let P_=!1;const L_=()=>window.cast?.framework.CastContext.getInstance(),D_=e=>I_()(e),k_=(e,t)=>{e.send((0,O_.F)(t))},x_=(e,t,n)=>{if(!window.cast){window.__onGCastApiAvailable=i=>{i&&!P_&&(((e,t,n)=>{const i=L_();i&&(i.setOptions({receiverApplicationId:"CC32E753",autoJoinPolicy:"page_scoped",androidReceiverCompatible:n}),e.dispatch(w_.dK(i.getCastState())),i.addEventListener(window.cast?.framework.CastContextEventType.CAST_STATE_CHANGED,(({castState:t})=>e.dispatch(w_.dK(t)))),i.addEventListener(window.cast?.framework.CastContextEventType.SESSION_STATE_CHANGED,(({sessionState:n,session:i})=>{if(n===window.cast?.framework.SessionState.SESSION_STARTING)k_(t,{step:"transfer_requested"});else if(n===window.cast?.framework.SessionState.SESSION_STARTED){let n=null;i?.getCastDevice()?.friendlyName&&(n=D_(i.getCastDevice().friendlyName)),e.dispatch(w_.$e(n)),k_(t,{step:"receiver_app_started"})}})))})(e,t,n),P_=!0)};const i=document.createElement("script");i.async=!0,i.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.body.appendChild(i)}},U_=async(e,t,n,i)=>{const r=await t.request("https://spclient.wg.spotify.com/device-auth/v1/refresh",{method:"POST",authorize:!0,payload:JSON.stringify({clientId:"d7df0887fb71494ea994202cb473eae7",deviceId:e})});if(null===r.body)throw new Error("Invalid response from device-auth!");((e,t,n)=>{const i={tokenType:"accesstoken",blob:t.accessToken};e.sendMessage(R_,{type:"addUser",payload:i}),k_(n,{step:"message_from_sender"})})(n,JSON.parse(r.body),i)},M_=(e,t,n)=>{const i=L_().getCurrentSession();if(null===i)return;i.addMessageListener(R_,((r,s)=>{const a=JSON.parse(s);k_(n,{step:"message_from_receiver"});try{if("getInfoResponse"===a.type){const t=a.payload;U_(t.deviceID,e,i,n)}else if("addUserResponse"===a.type){const e=a.payload;t.dispatch((0,Ts.VR)(e.deviceId))}else if(a.type.endsWith("Error"))throw new Error(a.payload.status)}catch(e){console.error("Failed to transfer playback to Cast device!",e)}})),((e,t)=>{const n=e.getCastDevice(),i={remoteName:n.friendlyName,deviceID:D_(n.friendlyName),deviceAPI_isGroup:n.capabilities.includes(chrome?.cast?.Capability.MULTIZONE_GROUP)};e.sendMessage(R_,{type:"getInfo",payload:i}),k_(t,{step:"message_from_sender"})})(i,n)};function B_(e,t,n){return i=>r=>s=>{switch(s.type){case YE.xM:x_(i,t,n);break;case w_.gK.TOGGLE_CAST:(()=>{const e=L_();e&&e.requestSession()})();break;case w_.gK.CAST_STATE_CHANGED:((e,t,n,{castState:i})=>{i===window.cast?.framework.CastState.CONNECTED&&M_(e,t,n)})(e,i,t,s);break;case Ts.gK.DEVICE_INFO_CHANGED:((e,t,{deviceInfo:n})=>{if(n&&n.is_active&&(0,N_.Mp)(n.type)){const i=L_()?.getCastState()===window.cast?.framework.CastState.CONNECTED,r=e.getState().playback?.connectingCastDeviceId;i&&n.id===r&&(k_(t,{step:"transfer_finished"}),e.dispatch(w_.iY()))}})(i,t,s)}return r(s)}}var j_=n(495);var F_=n(2963),V_=n(75603),G_=n(71506);const H_=e=>t=>n=>async i=>{const r=n(i);switch(i.type){case F_.QN.CHECK_DUPLICATE_TRACKS:{const{playlistUri:n,uris:r,position:a={after:"end"}}=i;try{const{name:i}=await e.getMetadata(n),o=await e.getContents(n);let l=[...r];if((0,ne._Tv)(r[0])){const e=(0,G_.lY)(go.n.getInstance()),{trackUris:t}=await(0,V_.s)(r[0],0,e);l=t}const c=o.items.map((e=>e?.uri)),{duplicates:u,newUris:d}=(s=c,l.reduce(((e,t)=>{const n=s.includes(t);return{duplicates:n?[...e.duplicates,t]:e.duplicates,newUris:n?e.newUris:[...e.newUris,t]}}),{duplicates:[],newUris:[]}));0===u.length?e.add(n,l,a):1===l.length?t.dispatch((0,F_.xM)({playlistName:i,playlistUri:n,uri:l[0],position:a})):t.dispatch((0,F_.xM)({playlistName:i,playlistUri:n,uris:l,newUris:d,position:a}))}catch(t){e.add(n,r,a),window.console.error(t)}break}}var s;return r},W_=(e,t=!0)=>n=>i=>r=>{const s=i(r),{type:a}=r;if(t&&a===Zs.g.LOG_INTERACTION){const{session:t}=n.getState(),{isAnonymous:i}=t,s=i?(0,ys.o)(r.logData):(0,_s.x)(r.logData);e.send(s)}return s},z_=()=>e=>t=>{const n=e(t);if(t.type===Zs.g.LOG_INTERACTION){const{logData:e}=t;(0,oe.$)(e.action_type,e.action_intent,e.item_id)}return n};var K_=n(32304),Y_=n(68355),q_=n(13338),$_=n(68800),Z_=n(46173),Q_=n(32810);let J_=null,X_=!1;let ey,ty=[],ny=[];const iy=e=>{try{(0,Q_.fE)({metric_type:Y_.MetricTypes.COUNTER,what:"harmony-error",value:1,tags:{type:e}})}catch(e){}},ry=(e,t)=>{const n=e.getState(),{isAnonymous:i}=(0,Ra.Ht)(n);return i?null:((e,t)=>(ey=(0,Z_.gp)(),ey.on(K_.bi.LOCAL_PLAYER_ENABLED,(()=>{const e=(0,$_.bv)();null!==e&&ey.setVolume(e,"@local");try{Vg("playback_load_end");const e=Gg("playback_load_start","playback_load_end","time_to_playback_ready"),[{duration:t}={duration:void 0}]=e;t&&(0,Q_.fE)({metric_type:Y_.MetricTypes.TIMER,what:"playback-ready",value:Y_.Time.fromMillis(t).asNanos()}).catch((()=>({})))}catch(e){}})),ey.on(K_.bi.AUTHENTICATION_ERROR,(()=>{iy(K_.bi.AUTHENTICATION_ERROR)})),ey.on(K_.bi.UNRECOVERABLE_FAILURE,(({data:t})=>{const n=t.error.message||"";if(navigator.userAgent.indexOf("Edge")>-1)e.dispatch(Ts.tS()),(0,tn.UD)(t.error),iy(Ts.gK.CDM_ERROR);else if(t.source===K_.O4.PLAYBACK){const i=t.name||t.error?.name||t.error?.code||"unknown";e.dispatch(Ts.CZ(i,t.source,n))}iy(K_.bi.UNRECOVERABLE_FAILURE)})),ey.on(K_.bi.ERROR,(({data:t})=>{if(t.error.code===K_.Hv.EME_LICENSE_REQUEST_WIDEVINE_ERROR&&e.dispatch(p.rN()),t.error.code===K_.Hv.MEDIA_DECODING_ERROR&&!X_){const n="media_decoding_error",i=t.source,r=t.error.message||"";e.dispatch(Ts.CZ(n,i,r))}const n=t.name||t.error?.name||t.error?.code||"unknown";iy(n)})),ey.on(K_.bi.PLAYER_INITIALIZATION_DONE,(()=>{t.triggerActions(),e.dispatch((0,q_.H2)())})),ey.on(K_.bi.PLAYER_INITIALIZATION_FAILED,(({data:t})=>{if(!navigator.webdriver&&(iy(Ts.gK.CDM_ERROR),t.error)){if(t.error.message&&t.error.message.indexOf("0x80004005")>=0)return;e.dispatch(Ts.tS()),(0,tn.UD)(t.error)}})),ey.on(K_.bi.MAX_SUBSCRIPTIONS_REACHED,(({data:t})=>{e.dispatch(Ts.fj(t.source??"unknown")),iy(K_.bi.MAX_SUBSCRIPTIONS_REACHED)})),ey.on(K_.bi.PRODUCT_STATE_CHANGED,(()=>{})),ey.on(K_.bi.STATE_CHANGED,(e=>{if(e.data.state&&e.data.state.context&&e.data.state.context.uri&&(e.data.state.context.uri=e.data.state.context.uri.replace(/:user:([^:]+):playlist:/g,":playlist:")),0===ty.length)try{Vg("playback_load_update"),ty=Gg("playback_load_start","playback_load_update","time_to_playback_fetched");const[{duration:e}={duration:void 0}]=ty;e&&(0,Q_.fE)({metric_type:Y_.MetricTypes.TIMER,what:"playback-fetched",value:Y_.Time.fromMillis(e).asNanos()}).catch((()=>({})))}catch(e){}!e.data.state?.paused&&ny.length})),ey.on(K_.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(t=>{const n=t.data.deviceInfo;n&&e.dispatch(Ts.rD(n))})),ey.on(K_.bi.PROGRESS,(()=>{X_=!0})),ey))(e,t)};var sy=n(23660),ay=n(87672),oy=n(35035);const ly="STORE_SEARCH",cy="SEARCH_HISTORY_CLEAR_DATA",uy=()=>e=>t=>{if(t.type===cy)localStorage.removeItem(Oc.C);return e(t)};var dy=n(36941);const py=()=>e=>t=>async n=>{const i=t(n);if(n.type===dy.gK.REQUEST_SEO_EXPERIMENT_DATA)try{const t=await(r=go.n.getInstance(),s=`/${(0,ne.o_h)(n.uri).toURLPath()}`,r.build().withHost(Eo.Go).withHostIdentifier("https://open.spotify.com").withPath("/seo").withQueryParameters({entityURL:s}).withoutMarket().withoutAuthorization().withEndpointIdentifier("/seo").send());e.dispatch((0,dy.Jz)(t?.body))}catch(t){e.dispatch((0,dy.jG)())}var r,s;return i},my=e=>()=>t=>n=>{const i=t(n);if(n.type===YE.tQ)e(n);return i};function hy(e){return t=>n=>i=>{const r=n(i);switch(i.type){case YE.tQ:{e.finalFlush(),t.dispatch((0,Ts.MW)()),t.dispatch({type:cy});const n=document.getElementById("session");n&&n.remove();break}}return r}}let fy=!1;const gy=(e,t)=>{const n=e.getEvents();return e=>(n.addListener(F.gd.ACTION,(n=>{const i=e.getState(),r=Km(),s=null!==r&&!1===r?.seen;fy||n.data.action!==F.Ik.PLAY||(fy=!0,s&&(fy=!0,function(e){const t=encodeURIComponent(JSON.stringify({seen:e})),n=Km();null!==n&&n.seen===e||(0,mt.n0)({name:Gm,days:30,domain:".spotify.com",value:t})}(!0),t.send(Wm(i.session.isAnonymous,{country:i.session.userCountry,os:(0,Ks.f)()})),e.dispatch((0,p.mi)())))})),e=>t=>e(t))},Ey=()=>e=>t=>{const n=e(t);switch(t.type){case p.gK.ENTER_FULLSCREEN:document.documentElement.classList.add("fullscreen");break;case p.gK.LEAVE_FULLSCREEN:document.documentElement.classList.remove("fullscreen")}return n};var _y=n(6045);const yy={isOpen:!1},vy=(e=yy,t)=>{switch(t.type){case _y.QN.SHOW_ABOUT_RECS_MODAL:return{...e,isOpen:!0};case _y.QN.HIDE_ABOUT_RECS_MODAL:return{...e,isOpen:!1};default:return e}};var by=n(80453);const Sy={isOpen:!1},Ay=(e=Sy,t)=>{switch(t.type){case by.QN.SHOW_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!0};case by.QN.HIDE_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!1};default:return e}},Cy={isOpen:!1,uri:"",dialog:void 0},Ty=(e=Cy,t)=>{switch(t.type){case b_.QN.SHOW_AGE_RESTRICTION_MODAL:return{...e,isOpen:!0,dialog:t.dialog};case b_.QN.GET_AGE_RESTRICTION_MODAL:return{...e,uri:t.uri};case b_.QN.HIDE_AGE_RESTRICTION_MODAL:return{...e,isOpen:!1};default:return e}},Iy={isOpen:!1,playlistUri:void 0,uri:void 0,uris:void 0,position:void 0,playlistName:void 0,newUris:void 0},Oy=(e=Iy,t)=>{switch(t.type){case F_.QN.SHOW_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!0,playlistUri:t.playlistUri,uri:t.uri,uris:t.uris,position:t.position,playlistName:t.playlistName,newUris:t.newUris};case F_.QN.HIDE_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!1};default:return e}},wy={ads:!1},Ny=(e,t)=>(t.type,e||wy);var Ry=n(33061);const Py={isOpen:!1},Ly=(e=Py,t)=>{switch(t.type){case Ry.QN.SHOW_LICENSES_MODAL:return{...e,isOpen:!0};case Ry.QN.HIDE_LICENSES_MODAL:return{...e,isOpen:!1};default:return e}},Dy=e=>{const t=(0,j.My)();return{isBrowser:t===ln.m.Web,isPWA:t===ln.m.PWA,isDesktop:t===ln.m.Desktop,shouldCalloutPWA:(0,j.wD)(),isDeveloperMode:e.isDeveloperMode,isVideoSupported:e.isVideoSupported,isWebPSupported:e.isWebPSupported}},ky=e=>(t=Dy(e),n)=>n.type===u?Dy(e):t;const xy={device:null,castState:n(40217).xP.NO_DEVICES_AVAILABLE,connectingCastDeviceId:null},Uy=(e,t)=>{const n=t.deviceInfo;return n&&isNaN(n.volume)&&(n.volume=0),{...e,device:n}},My=(e,t)=>({...e,castState:t.castState}),By=(e,t)=>({...e,connectingCastDeviceId:t.deviceId}),jy=e=>({...e,connectingCastDeviceId:null}),Fy=e=>((0,$_.C0)(),{...e}),Vy=(()=>{const e={[Ts.gK.DEVICE_INFO_CHANGED]:Uy,[Ts.gK.PLAYBACK_CLEAR_DATA]:Fy,[w_.gK.CAST_STATE_CHANGED]:My,[w_.gK.SET_CONNECTING_CAST_DEVICE_ID]:By,[w_.gK.RESET_CONNECTING_CAST_DEVICE_ID]:jy};return(t,n)=>{let i=null;return n.type in e&&(i=e[n.type](i||t,n)),i||t||xy}})(),Gy="searchHistory",Hy={contexts:(()=>{const e=localStorage.getItem(Gy);return e?JSON.parse(e).filter((e=>"uri"in e)):[]})()},Wy=(e=Hy,t)=>{switch(t.type){case ly:{const n=t.uri?((e,t,n,i)=>[{uri:e,name:t,image:n}].concat(i.filter((t=>t.uri!==e))).splice(0,4))(t.uri,t.name,t.image,e.contexts):e.contexts;try{localStorage.setItem(Gy,JSON.stringify(n))}catch(e){}return{...e,contexts:n}}case cy:return localStorage.removeItem(Gy),{...e,contexts:[]};default:return e}},zy={},Ky=(e=zy,t)=>{switch(t.type){case dy.gK.REQUEST_SEO_EXPERIMENT_DATA:return{...e,uri:t.uri};case dy.gK.SET_SEO_EXPERIMENT_DATA:return{...e,...t.data};default:return e}},Yy={isAnonymous:!0,accessToken:"",accessTokenExpirationTimestampMs:0,user:null,locale:Zm.h.en,productState:null,market:"",valid:!1,overrides:null};function qy(e=Yy,t){switch(t.type){case KE.J:return{...e,user:t.data};case KE.O:return{...e,productState:t.data};case YE.ro:return{...e,accessToken:t.authData.accessToken,accessTokenExpirationTimestampMs:t.authData.accessTokenExpirationTimestampMs,isAnonymous:t.authData.isAnonymous,valid:!0};case YE.Zz:return e.user?{...e,user:{...e.user,display_name:t.name}}:e;case YE.L0:return e.user?{...e,user:{...e.user,images:t.images}}:e;case YE.Vx:return{...e,overrides:{...e.overrides,country:t.country}};case YE.dD:return{...e,overrides:{...e.overrides,locale:t.locale}};default:return e}}const $y=e=>!(e.type===q_.l_.PLAY||e.type===q_.l_.PLAYING),Zy=e=>!(e.type===q_.l_.PLAY||e.type===q_.l_.USER_INVESTMENT),Qy=e=>t=>n=>i=>{const r=n(i);switch(i.type){case q_.Jf:{const{storeAction:t,actionIntent:n}=i;e.storeAction((e=>((e,t)=>{const{type:n}=t;switch(n){case q_.l_.PLAY:return[t];case q_.l_.PLAYING:return[...e.filter($y),t];case q_.l_.USER_INVESTMENT:return[...e.filter(Zy),t];default:return[t]}})(e,{storeAction:t,type:n})));break}case q_.f6:{const n=e.pullAction()||null;t.dispatch({type:"PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",had:!!n&&n.length>0}),n&&n.forEach((({storeAction:e})=>{t.dispatch(e)}));break}}return r},Jy=e=>{return(0,dE.HY)({playback:Vy,session:qy,ui:(0,es.JQ)(e),searchHistory:Wy,features:Ny,duplicateTracks:Oy,ageRestriction:Ty,platform:ky(e),ads:(t=e.container,(0,dE.HY)({sponsoredPlaylist:u_,leaderboard:r_,root:E_,adFeedback:f_,...t===ln.m.Desktop?{billboard:n_,hpto:l_,vto:p_,audio:a_}:{}})),inAppMessaging:v_,aboutRecs:vy,seoExperiment:Ky,...e.container===ln.m.Desktop&&{aboutSpotify:Ay,licenses:Ly}});var t},Xy=dE.Zz,ev=(e,t)=>{const{session:n,features:i}=e,{actionStoreApi:r,adManagers:s,ageRestrictionApi:a,deferredAction:o,eventSender:l,followApi:c,history:u,libraryApi:d,offlineApi:m,platform:h,playbackApi:f,playerApi:g,playlistApi:E,rootlistApi:_,serviceWorkerMessenger:y,socialConnectApi:v,transport:b}=t,S=Hg(h),A=[];S?A.push((e=>()=>t=>n=>{const i=t(n);return n.type===YE.tQ&&e.finalFlush().finally(j_.r),i})(l)):(n?.isAnonymous||A.push((e=>t=>n=>i=>{const r=n(i),s=t.getState(),a=s.session;if(i.type in Ts.gK){const{hasOccurred:e,isOpen:n}=t.getState().ui.playbackNotSupportedErrorDialog;if(e&&!n)return t.dispatch(p.rN()),r}switch(i.type){case YE.xM:!J_&&a.accessToken&&(J_=ry(t,e),t.getState().features&&t.getState().features.mwp&&window.addEventListener("focus",(()=>{J_&&J_._controller&&!J_._controller._state?J_=ry(t,e):J_?.getCurrentState().then((n=>{n||(J_=ry(t,e))}))})));break;case Ts.gK.SET_ACTIVE_DEVICE:s.playback.device&&s.playback.device.id===i.id||J_?.transfer(i.id)}return r})(r)),A.push(C_),A.push(B_(b,l,h.enableCastConnect)));const C="boolean"!=typeof i?.isInteractionLoggerEnabled||i.isInteractionLoggerEnabled;return[(0,ws.oU)(g,d,_,c,r),(I=m,e=>(I.getEvents().addListener(ay.I.ERROR,(t=>{t.data.code===oy.O4.DEVICE_LIMIT_REACHED&&e.dispatch((0,p.j4)())})),e=>async t=>{e(t)})),(T=u.push,e=>t=>n=>{const{pathname:i,search:r,hash:s}=window.location,{dispatch:a}=e,o=e.getState(),l=new RegExp(se),{OPEN_SIGNUP_PROMPT_DIALOG:c,CLOSE_SIGNUP_PROMPT_DIALOG:u,UPDATE_UI_HISTORY_STATE:d}=p.gK;switch(n.type){case c:T({pathname:i,search:r,state:{},hash:se});break;case u:T({pathname:i,search:r,state:{},hash:""});break;case d:(0,re.GP)(o)&&!l.test(s)&&a((0,p.BU)())}return t(n)}),Qy(o),...A,...e_(S,u,s,f,g),my(y),S_(a),H_(E),hy(l),Ey,(0,sy.f0)(u,g,v),uy,W_(l,C),z_,gy(g,l),py(),pE.A];var T,I};class tv{constructor(e){this.spotifyTransport=e}async getDialog(e){const t=await((e,t)=>e.build().withMethod("GET").withHost(Eo.d).withPath(`/dialog/${t}`).withEndpointIdentifier("/dialog/${uri}").withoutMarket().send())(this.spotifyTransport,e),{r:n,g:i,b:r}=this.getColorRGB(t.body.color);return{backgroundColor:`rgb(${n}, ${i}, ${r})`,providerUrl:t.body.provider_url}}getColorRGB(e){return{r:e>>>16&255,g:e>>>8&255,b:e>>>0&255}}}var nv=n(67781);const iv=(e,t)=>{let n=[];return{storeAction:i=>{n=i(n),e.setItem(t,JSON.stringify(n))},pullAction:()=>{const i=e.getItem(t);if(e.removeItem(t),n=[],i)try{return JSON.parse(i)}catch(e){return null}return null}}};var rv=n(20817),sv=n(17121),av=n(99146);var ov=n(61985),lv=n(43281),cv=n(78565),uv=n(35685),dv=n(55303),pv=n(97265),mv=n(99277);const hv=e=>{const t=e.pathname.split("/"),n=t.pop(),i=t.pop();if(i&&n)return(0,ne.o_h)(`spotify:${i}:${n}`)?.toURI()};var fv=n(3367);const gv=[{regExp:/^\/$/,pageIdentifier:"/home"},{regExp:/^\/genre/,pageIdentifier:"/genre"},{regExp:/^\/view/,pageIdentifier:"/view"},{regExp:/^\/browse/,pageIdentifier:"/browse"},{regExp:/^\/search/,pageIdentifier:"/search"},{regExp:/^\/upsell/,pageIdentifier:"/upsell"},{regExp:/^\/collection/,pageIdentifier:"/collection"},{regExp:/^\/artist/,pageIdentifier:"/artist"},{regExp:/^\/playlist/,pageIdentifier:"/playlist"},{regExp:/^\/album/,pageIdentifier:"/album"},{regExp:/^\/episode/,pageIdentifier:"/episode"},{regExp:/^\/show/,pageIdentifier:"/show"},{regExp:/^\/user/,pageIdentifier:"/user"},{regExp:/^\/track/,pageIdentifier:"/track"},{regExp:/^\/concerts/,pageIdentifier:"/concerts"},{regExp:/^\/concert\//,pageIdentifier:"/concert"},{regExp:/^\/made-for-you/,pageIdentifier:"/made-for-you"},{regExp:/^\/prerelease/,pageIdentifier:"/prerelease"}],Ev=(e="")=>{const t=gv.find((({regExp:t})=>t.test(e)));return t?.pageIdentifier??"unknown"};n(48261);async function _v(e,t,n){const i=(0,tn.sV)();if(null===e||null===t)return null===e&&i.setUser({id:"anonymous",username:"anonymous"}),void(null===t&&i.setTag("product","logged_out"));const r=(0,j.My)(),s=await pv.V.hash(e.username);switch(r){case ln.m.Desktop:i.setUser({id:s});break;case ln.m.Web:case ln.m.PWA:{const e=(0,Si.C)("config");e?.correlationId&&i.setUser({id:e.correlationId})}}var a;i.setTag("product",t.product),n.dispatch((a={country:t.country,uri:e.uri,id:e.username,display_name:e.displayName||void 0,images:e.images.map((({url:e,width:t,height:n})=>({url:e,width:t||null,height:n||null}))),product:t.product,policies:{opt_in_trial_premium_only_market:"1"===t["opt-in-trial-premium-only-market"]},type:"user",avatarBackgroundColor:e.avatarBackgroundColor},{type:KE.J,data:a})),n.dispatch(function(e){return{type:KE.O,data:e}}(t))}function yv(){if(Yg()){const e="xpui_2025-01-13_1736790015473_5eaa090";(0,tn.ig)($g,e,Qg(),(0,j.My)(),function(){const e=[];return e.push((0,Wg.Z)()),e.push((0,zg.jS)({useEffect:_.useEffect,useLocation:ae.zy,useNavigationType:ae.wQ,createRoutesFromChildren:ae.AV,matchRoutes:X.ue})),e}())}}Vg("playback_load_start"),(0,a.Cd)(),async function(){yv();const e=await async function(){const e=(0,j.My)();{const{createPlatformDesktop:t}=await Promise.resolve().then(n.bind(n,60948));return t(e)}}(),t=e.getFeatureFlags(),m=e.getRegistry(),h=e.getSession(),f=e.getHistory(),g=e.getSEOExperiments(),_=m.resolve(Zu.u);Ai.M.setup(),(0,Bg.O)(e.container,e.operatingSystem);const y=e.getEventSender();_.getEvents().addListener("message",(e=>{e.data.type===Jc.W.NAVIGATION&&async function(e,t){if(!t)return;const n=cE(t);if(!n)return;const{url:i}=n;if(lE(i)){const t=e.resolve(Xg.KM);aE(n,t)}await uE(e,n);const r=`${i.pathname}${i.search}`;e.resolve(Xg.Fi).push(r,{referrer:"deeplink"})}(m,e.data.data)})),(0,av.X)()&&!t.mwp&&(window.location.href="https://www.spotify.com");const{gtmId:v,market:b,locale:S,userCountry:A}=(0,Si.C)("config"),C=Hg(e),T=e.getTransport(),I=await e.getServiceWorkerMessenger(),O=m.resolve(jg.JD),w=m.resolve(Fg.t),R=m.resolve(rv.Ho),P=m.resolve(sv.v),D=m.resolve(ov.B),k=m.resolve(lv.H),x=m.resolve(eE.Ki),U=m.resolve(cv.Yi),M=m.resolve(uv.j),B=m.resolve(nv.T),F=function(e,t){const{platform:n}=t,i=ev(e,t);return(0,dE.y$)(Jy(n),e,Xy((0,dE.Tw)(...i)))}({session:h,features:t,seoExperiment:g},{platform:e,history:f,playbackApi:D,playerApi:k,rootlistApi:U,playlistApi:x,followApi:w,libraryApi:R,actionStoreApi:O,serviceWorkerMessenger:I,offlineApi:P,transport:T,eventSender:y,adManagers:e.getAdManagers(),deferredAction:iv(sessionStorage,"ANONYMOUS_DEFERRED_ACTION_KEY"),ageRestrictionApi:new tv(go.n.getInstance()),socialConnectApi:M});T.on(l.TransportEvent.ACCESS_TOKEN,(async()=>{const e=await B.getToken({preferCached:!0});null!==e&&(go.n.setSession(e),F.dispatch((0,ba.a7)(e)))}));let V=!1;T.on(l.TransportEvent.RECONNECTING,(()=>{V=!0})),T.on(l.TransportEvent.RECONNECTED,(()=>{V=!1})),T.on(l.TransportEvent.AUTHENTICATION_FAILED,(async()=>{if(!V&&!C){const e=await B.getToken({preferCached:!0});null!==e&&e.isAnonymous||F.dispatch((0,ba.wH)())}})),(0,Q_.q6)("desktop-web-player",T),function(){Y_.BrowserMetrics.getPageLoadTime().then((e=>{(0,Q_.fE)({metric_type:Y_.MetricTypes.TIMER,what:"time-to-page-load-nanoseconds",value:(0,Y_.asNanoseconds)(Y_.Time.fromMillis(e).asNanos()),tags:{route:Ev(window.location.pathname)}})})).catch((()=>{})),Y_.BrowserMetrics.getTimeToFirstPaint().then((e=>{(0,Q_.fE)({metric_type:Y_.MetricTypes.TIMER,what:"time-to-first-paint-nanoseconds",value:(0,Y_.asNanoseconds)(Y_.Time.fromMillis(e).asNanos()),tags:{route:Ev(window.location.pathname)}})})).catch((()=>{})),Y_.BrowserMetrics.getTimeToFirstContentfulPaint().then((e=>{(0,Q_.fE)({metric_type:Y_.MetricTypes.TIMER,what:"time-to-first-contentful-paint-nanoseconds",value:(0,Y_.asNanoseconds)(Y_.Time.fromMillis(e).asNanos()),tags:{route:Ev(window.location.pathname)}})})).catch((()=>{}));const e=e=>{(0,Q_.fE)(Y_.BrowserMetrics.getWebVitalsMetric({...e,label:e.name},{route:Ev(window.location.pathname)}))};(0,fv.lt)(e),(0,fv.IN)(e),(0,fv.fK)(e),(0,fv.rH)(e),(0,fv.zB)(e),(0,fv.Ck)(e)}(),C||(()=>{const e=new URL(window.location.href);return oE(e)||((t=e).searchParams.has("utm_source")||t.searchParams.has("utm_medium")||t.searchParams.has("utm_campaign"))&&!(e=>"/"===e.pathname&&"pwa_install"===e.searchParams.get("utm_source"))(e)||!(e=>"/"===e.pathname||"/__noul__"===e.pathname||/\/intl-[A-Za-z][A-Za-z]$/.test(e.pathname))(e);var t})()&&((e,t)=>{const n=new URL(window.location.href),i=n.searchParams.get("dlsi")||sE(),r={link:window.location.href,entity_uri:hv(n),source:window.navigator.userAgent,deeplink_session_id:i};t?e.send((0,mv.W)(r)):e.send((0,nE.N)(r))})(y,h.isAnonymous);const G=c.Ru.getLocaleForTranslation();if(F.dispatch((0,ba.Hh)()),F.dispatch((0,d.zA)(G)),C){document.documentElement.setAttribute("lang",G)}(e=>{const t=window.matchMedia("(display-mode: standalone)");t.addEventListener?t.addEventListener("change",(t=>e(t.matches))):t.addListener((t=>e(t.matches)))})((()=>{F.dispatch({type:u})})),function(e,t){const n=[];let i=0;n.push(e.location),e.listen(((e,r)=>{r===Ug.push&&(i+=1,n.splice(i),n.push(e)),r===Ug.pop&&(i=n.findIndex((t=>t.key===e.key))),r===Ug.replace&&n.splice(i,1,e),t(Mg(i,n))})),t(Mg(i,n))}(f,(e=>{F.dispatch((0,p.hp)(e))})),await _v(e.initialUser,e.initialProductState,F);const H=(0,Jg.e)(!0);(0,dv.lM)(),(0,i.H)(H).render((0,N.jsx)(s.Gu,{configuration:null,children:(0,N.jsx)(E.s,{onError:e=>(0,tn.Jy)(e,"App"),Fallback:L,children:(0,N.jsx)(xg,{store:F,platform:e})})})),!C&&v&&(0,o.track)({dataLayerPushInitial:!0,googleTagManagerId:v,language:S?.locale,market:b,loggedIn:!h.isAnonymous,oneTrust:"1"===((0,mt.v8)("client-web_one-trust")??"1"),userCountry:A}),(0,Bg.W)(e.operatingSystem)&&F.dispatch((0,p.Kk)()),(0,a.Lj)("UI init phase is done for logged-in experience"),h.isAnonymous||y.send((0,r._)({width:window.outerWidth,height:window.outerHeight,mode:0,duration:0}),{flush:!1})}().catch((e=>{(0,tn.OV)(e),console.error(e);const t=(0,Jg.e)(!0);(0,i.H)(t).render((0,N.jsx)(s.Gu,{configuration:null,children:(0,N.jsx)(L,{})}))}))},47095:(e,t,n)=>{"use strict";n.d(t,{Hf:()=>a,Mo:()=>s,as:()=>m,oI:()=>p,xy:()=>d});var i=n(30758),r=n(86070);const s=e=>({type:"SET_BACKGROUND_COLOR",color:e}),a=()=>({type:"CLEAR_BACKGROUND_COLOR"});function o(e,t){switch(t.type){case"SET_BACKGROUND_COLOR":return{backgroundColor:t.color};case"CLEAR_BACKGROUND_COLOR":return{backgroundColor:null}}return e}const l={backgroundColor:null},c=(0,i.createContext)(null),u=(0,i.createContext)(null),d=({children:e})=>{const[t,n]=(0,i.useReducer)(o,l);return(0,r.jsx)(u.Provider,{value:t,children:(0,r.jsx)(c.Provider,{value:n,children:e})})};function p(){const e=(0,i.useContext)(u);if(null===e)throw new Error("Trying to use 'BackgroundColorContext' without 'BackgroundColorProvider'!");return e}function m(){const e=(0,i.useContext)(c);if(null===e)throw new Error("Trying to use 'BackgroundColorDispatchContext' without 'BackgroundColorDispatchProvider'!");return e}},71151:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,l:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useCollectionPlatformAPI must be used within a CollectionPlatformAPIProvider");return e}},13087:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var i=n(97330),r=n(30157);function s(){return(0,r.N)(i.u)}},31684:(e,t,n)=>{"use strict";n.d(t,{G:()=>o,m:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useEqualizerAPI must be used within a EqualizerProvider");return e}},20375:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,n:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({children:e,instance:t})=>(0,r.jsx)(s.Provider,{value:t,children:e}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("usePictureInPictureContext() must be used within a PictureInPictureProvider");return e}},29064:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,J:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({platformData:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t})},82162:(e,t,n)=>{"use strict";n.d(t,{P:()=>u,g:()=>d});var i=n(30758),r=n(14343),s=n(92336),a=n(95273),o=n(62021),l=n(86070);const c=(0,i.createContext)(null),u=({children:e,configuration:t})=>{const[n,i]=(0,o.x)(a.e,s.Vk.empty().toJSON()),u=s.Vk.merge(t,s.Vk.fromJSON(n));return(0,l.jsx)(c.Provider,{value:{localConfiguration:u,remoteConfiguration:t,setOverrides:e=>i(s.Vk.merge(s.Vk.fromJSON(n),e).toJSON()),clearOverrides:()=>i(s.Vk.empty().toJSON())},children:(0,l.jsx)(r.Gu,{configuration:u,children:e})})};function d(){const e=(0,i.useContext)(c);if(null===e)throw new Error("Please wrap your component in RemoteConfigProviderWithOverrides");return e}},60393:(e,t,n)=>{"use strict";n.d(t,{$R:()=>o,Iu:()=>d,dB:()=>u,n5:()=>c,s0:()=>a,zK:()=>l});var i=n(91008),r=n(31417),s=n(7307);const a=[{url:"https://misc.scdn.co/liked-songs/liked-songs-64.jpg",width:64,height:64},{url:"https://misc.scdn.co/liked-songs/liked-songs-300.jpg",width:300,height:300},{url:"https://misc.scdn.co/liked-songs/liked-songs-640.jpg",width:640,height:640}];function o(e){if(!e)return null;const t=(0,i.fHB)(e).toURI();return{type:s.c.LIKED_SONGS,uri:t,...l()}}function l(){return{images:a,name:r.Ru.get("sidebar.liked_songs")}}function c(e){const t=(0,i.fHB)(e??void 0,"your-episodes").toURI();return{type:s.c.YOUR_EPISODES,uri:t,...u()}}function u(){return{images:[{url:"https://misc.scdn.co/your-episodes/SE-64.jpg",width:64,height:64},{url:"https://misc.scdn.co/your-episodes/SE-300.jpg",width:300,height:300},{url:"https://misc.scdn.co/your-episodes/SE-640.jpg",width:640,height:640}],name:r.Ru.get("sidebar.your_episodes")}}function d(){return{type:s.c.LOCAL_FILES,uri:"spotify:collection:local-files",images:[],name:r.Ru.get("local-files")}}},2092:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,N:()=>s});var i=n(21020);const r=i.uX,s=i.uX},75411:(e,t,n)=>{"use strict";n.d(t,{G:()=>c,_:()=>u});var i=n(30758),r=n(9856),s=n.n(r),a=n(44577);var o=n(86070);const l=(0,i.createContext)(void 0),c=({children:e,overrides:t})=>{const n=(0,i.useMemo)((()=>({supportsDragAndDrop:t?.supportsDragAndDrop??(!1!==s().getParser(window.navigator.userAgent).satisfies({"Microsoft Edge":">=17"})&&!(0,a.g)())})),[t?.supportsDragAndDrop]);return(0,o.jsx)(l.Provider,{value:n,children:e})},u=()=>{const e=(0,i.useContext)(l);if(!e)throw new Error("useUICapabilities() must be used within ");return e}},64281:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var i=n(12989),r=n(97500),s=n.n(r),a=n(86070);const o=({text:e,ariaLabel:t=e,title:n=t,className:r,icon:o,...l})=>(0,a.jsxs)("span",{"aria-label":t,className:s()(i.A.container,r),title:n,...l,children:[o&&(0,a.jsx)(o,{size:"xsmall",className:i.A.icon}),(0,a.jsx)("span",{className:i.A.text,children:e})]})},99041:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var i=n(31417),r=n(64281),s=n(97500),a=n.n(s),o=n(12989),l=n(86070);const c=({className:e,fullText:t=!1})=>(0,l.jsx)(r.E,{ariaLabel:i.Ru.get("card.a11y.explicit"),text:t?i.Ru.get("card.a11y.explicit"):"E",className:a()(o.A.nonShrinkableBadge,e)})},32255:(e,t,n)=>{"use strict";n.d(t,{b:()=>A,u:()=>S});var i=n(30758),r=n(97500),s=n.n(r),a=n(22984),o=n(69624);const l="G22LIjgkDtQEFpyBZcDo",c="g3kBhX1E4EYEC2NFhhxG",u="O5_0cReFdHe81E0xFAD1",d="H71KtIrytVayf_dFofu7",p="SBpny8HrUTBzSjk7Vtk1",m="CxurIfvXVb_TqGF4q8Yf",h="OadpZJiOaGfX6Qp4j6n5",f="iJp40IxKg6emF6KYJ414",g="vreceNX3ABcxyddeS83B",E="Ozitxbqs1vcOukDz3GDw",_="AeEoI6ueagbJtaHl2cRd";var y=n(97844),v=n(86070);const b=({title:e,type:t,className:n,iconSize:i})=>(0,v.jsx)("div",{"aria-label":e,className:s()(E,n),children:(0,v.jsx)(y.s,{type:t,className:s()({[_]:!i}),size:i})});let S=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e}({});const A=(0,i.memo)((function({loadingMode:e="lazy",fadeIn:t=!1,type:n,title:i,images:r=[],shape:E=S.SQUARE,size:_=o.Qe.SIZE_56,iconSize:y,className:A,onContextMenu:C=(()=>{}),onTouchStart:T=(()=>{}),onTouchEnd:I=(()=>{}),color:O}){const w=function(e=[]){const t=e.filter((e=>Boolean(e.width))),n=t.filter((e=>e.url&&e.width&&e.width>=o.BZ[o.Qe.SIZE_56])).sort(((e,t)=>e.width-t.width));return n.length?n:t}(r),N=w[0]?.url??r[0]?.url??"",R=w.map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", ");return(0,v.jsx)("div",{className:s()(g,A,{[h]:E===S.CIRCLE,[m]:E===S.SQUARE,[l]:o.fn.includes(_),[c]:o.zr.includes(_),[u]:o.pM.includes(_),[d]:o.JT.includes(_),[p]:o.B4.includes(_)}),onContextMenu:C,onTouchStart:T,onTouchEnd:I,style:{width:`${o.BZ[_]}px`,height:`${o.BZ[_]}px`,"--extracted-entity-color":O},children:(0,v.jsx)(a._,{loading:e,fadeIn:t,src:N,alt:i,ariaHidden:!0,className:s()(f),srcSet:R||void 0,testid:"entity-image",children:(0,v.jsx)(b,{title:i,type:n,iconSize:y})})})}))},69624:(e,t,n)=>{"use strict";n.d(t,{B4:()=>c,BZ:()=>r,JT:()=>l,Qe:()=>i,fn:()=>s,pM:()=>o,zr:()=>a});let i=function(e){return e[e.SIZE_16=0]="SIZE_16",e[e.SIZE_20=1]="SIZE_20",e[e.SIZE_24=2]="SIZE_24",e[e.SIZE_32=3]="SIZE_32",e[e.SIZE_40=4]="SIZE_40",e[e.SIZE_48=5]="SIZE_48",e[e.SIZE_56=6]="SIZE_56",e[e.SIZE_64=7]="SIZE_64",e[e.SIZE_72=8]="SIZE_72",e[e.SIZE_80=9]="SIZE_80",e[e.SIZE_88=10]="SIZE_88",e[e.SIZE_96=11]="SIZE_96",e[e.SIZE_104=12]="SIZE_104",e[e.SIZE_112=13]="SIZE_112",e[e.SIZE_120=14]="SIZE_120",e[e.SIZE_128=15]="SIZE_128",e[e.SIZE_136=16]="SIZE_136",e[e.SIZE_144=17]="SIZE_144",e[e.SIZE_152=18]="SIZE_152",e[e.SIZE_160=19]="SIZE_160",e[e.SIZE_168=20]="SIZE_168",e[e.SIZE_176=21]="SIZE_176",e[e.SIZE_184=22]="SIZE_184",e[e.SIZE_200=23]="SIZE_200",e[e.SIZE_232=24]="SIZE_232",e}({});const r={[i.SIZE_16]:16,[i.SIZE_20]:20,[i.SIZE_24]:24,[i.SIZE_32]:32,[i.SIZE_40]:40,[i.SIZE_48]:48,[i.SIZE_56]:56,[i.SIZE_64]:64,[i.SIZE_72]:72,[i.SIZE_80]:80,[i.SIZE_88]:88,[i.SIZE_96]:96,[i.SIZE_104]:104,[i.SIZE_112]:112,[i.SIZE_120]:120,[i.SIZE_128]:128,[i.SIZE_136]:136,[i.SIZE_144]:144,[i.SIZE_152]:152,[i.SIZE_160]:160,[i.SIZE_168]:168,[i.SIZE_176]:176,[i.SIZE_184]:184,[i.SIZE_200]:200,[i.SIZE_232]:232},s=[i.SIZE_16,i.SIZE_20,i.SIZE_24],a=[i.SIZE_32,i.SIZE_40,i.SIZE_48,i.SIZE_56,i.SIZE_64],o=[i.SIZE_72,i.SIZE_80,i.SIZE_88,i.SIZE_96,i.SIZE_104,i.SIZE_112,i.SIZE_120,i.SIZE_128],l=[i.SIZE_136,i.SIZE_144,i.SIZE_152,i.SIZE_160,i.SIZE_168,i.SIZE_176],c=[i.SIZE_184,i.SIZE_200,i.SIZE_232]},97844:(e,t,n)=>{"use strict";n.d(t,{s:()=>p});var i=n(5765),r=n(27163),s=n(81162),a=n(90694),o=n(58920),l=n(26758),c=n(17978),u=n(7307),d=n(86070);function p({type:e,...t}){let n=i.e;switch(e){case"folder":case u.c.FOLDER:n=r.h;break;case"album":case u.c.ALBUM:n=s.I;break;case"artist":case u.c.ARTIST:n=a.r;break;case"show":case"episode":case u.c.SHOW:case u.c.EPISODE:n=o.L;break;case"user":case u.c.USER:n=l.v;break;case"book":case"audiobook":case u.c.AUDIOBOOK:n=c.l;break;case"playlist":case u.c.PLAYLIST:default:n=i.e}return(0,d.jsx)(n,{"aria-hidden":"true","data-testid":e,...t})}},11153:(e,t,n)=>{"use strict";n.d(t,{E:()=>d});var i=n(30758),r=n(97500),s=n.n(r),a=n(20489);const o=(e,t)=>{const{getMinimumColumnWidth:n}=e,i=((e,t)=>{const{getMinimumColumnWidth:n}=e,{gridWidth:i,columnGap:r}=t;return Math.max(1,Math.floor((i+r)/(n(t)+r)))})(e,t);return{minColumnWidth:n(t),columnCount:i}};var l=n(39332),c=n(99644),u=n(86070);const d=(0,i.memo)((0,i.forwardRef)((function(e,t){const{className:n,colGap:r,rowGap:d,render:p,onLayoutChange:m,testId:h="container",useUniformRowHeight:f=!1,rowCount:g}=e,E=(0,i.useRef)(null),_=(0,a.R)(),y=r?parseInt(r,10):0;(0,i.useImperativeHandle)(t,(()=>E.current),[E]);const[v,b]=(0,i.useState)({minColumnWidth:-1,columnCount:-1});(0,i.useEffect)((()=>{m?.(v)}),[m,v]);const S=(0,i.useCallback)((e=>{const t=o(_,{gridWidth:e,columnGap:y});b(t)}),[y,_]);(0,c.w)({refOrElement:E,observeOnly:"width",onResize:({width:e})=>{S(e)}}),(0,i.useLayoutEffect)((()=>{E.current&&S(E.current.offsetWidth)}),[S]);const A={"--min-column-width":`${v.minColumnWidth}px`},C=g&&isFinite(g);return(0,u.jsx)("div",{"data-testid":`grid-${h}`,ref:E,className:s()(l.A.gridContainer,n,{[l.A.uniformRowHeight]:f,[l.A.withFiniteRowCount]:C}),style:{...A,...C?{"--row-count":`${g}`}:{},...d?{gridRowGap:d}:{},...r?{gridColumnGap:r}:{}},children:p(v)})})))},20489:(e,t,n)=>{"use strict";n.d(t,{R:()=>l,x:()=>o});var i=n(30758),r=n(42795),s=n(86070);const a=i.createContext((0,r.s1)(r.yV.DEFAULT)),o=({children:e,config:t})=>(0,s.jsx)(a.Provider,{value:t,children:e}),l=()=>(0,i.useContext)(a)},19862:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var i=n(34766),r=n(31417),s=n(86070);function a(e){return(0,s.jsx)(i.H,{"aria-label":r.Ru.get("a11y.externalLink"),...e})}},18663:(e,t,n)=>{"use strict";n.d(t,{q:()=>l});var i=n(31417),r=n(97500),s=n.n(r);const a="b9IoEwefwqIXREBlif2g";var o=n(86070);const l=({size:e=32,className:t})=>(0,o.jsxs)("svg",{role:"img",width:e,height:e,viewBox:"0 0 12 12",className:s()(a,t),"aria-label":i.Ru.get("age.restriction.nineeteen-badge"),children:[(0,o.jsx)("path",{fill:"#B3B3B3",d:"M4.607 9V3.328h-.96c-.112.592-.68 1.04-1.496 1.064v.752h1.36V9h1.096zm3.82-3.848c0 .616-.488 1.008-1.04 1.008-.568 0-1.04-.384-1.04-1.008 0-.608.48-1 1.04-1 .552 0 1.04.4 1.04 1zm-3 3.656c.288.184.84.312 1.312.312 1.92 0 2.92-1.208 2.92-3.256 0-1.8-1.049-2.656-2.249-2.656-1.208 0-2.144.816-2.144 1.976 0 1.192.92 1.904 1.952 1.904.64 0 1.136-.272 1.352-.632-.056 1.048-.72 1.696-1.84 1.696-.384 0-.8-.12-1.016-.24l-.288.896z"}),(0,o.jsx)("g",{transform:"scale(0.85) translate(1.1,1.1)",children:(0,o.jsx)("path",{fill:"#CD1A2B",d:"M6 11.2A5.2 5.2 0 01.8 6H-.8A6.8 6.8 0 006 12.8v-1.6zM11.2 6A5.2 5.2 0 016 11.2v1.6A6.8 6.8 0 0012.8 6h-1.6zM6 .8A5.2 5.2 0 0111.2 6h1.6A6.8 6.8 0 006-.8V.8zM6-.8A6.8 6.8 0 00-.8 6H.8A5.2 5.2 0 016 .8V-.8z"})})]})},22984:(e,t,n)=>{"use strict";n.d(t,{_:()=>m});var i=n(30758),r=n(97500),s=n.n(r);const a="mMx2LUixlnN_Fu45JpFB",o="yOKoknIYYzAE90pe7_SE",l="Yn2Ei5QZn19gria6LjZj";var c=n(73152),u=n(86070);function d(e){if(null!==e)return e}const p=({children:e,loading:t})=>"lazy"!==t||"undefined"==typeof HTMLImageElement||"loading"in HTMLImageElement.prototype?(0,u.jsx)(u.Fragment,{children:e}):(0,u.jsx)(c.b,{children:e}),m=(0,i.memo)((function(e){const{ariaHidden:t=!1,testid:n,src:r,alt:c="",radius:m=0,className:h="",srcSet:f,draggable:g=!1,sizes:E,children:_,loading:y,width:v,height:b,fadeIn:S=!1,onLoad:A}=e,[C,T]=(0,i.useState)("loading"),I=(0,i.useRef)(null),[O,w]=(0,i.useState)(S);return(0,i.useLayoutEffect)((()=>{S&&I.current?.complete&&w(!1)}),[S]),r&&"error"!==C?(0,u.jsx)(p,{loading:y,children:(0,u.jsx)("img",{"aria-hidden":t,draggable:g,loading:y,src:r,"data-testid":n,alt:c,className:s()(a,h,{[o]:O,[l]:"loaded"===C}),style:{borderRadius:m||void 0},srcSet:f,sizes:E,width:d(v),height:d(b),onLoad:()=>{T("loaded"),A?.()},onError:()=>T("error"),ref:I})}):(0,u.jsx)(u.Fragment,{children:_})}))},44672:(e,t,n)=>{"use strict";n.d(t,{pZ:()=>o});var i=n(30147),r=n(86070);const s=i.zz.Provider,a=i.zz.Consumer,o=({value:e,index:t,children:n})=>(0,r.jsx)(a,{children:i=>{let a=""===i?e:`${i}/${e}`;return"number"==typeof t&&(a=`${a}/${t}`),(0,r.jsx)(s,{value:a,children:n})}})},73152:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var i=n(30758),r=n(21743);const s="VvxVxrxVVFjUD6BNsUub";var a=n(86070);const o=(0,i.memo)((function(e){const{children:t}=e,[n,o]=(0,i.useState)(!1),{ref:l,inView:c}=(0,r.Wx)({triggerOnce:!0});return(0,i.useEffect)((()=>{c&&o(!0)}),[c]),(0,a.jsx)("div",{className:n?void 0:s,ref:l,children:n?t:null})}))},48486:(e,t,n)=>{"use strict";n.d(t,{e:()=>f});var i=n(30758),r=n(71217),s=n(42871),a=n(22949);const o='a[href], button, input[role="searchbox"], input[type="range"], [role="button"]',l='[role="menuitem"],\n [role="menuitemradio"],\n [role="menuitemcheckbox"]';function c(e,t,n){if(!e)return void console.error("No menu element found. Canceling moving focus");if(!(0,a.fk)(e))return;const i=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,a.MS)(i,d(e,i,r.O.UP,n)),t===r.O.DOWN&&(0,a.MS)(i,d(e,i,r.O.DOWN,n)),t===r.O.RIGHT&&(0,a.MS)(i,u(i)),t===r.O.LEFT&&(0,a.MS)(i,function(e){const t=!!e.closest('ul[role="menu"] ul[role="menu"]');if(!t)return null;let n=e.closest('ul[role="menu"]')?.closest('li[role="presentation"]')?.querySelector(l)??null;if(!n){const t=e.closest('ul[role="menu"]')?.id;t&&(n=document.querySelector(`[aria-controls="${t}"]`)?.closest(l)??null)}return n}(i))}function u(e){if(!e?.closest(l)?.hasAttribute("aria-expanded"))return null;let t=e.closest('li[role="presentation"]').querySelector('ul[role="menu"]');if(!t){const n=e.closest('[role="menuitem"][aria-controls]')?.getAttribute("aria-controls");n&&(t=document.querySelector(`#${n}[role="menu"]`))}const n=t?.querySelector(o);return n??null}function d(e,t,n,i){const s=t.closest('ul[role="menu"]'),a=t.closest('li[role="presentation"]');if(!s||!a)return t;let l=t;const c=i?.(e,t,n);if(c)return c;if(n===r.O.UP){const t=s.querySelectorAll(':scope > li[role="presentation"]');let n=a.previousElementSibling;for(document.activeElement===e&&(n=t[t.length-1]);n!==a&&(n||(n=t[t.length-1]),l=n.querySelector(o),!l);)n=n.previousElementSibling}else{let t=a.nextElementSibling;for(document.activeElement===e&&(t=s.querySelector("li"));t!==a&&(t||(t=s.querySelector("li")),l=t.querySelector(o),!l);)t=t.nextElementSibling;l=t.querySelector(o)}return l||t}var p=n(33689),m=n(6217),h=n(86070);const f=({getInitialFocusElement:e,onKeyDown:t,onClose:n,onFocusVerticalItem:o,...l})=>{const d=(0,i.useRef)(null);(0,m.s)(),(0,s.i)({ref:d,getFocusElement:e,onFocus:e=>{(0,a.MS)(null,e,{preventScroll:!0})}});const f=(0,i.useCallback)((e=>{var i;d.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation()),"Escape"!==e.key&&"Tab"!==e.key||n?.(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===e.key&&c(d.current,r.O.UP,o),"ArrowDown"===e.key&&c(d.current,r.O.DOWN,o),"ArrowLeft"===e.key&&c(d.current,r.O.LEFT),"ArrowRight"===e.key&&c(d.current,r.O.RIGHT),"Enter"===e.key&&(i=d.current)&&u(i.querySelector('[tabindex="0"]'))&&(e.preventDefault(),c(d.current,r.O.RIGHT)),t?.(e))}),[o,t,n]);return(0,h.jsx)(p.Q,{ref:d,onKeyDown:f,...l})}},39464:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var i=n(30758),r=n(60749),s=n(86070);const a=(0,i.forwardRef)(((e,t)=>{const n=e.as,{testid:i,...a}=e;return n?(0,s.jsx)(n,{ref:t,...a}):a.href?(0,s.jsx)("a",{ref:t,"data-testid":i,...a}):a.to?(0,s.jsx)(r.k2,{ref:t,...a}):(0,s.jsx)("button",{"data-testid":i,ref:t,...a})}))},88091:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});var i=n(30758),r=n(73891),s=n(86070);const a=({children:e,...t})=>{const n=(0,i.useRef)(null);return(0,r.g)(n),(0,s.jsx)("li",{ref:n,role:"presentation",...t,children:e})}},33689:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var i=n(30758),r=n(86070);const s=i.forwardRef((function({children:e,depth:t=0,...n},i){return(0,r.jsx)("ul",{tabIndex:-1,ref:i,role:"menu","data-depth":t,...n,children:e})}))},77141:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var i=n(40157),r=n.n(i),s=n(86070);const a=e=>(0,s.jsx)(r(),{...e})},27102:(e,t,n)=>{"use strict";n.d(t,{IF:()=>c,ZY:()=>d,ox:()=>u});var i=n(30758),r=n(87150),s=n(88506),a=n(81489),o=n(86070);const l=(0,i.createContext)(null),c=({handle:e,children:t})=>{const n=(0,s.A)({key:"sp-emotion-css",container:e?.document.head});return(0,o.jsx)(l.Provider,{value:e??null,children:(0,o.jsx)(r.ID,{target:e?.document?.head,children:(0,o.jsx)(a.C,{value:n,children:t})})})};function u(){const e=(0,i.useContext)(l);return"undefined"==typeof window?null:e??window}function d(){const e=u();return e?.document??null}},98822:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,U:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useRequestBuilder must be used within a RequestBuilderProvider");return e}},33449:(e,t,n)=>{"use strict";n.d(t,{d:()=>o,q:()=>l});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a={dynamicColors:null};function o({dynamicColors:e,children:t}){const n=(0,i.useMemo)((()=>e?{dynamicColors:e}:a),[e]);return(0,r.jsx)(s.Provider,{value:n,children:t})}function l(){const e=(0,i.useContext)(s);return null===e?a:e}},82846:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=n(73301),r=n(72191),s=n(33449),a=n(30758);function o({contrast:e}){const{dynamicColors:t}=(0,s.q)();return(0,a.useMemo)((()=>{if(!t)return null;const n=(0,i.r6)((0,r.c)(t,e));return(0,r.I)(n)}),[t,e])??null}},23300:(e,t,n)=>{"use strict";n.d(t,{g:()=>m});var i=n(14343),r=n(50486),s=n(3773),a=n(46131),o=n(27483),l=n(81834),c=n(27963),u=n(43329),d=n(85907),p=n(30758);function m(e,t){const n=(0,i.NC)(u.HO),{request:m}=(0,p.useContext)(l.j);return(0,r.I)({enabled:n&&e.length>0&&e.every((e=>!!e)),queryKey:["useFetchDynamicColorsByUris",...e],gcTime:864e5,staleTime:432e5,placeholderData:t?.placeholderData,queryFn:async()=>{const t=await(0,c.c)(m,a.DO,{imageUris:e}),n=t?.data,i=n?.dynamicColors.at(0);if(!i)throw new s.t("Empty response");switch(i.__typename){case"GenericError":throw new s.t(`Invalid response ${t}`);case"DynamicColors":break;default:(0,d.d)(i)}return(0,o.V)(i.dark)},select:e=>n?e:null})}},32999:(e,t,n)=>{"use strict";n.d(t,{_:()=>f,dZ:()=>h,yd:()=>m});var i=n(30758),r=n(14343),s=n(96566),a=n(43329),o=n(63096),l=n(86070);const c=(0,i.createContext)({optimizeImage:e=>e});let u=function(e){return e.ALBUM_COVER="ab67616d",e.PLAYLIST="ab67706c",e.ARTIST_AVATAR="ab676161",e.PODCAST_COVER="ab676563",e.AUDIOBOOK_COVERS="ab676663",e.PUFFIN="ab671fcc",e}({});const d={[u.ALBUM_COVER]:{defaultGroup:{"00004851":64,"00001e02":300,"0000b273":640},webp:{"000011eb":64,"0000e1a3":300,"0000aa54":640}},[u.PLAYLIST]:{defaultGroup:{"00006c11":64,"0000da84":300,"0000bebb":640},webp:{"0000dec5":64,"0000d72c":300,"000097ac":640}},[u.ARTIST_AVATAR]:{defaultGroup:{"0000f178":160,"00005174":320,"0000e5eb":640},webp:{"0000101f":160,"0000939b":320,"000086f7":640}},[u.PODCAST_COVER]:{defaultGroup:{"0000f68d":64,"00005f1f":300,"0000ba8a":640},webp:{"0000955f":64,"0000bdcf":300,"0000eeee":640}},[u.AUDIOBOOK_COVERS]:{defaultGroup:{"0000703b":64,"0000db5b":300,"000022a8":640},webp:{"00000c35":64,"000076bd":300,"0000382d":640}},[u.PUFFIN]:{defaultGroup:{"00009fbb":375,"00009256":750,"00005e4e":1125},webp:{"0000372b":375,"00002d5b":750,"0000980d":1125}}},p=(0,s.g)(u);const m=({isWebPSupported:e,children:t})=>{const n=(0,r.NC)(a._E,{loadingValue:!1}),s=(0,i.useCallback)(((t,i)=>{if(!n)return t;const r=!0===navigator.connection?.saveData;return function(e,t,n){const[i,r,s,a,o]=e?.match(g)??[];if(p(s)){const e=function(e,t,n,{supportsWebP:i,devicePixelRatio:r=1}={}){const s=d[e]??{},{defaultGroup:a,webp:o}=s;if(t in a||t in o){let e="defaultGroup";if(i&&(e="webp"),n){const i=Object.entries(s[e]);for(const[e,t]of i)if(t>=n*r)return e;return i.at(-1)?.[0]??t}}return t}(s,a,t,n);if(e!==a){return`${r}${s}${e}${o}`}}return e}(t,i,{supportsWebP:e,isSaveDataEnabled:r,devicePixelRatio})}),[n,e]),o=(0,i.useMemo)((()=>({optimizeImage:s})),[s]);return(0,l.jsx)(c.Provider,{value:o,children:t})};function h(){return(0,i.useContext)(c).optimizeImage}function f(){const e=h();return(0,i.useCallback)(((t,n)=>{if(t?.length){const i=t[0].url,r=e(i,n);if(r!==i)return[{url:r}]}const i=(0,o.g)(t,{desiredSize:n});return i?[i]:t}),[e])}const g=/^(https:\/\/i\.scdn\.co\/image\/|spotify:image:)([0-9a-f]{8})([0-9a-f]{8})(.*)$/},37842:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var i=n(30157),r=n(50993);const s=()=>(0,i.N)(r.m)},19640:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var i=n(30157),r=n(61767);function s(){return(0,i.N)(r.O)}},77153:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,S:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)(null),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useSingAlongAPI must be used within a SingAlongAPIProvider");return e}},19464:(e,t,n)=>{"use strict";n.d(t,{F:()=>c,a:()=>l});var i=n(30758),r=n(10565),s=n(6149),a=n(64629),o=n(86070);const l=(0,i.createContext)(null),c=({children:e})=>{const t=(0,r.d)(),[n,c]=(0,i.useState)(t.getCurrentSession());return(0,s.J)(a.K.UPDATE,(({data:e})=>{c(e)})),(0,o.jsx)(l.Provider,{value:n,children:e})}},23442:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,f:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)(void 0),a=({value:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBIEventLocation() must be used within a UBIEventLocationContextProvider");return e}},83327:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});var i=n(30758),r=n(23442),s=n(86070);const a=i.memo((function({spec:e,children:t}){const n=(0,i.useMemo)((()=>e?.getAbsoluteLocation()??null),[e]);return(0,s.jsx)(r.a,{value:n,children:t})}))},62152:(e,t,n)=>{"use strict";n.d(t,{k7:()=>l,oQ:()=>c});var i=n(30758),r=n(40504),s=n(33329),a=n(86070);const o=(0,i.createContext)(void 0),l=({children:e})=>{const t=(0,s.s)(),n=(0,i.useMemo)((()=>new r.J(t)),[t]);return(0,a.jsx)(o.Provider,{value:n,children:e})},c=()=>(0,i.useContext)(o)},33329:(e,t,n)=>{"use strict";n.d(t,{V:()=>a,s:()=>o});var i=n(30758),r=n(86070);const s=(0,i.createContext)(void 0),a=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBILogger() must be used within a UBILoggerContextProvider");return e}},78774:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(21549),r=n(36749);const s=e=>(0,i.r)(r.F,{data:{uri:e}})},50671:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var i=n(30758),r=n(62152),s=n(88308);const a=(e,t=!0)=>{const n=(0,r.oQ)(),a=(0,i.useRef)(null),o=(0,i.useMemo)((()=>{if(t)return e?.impression()}),[t,e]);return(0,s.Ij)((()=>{if(a.current&&n&&o){return n.addToObservableEntities({impression:()=>o,element:a.current})||void 0}}),[n,o]),(0,i.useCallback)((e=>{a.current=e}),[])}},21549:(e,t,n)=>{"use strict";n.d(t,{r:()=>l});var i=n(30758),r=n(88308),s=n(23442),a=n(33329),o=n(83327);const l=(e,t)=>{const n=(0,a.s)(),l=(0,s.f)(),c=(0,r.lB)((()=>({...t,parentAbsoluteLocation:t.parentAbsoluteLocation??l})),[t,l]);return{spec:(0,i.useMemo)((()=>e(c)),[e,c]),logger:n,UBIFragment:o.r}}},77567:(e,t,n)=>{"use strict";n.d(t,{b:()=>u});var i=n(32941);class r{get(e){return{}[e]}}const s=()=>new r;let a=s();function o(){return a}let l={},c=function(e,t){const{enableBrotliCDNExperiment:n}=t||{},i=n?"__BROTLI_CDN_FILE_URLS__":"__CDN_FILE_URLS__",r='{"animations/plus-deselected-confetti-white.json":"/animations/plus-deselected-confetti-white.json","animations/plus-selected-confetti-white.json":"/animations/plus-selected-confetti-white.json","animations/puffin-onboarding-tour-1.json":"/animations/puffin-onboarding-tour-1.json","animations/puffin-onboarding-tour-2.json":"/animations/puffin-onboarding-tour-2.json","fonts/spoticon_regular_2.ttf":"/fonts/spoticon_regular_2.ttf","fonts/spoticon_regular_2.woff":"/fonts/spoticon_regular_2.woff","fonts/spoticon_regular_2.woff2":"/fonts/spoticon_regular_2.woff2","images/ac-row-placeholder.png":"/images/ac-row-placeholder.png","images/ac-row-placeholder.webp":"/images/ac-row-placeholder.webp","images/audiobooks-upsell.png":"/images/audiobooks-upsell.png","images/concert-hub-fb-card.png":"/images/concert-hub-fb-card.png","images/concert-hub-twitter-card.png":"/images/concert-hub-twitter-card.png","images/desktop-auth-check.svg":"/images/desktop-auth-check.svg","images/desktop-auth-error.svg":"/images/desktop-auth-error.svg","images/device-picker-equaliser-animation.webp":"/images/device-picker-equaliser-animation.webp","images/devices/mac.png":"/images/devices/mac.png","images/download-badges/apple/ar.svg":"/images/download-badges/apple/ar.svg","images/download-badges/apple/az.svg":"/images/download-badges/apple/az.svg","images/download-badges/apple/bg.svg":"/images/download-badges/apple/bg.svg","images/download-badges/apple/cs_CZ.svg":"/images/download-badges/apple/cs_CZ.svg","images/download-badges/apple/da.svg":"/images/download-badges/apple/da.svg","images/download-badges/apple/de.svg":"/images/download-badges/apple/de.svg","images/download-badges/apple/ee.svg":"/images/download-badges/apple/ee.svg","images/download-badges/apple/el.svg":"/images/download-badges/apple/el.svg","images/download-badges/apple/en.svg":"/images/download-badges/apple/en.svg","images/download-badges/apple/es_mx.svg":"/images/download-badges/apple/es_mx.svg","images/download-badges/apple/es.svg":"/images/download-badges/apple/es.svg","images/download-badges/apple/fi.svg":"/images/download-badges/apple/fi.svg","images/download-badges/apple/fp.svg":"/images/download-badges/apple/fp.svg","images/download-badges/apple/fr_ca.svg":"/images/download-badges/apple/fr_ca.svg","images/download-badges/apple/fr.svg":"/images/download-badges/apple/fr.svg","images/download-badges/apple/he.svg":"/images/download-badges/apple/he.svg","images/download-badges/apple/hu.svg":"/images/download-badges/apple/hu.svg","images/download-badges/apple/id.svg":"/images/download-badges/apple/id.svg","images/download-badges/apple/int.svg":"/images/download-badges/apple/int.svg","images/download-badges/apple/it.svg":"/images/download-badges/apple/it.svg","images/download-badges/apple/ja.svg":"/images/download-badges/apple/ja.svg","images/download-badges/apple/ko.svg":"/images/download-badges/apple/ko.svg","images/download-badges/apple/lt.svg":"/images/download-badges/apple/lt.svg","images/download-badges/apple/lv.svg":"/images/download-badges/apple/lv.svg","images/download-badges/apple/ms.svg":"/images/download-badges/apple/ms.svg","images/download-badges/apple/mt.svg":"/images/download-badges/apple/mt.svg","images/download-badges/apple/nb.svg":"/images/download-badges/apple/nb.svg","images/download-badges/apple/nl.svg":"/images/download-badges/apple/nl.svg","images/download-badges/apple/pl.svg":"/images/download-badges/apple/pl.svg","images/download-badges/apple/pt_br.svg":"/images/download-badges/apple/pt_br.svg","images/download-badges/apple/pt.svg":"/images/download-badges/apple/pt.svg","images/download-badges/apple/ro.svg":"/images/download-badges/apple/ro.svg","images/download-badges/apple/ru.svg":"/images/download-badges/apple/ru.svg","images/download-badges/apple/sk.svg":"/images/download-badges/apple/sk.svg","images/download-badges/apple/sl.svg":"/images/download-badges/apple/sl.svg","images/download-badges/apple/sv.svg":"/images/download-badges/apple/sv.svg","images/download-badges/apple/th_TH.svg":"/images/download-badges/apple/th_TH.svg","images/download-badges/apple/tr.svg":"/images/download-badges/apple/tr.svg","images/download-badges/apple/vi_VN.svg":"/images/download-badges/apple/vi_VN.svg","images/download-badges/apple/zh_HANS.svg":"/images/download-badges/apple/zh_HANS.svg","images/download-badges/apple/zh_HANT.svg":"/images/download-badges/apple/zh_HANT.svg","images/download-badges/google/af.svg":"/images/download-badges/google/af.svg","images/download-badges/google/am.svg":"/images/download-badges/google/am.svg","images/download-badges/google/ar.svg":"/images/download-badges/google/ar.svg","images/download-badges/google/az.svg":"/images/download-badges/google/az.svg","images/download-badges/google/be.svg":"/images/download-badges/google/be.svg","images/download-badges/google/bg.svg":"/images/download-badges/google/bg.svg","images/download-badges/google/bn.svg":"/images/download-badges/google/bn.svg","images/download-badges/google/bs.svg":"/images/download-badges/google/bs.svg","images/download-badges/google/ca.svg":"/images/download-badges/google/ca.svg","images/download-badges/google/cr.svg":"/images/download-badges/google/cr.svg","images/download-badges/google/cs_CZ.svg":"/images/download-badges/google/cs_CZ.svg","images/download-badges/google/da.svg":"/images/download-badges/google/da.svg","images/download-badges/google/de.svg":"/images/download-badges/google/de.svg","images/download-badges/google/el.svg":"/images/download-badges/google/el.svg","images/download-badges/google/en.svg":"/images/download-badges/google/en.svg","images/download-badges/google/es_419.svg":"/images/download-badges/google/es_419.svg","images/download-badges/google/es.svg":"/images/download-badges/google/es.svg","images/download-badges/google/et.svg":"/images/download-badges/google/et.svg","images/download-badges/google/eu.svg":"/images/download-badges/google/eu.svg","images/download-badges/google/fa.svg":"/images/download-badges/google/fa.svg","images/download-badges/google/fi.svg":"/images/download-badges/google/fi.svg","images/download-badges/google/fp.svg":"/images/download-badges/google/fp.svg","images/download-badges/google/fr_ca.svg":"/images/download-badges/google/fr_ca.svg","images/download-badges/google/fr.svg":"/images/download-badges/google/fr.svg","images/download-badges/google/gl.svg":"/images/download-badges/google/gl.svg","images/download-badges/google/gu.svg":"/images/download-badges/google/gu.svg","images/download-badges/google/he.svg":"/images/download-badges/google/he.svg","images/download-badges/google/hi.svg":"/images/download-badges/google/hi.svg","images/download-badges/google/hr.svg":"/images/download-badges/google/hr.svg","images/download-badges/google/hu.svg":"/images/download-badges/google/hu.svg","images/download-badges/google/hy.svg":"/images/download-badges/google/hy.svg","images/download-badges/google/id.svg":"/images/download-badges/google/id.svg","images/download-badges/google/int.svg":"/images/download-badges/google/int.svg","images/download-badges/google/is.svg":"/images/download-badges/google/is.svg","images/download-badges/google/it.svg":"/images/download-badges/google/it.svg","images/download-badges/google/ja.svg":"/images/download-badges/google/ja.svg","images/download-badges/google/ka.svg":"/images/download-badges/google/ka.svg","images/download-badges/google/kk.svg":"/images/download-badges/google/kk.svg","images/download-badges/google/km.svg":"/images/download-badges/google/km.svg","images/download-badges/google/kn.svg":"/images/download-badges/google/kn.svg","images/download-badges/google/ko.svg":"/images/download-badges/google/ko.svg","images/download-badges/google/ky.svg":"/images/download-badges/google/ky.svg","images/download-badges/google/lo.svg":"/images/download-badges/google/lo.svg","images/download-badges/google/lt.svg":"/images/download-badges/google/lt.svg","images/download-badges/google/lv.svg":"/images/download-badges/google/lv.svg","images/download-badges/google/mk.svg":"/images/download-badges/google/mk.svg","images/download-badges/google/ml.svg":"/images/download-badges/google/ml.svg","images/download-badges/google/mn.svg":"/images/download-badges/google/mn.svg","images/download-badges/google/mr.svg":"/images/download-badges/google/mr.svg","images/download-badges/google/ms.svg":"/images/download-badges/google/ms.svg","images/download-badges/google/my.svg":"/images/download-badges/google/my.svg","images/download-badges/google/nb.svg":"/images/download-badges/google/nb.svg","images/download-badges/google/ne.svg":"/images/download-badges/google/ne.svg","images/download-badges/google/nl.svg":"/images/download-badges/google/nl.svg","images/download-badges/google/pa.svg":"/images/download-badges/google/pa.svg","images/download-badges/google/pl.svg":"/images/download-badges/google/pl.svg","images/download-badges/google/pt_br.svg":"/images/download-badges/google/pt_br.svg","images/download-badges/google/pt.svg":"/images/download-badges/google/pt.svg","images/download-badges/google/ro.svg":"/images/download-badges/google/ro.svg","images/download-badges/google/ru.svg":"/images/download-badges/google/ru.svg","images/download-badges/google/si.svg":"/images/download-badges/google/si.svg","images/download-badges/google/sk.svg":"/images/download-badges/google/sk.svg","images/download-badges/google/sl.svg":"/images/download-badges/google/sl.svg","images/download-badges/google/sq.svg":"/images/download-badges/google/sq.svg","images/download-badges/google/sr.svg":"/images/download-badges/google/sr.svg","images/download-badges/google/sv.svg":"/images/download-badges/google/sv.svg","images/download-badges/google/sw.svg":"/images/download-badges/google/sw.svg","images/download-badges/google/ta.svg":"/images/download-badges/google/ta.svg","images/download-badges/google/te.svg":"/images/download-badges/google/te.svg","images/download-badges/google/th_TH.svg":"/images/download-badges/google/th_TH.svg","images/download-badges/google/tr.svg":"/images/download-badges/google/tr.svg","images/download-badges/google/ua.svg":"/images/download-badges/google/ua.svg","images/download-badges/google/ur.svg":"/images/download-badges/google/ur.svg","images/download-badges/google/uz.svg":"/images/download-badges/google/uz.svg","images/download-badges/google/vi_VN.svg":"/images/download-badges/google/vi_VN.svg","images/download-badges/google/zh_HANS.svg":"/images/download-badges/google/zh_HANS.svg","images/download-badges/google/zh_HANT.svg":"/images/download-badges/google/zh_HANT.svg","images/download-badges/google/zh_hk.svg":"/images/download-badges/google/zh_hk.svg","images/download-badges/google/zu.svg":"/images/download-badges/google/zu.svg","images/download-page-image-mac.png":"/images/download-page-image-mac.png","images/download-page-image.png":"/images/download-page-image.png","images/equaliser-animated-green.gif":"/images/equaliser-animated-green.gif","images/equaliser-animated-white.gif":"/images/equaliser-animated-white.gif","images/equaliser-green.svg":"/images/equaliser-green.svg","images/equaliser-white.svg":"/images/equaliser-white.svg","images/error-page-logo.svg":"/images/error-page-logo.svg","images/expanded-mask-rtl.png":"/images/expanded-mask-rtl.png","images/expanded-mask.png":"/images/expanded-mask.png","images/favicon.ico":"/images/favicon.ico","images/favicon.png":"/images/favicon.png","images/favicon16.png":"/images/favicon16.png","images/favicon32.png":"/images/favicon32.png","images/feature-activation-shelf-audio-quality.png":"/images/feature-activation-shelf-audio-quality.png","images/feature-activation-shelf-blend.png":"/images/feature-activation-shelf-blend.png","images/feature-activation-shelf-group-sessions.png":"/images/feature-activation-shelf-group-sessions.png","images/feature-activation-shelf-live-events.png":"/images/feature-activation-shelf-live-events.png","images/focused_stroy_play.png":"/images/focused_stroy_play.png","images/group-session-logo.svg":"/images/group-session-logo.svg","images/icons/Spotify_1024.png":"/images/icons/Spotify_1024.png","images/icons/Spotify_128.png":"/images/icons/Spotify_128.png","images/icons/Spotify_16.png":"/images/icons/Spotify_16.png","images/icons/Spotify_256.png":"/images/icons/Spotify_256.png","images/icons/Spotify_32.png":"/images/icons/Spotify_32.png","images/icons/Spotify_512.png":"/images/icons/Spotify_512.png","images/icons/Spotify_MWP_192.png":"/images/icons/Spotify_MWP_192.png","images/icons/Spotify_MWP_384.png":"/images/icons/Spotify_MWP_384.png","images/icons/Spotify_MWP_512.png":"/images/icons/Spotify_MWP_512.png","images/logo-complete-black.svg":"/images/logo-complete-black.svg","images/mando_helmet_felix.png":"/images/mando_helmet_felix.png","images/mando_helmet.png":"/images/mando_helmet.png","images/mask-rtl.png":"/images/mask-rtl.png","images/mask.png":"/images/mask.png","images/microsoft-store-download-button.svg":"/images/microsoft-store-download-button.svg","images/mid-year.png":"/images/mid-year.png","images/mwp-episodelist-placeholder.png":"/images/mwp-episodelist-placeholder.png","images/mwp-tracklist-placeholder.png":"/images/mwp-tracklist-placeholder.png","images/og-socialsession-preview.png":"/images/og-socialsession-preview.png","images/s2l-desktopui-ltr.png":"/images/s2l-desktopui-ltr.png","images/s2l-desktopui-rtl.png":"/images/s2l-desktopui-rtl.png","images/s2l-mobileui.png":"/images/s2l-mobileui.png","images/stranger-things-nether-bottom-left.png":"/images/stranger-things-nether-bottom-left.png","images/stranger-things-nether-bottom-right.png":"/images/stranger-things-nether-bottom-right.png","images/stranger-things-spores.png":"/images/stranger-things-spores.png","images/sw_saber_ahsoka1.png":"/images/sw_saber_ahsoka1.png","images/sw_saber_anakin.png":"/images/sw_saber_anakin.png","images/sw_saber_leia.png":"/images/sw_saber_leia.png","images/sw_saber_luke.png":"/images/sw_saber_luke.png","images/sw_saber_mace.png":"/images/sw_saber_mace.png","images/sw_saber_rey.png":"/images/sw_saber_rey.png","images/sw_saber_vader.png":"/images/sw_saber_vader.png","images/top-up.png":"/images/top-up.png","images/tracklist-placeholder-compact.png":"/images/tracklist-placeholder-compact.png","images/tracklist-placeholder-compact.webp":"/images/tracklist-placeholder-compact.webp","images/tracklist-placeholder.png":"/images/tracklist-placeholder.png","images/tracklist-placeholder.webp":"/images/tracklist-placeholder.webp","images/ylx-artist-row-placeholder.png":"/images/ylx-artist-row-placeholder.png","images/ylx-artist-row-placeholder.webp":"/images/ylx-artist-row-placeholder.webp","images/ylx-compact-row-placeholder.png":"/images/ylx-compact-row-placeholder.png","images/ylx-compact-row-placeholder.webp":"/images/ylx-compact-row-placeholder.webp","images/ylx-row-placeholder.png":"/images/ylx-row-placeholder.png","images/ylx-row-placeholder.webp":"/images/ylx-row-placeholder.webp","images/zara-larsson-singles.png":"/images/zara-larsson-singles.png","js/fb.js":"/js/fb.js","js/gtm.js":"/js/gtm.js","js/retargeting-pixels.js":"/js/retargeting-pixels.js","js/urlRedirect.js":"/js/urlRedirect.js","js/urlScheme.js":"/js/urlScheme.js","sounds/mando_this_is_the_way_103.mp3":"/sounds/mando_this_is_the_way_103.mp3","sounds/mando_this_is_the_way_107.mp3":"/sounds/mando_this_is_the_way_107.mp3","sounds/mando_this_is_the_way_felix.mp3":"/sounds/mando_this_is_the_way_felix.mp3","sounds/silence.mp3":"/sounds/silence.mp3"}',s=n?globalThis.__BROTLI_CDN_FILE_URLS__:globalThis.__CDN_FILE_URLS__;let a;a=r;void 0!==o().get(i)&&(a=o().get(i));void 0!==s&&(a=s);if("string"!=typeof a)throw new Error(`No ${i} property available in globalThis or environment variables`);if(!l[i])try{l[i]=JSON.parse(a)}catch(e){throw new Error(`Invalid ${i} value.`)}return l[i]?l[i]?.[e]:void 0};function u(e,t,n){const{enableBrotliCDNExperiment:r}=n||{},s=r?"__BROTLI_CDN_FILE_URLS__":"__CDN_FILE_URLS__",a=c(e,n);if(!a){if("production"!==o().get("NODE_ENV")&&t)return(0,i.convertPathToURL)(e,t,n);throw new Error(`\`${e}\` is not available in ${s}.`)}return a}},63058:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});let i=function(e){return e.af="af",e.am="am",e.ar="ar",e.arEG="ar-EG",e.arMA="ar-MA",e.arSA="ar-SA",e.az="az",e.bg="bg",e.bn="bn",e.bho="bho",e.bs="bs",e.ca="ca",e.cs="cs",e.da="da",e.de="de",e.el="el",e.en="en",e.enGB="en-GB",e.es419="es-419",e.es="es",e.esAR="es-AR",e.esMX="es-MX",e.et="et",e.eu="eu",e.fa="fa",e.fi="fi",e.fil="fil",e.frCA="fr-CA",e.fr="fr",e.gl="gl",e.gu="gu",e.he="he",e.hi="hi",e.hr="hr",e.hu="hu",e.id="id",e.is="is",e.it="it",e.ja="ja",e.kn="kn",e.ko="ko",e.lt="lt",e.lv="lv",e.mk="mk",e.ml="ml",e.mr="mr",e.ms="ms",e.nb="nb",e.ne="ne",e.nl="nl",e.or="or",e.paIN="pa-IN",e.paPK="pa-PK",e.pl="pl",e.ptBR="pt-BR",e.ptPT="pt-PT",e.ro="ro",e.ru="ru",e.sk="sk",e.sl="sl",e.sr="sr",e.sv="sv",e.sw="sw",e.ta="ta",e.te="te",e.th="th",e.tr="tr",e.uk="uk",e.ur="ur",e.vi="vi",e.zhCN="zh-CN",e.zhHK="zh-HK",e.zhTW="zh-TW",e.zu="zu",e}({})},31417:(e,t,n)=>{"use strict";n.d(t,{a7:()=>d,wB:()=>p,Ru:()=>h});var i=n(30758),r=n(94758),s=n.n(r),a=n(85515);let o=function(e){return e.AR="، ",e.FA="، ",e.EN=", ",e}({});var l=n(63058);const c=new Intl.Locale(l.h.en),u=Object.values(l.h);function d(e){"string"==typeof e&&(e=new Intl.Locale(e));const t=new Set([l.h.paIN,l.h.paPK,l.h.zhCN,l.h.zhTW,l.h.zhHK]);return e?t.has(e.baseName)?e:new Intl.Locale(e.language):c}const p=e=>e&&(e=>u.includes(e))(e)?e:e?.includes("-")?p(e.split("-")[0]):void 0;function m(e){const t=`(?:${e.join("|")})`;return new RegExp(String.raw`(\{${t}\}|%${t}%)`,"g")}const h=new class{_localeForTranslation=c;_localeForFormatting=c;_localeForURLPath=c;_translations={};_relativeTimeFormat=null;_dateTimeFormats=new a.fq;_pluralRules=null;getRelativeTimeFormat(){return null===this._relativeTimeFormat&&(this._relativeTimeFormat=new Intl.RelativeTimeFormat(this._localeForFormatting.toString())),this._relativeTimeFormat}getDateTimeFormat(e){const t=JSON.stringify(Object.keys(e).sort().map((t=>({[t]:e[t]}))));return this._dateTimeFormats.create(t,(()=>new Intl.DateTimeFormat(this._localeForFormatting.toString(),e)))}getPluralRules(){return null===this._pluralRules&&(this._pluralRules=new Intl.PluralRules(this._localeForTranslation.toString())),this._pluralRules}getPluralKey(e){const t=this.getPluralRules();try{return"string"==typeof e&&(e=parseInt(e,10)),t.select(e)}catch{return"other"}}initialize({localeForTranslation:e,localeForFormatting:t,translations:n}){var i;this._localeForTranslation=new Intl.Locale(e),this._localeForFormatting=("string"==typeof(i=t??e)&&(i=new Intl.Locale(i)),"ar"===i.baseName?new Intl.Locale(i,{numberingSystem:"latn"}):i),this._localeForURLPath=d(e),this._relativeTimeFormat=null,this._dateTimeFormats.clear(),this._pluralRules=null,this._translations=n}getLocaleForTranslation(){return this._localeForTranslation.baseName}getLocaleForFormatting(){return this._localeForFormatting.baseName}getLocaleForURLPath(){return this._localeForURLPath.baseName}getLocaleForSmartling(){const e=this._localeForTranslation.baseName;return s()[e]||e}getTranslations(){return this._translations}toLocaleLowerCase(e){return e?.toLocaleLowerCase(this._localeForTranslation.toString())}toLocaleUpperCase(e){return e?.toLocaleUpperCase(this._localeForTranslation.toString())}get(e,...t){const n=e in this._translations?this._translations[e]:e;let r="";if("string"!=typeof n){const e=t[0],i=n[this.getPluralKey(e)];void 0!==i?r=i:n.other&&(r=n.other)}else r=n;if(/%\d%/.test(r)){if(!["desktop.login.DefaultErrorMessage","desktop.login.ErrorProxyAuthRequired","desktop.login.MissingUserInfoMessage","desktop.login.RegionMismatchMessage","desktop.login.ClientUpdateFail","desktop.login.FbUserNotFoundSignUp","desktop-auth.error"].includes(e))throw new Error("i18n: The placeholder format %0% is legacy and is only allowed for existing strings.")}const s={},a={};t.forEach(((e,t)=>{const n="object"!=typeof e||null===e||(0,i.isValidElement)(e)?[[t,e]]:Object.entries(e);for(const[e,t]of n)(0,i.isValidElement)(t)?a[e]=t:void 0!==t&&(s[e]=t)})),r=r.replace(m(Object.keys(s)),((e,t)=>{const n=t.slice(1,-1),i=s[n];return"number"==typeof i?this.formatNumber(i):i}));const o=Object.keys(a);return o.length?(0,i.createElement)(i.Fragment,null,r.split(m(o)).map(((e,t)=>{if(t%2){const t=e.slice(1,-1),n=a[t];return(0,i.cloneElement)(n,{key:n.key??t})}return e})).filter((e=>""!==e))):r}getSeparator(){switch(new Intl.Locale(this._localeForTranslation).language){case l.h.ar:return o.AR;case l.h.fa:return o.FA;default:return o.EN}}formatNumber(e,t){return e.toLocaleString(this._localeForFormatting,t)}formatNumberCompact(e){return this.formatNumber(e,{notation:"compact",maximumFractionDigits:1})}formatDate(e,t=null){const n=t||{year:"numeric",month:"long",day:"numeric"};return this.getDateTimeFormat(n).format(e)}formatRelativeDate(e,t=null,n=new Date,i=2592e6){const r=this.getRelativeTimeFormat(),s=e.getTime()-n.getTime(),a=Math.abs(s)=12?r.format(u,"years"):Math.abs(t)>4?r.format(d,"months"):Math.abs(i)>=7?r.format(t,"weeks"):Math.abs(a)>=24?r.format(i,"days"):Math.abs(l)>=60?r.format(a,"hours"):Math.abs(c)>=60?r.format(l,"minutes"):r.format(c,"seconds")}var o;return this.formatDate(e,t)}}},6045:(e,t,n)=>{"use strict";n.d(t,{$c:()=>r,QN:()=>i,oK:()=>s});const i={SHOW_ABOUT_RECS_MODAL:"SHOW_ABOUT_RECS_MODAL",HIDE_ABOUT_RECS_MODAL:"HIDE_ABOUT_RECS_MODAL"},r=()=>({type:i.SHOW_ABOUT_RECS_MODAL}),s=()=>({type:i.HIDE_ABOUT_RECS_MODAL})},80453:(e,t,n)=>{"use strict";n.d(t,{DP:()=>s,QN:()=>i,Uu:()=>r});const i={SHOW_ABOUT_SPOTIFY_MODAL:"SHOW_ABOUT_SPOTIFY_MODAL",HIDE_ABOUT_SPOTIFY_MODAL:"HIDE_ABOUT_SPOTIFY_MODAL"},r=()=>({type:i.SHOW_ABOUT_SPOTIFY_MODAL}),s=()=>({type:i.HIDE_ABOUT_SPOTIFY_MODAL})},99921:(e,t,n)=>{"use strict";n.d(t,{QN:()=>i,Rb:()=>a,Tf:()=>s,eK:()=>r});const i={GET_AGE_RESTRICTION_MODAL:"GET_AGE_RESTRICTION_MODAL",SHOW_AGE_RESTRICTION_MODAL:"SHOW_AGE_RESTRICTION_MODAL",HIDE_AGE_RESTRICTION_MODAL:"HIDE_AGE_RESTRICTION_MODAL"},r=e=>({type:i.SHOW_AGE_RESTRICTION_MODAL,dialog:e}),s=e=>({type:i.GET_AGE_RESTRICTION_MODAL,uri:e}),a=()=>({type:i.HIDE_AGE_RESTRICTION_MODAL})},70243:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>a,NM:()=>r,gK:()=>i,zL:()=>s});const i={ANONYMOUS_LOGIN_CLICK:"ANONYMOUS_LOGIN_CLICK",ANONYMOUS_SIGNUP_CLICK:"ANONYMOUS_SIGNUP_CLICK",ANONYMOUS_PREMIUM_CLICK:"ANONYMOUS_PREMIUM_CLICK",ANONYMOUS_DECLINE_SIGNUP:"ANONYMOUS_DECLINE_SIGNUP"},r=()=>({type:i.ANONYMOUS_PREMIUM_CLICK}),s=()=>({type:i.ANONYMOUS_LOGIN_CLICK}),a=()=>({type:i.ANONYMOUS_SIGNUP_CLICK})},24105:(e,t,n)=>{"use strict";n.d(t,{$e:()=>a,Ym:()=>s,dK:()=>r,gK:()=>i,iY:()=>o});const i={CAST_STATE_CHANGED:"CAST_STATE_CHANGED",TOGGLE_CAST:"TOGGLE_CAST",SET_CONNECTING_CAST_DEVICE_ID:"SET_CONNECTING_CAST_DEVICE_ID",RESET_CONNECTING_CAST_DEVICE_ID:"RESET_CONNECTING_CAST_DEVICE_ID"},r=e=>({type:i.CAST_STATE_CHANGED,castState:e}),s=()=>({type:i.TOGGLE_CAST}),a=e=>({type:i.SET_CONNECTING_CAST_DEVICE_ID,deviceId:e}),o=()=>({type:i.RESET_CONNECTING_CAST_DEVICE_ID})},2963:(e,t,n)=>{"use strict";n.d(t,{QN:()=>i,Qo:()=>a,io:()=>s,xM:()=>r});const i={SHOW_DUPLICATE_TRACKS_DIALOG:"SHOW_DUPLICATE_TRACKS_DIALOG",HIDE_DUPLICATE_TRACKS_DIALOG:"HIDE_DUPLICATE_TRACKS_DIALOG",CHECK_DUPLICATE_TRACKS:"CHECK_DUPLICATE_TRACKS"},r=e=>({type:i.SHOW_DUPLICATE_TRACKS_DIALOG,...e}),s=(e,t,n)=>({type:i.CHECK_DUPLICATE_TRACKS,playlistUri:e,uris:t,position:n}),a=()=>({type:i.HIDE_DUPLICATE_TRACKS_DIALOG})},33061:(e,t,n)=>{"use strict";n.d(t,{FS:()=>r,QN:()=>i,ku:()=>s});const i={SHOW_LICENSES_MODAL:"SHOW_LICENSES_MODAL",HIDE_LICENSES_MODAL:"HIDE_LICENSES_MODAL"},r=()=>({type:i.SHOW_LICENSES_MODAL}),s=()=>({type:i.HIDE_LICENSES_MODAL})},39405:(e,t,n)=>{"use strict";n.d(t,{d:()=>r,g:()=>i});const i={LOG_OPEN_ANALYTICS_EVENT:"LOG_OPEN_ANALYTICS_EVENT",LOG_INTERACTION:"LOG_INTERACTION"},r=e=>({type:i.LOG_INTERACTION,logData:e})},31367:(e,t,n)=>{"use strict";n.d(t,{tS:()=>l,MW:()=>c,rD:()=>s,fj:()=>o,CZ:()=>r,VR:()=>a,gK:()=>i});const i={DEVICE_INFO_CHANGED:"DEVICE_INFO_CHANGED",SET_ACTIVE_DEVICE:"SET_ACTIVE_DEVICE",PLAYBACK_ERROR:"PLAYBACK_ERROR",HARMONY_MAX_SUBSCRIPTIONS_REACHED:"HARMONY_MAX_SUBSCRIPTIONS_REACHED",CDM_ERROR:"CDM_ERROR",PLAYBACK_CLEAR_DATA:"PLAYBACK_CLEAR_DATA",QUEUE_UPDATE:"QUEUE_UPDATE",ADD_TO_QUEUE_SUCCESS:"ADD_TO_QUEUE_SUCCESS",ADD_TO_QUEUE_ERROR:"ADD_TO_QUEUE_ERROR",DISCONNECT_HARMONY:"DISCONNECT_HARMONY"},r=(e="unknown",t="unknown",n="")=>({type:i.PLAYBACK_ERROR,name:e,source:t,message:n}),s=e=>({type:i.DEVICE_INFO_CHANGED,deviceInfo:e}),a=e=>({type:i.SET_ACTIVE_DEVICE,id:e}),o=(e="unknown")=>({type:i.HARMONY_MAX_SUBSCRIPTIONS_REACHED,source:e}),l=()=>({type:i.CDM_ERROR,name:i.CDM_ERROR}),c=()=>({type:i.PLAYBACK_CLEAR_DATA})},36941:(e,t,n)=>{"use strict";n.d(t,{Jz:()=>s,SC:()=>r,gK:()=>i,jG:()=>a});const i={REQUEST_SEO_EXPERIMENT_DATA:"REQUEST_SEO_EXPERIMENT_DATA",SET_SEO_EXPERIMENT_DATA:"SET_SEO_EXPERIMENT_DATA",SET_SEO_EXPERIMENT_ERROR:"SET_SEO_EXPERIMENT_ERROR"},r=e=>({type:i.REQUEST_SEO_EXPERIMENT_DATA,uri:e}),s=e=>({type:i.SET_SEO_EXPERIMENT_DATA,data:e}),a=()=>({type:i.SET_SEO_EXPERIMENT_ERROR})},78566:(e,t,n)=>{"use strict";n.d(t,{zA:()=>l,gK:()=>a});var i=n(94461);let r=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});const s=e=>{document.documentElement.setAttribute("dir",e)};let a=function(e){return e.SET_RTL_MODE="SET_RTL_MODE",e}({});const o=e=>{e===r.RTL?s(r.RTL):s(r.LTR)},l=e=>{const t=(e=>i.IB[e]?.isRTL?r.RTL:r.LTR)(e);return o(t),n=t===r.RTL,{type:a.SET_RTL_MODE,isRTL:n};var n}},98293:(e,t,n)=>{"use strict";n.d(t,{A9:()=>ee,Ac:()=>y,BU:()=>_,BY:()=>j,BZ:()=>b,DH:()=>x,Gz:()=>S,H2:()=>E,Ih:()=>Z,Jp:()=>s,KB:()=>G,Kc:()=>ce,Kf:()=>Q,Kk:()=>k,MB:()=>H,O:()=>o,O2:()=>K,OB:()=>c,P0:()=>M,QK:()=>z,YF:()=>oe,Yk:()=>Y,Yp:()=>L,_3:()=>q,_P:()=>l,aP:()=>m,ae:()=>N,as:()=>V,aw:()=>d,b0:()=>J,c$:()=>u,cQ:()=>te,cd:()=>W,d2:()=>ie,dK:()=>P,e$:()=>A,eH:()=>le,eN:()=>ae,f:()=>O,ft:()=>X,gK:()=>i,hp:()=>D,j4:()=>I,k0:()=>a,kC:()=>T,lM:()=>se,mE:()=>h,mi:()=>B,np:()=>R,p5:()=>re,pf:()=>r,rF:()=>w,rN:()=>C,us:()=>$,wi:()=>U,wn:()=>v,xF:()=>g,yh:()=>p,yk:()=>F,yx:()=>ne,zj:()=>f});const i={COPY_LINK_SUCCESS:"COPY_LINK_SUCCESS",OPEN_DELETE_PLAYLIST_DIALOG:"OPEN_DELETE_PLAYLIST_DIALOG",CLOSE_DELETE_PLAYLIST_DIALOG:"CLOSE_DELETE_PLAYLIST_DIALOG",OPEN_DELETE_FOLDER_DIALOG:"OPEN_DELETE_FOLDER_DIALOG",CLOSE_DELETE_FOLDER_DIALOG:"CLOSE_DELETE_FOLDER_DIALOG",OPEN_REMOVE_FROM_LIBRARY_DIALOG:"OPEN_REMOVE_FROM_LIBRARY_DIALOG",CLOSE_REMOVE_FROM_LIBRARY_DIALOG:"CLOSE_REMOVE_FROM_LIBRARY_DIALOG",OPEN_BLOCK_USER_DIALOG:"OPEN_BLOCK_USER_DIALOG",CLOSE_BLOCK_USER_DIALOG:"CLOSE_BLOCK_USER_DIALOG",OPEN_SIGNUP_PROMPT_DIALOG:"OPEN_SIGNUP_PROMPT_DIALOG",CLOSE_SIGNUP_PROMPT_DIALOG:"CLOSE_SIGNUP_PROMPT_DIALOG",OPEN_LEAVE_PLAYLIST_DIALOG:"OPEN_LEAVE_PLAYLIST_DIALOG",CLOSE_LEAVE_PLAYLIST_DIALOG:"CLOSE_LEAVE_PLAYLIST_DIALOG",OPEN_EXPLICIT_CONTENT_DIALOG:"OPEN_EXPLICIT_CONTENT_DIALOG",CLOSE_EXPLICIT_CONTENT_DIALOG:"CLOSE_EXPLICIT_CONTENT_DIALOG",HIDE_UNSUPPORTED_MESSAGE:"HIDE_UNSUPPORTED_MESSAGE",SHOW_UNSUPPORTED_MESSAGE:"SHOW_UNSUPPORTED_MESSAGE",HIDE_PLAYBACK_NOT_SUPPORTED_MODAL:"HIDE_PLAYBACK_NOT_SUPPORTED_MODAL",SHOW_PLAYBACK_NOT_SUPPORTED_MODAL:"SHOW_PLAYBACK_NOT_SUPPORTED_MODAL",HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:"HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL",SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:"SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL",HIDE_PREMIUM_MODAL:"HIDE_PREMIUM_MODAL",SHOW_PREMIUM_MODAL:"SHOW_PREMIUM_MODAL",HIDE_L2L_MODAL:"HIDE_L2L_MODAL",SHOW_L2L_MODAL:"SHOW_L2L_MODAL",HIDE_S2L_MODAL:"HIDE_S2L_MODAL",SHOW_S2L_MODAL:"SHOW_S2L_MODAL",HIDE_EMPLOYEE_PODCASTS_MODAL:"HIDE_EMPLOYEE_PODCASTS_MODAL",SHOW_EMPLOYEE_PODCASTS_MODAL:"SHOW_EMPLOYEE_PODCASTS_MODAL",EMPLOYEE_PODCASTS_PLUGIN_ENABLED:"EMPLOYEE_PODCASTS_PLUGIN_ENABLED",EMPLOYEE_PODCASTS_PLUGIN_DISABLED:"EMPLOYEE_PODCASTS_PLUGIN_DISABLED",HIDE_COOKIE_NOTICE:"HIDE_COOKIE_NOTICE",SHOW_COOKIE_NOTICE:"SHOW_COOKIE_NOTICE",OPEN_FULLSCREEN_MODE:"OPEN_FULLSCREEN_MODE",CLOSE_FULLSCREEN_MODE:"CLOSE_FULLSCREEN_MODE",CONNECT_DEVICE_PICKER_OPENED:"CONNECT_DEVICE_PICKER_OPENED",CONNECT_DEVICE_PICKER_CLOSED:"CONNECT_DEVICE_PICKER_CLOSED",SHOW_CONNECT_NUDGE:"SHOW_CONNECT_NUDGE",HIDE_CONNECT_NUDGE:"HIDE_CONNECT_NUDGE",SHOW_CONNECT_BAR:"SHOW_CONNECT_BAR",HIDE_CONNECT_BAR:"HIDE_CONNECT_BAR",UPDATE_UI_HISTORY_STATE:"UPDATE_UI_HISTORY_STATE",ENTER_FULLSCREEN:"ENTER_FULLSCREEN",LEAVE_FULLSCREEN:"LEAVE_FULLSCREEN",ENABLE_KEYBOARD_SHORTCUTS:"ENABLE_KEYBOARD_SHORTCUTS",SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY:"SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY",SHOW_TRACK_CREDITS:"SHOW_TRACK_CREDITS",CONTEXT_MENU_OPENED:"CONTEXT_MENU_OPENED",CONTEXT_MENU_CLOSED:"CONTEXT_MENU_CLOSED",INITIALISE_QUICKSILVER:"INITIALISE_QUICKSILVER",TRIGGER_CLICK_DEPRECATION_MESSAGE:"TRIGGER_CLICK_DEPRECATION_MESSAGE",OPEN_REMOVE_DOWNLOADS_DIALOG:"OPEN_REMOVE_DOWNLOADS_DIALOG",CLOSE_REMOVE_DOWNLOADS_DIALOG:"CLOSE_REMOVE_DOWNLOADS_DIALOG",OPEN_CLEAR_CACHE_DIALOG:"OPEN_CLEAR_CACHE_DIALOG",CLOSE_CLEAR_CACHE_DIALOG:"CLOSE_CLEAR_CACHE_DIALOG",OPEN_RENAME_FOLDER_MODAL:"OPEN_RENAME_FOLDER_MODAL",CLOSE_RENAME_FOLDER_MODAL:"CLOSE_RENAME_FOLDER_MODAL",OPEN_YOUR_DJ_UPSELL_MODAL:"OPEN_YOUR_DJ_UPSELL_MODAL",CLOSE_YOUR_DJ_UPSELL_MODAL:"CLOSE_YOUR_DJ_UPSELL_MODAL",OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",OPEN_ARTIST_ABOUT_DIALOG:"OPEN_ARTIST_ABOUT_DIALOG",CLOSE_ARTIST_ABOUT_DIALOG:"CLOSE_ARTIST_ABOUT_DIALOG",OPEN_BOOK_CONSUMPTION_CAP_MODAL:"OPEN_BOOK_CONSUMPTION_CAP_MODAL",CLOSE_BOOK_CONSUMPTION_CAP_MODAL:"CLOSE_BOOK_CONSUMPTION_CAP_MODAL",OPEN_DSA_DIALOG:"OPEN_DSA_DIALOG",CLOSE_DSA_DIALOG:"CLOSE_DSA_DIALOG",OPEN_JAM_MODAL:"OPEN_JAM_MODAL",CLOSE_JAM_MODAL:"CLOSE_JAM_MODAL",OPEN_RESTRICTIONS_MODAL:"OPEN_RESTRICTIONS_MODAL",CLOSE_RESTRICTIONS_MODAL:"CLOSE_RESTRICTIONS_MODAL",OPEN_SHOW_RATING_MODAL:"OPEN_SHOW_RATING_MODAL",CLOSE_SHOW_RATING_MODAL:"CLOSE_SHOW_RATING_MODAL",OPEN_REVERT_CHANGES_TUNA_DIALOG:"OPEN_REVERT_CHANGES_TUNA_DIALOG",CLOSE_REVERT_CHANGES_TUNA_DIALOG:"CLOSE_REVERT_CHANGES_TUNA_DIALOG"},r=e=>({type:i.COPY_LINK_SUCCESS,link:e}),s=()=>({type:i.SHOW_L2L_MODAL}),a=()=>({type:i.HIDE_L2L_MODAL}),o=e=>({type:i.OPEN_DELETE_PLAYLIST_DIALOG,uri:e}),l=()=>({type:i.CLOSE_DELETE_PLAYLIST_DIALOG}),c=(e,t)=>({type:i.OPEN_DELETE_FOLDER_DIALOG,uri:e,onDeleteCallback:t}),u=()=>({type:i.CLOSE_DELETE_FOLDER_DIALOG}),d=(e,t=!1)=>({type:i.OPEN_REMOVE_FROM_LIBRARY_DIALOG,uri:e,isPrerelease:t}),p=()=>({type:i.CLOSE_REMOVE_FROM_LIBRARY_DIALOG}),m=e=>({type:i.OPEN_LEAVE_PLAYLIST_DIALOG,playlistUri:e}),h=()=>({type:i.CLOSE_LEAVE_PLAYLIST_DIALOG}),f=(e,t)=>({type:i.OPEN_BLOCK_USER_DIALOG,uri:e,name:t}),g=()=>({type:i.CLOSE_BLOCK_USER_DIALOG}),E=(e=null)=>({type:i.OPEN_SIGNUP_PROMPT_DIALOG,uri:e}),_=()=>({type:i.CLOSE_SIGNUP_PROMPT_DIALOG}),y=()=>({type:i.OPEN_EXPLICIT_CONTENT_DIALOG}),v=()=>({type:i.CLOSE_EXPLICIT_CONTENT_DIALOG}),b=()=>({type:i.HIDE_UNSUPPORTED_MESSAGE}),S=e=>({type:i.SHOW_UNSUPPORTED_MESSAGE,message:e}),A=()=>({type:i.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL}),C=()=>({type:i.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL}),T=()=>({type:i.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),I=()=>({type:i.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),O=()=>({type:i.OPEN_FULLSCREEN_MODE}),w=()=>({type:i.CLOSE_FULLSCREEN_MODE}),N=()=>({type:i.CONNECT_DEVICE_PICKER_OPENED}),R=()=>({type:i.CONNECT_DEVICE_PICKER_CLOSED}),P=()=>({type:i.SHOW_CONNECT_NUDGE}),L=()=>({type:i.HIDE_CONNECT_NUDGE}),D=e=>({type:i.UPDATE_UI_HISTORY_STATE,historyState:e}),k=()=>({type:i.ENTER_FULLSCREEN}),x=()=>({type:i.LEAVE_FULLSCREEN}),U=e=>({type:i.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY,isOpen:e}),M=(e,t)=>({type:i.SHOW_TRACK_CREDITS,isOpen:e,trackUri:t}),B=()=>({type:i.SHOW_S2L_MODAL}),j=()=>({type:i.HIDE_S2L_MODAL}),F=()=>({type:i.INITIALISE_QUICKSILVER}),V=()=>({type:i.TRIGGER_CLICK_DEPRECATION_MESSAGE}),G=()=>({type:i.OPEN_REMOVE_DOWNLOADS_DIALOG}),H=()=>({type:i.CLOSE_REMOVE_DOWNLOADS_DIALOG}),W=()=>({type:i.OPEN_CLEAR_CACHE_DIALOG}),z=()=>({type:i.CLOSE_CLEAR_CACHE_DIALOG}),K=(e,t)=>({type:i.OPEN_RENAME_FOLDER_MODAL,name:e,handleRename:t}),Y=()=>({type:i.CLOSE_RENAME_FOLDER_MODAL}),q=e=>({type:i.OPEN_BOOK_CONSUMPTION_CAP_MODAL,consumptionCapExplanation:e}),$=()=>({type:i.CLOSE_BOOK_CONSUMPTION_CAP_MODAL}),Z=(e,t,n,r)=>({type:i.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG,uri:e,onConfirm:t,onCancel:n,remoteDeviceInfo:r}),Q=()=>({type:i.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG}),J=e=>({type:i.OPEN_DSA_DIALOG,item:e}),X=()=>({type:i.CLOSE_DSA_DIALOG}),ee=(e,t,n,r)=>({type:i.OPEN_JAM_MODAL,modalType:e,joinToken:t,memberToRemove:n,jamDeviceInfo:r}),te=()=>({type:i.CLOSE_JAM_MODAL}),ne=e=>({type:i.OPEN_RESTRICTIONS_MODAL,data:e}),ie=()=>({type:i.CLOSE_RESTRICTIONS_MODAL}),re=e=>({type:i.OPEN_ARTIST_ABOUT_DIALOG,data:e}),se=()=>({type:i.CLOSE_ARTIST_ABOUT_DIALOG}),ae=()=>({type:i.OPEN_YOUR_DJ_UPSELL_MODAL}),oe=()=>({type:i.CLOSE_YOUR_DJ_UPSELL_MODAL}),le=(e,t)=>({type:i.OPEN_SHOW_RATING_MODAL,uri:e,metadata:t}),ce=()=>({type:i.CLOSE_SHOW_RATING_MODAL})},44119:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var i=n(31417),r=n(32411);class s{constructor(){}static isVideoAd(e){return"video"===e.mediaType}static isPodcastAd(e){return e.isPodcastAd}static isSurveyAd(e){return"survey"===e?.metadata?.["ad.companion.type"]}static isCanvasAd(e){return!!e?.metadata?.["ad.canvas.type"]&&["image","video"].includes(e?.metadata?.["ad.canvas.type"])}static isVerticalVideoAd(e){return s.isVideoAd(e)&&"portrait"===e.videoOrientation}static pickFirstURL(...e){const t=s.pickFirst(s.isValidURL,...e);return t?(0,r.H)(t):t}static getAdFormat(e){return s.isVideoAd(e)?"video":"audio"}static getAdProduct(e){return s.isPodcastAd(e)?"podcast":"music"}static getAdTitle(e){const t=e.metadata?.advertiser||e.advertiser;return t&&""!==t.trim()?t:null}static getAdSubtitle(){return i.Ru.get("ad-formats.advertisement")}static isValidString(e){return null!=e&&""!==e}static isValidURL(e){return s.isValidString(e)&&"#"!==e}static pickFirst(e,...t){return t.find(e)??null}}},39148:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(44119),r=n(89848);function s(e){const t=(0,r.dY)().getInStreamAd(),n=t?.metadata?.logoImage,s=t?.metadata?.buttonMessage,a=t?.metadata?.tagline,o=t?.clickthroughUrl,{url:l}=e;return{title:i.Q.getAdTitle(e),subtitle:i.Q.getAdSubtitle(),url:i.Q.pickFirstURL(o,l),tagline:a,buttonMessage:s,logoImage:n}}},17429:(e,t,n)=>{"use strict";n.d(t,{V_:()=>o,ZY:()=>l,b6:()=>c,x0:()=>u,$L:()=>d});var i=n(68750),r=n(555),s=n(1599),a=n(72671);const o=e=>e.build().withHost(a.Yt).withPath("/mock/list").withEndpointIdentifier("/mock/list").withoutMarket().withoutGlobalHeaders().withoutAuthorization().send(),l=async e=>{const t=s.n.getInstance();return(await t.build().withMethod("POST").withHost(a.MW).withPath("/dsa-metadata").withEndpointIdentifier("/dsa-metadata").withBody(JSON.stringify(e)).withoutMarket().send()).body},c=(e,t,n,s,o=!1)=>{const l=o?"/leavebehinds/mock/ads":"/leavebehinds/ads";return e.build().withMethod("POST").withHost(a.I9).withPath(l).withEndpointIdentifier(l).withBody(JSON.stringify({surface:t,uri:n,playlistTitle:s,maxAds:(0,r.NI)((0,i.O$)(t))})).withoutMarket().send()},u=e=>s.n.getInstance().build().withHost(a.ip).withPath(`/sponsored/${e}`).withEndpointIdentifier("sponsored/{playlistUri}").send(),d=async()=>{const e=s.n.getInstance();return(await e.build().withHost(a.MR).withMethod("GET").send()).body}},55460:(e,t,n)=>{"use strict";n.d(t,{E2:()=>c,KS:()=>o,PS:()=>r,QN:()=>i,Wv:()=>l,ZQ:()=>s,c3:()=>a,lb:()=>d,qO:()=>u});const i={SHOW_BILLBOARD_AD_VIEW:"SHOW_BILLBOARD_AD_VIEW",HIDE_BILLBOARD_AD_VIEW:"HIDE_BILLBOARD_AD_VIEW",MINIMIZE_BILLBOARD_AD_VIEW:"MINIMIZE_BILLBOARD_AD_VIEW",CLICK_BILLBOARD_AD_VIEW:"CLICK_BILLBOARD_AD_VIEW",IMAGE_LOADED_BILLBOARD_AD_VIEW:"IMAGE_LOADED_BILLBOARD_AD_VIEW",ERROR_BILLBOARD_AD_VIEW:"ERROR_BILLBOARD_AD_VIEW",MANAGER_MINIMIZE_BILLBOARD_AD_VIEW:"MANAGER_MINIMIZE_BILLBOARD_AD_VIEW",FINISH_BILLBOARD_AD_VIEW:"FINISH_BILLBOARD_AD_VIEW"},r=e=>({type:i.SHOW_BILLBOARD_AD_VIEW,data:e}),s=()=>({type:i.FINISH_BILLBOARD_AD_VIEW}),a=()=>({type:i.HIDE_BILLBOARD_AD_VIEW}),o=()=>({type:i.MINIMIZE_BILLBOARD_AD_VIEW}),l=()=>({type:i.CLICK_BILLBOARD_AD_VIEW}),c=()=>({type:i.IMAGE_LOADED_BILLBOARD_AD_VIEW}),u=()=>({type:i.ERROR_BILLBOARD_AD_VIEW}),d=()=>({type:i.MANAGER_MINIMIZE_BILLBOARD_AD_VIEW})},64787:(e,t,n)=>{"use strict";n.d(t,{KK:()=>i,TN:()=>s,Vp:()=>u,Ws:()=>a,a4:()=>r,fW:()=>l,ok:()=>o,yU:()=>c});const i="SET_LEADERBOARD_ELEMENT",r="NAVIGATION_CHANGE_LEADERBOARD_AD",s="SET_LEADERBOARD_ENABLED",a="SET_LEADERBOARD_DISABLED",o=e=>({type:i,element:e}),l=()=>({type:r}),c=()=>({type:s}),u=()=>({type:a})},68750:(e,t,n)=>{"use strict";n.d(t,{Fh:()=>s,O$:()=>r,ui:()=>i});let i=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.PODCAST_SCROLL_NPV=1]="PODCAST_SCROLL_NPV",e[e.SHOW_PAGE=2]="SHOW_PAGE",e[e.EPISODE_PAGE=3]="EPISODE_PAGE",e[e.PODCAST_SEE_ALL=7]="PODCAST_SEE_ALL",e[e.MUSIC_NPV=4]="MUSIC_NPV",e[e.PLAYLIST=5]="PLAYLIST",e[e.MUSIC_SEE_ALL=6]="MUSIC_SEE_ALL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function r(e){switch(e){case 0:case"UNKNOWN":return i.UNKNOWN;case 1:case"PODCAST_SCROLL_NPV":return i.PODCAST_SCROLL_NPV;case 2:case"SHOW_PAGE":return i.SHOW_PAGE;case 3:case"EPISODE_PAGE":return i.EPISODE_PAGE;case 7:case"PODCAST_SEE_ALL":return i.PODCAST_SEE_ALL;case 4:case"MUSIC_NPV":return i.MUSIC_NPV;case 5:case"PLAYLIST":return i.PLAYLIST;case 6:case"MUSIC_SEE_ALL":return i.MUSIC_SEE_ALL;default:return i.UNRECOGNIZED}}function s(e){switch(e){case i.UNKNOWN:return"UNKNOWN";case i.PODCAST_SCROLL_NPV:return"PODCAST_SCROLL_NPV";case i.SHOW_PAGE:return"SHOW_PAGE";case i.EPISODE_PAGE:return"EPISODE_PAGE";case i.PODCAST_SEE_ALL:return"PODCAST_SEE_ALL";case i.MUSIC_NPV:return"MUSIC_NPV";case i.PLAYLIST:return"PLAYLIST";case i.MUSIC_SEE_ALL:return"MUSIC_SEE_ALL";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}},93049:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var i=n(66534);function r(e){return`${(0,i.jV)(e)}/ads`}},13353:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});var i=n(66534);function r(e){return`${(0,i.P8)(e)}/ads`}},98742:(e,t,n)=>{"use strict";n.d(t,{$y:()=>c,A7:()=>a,BN:()=>o,Tl:()=>l});var i=n(21364),r=n(22795),s=n.n(r);const a={encode:(e,t=s().Writer.create())=>(void 0!==e.survey&&o.encode(e.survey,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={survey:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.survey=o.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({survey:u(e.survey)?o.fromJSON(e.survey):void 0}),toJSON(e){const t={};return void 0!==e.survey&&(t.survey=o.toJSON(e.survey)),t},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={survey:void 0};return t.survey=void 0!==e.survey&&null!==e.survey?o.fromPartial(e.survey):void 0,t}};const o={encode(e,t=s().Writer.create()){for(const n of e.surveyQuestionAnswers)l.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={surveyQuestionAnswers:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.surveyQuestionAnswers.push(l.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({surveyQuestionAnswers:globalThis.Array.isArray(e?.surveyQuestionAnswers)?e.surveyQuestionAnswers.map((e=>l.fromJSON(e))):[]}),toJSON(e){const t={};return e.surveyQuestionAnswers?.length&&(t.surveyQuestionAnswers=e.surveyQuestionAnswers.map((e=>l.toJSON(e)))),t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={surveyQuestionAnswers:[]};return t.surveyQuestionAnswers=e.surveyQuestionAnswers?.map((e=>l.fromPartial(e)))||[],t}};const l={encode(e,t=s().Writer.create()){""!==e.surveyQuestionId&&t.uint32(10).string(e.surveyQuestionId);for(const n of e.selectedSurveyOptions)c.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={surveyQuestionId:"",selectedSurveyOptions:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.surveyQuestionId=n.string();continue;case 2:if(18!==e)break;r.selectedSurveyOptions.push(c.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({surveyQuestionId:u(e.surveyQuestionId)?globalThis.String(e.surveyQuestionId):"",selectedSurveyOptions:globalThis.Array.isArray(e?.selectedSurveyOptions)?e.selectedSurveyOptions.map((e=>c.fromJSON(e))):[]}),toJSON(e){const t={};return""!==e.surveyQuestionId&&(t.surveyQuestionId=e.surveyQuestionId),e.selectedSurveyOptions?.length&&(t.selectedSurveyOptions=e.selectedSurveyOptions.map((e=>c.toJSON(e)))),t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={surveyQuestionId:"",selectedSurveyOptions:[]};return t.surveyQuestionId=e.surveyQuestionId??"",t.selectedSurveyOptions=e.selectedSurveyOptions?.map((e=>c.fromPartial(e)))||[],t}};const c={encode:(e,t=s().Writer.create())=>(""!==e.selectedSurveyQuestionOptionId&&t.uint32(10).string(e.selectedSurveyQuestionOptionId),"0"!==e.optionPositionIndex&&t.uint32(16).uint64(e.optionPositionIndex),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={selectedSurveyQuestionOptionId:"",optionPositionIndex:"0"};for(;n.pos>>3){case 1:if(10!==e)break;r.selectedSurveyQuestionOptionId=n.string();continue;case 2:if(16!==e)break;r.optionPositionIndex=n.uint64().toString();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({selectedSurveyQuestionOptionId:u(e.selectedSurveyQuestionOptionId)?globalThis.String(e.selectedSurveyQuestionOptionId):"",optionPositionIndex:u(e.optionPositionIndex)?globalThis.String(e.optionPositionIndex):"0"}),toJSON(e){const t={};return""!==e.selectedSurveyQuestionOptionId&&(t.selectedSurveyQuestionOptionId=e.selectedSurveyQuestionOptionId),"0"!==e.optionPositionIndex&&(t.optionPositionIndex=e.optionPositionIndex),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={selectedSurveyQuestionOptionId:"",optionPositionIndex:"0"};return t.selectedSurveyQuestionOptionId=e.selectedSurveyQuestionOptionId??"",t.optionPositionIndex=e.optionPositionIndex??"0",t}};function u(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},99372:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,g:()=>r});const i="LEGACY_HPTO_CONTAINER_MOUNTED",r=({template:e})=>({type:i,template:e})},42241:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});class i{parsePreview({metadata:e,display:t,requestId:n}){const{creative_id:i,gid:r}=e,s={creativeId:parseInt(i,10),gid:r,hpto:JSON.parse(t[0]&&t[0].text||"")},a=s.hpto||s;let o=null;const l=a.html&&-1!==a.html.search(/id="native-elements"/),c=!a.html&&"html"===a["banner-mode"];if(l?o=this.handleNativeEl(a):c&&(o=this.renameImageBannerField(a)),o=o||a,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const u=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:n,loaderFrame:u}}isPreviewServiceAd({metadata:e}){return!!e&&"true"===e.is_preview}getKeyByValue(e,t){return Object.keys(t).find((n=>t[n]===e))||""}renameImageBannerField(e){return delete e[this.getKeyByValue("html",e)],Object.assign({},e,{"banner-mode":"image"})}handleNativeEl(e){const t=document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e.html;let n="";const i=t.getElementById("native-elements"),r=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(i&&i.hasAttribute(e)&&(n=e),n))),n=n.split("-").pop()||"",delete e[r],Object.assign({},e,{version:2,badge:n,"banner-mode":"native",blurb:i&&i.getAttribute("data-blurb"),"target-uri":i&&i.getAttribute("data-uri"),playBtnUri:i&&i.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),n=document.createElement("iframe");return n.className="ad-iframe",n.src=`data:text/html;charset=utf-8,${t}`,n.srcdoc=e,n.scrolling="no",n.marginWidth="0",n.marginHeight="0",n}}},37756:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});const i={HPTO_CONTAINER_LOAD:"HPTO_CONTAINER_LOAD",GOT_TEMPLATE:"GOT_TEMPLATE",HPTO_CONTAINER_MOUNTED:"HPTO_CONTAINER_MOUNTED",HPTO_CONTAINER_UNMOUNTED:"HPTO_CONTAINER_UNMOUNTED",HPTO_COMPONENT_UNMOUNTED:"HPTO_COMPONENT_UNMOUNTED",HPTO_COMPONENT_NEW_AD_RENDERED:"HPTO_COMPONENT_NEW_AD_RENDERED",FETCH_CREATIVE:"FETCH_CREATIVE",FETCHING_CREATIVE:"FETCHING_CREATIVE",CREATIVE_FETCH_FAILED:"CREATIVE_FETCH_FAILED",GOT_CREATIVE:"GOT_CREATIVE",SET_HPTO_PREVIEW:"SET_HPTO_PREVIEW",HPTO_PREVIEW_HOME_NAVIGATION:"HPTO_PREVIEW_HOME_NAVIGATION",DEBUG_FORCE_REFRESH_HPTO:"DEBUG_FORCE_REFRESH_HPTO"}},53247:(e,t,n)=>{"use strict";n.d(t,{$4:()=>a,$t:()=>c,BH:()=>v,DZ:()=>f,Fi:()=>E,IH:()=>u,Q5:()=>h,Q6:()=>s,QL:()=>m,QN:()=>i.Q,Yg:()=>p,Z6:()=>l,bK:()=>o,bW:()=>d,i2:()=>_,t3:()=>r,yF:()=>y,zi:()=>g});var i=n(37756);n(74647);const r="HPTO_COMPONENT_MOUNTED",s="HPTO_LOG_EVENT",a="HPTO_LOG_ERROR_EVENT",o=e=>({type:i.Q.GOT_TEMPLATE,data:e}),l=()=>({type:i.Q.HPTO_CONTAINER_MOUNTED}),c=e=>({type:r,element:e}),u=e=>({type:i.Q.HPTO_COMPONENT_UNMOUNTED,data:{clearCreative:e}}),d=()=>({type:i.Q.HPTO_COMPONENT_NEW_AD_RENDERED}),p=()=>({type:i.Q.FETCH_CREATIVE}),m=()=>({type:i.Q.FETCHING_CREATIVE}),h=e=>({type:i.Q.GOT_CREATIVE,data:e}),f=e=>({type:i.Q.SET_HPTO_PREVIEW,data:e}),g=()=>({type:i.Q.HPTO_PREVIEW_HOME_NAVIGATION}),E=()=>({type:i.Q.CREATIVE_FETCH_FAILED}),_=(e,t="")=>({type:s,event:e,context:t}),y=e=>({type:a,error:e}),v=()=>({type:i.Q.DEBUG_FORCE_REFRESH_HPTO})},74647:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var i=n(37756);const r=()=>({type:i.Q.HPTO_CONTAINER_LOAD})},50279:(e,t,n)=>{"use strict";n.d(t,{$F:()=>a,Dr:()=>l,KI:()=>d,V0:()=>u,YO:()=>p,nC:()=>h,t$:()=>m,uW:()=>c,ye:()=>f});var i=n(42551),r=n(51776);const s=[r.G.NATIVE,r.G.IMAGE,r.G.HTML],a=e=>e.ads.hpto?.template||null,o=e=>e.ads.root.isHptoHidden,l=e=>e.ads.hpto?.hptoIsStable||null,c=e=>e.ads.root.isPremium,u=e=>"1"===e.session.productState?.["has-audiobooks-subscription"],d=e=>e.ads.hpto?.creativeFetchingState||null,p=(0,i.Mz)((e=>e.ads.hpto?.creative||null),(e=>e.ads.hpto?.preview||null),((e,t)=>t||e)),m=(0,i.Mz)(p,c,o,((e,t,n)=>{if(!e)return!1;return!(!s.includes(e.bannerMode)||t&&n)})),h=(0,i.Mz)(c,o,((e,t)=>!e||!t)),f=(0,i.Mz)(p,(e=>!!e&&s.includes(e.bannerMode)))},54165:(e,t,n)=>{"use strict";n.d(t,{DD:()=>E,Ei:()=>m,Lc:()=>_,Rl:()=>a,Uh:()=>u,Um:()=>r,Uy:()=>i,Xv:()=>l,i2:()=>y,lj:()=>p,nk:()=>s,tb:()=>h,uP:()=>d,uU:()=>g,wz:()=>v,zB:()=>o,zV:()=>f,zc:()=>c});const i="REQUEST_SPONSORED_PLAYLISTS",r="REQUEST_SPONSORED_PLAYLISTS_SUCCESS",s="REQUEST_SPONSORED_PLAYLIST_AD",a="REQUEST_SPONSORED_PLAYLIST_AD_SUCCESS",o="LOG_EVENT_SPONSORED_PLAYLIST",l="SPONSORED_PLAYLIST_RENDERED",c="SPONSORED_PLAYLIST_DESTROYED",u="SET_SPONSORED_PREVIEW_AD",d=e=>({type:s,playlistUri:e}),p=e=>({type:r,sponsorships:e}),m=e=>({type:"REQUEST_SPONSORED_PLAYLISTS_FAILURE",error:e}),h=()=>({type:l}),f=()=>({type:c}),g=()=>({type:i}),E=(e,t)=>({type:a,playlistUri:e,ad:t}),_=e=>({type:u,previewAd:e}),y=e=>({type:o,message:e}),v=e=>({type:"REQUEST_SPONSORED_PLAYLIST_AD_FAILURE",error:e})},78813:(e,t,n)=>{"use strict";n.d(t,{MW:()=>s,Oc:()=>r,Pu:()=>o,QN:()=>i,W_:()=>a,gW:()=>c,i2:()=>l,iB:()=>u});const i={MINIMIZE_VIDEO_AD_VIEW:"MINIMIZE_VIDEO_AD_VIEW",MAXIMIZE_VIDEO_AD_VIEW:"MAXIMIZE_VIDEO_AD_VIEW",HIDE_VIDEO_AD_VIEW:"HIDE_VIDEO_AD_VIEW",SHOW_VIDEO_AD_VIEW:"SHOW_VIDEO_AD_VIEW",VTO_LOG_EVENT:"VTO_LOG_EVENT",VTO_SET_INFO:"VTO_SET_INFO",VTO_NAVIGATION_CHANGE:"VTO_NAVIGATION_CHANGE"},r=()=>({type:i.MINIMIZE_VIDEO_AD_VIEW}),s=()=>({type:i.MAXIMIZE_VIDEO_AD_VIEW}),a=()=>({type:i.HIDE_VIDEO_AD_VIEW}),o=()=>({type:i.SHOW_VIDEO_AD_VIEW}),l=(e,t,n)=>({type:i.VTO_LOG_EVENT,event:e,eventReason:t,eventSource:n}),c=e=>({type:i.VTO_SET_INFO,info:e}),u=()=>({type:i.VTO_NAVIGATION_CHANGE})},2448:(e,t,n)=>{"use strict";n.d(t,{adsCoreConnector:()=>_,l:()=>u,slotsClient:()=>o});var i=n(36916),r=n(18190);const s=(0,n(27241).X)(),a=new i.CJ(s),o=new i.Dt(s),l=new i.Xk(s),c=new i.B3(s),u=new i.NB(s),d=new i.RI(s),p=new i.Yl(s),m=new r.GD(s),h=new i.s(s),f=new i.uC(s),g=new i.s(s),E=new i.Yk(s);const _=new class{addNewSlot(e,t){return o.createSlot(i.Ym.fromPartial({slotId:e}))}clearSlot(e){return o.clearAllAds(i.Jn.fromPartial({slotId:e}))}enableSlot(e){return c.updateSlotEnabled(i.S9.fromPartial({slotId:e,enabled:!0}))}async fetchAdForSlot(e){const t=(await a.getAds(i.c7.fromPartial({slotId:e}))).adPackage[e];if(!t)throw new Error("slot-not-defined");if(!t.ads.length)throw new Error("no-ads");return t.ads[0]}fetchSlot(e,t){return o.fetchSlot(i.zN.fromPartial({slotId:e,targetingMap:t}))}getSlotSettings(e){return c.getSlotSettings(i.tn.fromPartial({slotId:e}))}getSlot(e){return o.getSlot(i.on.fromPartial({slotId:e}))}increaseStreamTime(e){return p.addPlaytime(i.Sk.fromPartial({seconds:e}))}insertStreamAd(e){return p.insertAds(i.Tm.fromPartial({adsJson:e}))}overrideCountry(e){return p.requestOverride({key:"country",value:e})}putState(e,t){return h.putState(i.ic.fromPartial({state:{[e]:t}}))}putTargeting(e){return l.putTargeting(e)}subscribeToInStreamAds(e){return d.subInStream({},e)}subscribeToSlot(e,t){return o.subSlot(i.SubSlotRequest.fromPartial({slotId:e}),(e=>t(e)))}triggerSlot(e){return o.triggerSlot(i.sL.fromPartial({slotId:e}))}skipToNextWithOverride(){m.skipNext(r.od.fromPartial({options:{overrideRestrictions:!0}}))}setRequestHeader(e,t,n){return c.setRequestHeaders(i.rK.fromPartial({requestHeaders:{[e]:t},refreshInventory:n}))}removeRequestHeader(e,t){return c.deleteRequestHeaders(i.kf.fromPartial({field:e,refreshInventory:t}))}updateAdServerEndpoint(e,t){return c.updateAdServerEndpoint(i.Ws.fromPartial({slotIds:e,url:t}))}updateAdStateEndpoint(e){return c.updateAdStateEndpoint(i.UV.fromPartial({url:e}))}subscribeToAdFormat(e,t){return f.subFormat(i.V9.fromPartial({format:e}),t)}subscribeToState(e){return g.subState({},e)}getAdState(){return g.getState({})}overridePodcastMetadata(e){return E.overrideMetadata(i.rN.fromPartial(e))}}},94506:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});const i=(0,n(45695).h)()},58111:(e,t,n)=>{"use strict";function i(...e){return console.log("cosmos-connector: ",...e),e}function r(...e){return console.log("ads-core-connector: ",...e),e}n.d(t,{$:()=>r,I:()=>i})},94784:(e,t,n)=>{"use strict";n.d(t,{Q:()=>A});var i=n(26380),r=n(94506),s=n(58111),a=n(27241);const o=new i.EW((0,a.X)()),l={"Content-Type":"application/json"};const c=Date.now(),u="https://spclient.wg.spotify.com/ads/v1/ads",d="https://spclient.wg.spotify.com/sponsoredplaylist/v1/sponsored",p="sp://ads/v1/slots",m="sp://ads/v1/settings",h=`${m}/request_header`,f="sp://ads/v1/state",g="sp://ads/v2/state",E=["audio","video","banner"];let _=u,y=d;function v(e,t){r.l.sub("sp://ads/v1/formats/"+e,(e=>{t(e)}))}function b(e){return r.l.get(`${m}/${e}`,l)}function S(e,t){return r.l.post(`${p}/${e}/${t}`,{},l)}const A={subscribeToFormat:v,getSlotConfigurations:b,subscribeToAdsProductState:function(e){return o.subValues(i.cF.fromPartial({}),(t=>{t.pairs.ads&&e({ads:t.pairs.ads})}))},subscribeToProductState:function(e,t){return o.subValues(i.cF.fromPartial({}),(n=>{n.pairs[e]&&t({[e]:n.pairs[e]})}))},getAdSlotConfig:e=>b(e).then((t=>t.settings.filter((t=>t.id===e))[0])),getAdForSlot(e,t,n){(0,s.I)("fetch ad for slot=%o, localTargeting=%o",t,e,_);const i=_!==u?_:`${_}/${t}`;return r.l.get(i,{targeting:e,pod:{},session_id:c,overrides:n||{}},{}).then((e=>{if(!e.pod)throw new Error("pod-not-defined");if(!e.pod[t])throw new Error("slot-not-defined");if(0===e.pod[t].length)throw new Error("no-ads");return e.pod[t][0]}))},fetchAdForSlot(e,t){const n=`sp://ads/v1/ads/${e}`;(0,s.I)("fetchAdForSlot endpoint=%o",n);return r.l.get(n,t,{}).then((t=>{if(!t[e])throw new Error("slot-not-defined");if(0===t[e].length)throw new Error("no-ads");return t[e][0]}))},requestPreviewAd:e=>((0,s.I)("Requesting preview ad, adid=%o",e),r.l.post(`sp://ads/v1/preview/${e}`,{})),overrideCountry:e=>((0,s.I)("Overring country=%o",e),r.l.put("sp://ads/v2/testing/request_override/country",{value:e})),patchTargeting:(e,t)=>r.l.put(`sp://ads/v1/targeting/${e}`,{value:t},l),increaseStreamTime:e=>r.l.post("sp://ads/v1/testing/playtime",{value:e},l),addNewSlot:(e,t)=>r.l.put(`${p}/${e}`,{formats:[t]},l).then((()=>`${p}/${e}/${t}`)),subscribeToSlot:(e,t)=>r.l.sub(e,(e=>{t(e)})),subscribeToSlotType:(e,t)=>r.l.sub(`${p}/${e}`,(e=>{t(e)})),subscribeToAllFormats(e){E.map((t=>{v(t,(n=>{e(t,n)}))}))},subscribeToEvent:function(e,t,n,i){return r.l.sub((e=>`sp://ads/v1/events/${e}`)(e),t,n,i)},postEvent:function(e,t,n){const i=`sp://ads/v1/events/${t}/${e}`;if(n&&n.event_data){if(Object.keys(n.event_data).some((e=>"string"!=typeof n.event_data?.[e])))return Promise.reject(new TypeError("Invalid Payload. All event_data values need to be strings. Furthermore, event_data shouldn't even be used at all anymore since it has been deprecated with https://ghe.spotify.net/ads/adscore-docs/pull/6"))}return r.l.post(i,n||{},l)},postToSlot(e,t,n){const i=`${p}/${e}/${t}`;return r.l.post(i,n||{},l)},getSlotConfiguration:(e,t)=>window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds?Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds):b(e).then((n=>{let i;return n.settings.forEach((n=>{n.id===e&&(i=n[t])})),i})),configureSlot:(e,t,n)=>r.l.put(`${m}/${e}/${t}`,{value:n},l),enableSlot:e=>r.l.put(`${m}/${e}/slot_enabled`,{value:!0},l),getSponsorshipAd(e){const t=y!==d?y:`${d}/${e}`;return(0,s.I)("getSponsorshipAd",t),r.l.get(t)},subToState(e){r.l.sub(f,e)},subToAdState(e){r.l.sub(g,e)},getState:()=>r.l.get(f),getAdState:()=>r.l.get(g),getFeatureFlags:e=>r.l.post("sp://abba/v1/flags",{flags:e},l),setAdSlotEndpoint(e){_=e,(0,s.I)("setAdSlotEndpoint",e)},setAdStatePusherEndpoint:e=>((0,s.I)("setAdStatePusherEndpoint",e),r.l.put("sp://ads/v2/settings/state/ad_state_endpoint",{value:e},l)),setSponsoredUri(e){y=e,(0,s.I)("setSponsoredUri",e)},triggerSlotFetch:e=>S(e,"fetch"),triggerSlotPlay:e=>S(e,"now"),triggerSlotClear:e=>S(e,"clear"),triggerSlotClearAll:e=>S(e,"clear_all"),setRequestHeader:(e,t,n)=>r.l.put(`${h}/${e}`,{value:t,refresh_inventory:n},l),removeRequestHeader:(e,t)=>r.l.del(`${h}/${e}`,{refresh_inventory:t},l),setAdStateKey:(e,t)=>r.l.put(`${g}/${e}`,{value:t},l),setAdState:e=>r.l.put(`${g}`,e,l),loadAdPod:e=>((0,s.I)("Loading ad pod via cosmos",e),r.l.put("sp://ads/v2/testing/insert_ads",{value:JSON.stringify(e)},l)),overridePodcastMetadata:function(e){return(0,s.I)("Overriding podcast metadata",e),r.l.put("sp://ads/v1/podcast/metadata",e,l)},logAudioVolume:async function(e){await r.l.put("sp://device_state/state",{volume:e},l)}}},35426:(e,t,n)=>{"use strict";n.d(t,{D:()=>y,z:()=>b});var i=n(73075),r=n.n(i),s=n(17429),a=n(2448),o=n(58111),l=n(94784);const c="https://admocker.spotify.com";const u="podcast_midroll_15_clickthrough",d="podcast-midroll-1",p={segments:[{slot:d,start:3e4,stop:45e3,targeting:{maxads:"1"},admockerTestCase:u}]};var m=n(1599);let h;function f(e){return(0,o.$)("testingClient.addPlaytime seconds=%o",e),a.adsCoreConnector.increaseStreamTime(e)}async function g(e,t){const n=Array.isArray(e)?e:[e],i=await a.adsCoreConnector.updateAdServerEndpoint(n,t);(0,o.$)("settingsClient.updateAdServerEndpoint slotId=%o url=%o res=%o",n,t,i),E()}function E(){h?._debugForceRefreshHpto?.()}function _(e,t){return function(e,t){return`${c}/mock/ad?test_case=${e}&session_id=${t}`}(e.admockerTestCase,t)}const y={getMocksList:async function(){return(0,s.V_)(m.n.getInstance())},overrideCountry:function(e){return(0,o.$)("testingClient.requestOverride country=%o",e),a.adsCoreConnector.overrideCountry(e)},patchTargeting:function(e,t){return a.adsCoreConnector.putTargeting({targetingMap:{[e]:t}})},increaseStreamTime:f,overrideAdServerEndpoint:g,overrideAdStatePusherEndpoint:function(e){return a.adsCoreConnector.updateAdStateEndpoint(e)},overrideSponsoredPlaylistEndpoint:function(e){l.Q.setSponsoredUri(e),h?.overrideSponsoredPlaylistEndpoint?.()},_debugForceRefreshHpto:E,manualPodLoad:function(e){return(0,o.$)("testingClient.insertAds manualPodLoad pod=%o",e),a.adsCoreConnector.insertStreamAd(JSON.stringify(e))},clearSlot:function(e){return(0,o.$)("slotsClient.clearAllAds slot=%o",e),a.adsCoreConnector.clearSlot(e)},triggerSlot:async function(e){return(0,o.$)("slotsClient.triggerSlot slotId=%o",e),a.adsCoreConnector.triggerSlot(e)},subToFormat:function(e,t){if(!t)throw new Error("subToFormat: no callback provided");return(0,o.$)("formatsClient.subFormat subscribing to format=%o",e),a.adsCoreConnector.subscribeToAdFormat(e,t)},subToAdState:function(e){if(!e)throw new Error("subToState: no callback provided");return(0,o.$)("stateClient.subState subscribing to state"),a.adsCoreConnector.subscribeToState(e)},getSlot:function(e){return a.adsCoreConnector.getSlot(e).then((e=>((0,o.$)("slot: %o",e),e)))},getAdState:async function(){const e=await a.adsCoreConnector.getAdState();(0,o.$)("stateClient.getState ad state: %o",e)},getAdSlotConfigurations:async function(e){const t=await a.adsCoreConnector.getSlotSettings(e);return(0,o.$)(`config for slot=${e} res=%o`,t),t},setRequestHeader:function(e,t,n){return a.adsCoreConnector.setRequestHeader(e,t,n)},removeRequestHeader:function(e,t){return a.adsCoreConnector.removeRequestHeader(e,t)},createSlotAndOverrideItsAdServerEndpoint:async function(e,t){(0,o.$)("slotsClient.createSlot adding new slot %o",e);try{await a.adsCoreConnector.addNewSlot(e),await g(e,t)}catch(t){(0,o.$)(`slotsClient.createSlot problem creating and overriding ${e} slot, error=%o`,t)}},enableSlot:function(e){return(0,o.$)("settingsClient.updateSlotEnabled slot=%o",e),a.adsCoreConnector.enableSlot(e)},queueVideoAd:function(){return Promise.all([a.adsCoreConnector.addNewSlot("stream","video"),a.adsCoreConnector.increaseStreamTime(1200),a.adsCoreConnector.putTargeting({targetingMap:{focus:"true",adbreak:"video,adscore"}})])},setBillboardTimeout(e){y.adFormatOverrides.billboardShowAfterSeconds=e},applyAdmockerForPodcastAd:function({podcastMetadata:e=p,sessionId:t="1"}){e.segments.forEach((e=>{const n=_(e,t);g(e.slot,n)}));const n={segments:e.segments.map((e=>({slotId:e.slot,startMs:BigInt(e.start),stopMs:BigInt(e.stop)})))};return a.adsCoreConnector.overridePodcastMetadata(n)},adFormatOverrides:{billboardShowAfterSeconds:null},fetchAdAndEnqueue:async function(e,t="1"){const n=`https://admocker.spotify.com/mock/ad?test_case=${e}&session_id=${t}`,i=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await i.json(),s=JSON.stringify(r);(0,o.$)("testingClient.insertStreamAd url=%o",n);const l=await a.adsCoreConnector.insertStreamAd(s);if(0!==l.status)throw new Error(`non zero response on insert: ${l.status}`);return l}};let v=!1;function b(e){h=e,v||(r().unbind("shift+f5"),r().bind("shift+f5",(()=>{f(1200)})),v=!0,window.Ads=y)}},65521:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});class i{static listeners=[];static intervalId=null;static previousFocus=!1;static kPollTimeout=500;static reset(){i.listeners=[],i.previousFocus=!1,i.intervalId&&(clearInterval(i.intervalId),i.intervalId=null)}static maybeStartPolling(){null===i.intervalId&&(i.intervalId=setInterval(i.checkFocusState,i.kPollTimeout))}static maybeStopPolling(){i.intervalId&&0===i.listeners.length&&(clearInterval(i.intervalId),i.intervalId=null)}static addFocusListener(e){e.onFocusChanged(document.hasFocus()),i.listeners.push(e),i.maybeStartPolling()}static removeFocusListener(e){i.listeners=i.listeners.filter((t=>t!==e)),i.maybeStopPolling()}static checkFocusState=()=>{const e=document.hasFocus();e!==i.previousFocus&&(i.previousFocus=e,i.listeners.forEach((t=>{t.onFocusChanged(e)})))}}class r{constructor(){this.listeners=[]}addFocusListener(e){this.listeners.push(e),i.addFocusListener(e)}removeFocusListener(e){this.listeners=this.listeners.filter((t=>t!==e)),i.removeFocusListener(e)}removeAllFocusListeners(){this.listeners.forEach((e=>i.removeFocusListener(e))),this.listeners=[]}hasFocus(){return document.hasFocus()}}},18858:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});const i="visible_unknown",r={root:null,rootMargin:"",thresholds:[],observe(){},disconnect(){},takeRecords:()=>[],unobserve(){}};class s{constructor(e={threshold:[0,.5,1]}){this.currentState=i,this.intersectionObserver=r,IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(this.onObservation,e))}onObservation=e=>{const t=e[0].intersectionRatio;let n=i;1===t?n="visible_100":t>=.5?n="visible_50":t<.5&&(n="visible_0"),n!==this.currentState&&(this.currentState=n,this.callback&&this.callback(this.currentState))};observe(e,t){this.callback=t,this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver.disconnect()}}},78747:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,w:()=>s});var i=n(30758);const r=()=>e=>fetch(e,{mode:"no-cors"});function s(e){return(0,i.useMemo)((()=>e()),[e])}},32411:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(91008);function r(e){const t=(0,i.o_h)(e);return function(e){return null!==e}(t)?t.toURI():e}},51776:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,G:()=>r});let i=function(e){return e.NOT_FETCHING="NOT_FETCHING",e.FETCHING="FETCHING",e.FETCHED="FETCHED",e.FAILED="FAILED",e}({}),r=function(e){return e.IMAGE="image",e.HTML="html",e.NATIVE="native",e}({})},36012:(e,t,n)=>{"use strict";n.d(t,{R:()=>r,r:()=>i});const i={billboard:"billboard",hpto:"hpto",leaderboard:"leaderboard","podcast-preroll":"podcast-preroll","podcast-midroll-1":"podcast-midroll-1","podcast-midroll-2":"podcast-midroll-2","podcast-midroll-3":"podcast-midroll-3","podcast-midroll-4":"podcast-midroll-4","podcast-midroll-5":"podcast-midroll-5","podcast-postroll":"podcast-postroll","sponsored-playlist":"sponsored-playlist",stream:"stream"},r=(Object.values(i),e=>e in i)},63676:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,c:()=>i});let i=function(e){return e.ADVERTISER_SUBTITLE="advertiser_subtitle",e.ADVERTISER_TITLE="advertiser_title",e.CTA_BUTTON="cta_button",e.COMPANION_CARD="companion_card",e.VIDEO_PLAYER="video_player",e.COVER_ART="cover_art",e.AD_LOGO="ad_logo",e.MINIMIZED_VIDEO_TAKEOVER="minimized_video_takeover",e}({}),r=function(e){return e.AD_NPV="ad_npv",e.NPB="npb",e.VIDEO_PLAYER="video_player",e}({})},30714:(e,t,n)=>{"use strict";n.d(t,{Lv:()=>l,Wh:()=>o,ee:()=>s,ei:()=>c});var i=n(69587),r=n(36916);let s=function(e){return e.CLICKED="clicked",e.COLLAPSED="collapsed",e.EXPANDED="expanded",e.VIEWED="viewed",e}({}),a=function(e){return e.FOREGROUNDED="foregrounded",e.BACKGROUNDED="backgrounded",e}({}),o=function(e){return e.CTA_BUTTON="cta_button",e.MINIMIZE_BUTTON="minimize_button",e.VIDEO_TAKEOVER="video_takeover",e}({}),l=function(e){return e.VIDEO_PLAYER="video_player",e}({});class c{enabled=!1;active=!1;subscription=null;fireImpressionOnStart=!1;constructor(e,t,n){this.focusState=e,this.videoTakeoverApi=t,this.inStreamApi=n}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),this.inStreamApi.enable(this.onAdMessage),this.subscription=this.inStreamApi.subscribeToInStreamAds()),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.subscription&&this.subscription.cancel(),this.focusState.removeAllFocusListeners(),this.inStreamApi.disable())}logEvent(e,t,n){this.playbackState&&this.log(e,t,n)}onRender(){this.logEvent(this.focusState.hasFocus()?a.FOREGROUNDED:a.BACKGROUNDED)}onFocusChanged(e){return e?this.handleApplicationGainedFocus():this.handleApplicationLostFocus()}parseInfo(e){return{id:e.adId,advertiser:e.metadata.advertiser,buttonMessage:e.metadata.buttonMessage||null,clickUrl:e.clickthroughUrl,skippableAdDelaySeconds:parseInt(e.metadata?.skippable_ad_delay,10)||0}}onAdMessage=({ad:e})=>{if(e?.format===r.nM.VIDEO&&this.listener&&e){const{metadata:t}=e;this.fireImpressionOnStart="true"===t.fireImpressionOnStart,this.listener.onInfo(this.parseInfo(e))}};resetState(){this.playbackState=null}async handleApplicationGainedFocus(){this.active&&this.logEvent(a.FOREGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","true"),this.videoTakeoverApi.patchTargeting("adbreak","video,adscore")])}async handleApplicationLostFocus(){this.active&&this.logEvent(a.BACKGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","false"),this.videoTakeoverApi.patchTargeting("adbreak","adscore")])}log(e,t,n){this.playbackState&&this.videoTakeoverApi.postEvent({adId:this.playbackState.adId,eventType:e,playbackPosition:BigInt(Math.floor(1e3*this.playbackState.position)),eventReason:t,eventSource:n})}onCreated(e){this.active=!0,this.playbackState=e,this.listener&&this.listener.onCreated()}onEnded(e,t){this.active=!1,this.playbackState=e,i.mT.PLAYED_TO_END!==t||this.fireImpressionOnStart||this.logEvent(s.VIEWED),this.listener&&this.listener.onEnded(),this.playbackState=null}onStarted(e){this.playbackState=e,this.fireImpressionOnStart&&this.logEvent(s.VIEWED),this.listener&&this.listener.onStarted()}onStateUpdate(e){this.playbackState=e}onReady(){this.listener&&this.listener.onFirstReady()}getEnabled(){return this.enabled}}},2274:(e,t,n)=>{"use strict";n.d(t,{CJ:()=>r,D$:()=>a,F$:()=>s,NI:()=>o,vA:()=>l});var i=n(5545);let r=function(e){return e.DISLIKE_AD="DISLIKE_AD",e.CANCEL_DISLIKE_AD="CANCEL_DISLIKE_AD",e.LIKE_AD="LIKE_AD",e.CANCEL_LIKE_AD="CANCEL_LIKE_AD",e}({});const s=(0,i.VP)(r.LIKE_AD),a=(0,i.VP)(r.CANCEL_LIKE_AD),o=(0,i.VP)(r.DISLIKE_AD),l=(0,i.VP)(r.CANCEL_DISLIKE_AD)},87633:(e,t,n)=>{"use strict";n.d(t,{M:()=>Ke,x:()=>ze});var i={};n.r(i),n.d(i,{getAlbum:()=>ge});var r={};n.r(r),n.d(r,{getArtist:()=>Ee});var s={};n.r(s),n.d(s,{getOnDemandPlaylists:()=>ye,getPlaylist:()=>_e});var a={};n.r(a),n.d(a,{getTrack:()=>be});var o=n(1599),l=n(72671);async function c(){return(await function(e,t){const n=(e||o.n.getInstance()).build();return(t?n.withHeaders(t):n).withHost(l.oD).withPath("/v2/config").withEndpointIdentifier("/v2/config").send()}()).body}var u=n(36916),d=n(2448),p=n(36012);const m={[u.AdSlotEvent_AdSlotEventType.AVAILABLE]:"available",[u.AdSlotEvent_AdSlotEventType.PLAY]:"play",[u.AdSlotEvent_AdSlotEventType.DISCARD]:"discard",[u.AdSlotEvent_AdSlotEventType.UNRECOGNIZED]:"unrecognized"},h={[u.nM.UNKNOWN]:"unknown",[u.nM.AUDIO]:"audio",[u.nM.VIDEO]:"video",[u.nM.DISPLAY]:"banner",[u.nM.DUMMY]:"dummy",[u.nM.UNRECOGNIZED]:"unrecognized"},f=e=>{const t=m[e];if((e=>e===m[u.AdSlotEvent_AdSlotEventType.AVAILABLE]||e===m[u.AdSlotEvent_AdSlotEventType.PLAY]||e===m[u.AdSlotEvent_AdSlotEventType.DISCARD])(t))return t;throw new Error(`not billboard event type ${t}`)},g=e=>{const t=h[e];if((e=>e===h[u.nM.DISPLAY]||e===h[u.nM.DUMMY])(t))return t;throw new Error(`not billboard format type ${t}`)};class E{constructor(e){this.adsCoreConnector=e}async addNewSlot(e,t){return await this.adsCoreConnector.addNewSlot(e),e}async getSlotConfiguration(e,t){if(window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds)return Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds);const{slotSettings:n}=await this.adsCoreConnector.getSlotSettings(e),i=Number(n[0][t]);if(void 0===i)throw new Error("billboard settings value undefined");return i}async patchTargeting(e,t){const n={targetingMap:{[e]:t}},{targetingMap:i}=await this.adsCoreConnector.putTargeting(n);return i}async postEvent(e,t,n){const i={adId:e,eventType:t,...n.event_data};return await d.l.postEvent(i),Promise.resolve({event:"sent"})}async postToSlot(e,t){if("now"===t)await this.adsCoreConnector.triggerSlot(e);else{if("fetch"!==t)throw new Error(`billboard intent not recognized. ${t}`);await this.adsCoreConnector.fetchSlot(e)}return Promise.resolve({slotId:e,intent:t})}subscribeToSlotType(e,t){return this.adsCoreConnector.subscribeToSlot(e,function(e){return t=>{try{if(t&&t.adSlotEvent&&t.adSlotEvent.ad){const{eventType:n,format:i,ad:{adId:r,clickthroughUrl:s,metadata:a,display:o,isDummy:l,requestId:c,coverArt:[{url:u}]}}=t.adSlotEvent,{advertiser:d,title:p,creative_id:m}=a,h=g(Number(i)),E=f(n),{duration:_,url:y}=o[0],v=Number(_);return e({ad:{id:r,uri:`spotify:ad:${r}`,advertiser:d,title:p,click_url:s,duration:v,ad_type:0,test_ad:!1,skippable:!1,creative_id:m,dummy:l,ad_playback_id:c,format:h,metadata:a,companion_ad:u?{url:u}:void 0,images:y?[{url:y}]:void 0},event:E,format:h})}throw new Error("no data on BillboardEvent")}catch(e){throw new Error("error mapping billboard data")}}}(t))}async triggerSlotClearAll(e){if((0,p.R)(e))return await this.adsCoreConnector.clearSlot(e),{slotCleared:!0};throw new Error(`slot is not a reconized type ${e}`)}}const _=!0,y=!1,v=[];function b(e,t){const n=I(t);if(-1===n)v.push({fn:t,msInactive:e,isActive:!1});else{const t=v[n];t.msInactive=e,clearTimeout(t.inactiveTimeout),t.inactiveTimeout=setTimeout(t.fn.bind(null,y),t.msInactive)}return S.bind(null,t)}function S(e){const t=I(e);return-1!==t&&(v.splice(t,1),!0)}function A(e){return e.addEventListener("mousemove",T),e.addEventListener("mouseup",T),e.addEventListener("keydown",T),e.addEventListener("scroll",T,!0),C.bind(null,e)}function C(e){e.removeEventListener("mousemove",T),e.removeEventListener("mouseup",T),e.removeEventListener("keydown",T),e.removeEventListener("scroll",T,!0)}function T(){v.forEach((e=>{e.isActive||(e.isActive=!0,e.fn(_)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{e.isActive=!1,e.fn(y)}),e.msInactive)}))}function I(e){let t=-1;return v.some(((n,i)=>n.fn===e&&(t=i,!0))),t}var O=n(32411);const w="billboard",N="foregrounded",R="backgrounded";class P{enabled=!1;activating=!1;viewedTimestamp=0;constructor(e,t){this.billboardApi=e,this.focusState=t}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),this.disableWindow=A(window),this.activitySubscription=b(18e4,this.onActivity),await this.billboardApi.addNewSlot(w,"video"),this.subscription=this.billboardApi.subscribeToSlotType(w,this.onAdMessage)),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.subscription&&this.subscription.cancel(),this.activitySubscription&&this.activitySubscription(),this.disableWindow&&this.disableWindow(),this.focusState.removeAllFocusListeners())}minimize(){clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.minimizeTimeoutId=window.setTimeout(this.finish,3e4),this.logEvent("collapsed",{msSinceViewed:String((new Date).getTime()-this.viewedTimestamp)})}adClick(){this.logEvent("clicked")}onRender(){this.logEvent(this.focusState.hasFocus()?N:R)}onError(){this.handleDiscard()}onFinish(){this.finish()}onFocusChanged(e){return e?this.handleApplicationGainedFocus():this.handleApplicationLostFocus()}onActivity=async e=>{e?this.focusState.hasFocus()&&this.triggerAutoMinimizeIfPossible():await this.displayBillboard()};onAdMessage=e=>{if(this.isPreviewServiceAd(e.ad.metadata))this.handlePreview(e);else if(this.listener)switch(e.event){case"available":this.adId=e&&e.ad?e.ad.id:void 0,this.listener.canShow()?this.listener.create(this.mapBillboardData(e)):this.clearSlot();break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`[Billboard] Unsupported event type: ${e.event}`)}};handleDiscard(){if(clearInterval(this.retryDfpTimoutId),this.listener){const e=!this.listener.isActive();this.listener.isActive()&&this.logEvent("terminated"),this.resetState(),this.listener.destroy().then((()=>{e&&(this.retryDfpTimoutId=window.setTimeout(this.displayBillboard,1e4))}))}}handlePreview(e){if(this.listener)switch(e.event){case"available":this.adId=e&&e.ad?e.ad.id:void 0,this.listener.create(this.mapBillboardData(e)),this.billboardApi.postToSlot(w,"now");break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`Unknown core event from ${w} slot: ${e.event}`)}}isPreviewServiceAd(e){return e&&"true"===e.is_preview}resetState(){clearInterval(this.displayTimeoutId),clearInterval(this.retryTimoutId),clearInterval(this.retryDfpTimoutId),clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.adId=void 0,this.viewedTimestamp=0,this.focusMinimizeTimeoutId=void 0}focusMinimize=()=>{clearInterval(this.focusMinimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.minimize(),this.minimize())};finish=()=>{clearInterval(this.minimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.destroy(),this.logEvent("ended"),this.resetState())};triggerAutoMinimizeIfPossible=()=>{this.listener&&this.listener.isActive()&&!this.focusMinimizeTimeoutId&&(this.focusMinimizeTimeoutId=window.setTimeout(this.focusMinimize,3e4),this.viewedTimestamp=(new Date).getTime(),this.logEvent("viewed"))};async handleApplicationGainedFocus(){if(clearTimeout(this.displayTimeoutId),clearTimeout(this.retryTimoutId),this.listener&&!this.activating){if(this.listener.isActive())return this.logEvent(N),void this.triggerAutoMinimizeIfPossible();this.activating=!0;try{await this.billboardApi.patchTargeting("focus","true"),await this.billboardApi.postToSlot(w,"now")}catch(e){}finally{this.activating=!1}}}async handleApplicationLostFocus(){if(this.listener&&this.listener.isActive())return void this.logEvent(R);clearTimeout(this.displayTimeoutId);const e=await this.getFocusTimeoutMs();this.displayTimeoutId=window.setTimeout(this.displayBillboard,e)}displayBillboard=async()=>{clearTimeout(this.displayTimeoutId),clearTimeout(this.retryTimoutId),this.listener&&this.listener.isActive()||(this.listener&&this.listener.canShow()?(await this.clearSlot(),await this.billboardApi.postToSlot(w,"fetch")):this.retryTimoutId=window.setTimeout((()=>{this.displayBillboard()}),5e3))};async getFocusTimeoutMs(){const e=await this.billboardApi.getSlotConfiguration(w,"display_time_interval").catch((()=>null));return e&&e>0?1e3*e:18e4}logEvent(e,t={}){this.adId&&this.billboardApi.postEvent(this.adId,e,{event_data:{clientReportedUserAgent:navigator.userAgent,...t}})}clearSlot(){return this.billboardApi.triggerSlotClearAll(w)}mapBillboardData(e){const t=e.ad.metadata||{},n={accountUpgrade:t.accountUpgrade,accountUpgradeTracking:t.accountUpgradeTracking,clickUrl:(0,O.H)(e.ad.click_url),companionSrc:"",creativeId:t.creative_id,dummy:e.ad.dummy,id:e.ad.id,isAdaptive:!1,isPreview:"true"===t.is_preview,isValid:!0,lineItemId:t.lineitem_id,mediaSrc:""};switch(e.ad.format){case"banner":n.companionSrc=e.ad.companion_ad&&e.ad.companion_ad.url||"",n.mediaSrc=e.ad.images&&e.ad.images[0]&&e.ad.images[0].url||"";break;case"dummy":break;default:n.isValid=!1}return n}}var L=n(65521);function D(e){const t=new E(e);return new P(t,new L.A)}var k=n(3074),x=n.n(k),U=n(4197),M=n(66513);class B{constructor({initialStatus:e,onOnlineStatusChange:t}){this.isOnline=e||!0,window.addEventListener("online",(()=>{this.isOnline=!0,t?.(!0)})),window.addEventListener("offline",(()=>{this.isOnline=!1,t?.(!1)})),window.addEventListener("visibilitychange",(()=>{if(document.hidden)return;const e=navigator.onLine;this.isOnline=e,t?.(e)}))}getOnlineStatus(){return this.isOnline}}const j="leaderboard";class F{fetching=!1;enabled=!1;currentAd={creativeId:null,lineitemId:null,ad:null};constructor(e={},t,n,i,r,s,a){this.appStartupId=a,this.clearCurrentAd(),this.frameSrc=e.frameSrc,this.focusState=i,this.leaderboardApi=t,this.refreshDecisioner=n,this.refreshDecisioner.setRefreshDelegate(this),this.leaderboardWrapper=null,this.eventSender=r,this.history=s,this.appStartupId=a,this.offlineObserver=new B({onOnlineStatusChange:e=>this.refreshDecisioner.onlineStateChanged(e)})}enableLeaderboard(){this.enabled=!0,this.enableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardEnabled(),this.subscription=this.leaderboardApi.subscribeToSlotType(j,this.onAdSlotEvent)}setLeaderboardElement(e){this.domTarget=e}onNavigationChanged(){this.refreshDecisioner.onNavigationChanged()}enableLeaderboardMessageHandler(){window.removeEventListener("message",this.handleLeaderboardMessage),window.addEventListener("message",this.handleLeaderboardMessage)}disableLeaderboardMessageHandler(){window.removeEventListener("message",this.handleLeaderboardMessage)}handleLeaderboardMessage=e=>{switch(this.currentAd.lineitemId=String(e.data?.data?.lineItemId||""),this.currentAd.creativeId=String(e.data?.data?.creativeId||""),e.data&&e.data.type){case"ads-leaderboard-rendered":""!==this.currentAd.lineitemId&&null!==this.currentAd.creativeId&&this.logLeaderboardEvent("event_viewed");break;case"ads-leaderboard-failed":this.logLeaderboardEvent("event_errored"),this.handleBadLeaderboard()}};logLeaderboardEvent(e){this.eventSender.send((0,M.y)({ad_playback_id:this.adPlaybackId,view_uri:this.history.location.pathname,event:e}));const t=(0,U.A)({event:e,slot:"leaderboard",format:"banner",app_startup_id:this.appStartupId,request_id:this.adPlaybackId,lineitem_id:this.currentAd.lineitemId,creative_id:this.currentAd.creativeId,ad_id:this.currentAd.creativeId,in_focus:document.hasFocus?document.hasFocus():null,event_source:"client"});this.eventSender.send(t)}async requestConfig(){return this.cachedConfig?Promise.resolve(this.cachedConfig):(this.cachedConfig=await this.leaderboardApi.getConfig(),this.cachedConfig)}requestSlot(e){return this.leaderboardApi.getSlot(e).then((e=>(this.adPlaybackId=x().create().hex,e))).catch((e=>{throw new Error(`LeaderboardManager: cant get slot. ${e}`)}))}async fetchAndDisplayLeaderboard(){if(!this.frameSrc)throw new Error("LeaderboardManager: frameSrc must be specified in options. Point it to a blank page on the same domain.");this.domTarget&&(this.fetching||this.enabled&&(this.fetching=!0,this.requestSlot(j).then((e=>{const t=e.html,n=e.adDisplay&&e.adDisplay.width?e.adDisplay.width:"728",i=e.adDisplay&&e.adDisplay.height?e.adDisplay.height:"90";return this.fetching=!1,this.renderLeaderboard(t,n,i)})).catch((e=>{throw this.fetching=!1,Error(`Slot Request and display failed: ${e}`)}))))}onAdSlotEvent=e=>{if(e.ad&&this.isPreviewServiceAd(e.ad)){if(!e.ad.display||e.ad.display.length<1)throw new Error(`Unknown core event from ${j} slot: ${e.eventType}`);const{html:t,width:n,height:i}=this.adToLeaderboard(e.ad);this.renderLeaderboard(t,n,i)}};adToLeaderboard(e){const t=e.display?.find((e=>"text/html"===e.mimeType));if(!t||!t.text)throw Error("No template");return{html:t.text,width:t&&t.width?t.width.toString():"728",height:t&&t.height?t.height.toString():"90"}}isPreviewServiceAd(e){return e.metadata&&"true"===e.metadata.is_preview}renderLeaderboard(e,t,n){const i=document.createElement("iframe");i.addEventListener("load",this.adFrameLoaded.bind(this,i)),i.setAttribute("sandbox",["allow-top-navigation-by-user-activation","allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts",/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?"":"allow-presentation"].join(" ")),i.setAttribute("width",t),i.setAttribute("height",n),i.setAttribute("id","leaderboard-ad-element"),i.setAttribute("src",this.frameSrc),i.setAttribute("srcdoc",e),i.setAttribute("tab-index","-1"),this.leaderboardWrapper=document.createElement("div"),this.leaderboardWrapper.setAttribute("aria-hidden","true"),this.leaderboardWrapper.appendChild(i),this.domTarget.innerHTML="",this.domTarget.appendChild(this.leaderboardWrapper)}adFrameLoaded(e,t){const n=t.composedPath&&t.composedPath()&&t.composedPath()[0].contentWindow||e.contentWindow;this.refreshDecisioner.onViewLoaded(),this.focusState.addFocusListener(this);const i=()=>{this.logLeaderboardEvent("event_unload"),this.refreshDecisioner.onViewUnloaded(),this.focusState.removeFocusListener(this),n.removeEventListener("unload",i)};n.addEventListener("unload",i)}disableLeaderboard(){this.enabled=!1,this.disableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardDisabled(),this.focusState.removeFocusListener(this),this.subscription&&this.subscription.cancel(),this.leaderboardWrapper&&this.leaderboardWrapper.firstChild&&this.leaderboardWrapper.removeChild(this.leaderboardWrapper.firstChild),this.leaderboardWrapper&&this.leaderboardWrapper.parentNode&&this.leaderboardWrapper.parentNode.removeChild(this.leaderboardWrapper),this.leaderboardWrapper=null}handleBadLeaderboard(){this.currentAd.creativeId=null,this.currentAd.lineitemId=null,this.domTarget&&(this.domTarget.innerHTML="")}onFocusChanged(e){this.logLeaderboardEvent(e?"event_foregrounded":"event_backgrounded")}refreshLeaderboard(){this.fetchAndDisplayLeaderboard()}clearCurrentAd(){this.currentAd.creativeId=null,this.currentAd.lineitemId=null,this.currentAd.ad=null}}const V={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};class G{constructor(e){this.adsCoreConnector=e}subscribeToSlotType(e,t){return this.adsCoreConnector.subscribeToSlot(e,(({adSlotEvent:e})=>{e&&t(e)}))}async addSlot(e){return await this.adsCoreConnector.addNewSlot(e,"banner"),await this.adsCoreConnector.enableSlot(e)}async getConfig(){try{const e=await this.adsCoreConnector.getSlotSettings(j);return this.normalizeConfig(e)}catch(e){if(!(e instanceof Error))throw e;if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return V}}async getSlot(e){const t=await this.adsCoreConnector.fetchAdForSlot(e);return this.adToLeaderboardSlotResponse(t)}adToLeaderboardSlotResponse(e){const t=e.display?.find((e=>"text/html"===e.mimeType));if(!t||!t.text)throw Error("No template");return{html:t.text,adDisplay:{width:t.width.toString(),height:t.height.toString()}}}normalizeConfig(e){return{...V,displayTimeIntervalMs:this.coerceDisplayTimeIntervalMs(e?.slotSettings[0]?.displayTimeInterval)}}coerceDisplayTimeIntervalMs(e){return"bigint"==typeof e?Number(BigInt.asIntN(64,e)):Number.isInteger(e)?Number(e):V.displayTimeIntervalMs}}class H{viewTimer=0;lastOnlineStatus=!0;constructor(e){this.focusState=e}setRefreshDelegate(e){this.delegate=e}async onViewLoaded(){const e=await this.delegate.requestConfig();this.viewTimer=e.displayTimeIntervalMs,this.timeOfLastViewUpdate=Date.now(),this.focusState.addFocusListener(this),this.startRefreshTimer()}onViewUnloaded(){this.focusState.removeFocusListener(this),clearTimeout(this.refreshTimeout)}onLeaderboardEnabled(){this.triggerRefresh()}onLeaderboardDisabled(){this.onViewUnloaded()}onNavigationChanged(){return this.updateViewTimer()}onlineStateChanged(e){e!==this.lastOnlineStatus&&(this.lastOnlineStatus=e,e&&this.triggerRefresh())}onFocusChanged(e){e?(this.timeOfLastViewUpdate=Date.now(),this.notifyRefreshIfPossible(),this.startRefreshTimer()):(this.updateViewTimer(),clearTimeout(this.refreshTimeout))}async updateViewTimer(){null===this.timeOfLastViewUpdate&&(this.timeOfLastViewUpdate=Date.now());const e=Date.now()-this.timeOfLastViewUpdate;return this.viewTimer=this.viewTimer-e,this.timeOfLastViewUpdate=Date.now(),this.notifyRefreshIfPossible()}isPastViewThreshold(){return this.delegate.requestConfig().then((e=>e.displayTimeIntervalMs-this.viewTimer>e.timeInViewThresholdMs))}async notifyRefreshIfPossible(){const e=await this.isPastViewThreshold();return e&&this.triggerRefresh(),e}startRefreshTimer(){clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(this.triggerRefresh.bind(this),this.viewTimer)}triggerRefresh(){document.hasFocus()&&this.delegate&&this.delegate.refreshLeaderboard()}}function W(e,t,n,i){const r=new L.A,s=new G(i);return new F({frameSrc:"/blank.html"},s,new H(r),r,e,t,n)}var z=n(99623),K=n(81475),Y=n(98742);const q="stream",$="audio",Z="brand_survey";class Q{constructor(e,t){this.eventSender=e,this.inStreamApi=t}getAdData(){return this.inStreamApi.getInStreamAd()}logAdEvent(e){const t=this.getAdData();let n="";if(e.payload){const t=Y.A7.encode(e.payload).finish();n=(new TextDecoder).decode(t)}const i=u.uk.fromPartial({adId:t?.adId,eventType:e.event,eventReason:e.reason,clientPayload:n});d.l.postEvent(i)}logSurveyAdEventWithAd(e){this.eventSender.send((0,K.i)({ad_id:e.ad.adId,request_id:e.ad.requestId,lineitem_id:e.ad.metadata.lineitem_id,event:e.event,slot:q,format:$,product_name:Z,question_id:e.questionId,option_id:e.optionId,event_reason:e.eventReason,option_position:e.position}))}logSurveyAdEventWithoutAd(e){this.eventSender.send((0,K.i)({event:e.event,slot:q,format:$,product_name:Z,event_reason:e.eventReason}))}logAdError({errorType:e,errorMessage:t}){const n=this.getAdData();this.eventSender.send((0,z.G)({error_type:e,error_message:t,request_type:Z,lineitem_id:n?.metadata.lineitemId,ad_id:n?.metadata.adId,surface:"npv",slot:q,request_id:n?.requestId}))}}const J=(e,t)=>({logger:new Q(e,t)});class X{async postEvent(e){await d.l.postEvent(u.uk.fromPartial(e))}}class ee{enabled=!1;subscription=null;constructor(e,t,n){this.audioApi=e,this.getContextAdInfo=t,this.inStreamApi=n}async enable(e){this.enabled=!0,this.onInfoCallback=e,this.inStreamApi.enable(this.onAdMessage),this.subscription=this.inStreamApi.subscribeToInStreamAds()}async disable(){this.enabled=!1,this.subscription&&this.subscription.cancel(),this.inStreamApi.disable()}async logClick(e,t){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");const n=await this.getContextAdInfo();if(null===n)return;const{positionMs:i,adId:r}=n;null!==r&&this.audioApi.postEvent({adId:r,eventType:"clicked",eventReason:e,eventSource:t,...null!==i&&{playbackPosition:BigInt(Math.round(i))}})}onAdMessage=({ad:e})=>{if(e?.format===u.nM.AUDIO&&e){const{metadata:t}=e,n="Play"===t?.featuredAction,i={buttonMessage:t?.buttonMessage,clickUrl:(0,O.H)(e.clickthroughUrl),isFeaturedActionPlay:n,skippableAdDelaySeconds:parseInt(t?.skippable_ad_delay,10)||0};this.onInfoCallback&&this.onInfoCallback(i)}};getEnabled(){return this.enabled}}function te(e,t){return new ee(new X,e,t)}const ne=async()=>await(await Promise.resolve().then(n.bind(n,2448))).adsCoreConnector.fetchAdForSlot("hpto");var ie=n(78747);class re{constructor(e,t,n){this.eventSender=e,this.appStartupId=t,this.fireTrackingEvent=n}log(e,t,n){t.trackingEvents[e]?.urls.forEach((e=>this.fireTrackingEvent(e))),this.eventSender.send((0,U.A)({ad_id:t.adId,app_startup_id:this.appStartupId,creative_id:t.metadata.creative_id,event:`event_${e}`,event_source:"client",format:(0,u.gh)(t.format).toLowerCase(),lineitem_id:t.metadata.lineitem_id,product_name:"dummy",request_id:t.requestId,slot:"hpto",...n}))}}const se=(e,t)=>({logger:new re(e,t,(0,ie.P)()),fetchHomeAd:ne,enableLegacyHptoContainerLoader:!0});var ae=n(42241),oe=n(91008),le=n(17429);const ce={"discover-weekly":"666f726d61740004","release-radar":"666f726d61740000","time-machine":"666f726d6174f00d","summerjams-a":"666f726d6174f011","summerjams-b":"666f726d6174f012","summerjams-c":"666f726d6174f013","friends-weekly":"666f726d6174f119","on-repeat":"666f726d6174f152"},ue="hpto";class de{constructor(e,t,n,i){this.adsCoreConnector=e,this.nativeHptoApi=t,this.esperantoPreviewParser=n,this.eventSender=i}async getSlot(e){const t=await this.adsCoreConnector.fetchAdForSlot(e),n=t.display.find((e=>"text/html"===e.mimeType));if(!n)throw Error("No template");return{id:t.adId,adPlaybackId:t.requestId,media:n.text,"mime-type":n.mimeType,height:n.height,width:n.width,bitrate:n.bitrate,duration:n.duration}}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}subscribeToPreview(e){return this.adsCoreConnector.addNewSlot(ue),this.adsCoreConnector.enableSlot(ue),this.adsCoreConnector.subscribeToSlot(ue,(t=>{const n=t.adSlotEvent;if(n?.eventType===u.AdSlotEvent_AdSlotEventType.AVAILABLE&&this.esperantoPreviewParser.isPreviewServiceAd(n.ad)){const t=this.esperantoPreviewParser.parsePreview(n.ad);e({...t})}}))}async getAlgoPlaylistInfo(e){if(!(e in ce))return;const t=ce[e],{sponsorships:n}=await(0,le.$L)(),i=n.find((e=>{const n=e.spotifyUri.split(":").at(-1);return(0,oe.Y8v)(n)?.includes(t)}));if(i)return{uri:i.spotifyUri,playBtnUri:i.spotifyUri,uriType:oe.NQG.PLAYLIST};this.eventSender.send((0,z.G)({error_message:"HPTO Sponsored Playlist from GAM not in sponsorships list.",request_type:"hpto"}))}getAlbum(e){return this.nativeHptoApi.getAlbum(e)}getArtist(e){return this.nativeHptoApi.getArtist(e)}getEpisode(e){return this.nativeHptoApi.getEpisode(e)}getPlaylist(e){return this.nativeHptoApi.getPlaylist(e)}getShow(e){return this.nativeHptoApi.getShow(e)}getTrack(e){return this.nativeHptoApi.getTrack(e)}}class pe{constructor(e,t,n){this.spotifyTransport=e,this.endpoints=t,this.imageSelection=n}getAlbum(e){return this.endpoints.Album.getAlbum(this.spotifyTransport,e).then(this.mapDefaultData)}getArtist(e){return this.endpoints.Artist.getArtist(this.spotifyTransport,e).then(this.mapDefaultData)}getEpisode(e){return this.endpoints.Show.getEpisode(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapEpisode)}getPlaylist(e){return this.endpoints.Playlist.getPlaylist(this.spotifyTransport,e).then(this.mapDefaultData)}getShow(e){return this.endpoints.Show.getShow(this.spotifyTransport,e).then(this.mapDefaultData)}getTrack(e){return this.endpoints.Track.getTrack(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapTrack)}mapEpisode=e=>({...e,episodeShowUri:e.show.uri});mapTrack=e=>({...e,smallImage:this.imageSelection(e.album.images||[],{desiredSize:210})});mapDefaultData=({body:e})=>({...e,smallImage:this.imageSelection(e.images||[],{desiredSize:210}),name:e.name,artists:e.artists?e.artists.map((({name:e,uri:t})=>({name:e,uri:t}))):[]})}var me=n(18858);const he="hpto";class fe{timeOfLastViewUpdate=0;refreshCallback=()=>{};visibilityState="";constructor(e,t,n,i,r){this.hptoApi=e,this.focusState=t,this.visibilityObserver=n,this.offlineObserver=i,this.appStartupId=r,this.trackingPixelDiv=document.createElement("div"),this.trackingPixelDiv.setAttribute("id","ad-tracking-pixel"),this.trackingPixelDiv.style.display="none",document.body.appendChild(this.trackingPixelDiv),this.appStartupId=r}subscribeToPreview(e){return this.hptoApi.subscribeToPreview((async t=>{const n=await this.mapData(t);e(n)}))}onRefresh(e){this.refreshCallback=e}fetchTemplate(){return this.hptoApi.getSlot(he).catch((e=>{throw this.logAdEventError("template fetch from ARS failed"),e}))}fetchCreative(e){return new Promise(((t,n)=>{window.addEventListener("message",(function i(r){if("object"==typeof r.data&&"string"==typeof r.data.type){const s=r.data.type.split(":");if("ads"!==s[0]||"hpto"!==s[1])return;if("error"===s[2]||"no-ad"===s[2])n(s[2]);else if("init"===s[2]){const n={...r.data.data.data,loaderFrame:undefined,adPlaybackId:e.adPlaybackId};t(n)}else n("unsupported hpto message");window.removeEventListener("message",i)}}))})).then(this.mapData).catch((e=>{throw"no-ad"!==e&&(this.logErrorEvent(`fetch creative error: ${e}`),this.logAdEventError("creative fetch from GAM failed")),e}))}logEvent(e,t=""){this.log(e,t),"event_clicked"===e&&this.trackPixelClicked()}logErrorEvent(e){const t=(0,z.G)({request_type:he,error_message:e});this.hptoApi.logEvent(t)}createTrackingPixelImage=(e,t)=>{const n=document.createElement("img");return n.src=e,n.alt="",n.style.display="none",n.style.height="1px",n.style.width="1px",n.classList.add("pixel",t),n};trackPixelClicked(){if(!this.currentAd)return;const e=this.currentAd.click,t=this.handleTrackingUrl(e);if(t){this.trackingPixelDiv.innerHTML="";const e=this.createTrackingPixelImage(t,"event_clicked");this.trackingPixelDiv.appendChild(e)}}trackPixelViewed(){if(!this.currentAd)return;this.trackingPixelDiv.innerHTML="";const e=this.currentAd["tracking-urls"],t=this.currentAd["tracking-url"],{creativeId:n,lineItemId:i,advertiserId:r,campaignId:s,adEventTrackerViewUrls:a}=this.currentAd;this.createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:a,adTrackingInfo:{creativeId:n,lineItemId:i,advertiserId:r,campaignId:s}}).map((e=>this.createTrackingPixelImage(e,"view-tracking"))).forEach((e=>{this.trackingPixelDiv.appendChild(e)}))}logViewed(){this.timeOfLastViewUpdate=Date.now(),this.log("event_viewed"),this.trackPixelViewed()}maybeTriggerRefresh(){if(!this.offlineObserver.getOnlineStatus())return;Date.now()-this.timeOfLastViewUpdate>=18e5&&this.focusState.hasFocus()&&("visible_50"===this.visibilityState||"visible_100"===this.visibilityState)&&this.refreshCallback?.()}viewRendered(e){this.timeOfLastViewUpdate=Date.now(),this.focusState.removeAllFocusListeners(),this.focusState.addFocusListener(this),this.visibilityObserver.observe(e,this.onVisibilityChanged)}viewDestroyed(){this.focusState.removeAllFocusListeners(),this.visibilityObserver.disconnect(),this.log("event_unload"),this.currentAd=null}onFocusChanged(e){e?(this.maybeTriggerRefresh(),this.log("event_foregrounded")):this.log("event_backgrounded")}onVisibilityChanged=e=>{const t=this.visibilityState;this.visibilityState=e;"visible_0"===t&&("visible_50"===e||"visible_100"===e)&&this.maybeTriggerRefresh(),this.log(`event_${e}`)};log=(e,t="")=>{if(this.currentAd){const n=(0,U.A)({slot:he,app_startup_id:this.appStartupId,event:e,lineitem_id:String(this.currentAd.lineItemId),creative_id:String(this.currentAd.creativeId),ad_id:String(this.currentAd.creativeId),format:`hpto ${this.currentAd.bannerMode}`,request_id:String(this.currentAd.adPlaybackId),event_source:t?`client-${t}`:"client"});this.hptoApi.logEvent(n)}};logAdEventError=e=>{const t=(0,U.A)({slot:he,app_startup_id:this.appStartupId,event:"event_errored",event_reason:e,event_source:"client"});this.hptoApi.logEvent(t)};mapData=async e=>{this.currentAd={...e};let t=e["target-uri"],n=(0,oe.o_h)(t)?.type,i={episodeShowUri:""},r=e.playBtnUri||t;if("native"===e.bannerMode){const e=await this.hptoApi.getAlgoPlaylistInfo(t);e&&(t=e.uri,r=e.playBtnUri,n=e.uriType),i=await this.getNativeData(t,n)}const s=e.blurb,a=(e.badge||"").toLowerCase(),o=e["background-color"],l=o&&"#"===o[0]?o:`#${o}`,c=e["background-image"],u=(0,O.H)(e["background-url"]),d=u&&u.replace(/&/g,"&"),p="sponsored"===e.nativeHptoType;return{...e,...i,isSponsored:p,uri:i.episodeShowUri||t,uriType:n,badgeType:a,playBtnUri:r,backgroundColor:l,backgroundUrl:u,backgroundImage:c,clickThroughUrl:d,description:s}};maybeModifyUrl(e,t){let n=e;const i=["adeventtracker.spotify.com","adeventtrackermonitoring.spotify.com","aet.spotify.com"];try{const e=new URL(n);if(i.includes(e.host)){const i=e.searchParams;Object.keys(t).forEach((e=>{const n=t[e];i.append(e,n)})),n=e.toString()}}catch(t){const n=(0,z.G)({error_type:"malformedAdEventTrackerUrl",lineitem_id:this.currentAd?.lineItemId,error_message:`cannot parse ad event tracker url: ${e}`});this.hptoApi.logEvent(n)}return n}createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:n=[],adTrackingInfo:i={}}){let r=n.map((e=>this.maybeModifyUrl(e,i)));if(e){const t=e.map(this.handleTrackingUrl).filter(Boolean);r=r.concat(t)}else t&&r.concat(this.handleTrackingUrl(t));return r}handleTrackingUrl=e=>{if(!e)return"";try{return decodeURIComponent(e.replace(/&/g,"&"))}catch(t){if(t instanceof URIError&&"URI malformed"===t.message){const t=(0,z.G)({error_type:"malformedTrackingUrl",lineitem_id:this.currentAd?.lineItemId,error_message:`url is malformed: ${e}`});return this.hptoApi.logEvent(t),""}return""}};getNativeData(e,t){if(!e||!t)return Promise.reject(`error when getting native data: uri: ${e} uriType: ${t}`);const n=e.split(":").pop();if(!n)return Promise.reject("error when getting native data: id not found");switch(t){case oe.NQG.SHOW:return this.hptoApi.getShow(n);case oe.NQG.TRACK:return this.hptoApi.getTrack(n);case oe.NQG.ALBUM:return this.hptoApi.getAlbum(n);case oe.NQG.PLAYLIST:case oe.NQG.PLAYLIST_V2:return this.hptoApi.getPlaylist(n);case oe.NQG.EPISODE:return this.hptoApi.getEpisode(n);default:return Promise.reject(`error when getting native data ${e} is not valid`)}}}function ge(e,t){return e.build().withHost(l.QU).withPath(`/albums/${t}`).withEndpointIdentifier("/albums/{albumId}").send()}function Ee(e,t){return e.build().withHost(l.QU).withPath(`/artists/${t}`).withoutMarket().withEndpointIdentifier("/artists/{artistId}").send()}function _e(e,t,n={additional_types:"track"}){return e.build().withHost(l.QU).withPath(`/playlists/${t}`).withQueryParameters(n).withEndpointIdentifier("/playlists/{playlistId}").send()}function ye(e){return e.build().withHost(l._1).withPath("/select-ondemand-set?format=json").withEndpointIdentifier("/select-ondemand-set").withJsonContentType().withoutMarket().send()}var ve=n(37295);function be(e,t){return e.build().withHost(l.QU).withPath(`/tracks/${t}`).withEndpointIdentifier("/tracks/{trackId}").send()}var Se=n(82935);function Ae(e,t,n){const l=new pe(o.n.getInstance(),{Album:i,Artist:r,Playlist:s,Track:a,Show:ve},Se.h);return new fe(new de(n,l,new ae.$,e),new L.A,new me.j,new B({}),t)}const Ce=()=>o.n.getInstance().build().withHost(l.ip).withPath("/sponsored").withEndpointIdentifier("/sponsored").send();class Te{constructor(e,t){this.eventSender=e,this.adsCoreConnector=t}async getSponsoredUris(){return(await Ce()).body.sponsorships}async getSponsorshipAd(e){try{return(await(0,le.x0)(e)).body}catch(e){throw this.eventSender.send((0,z.G)({request_type:"sponsored",error_message:JSON.stringify({err:e})})),e}}async subscribeToPreview(e){const t="sponsored-playlist";try{this.adsCoreConnector.addNewSlot(t)}catch(e){this.eventSender.send((0,z.G)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))}return this.adsCoreConnector.subscribeToSlot(t,(n=>{const i=new DOMParser,r=n.adSlotEvent?.ad?.display[0]?.text;if(r){const n=i.parseFromString(r,"text/html"),s=JSON.parse(n.querySelector(`[data-template="${t}"]`).innerText);e({...s.sponsoredPlaylist,logoUrl:s.sponsoredPlaylist.logo})}}))}async logEvent({event:e,ad_format:t,lineitem_id:n,creative_id:i,ad_id:r}){this.eventSender.send((0,U.A)({event:e,format:t,lineitem_id:n,creative_id:i,ad_id:r,event_source:"client"}))}}class Ie{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await Ce()).body.sponsorships}async getSponsorshipAd(e){return(await le.x0(e)).body}logEvent(e){return this.eventSender.send((0,U.A)({...e,format:e.ad_format}))}async subscribeToPreview(){return{cancel:()=>{}}}}class Oe{enabled=!1;constructor(e){this.sponsoredPlaylistApi=e}async enable(e){this.enabled=!0,this.subscription=await this.sponsoredPlaylistApi.subscribeToPreview(e)}disable(){this.enabled=!1,this.subscription&&(this.subscription.cancel(),this.subscription=void 0)}async requestSponsoredPlaylists(){if(!this.enabled)throw new Error("You have to enable the manager before calling requestSponsoredPlaylists");return this.sponsoredPlaylistApi.getSponsoredUris()}async requestSponsoredPlaylistAd(e){if(!this.enabled)throw new Error("You have to enable the manager before calling requestSponsoredPlaylistAd");return this.sponsoredPlaylistApi.getSponsorshipAd(e)}async logEvent(e){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");return this.sponsoredPlaylistApi.logEvent(e)}}function we(e,t,n){let i;return i=e?new Te(t,n):new Ie(t),new Oe(i)}class Ne{constructor(e){this.esperantoConnector=e}async patchTargeting(e,t){await this.esperantoConnector.putTargeting(u.SD.fromPartial({targetingMap:{[e]:t}}))}async postEvent(e){await d.l.postEvent(u.uk.fromPartial(e))}}class Re{constructor(e,t,n,i){this.vastEventsTracker=e,this.vtoTracker=t,this.continuousViewabilityTracker=n,this.nonContinuousViewabilityTracker=i}onStarted(e){this.vtoTracker.onStarted(),this.vastEventsTracker.onStarted(),this.continuousViewabilityTracker.onStarted(e),this.nonContinuousViewabilityTracker.onStarted(e)}onResumed(e){this.vastEventsTracker.onResumed(),this.continuousViewabilityTracker.onResumed(e),this.nonContinuousViewabilityTracker.onResumed(e)}onPaused(e){this.vastEventsTracker.onPaused(),this.continuousViewabilityTracker.onPaused(e),this.nonContinuousViewabilityTracker.onPaused(e)}onVolumeChanged(e){this.vtoTracker.onVolumeChanged(e),this.vastEventsTracker.onVolumeChanged(e)}onPlaybackEnded(e){this.vtoTracker.onPlaybackEnded(e),this.vastEventsTracker.onPlaybackEnded(e),this.continuousViewabilityTracker.onPlaybackEnded(e),this.nonContinuousViewabilityTracker.onPlaybackEnded(e)}onDurationChanged(e){this.vtoTracker.onDurationChanged(e),this.vastEventsTracker.onDurationChanged(e),this.nonContinuousViewabilityTracker.onDurationChanged(e)}onPlaybackCreated(e){this.vtoTracker.onPlaybackCreated(e),this.vastEventsTracker.onPlaybackCreated(e),this.continuousViewabilityTracker.onPlaybackCreated(e),this.nonContinuousViewabilityTracker.onPlaybackCreated(e)}onReady(){this.vtoTracker.onReady()}onBuffering(e){this.continuousViewabilityTracker.onBuffering(e),this.nonContinuousViewabilityTracker.onBuffering(e)}onSeeking(e){this.continuousViewabilityTracker.onSeeking(e),this.nonContinuousViewabilityTracker.onSeeking(e)}onSeeked(e){this.continuousViewabilityTracker.onSeeked(e),this.nonContinuousViewabilityTracker.onSeeked(e)}onSubtitleChanged(){}onVideoFormatChanged(){}}class Pe{hasLogged=!1;isSeeking=!1;isPlaying=!1;logTimeout=null;position=0;get trackingEnabled(){return this.focusState.hasFocus()&&this.isPlaying&&!this.isSeeking}constructor(e,t){this.focusState=e,this.adIdentifier=t}onPlaybackCreated(e){this.focusState.addFocusListener(this),this.position=0,this.reset()}onStarted({position:e}){this.position=e,this.isPlaying=!0,this.startCountdown()}onResumed({position:e}){this.position=e,this.isPlaying=!0,this.startCountdown()}onBuffering({position:e}){this.position=e,this.reset()}onPaused({position:e}){this.isPlaying=!1,this.position=e,this.reset()}onSeeking({toPosition:e}){this.position=e,this.isSeeking=!0,this.reset()}onSeeked({toPosition:e}){this.position=e,this.isSeeking=!1,this.reset()}onPlaybackEnded({position:e}){this.focusState.removeFocusListener(this),this.position=e,this.reset()}onFocusChanged(e){this.reset(),e&&this.startCountdown()}startCountdown(){this.hasLogged||(this.clearExistingTimeout(),this.logTimeout=setTimeout((()=>{this.logEvent()}),2e3))}reset(){this.clearExistingTimeout()}clearExistingTimeout(){this.logTimeout&&(clearTimeout(this.logTimeout),this.logTimeout=null)}logEvent(){if(!this.hasLogged&&this.trackingEnabled)try{d.l.postEvent(u.uk.fromPartial({adId:this.adIdentifier,eventType:"viewability",playbackPosition:BigInt(Math.floor(1e3*this.position))})),this.hasLogged=!0}catch(e){}}}class Le{hasLogged=!1;isPlaying=!1;isSeeking=!1;totalTimePlayedInMilliseconds=0;currentPositionInMilliseconds=0;constructor(e,t){this.focusState=e,this.playbackMetadata=t,this.adIdentifier=this.playbackMetadata.ad_id;const n=Number(this.playbackMetadata.duration??15e3);this.thresholdFromMetadata=Number(this.playbackMetadata.viewable_threshold_ms??3e3),this.viewabilityThresholdInMilliseconds=this.calculateViewabilityThreshold(n,this.thresholdFromMetadata)}get trackingEnabled(){return this.focusState.hasFocus()&&this.isPlaying&&!this.isSeeking}onPlaybackCreated({timeObservable:e}){e.addObserverForPeriodicEvents(1,(e=>{const t=1e3*e;this.updateTotalTimePlayed(t-this.currentPositionInMilliseconds),this.currentPositionInMilliseconds=t}))}onStarted(e){this.isPlaying=!0}onResumed(e){this.isPlaying=!0}onPaused(e){this.isPlaying=!1}onBuffering(e){this.isPlaying=!1}onSeeking(e){this.isSeeking=!0}onSeeked(e){this.isSeeking=!1}onDurationChanged({duration:e}){this.viewabilityThresholdInMilliseconds=this.calculateViewabilityThreshold(1e3*e,this.thresholdFromMetadata)}onPlaybackEnded(e){this.reset()}updateTotalTimePlayed(e){this.trackingEnabled&&(this.totalTimePlayedInMilliseconds+=e,this.totalTimePlayedInMilliseconds>=this.viewabilityThresholdInMilliseconds&&this.logEvent())}logEvent(){this.hasLogged||(d.l.postEvent(u.uk.fromPartial({adId:this.adIdentifier,eventType:"video_viewed",playbackPosition:BigInt(Math.floor(this.currentPositionInMilliseconds))})),this.hasLogged=!0)}reset(){this.totalTimePlayedInMilliseconds=0,this.hasLogged=!1,this.currentPositionInMilliseconds=0}calculateViewabilityThreshold(e,t){return Math.min(Math.max(t,0),e)}}var De=n(69587);let ke=function(e){return e.STARTED="started",e.RESUMED="resumed",e.PAUSED="paused",e.MUTED="muted",e.UNMUTED="unmuted",e.FIRST_QUARTILE="first_quartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="third_quartile",e.ENDED="ended",e.SKIPPED="skipped",e.ERRORED="errored",e.EVENTS="EVENTS",e.VOLUME_CHANGE="volume_change",e}({});class xe{constructor(e){this.trackingCallback=e,this.lastLadderPosition=0,this.isMuted=!1,this.isPaused=!1,this.volume=-1,this.duration=-1,this.position=-1}getVastEventLadderPosition(e){switch(e){case ke.STARTED:return 1;case ke.FIRST_QUARTILE:return 2;case ke.MIDPOINT:return 3;case ke.THIRD_QUARTILE:return 4;case ke.SKIPPED:case ke.ENDED:case ke.ERRORED:return 5;default:return null}}createPayload(){return{volume:this.volume,duration:this.duration,position:this.position}}processEvent(e){const t=this.getVastEventLadderPosition(e);t?t>this.lastLadderPosition&&(this.lastLadderPosition=t,this.trackingCallback(e,this.createPayload())):this.trackingCallback(e,this.createPayload())}onStarted(){this.processEvent(ke.STARTED)}onResumed(){this.isPaused&&(this.isPaused=!1,this.processEvent(ke.RESUMED))}onPaused(){this.isPaused=!0,this.processEvent(ke.PAUSED)}onVolumeChanged({volume:e}){this.volume=e,this.processEvent(ke.VOLUME_CHANGE),e>0&&this.isMuted?(this.isMuted=!1,this.processEvent(ke.UNMUTED)):0!==e||this.isMuted||(this.isMuted=!0,this.processEvent(ke.MUTED))}onPlaybackEnded({reason:e}){switch(e){case De.mT.REQUESTED:this.processEvent(ke.SKIPPED);break;case De.mT.FATAL_ERROR:case De.mT.NETWORK_ERROR:this.processEvent(ke.ERRORED);break;case De.mT.PLAYED_TO_END:this.processEvent(ke.ENDED)}}onDurationChanged({duration:e}){this.duration=e}onPlaybackCreated({initialConfiguration:e,timeObservable:t}){this.position=e.position,this.volume=e.volume,this.isMuted=0===this.volume,t.addObserverForPeriodicEvents(.4,(e=>{this.position=e})),t.addObserverForMediaPositions([.25,.5,.75],(e=>{e>=.25&&this.processEvent(ke.FIRST_QUARTILE),e>=.5&&this.processEvent(ke.MIDPOINT),e>=.75&&this.processEvent(ke.THIRD_QUARTILE)}))}}class Ue{constructor(e,t){this.listener=e,this.adId=t,this.firstReadyDone=!1,this.volume=-1,this.duration=-1,this.position=-1}createPayload(){return{adId:this.adId,volume:this.volume,duration:this.duration,position:this.position}}onStarted(){this.listener.onStarted(this.createPayload())}onVolumeChanged({volume:e}){this.volume=e,this.listener.onStateUpdate(this.createPayload())}onDurationChanged({duration:e}){this.duration=e,this.listener.onStateUpdate(this.createPayload())}onPlaybackCreated({initialConfiguration:e,timeObservable:t}){this.position=e.position,this.volume=e.volume,t.addObserverForPeriodicEvents(.4,(e=>{this.position=e,this.listener.onStateUpdate(this.createPayload())})),this.listener.onCreated(this.createPayload())}onPlaybackEnded({reason:e}){this.listener.onEnded(this.createPayload(),e)}onReady(){this.firstReadyDone||this.listener.onReady(),this.firstReadyDone=!0}}const Me=e=>(t,n)=>{const i=u.uk.fromPartial({adId:e,eventType:t,playbackPosition:BigInt((r=n.position,Math.floor(1e3*r)))});var r;d.l.postEvent(i)};var Be=n(30714);function je(e,t){const n=new Be.ei(new L.A,new Ne(t),e);return{manager:n,factories:[(i=Me,r=n,e=>"true"===e.metadata?.is_advertisement?new Re(new xe(i(e.metadata.ad_id)),new Ue(r,e.metadata.ad_id),new Pe(new L.A,e.metadata.ad_id),new Le(new L.A,e.metadata)):null)]};var i,r}class Fe{constructor(e,t,n){this.focusState=t,this.setAdStateKey=e,this.focusState.addFocusListener(this),this.history=n,this.history.listen((e=>{this.setAdStateKey("view_uri",e.pathname)}))}onFocusChanged(e){this.setAdStateKey("focus",e?"true":"false")}}var Ve=n(94784);function Ge(e,t){const n=t?d.adsCoreConnector.putState:Ve.Q.setAdStateKey;return new Fe(n,new L.A,e)}class He{enabled=!1;inStreamAdsSubscription=null;inStreamAd=null;onAdMessageCallbacks=[];constructor(e){this.adsCoreConnector=e}enable(e){this.onAdMessageCallbacks.push(e),this.enabled||(this.enabled=!0,this.inStreamAdsSubscription=this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage.bind(this)))}disable(){this.enabled=!1,this.inStreamAd=null,this.onAdMessageCallbacks=[]}subscribeToInStreamAds(){return this.inStreamAdsSubscription?this.inStreamAdsSubscription:this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage)}getInStreamAd(){return this.inStreamAd}onInStreamAdMessage(e){this.onAdMessageCallbacks.forEach((t=>t(e)));const{ad:t}=e;t&&(this.inStreamAd=t)}skipToNext(){this.adsCoreConnector.skipToNextWithOverride()}}var We=n(36285);const ze=(e,t,n,i,r,s)=>()=>{const a=new He(d.adsCoreConnector);return{config:{getAdsSlotConfig:c},audio:te(i,a),vto:je(a,d.adsCoreConnector),hpto:Ae(n,r,d.adsCoreConnector),billboard:D(d.adsCoreConnector),leaderboard:W(n,t,r,d.adsCoreConnector),sponsoredPlaylist:we(e,n,d.adsCoreConnector),home:se(n,r),survey:J(n,a),inStreamApi:a,...e?{adStateReporter:Ge(t,s)}:{}}},Ke=(0,We.u)("AdManagers")},89775:(e,t,n)=>{"use strict";n.d(t,{CW:()=>a,Nb:()=>s,On:()=>l,QN:()=>i,gt:()=>c,q5:()=>u,s3:()=>r,yx:()=>o});const i={ADS_ENABLED:"ADS_ENABLED",ADS_DISABLED:"ADS_DISABLED",ADS_PREMIUM:"ADS_PREMIUM",ADS_HPTO_HIDDEN:"ADS_HPTO_HIDDEN",ADS_POST_HIDE_HPTO:"ADS_POST_HIDE_HPTO",TRIGGER_PREVIEW_AD:"TRIGGER_PREVIEW_AD",LOG_NOW_PLAYING_AD_CLICK:"LOG_NOW_PLAYING_AD_CLICK"},r=()=>({type:i.ADS_ENABLED}),s=()=>({type:i.ADS_DISABLED}),a=e=>({type:i.ADS_PREMIUM,isPremium:e}),o=e=>({type:i.ADS_HPTO_HIDDEN,isHptoHidden:e}),l=()=>({type:i.ADS_POST_HIDE_HPTO}),c=e=>({type:i.TRIGGER_PREVIEW_AD,adUriHexId:e}),u=(e,t)=>({type:i.LOG_NOW_PLAYING_AD_CLICK,eventReason:e,eventSource:t})},15987:(e,t,n)=>{"use strict";n.d(t,{Qv:()=>r,Tv:()=>s,qc:()=>a});var i=n(75497);const r=e=>{const t=e?.item??void 0;return(0,i.N)(t)},s=e=>{const t=e?.item??void 0;return(0,i.N)(t)&&"video"===t.mediaType},a=e=>{const t=e?.item??void 0;return(0,i.N)(t)&&"audio"===t.mediaType}},53187:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,e:()=>s});var i=n(38157);const r=i.M,s=i.e},37491:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});const i=(e,t,n)=>({artists:[{uri:t,name:n}],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo})},36646:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(30758),r=n(51414);const s=(e,t)=>{const n=(0,i.useRef)(null),{registerCloseCallback:s,closeToDepth:a,isOnPathToSubmenu:o}=(0,i.useContext)(r.P),l=(0,i.useRef)(!1),c=(0,i.useCallback)((()=>{n.current&&(window.clearTimeout(n.current),n.current=null)}),[]);(0,i.useEffect)((()=>c),[c]);const u=(0,i.useCallback)(((e,n)=>{a(e),c(),t&&(s((e=>{l.current=!1,t(e)}),n),l.current=!0,t(!0))}),[a,c,s,t]),d=(0,i.useCallback)((t=>{if(!e.current)return;const i=e.current.closest('[role="menu"]');if(i){const e={x:t.clientX,y:t.clientY},r=o(e,l.current),s=parseInt(i.getAttribute("data-depth")||"0",10);!r||l.current?u(s,e):"mouseenter"===t.type&&(n.current=window.setTimeout((()=>{u(s,e)}),500))}}),[e,o,u]),p=(0,i.useCallback)((()=>{if(!e.current)return;const t=e.current.closest('[role="menu"]');if(t){const e=parseInt(t.getAttribute("data-depth")||"0",10);u(e,{x:0,y:0})}}),[u,e]);return{handleMouseEnter:d,handleMouseMove:d,handleMouseLeave:c,handleFocus:p}}},52162:(e,t,n)=>{"use strict";n.d(t,{v:()=>i});const i="context-menu"},89887:(e,t,n)=>{"use strict";function i(e){return"function"==typeof e}n.d(t,{d:()=>i})},63214:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(22389),r=n(78565);const s=(e,t,n=!1,a=[],o=[],l=[])=>{for(const c of t)if((0,r.sA)(c)||(0,r.Af)(c)){const t=(0,i.u)(e,c.name),u=null!==t?[...o,t]:o;(0,r.sA)(c)&&s(e,c.items,n,a,u,[...l,c.name]),((0,r.Af)(c)||n&&(0,r.sA)(c))&&u?.length>0&&a.push({...c,displayTitle:c.name,displaySubtitle:l.length>0?l.join(" • "):null,matchScore:u.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.range.length),0)),0)})}return a.sort(((e,t)=>t.matchScore-e.matchScore))}},35598:(e,t,n)=>{"use strict";function i(e){return"displayTitle"in e}n.d(t,{A:()=>i})},76123:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,O9:()=>l,_4:()=>o,fl:()=>a,j3:()=>u});var i=n(91008),r=n(7307),s=n(96566);const a={TRACKS:"text/x-spotify-tracks",ALBUMS:"text/x-spotify-albums",ARTISTS:"text/x-spotify-artists",PLAYLISTS:"text/x-spotify-playlists",PLAYLISTS_V2:"text/x-spotify-playlists",FOLDERS:"text/x-spotify-folders",USERS:"text/x-spotify-users",SHOWS:"text/x-spotify-shows",AUDIOBOOKS:"text/x-spotify-audiobooks",EPISODES:"text/x-spotify-episodes",CHAPTERS:"text/x-spotify-chapters",LOCAL_TRACKS:"text/x-spotify-local-tracks",LOCAL_ALBUMS:"text/x-spotify-local-albums",LOCAL_ARTISTS:"text/x-spotify-local-artists",COLLECTION_ALBUMS:"text/x-spotify-collection-albums",COLLECTION_ARTISTS:"text/x-spotify-collection-artists",PSEUDO_PLAYLISTS:"text/x-spotify-pseudo-playlists",UIDS:"text/x-spotify-uids"},o=(0,s.g)(a),l={[i.NQG.TRACK]:a.TRACKS,[i.NQG.ALBUM]:a.ALBUMS,[i.NQG.ARTIST]:a.ARTISTS,[i.NQG.PLAYLIST]:a.PLAYLISTS,[i.NQG.PLAYLIST_V2]:a.PLAYLISTS_V2,[i.NQG.FOLDER]:a.FOLDERS,[i.NQG.PROFILE]:a.USERS,[i.NQG.SHOW]:a.SHOWS,[i.NQG.EPISODE]:a.EPISODES,[i.NQG.LOCAL]:a.LOCAL_TRACKS,[i.NQG.LOCAL_ALBUM]:a.LOCAL_ALBUMS,[i.NQG.LOCAL_ARTIST]:a.LOCAL_ARTISTS,[i.NQG.COLLECTION_ALBUM]:a.COLLECTION_ALBUMS,[i.NQG.COLLECTION_ARTIST]:a.COLLECTION_ARTISTS,[i.NQG.COLLECTION]:a.PSEUDO_PLAYLISTS},c={[r.c.TRACK]:a.TRACKS,[r.c.ALBUM]:a.ALBUMS,[r.c.ARTIST]:a.ARTISTS,[r.c.PLAYLIST]:a.PLAYLISTS,[r.c.PLAYLISTV2]:a.PLAYLISTS_V2,[r.c.FOLDER]:a.FOLDERS,[r.c.USER]:a.USERS,[r.c.SHOW]:a.SHOWS,[r.c.AUDIOBOOK]:a.AUDIOBOOKS,[r.c.EPISODE]:a.EPISODES,[r.c.LOCAL_FILES]:a.PSEUDO_PLAYLISTS,[r.c.LIKED_SONGS]:a.PSEUDO_PLAYLISTS,[r.c.YOUR_EPISODES]:a.PSEUDO_PLAYLISTS,[r.c.CHAPTER]:a.CHAPTERS},u=e=>e&&(e=>e in c)(e)?c[e]:void 0,d=l},80870:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(31417),r=n(7307);const s=e=>{switch(e){case r.c.SHOW:return i.Ru.get("ewg.title.show");case r.c.AUDIOBOOK:return i.Ru.get("ewg.title.audiobook");case r.c.EPISODE:return i.Ru.get("ewg.title.episode");case r.c.TRACK:return i.Ru.get("ewg.title.track");case r.c.ALBUM:return i.Ru.get("ewg.title.album");case r.c.ARTIST:return i.Ru.get("ewg.title.artist");case r.c.PLAYLISTV2:case r.c.PLAYLIST:return i.Ru.get("ewg.title.playlist");default:return i.Ru.get("ewg.title")}}},71056:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var i=n(62411),r=n(25797),s=n(2244),a=n(68355),o=n(29195),l=n(67668),c=n(32963),u=n(86551),d=n(36061),p=n(95175),m=n(32810);const h=({entityType:e,componentType:t,uri:n})=>{const h=(0,l.V)(),f=(0,o.vh)(),g=(0,i.d4)(d.F6),E=(0,i.d4)(u.JJ);return()=>{(0,m.fE)({metric_type:a.MetricTypes.COUNTER,what:"dwp-ilr-component-error",value:1,tags:{entityType:e,componentType:t}});const i={category:`${e}_${t}_ilr_render_error`,label:"dwp",os:(0,c.f)(),context:n,country:g?E:"",sp_t:(0,p.v8)("sp_t")};h?f.send((0,s.r)(i)):f.send((0,r._)(i))}}},90559:(e,t,n)=>{"use strict";n.d(t,{$:()=>p,z:()=>d});var i=n(85387),r=n(14343),s=n(55926),a=n(38501),o=n(69732),l=n(37999);const c=()=>(0,o.o)(l.P.PopularEpisodesAbove,(0,i.zy)()),u=()=>(0,o.o)(l.P.PopularEpisodesBelow,(0,i.zy)()),d=()=>{const e=c(),t=(()=>{const e=(0,s.c)(),t=(0,r.NC)(a.GwQ);return!!e&&t===a.tP9.Above})();return!u()&&(e||t)},p=()=>{const e=u(),t=(()=>{const e=(0,s.c)(),t=(0,r.NC)(a.GwQ);return!!e&&t===a.tP9.Below})();return!c()&&(e||t)}},74024:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(62411),r=n(28497),s=n(74992),a=n(14343),o=n(29195),l=n(67668),c=n(55926),u=n(32963),d=n(38501),p=n(86551),m=n(36061),h=n(95175);const f=e=>{const t=(0,l.V)(),n=(0,i.d4)(m.F6),f=(0,i.d4)(p.JJ),g=(0,o.vh)(),E=(0,c.c)(),_={category:"popular_episodes_ilr_exposures",action:"show_page_visit",variant:(0,a.NC)(d.GwQ),label:"dwp",os:(0,u.f)(),context:e,country:n?f:"",sp_t:(0,h.v8)("sp_t")};return()=>{E&&(t?g.send((0,s.r)(_)):g.send((0,r._)(_)))}}},55645:(e,t,n)=>{"use strict";n.d(t,{J:()=>f,x:()=>g});var i=n(30758),r=n(62411),s=n(25797),a=n(2244),o=n(14343),l=n(29195),c=n(67668),u=n(38501),d=n(86551),p=n(36061),m=n(95175),h=n(21996);let f=function(e){return e.ClicksLink="popular_episodes_ilr_clicks_on_link",e.LoadMore="popular_episodes_ilr_clicks_load_more",e.ShowAll="popular_episodes_ilr_dwp_clicks_show_all",e.TitleClick="popular_episodes_ilr_dwp_clicks_title",e}({});const g=e=>{const t=(0,c.V)(),n=(0,l.vh)(),f=(0,o.NC)(u.GwQ),g=(0,r.d4)(p.F6),E=(0,r.d4)(d.JJ);return(0,i.useCallback)((async({category:i,destinationUrl:r})=>{const o=r?`${e}|Popular Episodes`:e,l={category:i,action:"click",variant:f,label:"dwp",os:(0,h.f)(),...r&&{destination_url:r},context:o,country:g?E:"",sp_t:(0,m.v8)("sp_t")};t?n.send((0,a.r)(l)):n.send((0,s._)(l))}),[e,E,n,t,g,f])}},82973:(e,t,n)=>{"use strict";n.d(t,{e:()=>u});var i=n(62411),r=n(85387),s=n(55926),a=n(691),o=n(69732),l=n(37999),c=n(56490);const u=()=>{const e=(0,s.c)(),{trackId:t=""}=(0,r.g)(),n=(0,r.zy)(),u=n.pathname.includes("more-like-this")?n.pathname.split("/")[2]:"",d=(0,o.o)(l.P.SimilarAlbums,n),p=(0,i.d4)(a.oc),m=(0,c.KY)(p||{},t||u||"");return!!e&&(d||m)}},44456:(e,t,n)=>{"use strict";n.d(t,{q:()=>B,N:()=>M});var i=n(30758),r=n(73075),s=n.n(r),a=n(62411),o=n(85387),l=n(14343),c=n(31417),u=n(98293),d=n(11328),p=n(42767),m=n(3714),h=n(36150),f=n(7388),g=n(85425),E=n(31904),_=n(40339),y=n(53328),v=n(75610),b=n(32714),S=n(37178),A=n(30493),C=n(38501),T=n(78412),I=n(55671),O=n(24533),w=n(3326),N=n(87182),R=n(36958),P=n(43398),L=n(58685),D=n(46069),k=n(41434);const x=e=>(t,n=!1)=>{let i,r=!1;return(...s)=>{i=s,r||(n||e.apply(e,s),r=!0,window.setTimeout((()=>{r=!1,n&&e.apply(e,i)}),t))}},U=e=>(t,...n)=>{t.repeat||e(t,...n)};function M(e,t,n){const r=n?.condition??!0;(0,i.useEffect)((()=>{if(!r)return()=>{};const i=n?.allowRepeat?t:U(t);return s().bind(e,i,n?.eventType),()=>{s().unbind(e,n?.eventType)}}),[t,e,r,n?.allowRepeat,n?.eventType])}const B=()=>{const e=(0,o.Zp)(),t=(0,a.wA)(),n=(0,a.Pj)(),r=(0,N.z)(),s=(0,w.p)(),{createPlaylist:U}=(0,A.A)(),{shuffle:B,setShuffle:j,setRepeat:F,repeat:V}=(0,R.V)(),{playingURI:G,isPaused:H,canPause:W,canResume:z}=(0,L.o)((e=>({playingURI:e?.item?.uri??"",isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),k.a),{seekBackward:K,seekForward:Y}=(0,P.p)(),{canChangeSpeed:q,setSpeed:$,speed:Z}=(0,E.C)(),Q=(0,i.useCallback)((()=>{if(q){const e=f.wH.indexOf(Z),t=Math.max(0,e-1);$(f.wH[t])}}),[q,$,Z]),J=(0,i.useCallback)((()=>{if(q){const e=f.wH.indexOf(Z),t=Math.min(f.wH.length-1,e+1);$(f.wH[t])}}),[q,$,Z]),X=(0,_._Y)(),ee=(0,a.d4)((e=>e.platform.isDesktop)),te=(0,S.W)(),[ne,ie]=(0,O.A)(G),{createFolder:re}=(0,D.Z)(),se=(0,b.N)(),{toggleQueue:ae,openQueue:oe}=(0,v.R)(),le=(0,l.NC)(C.eWj),{togglePanel:ce}=(0,d.C)(),{show:ue,hide:de,handle:pe}=(0,p.j)(),me=!!pe,he=(0,l.NC)(C.DHV,{loadingValue:!1}),fe=(0,i.useCallback)((()=>{se({type:"OPEN"})}),[se]),ge=(0,i.useCallback)((()=>{t(u.wi(!n.getState().ui.keyboardShortcutsHelpModal.isOpen))}),[t,n]),Ee=(0,i.useCallback)((e=>{H&&z?r.resume():!H&&W&&r.pause(),e.preventDefault&&e.preventDefault()}),[W,z,H,r]),_e=(0,i.useCallback)((()=>{t((0,T.wH)())}),[t]),ye=(0,i.useCallback)((()=>{const e=document.activeElement?.getBoundingClientRect();if(!e)return;const t=new MouseEvent("contextmenu",{bubbles:!0,clientX:e.x+e.width/2,clientY:e.y+e.height});document.activeElement?.dispatchEvent(t)}),[]),ve=(0,i.useCallback)((()=>{e(-1)}),[e]),be=(0,i.useCallback)((()=>{e(1)}),[e]),Se=(0,i.useCallback)((()=>{e("/")}),[e]);M((0,h.p)(m.r.OPEN_SEARCH_MODAL),fe),M((0,h.p)(m.r.OPEN_HELP),ge),M((0,h.p)(m.r.TOGGLE_PLAY),Ee),M((0,h.p)(m.r.LOG_OUT),_e),M((0,h.p)(m.r.OPEN_CONTEXT_MENU),ye),M((0,h.p)(m.r.GO_BACKWARDS),ve,{condition:ee}),M((0,h.p)(m.r.GO_FORWARDS),be,{condition:ee}),M((0,h.p)(m.r.GO_TO_HOME),Se);const Ae=(0,i.useCallback)((()=>{e("/collection/tracks")}),[e]),Ce=(0,i.useCallback)((()=>{const t=r.getState();if(t?.context&&t?.item){const n=(0,g.O)(t.context,t.item,t.index);n&&e({pathname:n.to,search:n.search})}}),[e,r]),Te=(0,i.useCallback)((()=>{e(I.W$)}),[e]),Ie=(0,i.useCallback)((()=>{e("/search",{state:{preventMoveFocus:!0}})}),[e]),Oe=(0,i.useCallback)((()=>{e(I.yf)}),[e]),we=(0,i.useCallback)((()=>{e(I.qF)}),[e]),Ne=(0,i.useCallback)((()=>{le?ae():oe()}),[le,oe,ae]),Re=(0,i.useCallback)((()=>{X(y.$S.BUDDY_FEED_BUTTON_CLICK)}),[X]),Pe=(0,i.useCallback)((()=>ce()),[ce]),Le=(0,i.useCallback)((()=>{X(y.$S.NPV_BUTTON_CLICK)}),[X]),De=(0,i.useCallback)((()=>{ie(!ne)}),[ie,ne]),ke=(0,i.useCallback)((()=>{U()}),[U]),xe=(0,i.useCallback)((()=>{re(c.Ru.get("playlist.default_folder_name"),{before:"start"})}),[re]),Ue=(0,i.useCallback)((()=>{r.skipToNext()}),[r]),Me=(0,i.useCallback)((()=>{r.skipToPrevious()}),[r]),Be=(0,i.useCallback)((()=>{x((()=>s.raiseVolume()))(100)}),[s]),je=(0,i.useCallback)((()=>{x((()=>s.lowerVolume()))(100)}),[s]),Fe=(0,i.useCallback)((()=>{x((()=>K()))(100)}),[K]),Ve=(0,i.useCallback)((()=>{x((()=>Y()))(100)}),[Y]),Ge=(0,i.useCallback)((()=>{j(!B)}),[B,j]),He=(0,i.useCallback)((()=>{F((V+1)%3)}),[V,F]),We=(0,i.useCallback)((()=>{me?de():ue()}),[de,me,ue]);M((0,h.p)(m.r.GO_TO_LIKED_SONGS),Ae),M((0,h.p)(m.r.GO_TO_NOW_PLAYING),Ce),M((0,h.p)(m.r.GO_TO_CHARTS),Te),M((0,h.p)(m.r.GO_TO_SEARCH),Ie),M((0,h.p)(m.r.GO_TO_MADE_FOR_YOU),Oe),M((0,h.p)(m.r.GO_TO_NEW_RELEASES),we),M((0,h.p)(m.r.GO_TO_QUEUE),Ne),M((0,h.p)(m.r.GO_TO_BUDDY_FEED),Re),M((0,h.p)(m.r.GO_TO_DEVICE_PICKER),Pe),M(te?(0,h.p)(m.r.TOGGLE_YLX_SIDEBAR):(0,h.p)(m.r.TOGGLE_NPV_SIDEBAR),Le),M((0,h.p)(m.r.LIKE_DISLIKE_SONG),De),M((0,h.p)(m.r.CREATE_NEW_PLAYLIST),ke,{condition:!ee}),M((0,h.p)(m.r.CREATE_NEW_FOLDER),xe,{condition:!ee}),M((0,h.p)(m.r.SKIP_NEXT),Ue,{condition:!ee}),M((0,h.p)(m.r.SKIP_PREVIOUS),Me,{condition:!ee}),M((0,h.p)(m.r.RAISE_VOLUME),Be,{condition:!ee}),M((0,h.p)(m.r.LOWER_VOLUME),je,{condition:!ee}),M((0,h.p)(m.r.SEEK_BACKWARD),Fe,{condition:!ee}),M((0,h.p)(m.r.SEEK_FORWARD),Ve,{condition:!ee}),M((0,h.p)(m.r.DECREASE_PLAYBACK_SPEED),Q,{condition:q}),M((0,h.p)(m.r.INCREASE_PLAYBACK_SPEED),J,{condition:q}),M((0,h.p)(m.r.SHUFFLE),Ge,{condition:!ee}),M((0,h.p)(m.r.REPEAT),He,{condition:!ee}),M((0,h.p)(m.r.TOGGLE_DEBUG_WINDOW),We,{condition:he})}},38682:(e,t,n)=>{"use strict";n.d(t,{Bq:()=>R,Ey:()=>S,SL:()=>o,So:()=>w,T4:()=>T,Xt:()=>O,Y9:()=>u,kj:()=>I,lU:()=>a,ly:()=>N,rP:()=>C,zq:()=>A});var i=n(31417),r=n(4266),s=n(34939);let a=function(e){return e.TITLE="TITLE",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.ARTIST="ARTIST",e.ALBUM="ALBUM",e.SHOW="SHOW",e.DURATION="DURATION",e}({});const o={[a.TITLE]:["title"],[a.ADDED_BY]:["added_by"],[a.ADDED_AT]:["added_at"],[a.ARTIST]:["artist_name","album_title","album_track_number"],[a.ALBUM]:["album_title","album_track_number"],[a.SHOW]:["album_title","added_at"],[a.DURATION]:["duration"]},l={[r.$.TITLE_AND_ARTIST]:s.nw.TITLE,[r.$.TITLE]:s.nw.TITLE,[r.$.ADDED_BY]:s.nw.ADDED_BY,[r.$.ADDED_AT]:s.nw.ADDED_AT,[r.$.DURATION]:s.nw.DURATION,[r.$.ARTIST]:s.nw.ARTIST,[r.$.ALBUM]:s.nw.ALBUM,[r.$.ALBUM_OR_PODCAST]:s.nw.ALBUM,[r.$.ALBUM_OR_SHOW]:null,[r.$.ACTIONS]:null,[r.$.RELEASE_DATE]:null,[r.$.INDEX]:null,[r.$.PLAYS]:null,[r.$.ADD]:null,[r.$.EVENT_DATE]:null,[r.$.EVENT_INFO]:null,[r.$.CONCERT]:null,[r.$.CONCERT_VENUE]:null,[r.$.TITLE_AND_AUTHOR]:s.nw.TITLE,[r.$.AUTHOR]:null,[r.$.BPM]:null,[r.$.KEY]:null,[r.$.VIBE]:null},c=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_AT,r.$.DURATION],u=[r.$.BPM,r.$.KEY],d=[...c.slice(0,c.length-1),...u,...c.slice(-1)],p=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],m=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],h=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.ADDED_BY,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],f=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_AT,r.$.DURATION],g=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],E=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.EVENT_DATE,r.$.DURATION],_=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.CONCERT,r.$.DURATION],y=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.DURATION],v=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.DURATION],b={[r.H.NONE]:void 0,[r.H.DESC]:s.xB.DESC,[r.H.ASC]:s.xB.ASC,[r.H.SECONDARY_DESC]:s.xB.DESC,[r.H.SECONDARY_ASC]:s.xB.ASC},S=({isMixedMedia:e,hasEpisodes:t,hasSpotifyAudiobooks:n,hasDateAdded:i,isLive:s,isConcert:a,isBlend:o,nrCollaborators:l,isBooklist:u,isChart:b,isCompactMode:S=!1,showPlayCount:A=!1,isExtraColumnsEnabled:C=!1})=>{let T=C?[...d]:[...c];const I=l>1;if(e){I&&T.splice(3,0,r.$.ADDED_BY);const e=T.indexOf(r.$.ALBUM);n?T.splice(e,1):T.splice(e,1,r.$.ALBUM_OR_PODCAST)}else b?(T=[...v],A&&T.splice(T.indexOf(r.$.TITLE_AND_ARTIST)+1,0,r.$.PLAYS)):t&&I?T=[...h]:t?T=[...m]:o?T=[...y]:u&&I?T=[...g]:u?T=[...f]:I?T=[...p]:s?T=[...E]:a&&(T=[..._]);if(i||T.splice(T.indexOf(r.$.ADDED_AT),1),S){const e=T.indexOf(r.$.TITLE_AND_ARTIST),t=T.indexOf(r.$.TITLE_AND_AUTHOR);-1!==e?T.splice(e,1,r.$.TITLE,r.$.ARTIST):-1!==t&&T.splice(t,1,r.$.TITLE,r.$.AUTHOR)}return T},A=e=>{const t=e.filter((e=>null!==l[e]));return t.unshift(r.$.INDEX),t},C=e=>[r.H.ASC,r.H.SECONDARY_ASC].includes(e),T=e=>[r.H.DESC,r.H.SECONDARY_DESC].includes(e),I=(e,t)=>{return e===r.$.TITLE_AND_ARTIST&&(!(t.column!==r.$.TITLE_AND_ARTIST||(n=t.order,![r.H.SECONDARY_ASC,r.H.SECONDARY_DESC].includes(n)))||t.column===r.$.ARTIST);var n},O=e=>{if(e.order&&e.column)return I(e.column,e)?{field:s.nw.ARTIST,order:b[e.order]}:{field:l[e.column],order:b[e.order]}},w=(e,t)=>{const n=e===r.$.TITLE_AND_ARTIST?5:3,i=(t.order+1)%n;return t.column===e?{column:i?t.column:null,order:i}:{column:e,order:r.H.ASC}},N=e=>{if(!e)return;return`text =^# "${e}"`},R=e=>{const t=e||i.Ru.get("playlist.similar-playlist"),n=t.match(new RegExp("(.*)\\((\\d+)\\)$"));return n?`${n[1].trim()} (${r=n[2],parseInt(r,10)+1})`:`${t} (2)`;var r}},43361:(e,t,n)=>{"use strict";n.d(t,{D:()=>r,K:()=>i});const i="floating-ui-popover-layer",r=()=>{const e=document.getElementById(i);if(!e)throw new Error("Floating UI Popover Layer element not found");return e}},98264:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(26340);const r=parseInt(i.A.PEEK_WIDTH,10)},74941:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});const i="loginButton"},74177:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var i=n(85387),r=n(30339);const s=["","/","/home/","/content-feed/","/lyrics","/search","/search/:query","/search/:query/:category","/recent-searches","/section/:id","/genre/:id","/user/:username/:subpage","/user/:username/top/artists","/user/:username/top/tracks","/preferences","/artist/:id/featuring","/artist/:id/playlists","/artist/:id/appears-on","/artist/:id/discovered-on","/artist/:id/related","/download"],a=()=>{const e=(0,i.zy)();return s.every((t=>{const n=e.pathname.replace(/^\/intl-[A-Za-z]{2}/i,"");return t!==n&&null===(0,r.B6)(t,n)}))}},4266:(e,t,n)=>{"use strict";n.d(t,{$:()=>i,H:()=>r});let i=function(e){return e.INDEX="INDEX",e.TITLE="TITLE",e.TITLE_AND_ARTIST="TITLE_AND_ARTIST",e.ARTIST="ARTIST",e.PLAYS="PLAYS",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.RELEASE_DATE="RELEASE_DATE",e.ACTIONS="ACTIONS",e.DURATION="DURATION",e.ALBUM="ALBUM",e.ALBUM_OR_PODCAST="ALBUM_OR_PODCAST",e.ALBUM_OR_SHOW="ALBUM_OR_SHOW",e.EVENT_DATE="EVENT_DATE",e.EVENT_INFO="EVENT_INFO",e.CONCERT="CONCERT",e.CONCERT_VENUE="CONCERT_VENUE",e.TITLE_AND_AUTHOR="TITLE_AND_AUTHOR",e.AUTHOR="AUTHOR",e.ADD="ADD",e.BPM="BPM",e.KEY="KEY",e.VIBE="VIBE",e}({}),r=function(e){return e[e.NONE=0]="NONE",e[e.ASC=1]="ASC",e[e.DESC=2]="DESC",e[e.SECONDARY_ASC=3]="SECONDARY_ASC",e[e.SECONDARY_DESC=4]="SECONDARY_DESC",e}({})},44875:(e,t,n)=>{"use strict";n.d(t,{a:()=>m,w:()=>p});var i=n(30758),r=n(74992),s=n(14343),a=n(29195),o=n(67668),l=n(55926),c=n(38501),u=n(95175),d=n(21996);let p=function(e){return e.PlaylistClicks="shelf_trending_clicks_playlist",e.TitleClicks="shelf_trending_clicks_title",e.ShowAll="shelf_trending_clicks_show_all",e}({});const m=(e,t)=>{const n=(0,s.NC)(c.PV7),m=(0,a.vh)(),h=(0,l.c)(),f=(0,o.V)();return(0,i.useCallback)((i=>{const s=i.category===p.PlaylistClicks,a={category:`${i.category}`,action:"click",variant:n,label:"dwp",os:(0,d.f)(),context:s?`${e} | ${t}`:`${e}`,sp_t:(0,u.v8)("sp_t")};h&&f&&m.send((0,r.r)(a))}),[e,n,t,h,f,m])}},98811:(e,t,n)=>{"use strict";n.d(t,{O:()=>m,U:()=>p});var i=n(30758),r=n(74992),s=n(14343),a=n(29195),o=n(67668),l=n(55926),c=n(38501),u=n(95175),d=n(21996);let p=function(e){return e.TrackClicks="shelf_trending_song_clicks_track",e.TitleClicks="shelf_trending_song_clicks_title",e.ShowAll="shelf_trending_song_clicks_show_all",e}({});const m=(e,t)=>{const n=(0,s.NC)(c.ojr),p=(0,a.vh)(),m=(0,l.c)(),h=(0,o.V)();return(0,i.useCallback)((i=>{const s={category:`${i.category}`,action:"click",variant:n,label:"dwp",os:(0,d.f)(),context:`${e} | ${t}`,sp_t:(0,u.v8)("sp_t")};m&&h&&p.send((0,r.r)(s))}),[e,n,t,m,h,p])}},35352:(e,t,n)=>{"use strict";n.d(t,{aX:()=>o});var i=n(93827);let r=function(e){return e.STREAM_SIGNAL="userFraudStreamSignal",e}({});class s extends i.V{}const a=new s;function o(e,t){a.emit(r.STREAM_SIGNAL,{event:e,action:t})}},62868:(e,t,n)=>{"use strict";n.d(t,{I:()=>a,X:()=>o});var i=n(30758),r=n(92654);const s=(0,n(94119).y)((()=>({transferKey:null,timestamp:0}))),a=(e,t)=>{s.setState({transferKey:e,timestamp:Date.now(),focusOptions:t})},o=(e,t,n=1e3)=>{const{transferKey:a,timestamp:o,focusOptions:l}=(0,r.Pj)(s);(0,i.useLayoutEffect)((()=>{null!==e&&e===a&&o>Date.now()-n&&t.current?.focus(l)}),[l,t,a,n,o,e])}},78505:(e,t,n)=>{"use strict";n.d(t,{KV:()=>a,ev:()=>s,fC:()=>i,fO:()=>o,uC:()=>r});const i="isPlaybackBarRemainingTimeToggled",r=64,s=416,a=8,o=90},18316:(e,t,n)=>{"use strict";n.d(t,{HK:()=>r,xt:()=>s});var i=n(57776);n(59147);const r=new i.l("getAlbum","query","8f4cd5650f9d80349dbe68684057476d8bf27a5c51687b2b1686099ab5631589",null),s=new i.l("queryAlbumTracks","query","8f4cd5650f9d80349dbe68684057476d8bf27a5c51687b2b1686099ab5631589",null)},49419:(e,t,n)=>{"use strict";n.d(t,{$:()=>x,w:()=>U});var i=n(30758),r=n(50486),s=n(16273),a=n(14343),o=n(31417),l=n(18316),c=n(22745),u=n(43863),d=n(16157),p=n(7307),m=n(13719),h=n(85907);const f=e=>({...e,uid:void 0,isSaved:!1,playcount:"0",linkedUri:e.uri}),g=e=>{switch(e){case"album":return c._.Album;case"ep":return c._.Ep;case"single":return c._.Single;case"compilation":return c._.Compilation;default:return(0,h.d)(e)}},E=e=>({...e,uid:e.uid,isSaved:!1,playcount:"0",linkedUri:null}),_=e=>{switch(e){case c._.Album:return c._.Album;case c._.Ep:return c._.Ep;case c._.Single:return c._.Single;case c._.Compilation:return c._.Compilation;default:return c._.Album}},y=e=>e.formatListData?.attributes?.copyrights?{totalCount:1,items:[{type:null,untyped:!0,text:e.formatListData?.attributes?.copyrights??""}]}:{totalCount:0,items:[]},v=(e,t)=>{const n=e.formatListData?.attributes.artistUris?.split(",")??[],i=new Map(t.flatMap((e=>e.artists.map((e=>[e.uri,{type:p.c.ARTIST,uri:e.uri,id:e.uri,images:[],name:e.name}])))));return n.map((e=>i.get(e)??null)).filter(m.P)};var b=n(55845),S=n(37410),A=n(39566),C=n(38501),T=n(33558),I=n(81834),O=n(27963),w=n(59147),N=n(20784),R=n(85346),P=n(35035),L=n(29074);const D=(e,t,n)=>{const{name:i}=l.HK,r={uri:e,locale:t,offset:0,limit:50};return{queryKey:[i,r],queryFn:async()=>{const e=await(0,O.c)(n,l.HK,r,{},[{key:"spotify-app-version",value:"896000000"}]);return"Album"===e?.data?.albumUnion.__typename?(0,b.X)(e?.data.albumUnion):null}}},k=e=>{const t=o.Ru.getLocaleForURLPath();return(0,S.W)({type:"link",uri:e})?`${T.CT}${t}`:""},x=e=>{const t=!(0,A.n)(),n=(0,L.m)(),s=(0,R.T)(e),o=(0,N.f)(),[l,c]=(0,i.useState)(null),{request:m}=(0,i.useContext)(I.j),h=k(e),b=(0,a.NC)(C.U4t),S=D(e,h,m),{data:T,isPending:O,error:x}=(0,r.I)({...S,gcTime:15*w.i,staleTime:5e3}),U=t&&s===P.kw.YES;(0,i.useEffect)((()=>{U&&(b?n.getPlaylist(e).then((e=>c(e?(({metadata:e,contents:t})=>{const n=(t.items??[]).reduce(((e,t)=>(t&&(0,u.Jy)(t)&&e.push(t),e)),[]);return{type:p.c.ALBUM,uri:e.uri,name:e.name,artists:v(e,n),images:e.images,moreAlbumsByArtist:[],nrTracks:e.totalLength,isPlayable:e.canPlay??!1,isCatalogueRestricted:!1,discs:{totalCount:0,items:[]},courtesyLine:e.formatListData?.attributes.courtesyLine??null,copyright:y(e),albumType:_(e.formatListData?.attributes.albumType??""),duration:{durationMs:e.duration?.milliseconds??0,isEstimate:!1},releases:{totalCount:0,items:[]},extractedColors:null,sharingInfo:null,release:{isoString:e.formatListData?.attributes.releaseDate??"",precision:d.by.Day},items:n.map(E)}})(e):null))):o.getAlbum(e).then((e=>c(e?(e=>{return{type:p.c.ALBUM,uri:e.uri,name:e.name,artists:(n=e.artists,n.map((e=>({type:p.c.ARTIST,name:e.name,images:[],uri:e.uri,id:e.uri})))),images:e.images,moreAlbumsByArtist:[],nrTracks:e.items.length,isPlayable:e.items.some((e=>e.isPlayable)),isCatalogueRestricted:!1,discs:{totalCount:0,items:[]},copyright:(t=e.copyrights,{totalCount:t.length,items:t}),albumType:g(e.albumType),duration:{durationMs:e.items.reduce(((e,t)=>e+t.duration.milliseconds),0),isEstimate:!1},releases:{totalCount:0,items:[]},extractedColors:null,courtesyLine:null,sharingInfo:null,items:e.items.map(f)};var t,n})(e):null))))}),[U,b,o,n,e]);return{loading:U?!l:O,error:x,data:U?l:T??null,canLoadOffline:U}},U=e=>{const{request:t}=(0,i.useContext)(I.j),n=(0,s.jE)(),r=k(e);return(0,i.useCallback)((()=>{const i=D(e,r,t);n.prefetchQuery(i)}),[n,t,r,e])}},39912:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});const i=e=>"track"in e&&"object"==typeof e.track},22745:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});let i=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({})},55845:(e,t,n)=>{"use strict";n.d(t,{T:()=>d,X:()=>u});var i=n(39912),r=n(6107),s=n(16157),a=n(7307);const o=e=>(e||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),l=e=>{if(null!==e)return{isoString:e.isoString,precision:e.precision}},c=e=>{return{type:a.c.TRACK,uid:e.uid,uri:e.track.uri,name:e.track.name,artists:(t=e.track.artists,t.items.map((e=>({uri:e.uri,name:e.profile.name})))),duration:{milliseconds:e.track.duration.totalMilliseconds},album:null,discNumber:e.track.discNumber,trackNumber:e.track.trackNumber,isPlayable:e.track.playability.playable,isLocal:!1,isExplicit:e.track.contentRating?.label===s.x7.Explicit,is19PlusOnly:e.track.contentRating?.label===s.x7.NineteenPlus,isSaved:e.track.saved,playcount:e.track.playcount??"",linkedUri:"Track"===e.track.relinkingInformation?.linkedTrack.__typename?e.track.relinkingInformation?.linkedTrack.uri:null,hasAssociatedVideo:(e.track.associationsV2.totalCount||0)>0,isBanned:!1};var t},u=e=>{const t={totalCount:e.discs.totalCount,items:e.discs.items.map((e=>({type:"AlbumDisc",discNumber:e.number,nrTracks:e.tracks.totalCount})))},n=e.tracksV2.items.filter(i.u).map(c),u=(0,r.ED)(n,t)||[];return{type:a.c.ALBUM,uri:e.uri,name:e.name,artists:(m=e.artists,m.items.map((e=>({type:a.c.ARTIST,name:e.profile.name,images:o(e.visuals.avatarImage?.sources),uri:e.uri,id:e.id})))),images:o(e.coverArt?.sources),moreAlbumsByArtist:(p=e.moreAlbumsByArtist,p?.items[0]?.discography?.popularReleasesAlbums?.items.map((e=>({type:a.c.ALBUM,uri:e.uri,albumType:e.type,name:e.name,images:o(e.coverArt?.sources),artists:[],sharingInfo:e.sharingInfo,year:e.date?.year})))),nrTracks:e.tracksV2.totalCount,isPlayable:e.tracksV2.items.filter(i.u).some((e=>e.track.playability.playable)),isSaved:e.saved,isCatalogueRestricted:e.playability.reason===s.$c.CatalogueRestricted,discs:t,copyright:e.copyright,albumType:e.type,duration:(d=e.tracksV2,{durationMs:d.items.length>0?d.items.filter(i.u).reduce(((e,t)=>e+t.track.duration.totalMilliseconds),0)/d.items.length*d.totalCount:0,isEstimate:d.items.length{if("Album"!==e?.albumUnion?.__typename)return{items:[],totalLength:0};const n=e.albumUnion.tracksV2.items.filter(i.u).map(c);return{items:(0,r.ED)(n,t)||[],totalLength:(0,r.YD)(t)?t.totalCount+e.albumUnion.tracksV2.totalCount:e.albumUnion.tracksV2.totalCount}}},6107:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,ED:()=>a,YD:()=>s});var i=n(31417),r=n(22745);const s=e=>e.totalCount>=2&&e.totalCount<=10,a=(e,t)=>{if(!s(t)||!e)return e;let n=0;return e.reduce(((e,t)=>((t.trackNumber{switch(e){case r._.Single:return i.Ru.get("web-player.album.premium-only-banner-single");case r._.Compilation:return i.Ru.get("web-player.album.premium-only-banner-compilation");case r._.Ep:return i.Ru.get("web-player.album.premium-only-banner-ep");default:return i.Ru.get("web-player.album.premium-only-banner-album")}}},8506:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(61137),r=n(74008);function s(e){const t=(0,r.o)("artistban",[e]).at(0)??!1,{setIsBanned:n}=(0,i.M)([e]);return[t,n]}},61137:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var i=n(30758),r=n(93240),s=n(31417),a=n(71151),o=n(20784);function l(e){const t=(0,a.l)(),n=(0,o.f)();return{setIsBanned:(0,i.useCallback)((i=>{i?(t.add("artistban",e),n.remove({uris:e,silent:!0}),(0,r.M8)(s.Ru.get("feedback.ban-artist"))):t.remove("artistban",e)}),[t,n,e]),unBanArtists:(0,i.useCallback)((()=>{t.remove("artistban",e)}),[t,e])}}},35523:(e,t,n)=>{"use strict";n.d(t,{A:()=>E,R:()=>_});var i=n(30758),r=n(50486),s=n(16273),a=n(31417),o=n(57776),l=n(59147);const c=new o.l("queryArtistOverview","query","4bc52527bb77a5f8bbb9afe491e9aa725698d29ab73bff58d49169ee29800167",null);var u=n(37410),d=n(33558),p=n(81834),m=n(27963);const h=e=>{const t=a.Ru.getLocaleForURLPath();return(0,u.W)({type:"link",uri:e})?`${d.CT}${t}`:""},f=(e,t)=>[e,t],g=(e,t,n)=>async()=>(0,m.c)(n,c,{uri:e,locale:t},{},[{key:"spotify-app-version",value:"896000000"}]),E=e=>{const t=h(e),{request:n}=(0,i.useContext)(p.j),{data:s,isLoading:a,error:o}=(0,r.I)({queryKey:f(e,t),queryFn:g(e,t,n),gcTime:5*l.i,staleTime:5*l.i});return{data:s?.data??null,extensions:s?.extensions,error:o??null,loading:a}},_=e=>{const{request:t}=(0,i.useContext)(p.j),n=(0,s.jE)(),r=h(e);return(0,i.useCallback)((()=>{n.prefetchQuery({queryKey:f(e,r),queryFn:g(e,r,t),staleTime:5*l.i})}),[n,t,r,e])}},79401:(e,t,n)=>{"use strict";n.d(t,{z:()=>m});var i=n(30758),r=n(16273),s=n(14343),a=n(74008),o=n(48905),l=n(38501),c=n(62270),u=n(79678),d=n(36416);var p=n(41031);const m=e=>{const t=(0,s.NC)(l.oFv),n=(0,u.p)(e),m=(0,c.T)(),[h]=(0,a.o)("markedasfinished",t?[e]:[]),f=(h||n?.state===p.H7.Completed)&&t,{add:g,remove:E}=(0,o.p)("markedasfinished"),_=(0,i.useCallback)((async()=>{t&&m.capabilities.canMarkAsFinished&&(await g(e),m.markShowPlayedLegacy(e,!0))}),[g,t,m,e]),y=(0,i.useCallback)((async()=>{t&&m.capabilities.canMarkAsFinished&&(await E(e),m.markShowPlayedLegacy(e,!1))}),[t,E,m,e]),v=(0,r.jE)();return function({callback:e,uri:t}){const n=(0,c.T)();(0,i.useEffect)((()=>n.getEvents().addListener(d.K.UPDATE_PLAYED_STATE,(n=>{n.data.uri!==t&&void 0!==n.data.uri||e(n)}))),[n,t,e])}({callback:(0,i.useCallback)((()=>{v.invalidateQueries({queryKey:["useShowPlayedState"]})}),[v]),uri:e}),{isMarkedAsFinished:f,markAsFinished:_,markAsUnfinished:y}}},84213:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var i=n(14343),r=n(38501);function s(){return(0,i.NC)(r.Wvg,{loadingValue:!1})}},19049:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});const i=(0,n(36285).u)("BuddyFeedLegacyAPI")},47601:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});const i=(0,n(36285).u)("BuddyFeedAPI")},9541:(e,t,n)=>{"use strict";n.d(t,{a:()=>v});var i=n(30758),r=n(50486),s=n(14343),a=n(91008),o=n(57776);n(59147);const l=new o.l("canvas","query","1b1e1915481c99f4349af88268c6b49a2b601cf0db7bca8749b5dd75088486fc",null);var c=n(33625),u=n(48926),d=n(38501),p=n(34990),m=n(81834),h=n(27963),f=n(46845),g=n(58685),E=n(7307),_=n(41434);const y=({avoidGraphQlFetching:e=!1})=>{const t=(0,f.Ek)(),n=(0,c.L)(),s=(0,g.o)((e=>e?.item?.type===E.c.TRACK&&e?.item?.metadata?.["canvas.fileId"]?{uri:e?.item?.metadata?.["canvas.canvasUri"],type:e?.item?.metadata?.["canvas.type"],fileId:e?.item?.metadata?.["canvas.fileId"],fileUrl:e?.item?.metadata?.["canvas.fileUrl"]}:null),_.a),o=!t&&!e,u=((e,t)=>{const{request:n}=(0,i.useContext)(m.j),{name:s,sha256Hash:o}=l,c={uri:e},u=(0,a.o_h)(e)?.type===E.c.TRACK,{data:d,isLoading:p,error:f}=(0,r.I)({enabled:t&&u,queryKey:[s,c,o],gcTime:36e5,staleTime:6e5,queryFn:()=>new Promise(((e,t)=>{(0,h.c)(n,l,c).then((t=>"Track"!==t?.data?.trackUnion.__typename?e(null):e({uri:t?.data?.trackUnion?.canvas?.uri,type:t?.data?.trackUnion?.canvas?.type,fileId:t?.data?.trackUnion?.canvas?.fileId,url:t?.data?.trackUnion?.canvas?.url}))).catch(t)})),meta:{persist:!0}});return{data:d,isLoading:p,error:f}})(n?.item?.uri??"",o),d=s||u?.data;return d?{canvas:d,loading:!s&&!!u?.isLoading,error:s?null:u?.error}:null},v=({tryAvoidGraphQLFetching:e=!1})=>{const t=(0,s.NC)(d.yJ8),n=(0,p.j)(),i=(0,u.g)(),r=t!==d.NtL.CONTROL,a=e&&!n&&!i,o=y({avoidGraphQlFetching:!r||a});if(a)return{canvas:null,loading:!1,error:null,showCanvasInNPV:!1,showCanvasToggleInContextMenu:!1};const l=Boolean(o?.canvas?.fileId),c=r&&l,m=!n&&i&&r&&l;return{canvas:o?.canvas||null,loading:Boolean(o?.loading),error:o?.error,showCanvasInNPV:m,showCanvasToggleInContextMenu:c}}},39582:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(30758),r=n(43080);const s=()=>{const e=(0,i.useContext)(r.y);if(!e)throw new Error("useCinemaDispatch must be used within a CinemaProvider");return e}},2650:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var i=n(30758),r=n(43080);const s=()=>{const e=(0,i.useContext)(r.s);if(!e)throw new Error("useCinemaState must be used within a CinemaProvider");return e}},79961:(e,t,n)=>{"use strict";n.d(t,{h:()=>b});var i=n(97500),r=n.n(i),s=n(62411),a=n(422),o=n(44481),l=n(31417),c=n(78925),u=n(8679),d=n(39148),p=n(32411),m=n(63676),h=n(89775),f=n(21082);const g="wbiMCtxPb9mVavA_mvnT",E="Vp06fdWv9JE5M3dE6glS",_="NXzVbUctid3mtaqSFGoM",y="cp8XP6S4uRj3cMyFQzSp";var v=n(86070);const b=({item:e,className:t})=>{const n=(0,s.wA)(),{tagline:i,buttonMessage:b,url:S}=(0,d.b)(e),A=b||l.Ru.get("ad-formats.learnMore");return(0,v.jsxs)("div",{className:r()(g,t),children:[(0,v.jsxs)("div",{className:y,children:[(0,v.jsx)(u.A,{item:e,variant:"titleMedium",surface:"AD_NPV"}),i&&(0,v.jsx)(a.E,{as:"div",variant:"bodyMedium",className:_,children:i})]}),i?(0,v.jsx)(c.default,{text:A,clickUrl:(0,p.H)(S??""),onClick:()=>{n((0,h.q5)(m.c.CTA_BUTTON,m.V.AD_NPV))},className:E}):(0,v.jsx)(f.N,{to:(0,p.H)(S??""),className:E,children:(0,v.jsx)(o.$,{size:"small",colorSet:"invertedLight","data-testid":"upgrade-button",children:A})})]})}},9473:(e,t,n)=>{"use strict";n.d(t,{z:()=>i.z});var i=n(1961)},91631:(e,t,n)=>{"use strict";n.d(t,{h:()=>i.h});var i=n(44948)},61301:(e,t,n)=>{"use strict";n.d(t,{l:()=>i.l});var i=n(39582)},90813:(e,t,n)=>{"use strict";n.d(t,{S:()=>i.S});var i=n(2650)},1961:(e,t,n)=>{"use strict";n.d(t,{z:()=>i});let i=function(e){return e.NOW_PLAYING_VIEW="nowPlayingView",e.CLOSED="closed",e}({})},24653:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(30758),r=n(40339),s=n(53328),a=n(8428);const o=()=>{const e=(0,r.Ev)(s.$S.DEVICE_PICKER_BUTTON_CLICK),{isActive:t,panelSend:n}=(0,r.AI)(a.Z.DevicePicker,a.Z.DevicePickerOverlay),o=(0,i.useCallback)((e=>n({type:s.$S.DEVICE_PICKER_BUTTON_CLICK,...!t&&{interactionId:e}})),[n,t]);return(0,i.useMemo)((()=>({togglePanel:o,isActive:t,canTogglePanel:e})),[o,t,e])}},11945:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var i=n(30758),r=n(62411),s=n(49200),a=n(29195),o=n(40217),l=n(79237);const c=({legacyCastPlaceholder:e}={legacyCastPlaceholder:!1})=>{const t=(0,a.vh)(),n=(0,r.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)),c=(0,l.v)((e=>e.devices));return(0,i.useCallback)((i=>{c.forEach((e=>{t.send((0,s.f)({discovered_device_id:e.connectStateId,discovered_device_name:e.name,discovered_device_type:e.type,discovered_device_brand_display_name:e.brandDisplayName??null,discovered_device_model:e.modelDisplayName??null,discovered_device_license:e.license??null,discovered_device_state:e.currentState??null,discovered_device_is_active:e.isActive,discovered_device_disabled:e.isDisabled,discovered_device_is_zeroconf:e.isZeroconf??null,discovered_device_is_local:e.isLocalNetwork??null,discovered_device_is_webapp:e.isWebApp??null,discovered_device_supports_hifi:e.losslessSupport.deviceSupported,interaction_id:i,is_logging_device:e.isLocal}))})),(e?(0,o.Hi)(n):(0,o.Or)(n))&&t.send((0,s.f)({discovered_device_name:"Google Cast Devices Available",discovered_device_brand_display_name:"Google",interaction_id:i}))}),[c,n,t,e])}},42156:(e,t,n)=>{"use strict";n.d(t,{$A:()=>i.$A,Mp:()=>i.Mp,tf:()=>i.tf});var i=n(53542)},11328:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C});var i=n(24653)},53542:(e,t,n)=>{"use strict";n.d(t,{$A:()=>C,HJ:()=>I,Mp:()=>S,p2:()=>O,tf:()=>A,uY:()=>T});var i=n(85207),r=n(79110),s=n(58054),a=n(92866),o=n(35365),l=n(13859),c=n(38635),u=n(75587),d=n(72423),p=n(79118),m=n(2651),h=n(82007),f=n(37819),g=n(74789),E=n(15055),_=n(31417),y=n(92443),v=n(62642),b=n(72046);function S(e){return e===v.bq.CAST_AUDIO||e===v.bq.CAST_VIDEO}function A(e,t,n){let f=i.U;const g=t?"multispeaker":e;if(function(e){return e?.audioDevice?.transportType===y.Yg.BLUETOOTH}(n))switch(n?.externalAccessory?.type){case b.G.HEADPHONES:return r.r;case b.G.SPEAKER:return s.r;case b.G.UNKNOWN:if(n?.audioDevice?.terminalType===y.FI.HEADPHONES)return r.r;if(n?.audioDevice?.terminalType===y.FI.SPEAKERS)return s.r}switch(g){case v.bq.COMPUTER:case v.bq.CHROMEBOOK:f=a.t;break;case v.bq.TABLET:f=o.$;break;case v.bq.SMARTPHONE:f=l.q;break;case v.bq.SPEAKER:case v.bq.CAST_AUDIO:case v.bq.AUDIO_DONGLE:case v.bq.HomeThing:f=s.r;break;case v.bq.TV:case v.bq.STB:case v.bq.CAST_VIDEO:f=c.I;break;case v.bq.AVR:f=u._;break;case v.bq.GAME_CONSOLE:f=d.q;break;case v.bq.SMARTWATCH:f=p.D;break;case v.bq.CarThing:case v.bq.AUTOMOBILE:f=m.Q;break;case"multispeaker":f=h.a}return f}function C(e,t="disconnected"){return S(e)?"connected"===t?f.I:g.m:E.E}function T(e,t){let n;switch(e){case v.bU.PREMIUM_REQUIRED:n=_.Ru.get("web-player.connect.device-picker.get-premium");break;case v.bU.NOT_INSTALLED:n=_.Ru.get("web-player.connect.device-picker.install-spotify");break;case v.bU.UNSUPPORTED_URI:n=_.Ru.get("web-player.connect.device-picker.unsupported-uri");break;case v.bU.INCOMPATIBLE:n=_.Ru.get("web-player.connect.device-picker.update-device");break;case v.bU.NOT_AUTHORIZED:n=t?_.Ru.get("web-player.connect.device-picker.playstation-unauthorized"):_.Ru.get("web-player.connect.device-picker.device-unavailable");break;case v.bU.UNAVAILABLE:n=_.Ru.get("web-player.connect.device-picker.device-unavailable");break;case v.bU.AD_PLAYING:n=_.Ru.get("web-player.connect.device-picker.ad-playing");break;case v.bU.NARRATION:n=_.Ru.get("web-player.connect.device-picker.tts-playing");break;case v.bU.WAKING_UP:n=_.Ru.get("web-player.connect.device-picker.wakingup-device");break;case v.bU.TIMED_OUT_WAKEUP:n=_.Ru.get("web-player.connect.device-picker.wakeup-timeout");break;case v.bU.RESTRICTED:break;case v.bU.UNKNOWN:default:n=_.Ru.get("web-player.connect.device-picker.restart-device")}return{helpText:n,tooltip:undefined}}function I(e){return void 0!==e&&2===e.available.length&&e.available.includes("cast")&&e.available.includes("connect")}function O(e,t){return e===v.bq.GAME_CONSOLE&&("ps5"===t||"ps4"===t)}},42767:(e,t,n)=>{"use strict";n.d(t,{j:()=>u});var i=n(30758),r=n(7460);function s(e){return e instanceof Node&&"STYLE"===e.nodeName}function a(e){return e instanceof Node&&"LINK"===e.nodeName}function o({nodeName:e,attributes:t}){return`${e}${Array.from(t).map((({name:e,value:t})=>`[${e}="${t}"]`)).join("")}`}function l(e){const t=window.open("about:blank",e.name,function(e){const{position:{x:t,y:n},size:{width:i,height:r}}=e;return`left=${t},top=${n},width=${i},height=${r}`}(e));if(null!==t){n=window.document,(i=t.document).head.querySelectorAll("style, link[rel=stylesheet]").forEach((e=>{i.head.removeChild(e)})),Array.from(n.styleSheets).forEach((e=>{if(e.href){const t=n.createElement("link");t.rel="stylesheet",t.href=e.href,i.head.appendChild(t)}else try{if(e.cssRules){const t=i.createElement("style");Array.from(e.cssRules).forEach((e=>{t.appendChild(i.createTextNode(e.cssText))})),i.head.appendChild(t)}}catch(t){console.warn("Failed to read `styleSheet.cssRules` - possibly a CORS issue?!",e)}})),function(e,t){const n=e.createElement("base");n.setAttribute("href",t),e.head.appendChild(n)}(t.document,`${window.location.protocol}//${window.location.hostname}/`);let r=null;r=new MutationObserver((e=>{for(const n of e)n.addedNodes.forEach((e=>{(a(e)||s(e))&&t.document.head.appendChild(e.cloneNode(!0))})),n.removedNodes.forEach((e=>{if(a(e))t.document.head.querySelector(o(e))?.remove();else if(s(e)){const n=e.textContent;Array.from(t.document.head.querySelectorAll(o(e))).find((({textContent:e})=>e===n))?.remove()}}))})),r.observe(window.document.head,{childList:!0}),t.addEventListener("pagehide",(()=>{null!==r&&(r.disconnect(),r=null),e.onClose?.(t)}))}var n,i;return t}const c={name:"debug-window",position:{x:200,y:200},size:{width:1200,height:800}};function u(){const{handle:e,open:t,close:n}=function(e){const[t,n]=(0,r.vB)(),s=(0,i.useRef)(e),a=t.map.get(e.name)??null;s.current=e;const o=(0,i.useCallback)((()=>{null!==a&&(a.close(),n((0,r.Mj)(s.current.name)))}),[n,a]),c=(0,i.useCallback)((()=>{if(null!==a)return;const e=l({...s.current,onClose:e=>{s.current.onClose?.(e),n((0,r.Mj)(s.current.name))}});null!==e&&n((0,r.qS)(s.current.name,e))}),[n,a]);return(0,i.useEffect)((()=>(window.addEventListener("pagehide",o),()=>{window.removeEventListener("pagehide",o)})),[o]),{handle:a,open:c,close:o}}(c);return{handle:e,show:t,hide:n}}},48014:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});var i=n(30758),r=n(62411),s=n(98293),a=n(15420);function o(){const e=(0,a.B)(),t=(0,r.wA)();return(0,i.useCallback)(((n,i)=>new Promise((r=>t((0,s.Ih)(n,(()=>e.removeDownload(n,i).then((()=>r(!0)))),(()=>r(!1)),i))))),[t,e])}},20421:(e,t,n)=>{"use strict";n.d(t,{N:()=>m});var i=n(30758),r=n(31417),s=n(87101),a=n(5590),o=n(69261),l=n(19610),c=n(63301),u=n(96789),d=n(13134),p=n(86070);function m(e,t,n){const m=(0,d.j)(),{enqueueCustomSnackbar:h}=(0,u.i)();return{ban:(0,i.useCallback)((()=>{m.addContextTrackBan(t,e),n&&h((0,p.jsx)(s.O,{children:(0,p.jsx)(l.P,{center:(0,p.jsx)(o.z,{children:r.Ru.get("feedback.hide-song",n)}),trailing:(0,p.jsx)(a.M,{ctaText:r.Ru.get("web-player.feedback.track-banned-in-context-undo",n),onCtaClick:()=>m.removeContextTrackBan(t,e)})})}),{autoHideDuration:c.r,identifier:r.Ru.get("feedback.hide-song",n)})}),[m,t,e,h,n]),unBan:(0,i.useCallback)((()=>{m.removeContextTrackBan(t,e)}),[e,t,m])}}},52975:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});const i="audiobooks-chip"},26921:(e,t,n)=>{"use strict";n.d(t,{f:()=>r});var i=n(85387);const r=()=>{const e=(0,i.zy)();return new URLSearchParams(e.search).get("facet")||""}},4305:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});let i=function(e){return e.OPEN_HELP="OPEN_HELP",e.RAISE_VOLUME="RAISE_VOLUME",e.LOWER_VOLUME="LOWER_VOLUME",e.SKIP_PREVIOUS="SKIP_PREVIOUS",e.SKIP_NEXT="SKIP_NEXT",e.TOGGLE_PLAY="TOGGLE_PLAY",e.SHUFFLE="SHUFFLE",e.REPEAT="REPEAT",e.SEEK_BACKWARD="SEEK_BACKWARD",e.SEEK_FORWARD="SEEK_FORWARD",e.INCREASE_PLAYBACK_SPEED="INCREASE_PLAYBACK_SPEED",e.DECREASE_PLAYBACK_SPEED="DECREASE_PLAYBACK_SPEED",e.GO_TO_NOW_PLAYING="GO_TO_NOW_PLAYING",e.GO_TO_HOME="GO_TO_HOME",e.GO_TO_LIBRARY="GO_TO_LIBRARY",e.GO_TO_PLAYLISTS="GO_TO_PLAYLISTS",e.GO_TO_ARTISTS="GO_TO_ARTISTS",e.GO_TO_ALBUMS="GO_TO_ALBUMS",e.GO_TO_PODCASTS="GO_TO_PODCASTS",e.GO_TO_AUDIOBOOKS="GO_TO_AUDIOBOOKS",e.GO_TO_LIKED_SONGS="GO_TO_LIKED_SONGS",e.GO_TO_MADE_FOR_YOU="GO_TO_MADE_FOR_YOU",e.GO_TO_CHARTS="GO_TO_CHARTS",e.GO_TO_SEARCH="GO_TO_SEARCH",e.GO_TO_PREFERENCES="GO_TO_PREFERENCES",e.CREATE_NEW_PLAYLIST="CREATE_NEW_PLAYLIST",e.CREATE_NEW_FOLDER="CREATE_NEW_FOLDER",e.SELECT_ALL="SELECT_ALL",e.FILTER="FILTER",e.GO_FORWARDS="GO_FORWARDS",e.GO_BACKWARDS="GO_BACKWARDS",e.LIKE_DISLIKE_SONG="LIKE_DISLIKE_SONG",e.GO_TO_NEW_RELEASES="GO_TO_NEW_RELEASES",e.GO_TO_QUEUE="GO_TO_QUEUE",e.GO_TO_BUDDY_FEED="GO_TO_BUDDY_FEED",e.GO_TO_DEVICE_PICKER="GO_TO_DEVICE_PICKER",e.LOG_OUT="LOG_OUT",e.OPEN_CONTEXT_MENU="OPEN_CONTEXT_MENU",e.TOGGLE_YLX_SIDEBAR="TOGGLE_YLX_SIDEBAR",e.TOGGLE_NPV_SIDEBAR="TOGGLE_NPV_SIDEBAR",e.YLX_SIDEBAR_DECREASE_WIDTH="YLX_SIDEBAR_DECREASE_WIDTH",e.YLX_SIDEBAR_INCREASE_WIDTH="YLX_SIDEBAR_INCREASE_WIDTH",e.NPV_SIDEBAR_DECREASE_WIDTH="NPV_SIDEBAR_DECREASE_WIDTH",e.NPV_SIDEBAR_INCREASE_WIDTH="NPV_SIDEBAR_INCREASE_WIDTH",e.OPEN_SEARCH_MODAL="OPEN_SEARCH_MODAL",e.TOGGLE_DEBUG_WINDOW="TOGGLE_DEBUG_WINDOW",e.FOCUS_YLX_TEXT_FILTER="FOCUS_YLX_TEXT_FILTER",e.WF_GO_TO_PREVIOUS="WF_GO_TO_PREVIOUS",e.WF_GO_TO_NEXT="WF_GO_TO_NEXT",e.WF_ADD_TO_LIBRARY="WF_ADD_TO_LIBRARY",e.WF_ADD_TO_QUEUE="WF_ADD_TO_QUEUE",e.WF_MUTE_UNMUTE="WF_MUTE_UNMUTE",e}({})},3714:(e,t,n)=>{"use strict";n.d(t,{r:()=>i.r});var i=n(4305)},36150:(e,t,n)=>{"use strict";n.d(t,{p:()=>u});var i=n(4305),r=n(18753),s=n(72762),a=n(32963);const o=e=>e?"alt+left":"mod+left",l=e=>e?"alt+right":"mod+right",c={[i.r.OPEN_SEARCH_MODAL]:()=>["mod+k"],[i.r.OPEN_HELP]:()=>["mod+/","?"],[i.r.CREATE_NEW_PLAYLIST]:e=>[e?"mod+n":"alt+shift+p"],[i.r.LIKE_DISLIKE_SONG]:()=>["alt+shift+b"],[i.r.LOG_OUT]:()=>["alt+shift+f6"],[i.r.CREATE_NEW_FOLDER]:e=>[e?"mod+shift+n":"mod+alt+shift+p"],[i.r.SELECT_ALL]:()=>["mod+a"],[i.r.FILTER]:()=>["mod+f"],[i.r.TOGGLE_PLAY]:()=>["space"],[i.r.SEEK_BACKWARD]:(e,t)=>[t?"mod+shift+left":"shift+left"],[i.r.SEEK_FORWARD]:(e,t)=>[t?"mod+shift+right":"shift+right"],[i.r.SHUFFLE]:e=>[e?"mod+s":"alt+s"],[i.r.REPEAT]:e=>[e?"mod+r":"alt+r"],[i.r.RAISE_VOLUME]:e=>[e?"mod+up":"alt+up"],[i.r.LOWER_VOLUME]:e=>[e?"mod+down":"alt+down"],[i.r.SKIP_PREVIOUS]:(e,t)=>[e?"mod+left":o(t)],[i.r.SKIP_NEXT]:(e,t)=>[e?"mod+right":l(t)],[i.r.DECREASE_PLAYBACK_SPEED]:()=>["shift+,"],[i.r.INCREASE_PLAYBACK_SPEED]:()=>["shift+."],[i.r.GO_TO_LIBRARY]:()=>["alt+shift+0"],[i.r.GO_TO_PLAYLISTS]:()=>["alt+shift+1"],[i.r.GO_TO_PODCASTS]:()=>["alt+shift+2"],[i.r.GO_TO_ARTISTS]:()=>["alt+shift+3"],[i.r.GO_TO_ALBUMS]:()=>["alt+shift+4"],[i.r.GO_TO_AUDIOBOOKS]:()=>["alt+shift+5"],[i.r.GO_TO_HOME]:()=>["alt+shift+h"],[i.r.GO_TO_PREFERENCES]:()=>["mod+,"],[i.r.GO_BACKWARDS]:(e,t)=>e?["mod+alt+left","alt+left"]:(e=>e?["mod+left"]:["alt+left"])(t),[i.r.GO_FORWARDS]:(e,t)=>e?["mod+alt+right","alt+right"]:(e=>e?["mod+right"]:["alt+right"])(t),[i.r.GO_TO_SEARCH]:e=>[e?"mod+l":"mod+shift+l"],[i.r.GO_TO_NOW_PLAYING]:()=>["alt+shift+j"],[i.r.GO_TO_LIKED_SONGS]:()=>["alt+shift+s"],[i.r.GO_TO_MADE_FOR_YOU]:()=>["alt+shift+m"],[i.r.GO_TO_NEW_RELEASES]:()=>["alt+shift+n"],[i.r.GO_TO_CHARTS]:()=>["alt+shift+c"],[i.r.GO_TO_QUEUE]:()=>["alt+shift+q"],[i.r.GO_TO_BUDDY_FEED]:()=>["alt+shift+u"],[i.r.GO_TO_DEVICE_PICKER]:()=>["alt+shift+d"],[i.r.OPEN_CONTEXT_MENU]:()=>["alt+j"],[i.r.TOGGLE_NPV_SIDEBAR]:()=>["alt+shift+r"],[i.r.TOGGLE_YLX_SIDEBAR]:()=>["alt+shift+l"],[i.r.YLX_SIDEBAR_DECREASE_WIDTH]:()=>["alt+shift+left"],[i.r.YLX_SIDEBAR_INCREASE_WIDTH]:()=>["alt+shift+right"],[i.r.NPV_SIDEBAR_DECREASE_WIDTH]:()=>["alt+shift+down"],[i.r.NPV_SIDEBAR_INCREASE_WIDTH]:()=>["alt+shift+up"],[i.r.TOGGLE_DEBUG_WINDOW]:()=>["alt+command+x"],[i.r.FOCUS_YLX_TEXT_FILTER]:e=>e?["mod+alt+f"]:["shift+mod+alt+f"],[i.r.WF_GO_TO_PREVIOUS]:()=>["up"],[i.r.WF_GO_TO_NEXT]:()=>["down"],[i.r.WF_ADD_TO_LIBRARY]:()=>["left"],[i.r.WF_ADD_TO_QUEUE]:()=>["right"],[i.r.WF_MUTE_UNMUTE]:()=>["m"]},u=e=>{const t="macOS"===(0,a.f)(),n=(0,s.My)()===r.m.Desktop;return c[e](n,t)}},21200:(e,t,n)=>{"use strict";n.d(t,{y:()=>m});var i=n(30758),r=n(14343),s=n(98264),a=n(78505),o=n(39770),l=n(62844),c=n(73816),u=n(38501),d=n(62021),p=n(85907);const m=()=>{const e=(0,r.NC)(u.ZDY)?s.j:0,{ylxSidebarState:t,setYlxSidebarState:n,canCollapse:m,canExpand:h}=(0,l.sy)(),[f,g]=(0,d.x)("ylx-default-state-nav-bar-width",Math.max(o.ZU.DEFAULT_MIN,Math.min(Math.round(.23*innerWidth),o.ZU.DEFAULT_MAX))),[E,_]=(0,d.x)("ylx-expanded-state-nav-bar-width",Math.max(o.ZU.EXPANDED_MIN,Math.min(Math.round(.55*innerWidth),o.ZU.EXPANDED_MAX)));let y;switch(t){case l.fX.COLLAPSED:y=o.ZU.COLLAPSED;break;case l.fX.DEFAULT:y=f;break;case l.fX.EXPANDED:y=E;break;case null:y=f;break;default:(0,p.k)(t),y=f}const v=(0,i.useCallback)((e=>{e[...m?[[o.ZU.COLLAPSED,o.ZU.COLLAPSED]]:[],[o.ZU.DEFAULT_MIN,o.ZU.DEFAULT_MAX],...h?[[o.ZU.EXPANDED_MIN,o.ZU.EXPANDED_MAX]]:[]].map((([e,t])=>[e,Math.min(t,b)]))),[m,h,b]);let A,C;switch(t){case l.fX.COLLAPSED:A=C=o.ZU.COLLAPSED;break;case l.fX.DEFAULT:A=o.ZU.DEFAULT_MIN,C=o.ZU.DEFAULT_MAX;break;case l.fX.EXPANDED:A=o.ZU.EXPANDED_MIN,C=o.ZU.EXPANDED_MAX;break;case null:A=0,C=0;break;default:A=0,C=0,(0,p.k)(t)}return{size:y,setSize:v,minMaxRanges:S,minWidth:A,maxWidth:C,ylxCollapsedStateNavbarWidth:o.ZU.COLLAPSED,ylxDefaultStateNavbarWidth:f,ylxExpandedStateNavbarWidth:E}}},39770:(e,t,n)=>{"use strict";n.d(t,{ZU:()=>i,x9:()=>r});let i=function(e){return e[e.COLLAPSED=72]="COLLAPSED",e[e.DEFAULT_MIN=280]="DEFAULT_MIN",e[e.DEFAULT_MAX=420]="DEFAULT_MAX",e[e.EXPANDED_MIN=584]="EXPANDED_MIN",e[e.EXPANDED_MAX=Number.POSITIVE_INFINITY]="EXPANDED_MAX",e}({});const r="createPlaylist"},50161:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i.ZU,x:()=>i.x9});var i=n(39770)},74515:(e,t,n)=>{"use strict";n.d(t,{y:()=>i.y});var i=n(21200)},90841:(e,t,n)=>{"use strict";n.d(t,{$:()=>s});var i=n(85387);const r="/lyrics",s=()=>({isActive:(0,i.zy)().pathname.startsWith(r),routeDestination:r})},30631:(e,t,n)=>{"use strict";n.d(t,{Bg:()=>i,gL:()=>s,gh:()=>r});let i=function(e){return e.SET_LYRICS_MODE="SET_LYRICS_MODE",e.SET_LYRICS_TRANSLATION_LANGUAGE="SET_LYRICS_ALTERNATIVE_LANGUAGE",e}({});const r=e=>({type:i.SET_LYRICS_MODE,mode:e}),s=e=>({type:i.SET_LYRICS_TRANSLATION_LANGUAGE,language:e})},41715:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var i=n(85387),r=n(95365),s=n(29899),a=n(30758),o=n(41750);var l=n(12546),c=n(86070);const u=({children:e,navigationalRoot:t,pageId:n,entityUri:u})=>{const d=(0,r.H)(),p=t??d,m=(0,i.zy)();return function({pageId:e,navigationalRoot:t,entityUri:n}){const i=(0,r.u)(),s=(0,o.S)().isOpen;(0,a.useEffect)((()=>{i&&e&&!s&&i.reportPageView({pageId:e,navigationalRoot:t,entityUri:n})}),[e,i,t,n,s])}({pageId:n,navigationalRoot:p,entityUri:(0,l.y)(u??m.pathname)}),(0,c.jsx)(s.z,{value:p,children:e})};function d({children:e,pageId:t,navigationalRoot:n,entityUri:i}){return(0,c.jsx)(u,{navigationalRoot:n,pageId:t,entityUri:i,children:e})}},2983:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(85387),r=n(30339),s=n(33329),a=n(12546);var o=n(86070);const l=({to:e,state:t})=>{const n=(0,i.g)(),l=function(){const e=(0,i.zy)(),t=(0,s.s)(),n=e.state?.interactionId;return n??t.getInteractionId((0,a.y)(e.pathname))}();return"string"==typeof e?(0,o.jsx)(i.C5,{to:(0,r.tW)(e,n),state:{...t,interactionId:l},replace:!0}):(0,o.jsx)(i.C5,{to:{...e,pathname:(0,r.tW)(e.pathname,n)},state:{...t,interactionId:l},replace:!0})}},85425:(e,t,n)=>{"use strict";n.d(t,{O:()=>d});var i=n(91008),r=n(32411),s=n(3602),a=n(20817),o=n(39838),l=n(13947),c=n(45627),u=n(5805);function d(e,t,n){let d=(0,r.H)(e.uri);if((0,s.c0)(d))return null;const p=(0,i.U_m)(d),m=d===o.bV,h="queue"===t.provider;(p||h||m)&&((0,u.v)(t)?d=t.album.uri:((0,c.p)(t)||(0,l.d)(t))&&(d=t.uri),m&&(d=a.E3));const f=(0,i.o_h)(d);if(null===f)return null;if((0,u.v)(t)||(0,c.p)(t)||(0,l.d)(t)){return{to:f.toURLPath(!0),search:(g={uid:t.uid,uri:t.uri,page:n?.pageIndex??null,pageUri:n?.pageURI??null,index:n?.itemIndex??null,highlight:p?t.uri:null},Object.keys(g).filter((e=>null!==g[e])).map((e=>`${e}=${encodeURIComponent(g[e])}`)).join("&"))}}var g;return{to:f.toURLPath(!0)}}},73395:(e,t,n)=>{"use strict";n.d(t,{r:()=>u});var i=n(31417),r=n(75497),s=n(13947),a=n(45627),o=n(5805),l=n(4861),c=n(85907);function u(e){if((0,o.v)(e)||(0,l.v)(e)){let t=e.name;const n=e.artists.map((e=>e.name)).join(i.Ru.getSeparator());return n&&(t=`${t} • ${n} `),t}return(0,a.p)(e)?`${e.name} • ${e.show.name}`:(0,s.d)(e)||(0,r.N)(e)?(console.error(e.uri,"is not draggable"),""):(0,c.d)(e)}},22461:(e,t,n)=>{"use strict";n.d(t,{F:()=>s,L:()=>a});var i=n(58685),r=n(41434);function s(e,t){return null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri&&(0,r.a)(e.context?.metadata,t.context?.metadata)&&e.item?.mediaType===t.item?.mediaType&&(0,r.a)(e.item?.metadata,t.item?.metadata)&&e.index.itemIndex===t.index.itemIndex&&e.index.pageIndex===t.index.pageIndex&&e.index.pageURI===t.index.pageURI}function a(){const e=(0,i.o)((e=>e),s);if(null===e)return null;const{context:t,item:n,index:r}=e;return null===n?null:{context:t,item:n,index:r}}},31904:(e,t,n)=>{"use strict";n.d(t,{C:()=>u});var i=n(30758),r=n(14343),s=n(7388),a=n(62021),o=n(36958),l=n(43329);const c="playbackSpeed";function u(){const e=(0,r.NC)(l.hd),{speed:t,setSpeed:n,canChangeSpeed:u}=(0,o.V)(),[d,p]=(0,a.x)(c,s.Mo),m=(0,i.useMemo)((()=>(0,s._E)(d??s.wH)),[d]),h=(0,i.useMemo)((()=>Boolean(t)?(0,s._E)(t):m),[t,m]),f=(0,i.useCallback)((e=>{p(e),n(e)}),[p,n]);return{speed:e===l._9.ESPERANTO?h:m,setSpeed:f,canChangeSpeed:u}}},7388:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>i,_E:()=>s,wH:()=>r});const i=1,r=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5],s=(e=i)=>{const t=r,[n]=t.slice().sort(((t,n)=>Math.abs(t-e)-Math.abs(n-e)));return n}},19223:(e,t,n)=>{"use strict";n.d(t,{b:()=>i.b});var i=n(19341)},65723:(e,t,n)=>{"use strict";n.d(t,{d:()=>i.d});var i=n(93298)},70123:(e,t,n)=>{"use strict";n.d(t,{W:()=>i.W});var i=n(99977)},33625:(e,t,n)=>{"use strict";n.d(t,{F:()=>i.F,L:()=>i.L});var i=n(22461)},38540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,D:()=>a});var i=n(30758),r=n(86070);const s=(0,i.createContext)({online:!0});const a=({children:e,initialStatus:t})=>{const[n,a]=(0,i.useState)((()=>t??globalThis.navigator.onLine));(0,i.useEffect)((()=>{const e=()=>{a(!0)},t=()=>{a(!1)};return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}),[]);const o=(0,i.useMemo)((()=>({online:n})),[n]);return(0,r.jsx)(s.Provider,{value:o,children:e})}},74180:(e,t,n)=>{"use strict";n.d(t,{Qr:()=>i.Qr,er:()=>i.er});var i=n(72911)},18870:(e,t,n)=>{"use strict";n.d(t,{B:()=>i.B,c:()=>i.c});var i=n(92828)},73204:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var i=n(30758),r=n(57879),s=n(50671),a=n(21549);function o(e){const{spec:t}=(0,a.r)(r.F,{}),n=(0,i.useMemo)((()=>t.onboardingTooltipFactory({identifier:e,reason:"Onboarding tooltip"})),[e,t]);return(0,s.t)(n)}},92828:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,c:()=>r});let i=function(e){return e.SEARCH="search",e.ARTIST_CARD="artistCard",e.PLAY_BUTTON="playButton",e.COMPLETED="completed",e}({});const r=3},74249:(e,t,n)=>{"use strict";n.d(t,{_:()=>l});var i=n(30758);const r=e=>(0,i.useCallback)((()=>{const t=document.querySelector(`[data-restore-focus-key="${e}"]`);t instanceof HTMLElement&&t.focus()}),[e]);var s=n(8428),a=n(97121),o=n(4601);function l(){const e=(0,a.X)(),[,,t]=(0,o.s)(),n=function(){const[,e]=(0,o.s)();return e.send}(),l=r(e);return(0,i.useCallback)((i=>{const r=t.transition(e,i).value===s.Z.Disabled;n(i),r&&l()}),[t,e,n,l])}},53328:(e,t,n)=>{"use strict";n.d(t,{$S:()=>r.$S,MQ:()=>i.MQ,pF:()=>i.pF});var i=n(52624),r=n(68411)},40339:(e,t,n)=>{"use strict";n.d(t,{Ev:()=>v,XB:()=>_.X,_Y:()=>d._,Zf:()=>u,AI:()=>b,sV:()=>y.s,bF:()=>E});var i=n(78505),r=n(74515);const s=280,a=420,o="panel-width";var l=n(73816),c=n(62021);function u(){const[e,t]=(0,c.x)(o,Math.max(s,Math.min(Math.round(.23*innerWidth),a))),{minWidth:n}=(0,r.y)(),u=(0,l.H)()-n-i.ev-4*i.KV,d=Math.min(Math.max(0,u),a);return{size:Math.max(e,s),setSize:t,min:s,max:d}}var d=n(74249),p=n(30758),m=n(68411),h=n(87464),f=n(87182),g=n(90326);const E=()=>{const e=(0,d._)(),t=(0,f.z)(),n=(0,p.useRef)(null),i=(0,p.useRef)(null);(0,g.p)(h.gd.UPDATE,(({data:t})=>{const r=t?.item?.uri??null;n.current!==r&&(n.current=r,e({type:m.$S.PLAYBACK_AUTOPLAY,playerState:t})),t?.context?.uri!==i.current&&(i.current=t?.context?.uri??null,e({type:m.$S.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED}))})),(0,g.p)(h.gd.ACTION,(({data:n})=>{n.action===h.Ik.PLAY&&e({type:m.$S.PLAY_CLICK,action:n,playerState:t.getState()})}))};var _=n(97121),y=n(4601);function v(e){const[t,n,i]=(0,y.s)(),[r,s]=(0,p.useState)(!0),a=(0,p.useCallback)((t=>{const n=i.transition(t,e);s(n.changed??!0)}),[i,e]);return(0,p.useEffect)((()=>{const e=n.subscribe(a);return()=>e.unsubscribe()}),[n]),r}function b(e,t){const[n]=(0,y.s)(),i=(0,d._)();return{isActive:t?n.value===e||n.value===t:n.value===e,panelSend:i,context:n.context}}},8428:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});let i=function(e){return e.NowPlayingView="now_playing_view",e.BuddyFeed="buddy_feed",e.BuddyFeedOverlay="buddy_feed_overlay",e.Puffin="puffin",e.PuffinOverlay="puffin_overlay",e.PuffinActivation="puffin_activation",e.PuffinActivationOverlay="puffin_activation_overlay",e.Queue="queue",e.QueueOverlay="queue_overlay",e.DevicePicker="device_picker",e.DevicePickerOverlay="device_picker_overlay",e.Disabled="disabled",e}({})},68411:(e,t,n)=>{"use strict";n.d(t,{$S:()=>u,BV:()=>d});var i=n(97191),r=n(8428),s=n(45627),a=n(37474),o=n(7307),l=n(85907);const c="ui.right_sidebar_content";let u=function(e){return e.NPV_BUTTON_CLICK="npv_button_click",e.BUDDY_FEED_BUTTON_CLICK="buddy_feed_button_click",e.PUFFIN_BUTTON_CLICK="puffin_button_click",e.PUFFIN_START_ACTIVATION="puffin_start_activation",e.PUFFIN_FINISH_ACTIVATION="puffin_finish_activation",e.QUEUE_BUTTON_CLICK="queue_button_click",e.JAM_CONNECT_BAR_CLICK="jam_connect_bar_click",e.DEVICE_PICKER_BUTTON_CLICK="device_picker_button_click",e.PANEL_CLOSE_CLICK="panel_close_click",e.PLAYBACK_AUTOPLAY="playback_autoplay",e.PLAY_CLICK="play_click",e.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED="playback_autoplay_context_changed",e}({});function d(e,t,n,d,p){const{isAutoToggleNPVEnabled:m,isQueueOnRightPanelEnabled:h,isPeekEnabled:f}=d;function g(t){const n=e.getState()?.context;if(f&&t===r.Z.NowPlayingView)return!0;switch(t){case r.Z.BuddyFeed:case r.Z.BuddyFeedOverlay:return!p;case r.Z.NowPlayingView:return!p&&(0,a.O)(n);case r.Z.PuffinActivation:case r.Z.PuffinActivationOverlay:case r.Z.Puffin:case r.Z.PuffinOverlay:return!p;case r.Z.Queue:case r.Z.QueueOverlay:return h;case r.Z.DevicePicker:case r.Z.DevicePickerOverlay:case r.Z.Disabled:return!0;default:return(0,l.d)(t),!1}}function E(e){const t=e&&(0,s.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType);return Boolean(t)}function _(e,t){const n=t.playerState?.item;return E(n)}function y(e){return e.playerState?.item?.type===o.c.AD}function v(e,t){return y(t)}function b(t){return e.getState()?.item?.type!==o.c.AD}const S=new Set(["buddy_feed"]),A=new Set([...S,"queue","history"]);function C(e,t){const n=t.playerState?.item;return!!E(n)||(function(e){h?A.has(e.action.origin.featureIdentifier):S.has(e.action.origin.featureIdentifier)}(t),!1)}function T(e){return e.type===u.PLAYBACK_AUTOPLAY&&!y(e)}const I=new Set([u.BUDDY_FEED_BUTTON_CLICK,u.PUFFIN_BUTTON_CLICK,u.DEVICE_PICKER_BUTTON_CLICK,u.PANEL_CLOSE_CLICK,u.NPV_BUTTON_CLICK,u.PLAY_CLICK,u.QUEUE_BUTTON_CLICK,u.JAM_CONNECT_BAR_CLICK]);function O(e){return T(e)||function(e){return"xstate.init"!==e.type&&I.has(e.type)}(e)}function w(e){return function(n,i){p||t.setItem(c,e),O(i)&&(n.preAdsPanelState=e)}}function N(e){return function(t,n){return!(!T(n)||e!==t.preAdsPanelState)}}const R=(0,i.Op)({id:"RightPanelState",context:{preAdsPanelState:null,devicePicker:null},initial:function(){const e=t.getItem(c);return function(e){return Object.values(r.Z).includes(e)}(e)&&g(e)?e:r.Z.Disabled}(),states:{[r.Z.Disabled]:{entry:[w(r.Z.Disabled)],on:{[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:[{target:r.Z.Queue}],[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED]:{target:r.Z.NowPlayingView,cond:()=>m},[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:C}]}},[r.Z.NowPlayingView]:{entry:[w(r.Z.NowPlayingView)],on:{[u.NPV_BUTTON_CLICK]:{target:r.Z.Disabled,cond:b},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled,cond:b},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.PuffinOverlay,cond:b},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivationOverlay},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeedOverlay,cond:b},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.QueueOverlay,cond:b},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.QueueOverlay,cond:b},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePickerOverlay,cond:b},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.BuddyFeedOverlay,cond:N(r.Z.BuddyFeed)},{target:r.Z.Disabled,cond:N(r.Z.Disabled)},{target:r.Z.DevicePickerOverlay,cond:N(r.Z.DevicePicker)},{target:r.Z.Disabled,cond:function(e,t){if(t.type===u.PLAYBACK_AUTOPLAY){const e=t.playerState?.context;if(!(0,a.O)(e))return!0}return!1}}]}},[r.Z.BuddyFeed]:{entry:[w(r.Z.BuddyFeed)],on:{[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:C}]}},[r.Z.BuddyFeedOverlay]:{entry:[w(r.Z.BuddyFeed)],on:{[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.PuffinOverlay},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivationOverlay},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.QueueOverlay},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.QueueOverlay},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePickerOverlay},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:C}]}},[r.Z.Queue]:{entry:[w(r.Z.Queue)],on:{[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Disabled},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:C}]}},[r.Z.QueueOverlay]:{entry:[w(r.Z.QueueOverlay)],on:{[u.QUEUE_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.NowPlayingView},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeedOverlay},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.PuffinOverlay},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivationOverlay},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePickerOverlay},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:C}]}},[r.Z.Puffin]:{entry:[w(r.Z.Puffin)],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePicker},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:C}}},[r.Z.PuffinOverlay]:{entry:[w(r.Z.PuffinOverlay)],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivationOverlay},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeedOverlay},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.QueueOverlay},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.QueueOverlay},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.DevicePickerOverlay},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:C}}},[r.Z.DevicePicker]:{entry:[w(r.Z.DevicePicker),(0,i.kp)({devicePicker:(e,t)=>t.type===u.DEVICE_PICKER_BUTTON_CLICK&&t.interactionId?{interactionId:t.interactionId}:null})],exit:[(0,i.kp)({devicePicker:null})],on:{[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeed},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.Queue},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.Queue},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Puffin},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivation},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:C}}},[r.Z.DevicePickerOverlay]:{entry:[w(r.Z.DevicePickerOverlay),(0,i.kp)({devicePicker:(e,t)=>t.type===u.DEVICE_PICKER_BUTTON_CLICK&&t.interactionId?{interactionId:t.interactionId}:null})],exit:[(0,i.kp)({devicePicker:null})],on:{[u.DEVICE_PICKER_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.BUDDY_FEED_BUTTON_CLICK]:{target:r.Z.BuddyFeedOverlay},[u.QUEUE_BUTTON_CLICK]:{target:r.Z.QueueOverlay},[u.JAM_CONNECT_BAR_CLICK]:{target:r.Z.QueueOverlay},[u.NPV_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.PuffinOverlay},[u.PUFFIN_START_ACTIVATION]:{target:r.Z.PuffinActivationOverlay},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:_},{target:r.Z.NowPlayingView,cond:v}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:C}}},[r.Z.PuffinActivation]:{entry:[],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.Disabled},[u.PUFFIN_FINISH_ACTIVATION]:{target:r.Z.Puffin},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v}]}},[r.Z.PuffinActivationOverlay]:{entry:[],on:{[u.PUFFIN_BUTTON_CLICK]:{target:r.Z.NowPlayingView},[u.PUFFIN_FINISH_ACTIVATION]:{target:r.Z.PuffinOverlay},[u.PANEL_CLOSE_CLICK]:{target:r.Z.NowPlayingView},[u.PLAYBACK_AUTOPLAY]:[{target:r.Z.NowPlayingView,cond:v}]}}}});for(const e of Object.values(R.config.states))e.on=Object.entries(e.on||{}).reduce(((e={},[t,n])=>{const i=Array.isArray(n)?n:[n];return e[t]=Object.values(i).map((e=>{const t="string"==typeof e?{target:e}:e,n="function"==typeof t.cond?t.cond:()=>!0;return t.cond=(e,i)=>{const r=n;return g(t.target)&&r(e,i)},t})),e}),{});return R}},55221:(e,t,n)=>{"use strict";n.d(t,{J:()=>a});var i=n(30758),r=n(6837),s=n(19640);const a=({uri:e,permissionLevel:t})=>{const n=(0,s.a)(),{onCopyLink:a}=(0,r.L)({uri:e,interactionData:{intent:"share",type:"click"}});return{onCopyLink:(0,i.useCallback)((async()=>{const i=await n.getPermissionGrant(e,t),r=new URLSearchParams;return i.token&&r.set("pt",i.token),a(r)}),[e,t,n,a])}}},96533:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var i=n(30758),r=n(38682),s=n(13889);const a=(e,t)=>{const n=(0,s.m)();return(0,i.useMemo)((()=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:!0},contentsOptions:{offset:0,limit:25,sort:(0,r.Xt)(e),filter:t,isExtraColumnsEnabled:n}})),[e,t,n])}},13889:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var i=n(14343),r=n(38501);const s=()=>{const e=(0,i.NC)(r.qVe),t=(0,i.NC)(r.Lkd),n=(0,i.NC)(r.wXB);return e&&t&&n}},90360:(e,t,n)=>{"use strict";n.d(t,{J:()=>i.J});var i=n(55221)},25013:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,k:()=>o});var i=n(14343),r=n(38501),s=n(19329);const a=()=>{const e=(0,i.NC)(r.uyM),t=(0,i.NC)(r.pj7),n=(0,i.NC)(r.wIO);return e||t||n},o=e=>{const{openURLWithSessionTransfer:t}=(0,s.L)();e.target instanceof HTMLAnchorElement&&e instanceof KeyboardEvent&&(t(e.target.href,"_blank"),e.preventDefault())}},52255:(e,t,n)=>{"use strict";n.d(t,{c:()=>l});var i=n(30758),r=n(62868),s=n(40339),a=n(53328),o=n(8428);const l=()=>{const{panelSend:e,isActive:t}=(0,s.AI)(o.Z.Puffin,o.Z.PuffinOverlay);return{togglePuffin:(0,i.useCallback)((()=>{const n=t;e(a.$S.PUFFIN_BUTTON_CLICK),n||(0,r.I)("PUFFIN")}),[t,e]),isPuffinPanelActive:t}}},94329:(e,t,n)=>{"use strict";n.d(t,{m:()=>s,p:()=>r});var i=n(62021);let r=function(e){return e.QUEUE="queue",e.HISTORY="history",e.PARTICIPANT_LIST="participant_list",e}({});const s=()=>{const[e,t]=(0,i.x)("queue-view",r.QUEUE);return{currentQueueView:e,setQueueView:t}}},98471:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var i=n(30758),r=n(85387),s=n(14343),a=n(62868),o=n(40339),l=n(53328),c=n(8428),u=n(94329),d=n(98855),p=n(38501);const m=l.$S.QUEUE_BUTTON_CLICK,h=()=>{const e=(0,s.NC)(p.eWj),t=(0,d.y)(),n=(0,r.Zp)(),{isActive:h,panelSend:f}=(0,o.AI)(c.Z.Queue,c.Z.QueueOverlay),{setQueueView:g}=(0,u.m)(),E=(0,i.useCallback)(((i=u.p.QUEUE)=>{if(e){if(i===u.p.HISTORY&&!t)return;h||(f(l.$S.QUEUE_BUTTON_CLICK),g(i))}else n("/queue")}),[t,e,h,n,f,g]);return{toggleQueue:(0,i.useCallback)((()=>{if(e){const e=h;f(m),e||(g(u.p.QUEUE),(0,a.I)("QUEUE-HISTORY-PANEL"))}else E()}),[e,h,E,f,g]),openQueue:E}}},75610:(e,t,n)=>{"use strict";n.d(t,{R:()=>i.R});var i=n(98471)},7019:(e,t,n)=>{"use strict";n.d(t,{a:()=>r,d:()=>s});var i=n(47756);const r={fullscreen:!1,cinema:!1,npv:!1,transcriptAvailable:!1},s=(e={uiFlags:r,mode:i.aY.none},t)=>{const{key:n,value:s}=t,a={...e.uiFlags,[n]:s};return{...e,mode:(o=a,o.fullscreen?i.aY.fullscreen:o.cinema?i.aY.cinema:i.aY.npv),uiFlags:a};var o}},17385:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});const i="recently-played"},3168:(e,t,n)=>{"use strict";n.d(t,{f:()=>r});var i=n(40339);const r=()=>(0,i.Zf)()},32714:(e,t,n)=>{"use strict";n.d(t,{$:()=>i.$y,N:()=>i.Nf});var i=n(15357)},71354:(e,t,n)=>{"use strict";n.d(t,{TC:()=>r,j7:()=>s,ud:()=>a});var i=n(31417);const r=["artists","albums","episodes","genres","playlists","podcasts","audiobooks","tracks","users","topResults","podcastAndEpisodes"],s={artists:()=>i.Ru.get("search.title.artists"),albums:()=>i.Ru.get("search.title.albums"),playlists:()=>i.Ru.get("search.title.playlists"),podcasts:()=>i.Ru.get("search.title.shows"),episodes:()=>i.Ru.get("search.title.episodes"),audiobooks:()=>i.Ru.get("search.title.audiobooks"),users:()=>i.Ru.get("search.title.profiles"),genres:()=>i.Ru.get("search.title.genres-and-moods"),tracks:()=>i.Ru.get("search.title.tracks"),podcastAndEpisodes:()=>i.Ru.get("search.title.podcast-and-shows"),topResults:()=>i.Ru.get("search.row.top-results")},a=["artists","albums","playlists","podcasts","episodes","audiobooks","users","genres"]},31409:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,k:()=>a});var i=n(30758),r=n(62021);const s="fusionSearchHistory",a=()=>{const[e,t]=(0,r.x)(s,[]),n=(0,i.useCallback)((e=>{t(function(e){const t={},n=[];for(let i=0;i{let i=[];n&&(i=e.filter((e=>e.uri!==n))),t(i)}),[e,t]);return{searchHistory:e,setSearchHistory:n,clearSearchHistory:a}}},25575:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(30758),r=n(85387),s=n(71354);const a=e=>s.TC.find((t=>t===e));function o(){const e=(0,r.Zp)(),t=(0,r.RQ)("/search/:query"),n=(0,r.RQ)("/search/:query/:category"),s=(0,i.useCallback)((function(t,n,i,r){const s=r?{interactionId:r,preventMoveFocus:!0}:{preventMoveFocus:!0},a=["/search"];t&&(a.push(encodeURIComponent(t)),n&&a.push(n));const o=a.join("/");e(o,i?{state:s}:{state:s,replace:!0})}),[e]);return[{query:function(e){try{return decodeURIComponent(e)}catch{return e}}(t?.params.query??n?.params?.query??""),category:a(n?.params.category)},s]}},20992:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});const i=(0,n(36285).u)("SettingsAPI")},91178:(e,t,n)=>{"use strict";n.d(t,{KR:()=>i,Qi:()=>a,WZ:()=>r,a1:()=>s});let i=function(e){return e[e.QUIET=0]="QUIET",e[e.NORMAL=1]="NORMAL",e[e.LOUD=2]="LOUD",e}({}),r=function(e){return e.MINIMIZED="minimized",e.NORMAL="normal",e.OFF="off",e}({}),s=function(e){return e[e.AUTOMATIC=0]="AUTOMATIC",e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e[e.VERY_HIGH=4]="VERY_HIGH",e[e.LOSSLESS=5]="LOSSLESS",e}({}),a=function(e){return e[e.STANDARD=0]="STANDARD",e[e.VERY_HIGH=1]="VERY_HIGH",e[e.LOSSLESS=2]="LOSSLESS",e}({})},17365:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(33549);class r extends i.e{}},97697:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var i=n(61360);function r(){return(0,i.j)()}},82516:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var i=n(30758),r=n(16273),s=n(50486),a=n(55623),o=n(33549);class l extends o.e{}var c=n(17365);function u(e){const t=(0,i.useMemo)((()=>["useSettingsValue",e.key]),[e.key]),n=(0,r.jE)(),o=(0,s.I)({queryKey:t,queryFn:async()=>await e.getValue(),gcTime:36e5,staleTime:6e5,retry:(e,t)=>t instanceof l&&e<3}),u=(0,a.n)({mutationFn:async t=>{if(!("setValue"in e))throw new Error(`${e} does not have a 'setValue' method`);await e.setValue(t)},onMutate:async e=>{await n.cancelQueries({queryKey:t});const i=n.getQueryData(t);return n.setQueryData(t,e),{prevState:i,newState:e}},retry:(e,t)=>t instanceof l&&e<3,onError:(i,r,s)=>{i instanceof c.N||console.error(`Error setting ${e.key}`,i),n.setQueryData(t,s?.prevState)}});return(0,i.useEffect)((()=>e.subValue((e=>{n.setQueryData(t,e)}))),[n,t,e]),"setValue"in e?[o,u]:[o]}},32674:(e,t,n)=>{"use strict";n.d(t,{Ax:()=>o,FB:()=>r,dt:()=>a,rj:()=>s,zf:()=>l});var i=n(91178);function r(e){if(void 0===e)return null;const t=Number(e);return t>=i.a1.AUTOMATIC&&t<=i.a1.LOSSLESS?t:null}function s(e){if(void 0===e)return null;const t=parseInt(e,10);return t>=i.Qi.STANDARD&&t<=i.Qi.LOSSLESS?t:null}function a(e){if(void 0===e)return null;const t=Number(e);return t>=i.KR.QUIET&&t<=i.KR.LOUD?t:null}function o(e){return e?"1":"0"}function l(e){return"1"===e}},48926:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,g:()=>s});var i=n(62021);const r=()=>(0,i.x)("canvasVideosEnabled",!0),s=()=>{const[e]=r();return e}},4214:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,N:()=>r});var i=n(62021);const r=()=>(0,i.x)("toggleNowPlayingView",!0),s=()=>{const[e]=r();return e}},86723:(e,t,n)=>{"use strict";n.d(t,{t0:()=>h});var i=n(30758),r=n(78006),s=n(26380);let a=function(e){return e[e.Automatic=0]="Automatic",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.VeryHigh=4]="VeryHigh",e[e.Hifi=5]="Hifi",e[e.Unknown=6]="Unknown",e}({});var o=n(32513),l=n(27241);function c(){return new s.EW((0,l.X)())}const u=[{enumKey:"quiet",enumValue:0},{enumKey:"normal",enumValue:1},{enumKey:"loud",enumValue:2}],d=[{enumKey:"minimized",enumValue:"minimized"},{enumKey:"normal",enumValue:"normal"},{enumKey:"off",enumValue:"off"}],p=e=>{switch(e){case 0:return a.Automatic;case 1:return a.Low;case 2:return a.Medium;case 3:return a.High;case 4:return a.VeryHigh;case 5:return a.Hifi;default:return a.Unknown}},m=["filter-explicit-content","autoplay","dsa-mode-enabled","dsa-mode-available"],h=()=>{const e=(0,i.useRef)((0,r.dn)((0,l.X)())),[t,n]=(0,i.useState)({formats:[],values:{},autoStart:d,loudness:u}),a=e=>"string"==typeof e?{string:e}:"boolean"==typeof e?{bool:e}:{number:BigInt(e)},h=e=>Object.fromEntries(Object.entries(e.entries).map((([e,{string:t,bool:n,number:i}])=>[e,t??n??Number(i)])));return(0,i.useEffect)((()=>{new o.NI((0,l.X)()).getFormats({}).then((e=>{const t=[{enumKey:"automatic",enumValue:0,supported:!0},...e.formats.filter((e=>e.supported))].map((e=>({supported:e.supported,quality:p(e.enumValue)})));n((e=>({...e,formats:t})))}));const t=c().subValues(s.cF.fromPartial({}),(e=>{n((t=>({...t,values:{...t.values,...e.pairs}})))})),i=e.current.subAll({},(e=>{n((t=>({...t,values:{...t.values,...h(e)}})))}));return()=>{i.cancel(),t.cancel()}}),[]),{settings:t,setValue:async(t,n)=>{m.includes(t)?await c().putValues(s.n3.fromPartial({pairs:{[t]:n}})):await e.current.set({entries:{[t]:a(n)}})}}}},37160:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var i=n(96571),r=n(7307);const s=e=>{const{data:t}=(0,i.W)(e);return(t&&t.type===r.c.SHOW&&void 0!==t.courseCategory&&null!==t.courseCategory)??!1}},38165:(e,t,n)=>{"use strict";n.d(t,{t:()=>b});var i=n(30758),r=n(14343),s=n(31417),a=n(87101),o=n(5590),l=n(69261),c=n(19610),u=n(63301),d=n(96789),p=n(86070);var m=n(53133),h=n(39566),f=n(38501),g=n(87182),E=n(58685),_=n(608),y=n(19555),v=n(29074);const b=({uri:e,uid:t=e,contextUri:n,onAddRecommendation:b,onRemoveRecommendation:S,onUndo:A})=>{const C=(0,v.m)(),T=(0,g.z)(),{enqueueSnackbar:I,closeSnackbar:O}=(0,m.d)(),w=(0,r.NC)(f.Tq1,{loadingValue:!1}),N=(0,i.useRef)(),[R,P]=(0,i.useState)(!1),L=(0,i.useRef)(),D=!(0,h.n)(),k=(0,E.o)((e=>e?.item?.uid===t)),{description:x}=(0,_.f)(),U=(0,i.useCallback)((()=>{clearTimeout(N.current),I(s.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undone")),P(!1),A?.()}),[I,A]),M=function(e){const{enqueueCustomSnackbar:t}=(0,d.i)();return(0,i.useCallback)((()=>t((0,p.jsx)(a.O,{children:(0,p.jsx)(c.P,{center:(0,p.jsx)(l.z,{children:s.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")}),trailing:e&&(0,p.jsx)(o.M,{ctaText:s.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undo"),onCtaClick:e})})}),{autoHideDuration:u.r,preventDuplicate:!1,identifier:s.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")})),[t,e])}(w?void 0:U),B=(0,i.useCallback)((async()=>{R||(k&&!w&&T.skipToNext(),D?I(s.Ru.get("web-player.smart-shuffle.offline-remove-recommendation-feedback")):(L.current=M(),w?await T.sendSignal(y.L.MINUS):(P(!0),N.current=setTimeout((async()=>{try{await C.sendSignal(n,"minus",t)}catch(e){O(L.current),I(s.Ru.get("error-dialog.generic.header"))}P(!1)}),3e3)),S?.()))}),[O,n,M,I,k,D,w,S,T,C,t,R]);return{addRecommendation:(0,i.useCallback)((async()=>{if(R)return;if(D)return void I(s.Ru.get("web-player.smart-shuffle.offline-add-recommendation-feedback"));P(!0);let e=x?s.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback",x):s.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback-fallback");try{w?await T.sendSignal(y.L.PLUS):await C.sendSignal(n,"plus",t)}catch(t){e=s.Ru.get("error-dialog.generic.header")}I(e),P(!1),b?.()}),[n,x,I,D,w,b,T,C,t,R]),removeRecommendation:B,canAddRecommendation:!w||k,canRemoveRecommendation:!w||k}}},23577:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(91008),r=n(71075),s=n(87464),a=n(23289);const o="tap";function l(e,t,n,l){const u=e.getEvents();u.addListener(s.gd.ACTION,(async d=>{if(d.data.action!==s.Ik.PLAY)return;if(p=d.data.context.uri,!(0,i.tbX)(p)&&!(0,r.Z0)(p))return;var p;const m=d.data;if(!(await n.getContextualShuffleMode(m.context.uri)===a.j.SMART_SHUFFLE))return;const h=await async function(e,t){const{context:n,options:{skipTo:r}}=t;if(!r?.uid&&!r?.uri)return null;const{uid:a,uri:o}=r;let l=null;const u=await Promise.race([new Promise((t=>{l=e=>{e.data?.context.uri&&(0,i.B2u)(e.data?.context.uri,n.uri)&&(a&&e.data?.item?.uid===a||o&&e.data?.item?.uri===o)&&t(e.data)},e.addListener(s.gd.UPDATE,l)})),new Promise((e=>setTimeout(e,c,null)))]);l&&e.removeListener(s.gd.UPDATE,l);return u}(u,m);if(!h?.item?.uid)return;const{lensUri:f}=await l.getEligibility(m.context.uri);try{await t.sendSignal(f,o,h.item.uid),await e.refreshCurrentContext()}catch(e){}}))}const c=5e3},35773:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var i=n(11336),r=n(23289);const s="reset";function a(e,t,n,a,o){e.getEvents().addListener(i.S.UPDATE_COMPLETE,(async({data:{contextURI:e,shuffleMode:i}})=>{if(i!==r.j.SMART_SHUFFLE||!o.getActiveDevice()?.isLocal)return;const{lensUri:l}=await t.getEligibility(e);try{await a.sendSignal(l,s),await n.refreshCurrentContext()}catch(e){}}))}},70521:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});const i=e=>"enhanced_recommendation"===e?.metadata?.provider&&"queue"!==e?.provider},63301:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});const i=7e3},85511:(e,t,n)=>{"use strict";function i({prefix:e="id"}={}){return`${e}-${`${(new Date).getTime()}${Math.random()}`}`}n.d(t,{g:()=>i})},96789:(e,t,n)=>{"use strict";n.d(t,{i:()=>a});var i=n(30758),r=n(93240),s=n(85511);function a(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueCustomSnackbar:(0,i.useCallback)(((t,n)=>{const i=function(e){return"keyPrefix"in e}(n);if(i){const{keyPrefix:i,...r}=n,a=(0,s.g)({prefix:i});return e(a,{variant:"headless",children:t,key:a,...r})}const{identifier:r,...a}=n;return e(r,{variant:"headless",children:t,...a})}),[e]),closeSnackbar:t}}},53133:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var i=n(30758),r=n(93240),s=n(85511);function a(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueSnackbar:(0,i.useCallback)(((t,n)=>{if(!n)return e(t,{variant:"default"});if(function(e){return"keyPrefix"in e}(n)){const{keyPrefix:i,...r}=n;return e(t,{variant:"default",key:(0,s.g)({prefix:i}),...r})}return e(t,{variant:"default",...n})}),[e]),closeSnackbar:t}}},48713:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const i={PARTICIPANTS_PAGE:"/socialsession/participant-list"}},37921:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var i=n(75950),r=n(10565),s=n(6530);const a=()=>{const e=(0,r.d)(),t=(0,i.C)();return e.getEnabled()===s._H.ENABLED&&t===s.lz.PREMIUM}},90142:(e,t,n)=>{"use strict";n.d(t,{Y:()=>C});var i=n(30758),r=n(13845),s=n(91008),a=n(29195),o=n(75610),l=n(63779),c=n(54433),u=n(94812),d=n(57776);n(59147);const p=new d.l("getAlbumNameAndTracks","query","8628ad33de3267d7bef516c76a746979a5f98891a2c9eaff3dfec828abdcd983",null),m=200;const h=new d.l("getArtistNameAndTracks","query","0adaf1a1a8a94c7ed095639c4d9456d2b1cfac16ac511d5dd2b01b6dd89f748a",null),f=200;const g=200;const E=2e3;async function _(e,t,n,i=E){const r=(0,s.o_h)(n);if(!r)throw new Error(`Could not parse uri: ${n}`);const a=function(e,t,n,i){switch(e){case"album":return function(e,t){return async(n,i=m)=>{const r=await t(p,{uri:e,offset:n,limit:i});if("Album"===r?.data?.albumUnion?.__typename){const{name:t,tracksV2:n}=r.data.albumUnion;return{name:t,trackUris:n.items.map((e=>"track"in e?e.track.uri:"")).filter(Boolean),nextOffset:n.pagingInfo.nextOffset,contextUri:e}}throw new Error(`Error while requesting ${e} content`)}}(t,n);case"artist":return function(e,t){return async(n,i=f)=>{const r=await t(h,{uri:e,offset:n,limit:i});if("Artist"===r?.data?.artistUnion?.__typename){const t=r.data.artistUnion.profile.name,n=r.data.artistUnion.discography.topTracks;return{name:t,trackUris:n.items.map((e=>e.track.uri)),nextOffset:n.pagingInfo.nextOffset,contextUri:e}}throw new Error(`Error while requesting ${e} content`)}}(t,n);case"playlist":case"playlist-v2":return function(e,t){return async(n,i=g)=>{const r=await t.getPlaylist(e,{},{offset:n,limit:i}),{totalLength:s}=r.contents,a=n+r.contents.items.length,o=ae?.uri)).filter((e=>!!e)),nextOffset:o,contextUri:e}}}(t,i);default:throw new Error(`Can not fetch tracks for context type ${e}`)}}(r.type,n,e,t);return async function(e,t){return async function n(i){const{name:r,trackUris:s,nextOffset:a}=await e(i,t);if(0===s.length)throw new Error(`fetcher [${e.name}] returned empty uri list`);if(null!==a&&a{if(r)e.play({uri:i.toURI()},{featureIdentifier:"jam",referrerIdentifier:"deeplink"});else{const r=await _(n,t,i.toURI(),A);e.addToQueue(r.trackUris.map((e=>({uri:e,uid:null}))))}}),[e,t,n])}();return(0,i.useCallback)((async i=>{const a=await e();if(!a)throw new Error("Failed to create Jam");if(d.send((0,r.q)({session_id:a.sessionId,device_type:p.deviceType,tech_type:p.techType,session_uri:a.joinSessionUri,session_type:u.dF.REMOTE})),a.joinSessionShortLink&&t(a.joinSessionShortLink),i?.contextType&&i.id){const e=(0,s.o_h)(`spotify:${i.contextType}:${i.id}`,[s.NQG.ALBUM,s.NQG.ARTIST,s.NQG.PLAYLIST_V2]);e&&m(e,i.play)}n()}),[e,d,p.deviceType,p.techType,n,t,m])}},54433:(e,t,n)=>{"use strict";n.d(t,{c:()=>d});var i=n(94812),r=n(92443),s=n(71681),a=n(79237),o=n(62642);const l={techType:i.PJ.SELF,deviceType:o.bq.COMPUTER},c={[r.FI.DISPLAY_DEVICE]:"display_device",[r.FI.HEADPHONES]:"maybe_headphones",[r.FI.SPEAKERS]:o.bq.SPEAKER,[r.FI.UNKNOWN]:"unknown"},u={[r.Yg.BLUETOOTH]:i.PJ.BLUETOOTH,[r.Yg.BUILT_IN]:i.PJ.WIRED,[r.Yg.DISPLAY_DEVICE]:i.PJ.DISPLAY_DEVICE,[r.Yg.UNKNOWN]:i.PJ.UNKNOWN,[r.Yg.USB]:i.PJ.WIRED,[r.Yg.VIRTUAL]:i.PJ.VIRTUAL,[r.Yg.AIRPLAY]:i.PJ.AIRPLAY};function d(){const e=(0,a.v)((e=>e.activeDevice),((e,t)=>e?.id===t?.id)),t=(0,s.b)();if(e&&!e.isLocal){return{techType:e.type===o.bq.CAST_VIDEO||e.type===o.bq.CAST_AUDIO?i.PJ.CAST:i.PJ.CONNECT,deviceType:e.type}}if(t){const e=t.terminalType===r.FI.SPEAKERS;return t.transportType===r.Yg.BUILT_IN&&e?l:{techType:u[t.transportType],deviceType:c[t.terminalType]}}return l}},75950:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(30758),r=n(10565);function s(){const e=(0,r.d)(),[t,n]=(0,i.useState)(e.getJamExperience());return function(e){const t=(0,r.d)();(0,i.useEffect)((()=>t.addJamExperienceListener(e)),[e,t])}((0,i.useCallback)((e=>n(e)),[])),t}},47694:(e,t,n)=>{"use strict";n.d(t,{_:()=>E});var i=n(62411),r=n(36688),s=n(91008),a=n(31417),o=n(98293),l=n(12864),c=n(37921),u=n(90142),d=n(47756),p=n(28340),m=n(69693),h=n(33329),f=n(86070);const g=({contextUri:e,uri:t,spec:n})=>{const c=(0,h.s)(),{currentSession:g}=(0,m.D)(),E=e&&!(0,s.ThT)(e),_=E?e:t,{triggerPlay:y,isActive:v}=(0,p.P)({uri:_},{featureIdentifier:"group_session_context_menu"}),b=(0,i.wA)(),S=(0,u.Y)();return g?.active?null:(0,f.jsx)(l.D,{role:"menuitem",onClick:async()=>{const e=n.createJamButtonFactory().hitUiNavigate({destination:t});e&&c.logInteraction(e);try{await S(),v||y({...E&&{skipTo:{uri:t}}})}catch(e){b((0,o.A9)(d.EL.ERROR))}},leadingIcon:(0,f.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("web-player.social-connect.menu-action.title")})},E=e=>(0,c.y)()?(0,f.jsx)(g,{...e}):null},94812:(e,t,n)=>{"use strict";n.d(t,{Mm:()=>i,PJ:()=>s,dF:()=>r});let i=function(e){return e.QUEUE_END_SESSION_BUTTON="end_session_queue_button_pressed",e.QUEUE_LEAVE_SESSION_BUTTON="leave_session_queue_button_pressed",e.INVITATION_MODAL_CANCEL_BUTTON="invitation_modal_cancel_button_pressed",e}({}),r=function(e){return e.REMOTE="REMOTE",e.IN_PERSON="IN_PERSON",e}({}),s=function(e){return e.SELF="SELF",e.CONNECT="CONNECT",e.CAST="CAST",e.BLUETOOTH="BLUETOOTH",e.AIRPLAY="AIRPLAY",e.CARPLAY="CARPLAY",e.WIRED="WIRED",e.VIRTUAL="VIRTUAL",e.DISPLAY_DEVICE="DISPLAY_DEVICE",e.UNKNOWN="UNKNOWN",e}({})},47060:(e,t,n)=>{"use strict";n.d(t,{L:()=>C});var i=n(30758),r=n(97500),s=n.n(r),a=n(62411),o=n(25910),l=n(5765),c=n(422),u=n(14343),d=n(31417),p=n(87464),m=n(87182),h=n(19555);var f=n(46983),g=n(91128),E=n(38501),_=n(58685),y=n(50671),v=n(18665),b=n(86070);const S=(0,i.memo)((()=>(0,b.jsx)(o.B,{size:"small"}))),A=(0,i.memo)((()=>(0,b.jsx)(l.e,{size:"small"}))),C=({className:e,createImpressionSpec:t,onClick:n})=>{const r=d.Ru.get("npv.song-videos.switch-to-video"),o=d.Ru.get("npv.song-videos.switch-to-audio"),l=d.Ru.get("page.loading"),[C,T]=(0,i.useState)(!1),I=(0,a.wA)(),O=(0,m.z)(),{signals:w,loading:N,uri:R}=(0,_.o)((e=>({signals:e?.signals,loading:e?.isBuffering&&!e.isPaused,uri:e?.item?.uri}))),{isSongVideoDeviceRestricted:P}=(0,f.k)(),L=(()=>{const e=(0,m.z)(),t=e=>{const t=e?.signals;return t?.includes(h.L.SWITCH_TO_VIDEO)??!1};return async()=>{if(t(e.getState()))return!0;let n=()=>{};const i=new Promise((i=>{n=e.getEvents().addListener(p.gd.UPDATE,(e=>{t(e.data)&&i(!0)}))})),r=new Promise((e=>setTimeout((()=>e(null)),2e3))),s=await Promise.race([i,r]);return n(),s}})(),D=(0,i.useCallback)((()=>{P?I(g.ug.actions.open({onConfirm:async()=>{await L()&&O.sendSignal(h.L.SWITCH_TO_VIDEO)}})):(C?(O.sendSignal(h.L.SWITCH_TO_AUDIO),n?.("switch_to_audio",R)):(O.sendSignal(h.L.SWITCH_TO_VIDEO),n?.("switch_to_video",R)),T((e=>!e)))}),[P,C,I,L,O,n,R]);(0,i.useEffect)((()=>{O.canSendSignal(h.L.SWITCH_TO_AUDIO)?T(!0):T(!1)}),[O,w]);const k=(0,i.useMemo)((()=>t?.(C)),[t,C]),x=(0,y.t)(k),U=(0,u.NC)(E.KkE,{loadingValue:!1}),M=C?o:r;return U?(0,b.jsx)(i.Suspense,{fallback:!0,children:(0,b.jsxs)("div",{className:s()(v.A.container,e),ref:x,children:[(0,b.jsxs)("div",{"aria-label":l,className:s()(v.A.button,v.A.loading,{[v.A.loadingVisible]:C&&N}),"aria-hidden":!0,children:[(0,b.jsx)("div",{className:v.A.spinner}),(0,b.jsx)(c.E,{as:"span",variant:"bodySmall",children:l})]}),(0,b.jsxs)("button",{"aria-label":M,className:s()(v.A.button,v.A.switch,{[v.A.hidden]:C&&N}),onClick:D,disabled:N,children:[C?(0,b.jsx)(A,{}):(0,b.jsx)(S,{}),(0,b.jsx)(c.E,{as:"span",variant:"bodySmallBold",children:M})]})]})}):null}},28389:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(33625);const r=e=>{const t=(0,i.L)(),n=t?.item?.metadata?.["save_track.uri"],r=t?.item?.uri;return n&&r===e?n:e}},46983:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var i=n(30758),r=n(14343),s=n(38501),a=n(43013),o=n(58685),l=n(19555);const c=()=>{const{uri:e,signals:t}=(0,o.o)((e=>({uri:e?.item?.uri,signals:e?.signals})),((e,t)=>{return e.uri===t.uri&&(n=e.signals,i=t.signals,!(!Array.isArray(n)||!Array.isArray(i))&&(n===i||n.length===i.length&&n.every((e=>i.includes(e)))));var n,i})),n=(0,r.NC)(s.J1t,{loadingValue:!1}),c=(0,a.l)(),u=(0,o.o)((e=>{const t=e?.restrictions.disallowSignals[l.L.SWITCH_TO_VIDEO]?.includes("not_supported_by_device")??!1,n=!e?.restrictions.disallowSignals[l.L.SWITCH_TO_VIDEO]?.includes("no_associated_track");return t&&n}))&&c,d=Boolean(t?.includes(l.L.SWITCH_TO_VIDEO)),p=Boolean(t?.includes(l.L.SWITCH_TO_AUDIO)),m=p||d||!!n&&u,h=p;return(0,i.useMemo)((()=>({uri:e,isSongVideo:m,isSongVideoPlayingVideo:h,isSongVideoDeviceRestricted:u})),[e,m,h,u])}},25224:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={INITIALIZING:"initializing",PRESENTED:"presented",DISMISSED:"dismissed",RESOLVING_SITE_STARTED:"resolvingSiteStarted",RESOLVING_SITE_SUCCEEDED:"resolvingSiteSucceeded",RESOLVING_SITE_FAILED:"resolvingSiteFailed",AUTHENTICATION_STARTED:"authenticationStarted",AUTHENTICATION_SUCCEEDED:"authenticationSucceeded",AUTHENTICATION_FAILED:"authenticationFailed",PAGE_LOAD_STARTED:"pageLoadStarted",PAGE_LOAD_SUCCEEDED:"pageLoadSucceeded",PAGE_LOAD_FAILED:"pageLoadFailed",OPENED_EXTERNAL_LINK:"openedExternalLink",OPENED_DEEP_LINK:"openedDeepLink",WEB_EVENT:"webEvent",PLAYBACK_PAUSED:"playbackPaused",PLAYBACK_RESUMED:"playbackResumed",PLAYBACK_SKIP_PREV:"playbackSkipPrev",PLAYBACK_SKIP_NEXT:"playbackSkipNext",PLAYBACK_PLAY_TRACK:"playbackPlayTrack",PLAYBACK_STATUS_CHANGED:"PlaybackStatusChanged",SHARE_EVENT:"shareEvent",ERROR:"error"}},13834:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});let i=function(e){return e.HOME="home",e.COLLECTION="collection",e.CREATE_PLAYLIST="create-playlist",e.LIKED_SONGS="liked-songs",e.YOUR_EPISODES="your-episodes",e.SEARCH="search",e.SETTINGS="settings",e.PLAYLISTS_SIDEBAR="playlists-sidebar",e.NOW_PLAYING_BAR="now-playing-bar",e.BUDDY_FEED="buddy-feed",e.PROFILE="profile",e.DEEP_LINK="deep-link",e.MAKE_MUSIC="make-music",e.NOW_PLAYING_PANEL="now_playing_panel",e.WHATS_NEW_PANEL="whats_new_panel",e.UNKNOWN="unknown",e.EXPLORE_PREMIUM="explore-premium",e}({})},95365:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,u:()=>a});var i=n(30758),r=n(29899),s=n(4158);const a=()=>(0,i.useContext)(s.U),o=()=>(0,i.useContext)(r.N)},23936:(e,t,n)=>{"use strict";n.d(t,{g:()=>i.g});var i=n(13834)},16283:(e,t,n)=>{"use strict";n.d(t,{v:()=>i});const i=(0,n(36285).u)("UserCommentsAPI")},42068:(e,t,n)=>{"use strict";n.d(t,{v:()=>E});let i=function(e){return e.ELIGIBILITY_STATUS_UNSPECIFIED="ELIGIBILITY_STATUS_UNSPECIFIED",e.ELIGIBILITY_STATUS_UNRESTRICTED="ELIGIBILITY_STATUS_UNRESTRICTED",e.ELIGIBILITY_STATUS_HIDDEN="ELIGIBILITY_STATUS_HIDDEN",e.ELIGIBILITY_STATUS_DISABLED="ELIGIBILITY_STATUS_DISABLED",e.ELIGIBILITY_STATUS_NEW_USER_ACCOUNT="ELIGIBILITY_STATUS_NEW_USER_ACCOUNT",e.ELIGIBILITY_STATUS_ALREADY_COMMENTED="ELIGIBILITY_STATUS_ALREADY_COMMENTED",e}({});var r=n(7307),s=n(85907);const a=e=>({type:e,uri:"",name:"",images:[]}),o=e=>e.sources.map((e=>({url:e.url,width:e.maxWidth,height:e.maxHeight}))),l=e=>e.sources.map((e=>({url:e.url,width:e.width,height:e.height}))),c=e=>{switch(e.__typename){case"PodcastResponseWrapper":return"Podcast"===e.data.__typename?(n=e.data,{type:r.c.SHOW,uri:n.uri,name:n.name,images:n.coverArt?l(n.coverArt):[]}):a(r.c.SHOW);case"UserResponseWrapper":return"User"===e.data.__typename?(t=e.data,{type:r.c.USER,uri:t.uri,name:t.name,images:t.avatar?l(t.avatar):[]}):a(r.c.USER);default:return(0,s.k)(e),a(r.c.USER)}var t,n},u=e=>{const t=[];return"ImageV2"===e.data.__typename&&t.push(e.data),t},d=e=>{const t=e.coverImagesReacted.flatMap((e=>u(e))),n=e.coverImagesReplied.flatMap((e=>u(e)));return{uri:e.uri,id:e.uri,text:e.commentString,creationDate:{isoString:e.createDate.isoString,precision:e.createDate.precision},author:c(e.author),isPendingReview:e.isPendingReview??!1,isSensitive:e.isSensitive??!1,replies:e.replies.map((e=>(e=>({uri:e.uri,id:e.uri,text:e.replyString,creationDate:{isoString:e.createDate.isoString,precision:e.createDate.precision},author:c(e.author)}))(e))),imagesReacted:t.flatMap((e=>o(e))),imagesReplied:n.flatMap((e=>o(e)))}};var p=n(57776);const m=new p.l("addComment","mutation","504a54dcb144fc345869c93887152f53450bd41298b6edb57d9e3b1c5aae92e6",null),h=new p.l("deleteComment","mutation","9ecb2804fc1c8f85f8112ffc962b038a31a1c63d59bcf8b5fb23cb2765b8b6d9",null);n(59147);const f=new p.l("getCommentsForEntity","query","2b3fe7ea5ea2a4282238c59fe0f796f209b2d8360fa4a92e6e39a781373619ff",null);class g{constructor(e){this._loader=e}async getTopComments(e){const t=await this.getComments(e),{nextPageToken:n,...i}=t;return{...i,comments:i.comments.slice(0,3)}}async getComments(e,t){const n=await this._loader(f,{uri:e,token:t??null}),r=n?.data?.comments.at(0);if(r&&"CommentPage"===r?.__typename)return{comments:(s=r).items.map((e=>d(e))),totalCount:s.totalCount,eligibilityStatus:i[s.eligibilityStatus],nextPageToken:s.nextPageToken||null};var s;throw new Error(`Failed to fetch comments for entity ${e}`)}async addComment(e,t){const n=await this._loader(m,{entityUri:e,text:t});if("SuccessCreateComment"!==n?.data?.createComment.__typename||!n?.data.createComment.success)throw new Error("Failed to add comment")}async deleteComment(e){const t=await this._loader(h,{commentUri:e});if("SuccessDeleteComment"!==t?.data?.deleteComment.__typename)throw new Error(`Failed to delete comment ${e}`)}}const E=e=>new g(e)},25720:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var i=n(30758),r=n(62411),s=n(15281),a=n(31144);const o=()=>{const e=(0,r.wA)(),t=(0,r.d4)(s.C);return{videoPlayerMode:(0,r.d4)(s.c),setVideoPlayerUIFlag:(0,i.useCallback)(((t,n)=>{e((0,a.Kp)(t,n))}),[e]),videoPlayerUIFlags:t}}},45097:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C});var i=n(4088)},32641:(e,t,n)=>{"use strict";n.d(t,{R:()=>i.R2,k:()=>i.kX});var i=n(31144)},31193:(e,t,n)=>{"use strict";n.d(t,{d:()=>i.d});var i=n(25720)},15281:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C,c:()=>i.c});var i=n(60437)},909:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,n:()=>i});let i=function(e){return e.videoAvailable="videoAvailable",e.fullscreen="fullscreen",e.cinema="cinema",e.cinemaLegacy="cinemaLegacy",e.npv="npv",e.pip="pip",e.documentPip="documentPip",e.nowPlayingBar="nowPlayingBar",e}({}),r=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e.cinemaLegacy="cinemaLegacy",e.pip="pip",e.documentPip="documentPip",e.fullscreen="fullscreen",e.nowPlayingBar="nowPlayingBar",e}({})},31144:(e,t,n)=>{"use strict";n.d(t,{Kp:()=>s,R2:()=>r,kX:()=>i});let i=function(e){return e.SET_VIDEO_MODE="SET_VIDEO_MODE",e.SET_VIDEO_UI_FLAG="SET_VIDEO_UI_FLAG",e}({});const r=e=>({type:i.SET_VIDEO_MODE,mode:e}),s=(e,t)=>({type:i.SET_VIDEO_UI_FLAG,key:e,value:t})},37460:(e,t,n)=>{"use strict";n.d(t,{F3:()=>a,sN:()=>s});var i=n(909),r=n(31144);const s={fullscreen:!1,cinema:!1,cinemaLegacy:!1,npv:!1,pip:!1,videoAvailable:!1,documentPip:!1,nowPlayingBar:!1},a=(e={isSubtitlesEnabled:!1,uiFlags:s,mode:i.K.none},t)=>{switch(t.type){case r.kX.SET_VIDEO_MODE:return{...e,mode:t.mode};case r.kX.SET_VIDEO_UI_FLAG:{const{key:r,value:s}=t,a={...e.uiFlags,[r]:s};return{...e,mode:(n=a,n.videoAvailable?n.fullscreen?i.K.fullscreen:n.cinemaLegacy?i.K.cinemaLegacy:n.pip?i.K.pip:n.documentPip?i.K.documentPip:n.cinema?i.K.cinema:n.npv?i.K.npv:n.nowPlayingBar?i.K.nowPlayingBar:i.K.none:i.K.none),uiFlags:a}}default:return e}var n}},60437:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,c:()=>s});var i=n(909),r=n(37460);const s=e=>e.ui?.videoPlayer?.mode??i.K.none,a=e=>e.ui?.videoPlayer?.uiFlags??r.sN},25009:(e,t,n)=>{"use strict";n.d(t,{P:()=>l});var i=n(30758),r=n(85387),s=n(79237),a=n(62642),o=n(87182);function l(){const e=(0,o.z)(),t=(0,s.v)((({connectionStatus:e})=>e===a.zP.NOT_CONNECTED)),n=function(){const e=(0,r.zy)(),t=(0,r.Zp)();return n=>{const i="object"==typeof e.state?e.state:{};t(e.pathname,{replace:!0,state:{...i,watchFeed:{...i?.watchFeed,...n}}})}}();return{open:(0,i.useCallback)(((i,r,s="")=>{const a=e.getState();let o=!1;a?.item&&!a?.isPaused&&t&&(e.pause(),o=!0),n({isOpen:!0,firstItemUri:s,sectionUri:i,discoveryFeedUri:r,resumeOnClose:o})}),[t,e,n]),close:(0,i.useCallback)((({resumePlayback:i,forceClose:r=!1})=>{const s=e.getState();s?.isPaused&&t&&i&&e.resume(),r||n({isOpen:!1,firstItemUri:null,sectionUri:null,discoveryFeedUri:null,resumeOnClose:!1})}),[t,e,n]),updateLocationState:n}}},93747:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var i=n(85387),r=n(79237),s=n(62642),a=n(87182);function o(){const e=(0,i.zy)(),t=(0,i.wQ)(),n=(0,a.z)(),o=(0,r.v)((({connectionStatus:e})=>e===s.zP.NOT_CONNECTED));if(!e.state?.watchFeed)return{isOpen:!1,sectionUri:null,discoveryFeedUri:null,firstItemUri:null,lastSeenItemUri:null,resumeOnClose:!1};const l=e.state?.watchFeed;if("POP"===t){if(l.isOpen){const e=n.getState();e?.item&&!e?.isPaused&&o&&n.pause()}return{...l,firstItemUri:e.state?.watchFeed?.lastSeenItemUri}}return l}},41750:(e,t,n)=>{"use strict";n.d(t,{S:()=>i.S});var i=n(93747)},81138:(e,t,n)=>{"use strict";n.d(t,{BP:()=>o,jF:()=>a,lo:()=>r,nD:()=>s});var i=n(57776);n(59147);const r=new i.l("queryWhatsNewFeed","query","e087ac603a39e1d46e4e9c3452ca9e4b1a623d1f79103e7be804768ba1eb0638",null),s=new i.l("queryWhatsNewFeedWithGatedPodcastRelations","query","e087ac603a39e1d46e4e9c3452ca9e4b1a623d1f79103e7be804768ba1eb0638",null),a=new i.l("whatsNewFeedNewItems","query","e087ac603a39e1d46e4e9c3452ca9e4b1a623d1f79103e7be804768ba1eb0638",null),o=new i.l("SetItemsStateInWhatsNewFeed","mutation","e087ac603a39e1d46e4e9c3452ca9e4b1a623d1f79103e7be804768ba1eb0638",null)},46097:(e,t,n)=>{"use strict";n.d(t,{L1:()=>s,cf:()=>o,e0:()=>a});var i=n(134);const r=[{name:"rear",color:i.ve,loudnessAnimation:{multiplier:.1},idleAnimation:null},{name:"middle",color:i.yA,loudnessAnimation:{multiplier:.4},idleAnimation:{xScale:.95,yScale:1.05,clockwise:!1,beginTime:1800,duration:3600}},{name:"fore",color:i.DM,loudnessAnimation:{multiplier:1},idleAnimation:{xScale:1.05,yScale:.95,clockwise:!0,beginTime:0,duration:2*Math.PI/3*1e3}}],s=e=>e/2-e/2*22*2/169,a=e=>22*e/169,o=e=>r.map((t=>({...t,color:e[t.name]})))},134:(e,t,n)=>{"use strict";n.d(t,{DM:()=>u,DR:()=>c,Gw:()=>o,Mz:()=>s,N6:()=>r,lZ:()=>a,ve:()=>p,wn:()=>i,yA:()=>d,yX:()=>l});const i="37i9dQZF1EYkqdzj48dyYq",r=`spotify:playlist:${i}`,s=["37i9dQZF1EYkqdzj8OSOas","37i9dQZF1EYkqdzjdvy3mw","37i9dQZF1EYkqdzjicdiyA","37i9dQZF1EYkqdzjmSSxKE","37i9dQZF1EYkqdzjrzxMWI"],a="#0A59B8",o="#0a59b8",l="inherit",c="#19e68c",u="#19e68c",d="#1ed7bc",p="#1e95d7"},3602:(e,t,n)=>{"use strict";n.d(t,{HS:()=>a,bJ:()=>o,c0:()=>r,hv:()=>s});var i=n(134);const r=e=>e===i.N6||i.Mz.map((e=>`spotify:playlist:${e}`)).includes(e),s=e=>"your_dj"===e?.metadata?.lexicon_set_type,a=e=>r(e?.uri||"")||s(e),o=(e,t)=>a(e)&&"true"===t?.metadata?.is_narration},59343:(e,t,n)=>{"use strict";n.d(t,{N:()=>c,_:()=>u});var i=n(50486),r=n(24909),s=n(134),a=n(28340),o=n(29074);const l=["useYourDJContextMetadata"],c=()=>{const e=(0,o.m)(),{data:t,error:n}=(0,i.I)({queryKey:l,queryFn:()=>e.getMetadata(s.N6,{decorateFormatListData:!0}),gcTime:36e5,placeholderData:r.rX});return{metadata:t,error:n}},u=e=>{const{featureIdentifier:t="unknown",referrerIdentifier:n}=e||{},{metadata:i,error:r}=c();return{context:(0,a.P)({uri:s.N6,url:i?.formatListData?.attributes.lexicon_context_url},{featureIdentifier:t,referrerIdentifier:n}),metadata:i,error:r}}},30349:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var i=n(30758),r=n(134),s=n(24533),a=n(62021);const o=()=>{const[e,t]=(0,s.A)(r.N6,!1),[n,o]=(0,a.x)("yourdj.ylx.tooltipshown",!1),[l,c]=(0,a.x)("dj.addedToLibraryOnce",!1),u=(0,i.useCallback)((()=>{l||e||(o(!0),c(!0),t(!0))}),[l,e,t,c,o]),d=(0,i.useCallback)((()=>{t(!0)}),[t]),p=(0,i.useCallback)((()=>{t(!1)}),[t]);return{isDJInLibrary:e,setDJAddedToLibraryOnceLocalStorage:c,maybeAddDJToLibrary:u,addDJToLibrary:d,removeDJFromLibrary:p}}},5591:(e,t,n)=>{"use strict";n.d(t,{C:()=>a});var i=n(3602),r=n(58685),s=n(41434);const a=()=>{const e=(0,r.o)((e=>e),((e,t)=>null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri&&(0,s.a)(e.context.metadata,t.context.metadata)));return e?{isYourDJContext:(0,i.HS)(e.context),isYourDJNarrator:(0,i.bJ)(e.context,e.item),hasYourDJMetadata:(0,i.hv)(e.context)}:{isYourDJContext:!1,isYourDJNarrator:!1,hasYourDJMetadata:!1}}},8268:(e,t,n)=>{"use strict";n.d(t,{gb:()=>L.g,fW:()=>ve,aU:()=>I,mA:()=>X,IT:()=>P,tW:()=>de});var i=n(65723),r=n(33625),s=n(30758),a=n(46097),o=n(710),l=n(134),c=n(24500),u=n(3596),d=n(34990),p=n(99644),m=n(87182);function h(e,t,n){return(1-e)*t+e*n}var f=n(43640),g=n(14636),E=n(86070);const _=e=>e-Math.PI,y=Math.PI/2,v=e=>e+y,b=.67,S=4/3*Math.PI;function A(e,t,n,i,r,s,a,o=1,l=1){const c=f.q.sum(e,f.q.fromRadiusAndAngle((1-o*l*b)*s,t)),u=v(t)-o*(4*Math.PI/9),d=n.controlPoint(a,v(S)),p=c.controlPoint(a,_(u)),m=c.controlPoint(a,u),h=i.controlPoint(a,_(v(r))),g=new Path2D;return g.moveTo(n.x,n.y),g.bezierCurveTo(d.x,d.y,p.x,p.y,c.x,c.y),g.bezierCurveTo(m.x,m.y,h.x,h.y,i.x,i.y),g.arc(e.x,e.y,s,r,S,!1),g}function C(e,t,n,i){const r=new f.q(t/2,t/2),s=(0,a.L1)(t),o=(0,a.e0)(s),l=S+2*Math.PI/2,c=h(.5,S,l),u=f.q.sum(r,f.q.fromRadiusAndAngle(s,S)),d=f.q.sum(r,f.q.fromRadiusAndAngle(s,l)),p=s*(m=4,4/3*Math.tan(Math.PI/(2*m)));var m;e.lineWidth=o;for(const{loudnessAnimation:t,color:a}of i){e.strokeStyle=a;const i=A(r,c,u,d,l,s,p,n,t?.multiplier||0);e.stroke(i)}}const T=({layerColors:e})=>{const t=(0,s.useRef)(null),n=(0,s.useRef)(null),i=(0,m.z)(),r=(0,s.useRef)(0),o=(0,s.useRef)(0),l=(0,s.useRef)(0),c=(0,s.useRef)(0),d=(0,s.useRef)(0),f=(0,s.useRef)(0),_=(0,s.useRef)(0),y=(0,s.useRef)(-1),v=(0,s.useRef)(!1),b=(0,a.cf)(e),S=(0,s.useCallback)((()=>{if(!t.current)return;const e=t.current.getContext("2d");if(!e)return;const n=performance.now();r.current=r.current||n;const s=n-r.current,a=i.getState()||{isPaused:!0};a.isPaused?(o.current=o.current||s,l.current=s-o.current):(c.current+=l.current,l.current=0,o.current=0);const p=s-l.current-c.current,m=1-Math.max(0,Math.min(1,(_.current-s)/80)),g=h(m,d.current,f.current);if(v.current||y.current!==g){y.current=g,v.current=!1;const n=t.current.width/window.devicePixelRatio;e.clearRect(0,0,t.current.width,t.current.height),C(e,n,y.current,b)}if(1===m){if(d.current=f.current,a.isPaused)f.current=0;else{const e=(0,u.G)(a.playbackId,p);f.current=e??0}_.current=s+80}}),[i,b]),A=(0,s.useCallback)((()=>{if(!t.current)return;const{offsetWidth:e,offsetHeight:n}=t.current.parentElement,i=Math.min(e,n),r=window.devicePixelRatio||1,s=i*r;t.current.style.width=`${i}px`,t.current.style.height=`${i}px`,t.current.width=s,t.current.height=s;const a=t.current.getContext("2d");a?.scale(r,r),v.current=!0}),[]);return(0,p.w)({onResize:(0,g.s)(A)(200),refOrElement:n}),(0,s.useEffect)((()=>{let e;let t=null;const n=i=>{(null===t||(t?i-t:0)>=1e3/60)&&(S(),t=i),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>{e&&cancelAnimationFrame(e)}}),[S,true]),(0,E.jsx)("div",{ref:n,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,E.jsx)("canvas",{ref:e=>{t.current=e,v.current=!0,A()}})})},I=()=>{const e=(0,d.j)(),{context:t}=(0,r.L)()||{item:null,context:null},n={rear:(0,c.p)(t?.metadata?.["narration.jellyfish.bottom.color"],l.ve),middle:(0,c.p)(t?.metadata?.["narration.jellyfish.mid.color"],l.yA),fore:(0,c.p)(t?.metadata?.["narration.jellyfish.top.color"],l.DM)};return e?(0,E.jsx)(o.D,{animateSource:!1,layerColors:n}):(0,E.jsx)(T,{layerColors:n})};var O=n(5591),w=n(83327);const N="kYswrotiABgUDQYygUSl",R="Yx4LX57uEtpnvgzbxoAC",P=({spec:e})=>{const{item:t,context:n}=(0,r.L)()||{item:null,context:null},{hasYourDJMetadata:s}=(0,O.C)();return(0,E.jsx)(w.r,{spec:e,children:s?(0,E.jsxs)("div",{className:N,children:[(0,E.jsx)("div",{className:R,children:(0,E.jsx)(I,{})}),n&&t?(0,E.jsx)(i.d,{context:n,item:t,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium"}):null]}):null})};var L=n(63453),D=n(97500),k=n.n(D),x=n(21201),U=n(31417),M=n(99701),B=n(1378),j=n(3602),F=n(58685),V=n(19555);function G(){const e=(0,m.z)();return(0,F.o)((t=>{if(t?.signals?.find((e=>e===V.L.JUMP)))return{available:!0,callback:()=>{e.sendSignal(V.L.JUMP)}};if(t?.context&&t?.item&&(0,j.HS)(t?.context)&&!(0,j.bJ)(t?.context,t?.item)){const n=t?.nextItems.find((e=>e.metadata?.jump_track))??t?.nextItems.find((e=>e.metadata?.["narration.intro.ssml"]||e.metadata?.["narration.jump.ssml"]));if(n)return{available:!0,callback:()=>{e.skipTo(n)}}}return{available:!1,callback:()=>{}}}))}const H=()=>{const{isYourDJContext:e,isYourDJNarrator:t}=(0,O.C)(),n=(0,F.o)((e=>e?.isPaused));return void 0===n?{isPlaying:!1,isNarrating:!1}:{isPlaying:e&&!n,isNarrating:t&&!n}};var W=n(62021),z=n(87464),K=n(90326);const Y="yourdj.tiredofset.tooltipshown",q={status:"inactive",skippedCount:0},$=({children:e,onTooltipShown:t,api:n})=>{const[i,r]=(0,s.useState)(!1),a=(0,s.useCallback)((()=>{r(!1)}),[]);(0,s.useImperativeHandle)(n,(()=>({visible:i,hide:()=>{a()}})));const[o,l]=(0,W.x)(Y,!1),c=(0,s.useCallback)((e=>{o||(t?.(e),l(!0),r(!0))}),[o,t,l]);return((e,t,n)=>{const i=(0,s.useRef)("inactive"),{isPlaying:r}=H(),{available:a}=G();(0,s.useEffect)((()=>{r&&a?"inactive"===i.current&&(i.current="dj_active"):(i.current="inactive",n())}),[r,a,n]),(0,s.useEffect)((()=>{const n=()=>{"dj_active_then_blurred"===i.current&&(i.current="executed",s(),setTimeout((()=>{t("blur_then_focus")}),1e3))},r=()=>{"dj_active"===i.current&&(i.current="dj_active_then_blurred")};function s(){e||(window.removeEventListener("focus",n),window.removeEventListener("blur",r))}return e||(window.addEventListener("focus",n),window.addEventListener("blur",r)),s}),[r,t,e])})(o,c,a),((e,t,n)=>{const i=(0,s.useRef)(q),{isPlaying:r}=H(),{available:a}=G();(0,s.useEffect)((()=>{r&&a?"inactive"===i.current.status&&(i.current.status="dj_active"):(i.current=q,n())}),[r,a,n]),(0,K.p)(z.gd.ACTION,(n=>{e||n.data.action===z.Ik.SKIP_TO_NEXT&&("dj_active"!==i.current.status&&"dj_active_then_skipped"!==i.current.status||(i.current.skippedCount+=1,2===i.current.skippedCount&&(i.current.status="executed",t("multiple_skips"))))}))})(o,c,a),(0,E.jsx)(B.x,{title:U.Ru.get("web-player.your-dj.jumpbutton.tooltip.title"),description:U.Ru.get("web-player.your-dj.jumpbutton.tooltip.desc"),visible:i,id:Y,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:r.bind(null,!1),children:e})},Z="M2CC9pnZH5pjRK1DWgLd",Q="lzFeyvDl_N0F6bGKxl26";let J=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const X=({onClick:e})=>{const t=(0,s.useRef)(null),{available:n,callback:i}=G(),{context:a}=(0,r.L)()||{item:null,context:null},[o,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>{i(),t.current?.hide(),e?.()}),[e,i]);if(!n)return null;const p=(0,c.p)(a?.metadata?.["narration.jump.background.color"],l.Gw),m=(0,c.p)(a?.metadata?.["narration.jump.border.color"],l.yX),h=(0,c.p)(a?.metadata?.["narration.jump.icon.color"],l.DR);return(0,E.jsx)($,{api:t,children:(0,E.jsx)(M.Zp,{label:U.Ru.get("web-player.your-dj.jumpbutton.tooltip.hover"),children:(0,E.jsx)("button",{className:k()(Z),style:{background:p,outline:o?void 0:`solid 2px ${m}`},onClick:d,onFocus:()=>u(!0),onBlur:()=>u(!1),children:(0,E.jsx)("div",{className:k()(Q),children:(0,E.jsx)(x.E,{iconSize:J.xs,style:{color:h}})})})})})};var ee=n(62411),te=n(85387),ne=n(14343),ie=n(38035),re=n(98293),se=n(26344),ae=n(54454),oe=n(38501),le=n(55671),ce=n(19329),ue=n(21549);const de=()=>{const e=(0,ne.NC)(oe.wq9,{loadingValue:!1}),{spec:t,logger:n}=((0,ne.NC)(oe.LDS,{loadingValue:!1}),(0,ue.r)(ie.l,{})),i=(0,ee.wA)(),r=(0,te.Zp)(),{openURLWithSessionTransfer:a}=(0,ce.L)(),o=(0,s.useCallback)((()=>{i((0,re.YF)())}),[i]),l=(0,ae.k)(),c=(0,s.useMemo)((()=>{const e=new URL(l.url);return e.searchParams.set("ref","jam"),e}),[l.url]),u=(0,s.useCallback)((()=>{let e;!1===l.isExternal?(r("/premium?ref=jam"),e=t.upsellButtonFactory().hitUiNavigate({destination:"/premium?ref=jam"})):(a(c.href),e=t.upsellButtonFactory().hitNavigateToExternalUri({destination:c.href})),n.logInteraction(e)}),[n,r,a,l.isExternal,t,c.href]);return e?(0,E.jsx)(se.T,{onClose:o,onConfirm:()=>{u(),o()},"aria-label":U.Ru.get("web-player.your-dj.upsell.premium.title"),titleText:U.Ru.get("web-player.your-dj.upsell.premium.title"),descriptionText:U.Ru.get("web-player.your-dj.upsell.premium.description"),confirmText:U.Ru.get("web-player.your-dj.upsell.premium.yes"),confirmLabel:"confirmLabel",cancelText:U.Ru.get("web-player.your-dj.upsell.premium.no")}):(0,E.jsx)(se.T,{onClose:o,onConfirm:()=>{r(le.yf),o()},"aria-label":U.Ru.get("web-player.your-dj.upsell.notavailable.title"),titleText:U.Ru.get("web-player.your-dj.upsell.notavailable.title"),descriptionText:U.Ru.get("web-player.your-dj.upsell.notavailable.description"),confirmText:U.Ru.get("web-player.your-dj.upsell.notavailable.gotolink"),confirmLabel:"confirmLabel",cancelText:U.Ru.get("web-player.your-dj.upsell.notavailable.notnow")})};var pe=n(44481),me=n(28450),he=n(59343),fe=n(30349),ge=n(16783);const Ee="YimlNzI7J6qlgfRRvjXV",_e="q5CwEeVbq3wRt0e6nBOo",ye="aLH5DNwdd7ag9mqexICS",ve=()=>{const{isDJInLibrary:e,maybeAddDJToLibrary:t,addDJToLibrary:n,removeDJFromLibrary:i}=(0,fe.F)(),{context:r,metadata:s}=(0,he._)(),a=(0,ge.C)(),o=H(),c=(0,ee.wA)();return(0,E.jsxs)("div",{className:Ee,children:[(0,E.jsx)("h1",{children:"DJ Debug Window"}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Library"}),(0,E.jsxs)("h3",{children:["In Library: ",(0,E.jsx)("code",{children:e.toString()})]}),(0,E.jsx)(pe.$,{size:"small",className:_e,onClick:()=>{t()},children:"Maybe add DJ to Library"}),(0,E.jsx)(pe.$,{size:"small",className:_e,onClick:()=>{n()},children:"Add DJ to Library (forced)"}),(0,E.jsx)(pe.$,{size:"small",className:_e,onClick:()=>{i()},children:"Remove DJ from Library (forced)"}),(0,E.jsx)(pe.$,{size:"small",className:_e,onClick:()=>{c((0,re.eN)())},children:"Trigger Upsell"})]}),(0,E.jsx)("hr",{}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Playback"}),(0,E.jsx)(pe.$,{size:"small",className:_e,onClick:()=>{r.togglePlay()},children:"Toggle Play"})]}),(0,E.jsx)("hr",{}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Loudness-animated DJ Jellyfish"}),(0,E.jsx)("div",{className:ye,children:(0,E.jsx)(I,{})})]}),(0,E.jsx)("hr",{}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Home Card"}),(0,E.jsx)("div",{style:{width:400},children:(0,E.jsx)(me.n,{uri:l.N6,title:s?.name||"",description:s?.description||"",forceAlwaysInView:!0})})]}),(0,E.jsx)("hr",{}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Now Playing State"}),(0,E.jsx)("pre",{children:JSON.stringify({...a,...o},null,2)}),(0,E.jsx)("br",{}),(0,E.jsx)("h2",{children:"Metadata"}),(0,E.jsx)("pre",{children:JSON.stringify(s,null,23)})]}),(0,E.jsx)("hr",{})]})}},16783:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C});var i=n(5591)},24500:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});const i=(e,t)=>{if(void 0===e)return t;const n=e.slice(1,3);return`#${e.slice(3)}${n}`}},3596:(e,t,n)=>{"use strict";n.d(t,{G:()=>l,n:()=>o});var i=n(64376),r=n(27241);const s=new Map;let a=null;const o=()=>a||(a=new i.B((0,r.X)()),a.subLoudness({},(e=>{s.has(e.playbackId)||(s.clear(),s.set(e.playbackId,[]));const t=s.get(e.playbackId),n=Math.min(1,Math.max(0,e.loudness[0]/80));t[Math.floor(Number(e.position/BigInt(40)))]=n})),a),l=(e,t)=>{const n=Math.floor(t/40);{const t=e?s.get(e):null;if(!t||n>=t.length)return;return t[n]}}},84523:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,t:()=>a});var i=n(89521),r=n(62021);let s=function(e){return e[e.LIST=0]="LIST",e[e.GRID=1]="GRID",e}({});const a=()=>{const e=(0,i.vW)(),[t,n]=(0,r.x)("items-view",s.LIST);return{itemsView:t,setItemsView:n,isGridView:t===s.GRID&&e!==i.fX.COLLAPSED}}},89521:(e,t,n)=>{"use strict";n.d(t,{$:()=>h,fX:()=>u,sy:()=>m,vW:()=>p});var i=n(30758),r=n(78505),s=n(50161),a=n(74180),o=n(67668),l=n(19830),c=n(62021);let u=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COLLAPSED=1]="COLLAPSED",e[e.EXPANDED=2]="EXPANDED",e}({});function d(){return(0,c.x)("ylx-sidebar-state",u.DEFAULT)}function p(){return d()[0]}function m(){return d()[0]===u.COLLAPSED}function h(){const e=(0,o.V)(),[t,n]=d(),{isOnboardingComplete:c}=(0,a.er)(),p=(0,i.useRef)(u.DEFAULT);(0,i.useEffect)((()=>{t!==u.COLLAPSED&&(p.current=t)}),[t]),(0,i.useEffect)((()=>{c||n(u.COLLAPSED)}),[n,c]);const m=!e,h=(0,l.U)(`(min-width: ${s.Z.EXPANDED_MIN+3*r.KV+r.ev}px)`)&&!e,f=(0,i.useCallback)((e=>{e===u.COLLAPSED&&!m||e===u.EXPANDED&&!h||n(e)}),[n,m,h]);return{ylxSidebarState:t,setYlxSidebarState:f,isCollapsed:t===u.COLLAPSED,isExpanded:t===u.EXPANDED,canCollapse:m,canExpand:h,lastUncollapsedYlxSidebarState:p.current}}},62844:(e,t,n)=>{"use strict";n.d(t,{fX:()=>i.fX,sy:()=>i.$,vW:()=>i.vW});var i=n(89521)},73816:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(30758);function r(){const[e,t]=(0,i.useState)(document.body.clientWidth);return(0,i.useLayoutEffect)((()=>{const e=()=>{t(document.body.clientWidth)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),document.body.clientWidth}},31058:(e,t,n)=>{"use strict";n.d(t,{$:()=>h,g:()=>m});var i=n(62411),r=n(91008),s=n(31417),a=n(3602),o=n(60393),l=n(36061),c=n(39838),u=n(58685),d=n(75497);const p=e=>(0,r.o_h)(e)?.toURLPath(!0)??"",m=(e,t,n)=>{const{user:r}=(0,i.d4)(l.Ht);if(!e||!t)return{title:null,link:null};const u=(0,o.Iu)();if(t.uri===u.uri||t.uri===c.bV)return{title:u.name,link:p(c.bV)};if((0,d.N)(e)&&!n)return{title:s.Ru.get("ad-formats.advertisement"),link:null};if("queue"===e.provider&&!n)return{title:s.Ru.get("playback-control.queue"),link:p("spotify:app:queue")};const m=(0,o.$R)(r?.id);if(t.uri===m?.uri)return{title:m?.name,link:p(m?.uri)};const h=(0,o.n5)(r?.id);return t.uri===h?.uri?{title:h?.name,link:p(h?.uri)}:(0,a.HS)(t)?{title:[e.metadata?.station_title,e.metadata?.station_subtitle].filter(Boolean).join(" • "),link:null}:{title:t.metadata?.context_description??e?.name??"",link:p(t.uri)??p(e.uri)??""}},h=e=>{const{item:t,context:n}=(0,u.o)((e=>({item:e?.item,context:e?.context})),((e,t)=>e.item?.uri===t.item?.uri&&e.context?.metadata?.context_description===t.context?.metadata?.context_description));return m(t,n,e)}},78400:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var i=n(30758),r=n(62411),s=n(98293),a=n(93629),o=n(74096),l=n(59961);const c=e=>{const t=(0,r.wA)(),n=(0,r.d4)((e=>e.ui.fullscreenMode.isOpen));(0,o.P)((e=>{e||t((0,s.rF)())}));const c=(0,i.useMemo)((()=>(0,a.kH)()),[]),u=(0,i.useCallback)((async()=>{if(!c)return;const i=function(e){return!(0,l.c)()&&e instanceof HTMLElement}(e)?e:e?.current;i&&(n?(await(0,a.SP)(),t((0,s.rF)())):(await(0,a.X8)(i),t((0,s.f)())))}),[t,c,n,e]);return{isInFullScreen:n,isFullScreenSupported:c,toggleFullScreen:u}}},86394:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var i=n(30758);const r=e=>{(0,i.useEffect)((()=>{const t=t=>{"Escape"===t.key&&e()};return window.addEventListener("keyup",t,!1),()=>window.removeEventListener("keyup",t)}))}},90224:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});var i=n(29195);const r=()=>{const e=(0,i.mv)();if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getHistory()}},89402:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var i=n(30758),r=n(62411),s=n(85387),a=n(39405),o=n(30147);const l=(e,t)=>n=>{const{intent:i,type:r,targetUri:s,itemIdSuffix:a,pathNameOverride:o}=n,l=a?`${t}/${a}`:t,c=o||e;return{page:c.split(/\//).filter((e=>""!==e)).shift(),view_uri:c,action_intent:i,action_type:r,target_uri:s,item_id:l}};function c(){const e=(0,i.useContext)(o.zz),t=(0,r.wA)(),{pathname:n}=(0,s.zy)();return(0,i.useCallback)((i=>{const r=l(n,e);t((0,a.d)(r(i)))}),[t,n,e])}},67668:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});var i=n(62411),r=n(36061);const s=()=>{const e=(0,i.d4)(r.Ht);return e?.isAnonymous??!1}},55926:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var i=n(62411);const r=()=>(0,i.d4)((e=>e.platform?.isBrowser))},6102:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(65292);const r=()=>"1"!==(0,i.$)("dsa-mode-enabled")},68388:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(65292);const r=()=>"1"===(0,i.$)("is-pigeon")},37178:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var i=n(62411);function r(){return(0,i.d4)((e=>e.ui?.textDirection?.isRTL))}},33390:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(62411),r=n(36061);const s=()=>(0,i.d4)(r.Yb)},39566:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(30758),r=n(38540);const s=()=>{const e=(0,i.useContext)(r.Z);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineStatusProvider'!");return e.online}},83158:(e,t,n)=>{"use strict";n.d(t,{M:()=>u});var i=n(30758),r=n(14343),s=n(37948),a=n(23300),o=n(58685),l=n(82935),c=n(43329);const u=e=>{const t=(0,r.NC)(c.HO),n=(0,o.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri)),u=(0,i.useMemo)((()=>(0,l.h)(n?.images??void 0,{desiredLabel:e?.desiredLabel,desiredSize:e?.desiredSize})),[n?.images,e?.desiredLabel,e?.desiredSize]);(0,a.g)(u&&t?[u]:[]),(0,s.z)(t?void 0:u)}},54454:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var i=n(62411),r=n(14343),s=n(38501),a=n(86551),o=n(27301),l=n(46845);const c=e=>{const t=(0,i.d4)(a.q),n=(0,r.NC)(s.ZXG),c=(0,l.Ek)();if(t)return{url:e?o.M0:o.BW,isExternal:!0};if(n===s.ztB.WEBPLAYERPDP||c){return{url:new URL("/premium",document.location.origin).toString(),isExternal:!1}}return{url:e?o.M0:o.BW,isExternal:!0}}},90036:(e,t,n)=>{"use strict";n.d(t,{i:()=>v});var i=n(30758),r=n(62411),s=n(85387),a=n(14343),o=n(31417),l=n(39405),c=n(25013),u=n(67668),d=n(33390),p=n(54454),m=n(82432),h=n(38501),f=n(21020),g=n(19329),E=n(7307),_=n(66387),y=n(77008);const v=(e,t)=>{const n=(0,r.wA)(),v=(0,s.Zp)(),b=(()=>{const e=(0,u.V)(),t=(0,d.l)(),n=(0,a.NC)(h.d5A),i=!!(0,s.RQ)({path:"/search",end:!1}),r=!!(0,s.RQ)({path:"/collection",end:!1}),o=!!(0,s.RQ)({path:"/collection/tracks"});return!(n||e||r&&!o||i)&&t})(),{openURLWithSessionTransfer:S}=(0,g.L)(),A=(0,m.D)("loggedin_upgrade_button"),C=o.Ru.getLocaleForURLPath(),T=(0,r.d4)(f.MU),I=(0,r.d4)(f.NR),O=(0,y.p)({localeFeatureFlag:T,entityFeatureFlag:I,urlLocale:C,entity:E.c.PREMIUM,type:"link"})?(0,_.hF)("/premium"):"/premium",w=(0,i.useCallback)((()=>{t.logInteraction(e.hitUiNavigate({destination:"spotify:app:premium"})),v(O)}),[O,t,v,e]),N=(0,p.k)(!0),{url:R,isExternal:P}=N,L=(0,i.useCallback)((()=>{t.logInteraction(e.hitNavigateToExternalUri({destination:A(R)})),!1===P?v("/premium"):S(R,"_blank"),n((0,l.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[t,e,A,R,P,n,v,S]),D=(0,c.X)();return{shouldShowUpgradeButton:b,onUpgradeClick:D?w:L,type:D?"internal":"external"}}},82432:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(30758),r=n(62411);function s(e){const{isDesktop:t,isBrowser:n}=(0,r.d4)((e=>e.platform));return(0,i.useCallback)((i=>{const r=new URL(i);return t?r.searchParams.set("ref",`desktop_${e}`):n&&r.searchParams.set("ref",`web_${e}`),r.toString()}),[t,n,e])}},57666:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,m:()=>o});var i=n(30758),r=n(85387),s=n(87182);const a=()=>{const e=(0,r.zy)(),t=(0,s.z)();e.state?.referrer?t.setReferrer(e.state?.referrer):e.state={...e.state,referrer:t.getReferrer()}},o=e=>{const t=(0,s.z)(),n=(0,r.zy)();(0,i.useEffect)((()=>{t.setReferrer(e),n.state={..."object"==typeof n.state?n.state:{},referrer:e}}),[n,t,e])}},27042:(e,t,n)=>{"use strict";n.d(t,{$h:()=>u,Su:()=>a,V$:()=>s,ab:()=>d,rI:()=>r,vx:()=>o,yR:()=>c,yv:()=>l});var i=n(65782);function r(){return{type:i.Q.TRIGGER_APP_START_IN_APP_MESSAGE}}function s(){return{type:i.Q.TRIGGER_CONTEXT_START_IN_APP_MESSAGE}}function a(){return{type:i.Q.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE}}function o(e){return{type:i.Q.SHOW_IN_APP_MESSAGE,message:e}}function l(){return{type:i.Q.DISMISS_IN_APP_MESSAGE}}function c(e,t){return{type:i.Q.PREVIEW_IN_APP_MESSAGE,creativeId:e,appUri:t}}function u(e){return{type:i.Q.SET_IN_APP_MESSAGING_ENV,env:e}}function d(e){return{type:i.Q.SHOW_PREVIEW_TOOL,show:e}}},65782:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r,x:()=>i});const i="prod",r={DISMISS_IN_APP_MESSAGE:"DISMISS_IN_APP_MESSAGE",PREVIEW_IN_APP_MESSAGE:"PREVIEW_IN_APP_MESSAGE",SET_IN_APP_MESSAGING_ENV:"SET_IN_APP_MESSAGING_ENV",SHOW_IN_APP_MESSAGE:"SHOW_IN_APP_MESSAGE",SHOW_PREVIEW_TOOL:"SHOW_PREVIEW_TOOL",TRIGGER_APP_START_IN_APP_MESSAGE:"TRIGGER_APP_START_IN_APP_MESSAGE",TRIGGER_CONTEXT_START_IN_APP_MESSAGE:"TRIGGER_CONTEXT_START_IN_APP_MESSAGE",TRIGGER_CONTEXT_START_PLATFORM_IN_APP_MESSAGE:"TRIGGER_CONTEXT_START_PLATFORM_IN_APP_MESSAGE",TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:"TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE"}},77981:(e,t,n)=>{"use strict";n.d(t,{O:()=>l,W:()=>c});var i=n(18753),r=n(95752),s=n(5537),a=n(44074);const o={BROWSER_EDGE:"spotify__browser--is-edge",BROWSER_SAFARI:"spotify__browser--is-safari",OS_MACOS:"spotify__os--is-macos",OS_WINDOWS:"spotify__os--is-windows",OS_LINUX:"spotify__os--is-linux",OS_CHROMEOS:"spotify__os--is-chromeos",CONTAINER_DESKTOP:"spotify__container--is-desktop",CONTAINER_PWA:"spotify__container--is-pwa",CONTAINER_WEB:"spotify__container--is-web"};function l(e,t){var n;n=Object.values(o),document.documentElement.classList.remove(...n);const l=[];(0,s.k)()?l.push(o.BROWSER_EDGE):(0,a.n)()&&l.push(o.BROWSER_SAFARI),t===r.f.macOS?l.push(o.OS_MACOS):t===r.f.Windows?l.push(o.OS_WINDOWS):t===r.f.Linux?l.push(o.OS_LINUX):t===r.f.ChromeOS&&l.push(o.OS_CHROMEOS),e===i.m.Desktop?l.push(o.CONTAINER_DESKTOP):e===i.m.PWA?l.push(o.CONTAINER_PWA):e===i.m.Web&&l.push(o.CONTAINER_WEB),function(e){e.forEach((e=>{document.documentElement.classList.add(e)}))}(l)}function c(e){return e===r.f.macOS&&window.outerHeight===window.screen.height&&window.outerWidth===window.screen.width}},40217:(e,t,n)=>{"use strict";n.d(t,{Hi:()=>r,Or:()=>s,xP:()=>i});const i={NO_DEVICES_AVAILABLE:"NO_DEVICES_AVAILABLE",NOT_CONNECTED:"NOT_CONNECTED",CONNECTING:"CONNECTING",CONNECTED:"CONNECTED"};function r(e){return e===window.cast?.framework.CastState.NOT_CONNECTED}function s(e){return window.cast&&e!==window.cast.framework.CastState.NO_DEVICES_AVAILABLE}},70028:(e,t,n)=>{"use strict";n.d(t,{Hv:()=>o,IA:()=>r,JD:()=>l,YZ:()=>a,j8:()=>s});var i=n(36285);const r="player.play",s="library.add",a="rootlist.add",o="follow.user",l=(0,i.u)("ActionStoreAPI")},87386:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(47095);function r(e){const{backgroundColor:t}=(0,i.oI)();return t||e}},59761:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});const i=(0,n(36285).u)("ClipboardAPI")},77195:(e,t,n)=>{"use strict";n.d(t,{QZ:()=>s,ar:()=>o,jW:()=>c,r0:()=>l,tV:()=>a});var i=n(36285),r=n(93827);const s=["artist","artistban","ban","collection","enhanced","ignoreinrecs","listenlater","show","ylpin","prerelease","tags","markedasfinished"];function a(e){return s.includes(e)}let o=function(e){return e.UPDATE_ITEM="update_item",e.ADDED="added",e.REMOVED="removed",e}({});class l extends r.V{}const c=(0,i.u)("CollectionPlatformAPI")},81964:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(77195),r=n(49769);class s extends i.r0{_containsCancelFunctionByCollection2Set={};constructor(e,t){super(),this._subscribeContains=e,this._cacheBySet=t,this._aggregatorByCollection2Set=Object.fromEntries(i.QZ.map((e=>[e,(0,r.X)(this.onBatchChanged.bind(this,e),100)]))),this.onAddListener(i.ar.UPDATE_ITEM,(e=>{this._aggregatorByCollection2Set[e.data.options.set].subscribe(e.data.options.uri)})),this.onRemoveListener(i.ar.UPDATE_ITEM,(e=>{this._aggregatorByCollection2Set[e.data.options.set].unsubscribe(e.data.options.uri)}))}emitUpdateItems(e,t,n){Array.isArray(n)?t.forEach(((t,r)=>{this._cacheBySet[e].set(t,n[r]),this.emit(i.ar.UPDATE_ITEM,{set:e,uri:t,isInSet:n[r]})})):t.forEach((t=>{this._cacheBySet[e].set(t,n),this.emit(i.ar.UPDATE_ITEM,{set:e,uri:t,isInSet:n})}))}async onBatchChanged(e,t){if(this._containsCancelFunctionByCollection2Set[e]?.(),0===t.size)return;const n=Array.from(t.keys());this._containsCancelFunctionByCollection2Set[e]=this._subscribeContains(e,n,(t=>this.emitUpdateItems(e,n,t)))}}},74008:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var i=n(30758),r=n(96131),s=n(88308),a=n(77195),o=n(71151);function l(e,t){const n=(0,o.l)(),[l,c]=(0,i.useState)((()=>t.map((t=>n.containsSync(e,t)??!1))));return(0,s.Ij)((()=>{const i=n.getEvents(),s=t.map((t=>n.containsSync(e,t)??!1));c((e=>(0,r.j)(s,e)?e:s));const o=t.map(((e,t)=>n=>{n.data.uri===e&&(s[t]=n.data.isInSet,c([...s]))}));return o.forEach(((n,r)=>{i.addListener(a.ar.UPDATE_ITEM,n,{uri:t[r],set:e})})),()=>{o.forEach(((n,r)=>{i.removeListener(a.ar.UPDATE_ITEM,n,{uri:t[r],set:e})}))}}),[t,e]),l}},48905:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var i=n(30758),r=n(71151);function s(e){const t=(0,r.l)();return{get:(0,i.useCallback)((()=>t.get(e)),[t,e]),subscribe:(0,i.useCallback)((function(n){return t.subscribe(e,n)}),[t,e]),add:(0,i.useCallback)(((...n)=>t.add(e,n)),[t,e]),remove:(0,i.useCallback)(((...n)=>t.remove(e,n)),[t,e]),contains:(0,i.useCallback)(((...n)=>t.contains(e,n)),[t,e])}}},48655:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});let i=function(e){return e.COPY="copy",e.COPY_ADVANCED="copy_advanced",e.CUT="cut",e.PASTE="paste",e.SELECT_ALL="select_all",e.FILTER="filter",e.DELETE="delete",e.CREATE_NEW_FOLDER="create_new_folder",e.CREATE_NEW_PLAYLIST="create_new_playlist",e.BROWSE_BACKWARD="browse_backward",e.BROWSE_FORWARD="browse_forward",e.LOGOUT="logout",e.SHOW_ABOUT="show_about",e.SHOW_PREFERENCES="show_preferences",e.SHOW_SEARCH="show_search",e.SHOW_DEBUG_WINDOW="show_debug_window",e.SHOW_ACCOUNT="show_account",e.SHOW_COMMUNITY="show_community",e.SHOW_HELP="show_help",e.SHOW_LICENSES="show_licenses",e.SHOW_LICENSING_INFORMATION="show_licensing_information",e.SHOW_SCTA_INFORMATION="show_scta_information",e.NAVIGATION="navigation",e.ENTER_FULLSCREEN="enter_fullscreen",e.LEAVE_FULLSCREEN="leave_fullscreen",e.SET_PLATFORM_EMULATION_AUTO="set_platform_emulation_auto",e.SET_PLATFORM_EMULATION_MACOS="set_platform_emulation_macos",e.SET_PLATFORM_EMULATION_WINDOWS="set_platform_emulation_windows",e.SET_PLATFORM_EMULATION_LINUX="set_platform_emulation_linux",e}({})},97330:(e,t,n)=>{"use strict";n.d(t,{b:()=>r,u:()=>s});var i=n(36285);const r=64,s=(0,i.u)("ControlMessageAPI")},33961:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var i=n(93827);class r extends i.V{}},43004:(e,t,n)=>{"use strict";n.d(t,{D:()=>i});let i=function(e){return e.FILTER="enable_filter_item",e}({})},48994:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var i=n(30758),r=n(13087);function s(e,t){const n=(0,r.m)(),s=(0,i.useRef)(t);(0,i.useEffect)((()=>{s.current=t})),(0,i.useEffect)((()=>n.getEvents().addListener("message",(({data:{type:t,data:n}})=>{t===e&&s.current(n)}))),[e,n])}},40093:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});const i=(0,n(36285).u)("EqualizerAPI")},40892:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(47912),r=n(27731),s=n(11462);class a{constructor(e){this.localStorageAPI=e,this.filters=JSON.parse(JSON.stringify(this.getPreset().filters))}subscribeToEnabledState(e){throw new Error("subscribeToEnabledState not yet implemented")}setEnabledState(e){throw new Error("setEnabledState not yet implemented")}async setFilterGain(e,t){throw new Error("setFilterGain not yet implemented")}async getFilters(){throw new Error("getFilters not yet implemented")}isSupported(){throw new Error("isSupported not yet implemented")}setPreset(e){const t="string"==typeof e?r.fG[e]:e;this.localStorageAPI.setItem(i.h,t),t.filters.forEach((e=>{this.setFilterGain(e.key,e.gain)}))}getPreset(){const e=this.localStorageAPI.getItem(i.h);return e instanceof Error?r.fG.flat:e}subscribeToPresetChange(e){return this.localStorageAPI.getEvents().addListener(s.r.UPDATE,(t=>{if(t.data.key===i.h){const n=t.data.value;e(n)}}))}}},47912:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,h:()=>r});const i="audio.equalizer.enabled",r="audio.equalizer.saved_preset"},27731:(e,t,n)=>{"use strict";n.d(t,{Zs:()=>r,fG:()=>o,zP:()=>l});var i=n(31417);const r=12,s=[{type:"lowshelf",frequency:60,key:"audio.equalizer.low_shelf_gain_v2",gain:0},{type:"peaking",frequency:150,key:"audio.equalizer.low_peak_gain_v2",gain:0},{type:"peaking",frequency:400,key:"audio.equalizer.low_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:1e3,key:"audio.equalizer.high_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:2400,key:"audio.equalizer.high_peak_gain_v2",gain:0},{type:"highshelf",frequency:15e3,key:"audio.equalizer.high_shelf_gain_v2",gain:0}],a={flat:{gains:[0,0,0,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.flat")}},acoustic:{gains:[4.9,3.95,2.15,1.75,3.5,2.15],get displayName(){return i.Ru.get("equalizer.preset.acoustic")}},bassBooster:{gains:[4.25,3.5,1.25,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.bassBooster")}},bassReducer:{gains:[-4.25,-3.5,-1.25,0,0,0],get displayName(){return i.Ru.get("equalizer.preset.bassReducer")}},classical:{gains:[3.75,3,-1.5,-1.5,0,3.75],get displayName(){return i.Ru.get("equalizer.preset.classical")}},dance:{gains:[6.55,4.99,1.92,3.65,5.15,0],get displayName(){return i.Ru.get("equalizer.preset.dance")}},deep:{gains:[3.55,1.75,2.85,2.5,1.45,-2.15,-3.55,-4.6],get displayName(){return i.Ru.get("equalizer.preset.deep")}},electronic:{gains:[3.8,1.2,-2.15,2.25,.85,4.8],get displayName(){return i.Ru.get("equalizer.preset.electronic")}},hiphop:{gains:[4.25,1.5,-1,-1,1.5,3],get displayName(){return i.Ru.get("equalizer.preset.hiphop")}},jazz:{gains:[3,1.5,-1.5,-1.5,0,3.75],get displayName(){return i.Ru.get("equalizer.preset.jazz")}},latin:{gains:[3,0,-1.5,-1.5,-1.5,4.5],get displayName(){return i.Ru.get("equalizer.preset.latin")}},loudness:{gains:[4,0,-2,0,-1,1],get displayName(){return i.Ru.get("equalizer.preset.loudness")}},lounge:{gains:[-1.5,-.5,4,2.5,0,1],get displayName(){return i.Ru.get("equalizer.preset.lounge")}},piano:{gains:[2,0,3,1.5,3.5,3.5],get displayName(){return i.Ru.get("equalizer.preset.piano")}},pop:{gains:[-1,0,4,4,2,-1.5],get displayName(){return i.Ru.get("equalizer.preset.pop")}},rnb:{gains:[6.92,5.65,-2.19,-1.5,2.32,3.75],get displayName(){return i.Ru.get("equalizer.preset.rnb")}},rock:{gains:[4,3,-.5,-1,.5,4.5],get displayName(){return i.Ru.get("equalizer.preset.rock")}},smallSpeakers:{gains:[4.25,3.5,1.25,0,-1.25,-4.25],get displayName(){return i.Ru.get("equalizer.preset.smallSpeakers")}},spokenWord:{gains:[-.47,0,3.46,4.61,4.84,0],get displayName(){return i.Ru.get("equalizer.preset.spokenWord")}},trebleBooster:{gains:[0,0,0,1.25,2.5,5.5],get displayName(){return i.Ru.get("equalizer.preset.trebleBooster")}},trebleReducer:{gains:[0,0,0,-1.25,-2.5,-5.5],get displayName(){return i.Ru.get("equalizer.preset.trebleReducer")}},vocalBooster:{gains:[-3,-3,3.75,3.75,3,-1.5],get displayName(){return i.Ru.get("equalizer.preset.vocalBooster")}}},o=Object.entries(a).reduce(((e,[t,n])=>({...e,[t]:{filters:s.map(((e,t)=>Object.freeze({...e,gain:n.gains[t]}))),key:t,get displayName(){return n.displayName}}})),{});function l(e){return{key:"custom",displayName:i.Ru.get("equalizer.preset.manual"),filters:e.map(((e,t)=>({frequency:o.flat.filters[t].frequency,key:o.flat.filters[t].key,type:o.flat.filters[t].type,gain:e})))}}},24109:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});const i=(0,n(36285).u)("FollowAPI")},65924:(e,t,n)=>{"use strict";n.d(t,{JK:()=>r,mc:()=>s,tG:()=>a});var i=n(93827);let r=function(e){return e.FOLLOW_USER="follow_user",e.UNFOLLOW_USER="unfollow_user",e.IS_FOLLOWING_USER="is_following_user",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{emitOperationSync(e,t){return this.emitSync(s.OPERATION,{operation:e,uris:t}).defaultPrevented}emitOperationComplete(e,t,n=null){this.emit(s.OPERATION_COMPLETE,{operation:e,uris:t,error:n})}}},16311:(e,t,n)=>{"use strict";n.d(t,{T:()=>p});var i=n(91008),r=n(57776);n(59147);const s=new r.l("isFollowingUsers","query","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),a=new r.l("followUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),o=new r.l("unfollowUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null);var l=n(16151);var c=n(65924),u=n(85515);const d=Symbol();class p{constructor(e,t){this._events=new c.tG,this._cache=t??new u.fq,this._loader=e}getEvents(){return this._events}async isFollowing(e){const t={},n=[];if(this._validateURIs(e),e.forEach((e=>{const i=this._cache.get(e);void 0!==i?t[e]=i:n.push(e)})),n.length>0){const e=await this.executeOperation(c.JK.IS_FOLLOWING_USER,n,(()=>async function(e,t){const n=[];if(t.length>0){const i=await e(s,{uris:t});i?.data?.users?.forEach((e=>{"User"===e.__typename?n.push({uri:e.uri,isFollowing:e.following}):"NotFound"===e.__typename&&n.push({uri:e.uri,isFollowing:!1})}))}return n}(this._loader,n)));e!==d?e.forEach((e=>{this._cache.set(e.uri,e.isFollowing),t[e.uri]=e.isFollowing})):n.forEach((e=>{t[e]=!1}))}return t}async followUsers(e){this._validateURIs(e);const t=await this.executeOperation(c.JK.FOLLOW_USER,e,(()=>async function(e,t){const n=[];if(t.length>0){const r=await e(a,{usernames:t.map((e=>(0,l.v)(e)))});r?.data?.followUsers.responses.forEach((e=>{if("FollowUserResult"===e.__typename&&e.result){const t=(0,i.Qjr)(e.username).toURI();n.push({uri:t,isFollowing:!0})}}))}return n}(this._loader,e)));t!==d&&t.forEach((e=>{this._cache.set(e.uri,e.isFollowing)}))}async unfollowUsers(e){this._validateURIs(e);const t=await this.executeOperation(c.JK.UNFOLLOW_USER,e,(()=>async function(e,t){const n=[];if(t.length>0){const r=await e(o,{usernames:t.map((e=>(0,l.v)(e)))});r?.data?.unfollowUsers.responses.forEach((e=>{if("UnfollowUserResult"===e.__typename&&e.result){const t=(0,i.Qjr)(e.username).toURI();n.push({uri:t,isFollowing:!1})}}))}return n}(this._loader,e)));t!==d&&t.forEach((e=>{this._cache.set(e.uri,e.isFollowing)}))}async executeOperation(e,t,n){if(this._events.emitOperationSync(e,t))return d;try{const i=await n();return this._events.emitOperationComplete(e,t),i}catch(n){throw this._events.emitOperationComplete(e,t,n instanceof Error?n:new Error("Unknown error object")),n}}_validateURIs(e){e.forEach((e=>{if(!(0,i.APS)(e))throw new Error(`Expected a profile URI, but got ${e}!`)}))}}},12032:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});const i=(0,n(36285).u)("OvertureCoordinatorAPI")},998:(e,t,n)=>{"use strict";n.d(t,{P:()=>o});var i=n(79126),r=n(32792),s=n(99859),a=n(87464);class o{instances=new WeakMap;currentActiveInstance=null;currentPlayerVolume=1;constructor(e,t){this.playerAPI=e,this.playbackAPI=t,this.setupPlayerListeners()}createOvertureInstance(e,t=(e=>{e.pause().catch((()=>{}))}),n=((e,t)=>t.playbackState.playing&&!t.playbackState.muted),i=((e,t)=>{e.setVolume(t)}),r,a){const o=(0,s.Ue)(e,r,a),l=this.setupOvertureListeners(o);return this.instances.set(o,{inactivateInstance:t,activeIndicator:n,volumeSetter:i,removeListeners:l}),o}deleteOvertureInstance(e){const t=this.instances.get(e);t?.removeListeners(),this.instances.delete(e)}setupPlayerListeners(){this.playerAPI.getEvents().addListener(a.gd.ACTION,(e=>{e.data.action!==a.Ik.PLAY&&e.data.action!==a.Ik.RESUME||this.currentActiveInstance&&this.inactivateInstance(this.currentActiveInstance)})),this.playbackAPI.getVolume().then((e=>{this.currentPlayerVolume=e})),this.playbackAPI.getEvents().addListener(r._.VOLUME,(e=>{e.data.volume<0||e.data.volume>1||(this.currentPlayerVolume=e.data.volume,this.currentActiveInstance&&this.instances.get(this.currentActiveInstance)?.volumeSetter(this.currentActiveInstance,this.currentPlayerVolume))}))}inactivateInstance(e){this.instances.get(e)?.inactivateInstance(e)}setupOvertureListeners(e){const t=async()=>{const t=this.instances.get(e);if(!t)return;const n=await e.getState();if(t.activeIndicator(e,n)){if(this.currentActiveInstance!==e){this.currentActiveInstance&&this.inactivateInstance(this.currentActiveInstance),this.currentActiveInstance=e;const t=this.playerAPI.getState();t?.isPaused||this.playerAPI.pause()}}else this.currentActiveInstance===e&&(this.currentActiveInstance=null)};return e.on(i.LW.PLAYING,t),e.on(i.LW.PAUSED,t),e.on(i.LW.MUTED_CHANGED,t),e.on(i.LW.VOLUME_CHANGED,t),()=>{e.removeListener(i.LW.PLAYING,t),e.removeListener(i.LW.PAUSED,t),e.removeListener(i.LW.MUTED_CHANGED,t),e.removeListener(i.LW.VOLUME_CHANGED,t)}}}},29634:(e,t,n)=>{"use strict";n.d(t,{H:()=>h});var i=n(30758),r=n(31193),s=n(909),a=n(39566),o=n(20375);var l=n(43013),c=n(79237),u=n(58685),d=n(75497),p=n(45627),m=n(41434);const h=()=>{const e=(0,o.Q)(),t=(0,l.l)(),n=(0,a.n)(),{connectionStatus:h,isActiveDeviceLocal:f}=(0,c.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),m.a),g=(0,u.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.item?.uri===t?.item?.uri)),E=e.getCapabilities(),[_,y]=(0,i.useState)((()=>"open"===e.getCurrentState())),{setVideoPlayerUIFlag:v}=(0,r.d)();((e,t)=>{const n=(0,o.Q)(),r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((()=>{const t=n.getEvents(),i=r.current;return t.addListener(e,i)}),[n,e])})("visibility_change",(({data:e})=>{!1===e&&v(s.n.documentPip,e),y(e)})),(0,i.useEffect)((()=>{_&&e.syncWithPlayerState(g)}),[e,_,g]),(0,i.useEffect)((()=>{!e.isAllowed(g,h,f)&&_&&e.close()}),[e,h,f,_,g]);const b=g?.item,S=b&&(0,p.p)(b)&&("video"===b.mediaType||"mixed"===b.mediaType),A=b&&(0,d.N)(b),C=!S||E.supportsVideo,T=!A||E.supportsAds,I=!t||E.supportsConnect,O=n||E.supportsOffline,w=E.isEnabled&&C&&T&&I&&O,N=(0,i.useCallback)((async()=>{await e.open(g)}),[e,g]),R=(0,i.useCallback)((()=>{e.close()}),[e]);return{capabilities:E,isOpen:_,open:N,close:R,canOpen:w}}},77975:(e,t,n)=>{"use strict";n.d(t,{K:()=>l});var i=n(87633),r=n(18753),s=n(38501),a=n(75497),o=n(24620);function l({container:e,history:t,eventSender:n,appStartupId:l,playerAPI:c,resolver:u}){const d=u.getValue(s.mip);return(0,i.x)(e===r.m.Desktop,t,n,(async()=>{const e=c.getState(),t=e?.item??void 0;return null!==e&&(0,a.N)(t)?{positionMs:(0,o.s)(e),adId:t.id}:null}),l,d)()}},11459:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(1599),r=n(62478);function s(e,t,n,s){(0,r.N)(e),i.n.setLocale(t.locale),i.n.setMarket(t.market),i.n.setSession(t),i.n.setGlobalRequestHeaders([["App-Platform",s],["Spotify-App-Version",n]])}},47481:(e,t,n)=>{"use strict";n.d(t,{Fi:()=>s,KM:()=>r,sD:()=>a});var i=n(36285);const r=(0,i.u)("EventSender"),s=(0,i.u)("History"),a=(0,i.u)("Transport")},60948:(e,t,n)=>{"use strict";n.d(t,{createPlatformDesktop:()=>Id});var i=n(80663),r=n(83407),s=n(34074),a=n(32513),o=n(78006),l=n(26380),c=n(71144),u=n(13586),d=n(11266),p=n(45395),m=n(99058),h=n(40140),f=n(15427),g=n(92336),E=n(11064),_=n(11776),y=n(63058),v=n(31417),b=n(94784),S=n(87633),A=n(47601),C=n(91008),T=n(6121);class I{constructor(e,t,n){this.presenceView=e,this.presence2=t,this.batchAPI=n}getCapabilities(){return{isSupported:!0}}subscribeToBuddyActivity(e,t){return this.presence2.subscribeToBuddyActivity(e,(async()=>{const n=await this.presenceView.getBuddyActivity(e);(0,T.Q)(n)&&t(n)}))}async fetchFriendActivity(e){const t=(0,C.o_h)(e[0]).username;return this.fetchFriendActivityByUsername(t)}async fetchFriendActivityByUsername(e){const t=await this.presenceView.getBuddyActivity(e);return(0,T.Q)(t)?[t]:[]}fetchFriendActivityWithSubscriptions(e,t,n){return this.batchAPI.subscribe((async({ident:t})=>{const n=t.match(/hm:\/\/presence2\/user\/(.*)$/),i=n?await this.fetchFriendActivityByUsername(n[1]):[];e(i)}),t,n)}}var O=n(35163);class w{constructor(e,t,n){this.pubsub=e,this.presenceView=t,this.presence2=n,this.subscription=new Set}subscribe(e,t,n){return this.pubsub.subscribe({ident:"hm://presence2/user",isPrefix:!0,onMessage:async t=>{e(t)},onSubscribe:async e=>{if(!e)return;let i;try{i=await this.presenceView.getBuddyFeedWithSubscribing(e)}catch(e){return n?.(),void(0,O.UD)(e)}const{friends:r}=i.body,s=r.filter(T.Q);t(s);const a=new Set;s.forEach((e=>{const t=e.user.uri,n=(0,C.o_h)(t,[C.NQG.PROFILE]);n&&a.add(n.username)})),this.subscription=a},onCancel:async e=>{e&&this.unsubscribe(e)}})}async unsubscribe(e){this.presence2.unsubscribeFromBuddiesActivity(Array.from(this.subscription),e),this.subscription.clear()}}var N=n(23491);class R{constructor(e,t){this.pubsub=e,this.builder=t}subscribeToBuddyActivity(e,t){return this.pubsub.subscribe({ident:`hm://presence2/user/${encodeURIComponent(e)}`,isPrefix:!1,onMessage:async()=>{t(e)},onSubscribe:t=>t?(0,N.GG)(this.builder,e,t):Promise.resolve(),onCancel:t=>t?(0,N.Np)(this.builder,e,t):Promise.resolve()})}async unsubscribeFromBuddiesActivity(e,t){try{await(0,N.BT)(this.builder,e,t)}catch(e){}}}class P{constructor(e){this.builder=e}async getBuddyActivity(e){try{return(await(0,N.Yf)(this.builder,e)).body}catch(e){return null}}getBuddyFeed(){return(0,N.xA)(this.builder)}async getBuddyFeedWithSubscribing(e){return(0,N.io)(this.builder,e)}}var L=n(19049);class D{constructor(e,t){this._pubsub=e,this._builder=t}subscribeToBuddyActivity(e,t){return this._pubsub.subscribe({ident:`hm://presence2/user/${encodeURIComponent(e)}`,isPrefix:!1,onMessage:async()=>{try{const n=(await this.getBuddyActivity(e)).body;(0,T.Q)(n)&&t(n)}catch(e){}return{status:200,status_text:"Ok"}},onSubscribe:t=>t?(0,N.GG)(this._builder,e,t):Promise.resolve(),onCancel:t=>t?(0,N.Np)(this._builder,e,t):Promise.resolve()})}getBuddyActivity(e){return(0,N.Yf)(this._builder,e)}getBuddyFeed(){return(0,N.xA)(this._builder)}}class k{constructor(e){this.buddyFetchApi=e}getCapabilities(){return{isSupported:!0}}subscribeToBuddyActivity(e,t){return this.buddyFetchApi.subscribeToBuddyActivity(e,t)}async fetchFriendActivity(e){const t=(0,C.o_h)(e[0]).username,n=await this.buddyFetchApi.getBuddyActivity(t);return(0,T.Q)(n.body)?[n.body]:[]}}var x=n(20992);class U{value=null;subs=new Set;subscription=null;constructor(e,t,n){this.prefsApi=e,this.identifier=t,this.deserializeValue=n,this.getValue=this.getValue.bind(this),this.subValue=this.subValue.bind(this)}async getValue(){const e=(await this.prefsApi.get({key:this.identifier})).entries[this.identifier];return this.value=this.deserializeValue(e),this.value}subValue(e){return this.subs.add(e),this.subscription??=this.prefsApi.sub({key:this.identifier},(e=>{const t=this.deserializeValue(e.entries[this.identifier]);if(t!==this.value){this.value=t;for(const e of this.subs)try{e(t)}catch(t){console.error("Error in `PrefValue` sub:",{sub:e,error:t})}}})),()=>{this.subs.delete(e),0===this.subs.size&&(this.subscription?.cancel(),this.subscription=null)}}}var M=n(33549);class B extends M.e{}class j extends U{static identifier="app.player.autoplay";static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${j.identifier} from ${JSON.stringify(e)}`);return e.bool};constructor(e){super(e,j.identifier,j.deserialize)}}class F{value=null;subs=new Set;subscription=null;constructor(e,t,n){this.productStateApi=e,this.identifier=t,this.deserialize=n,this.getValue=this.getValue.bind(this),this.subValue=this.subValue.bind(this)}async getValue(){const e=await this.productStateApi.getValues();if(!e)throw new Error("No product state values returned");const t=e[this.identifier];return this.value=this.deserialize(t),this.value}subValue(e){return this.subs.add(e),this.subscription??=this.productStateApi.subValues((e=>{if(!e[this.identifier])return;const t=this.deserialize(e[this.identifier]);if(t!==this.value){this.value=t;for(const e of this.subs)try{e(t)}catch(t){console.error("Error in `ProductStateValue` sub:",{sub:e,error:t})}}})),()=>{this.subs.delete(e),0===this.subs.size&&(this.subscription?.(),this.subscription=null)}}}class V extends F{constructor(e,t,n,i){super(e,t,i),this.productStateApi=e,this.identifier=t,this.serialize=n,this.setValue=this.setValue.bind(this)}async setValue(e){await this.productStateApi.setValues({[this.identifier]:this.serialize(e)}),this.value=e}}var G=n(32674);class H extends V{static identifier="autoplay";static serialize=G.Ax;static deserialize=e=>void 0===e||(0,G.zf)(e);key="autoplay";constructor(e,t){super(e,H.identifier,H.serialize,H.deserialize),this.autoPlaySupported=new j(t)}async getValue(){const[e,t]=await Promise.all([this.autoPlaySupported.getValue(),super.getValue()]);if(!e)throw new Error("AutoPlay is not supported");return t}}class W extends V{static identifier="filter-explicit-content";static serialize=e=>(0,G.Ax)(!e);static deserialize=e=>void 0===e||!(0,G.zf)(e);key="contentPreferences.allowExplicitContent";constructor(e){super(e,W.identifier,W.serialize,W.deserialize)}}class z extends F{static identifier="lock-filter-explicit-content";static deserialize=e=>void 0!==e&&(0,G.zf)(e);key="contentPreferences.explicitContentForceDisallowed";constructor(e){super(e,z.identifier,z.deserialize)}}class K{constructor(e){this.allowExplicitContent=new W(e),this.explicitContentForceDisallowed=new z(e)}}class Y extends U{constructor(e,t,n,i){super(e,t,i),this.prefsApi=e,this.identifier=t,this.serializeValue=n,this.setValue=this.setValue.bind(this)}async setValue(e){await this.prefsApi.set({entries:{[this.identifier]:this.serializeValue(e)}}),this.value=e}}class q extends Y{static identifier="ui.track_notifications_enabled";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${q.identifier} from ${JSON.stringify(e)}`);return e.bool};key="display.nativeNotificationOnPlayerTransition";constructor(e){super(e,q.identifier,q.serialize,q.deserialize)}}class $ extends Y{static identifier="ui.system_media_controls_enabled";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${$.identifier} from ${JSON.stringify(e)}`);return e.bool};key="display.nativeOverlayOnMediaKeys";constructor(e){super(e,$.identifier,$.serialize,$.deserialize)}}class Z extends Y{static identifier="ui.hide_hpto";static serialize=e=>({bool:!e});static deserialize=e=>void 0===e.bool||!e.bool;key="display.newReleasesAnnoucements";constructor(e){super(e,Z.identifier,Z.serialize,Z.deserialize)}}class Q{constructor(e){this.nativeNotificationOnPlayerTransition=new q(e),this.nativeOverlayOnMediaKeys=new $(e),this.newReleasesAnnoucements=new Z(e)}}class J extends Y{static identifier="app.enable-developer-mode";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${J.identifier} from ${JSON.stringify(e)}`);return e.bool};key="employee.developerMode";constructor(e){super(e,J.identifier,J.serialize,J.deserialize)}}class X extends F{static identifier="employee";key="employee.isEmployee";static deserialize=e=>{if(void 0===e)throw new B(`Could not deserialize ${X.identifier} from ${JSON.stringify(e)}`);return(0,G.zf)(e)};constructor(e){super(e,X.identifier,X.deserialize)}}class ee extends Y{static identifier="app.show-chrome-toolbar";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${ee.identifier} from ${JSON.stringify(e)}`);return e.bool};key="employee.showChromeToolbar";constructor(e){super(e,ee.identifier,ee.serialize,ee.deserialize)}}class te{constructor(e,t){this.isEmployee=new X(e),this.developerMode=new J(t),this.showChromeToolbar=new ee(t)}}class ne extends Y{static identifier="language";static serialize=e=>({string:e});static deserialize=e=>{if(void 0===e?.string)throw new B(`Could not deserialize ${ne.identifier} from ${JSON.stringify(e)}`);return e.string};key="language";constructor(e){super(e,ne.identifier,ne.serialize,ne.deserialize)}}class ie extends Y{static identifier="audio.allow_downgrade";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${ie.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.autoAdjustQuality";constructor(e){super(e,ie.identifier,ie.serialize,ie.deserialize)}}class re extends Y{static identifier="audio.sync_bitrate_enumeration";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,G.FB)(e.number);if(null===t)throw new B(`Could not deserialize ${re.identifier} from ${JSON.stringify(e)}`);return t};key="quality.downloadAudioQuality";constructor(e,t){super(e,re.identifier,re.serialize,re.deserialize),this.maxSupportedQuality=t,this.setValue=this.setValue.bind(this)}async setValue(e){const t=await this.maxSupportedQuality.clampAudioQuality(e);return super.setValue(t)}}var se=n(91178);class ae extends F{static identifier="audio-quality";static deserialize=e=>{const t=(0,G.rj)(e);if(null===t)throw new B(`Could not deserialize ${ae.identifier} from ${JSON.stringify(e)}`);return t};key="quality.maxSupportedQuality";constructor(e){super(e,ae.identifier,ae.deserialize),this.clampAudioQuality=this.clampAudioQuality.bind(this)}async clampAudioQuality(e){this.value??=await this.getValue();const t=this.value===se.Qi.LOSSLESS&&e>se.a1.AUTOMATIC&&e<=se.a1.LOSSLESS,n=this.value===se.Qi.VERY_HIGH&&e<=se.a1.VERY_HIGH,i=this.value===se.Qi.STANDARD&&e<=se.a1.HIGH;return t||n||i?e:se.a1.HIGH}}class oe extends Y{static identifier="audio.normalize_v2";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new B(`Could not deserialize ${oe.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.normalizeVolume";constructor(e){super(e,oe.identifier,oe.serialize,oe.deserialize)}}const le=e=>e.find((e=>e.isActive))?.localIdentifier??null;class ce{callbacks=new Set;stateSubscription=null;static deserialize=e=>{const t=(0,G.FB)(e);if(null===t)throw new B(`Could not deserialize ${JSON.stringify(e)}`);return t};getActiveDeviceId(){return new Promise((e=>{const t=this.connectService.state(s.d1.fromPartial({}),(({devices:n})=>{t.cancel(),e(le(n))}))}))}constructor(e){this.connectService=e}key="quality.remoteQuality";async getValue(e){const t=void 0===e?await this.getActiveDeviceId():e;if(!t)return null;const n=await this.connectService.getDeviceSettings(s.zF.fromPartial({deviceId:t}));return{streamingQuality:ce.deserialize(n.deviceSettings?.streamQuality),maxSupportedQuality:ce.deserialize(n.deviceSettings?.capabilities?.maxSupportedStreamQuality)}}subValue(e){return 0===this.callbacks.size&&(this.stateSubscription=this.connectService.state(s.d1.fromPartial({}),(({devices:e})=>{e&&e.length>0&&this.callbacks.size>0&&this.getValue(le(e)).then((e=>{this.callbacks.forEach((t=>t(e)))}))}))),this.callbacks.add(e),()=>{this.callbacks.delete(e),0===this.callbacks.size&&this.stateSubscription&&(this.stateSubscription.cancel(),this.stateSubscription=null)}}async setValue({streamingQuality:e}){const t=await this.getActiveDeviceId();t&&await this.connectService.setDeviceStreamQuality(s.MG.fromPartial({deviceId:t,value:e}))}}class ue extends Y{static identifierMetered="audio.play_bitrate_enumeration";static identifierNonMetered="audio.play_bitrate_non_metered_enumeration";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,G.FB)(e.number);if(null===t)throw new B(`Could not deserialize ${JSON.stringify(e)}`);return t};key="quality.streamingQuality";constructor(e,t){super(e,ue.identifierNonMetered,ue.serialize,ue.deserialize),this.maxSupportedQuality=t,this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.subValue=this.subValue.bind(this)}async setValue(e){const t=await this.maxSupportedQuality.clampAudioQuality(e),n=ue.serialize(t);await this.prefsApi.set({entries:{[ue.identifierNonMetered]:n,[ue.identifierMetered]:n}}),this.value=e}}class de extends Y{static identifier="audio.loudness.environment";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,G.dt)(e.number);if(null===t)throw new B(`Could not deserialize ${de.identifier} from ${JSON.stringify(e)}`);return t};key="quality.volumeLevel";constructor(e){super(e,de.identifier,de.serialize,de.deserialize)}}class pe{constructor(e,t,n,i){this.playbackService=n,this.maxSupportedQuality=new ae(t),this.streamingQuality=new ue(e,this.maxSupportedQuality),this.downloadAudioQuality=new re(e,this.maxSupportedQuality),this.normalizeVolume=new oe(e),this.autoAdjustQuality=new ie(e),this.volumeLevel=new de(e),this.remoteQuality=new ce(i)}async getFormats(){return(await this.playbackService.getFormats({})).formats.filter((e=>e.supported)).map((e=>{const t=(0,G.FB)(e.enumValue);if(!t)throw new B(`Could not deserialize formats from ${JSON.stringify(e)}`);return{supported:e.supported,quality:t}}))}}class me extends V{static identifier="publish-playlist";static serialize=G.Ax;static deserialize=e=>{if(void 0===e)throw new B("publish-playlist value is missing");return(0,G.zf)(e)};key="social.autoPublishPlaylist";constructor(e){super(e,me.identifier,me.serialize,me.deserialize)}}class he{key="social.privateSession";value=!1;subs=new Set;unsubscribeFromPrivateSession=null;constructor(e){this.privateSessionAPI=e,this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.subValue=this.subValue.bind(this)}setValue(e){return this.privateSessionAPI.setPrivateSession(e)}async getValue(){return this.value}subValue(e){return this.subs.add(e),this.unsubscribeFromPrivateSession??=this.privateSessionAPI.subscribeToPrivateSession((e=>{this.value=e;for(const t of this.subs)try{t(e)}catch(e){console.error("Error in `PrivateSession` sub:",{sub:t,error:e})}})),()=>{this.subs.delete(e),0===this.subs.size&&(this.unsubscribeFromPrivateSession?.(),this.unsubscribeFromPrivateSession=null)}}}class fe extends V{static identifier="publish-activity";static serialize=G.Ax;static deserialize=e=>{if(void 0===e)throw new B("publish-activity missing");return(0,G.zf)(e)};key="social.shareListeningActivity";constructor(e){super(e,fe.identifier,fe.serialize,fe.deserialize)}}class ge extends V{static identifier="public-toplist";static serialize=G.Ax;static deserialize=e=>{if(void 0===e)return!1;const t=parseInt(e,10);return!isNaN(t)&&0!=(1&t)};key="social.showMyTopArtists";constructor(e){super(e,ge.identifier,ge.serialize,ge.deserialize)}}class Ee{constructor(e,t){this.autoPublishPlaylist=new me(e),this.shareListeningActivity=new fe(e),this.privateSession=new he(t),this.showMyTopArtists=new ge(e)}}class _e extends U{static identifier="app.browser.zoom-level";static deserialize=e=>{if(void 0===e?.number)throw new B(`Could not deserialize ${_e.identifier} from ${JSON.stringify(e)}`);return Number(e.number)};key="app.browser.zoom-level";constructor(e){super(e,_e.identifier,_e.deserialize)}}class ye{constructor(e,t,n,i,r){this.language=new ne(e),this.quality=new pe(e,t,n,i),this.social=new Ee(t,r),this.autoPlay=new H(t,e),this.viewportZoom=new _e(e),this.display=new Q(e),this.contentPreferences=new K(t),this.employee=new te(t,e)}}var ve=n(23577),be=n(35773),Se=n(42068),Ae=n(16283),Ce=n(3596),Te=n(70028);class Ie{cleanActions(){}triggerActions(){}storeAction(){}}var Oe=n(59761);class we{constructor(e){this._cosmos=e}async copy(e){await this._cosmos.put("sp://desktop/v1/clipboard",e)}async paste(){const e=await this._cosmos.get("sp://desktop/v1/clipboard");return e?.data}}var Ne=n(77195),Re=n(92851),Pe=n(81964),Le=n(85515);const De={artist:Re.XU.FOLLOWED_ARTISTS,artistban:Re.XU.BANNED_ARTISTS,ban:Re.XU.BAN,collection:Re.XU.COLLECTION,enhanced:Re.XU.ENHANCED,ignoreinrecs:Re.XU.IGNOREINRECS,listenlater:Re.XU.LISTENLATER,show:Re.XU.SHOW,ylpin:Re.XU.PINNED_YOUR_LIBRARY,prerelease:Re.XU.PRERELEASE,tags:Re.XU.TAGS,markedasfinished:Re.XU.MARKED_AS_FINISHED};class ke{constructor(e){this._service=e,this.cacheBySet=Object.fromEntries(Ne.QZ.map((e=>[e,new Le.GG(6e5,864e5)]))),this.events=new Pe.g(this.subscribeContains.bind(this),this.cacheBySet)}getEvents(){return this.events}async get(e){return(await this._service.get(Re.XI.fromPartial({set:De[e]}))).items}subscribe(e,t){return this._service.streamGet(Re.XI.fromPartial({set:De[e]}),(({items:e})=>{t(e)})).cancel}async add(e,t){await this._service.add(Re.XI.fromPartial({set:De[e],items:t})),this.events.emit(Ne.ar.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){await this._service.remove(Re.XI.fromPartial({set:De[e],items:t})),this.events.emit(Ne.ar.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){const n=await this._service.contains(Re.XI.fromPartial({set:De[e],items:t}));return n.contains?n.contains.found:new Array(t.length).fill(!1)}containsSync(e,t){return this.cacheBySet[e].peek(t)}subscribeContains(e,t,n){if(!t.length)return()=>{};return this._service.streamContains(Re.XI.fromPartial({set:De[e],items:t}),(({contains:e})=>{n(e?e.found:new Array(t.length).fill(!1))})).cancel}}var xe=n(97330),Ue=n(33961);class Me extends Ue.M{_numListeners=0;_subscriptions=[];constructor(e,t){super(),this._cosmos=e,this._endpoints=t,this.onAddListener("message",this.onListenerAdded.bind(this)),this.onRemoveListener("message",this.onListenerRemoved.bind(this))}onListenerAdded(){if(++this._numListeners,0===this._subscriptions.length)for(const e of this._endpoints){const t=this._cosmos.sub(e,(e=>{this.emit("message",e)}),(()=>{}));this._subscriptions.push(t)}}onListenerRemoved(){0==--this._numListeners&&this._subscriptions.length>0&&(this._subscriptions.forEach((e=>e.cancel())),this._subscriptions=[])}}const Be={[n(43004).D.FILTER]:p.AG.MENU_FIELD_FILTER},je=e=>Be[e]??p.AG.MENU_FIELD_UNSPECIFIED;class Fe{constructor(e,t,n){this._cosmos=e,this._updateUiClient=t,this._partnerApiClient=n}async enableMenuItem(e){await this._updateUiClient.updateMenuState({fields:[{field:je(e),enable:!0}]})}async disableMenuItem(e){await this._updateUiClient.updateMenuState({fields:[{field:je(e),enable:!1}]})}async setTitlebarHeight(e){await this._updateUiClient.updateTitlebarHeight({height:e})}async enablePLEEndpoint(){await this._partnerApiClient.enablePartnerApiEndpoint({enable:!0})}async notifyUsableStateReached(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"loaded_initial_state",name:e})}async notifyReadyStateReached(){await this._cosmos.post("sp://messages/v1/container/control",{type:"ready"})}async notifyViewLoaded(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"view_loaded",name:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}getEvents(){return function(e){return new Me(e,["sp://messages/v1/container/control","sp://desktop/v1/navigation"])}(this._cosmos)}}var Ve=n(40892),Ge=n(27731);const He=2**31-1,We=e=>BigInt(Math.round(e/Ge.Zs*He));class ze extends Ve.W{constructor(e,t){super(t),this.prefs=e}subscribeToEnabledState(e){return this.prefs.sub({key:"audio.equalizer_v2"},(t=>{const n=!!t.entries["audio.equalizer_v2"].bool;e(n)})).cancel}setEnabledState(e){this.prefs.set({entries:{"audio.equalizer_v2":{bool:e}}})}async setFilterGain(e,t){await this.prefs.set({entries:{[e]:{number:We(t)}}}),this.filters[this.filters.findIndex((t=>t.key===e))].gain=t}async getFilters(){const e=await Promise.all(this.filters.map((e=>this.prefs.get({key:e.key}))));for(let t=0;t{const n=e.event_sender_context_information;return[(0,et.QI)({version_code:n.client_version_int,version_string:n.client_version_string}),(0,et.ks)(t),(0,et.xB)(n.installation_id),(0,et.es)({device_id:n.device_id,device_manufacturer:n.device_manufacturer,device_model:n.device_model,os_version:n.os_version,platform_type:n.platform_type})]},nt=(e,t,{clientId:n,ownerProvider:i,storagePrefix:r,useInMemoryStorage:s,useOptimizedESS2NA:a})=>(0,et.kE)({transport:t,suppressPersist:false,context:tt(e,n),storage:s?{adapter:new et.ty,flushStrategy:{kind:et.aN.IMMEDIATE}}:void 0,storagePrefix:r,ownerProvider:i,useOptimizedESS2NA:a});async function it(e){return{remote_config_client_id:"desktop-ui",...await e.get("sp://desktop/v1/platform")}}async function rt(e){try{const t=await e.get("sp://remote-config-overrides/v1/values");return g.Vk.fromJSON(t["desktop-ui"]||{})}catch(e){return console.warn(e),g.Vk.builder().build()}}const st=/Spotify\/(?.+)\s/;var at=n(5450);const ot=n(1956).HZ.addMiddleware(at.F);var lt=n(95058),ct=n(7699),ut=n(85907);function dt(e){switch(e){case m.OD.PLATFORM_WIN32:return"Win32";case m.OD.PLATFORM_WIN32_X86_64:return"Win32_x86_64";case m.OD.PLATFORM_WIN32_ARM64:return"Win32_ARM64";case m.OD.PLATFORM_OSX:return"OSX";case m.OD.PLATFORM_OSX_ARM64:return"OSX_ARM64";case m.OD.PLATFORM_LINUX:return"Linux";case m.OD.PLATFORM_UNKNOWN:case m.OD.UNRECOGNIZED:return"Unknown";default:throw(0,ut.k)(e)}}function pt(e){switch(e){case m.tx.CEF_RUNTIME_ALLOY:return"Runtime: Alloy";case m.tx.CEF_RUNTIME_CHROME:return"Runtime: Chrome";case m.tx.CEF_RUNTIME_UNSPECIFIED:case m.tx.UNRECOGNIZED:return"Runtime: Unknown";default:throw(0,ut.k)(e)}}function mt(e){switch(e){case m.KF.BUILD_SYSTEM_BAZEL:return"Build System: Bazel";case m.KF.BUILD_SYSTEM_CMAKE:return"Build System: CMake";case m.KF.BUILD_SYSTEM_UNSPECIFIED:case m.KF.UNRECOGNIZED:return"Build System: Unknown";default:throw(0,ut.k)(e)}}function ht(e){switch(e){case m.nw.BUILD_TYPE_LOCAL:return"(local development)";case m.nw.BUILD_TYPE_PR:return"(pull request)";case m.nw.BUILD_TYPE_MASTER:return"(master)";case m.nw.BUILD_TYPE_RELEASE:return"(release)";case m.nw.BUILD_TYPE_UNSPECIFIED:case m.nw.UNRECOGNIZED:return"(unknown)";default:throw(0,ut.k)(e)}}class ft{constructor(e,t){this._versionClient=e,this._updateClient=t}async getVersionInfo(){const e=await this._versionClient.getVersionInfo({});return{containerVersion:e.version,containerBuildType:ht(e.buildType),containerPlatform:dt(e.platform),uiVersion:"xpui_2025-01-13_1736790015473_5eaa090",cefVersion:e.cefVersion,cefRuntime:pt(e.cefRuntime),buildSystem:mt(e.buildSystemID)}}subscribe(e){return this._updateClient.subscribeStatus({},(t=>{const{state:n,version:i}=t,r=i??"UNKNOWN";switch(n){case d.D9.UPDATE_STATE_PENDING:return e({state:ct.D.UPDATE_AVAILABLE,version:r});case d.D9.UPDATE_STATE_PROCESSING:return e({state:ct.D.UPDATE_PROCESSING,version:r});case d.D9.UPDATE_STATE_READY:return e({state:ct.D.UPDATE_READY,version:r});case d.D9.UPDATE_STATE_UNSPECIFIED:case d.D9.UPDATE_STATE_NONE:case d.D9.UNRECOGNIZED:return e({state:ct.D.UPDATE_NONE,version:null});default:throw(0,ut.k)(n)}}))}async prepareUpdate(){await this._updateClient.triggerDownload(d.qK.fromPartial({}))}async applyUpdate(){await this._updateClient.applyUpdate({})}}var gt=n(32963),Et=n(18190),_t=n(93293),yt=n(7307);async function vt(e,t,n){const i=n.tracks.filter((e=>!!e.uri)).slice(1).map((e=>function(e){return(0,C.U_m)(e.uri)||(0,C.PkR)(e.uri)?{type:yt.c.TRACK,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},isExplicit:"true"===e.metadata.is_explicit,isLocal:"true"===e.metadata.is_local,images:[{url:e.metadata.image_url}],album:{type:yt.c.ALBUM,uri:e.metadata.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},artists:[{type:yt.c.ARTIST,uri:e.metadata.artist_uri??"",name:e.metadata.artist_name??""}],mediaType:"audio",provider:null,uid:null}:(0,C.gHQ)(e.uri)?{type:yt.c.EPISODE,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},images:[{url:e.metadata.image_url}],show:{type:yt.c.SHOW,uri:e.metadata.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},mediaType:"audio",provider:null,uid:null}:null}(e))).filter((e=>null!==e));try{await(0,_t.L)(e,t,i)}catch(e){console.error(e)}return{items:i.map((e=>t.get(e.uri)??e))}}var bt=n(81823),St=n(14636);class At extends bt.I{_subscriptions={[bt.X.UPDATE]:null};constructor(e,t,n){super(),this._loader=t,this._cache=n,this._player=new Et.GD(e)}startListening(){null===this._subscriptions[bt.X.UPDATE]&&(this._subscriptions[bt.X.UPDATE]=this._player.getPlayHistory({},(0,St.s)((async e=>{this.emit(bt.X.UPDATE,await vt(this._loader,this._cache,e))}))(100,true)))}stopListening(){const e=this._subscriptions[bt.X.UPDATE];null!==e&&(e.cancel(),this._subscriptions[bt.X.UPDATE]=null)}}class Ct{_cache=new Le.GG(36e5,3e5);constructor(e,t){this._loader=t,this._player=new Et.GD(e),this._events=new At(e,this._loader,this._cache)}async getContents(){const e=await new Promise((e=>{const t=this._player.getPlayHistory({},(n=>{e(n),t.cancel()}))}));return vt(this._loader,this._cache,e)}getEvents(){return this._events}getCapabilities(){return{isSupported:!0}}}var Tt=n(10168);class It{constructor(e){this._scrobble=e}subscribeToPrivateSession(e){const t=this._scrobble.subIncognitoMode(E.lX.fromPartial({}),(t=>{e(t.incognitoMode)}));return()=>{t.cancel()}}async setPrivateSession(e){await this._scrobble.putIncognitoMode(E.Yz.fromPartial({incognitoMode:e}))}getCapabilities(){return{isSupported:!0}}}var Ot=n(56488),wt=n(95273),Nt=n(74916);class Rt{constructor(e,t){this._productState=e,this._playlistAPI=t}async getReportURL(e,t){const n=(await this._productState.getValues(l.kM.fromPartial({}))).pairs["ugc-abuse-report-url"],i=new URL(n.replace("{uri}",e));return i.searchParams.append("platform","desktop"),i.searchParams.append("version","1.2.55.235.g5eaa0904"),t&&i.searchParams.append("playback_timestamp",""+t/1e3),i.href}isURIReportable(e){return(0,Nt.X)(e)}canReportPlaylist(e,t){return(0,Nt.v)(this._playlistAPI,e,t)}}var Pt=n(10721),Lt=n(64942);function Dt(e){return!!e?.uri}async function kt(e,t){const n=await e.getDisplaySegments(function(e){return Lt.q4.fromPartial({episodeUris:[e],segmentsPolicy:{playback:!0},trackDecorationPolicy:{trackPolicy:{name:!0,length:!0,playable:!0},albumPolicy:{name:!0,link:!0,covers:!0},artistsPolicy:{name:!0,link:!0}},episodeDecorationPolicy:{episodePolicy:{isMusicAndTalk:!0},showDecorationPolicy:{name:!0,link:!0}}})}(t));if(!n||!n.success||!n.episodeSegments)return[];const i=n.episodeSegments.find((e=>e.episodeUri===t));return i?.segments.map((e=>{switch(e.type){case Lt.MI.MUSIC:return function(e){const t=e.startMs??0;if(!e.trackMetadata?.album||!e.trackMetadata.artist)return null;return{type:"MUSIC",uri:e.uri,start:t,stop:e.stopMs,duration:e.stopMs-t,track:{playable:e.trackMetadata.playable,name:e.trackMetadata.name,album:{uri:e.trackMetadata.album.link,name:e.trackMetadata.album.name,image:e.trackMetadata.album.covers?.standardLink||""},artists:e.trackMetadata.artist.map((e=>({uri:e.link,name:e.name})))}}}(e);case Lt.MI.TALK:return function(e){const t=e.startMs??0;if(!e.episodeMetadata?.show)return null;return{type:"TALK",uri:e.uri,start:t,stop:e.stopMs,duration:e.stopMs-t,title:e.title,subtitle:e.subtitle,show:{uri:e.episodeMetadata.show.link,name:e.episodeMetadata.show.name}}}(e);case Lt.MI.UPSELL:case Lt.MI.UNKNOWN:case Lt.MI.UNRECOGNIZED:return null;default:return(0,ut.k)(e.type),null}})).filter(Dt)||[]}class xt{constructor(e){this._client=new Lt.di(e)}getCapabilities(){return{isSupported:!0}}async getSegments(e,t,n){return(await kt(this._client,e)).splice(t,n)}async getArtists(){return await async function(){return[]}()}}var Ut=n(6383),Mt=n(62068),Bt=n(83676),jt=n(90823),Ft=n(36201),Vt=n(69213);class Gt{incognito=!1;constructor(e){this.scrobble=e,this.scrobble.subIncognitoMode(E.lX.fromPartial({}),(e=>{this.incognito=e.incognitoMode}))}isIncognito(){return this.incognito}}class Ht{constructor(e){this.productStateClient=e,this.rules="",this.productStateClient.subValues(l.cF.fromPartial({}),(e=>{this.rules=e.pairs["streaming-rules"]}))}streamingRules(){return this.rules}}var Wt=n(68436);const zt=JSON.parse('{"type":"record","name":"EndVideo","namespace":"com.spotify.Message","doc":"Information about a video played by the client","fields":[{"name":"message_name","type":"string"},{"name":"message_version","type":"int"},{"name":"sequence_number","type":["null","long"],"doc":"Sequence number of message","default":null},{"name":"sequence_id","type":["null","string"],"doc":"Sequence ID the sequence number belongs to. Combined from cache-id and device-id.","default":null},{"name":"video_session_id","type":["null","string"],"doc":"ID of the video playback session","default":null},{"name":"file_id","type":["null","bytes"],"doc":"ID of the video manifest","default":null},{"name":"playback_id","type":["null","bytes"],"doc":"ID of the unique playback","default":null},{"name":"feature_identifier","type":["null","string"],"doc":"The identifier of the feature that started playback","default":null},{"name":"feature_version","type":["null","string"],"doc":"The version of the feature that started playback","default":null},{"name":"view_uri","type":["null","string"],"doc":"The URI of the view that started playback","default":null},{"name":"reason_start","type":["null","string"],"doc":"Why the video was started","default":null},{"name":"reason_end","type":["null","string"],"doc":"Why the video ended (trackdone, trackerror, etc.)","default":null},{"name":"ms_played","type":["null","long"],"doc":"Total milliseconds played, including overlapping time ranges","default":null},{"name":"ms_nominal_played","type":["null","long"],"doc":"Milliseconds played (amount of time that media would have been outputted, if played in 1x speed, nominal time)","default":null},{"name":"ms_total_est","type":["null","long"],"doc":"Duration of the video in milliseconds (constant if VOD, variable if live)","default":null},{"name":"live","type":["null","boolean"],"doc":"Is the video being streamed live?","default":null},{"name":"ms_manifest_latency","type":["null","long"],"doc":"The time it took to fetch the manifest in milliseconds (may be 0 if cached or prefetched)","default":null},{"name":"n_seekback","type":["null","long"],"doc":"Number of times user seeked backwards","default":null},{"name":"ms_seekback","type":["null","long"],"doc":"The total amount of milliseconds jumped when performing seekbacks throughout playback.","default":null},{"name":"n_seekfwd","type":["null","long"],"doc":"Number of times user seeked forwards","default":null},{"name":"ms_seekfwd","type":["null","long"],"doc":"The total amount of milliseconds jumped when performing seek forwards throughout playback.","default":null},{"name":"ms_latency","type":["null","long"],"doc":"Time from initiating video playback to first frame ready to play in milliseconds","default":null},{"name":"ui_latency","type":["null","long"],"doc":"Time from UI interaction to first frame ready to play in milliseconds (may be -1 if not user-initiated)","default":null},{"name":"start_offset_ms","type":["null","long"],"doc":"The offset at which the video started playing in milliseconds","default":null},{"name":"ms_initial_buffering","type":["null","long"],"doc":"Time between first segment load and first frame ready to play in milliseconds","default":null},{"name":"ms_seek_rebuffering","type":["null","long"],"doc":"Total time spent re-buffering from a seek in milliseconds","default":null},{"name":"ms_stalled","type":["null","long"],"doc":"Total time where playback stalled in milliseconds (excluding initial buffering and seek rebuffering)","default":null},{"name":"max_ms_seek_rebuffering","type":["null","long"],"doc":"Maximum time spent re-buffering from a single seek","default":null},{"name":"max_ms_stalled","type":["null","long"],"doc":"Maximum time stalled from a single stall","default":null},{"name":"n_stalls","type":["null","long"],"doc":"Number of times playback was stopped because of empty buffer (excluding initial buffering and seek rebuffering)","default":null},{"name":"shuffle","type":["null","boolean"],"doc":"If playback was initiated while in shuffle mode","default":null},{"name":"max_continous","type":["null","long"],"doc":"Maximum continuous time range played in milliseconds","default":null},{"name":"union_played","type":["null","long"],"doc":"Union of all played time ranges in milliseconds (cannot exceed duration)","default":null},{"name":"play_context","type":["null","string"],"doc":"The context from which this track was played (spotify URI)","default":null},{"name":"audiocodec","type":["null","string"],"doc":"The primarily played audio codec (in RFC6381 notation)","default":null},{"name":"videocodec","type":["null","string"],"doc":"The primarily played video codec (in RFC6381 notation)","default":null},{"name":"play_track","type":["null","string"],"doc":"Spotify URI for the track (ex. spotify:episode:abc)","default":null},{"name":"incognito_mode","type":["null","boolean"],"doc":"Whether playback was initiated in incognito mode","default":null},{"name":"provider","type":["null","string"],"doc":"The playback rule that provided the video, e.g., \\"mft/inject_random_track\\" or \\"queue\\"","default":null},{"name":"referrer","type":["null","string"],"doc":"Either a remote site or a spotify app which initiated the request","default":null},{"name":"referrer_version","type":["null","string"],"doc":"The version of the referrer, where applicable","default":null},{"name":"referrer_vendor","type":["null","string"],"doc":"The vendor of the referrer, where applicable","default":null},{"name":"streaming_rule","type":["null","string"],"doc":"The streaming rule in effect for this track","default":null},{"name":"gaia_dev_id","type":["null","string"],"doc":"Remote control that started the playback. Same as \\"dev-id\\" in \\"Gaia\\" messages sent by that device. \\"none\\" if non-Gaia playback.","default":null},{"name":"start_bitrate","type":["null","long"],"doc":"Bitrate at which playback started (bits/s)","default":null},{"name":"full_screen","type":["null","long"],"doc":"Milliseconds played while video is in a modal or fullscreen state","default":null},{"name":"time_weighted_bitrate","type":["null","long"],"doc":"Average bitrate weighted by the amount of time video played at each bitrate","default":null},{"name":"prefetched_bytes","type":["null","long"],"doc":"Total number of bytes prefetched for the selected content","default":null},{"name":"prefetched_bytes_loaded","type":["null","long"],"doc":"Total number of prefetched bytes played back","default":null},{"name":"key_system","type":["null","string"],"doc":"The DRM key system","default":null},{"name":"ms_key_latency","type":["null","long"],"doc":"The time it took to fetch and install the DRM key in milliseconds.","default":null},{"name":"total_bytes","type":["null","long"],"doc":"The total segment bytes downloaded","default":null},{"name":"local_time_ms","type":["null","long"],"doc":"The local time at which playback was initiated (Unix timestamp in milliseconds)","default":null},{"name":"connection_type_start","type":["null","string"],"doc":"connection type (i.e. wifi, 3G) at the start of the stream","default":null},{"name":"connection_type_end","type":["null","string"],"doc":"connection type (i.e. wifi, 3G) at the end of the stream","default":null},{"name":"ms_played_background","type":["null","long"],"doc":"Milliseconds played in background (audio-only). Always subset of ms-played.","default":null},{"name":"page_instance_id","type":["null","string"],"doc":"ID of the page where the user triggered this video to play.","default":null},{"name":"interaction_id","type":["null","string"],"doc":"ID of the interaction that triggered this video to play.","default":null},{"name":"core_version","type":"long","doc":"The core version this message was sent from in the form of xxxxyyyyzzzzwwwwwww (major, minor, micro, tiny)","default":0},{"name":"ms_played_video","type":["null","long"],"doc":"Milliseconds played with video rendering enabled, in wall-clock time. Always a subset of ms-played.","default":null},{"name":"feature_uuid","type":["null","string"],"doc":"UUID of a feature that uniquely identifies the feature.","default":null},{"name":"media_type","type":["null","string"],"doc":"The media type of content played, e.g. video or audio","default":null},{"name":"decision_id","type":["null","string"],"doc":"Identifier for the decision to add the track to the played context. Used to identify recommendations and join with external datasets containing decision related data.","default":null},{"name":"play_context_decision_id","type":["null","string"],"doc":"Same as decision_id, but for the played context. E.g. a decision that was made to add the card for the played playlist in Home section.","default":null}],"schema_version":17}');var Kt=n(84686).hp;function Yt({type:e,name:t},n){if(Array.isArray(e)){const i=n[t];if(null===i)return;n[t]={};const r=e.filter((e=>"null"!==e))[0];"object"==typeof r?(n[t]={[r.type]:i},Yt(r,n[t])):n[t][r]="bytes"===r?Kt.from(i):i}else"bytes"===e&&(n[t]=Kt.from(n[t]))}function qt(e,t){const n=t.message_name,i=t.message_version,r=Object.assign({},t);if(i!==e.schema_version)throw new Error(`Invalid message version: received Message with message_version ${i} but the Schema requires version ${e.schema_version}`);return{message:n,version:i,fields:e.fields.map((e=>{const t=r[e.name];return void 0===t?e.default:(Yt(e,r),t)})).slice(2)}}var $t=n(65645),Zt=n(45695);const Qt=(0,Zt.h)();const Jt={schema:zt,create:function({name:e,schema_version:t},n){const i={message_name:e,version:t};Qt.post("sp://logging/v3/create_pending_message",i).then((e=>{e.sequence_number?e.sequence_id?n(null,e.sequence_number,e.sequence_id):n(new Error("pendingLog: sequence_id not present"),null):n(new Error("pendingLog: sequence_number not present"),null)})).catch((e=>{(0,$t.v)("create error",e,i),n(e,null)}))}.bind(null,zt),update:function(e,t,n,i){const r=function(e,t){const n=qt(e,Object.assign({},{message_name:e.name,message_version:e.schema_version},t));return n.fields=n.fields.map((e=>"string"==typeof e?e:null===e?"":JSON.stringify(e))),n}(e,n);r.sequence_number=t,Qt.post("sp://logging/v3/update_pending_message",r).then((()=>{i(null)})).catch((e=>{(0,$t.v)("update error",e,r),i(e)}))}.bind(null,zt),send:function({name:e},t){const n={sequence_number:t,message_name:e};Qt.post("sp://logging/v3/send_pending_message",n).catch((e=>{(0,$t.v)("send error",e,n)}))}.bind(null,zt)};var Xt=n(62478),en=n(43329);const tn="video.subtitles";class nn{_hasSubtitleSupport=!1;_hasMinimizeBitrateSupport=!1;_hasPipSupport=!1;_events=new Wt.p;_subtitleLanguages=[];_pictureInPictureState=!1;_videoCoordinator=null;_offlineCoordinator=null;constructor(e,t,n,i,r,s,a,o,l,c,u,d,p){this._cosmos=e,this._showService=t,this._productStateService=n,this._scrobbleService=i,this._playbackService=r,this._pendingEventsService=s,this._prefsClient=a,this._resolver=o,this._eventSender=l,this._factories=c,this._esperantoTransport=u,this._failPlaybackOnStreamingReportingError=d,this._shouldEnableStreamReportingTracker=p,this.initialize()}async initialize(){Mt.Mw.installAll(),this._hasSubtitleSupport=this._resolver.getValue(en.H_),this._hasMinimizeBitrateSupport=this._resolver.getValue(en.CN),this._hasPipSupport=this._resolver.getValue(en.Cn);const e=await this.createPlayerConfiguration();[this._videoCoordinator,this._offlineCoordinator]=await Promise.all([this.createVideoCoordinator(e),this.createOfflineCoordinator(e)])}async createPlayerConfiguration(){const e=this._resolver.getValue(en.vq),t=this._resolver.getValue(en.H_),n=this._resolver.getValue(en.Wm),i=this._resolver.getValue(en.jY),r=this._resolver.getValue(en.d8),s=this._resolver.getValue(en.tF),a=this._resolver.getValue(en.vr),o=this._resolver.getValue(en.kA),l=this._resolver.getValue(en.yf),c=this._resolver.getValue(en.Vi),u=this._resolver.getValue(en.cc),d=this._resolver.getValue(en.S3);return{containerElementClass:"VideoPlayer__container",streaming:{rebufferingGoal:r,autoplayVideoOnLoad:l},adaptiveBitrate:{initialLowBitrate:c,surfaceBasedResolutionCap:u,maxBitrate:0===d?void 0:d},drm:{vmpEnabled:a},subtitles:{enabled:t},offline:{enabled:e,targetBitrate:n},retry:{attempts:s},minimizeBitrate:{bufferMargin:o},experimental:{filterNegativeDuration:this._resolver.getValue(en.iL),autoSeekToBufferedStartPositionOnLoad:this._resolver.getValue(en.zu),showDebugOverlay:this._resolver.getValue(en.QP)},analytics:{mux:{enabled:i,token:"2qbjhhcl4u87btjbo7dh8vi2n",appName:"Desktop-X",playerName:"betamax-player-desktop-x"}}}}async getAccessToken(){return this._cosmos.get("sp://oauth/v2/token")}async getProductState(){return this._productStateService.getValues(l.kM.fromPartial({})).then((e=>{const t={"video-manifest-url":"","streaming-rules":"","widevine-license-url":""};return e.pairs["video-manifest-url"]&&(t["video-manifest-url"]=e.pairs["video-manifest-url"]),e.pairs["streaming-rules"]&&(t["streaming-rules"]=e.pairs["streaming-rules"]),e.pairs["widevine-license-url"]&&(t["widevine-license-url"]=e.pairs["widevine-license-url"]),t}))}async createVideoCoordinator(e){const t={videoOnVideoSaiEnabled:this._resolver.getValue(en.Yw)},n=this._resolver.getValue(en.o4),i=this._resolver.getValue(en.gW),r=this._resolver.getValue(en.jO),s=this.getAccessToken.bind(this),a=this._productStateService,o=this._scrobbleService,c=this._playbackService,u=this._pendingEventsService,d={factories:[()=>this,...this._factories]},p=this._resolver.getValue(en.Sd),m=this._resolver.getValue(en.XV),h=this._resolver.getValue(en.Br),f=await this.getProductState(),g={ads:t,playerConfiguration:e,boomboxAudioSync:p,cosmos:this._cosmos,eventSenderProvider:()=>Promise.resolve(this._eventSender),endVideoLogger:Jt,getToken:s,playerDependencies:d,productState:f,productStateService:a,widevineVersionSupported:n,scrobbleService:o,playbackService:c,pendingEventsService:u,playerPool:{enabled:m,size:h},logging:{usePendingStorage:i},experimental:{seekToAd:r}},_=new Bt.N(g),y=[];if(this._shouldEnableStreamReportingTracker){const e=(0,jt.d)(this._esperantoTransport,function(e){const t=new Ht(new l.EW(e)),n=new Gt(new E.aA(e));return{streamingRules:()=>t.streamingRules(),isIncognito:()=>n.isIncognito()}}(this._esperantoTransport),this._eventSender,_,this._failPlaybackOnStreamingReportingError);y.push(e)}if(this._resolver.getValue(en.M4)){const e=(0,Xt.V)();return new Vt.e({...g,transport:e,platform_identifier:"desktop-app-video-core"})}return await _.initialize(y),_}async createOfflineCoordinator(e){const t={cosmos:this._cosmos,productState:await this.getProductState(),playerConfiguration:e,networkConfiguration:{getAuthorizationHeader:async()=>{const{accessToken:e,tokenType:t}=await this.getAccessToken();return`${t} ${e}`}},show_service:this._showService},n=new Ft.Y(t);return n.initialize(),n}onManifestLoaded({availableSubtitles:e}){const t=e.map((e=>e.languageTag));this.setSubtitleLanguages(t)}onPictureInPictureChanged({pictureInPicture:e}){this._pictureInPictureState=e,this._events.emit(Wt.S.PICTURE_IN_PICTURE_CHANGED,e)}getPictureInPictureState(){return this._pictureInPictureState}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(Wt.S.SUBTITLE_LANGUAGES_CHANGED,e)}getCapabilities(){return{hasSubtitleSupport:this._hasSubtitleSupport,hasMinimizeBitrateSupport:this._hasMinimizeBitrateSupport,hasPipSupport:this._hasPipSupport}}getEvents(){return this._events}async getSubtitleLanguages(){return this._subtitleLanguages}async getPreferredSubtitleLanguage(){try{const{entries:e}=await this._prefsClient.get({key:tn}),t=e[tn]?.string;return t&&t.length>0?t:null}catch(e){return null}}async setPreferredSubtitleLanguage(e){await this._prefsClient.set({entries:{[tn]:{string:e??""},"video.subtitles_cc":{bool:e?.endsWith("-cc")??!1}}})}reportVideoMode(e){this._videoCoordinator?.reportSurface(this.videoModeToSurface(e))}videoModeToSurface(e){return"npv"===e?"now-playing-view":"nowPlayingBar"===e?"now-playing-bar":"pip"===e||"documentPip"===e?"picture-in-picture":"none"!==e?"cinemaLegacy"===e?"cinema":e:void 0}setMinimizeBitrate(e){this._videoCoordinator?.setMinimizeBitrate(e)}setFullscreen(e){this._videoCoordinator?.setFullscreen(e)}setPip(e){return this._videoCoordinator?.setPip(e)??Promise.resolve(null)}setWindow(e){this._videoCoordinator?.setWindow(e)}}var rn=n(23613);class sn{constructor(e){this.zoomEsperanto=e}async getZoomLevel(){return(await this.zoomEsperanto.getZoomLevel({})).zoomLevel}setZoomLevel(e){this.zoomEsperanto.setZoomLevel({zoomLevel:e})}zoomIn(){this.zoomEsperanto.zoomIn({})}zoomOut(){this.zoomEsperanto.zoomOut({})}getCapabilities(){return{canGetZoomLevel:!0,canSetZoomLevel:!0,canZoomIn:!0,canZoomOut:!0}}}var an=n(49645),on=n(38501),ln=n(1599),cn=n(69962),un=n(92443),dn=n(2539),pn=n(76730);const mn=e=>{switch(e){case dn.FI.TERMINAL_TYPE_DISPLAY_DEVICE:return un.FI.DISPLAY_DEVICE;case dn.FI.TERMINAL_TYPE_HEADPHONES:return un.FI.HEADPHONES;case dn.FI.TERMINAL_TYPE_SPEAKERS:return un.FI.SPEAKERS;case dn.FI.TERMINAL_TYPE_UNKNOWN:case dn.FI.TERMINAL_TYPE_UNSPECIFIED:case dn.FI.UNRECOGNIZED:default:return un.FI.UNKNOWN}},hn=e=>{switch(e){case dn.Yg.TRANSPORT_TYPE_BLUETOOTH:return un.Yg.BLUETOOTH;case dn.Yg.TRANSPORT_TYPE_BUILT_IN:return un.Yg.BUILT_IN;case dn.Yg.TRANSPORT_TYPE_DISPLAY_DEVICE:return un.Yg.DISPLAY_DEVICE;case dn.Yg.TRANSPORT_TYPE_USB:return un.Yg.USB;case dn.Yg.TRANSPORT_TYPE_VIRTUAL:return un.Yg.VIRTUAL;case dn.Yg.TRANSPORT_TYPE_AIRPLAY:return un.Yg.AIRPLAY;case dn.Yg.TRANSPORT_TYPE_UNKNOWN:case dn.Yg.TRANSPORT_TYPE_UNSPECIFIED:case dn.Yg.UNRECOGNIZED:default:return un.Yg.UNKNOWN}};class fn{devices=[];constructor(e){this._audioObserver=e,this._events=new pn.e,this._audioObserver.getAudioOutputDevices({},(async e=>{this.devices=e.devices.map((e=>(e=>({id:e.id,name:e.name,fullName:e.fullName,terminalType:mn(e.terminalType),transportType:hn(e.transportType),isDefaultDevice:e.isDefaultDevice}))(e))),this._events.emit(pn.B.DEVICE_CONNECTED,{})}))}getDefaultDevice(){return this.devices.find((e=>e.isDefaultDevice))||null}getDevices(){return this.devices}getEvents(){return this._events}}var gn=n(53460),En=n(73388),_n=n(99887),yn=n(59426);function vn(e){return!1===navigator.onLine?{...e,explanation:(0,yn.i)()}:e}class bn extends _n.r{_status=null;constructor(e,t,n,i,r){super(e,t,n,r),function(e,t,n){let i=!0;e.observeCapStateChanged({feature:En.Xj.AUDIOBOOKS},(async({isCapped:e})=>{if(i)i=!1;else if(e){const e=await t.fetch();n({isCapped:!0,explanation:e})}else n({isCapped:!1,explanation:null})}))}(i,this._fetcher,(e=>{this._status=e,this.onUpdateCapping(vn(this._status))}));const s=()=>{null!==this._status&&this.onUpdateCapping(vn(this._status))};window.addEventListener("online",s),window.addEventListener("offline",s)}getCappingStatus(e){return null!==this._status?vn(this._status):super.getCappingStatus(e)}}var Sn=n(495),An=n(49042),Cn=n(30561),Tn=n(64758),In=n(47547),On=n(36285);const wn="isTokenUnavailable",Nn={baseTime:200,ceiling:9e5,curve:"exponential",jitter:!0},Rn=(0,On.u)("AuthorizationPlugin");class Pn{name="desktop-lifecycle-plugin";_authCounter=new Tn.p(Nn);_authAttempts=0;_authTimeoutId=null;_transport=null;_onAuthenticationFailed=[];constructor(){this.onConnected=this.onConnected.bind(this),this.onDisconnected=this.onDisconnected.bind(this),this.onAuthenticated=this.onAuthenticated.bind(this),this.onAuthenticationFailed=this.onAuthenticationFailed.bind(this),this.onBeforeProcessRequest=this.onBeforeProcessRequest.bind(this),this.onBeforeSendRequest=this.onBeforeSendRequest.bind(this)}addOnAuthenticationFailed(e){this._onAuthenticationFailed.push(e)}tryAuthenticate(){null===this._transport||this._transport.isAuthenticated()||(null!==this._authTimeoutId&&(window.clearTimeout(this._authTimeoutId),this._authTimeoutId=null),this._transport.authenticate())}onConnected(){null===this._transport||this._transport.isAuthenticated()||this._transport.authenticate()}onDisconnected(){null!==this._transport&&this._transport.connect()}onAuthenticated(){this._authAttempts=0}onAuthenticationFailed(){this._authAttempts++;const e=this._authCounter.getTime(this._authAttempts),t=new Date(Date.now()+e);this._onAuthenticationFailed.forEach((e=>e(this._authAttempts,t))),console.log("Transport authentication failed, retrying in %.2d seconds...",e/1e3),this._authTimeoutId=window.setTimeout((()=>{this._authTimeoutId=null,null!==this._transport&&this._transport.authenticate()}),e)}onBeforeProcessRequest(e){if(null===this._transport)return;const{data:t}=e,n=t.options?.metadata?.noRequestTransform;if(n)return;if(this._transport.isAuthenticated())return;this._authAttempts>0&&(t.options?.authorize&&(t.context[wn]=!0),t.options=(0,In.K)(t.options,{authorize:!1}))}onBeforeSendRequest(e){if(e.data.context[wn])throw new Error("Token is currently unavailable.")}attach(e,t){this._transport=e,e.addListener(Cn.TransportEvent.CONNECTED,this.onConnected),e.addListener(Cn.TransportEvent.DISCONNECTED,this.onDisconnected),e.addListener(Cn.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.addListener(Cn.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.addListener(Cn.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.addListener(Cn.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}detach(e,t){this._transport=null,e.removeListener(Cn.TransportEvent.CONNECTED,this.onConnected),e.removeListener(Cn.TransportEvent.DISCONNECTED,this.onDisconnected),e.removeListener(Cn.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.removeListener(Cn.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.removeListener(Cn.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.removeListener(Cn.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}}var Ln=n(51337),Dn=n(40731),kn=n(67781);class xn{_state=Dn.h;constructor(e,t,n,i){this._cosmos=e,this._tokenProvider=t,this._authorizationPlugin=n,this._events=i,this.onTokenChanged=this.onTokenChanged.bind(this),this.onAuthenticationFailed=this.onAuthenticationFailed.bind(this),this._tokenProvider.addOnTokenChanged(this.onTokenChanged),this._authorizationPlugin.addOnAuthenticationFailed(this.onAuthenticationFailed)}onTokenChanged(e){this._state={isAuthorized:null!==e&&!(0,kn.H)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(Ln.m.UPDATE,this._state)}onAuthenticationFailed(e,t){this._state={isAuthorized:!1,token:null,retryAttempt:e,retryAt:t},this._events.emit(Ln.m.UPDATE,this._state)}getCapabilities(){return{canGetSessionTransferURL:!0}}getEvents(){return this._events}getState(){return this._state}tryAuthorize(){this._authorizationPlugin.tryAuthenticate()}async getSessionTransferURL(e){const{accessToken:t}=await this._cosmos.get(`sp://auth/v1/session_transfer_token?url=${encodeURIComponent(e)}`);return`https://accounts.spotify.com/login/ott/v2#token=${encodeURIComponent(t)}`}}var Un=n(51736);class Mn extends Un.w{constructor(e){super(),this._cosmos=e}async loadToken(){try{const e=await this._cosmos.get("sp://oauth/v2/token");return function(e){return Object.prototype.hasOwnProperty.call(e,"error")}(e)?null:{accessToken:e.accessToken,accessTokenExpirationTimestampMs:e.expiresAtTime,isAnonymous:!1}}catch(e){return null}}}var Bn=n(66281),jn=n(35290),Fn=n(59640),Vn=n(22871),Gn=n(89088),Hn=n(78736),Wn=n(62642);function zn(e){switch(e){case"computer":return Wn.bq.COMPUTER;case"tablet":return Wn.bq.TABLET;case"smartphone":return Wn.bq.SMARTPHONE;case"speaker":return Wn.bq.SPEAKER;case"tv":return Wn.bq.TV;case"avr":return Wn.bq.AVR;case"stb":return Wn.bq.STB;case"audio_dongle":return Wn.bq.AUDIO_DONGLE;case"game_console":return Wn.bq.GAME_CONSOLE;case"cast_video":return Wn.bq.CAST_VIDEO;case"cast_audio":return Wn.bq.CAST_AUDIO;case"automobile":return Wn.bq.AUTOMOBILE;case"smartwatch":return Wn.bq.SMARTWATCH;case"chromebook":return Wn.bq.CHROMEBOOK;case"carthing":return Wn.bq.CarThing;case"homething":return Wn.bq.HomeThing;default:return Wn.bq.UNKNOWN}}function Kn(e){switch(e){case"incompatible":return Wn.bU.INCOMPATIBLE;case"unavailable":return Wn.bU.UNAVAILABLE;case"premium_required":return Wn.bU.PREMIUM_REQUIRED;case"not_installed":return Wn.bU.NOT_INSTALLED;case"unsupported_uri":return Wn.bU.UNSUPPORTED_URI;case"not_authorized":return Wn.bU.NOT_AUTHORIZED;case"ad_playing":return Wn.bU.AD_PLAYING;case"narration":return Wn.bU.NARRATION;case"waking_up":return Wn.bU.WAKING_UP;case"timed_out_wakeup":return Wn.bU.TIMED_OUT_WAKEUP;default:return}}function Yn(e){switch(e){case"connecting":return Wn.gX.CONNECTING;case"logged_in":return Wn.gX.LOGGED_IN;case"not_logged_in":return Wn.gX.NOT_LOGGED_IN;case"sleeping":return Wn.gX.SLEEPING;case"not_loaded":return Wn.gX.NOT_LOADED;case"unknown":return Wn.gX.UNKNOWN;default:return Kn(e)}}const qn=65535;function $n(e){switch(e){case s.Gb.CAST:return"cast";case s.Gb.CONNECT:return"connect";default:return"unrecognized"}}function Zn(e){const t=[];let n;for(const i of e){const e=$n(i.loginType);(0,Wn.Ts)(e)&&(t.push(e),i.preferred&&(n=e))}return{preferred:n,available:t}}function Qn(e){const{localIdentifier:t,connectStateIdentifier:n,name:i,type:r,isGroup:s,isSelf:a,isActive:o,isBeingActivated:l,isDisabled:c,volume:u,hifi:d,brandDisplayName:p,modelDisplayName:m,license:h,state:f,isLocal:g,isZeroconf:E,isWebapp:_,supportsLogout:y,incarnations:v,supportsDj:b,supportedMediaTypes:S}=e;return{id:t,connectStateId:n,name:i??"",type:zn(r),isGroup:s,isLocal:a,isActive:o,isConnecting:l,isDisabled:c,disabledReason:Kn(f),volume:u/qn,losslessSupport:{fullySupported:!!d?.fullySupported,deviceSupported:!!d?.deviceSupported,userEligible:!!d?.userEligible},brandDisplayName:p,modelDisplayName:m,license:h,currentState:Yn(f),isLocalNetwork:g,isZeroconf:E,isWebApp:_,supportsLogout:(C=a,T=y,I=p,O=m,!C&&("spotify"!==I||"web_player"!==O&&"mobile_web_player"!==O)&&T),incarnation:v?Zn(v):void 0,supportsDJNarration:b,supportedMediaTypes:(A=S,A?A.reduce(((e,t)=>{const[n,i]=t.split("/");switch(n){case"audio":e.add(Wn.Bd.Audio);break;case"video":e.add(Wn.Bd.Video);break;case"mixed":e.add(Wn.Bd.Mixed)}return e}),new Set):null)};var A,C,T,I,O}function Jn(e,t){return t?Wn.zP.CONNECTING:e&&!e.isLocal?Wn.zP.CONNECTED:Wn.zP.NOT_CONNECTED}function Xn(e){return{success:e.status===s.nW.OK}}class ei extends Hn.a{constructor(e){super(),this.connectServiceClient=e,this.connectServiceClient.state(s.d1.fromPartial({includeLocalDevice:!0,showOfflineDevicesInCore:!0,showOfflineAmazonDevicesAsOnline:!0}),(({devices:e})=>{e&&e.length>0&&this.emit(Hn.P.UPDATE,function(e){let t;t=e?e.map(Qn):[];let n=t.find((e=>e.isActive));if(!n){const e=t.findIndex((e=>e.isLocal));-1!==e&&(n={...t[e],isActive:!0},t[e]=n)}const i=t.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:Jn(n,i),activeDevice:n??null,connectingDevice:i??null,devices:t}}(e))}))}}class ti{state=null;constructor(e){this.connectServiceClient=e,this.events=new ei(this.connectServiceClient),this.events.addListener(Hn.P.UPDATE,(({data:e})=>{this.state=e})),this.initiateLocalDiscovery()}getCapabilities(){return{supportsLocalDiscovery:!0}}getState(){return this.state}getEvents(){return this.events}async initiateLocalDiscovery(){await this.connectServiceClient.performDiscovery({})}async updateListOfDevices(){await Promise.all([this.connectServiceClient.performDiscovery({}),this.connectServiceClient.refreshCluster({}),this.connectServiceClient.wakeSleepingClusterDevices({})])}createLoggingParams(e){return s.OU.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}async pullToLocal(e){await this.connectServiceClient.pull(s.B9.fromPartial({loggingParams:this.createLoggingParams(e)}))}async transferToRemote(e,t){await this.connectServiceClient.transfer(s.f6.fromPartial({connectDeviceIdentifier:e,loggingParams:this.createLoggingParams(t)}))}async transferPlayback(e,t){await("local_device"===e?this.pullToLocal(t):this.transferToRemote(e,t))}checkDeviceId=e=>{if(0===e.length)throw new Error("missing device id")};async logout(e){this.checkDeviceId(e);return Xn(await this.connectServiceClient.logout(s.yE.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?s.Gb.CAST:"connect"===e?s.Gb.CONNECT:s.Gb.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const n=this.mapIncarnationToLoginType(t);return Xn(await this.connectServiceClient.setPreferredZeroconf(s.B0.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:n})))}}class ni{constructor(e){this.connectServiceClient=e}checkDeviceId=e=>{if(0===e.length)throw new Error("missing device id")};async logout(e){this.checkDeviceId(e);return Xn(await this.connectServiceClient.logout(s.yE.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?s.Gb.CAST:"connect"===e?s.Gb.CONNECT:s.Gb.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const n=this.mapIncarnationToLoginType(t);return Xn(await this.connectServiceClient.setPreferredZeroconf(s.B0.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:n})))}}class ii{state=null;constructor(e,t){this.events=e,this.connectRestrictor=t,this.events.addListener(Hn.P.UPDATE,(({data:e})=>{if(t&&null!==e){const n=t.updateRestrictedListOfDevices(e.devices??[]);this.state={...e,devices:n}}else this.state=e}))}getConnectState(){return this.state}getActiveDevice(){return this.state?.activeDevice??null}getDevices(){return this.state?.devices??[]}getEvents(){return this.events}}class ri{constructor(e){this.connectServiceClient=e}async startActiveDiscovery(){await Promise.all([this.connectServiceClient.performDiscovery({}),this.connectServiceClient.refreshCluster({}),this.connectServiceClient.wakeSleepingClusterDevices({})])}}class si{constructor(e){this.connectServiceClient=e}async pullToLocalDevice(e){await this.connectServiceClient.pull(s.B9.fromPartial({loggingParams:this.createLoggingParams(e)}))}async transferPlayback(e,t){await("local_device"===e?this.pullToLocalDevice(t):this.transferToRemote(e,t))}async transferToRemote(e,t){await this.connectServiceClient.transfer(s.f6.fromPartial({connectDeviceIdentifier:e,loggingParams:this.createLoggingParams(t)}))}createLoggingParams(e){return s.OU.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}}var ai=n(20442),oi=n(11408),li=n(9401),ci=n(82585),ui=n(63021);function di(e){const t=(0,C.o_h)(e);return t?.type===C.NQG.COLLECTION&&(void 0===t.category||"tracks"===t.category)}var pi=n(93004),mi=n(20817);function hi(e){return di(e)||e===pi.DK?mi.BP:e}var fi=n(32781),gi=n(58752);class Ei{_events=new gi.E;constructor(e,t,n){this._playbackSettingsClient=e,this._localContextualShuffle=t,this._pubSubAPI=n,(0,fi.Q)(this._pubSubAPI,((e,t)=>{this._events.emitUpdateContextualShuffleModeSync(e,t),this._events.emitUpdateContextualShuffleModeCompleteSync(e,t)}))}async getContextualShuffleMode(e){const t=hi(e),{shuffle:n,contextEnhancement:i}=await this._playbackSettingsClient.getShuffleState({value:t});if(void 0===n&&void 0===i){const n=await this._localContextualShuffle.getContextualShuffleMode(e);if(n===ci.j.ON||n===ci.j.SMART_SHUFFLE)return this._playbackSettingsClient.setShuffleState({id:t,shuffleOn:!0,contextEnhancement:n===ci.j.SMART_SHUFFLE?ui.W.RECOMMENDATION:ui.W.NOT_ENHANCED}),n}return n&&i===ui.W.RECOMMENDATION?ci.j.SMART_SHUFFLE:n?ci.j.ON:ci.j.OFF}async setContextualShuffleMode(e,t){if(!this._events.emitUpdateContextualShuffleModeSync(e,t)){try{await this._playbackSettingsClient.setShuffleState({id:hi(e),shuffleOn:t!==ci.j.OFF,contextEnhancement:t===ci.j.SMART_SHUFFLE?ui.W.RECOMMENDATION:ui.W.NOT_ENHANCED})}catch(n){throw this._events.emitUpdateContextualShuffleModeErrorSync(e,t),n}this._events.emitUpdateContextualShuffleModeCompleteSync(e,t)}}getEvents(){return this._events}}var _i=n(77655);const yi="sp://internal/v1/latest_messages";function vi(e){n.g.window.getCosmosMessages||(n.g.window.getCosmosMessages=()=>async function(e){return await e.get(yi)??[]}(e))}var bi=n(45917),Si=n(60217),Ai=n(8732),Ci=n(59593);class Ti extends Ci.s{streamIsCuratedCancellable=null;constructor(e,t){super(t),this._your_library=e}async onCuratedBatchChanged(e){if(null!==this.streamIsCuratedCancellable&&this.streamIsCuratedCancellable.cancel(),0===e.size)return;const t=Array.from(e.keys());this.streamIsCuratedCancellable=this._your_library.streamIsCurated({uri:t,updateThrottling:0,contextUri:""},(e=>{this.emitUpdateCuratedItems(t,e.item.map((e=>e.isCurated)))}))}}var Ii=n(61207);var Oi=n(31567),wi=n(21364);function Ni(e){const t=(0,C.o_h)(e);if(t?.type===C.NQG.FOLDER)return BigInt(wi.A.fromString(t.id,!0,16).toString(10))}function Ri(e){return{likedSongs:e?.includeLikedSongs?{label:v.Ru.get("shared.library.entity-row.liked-songs.title"),image:"https://misc.scdn.co/liked-songs/liked-songs-300.jpg",includeEmpty:!1}:void 0,yourEpisodes:e?.includeYourEpisodes?{label:v.Ru.get("shared.library.entity-row.your-episodes.title"),image:"https://misc.spotifycdn.com/your-episodes/SE-300.jpg",includeEmpty:!1}:void 0,localFiles:e?.includeLocalFiles?{image:"",label:v.Ru.get("shared.library.entity-row.local-files.title"),includeEmpty:!1}:void 0,cachedFiles:void 0,newEpisodes:void 0,yourHighlights:!1,allAvailableConfigsProvided:"boolean"==typeof e?.includeLikedSongs&&"boolean"==typeof e?.includeYourEpisodes&&"boolean"==typeof e?.includeLocalFiles}}var Pi=n(59029),Li=n(72051),Di=n(69662),ki=n(66556),xi=n(82550),Ui=n(40537),Mi=n(98538),Bi=n(73647),ji=n(90795),Fi=n(69030),Vi=n(79561),Gi=n(49182),Hi=n(81001),Wi=n(689),zi=n(57161),Ki=n(77614),Yi=n(68995),qi=n(26924),$i=n(48427),Zi=n(65008),Qi=n(27051),Ji=n(56258),Xi=n(19002),er=n(28983),tr=n(13589),nr=n(69247),ir=n(93155),rr=n(1178),sr=n(77081),ar=n(62899);function or(e){const t={};return e.forEach((e=>{switch(e.extensionKind){case Di.UH.PODCAST_SUBSCRIPTIONS:t.podcastSubscription=ki.UE.decode(e.data);break;case Di.UH.SHOW_ACCESS:t.showAccess=xi.Cb.decode(e.data);break;case Di.UH.SHOW_V4:t.showV4=zi.wv.decode(e.data);break;case Di.UH.PLAYABILITY:t.playability=Ki.NX.decode(e.data);break;case Di.UH.COVER_IMAGE:t.coverImage=Yi.DN.decode(e.data);break;case Di.UH.AUDIOBOOK_GENRE:t.audiobookGenres=qi.IH.decode(e.data);break;case Di.UH.AUDIOBOOK_SPECIFICS:t.audiobookSpecifics=Ui.N0.decode(e.data);break;case Di.UH.PODCAST_TOPICS:t.podcastTopics=Bi.BV.decode(e.data);break;case Di.UH.PODCAST_SEGMENTS:t.podcastSegments=ji.HP.decode(e.data);break;case Di.UH.HTML_DESCRIPTION:t.htmlDescription=Bi.sL.decode(e.data);break;case Di.UH.PODCAST_RATING:t.rating=Vi.a9.decode(e.data);break;case Di.UH.CONTENT_WARNING:t.contentInformation=Mi.r.decode(e.data);break;case Di.UH.EPISODE_TRANSCRIPTS:t.transcripts=Fi.YT.decode(e.data);break;case Di.UH.AUDIOBOOK_PRICE:t.audiobookPrice=Hi.ZC.decode(e.data);break;case Di.UH.SMART_SHUFFLE:t.smartShuffle=Wi.J.decode(e.data);break;case Di.UH.AUDIOBOOK_RELATIONS:t.audiobookRelation=$i.kL.decode(e.data);break;case Di.UH.VIDEO_ASSOCIATIONS:t.videoAssociations=Zi.KY.decode(e.data);break;case Di.UH.PRERELEASE:t.prerelease=Gi.r6.decode(e.data);break;case Di.UH.PLAYLIST_TUNER:t.playlistTuner=Qi.gu.decode(e.data);break;case Di.UH.CONCEPT:t.concept=Ji.ji.decode(e.data);break;case Di.UH.TRACK_V4:t.track=Xi.CC.decode(e.data);break;case Di.UH.LIST_TUNER_AUDIO_ANALYSIS:t.listTunerAudioAnalysis=er.$.decode(e.data);break;case Di.UH.LIST_TUNER_CUEPOINTS:t.listTunerCuepoints=tr.jf.decode(e.data);break;case Di.UH.GATED_ENTITY_RELATIONS:t.gatedEntityRelations=nr.gy.decode(e.data);break;case Di.UH.ROOTLISTABILITY_TRAIT:t.rootlistabilityTrait=ir.n.decode(e.data);break;case Di.UH.AUTO_LENS:t.autoLens=rr.K.decode(e.data);break;case Di.UH.VISUAL_IDENTITY_TRAIT:t.visualIdentityTrait=sr.L.decode(e.data);break;case Di.UH.COURSE_SPECIFICS:t.courseSpecifics=ar.vj.decode(e.data)}})),t}function lr(e){return Number(e)}function cr(e){return e?lr(e):void 0}function ur(e){return e?function(e){return Number(e)}(e):void 0}var dr=n(13357);var pr=function(e){return e.EPISODE_NAME_ASC="name ASC",e.EPISODE_NAME_DESC="name DESC",e.EPISODE_ADDED_AT_ASC="addTime ASC,name",e.EPISODE_ADDED_AT_DESC="addTime DESC,name",e.SHOW_NAME_ASC="show.name ASC,addTime ASC",e.SHOW_NAME_DESC="show.name DESC,addTime ASC",e}(pr||{});function mr(e){return void 0===e?"":function({field:e,order:t}){if(e===dr.ci.NAME&&t===dr.xB.ASC)return pr.EPISODE_NAME_ASC;if(e===dr.ci.NAME&&t===dr.xB.DESC)return pr.EPISODE_NAME_DESC;if(e===dr.ci.ADDED_AT&&t===dr.xB.ASC)return pr.EPISODE_ADDED_AT_ASC;if(e===dr.ci.ADDED_AT&&t===dr.xB.DESC)return pr.EPISODE_ADDED_AT_DESC;if(e===dr.ci.SHOW_NAME&&t===dr.xB.ASC)return pr.SHOW_NAME_ASC;if(e===dr.ci.SHOW_NAME&&t===dr.xB.DESC)return pr.SHOW_NAME_DESC;throw new Error("Invalid episode sort params!")}(e)}function hr(e){return gr(e)?.[0]}function fr(e,t){const n=e?.toString()??"";switch(e){case Si.oR.CREATOR:return{id:n,name:t===Si.jO.BOOK?v.Ru.get("shared.library.sort-by.author"):v.Ru.get("shared.library.sort-by.creator")};case Si.oR.CUSTOM:return{id:n,name:v.Ru.get("shared.library.sort-by.custom")};case Si.oR.NAME:return{id:n,name:v.Ru.get("shared.library.sort-by.name")};case Si.oR.RECENTLY_ADDED:return{id:n,name:v.Ru.get("shared.library.sort-by.recently-added")};case Si.oR.RECENTLY_PLAYED_OR_ADDED:return{id:n,name:v.Ru.get("shared.library.sort-by.recently-played-or-added")};case Si.oR.RECENTLY_UPDATED:return{id:n,name:v.Ru.get("shared.library.sort-by.recently-updated")};case Si.oR.RELEVANCE:return{id:n,name:v.Ru.get("shared.library.sort-by.relevance")};case Si.oR.RELEASE_DATE:return{id:n,name:v.Ru.get("tracklist.header.release-date")};case Si.oR.EVENT_START_TIME:return{id:n,name:v.Ru.get("shared.library.sort-by.date")};case Si.oR.UNRECOGNIZED:case void 0:return hr(t);default:return(0,ut.k)(e),hr(t)}}function gr(e,t=!1){let n=[];switch(e){case Si.jO.DOWNLOADED:case Si.jO.WRITABLE:case Si.jO.BY_YOU:case Si.jO.BY_SPOTIFY:case Si.jO.UNPLAYED:case Si.jO.IN_PROGRESS:case Si.jO.AUTHOR:case Si.jO.FINISHED:case Si.jO.UNRECOGNIZED:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR];break;case Si.jO.ALBUM:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR],t&&n.push(Si.oR.RELEASE_DATE);break;case Si.jO.BOOK:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR];break;case Si.jO.SHOW:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR,Si.oR.RECENTLY_UPDATED];break;case Si.jO.PLAYLIST:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR,Si.oR.CUSTOM];break;case Si.jO.ARTIST:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME];break;case Si.jO.EVENT:n=[Si.oR.EVENT_START_TIME,Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR];break;case void 0:n=[Si.oR.RECENTLY_PLAYED_OR_ADDED,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.CREATOR];break;default:(0,ut.k)(e)}if(0===n.length)throw new Error("No sort orders available for filter");return n.map((t=>fr(t,e)))}var Er=n(41806);function _r(e){return(0,Er.t)(e)}function yr(e,t){const n=e?.toString()??"";switch(e){case Si.jO.ALBUM:return{id:n,name:v.Ru.get("shared.library.filter.album")};case Si.jO.ARTIST:return{id:n,name:v.Ru.get("shared.library.filter.artist")};case Si.jO.PLAYLIST:return{id:n,name:v.Ru.get("shared.library.filter.playlist")};case Si.jO.SHOW:return{id:n,name:t?v.Ru.get("search.title.shows"):v.Ru.get("shared.library.filter.podcasts-courses")};case Si.jO.BOOK:return{id:n,name:v.Ru.get("shared.library.filter.book")};case Si.jO.DOWNLOADED:return{id:n,name:v.Ru.get("shared.library.filter.downloaded")};case Si.jO.BY_YOU:return{id:n,name:v.Ru.get("shared.library.filter.by-you")};case Si.jO.BY_SPOTIFY:return{id:n,name:v.Ru.get("shared.library.filter.by-spotify")};case Si.jO.UNPLAYED:return{id:n,name:v.Ru.get("shared.library.filter.unplayed")};case Si.jO.IN_PROGRESS:return{id:n,name:v.Ru.get("shared.library.filter.in-progress")};case Si.jO.EVENT:return{id:n,name:v.Ru.get("shared.library.filter.events")};case Si.jO.WRITABLE:case Si.jO.AUTHOR:case Si.jO.UNRECOGNIZED:case Si.jO.FINISHED:return{id:n,name:Si.jO[e]};default:throw(0,ut.k)(e),new mi.c_(`${e}`)}}const vr={[Si.jO.PLAYLIST]:0,[Si.jO.SHOW]:1,[Si.jO.BOOK]:2,[Si.jO.ALBUM]:3,[Si.jO.ARTIST]:4,[Si.jO.EVENT]:5,[Si.jO.BY_YOU]:6,[Si.jO.BY_SPOTIFY]:7,[Si.jO.IN_PROGRESS]:8,[Si.jO.UNPLAYED]:9,[Si.jO.DOWNLOADED]:10,[Si.jO.WRITABLE]:-1,[Si.jO.UNRECOGNIZED]:-1,[Si.jO.AUTHOR]:-1,[Si.jO.FINISHED]:-1};function br(e){return e.filter((e=>-1!==vr[e])).sort(((e,t)=>vr[e]-vr[t]))}function Sr(e){return e.filter((({id:e})=>![Si.jO.PLAYLIST].includes(lr(e))))}function Ar(e){switch(e){case Si.jO.ALBUM:return yt.c.ALBUM;case Si.jO.ARTIST:return yt.c.ARTIST;case Si.jO.PLAYLIST:return yt.c.PLAYLIST;case Si.jO.SHOW:return yt.c.SHOW;case Si.jO.BOOK:return yt.c.AUDIOBOOK;case Si.jO.EVENT:return yt.c.CONCERT;case Si.jO.DOWNLOADED:return"downloaded";default:return null}}var Cr=n(23316),Tr=n(16157);function Ir(e){switch(e){case Si.Zt.ALBUM:return"album";case Si.Zt.EP:return"ep";case Si.Zt.SINGLE:return"single";case Si.Zt.COMPILATION:return"compilation";default:return"album"}}function Or(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.standardLink,label:"standard"},{url:e.smallLink,label:"small"},{url:e.largeLink,label:"large"},{url:e.xlargeLink,label:"xlarge"})}function wr(e){return e.some((e=>e.folder?wr(e.folder.entity):e.playlist?.isLoading||e.playlist?.numberOfItemsPerLinkType.some((e=>e.numItems>0))))}function Nr(e){return void 0!==e&&e>0?function(e){return new Date(1e3*e)}(e).toISOString():null}function Rr(e){return Nr(e?Number(e):void 0)}function Pr(e){return{milliseconds:1e3*e}}function Lr(e,t){return e?t===e?null:Rr(e):null}function Dr(e){return e?[{url:e,width:300,height:300}]:[]}function kr(e){const t=e.entityInfo?.pinnable;switch(t){case Si.ID.YES:return mi.oT.YES;case Si.ID.NO_IN_FOLDER:return mi.oT.NO_IN_FOLDER;case Si.ID.UNRECOGNIZED:default:return mi.oT.NO}}function xr(e){return{type:yt.c.ARTIST,uri:e.link,name:e.name}}function Ur(e){return{name:e.entityInfo?.name??"",images:Dr(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:kr(e)}}function Mr(e){if(!function(e){return!!e.prerelease}(e))throw new Error("Invalid collection Esperanto prerelease response!");return e.prerelease.type===Si.O4.ALBUM?function(e){return{...Ur(e),type:yt.c.PRE_RELEASE_ALBUM,artists:e.prerelease.artistName?[{type:yt.c.ARTIST,name:e.prerelease.artistName,uri:e.prerelease.artistUri??""}]:[]}}(e):function(e){return{...Ur(e),type:yt.c.PRE_RELEASE_BOOK,authorName:e.prerelease.artistName??""}}(e)}function Br(e,t){let n=Li.M.Unknown;return n=t.isPlayed?Li.M.Completed:t.timeLeft0,isBanned:!1}}(e.track)}function zr(e,t){return e.length>=(t?.offset??0)+(t?.limit??0)}function Kr(e,t,n,i,r,s,a){if(e.error?.includes("filter only available"))throw new mi.c_(e.error.match(/^(.*) filter only available/)?.at(1)??e.error);if(e.error?.includes("order only available"))throw new mi.IU(e.error.match(/^(.*) order only available/)?.at(1)??e.error);if(e.error&&404===e.statusCode&&t?.folderUri)throw new mi.db(e.error);const o=t?.folderUri?Si.jO.PLAYLIST:void 0,l=br(i??[]).map((e=>yr(e,a))),c=o??cr(l.at(0)?.id);r&&e.header?.tagInfo&&l.unshift({id:r,name:e.header?.tagInfo?.tagName});const u=fr(ur(t?.sortOrder),c),d=c===Si.jO.PLAYLIST&&u.id===Si.oR.CUSTOM.toString(),p=!!t?.textFilter;let m,h=e.header?.totalCount??0;if(n){const n=function(e,t,n,i){let r=0;const s=[],a=new Set(i?.expandedFolders??[]),o=e.slice(0),l=Array.from({length:o.length},(()=>0));let c;for(;c=o.shift();){const e=l.shift()??0,u=Yr(c,t,e,n);if(s.push(u),e>0&&r++,zr(s,i))break;if(c.folder&&c.entityInfo?.uri&&a.has(c.entityInfo?.uri)){o.unshift(...c.folder.entity);const t=e+1;l.unshift(...Array.from({length:c.folder.entity.length},(()=>t)))}}return{items:s.slice(i?.offset??0,(i?.offset??0)+(i?.limit??0)),numExpandedFolderItemsInChunk:r}}(e.entity,d,p,t);m=n.items,h+=n.numExpandedFolderItemsInChunk}else m=function(e,t,n){return e.map((e=>Yr(e,t,void 0,n)))}(e.entity,d,p);return{primaryFilter:Ar(c)??void 0,passedFilterIds:t?.filters??[],availableFilters:br(e.header?.availableFilters?.filter??[]).map((e=>yr(e,a))),selectedFilters:t?.folderUri?Sr(l):l,availableSortOrders:gr(c,s),selectedSortOrder:u,limit:t?.limit??e.header?.totalCount??0,offset:t?.offset??0,items:m,unfilteredTotalLength:e.header?.totalCount??0,totalLength:h,hasUnfilteredItems:!!e.header?.totalCount||!!t?.filters?.length||!!t?.textFilter,hasTextFilter:p,reorderAllowed:d,passedFolderUri:t?.folderUri,openedFolderName:e.header?.folderName,parentFolderUri:e.header?.parentFolderUri,tagPlaylist:e.header?.tagInfo?.tagPlaylistInfo?(f=e.header.tagInfo.tagPlaylistInfo,{type:yt.c.PLAYLIST,uri:f.uri,name:f.name,images:[{url:f.imageUri}],isLoading:f.isLoading,isBooklist:!1,isCurated:f.isCurated,description:f.description}):void 0,openedFolderIsPlayable:!!e.header?.folderName&&wr(e.entity)};var f}function Yr(e,t,n,i){return e.playlist?function(e,t,n){return{type:yt.c.PLAYLIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:kr(e),canView:e.playlist?.canView??!0,images:Dr(e.entityInfo?.imageUri),owner:{type:yt.c.USER,name:e.playlist?.creatorName??"",uri:e.playlist?.creatorUri??"",id:"",username:"",images:[]},isOwnedBySelf:e.playlist?.ownedBySelf,isLoading:e.playlist?.isLoading,folderDepth:n,canAddTo:e.playlist?.canAdd,canReorder:t,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),isBooklist:!!e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>e===Cr.JaG.SHOW))?.numItems,isEmpty:!e.playlist?.numberOfItemsPerLinkType.some((e=>e.numItems>0)),namePrefix:e.playlist?.namePrefix??null}}(e,t,n):e.album?function(e){return{type:yt.c.ALBUM,name:e.entityInfo?.name??"",artists:e.album?.artistName?[{type:yt.c.ARTIST,name:e.album?.artistName,uri:e.album?.artistUri??""}]:[],images:Dr(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:kr(e),isPremiumOnly:e.album?.isPremiumOnly??!1,albumType:Ir(e.album?.type)}}(e):e.prerelease?Mr(e):e.artist?function(e){return{type:yt.c.ARTIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",images:Dr(e.entityInfo?.imageUri),pinned:e.entityInfo?.pinned??!1,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:kr(e)}}(e):e.show?function(e){return{type:yt.c.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,publisher:e.show?.creatorName??"",images:Dr(e.entityInfo?.imageUri),addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:kr(e)}}(e):e.book?function(e){return{type:yt.c.AUDIOBOOK,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",authorName:e.book?.authorName??"",images:Dr(e.entityInfo?.imageUri),isLocked:e.book?.access===Si.p2.LOCKED,pinned:e.entityInfo?.pinned??!1,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:kr(e),isCappedWithoutExplanation:e.book?.access===Si.p2.CAPPED,isPlayable:e.book?.access===Si.p2.OPEN}}(e):e.folder?function(e,t,n,i=!1){return{type:yt.c.FOLDER,uri:e.entityInfo?.uri??"",rowId:e.folder?.rowId??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:kr(e),numberOfFolders:e.folder?.numberOfFolders??0,numberOfPlaylists:e.folder?.numberOfPlaylists??0,folderDepth:n,canReorder:t,isFlattened:i,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),isEmpty:!wr(e.folder?.entity??[])}}(e,t,n,i):e.likedSongs?function(e){return{type:yt.c.LIKED_SONGS,uri:mi.BP,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:kr(e),images:Dr(e.entityInfo?.imageUri),numberOfSongs:e.likedSongs?.numberOfSongs??0,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.yourEpisodes?function(e){return{type:yt.c.YOUR_EPISODES,uri:e.entityInfo?.uri??mi.Xn,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:kr(e),images:Dr(e.entityInfo?.imageUri),numberOfDownloadedEpisodes:e.yourEpisodes?.numberOfDownloadedEpisodes??0,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.localFiles?function(e){return{type:yt.c.LOCAL_FILES,uri:"spotify:local-files",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:kr(e),images:Dr(e.entityInfo?.imageUri),numberOfFiles:e.localFiles?.numberOfFiles??0,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:Lr(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.event?function(e){return{type:yt.c.CONCERT,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",images:Dr(e.entityInfo?.imageUri),pinned:e.entityInfo?.pinned??!1,addedAt:Rr(e.entityInfo?.addTime),lastPlayedAt:null,canPin:kr(e),cityName:e.event?.cityName??"",locationName:e.event?.locationName??"",startTime:Rr(e.event?.startTime)}}(e):null}function qr(e){switch(e){case"album":default:return"album";case"single":return"single";case"compilation":return"compilation";case"ep":return"ep"}}function $r(e){if(!e.album)return null;if(!e.album.albumMetadata)return null;const t=e.album;return{type:yt.c.ALBUM,uri:e.album.albumMetadata.link,name:e.album.albumMetadata.name,artists:e.album.albumMetadata.artists.map(xr).filter((e=>e.name)),images:Or(e.album.albumMetadata.covers),albumType:qr(e.album.albumType),year:e.album.albumMetadata.year,copyrights:(n=e.album.albumMetadata.copyright,n.map((e=>e.includes("℗")?{type:"P",text:e}:{type:"C",text:e}))),items:e.album.track.map((e=>function(e,t){if(void 0===e.trackMetadata||void 0===e.trackPlayState)throw new Error("Invalid collection cosmos shows response!");return{...Hr(e.trackMetadata,e.trackPlayState,t),addedAt:Nr(e.addTime)}}(e,t)))};var n}function Zr(e,t){return{items:e.entity.map((e=>{const t=e.entityInfo?.hasCuratedItems??!1;return e.playlist?Qr(e,yt.c.PLAYLIST,t):e.likedSongs?Qr(e,yt.c.LIKED_SONGS,t):e.yourEpisodes?Qr(e,yt.c.YOUR_EPISODES,t):e.folder?function(e){return{type:yt.c.FOLDER,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,playlistCount:e.folder?.numberOfPlaylists,folderCount:e.folder?.numberOfFolders}}(e):null})),offset:t.offset,limit:t.limit,totalLength:e.header?.totalCount??0}}function Qr(e,t,n){let i,r,s;return t===yt.c.PLAYLIST?(i=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>4===e))?.numItems??void 0,r=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>63===e))?.numItems??void 0,s=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>62===e))?.numItems??void 0):t===yt.c.LIKED_SONGS?i=e.likedSongs?.numberOfSongs??void 0:t===yt.c.YOUR_EPISODES&&(r=e.yourEpisodes?.numberOfDownloadedEpisodes??void 0),{type:t,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,images:Dr(e.entityInfo?.imageUri),hasCuratedItems:n??!1,isLoading:e.playlist?.isLoading,fromFolder:e.playlist?.fromFolder?{name:e.playlist.fromFolder.name}:void 0,trackCount:i,episodeCount:r,bookCount:s}}function Jr(e){switch(e){case bi.F.ONLY_CURATED:return Si.iO.ONLY_CURATED;case bi.F.ONLY_UNCURATED:return Si.iO.ONLY_NOT_CURATED;case bi.F.NONE:case void 0:return Si.iO.GROUP_BY;default:return(0,ut.k)(e),Si.iO.GROUP_BY}}class Xr{cache=new Le.GG(6e5,864e5);constructor(e,t,n){this._your_library=e,this._libraryAPI=t,this._playlistAPI=n,this.events=new Ti(e,this.cache)}getCapabilities(){return{canSort:!0,canFilterOnCurationState:!0}}getEvents(){return this.events}async getCurationContexts(e){const{curatedItemUri:t,offset:n=0,limit:i,textFilter:r="",folderUri:s,sortOrder:a,curationStateFilter:o,flatten:l=!!r}=e;return Zr(await this._your_library.all(Si.WT.fromPartial({header:{length:i,skip:n,textFilter:r,sortOrder:{sortOrder:a?Number(a):Si.oR.RELEVANCE},filters:{filter:[Si.jO.PLAYLIST,Si.jO.WRITABLE]},curatedItems:{filter:Jr(o),items:[t]},totalCount:!0,allPlaylists:l,folderId:s?Ni(s):void 0,numLinkTypesInPlaylists:!0},pseudoPlaylistConfig:Ri({includeYourEpisodes:(0,C.gHQ)(t),includeLikedSongs:(0,C.U_m)(t)||(0,C.PkR)(t)})})),e)}getAvailableSortOrders(){return[Si.oR.RELEVANCE,Si.oR.RECENTLY_ADDED,Si.oR.NAME,Si.oR.RECENTLY_PLAYED_OR_ADDED].map((e=>fr(e)))}async curateItems(e,t,n){if(this.events.emitOperationSync(Ai.jy.CURATE_ITEMS,e,t,n))return null;const i=[],r=[];for(const n of t){let t;t=(0,C.Z0m)(n)?this._libraryAPI.add({uris:[e],silent:!0}):(0,C.tbX)(n)?this._playlistAPI.add(n,[e],{after:"end"},!0):Promise.reject(`Unsupported uri: "${n}"`),i.push(t)}for(const t of n){let n;n=(0,C.Z0m)(t)?this._libraryAPI.remove({uris:[e],silent:!0}):(0,C.tbX)(t)?this._playlistAPI.remove(t,[{uri:e,uid:""}],!0):Promise.reject(`Unsupported uri: "${t}"`),r.push(n)}i.length&&!this.isCuratedSync(e)&&(this.events.emitUpdateCuratedItems([e],!0),Promise.any(i).catch((async()=>{this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}))})));const s=await Promise.allSettled(i),a=await Promise.allSettled(r),o=t.filter(((e,t)=>"fulfilled"===s.at(t)?.status)),l=t.filter(((e,t)=>"rejected"===s.at(t)?.status)),c=n.filter(((e,t)=>"fulfilled"===a.at(t)?.status)),u=n.filter(((e,t)=>"rejected"===a.at(t)?.status));if((o.length||c.length)&&this.events.emitOperationComplete(Ai.jy.CURATE_ITEMS,e,o,c),l.length||u.length){const i=function({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:n,settledAddCurationContextPromises:i,settledRemoveCurationContextPromises:r}){for(const n of[...i])if("rejected"===n.status){const r=t.at(i.indexOf(n));return new Ii.e(`Failed curating "${e}" into "${r}"`,{cause:n.reason})}for(const t of[...r])if("rejected"===t.status){const i=n.at(r.indexOf(t));return new Ii.e(`Failed uncurating "${e}" from "${i}"`,{cause:t.reason})}return new Ii.e(e)}({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:n,settledAddCurationContextPromises:s,settledRemoveCurationContextPromises:a});throw this.events.emitOperationComplete(Ai.jy.CURATE_ITEMS,e,l,u,i),i}return!!o.length||(await this.isCurated(e))?.[0]}getDefaultCurationContextUri=Oi.o;async curateDefault(e){const t=this.getDefaultCurationContextUri(e);if(this.events.emitOperationSync(Ai.jy.CURATE_ITEMS,e,[t],[]))return;let n=!1;try{this.isCuratedSync(e)||(n=!0,this.events.emitUpdateCuratedItems([e],!0)),await this._libraryAPI.add({uris:[e],silent:!0}),this.events.emitOperationComplete(Ai.jy.CURATE_ITEMS,e,[t],[])}catch(i){n&&this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}));const r=new Ii.e(`Failed curating "${e}" into default context`,{cause:i});throw this.events.emitOperationComplete(Ai.jy.CURATE_ITEMS,e,[t],[],r),r}}async isCurated(...e){return(await this._your_library.isCurated({uri:e,updateThrottling:0,contextUri:""})).item.map((e=>(this.cache.set(e.uri,e.isCurated),e.isCurated)))}isCuratedSync(e){return this.cache.peek(e)}}var es=n(42221),ts=n(40764);class ns{subscriptionId=null;subscription=null;constructor(e,t){this._watchdogClient=e,this._url=t,this.subscribeToWatchdog()}subscribeToWatchdog(){this.subscription=this._watchdogClient.subscribe({url:this._url},(e=>{0!==e.id?(this.subscriptionId=e.id,this.scheduleNextPing()):this.subscription?.cancel()}))}async pingWatchdog(){this.subscriptionId&&(await this._watchdogClient.ping({id:this.subscriptionId}),this.scheduleNextPing())}scheduleNextPing(){setTimeout((()=>{this.pingWatchdog()}),6e4)}}var is=n(53638),rs=n(72046),ss=n(18852),as=n(9830),os=n(54580),ls=n(49769);class cs extends os.N{_contextualBanCancelFunctionByContextUri={};_contextualBanAggregatorByContextUri={};constructor(e){super(),this._subscribeContextualBans=e,this.onAddListener(os.c.UPDATE_CONTEXTUAL_BAN,(e=>{this._contextualBanAggregatorByContextUri[e.data.options.contextUri]??=(0,ls.X)(this.onBatchChanged.bind(this,e.data.options.contextUri),100),this._contextualBanAggregatorByContextUri[e.data.options.contextUri].subscribe(e.data.options.uri)})),this.onRemoveListener(os.c.UPDATE_CONTEXTUAL_BAN,(e=>{this._contextualBanAggregatorByContextUri[e.data.options.contextUri].unsubscribe(e.data.options.uri)}))}emitUpdateContextualBan(e,t,n){this.emit(os.c.UPDATE_CONTEXTUAL_BAN,{contextUri:e,uri:t,isBanned:n})}async onBatchChanged(e,t){if(this._contextualBanCancelFunctionByContextUri[e]?.(),0===t.size)return delete this._contextualBanAggregatorByContextUri[e],void delete this._contextualBanCancelFunctionByContextUri[e];const n=Array.from(t.keys());this._contextualBanCancelFunctionByContextUri[e]=this._subscribeContextualBans(e,n,(t=>n.forEach(((n,i)=>this.emitUpdateContextualBan(e,n,t[i])))))}}class us{constructor(e){this._client=e,this._events=new cs(this._subscribeContextualBans.bind(this))}getEvents(){return this._events}getCapabilities(){return{canBan:!0}}async addContextTrackBan(e,t){await this._client.ban({contextSource:e,uri:[t]}),this._events.emitUpdateContextualBan(e,t,!0)}async removeContextTrackBan(e,t){await this._client.unban({contextSource:e,uri:[t]}),this._events.emitUpdateContextualBan(e,t,!1)}_subscribeContextualBans(e,t,n){if(!t.length)return()=>{};return this._client.streamContains(as.Rs.fromPartial({contextUri:e,uri:t}),(({banFound:e,status:t})=>{200===t?.code&&n(e)})).cancel}}var ds=n(93885),ps=n(34671),ms=n(71506),hs=n(51028),fs=n(26184),gs=n(36649),Es=n(59256);function _s(e){switch(e){case fs.Ir.ALBUMS:return Si.jO.ALBUM;case fs.Ir.ARTISTS:return Si.jO.ARTIST;case fs.Ir.SHOWS:return Si.jO.SHOW;case fs.Ir.BOOKS:return Si.jO.BOOK;case fs.Ir.EVENTS:return Si.jO.EVENT;default:throw Error("Invalid library filter!")}}class ys extends gs.w{_cancellables={[fs.Ir.ALBUMS]:null,[fs.Ir.ARTISTS]:null,[fs.Ir.SHOWS]:null,[fs.Ir.TRACKS]:null,[fs.Ir.EPISODES]:null,[fs.Ir.BOOKS]:null,[fs.Ir.EVENTS]:null};_containsCancellable=null;constructor(e,t,n,i,r){super(i),this._your_library=e,this._collection=t,this._listen_later=n,this._isEventsInYourLibraryEnabled=r}subscribeToUpdates(){for(const e of Object.values(fs.Ir))if(e===fs.Ir.EPISODES){let t;this._cancellables[e]=this._listen_later.streamEpisodes(Es.Fn.fromPartial({updateThrottling:100}),(n=>{t!==n.unfilteredLength&&(this.emit(fs.UV.UPDATE,{list:e}),t=n.unfilteredLength)}))}else if(e===fs.Ir.TRACKS){let t;this._cancellables[e]=this._collection.streamTrackListMetadata(as.oT.fromPartial({updateThrottling:100}),(n=>{t!==n.metadata?.unfilteredLength&&(this.emit(fs.UV.UPDATE,{list:e}),t=n.metadata?.unfilteredLength)}))}else{const t=_s(e);this._cancellables[e]=this._your_library.streamAll(Si.WT.fromPartial({updateThrottling:100,header:{allPlaylists:!1,totalCount:!0,filters:{filter:[t]},includeEvents:!!this._isEventsInYourLibraryEnabled}}),(()=>{this.emit(fs.UV.UPDATE,{list:e})}))}}unsubscribeFromUpdates(){for(const e of Object.values(fs.Ir)){const t=this._cancellables[e];null!==t&&(t.cancel(),this._cancellables[e]=null)}}async onBatchChanged(e){if(null!==this._containsCancellable&&this._containsCancellable.cancel(),0===e.size)return;const t=Array.from(e.keys());this._containsCancellable=this._collection.streamContains(as.Rs.fromPartial({uri:t}),(e=>this.emitUpdateItems(t,e.found)))}}function vs(e){const t=e.map((e=>(0,C.o_h)(e))),n=t.map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===n)throw new Error("Given URIs need to be of the same type!");return{type:n,ids:t.map((e=>e.id))}}var bs=n(67291),Ss=n(49725),As=n(13719),Cs=n(72671),Ts=n(8629);const Is={offset:0},Os={episodePolicy:{link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:[Es.UH.PODCAST_SUBSCRIPTIONS]},showPolicy:{name:!0,link:!0,description:!0,publisher:!0,covers:!0,language:!0,isExplicit:!0,mediaTypeEnum:!0},collectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},syncPolicy:{offline:!0,syncProgress:!0},playedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0}};function ws(e,t){return"end"===e.after?{}:e.after?.uri?{afterUri:(0,Ss.c)(e.after.uri,t)}:"start"===e.before?{first:!0}:e.before?.uri?{beforeUri:(0,Ss.c)(e.before.uri,t)}:{}}const Ns=e=>e.startsWith("spotify:concept:"),Rs=e=>!Ns(e);class Ps{_cache=new Map;constructor(e,t,n,i,r,s,a,o,l){this._your_library=e,this._collection=t,this._listen_later=n,this._builder=i,this._currentUsername=r,this._isGatedPodcastsEnabled=s,this._isAlbumSortByReleaseDateEnabled=a,this._isEventsInYourLibraryEnabled=o,this._isCoursesEnabled=l,this._events=new ys(this._your_library,this._collection,this._listen_later,this._cache,this._isEventsInYourLibraryEnabled)}getCapabilities(){return{canSort:!0,canFilter:!0,canSortTracksAndEpisodes:!0,canFilterTracksAndEpisodes:!0,canModifyOffline:!0,canGetTracksByArtistOrAlbum:!0,canMarkEpisodesAsDone:!0,canFetchAllItems:!0,canPin:!0,canTextFilterContentsInRealtime:!0}}async getTracks(e=Is){const{sort:t,filters:n,offset:i,limit:r,uri:s}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");const a=(0,C.o_h)(s),o=a&&(0,C.cEw)(a.id)||void 0,l=as.V$.fromPartial({trackPolicy:{collectionPolicy:{isInCollection:!0},trackPolicy:{link:!0,name:!0,playable:!0,length:!0,trackNumber:!0,discNumber:!0,isExplicit:!0,is19PlusOnly:!0,isLocal:!0,extension:[Es.UH.VIDEO_ASSOCIATIONS]},albumPolicy:{decorated:!0,albumPolicy:{link:!0,name:!0,covers:!0}},artistPolicy:{name:!0,link:!0}},addTime:!0,start:i,length:r,filter:_r(n?.map(bs.HI).map((e=>e??null)).filter(As.P)??[]),sort:t?(0,Ts.c)(t):"",id:o});let c;return c=(0,C.o_h)(s)?.type===C.NQG.ARTIST?await this._collection.getArtistTrackList(l):(0,C.o_h)(s)?.type===C.NQG.ALBUM?await this._collection.getAlbumTrackList(l):await this._collection.getTrackList(l),function(e,t){if(void 0===e.item)throw new Error("Invalid collection esperanto tracks response!");return{items:e.item.map(Wr),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(c,i)}async _isTagsInfoSynced(){return await new Promise((e=>{let t=null;const n=this._collection.streamTagsInfo({},(i=>{i.isSynced&&(n.cancel(),t&&clearTimeout(t),e(!0))}));t=setTimeout((()=>{e(!1),n.cancel()}),5e3)}))}async getTracksFilterTags(){if(await this._isTagsInfoSynced()){const e=this._builder.build(),t=await e.withHost(Cs.o1).withPath("/liked-songs").withQueryParameters({subjective:!0}).withJsonContentType().withResponseType("json").send();return t.body?.contentFilters.map((({title:e,query:t})=>({name:e,filter:t})))??[]}return[]}async getEpisodes(e=Is){const{sort:t,filter:n,offset:i,limit:r}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");var s;return function(e,t){return{items:(e.episode||[]).map(Fr),offset:t||0,limit:(e.episode||[]).length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(await this._listen_later.episodes(Es.Fn.fromPartial({...(s=this._isGatedPodcastsEnabled,s&&!Os.episodePolicy.extension.includes(Es.UH.GATED_ENTITY_RELATIONS)?{...Os,episodePolicy:{...Os.episodePolicy,extension:[...Os.episodePolicy.extension,Es.UH.GATED_ENTITY_RELATIONS]}}:Os),sort:mr(t),filter:_r([(0,bs.HI)(n)??null].filter(As.P)),start:i,length:r})),i)}getEvents(){return this._events}async add({uris:e,silent:t}){if(!this._events.emitOperationSync(fs.tS.ADD,e,t))try{this._events.emitUpdateItems(e,!0),await async function(e,t,n){const{type:i}=vs(n);i===C.NQG.EPISODE?await t.add({uris:n}):await e.add({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(fs.tS.ADD,e,null,t)}catch(n){throw this._events.emitUpdateItems(e,!1),this._events.emitOperationComplete(fs.tS.ADD,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}async remove({uris:e,silent:t}){if(!this._events.emitOperationSync(fs.tS.REMOVE,e,t))try{this._events.emitUpdateItems(e,!1),await async function(e,t,n){const{type:i}=vs(n);i===C.NQG.EPISODE?await t.remove({uris:n}):await e.remove({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(fs.tS.REMOVE,e,null,t)}catch(n){throw this._events.emitUpdateItems(e,!0),this._events.emitOperationComplete(fs.tS.REMOVE,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}async contains(...e){const t=await async function(e,t){return(await e.contains(as.Rs.fromPartial({uri:t}))).found||[]}(this._collection,e);return this._events.emitUpdateItems(e,t),t}containsSync(e){return this._cache.get(e)}async markAsPlayed(e){await this._collection.removeUnplayed({uri:[e]})}async markAsUnPlayed(e){await this._collection.addUnplayed({uri:[e]})}async pin(e,t){const n=await this._your_library.pin(Si.Xb.fromPartial({uri:(0,Ss.c)(e,this._currentUsername),...t&&ws(t,this._currentUsername)}));n.status===Si.Fy.PINNED?this._events.emitUpdatePin(e,!0):n.status===Si.Fy.NOT_PINNED&&n.hasMaximumPinnedItems&&this._events.emitUpdatePinErrorTooManyPins(e,n.maximumPinnedItems)}async unpin(e){await this._your_library.unPin(Si.Xb.fromPartial({uri:(0,Ss.c)(e,this._currentUsername)})),this._events.emitUpdatePin(e,!1)}async getContents(e){let t=e?.itemToCheckCurationFor,n=e?.textFilter;const i=n?(0,C.o_h)(n):null;let r=Si.iO.GROUP_BY;!i||i.type!==C.NQG.TRACK&&i.type!==C.NQG.EPISODE&&i.type!==C.NQG.LOCAL_TRACK&&i.type!==C.NQG.SHOW||(t||(r=Si.iO.ONLY_CURATED,t=[]),t.push(i.toURI()),n="");const s=t&&Si.ZP.fromPartial({items:t,filter:r}),a=e?.filters?.find(Ns),o=e?.filters?.filter(Rs).map(lr),l=o&&br(o).at(0),c=!!l,u=l===Si.jO.PLAYLIST,d=l===Si.jO.DOWNLOADED,p=!!e?.expandedFolders?.length&&!!!e?.textFilter&&!a&&(!c||u||d);let m=e?.offset,h=e?.limit;p&&(m=0,h=(e?.offset??0)+(e?.limit??0));const f=fr(ur(e?.sortOrder),l),g=(e?.expandedFolders??[]).map(Ni).filter((e=>void 0!==e));return Kr(await this._your_library.all(Si.WT.fromPartial({header:{length:h,skip:m,textFilter:n,sortOrder:{sortOrder:ur(f.id)},filters:{filter:o},totalCount:!0,allPlaylists:!!e?.textFilter||!!a||e?.flattenTree,fillFolders:g,folderId:e?.folderUri?Ni(e.folderUri):void 0,numLinkTypesInPlaylists:!0,curatedItems:s,tagFilter:a?Si.Jk.fromPartial({tagUri:a}):void 0,includePrereleases:!0,includeEvents:!!this._isEventsInYourLibraryEnabled},pseudoPlaylistConfig:Ri(e)})),e,p,o,a,this._isAlbumSortByReleaseDateEnabled,this._isCoursesEnabled)}getContentsPrimaryFilterId(e){return function(e){switch(e){case yt.c.ALBUM:return Si.jO.ALBUM;case yt.c.ARTIST:return Si.jO.ARTIST;case yt.c.PLAYLIST:return Si.jO.PLAYLIST;case yt.c.SHOW:return Si.jO.SHOW;case yt.c.AUDIOBOOK:return Si.jO.BOOK;case yt.c.CONCERT:return Si.jO.EVENT;case"downloaded":return Si.jO.DOWNLOADED;case void 0:return null;default:return(0,ut.k)(e),null}}(e)?.toString()??null}getFilterLabel(e){const t=cr(e);return void 0!==t?Si.jO[t]?.toLowerCase():e}getSortOrderLabel(e){const t=ur(e);return void 0!==t?Si.oR[t]?.toLowerCase():e}getStaticallyKnownFilters(){return{playlist:{filterId:Si.jO.PLAYLIST.toString(),sortOrderIds:{customSort:Si.oR.CUSTOM.toString()}}}}getRecentsSortOrderId(){return Si.oR.RECENTLY_PLAYED_OR_ADDED.toString()}async getAlbum(e){return $r(await this._collection.getAlbumView(as.sZ.fromPartial({albumUri:e,trackPolicy:{collectionPolicy:{isInCollection:!0},trackPolicy:{link:!0,name:!0,playable:!0,length:!0,trackNumber:!0,discNumber:!0,isExplicit:!0,is19PlusOnly:!0},artistPolicy:{name:!0,link:!0},playedStatePolicy:{playable:!0}},albumPolicy:{decorated:!0,albumType:!0,artistsPolicy:{artistPolicy:{link:!0,name:!0,portraits:!0},decorated:!0},albumPolicy:{link:!0,name:!0,copyrights:!0,covers:!0,year:!0,numDiscs:!0,numTracks:!0,playability:!0}}})))}}var Ls=n(39838);function Ds(e){return{type:yt.c.ARTIST,uri:e.link,name:e.name}}function ks(e){const t=e.metadata;return{type:yt.c.TRACK,uid:e.rowId,addedAt:(s=e.addTime,new Date(1e3*s)),uri:t.link,name:t.name,album:(i=t.album,{type:yt.c.ALBUM,uri:i.link,name:i.name,artist:i.artist&&Ds(i.artist),images:(r=i.covers?.standardLink,r?[{url:r,label:"standard"}]:[])}),artists:t.artist.map(Ds),discNumber:t.discNumber,trackNumber:t.trackNumber,duration:(n=1e3*t.length,{milliseconds:n}),isExplicit:!1,isLocal:t.isLocal,isPlayable:t.playable,is19PlusOnly:!1,isBanned:!1};var n,i,r,s}var xs=n(40114),Us=n(34939),Ms=n(11462),Bs=n(56837);const js="showLocalFiles";function Fs(e){switch(e){case xs.de.UNKNOWN:return Ls.kW.UNKNOWN;case xs.de.ITUNES:return Ls.kW.ITUNES;case xs.de.DOWNLOADS:return Ls.kW.DOWNLOADS;case xs.de.MY_MUSIC:return Ls.kW.MY_MUSIC;case xs.de.WINDOWS_MUSIC_LIBRARY:return Ls.kW.WINDOWS_MUSIC_LIBRARY;case xs.de.ANDROID_MEDIA_STORE:case xs.de.UNRECOGNIZED:case xs.de.IOS_DOCUMENTS:return Ls.kW.UNRECOGNIZED;default:return(0,ut.k)(e),Ls.kW.UNRECOGNIZED}}function Vs(e){switch(e){case Ls.kW.UNKNOWN:return xs.de.UNKNOWN;case Ls.kW.ITUNES:return xs.de.ITUNES;case Ls.kW.DOWNLOADS:return xs.de.DOWNLOADS;case Ls.kW.MY_MUSIC:return xs.de.MY_MUSIC;case Ls.kW.WINDOWS_MUSIC_LIBRARY:return xs.de.WINDOWS_MUSIC_LIBRARY;case Ls.kW.UNRECOGNIZED:return xs.de.UNRECOGNIZED;default:return(0,ut.k)(e),xs.de.UNRECOGNIZED}}const Gs=e=>{const t=e?.order===Us.xB.DESC?1:0;switch(e?.field){case Us.nw.TITLE:return xs.rj.NAME_ASC+t;case Us.nw.ADDED_AT:return xs.rj.ADD_TIME_ASC+t;case Us.nw.ALBUM:return xs.rj.ALBUM_NAME_ASC+t;case Us.nw.ARTIST:return xs.rj.ARTIST_NAME_ASC+t;case Us.nw.DURATION:return xs.rj.LENGTH_ASC+t;default:return xs.rj.NO_SORT}};function Hs(e){switch(e){case xs.xp.NOT_FOUND:throw new Error("Error adding local files folder: Path not found!");case xs.xp.UNKNOWN:case xs.xp.UNRECOGNIZED:throw new Error("Error adding local files folder!");case xs.xp.SUCCESS:case xs.xp.NOT_CHANGED:return Promise.resolve();default:return(0,ut.d)(e)}}const Ws=xs.oU.fromPartial({rowId:!0,addTime:!0,track:{link:!0,name:!0,discNumber:!0,trackNumber:!0,length:!0,isLocal:!0,playable:!0,hasLyrics:!1,is19PlusOnly:!1,isAvailableInMetadataCatalogue:!1,isExplicit:!1,isPremiumOnly:!1,locallyPlayable:!1,playableLocalTrack:!1,playableTrackLink:!1,popularity:!1,previewId:!1,trackDescriptors:!1},album:{album:{link:!0,name:!0,covers:!0,copyrights:!1,isPremiumOnly:!1,numDiscs:!1,numTracks:!1,playability:!1,year:!1},artist:{link:!0,name:!0,isVariousArtists:!1,portraits:!1}},artist:{link:!0,name:!0,isVariousArtists:!1,portraits:!1},addedBy:void 0,canAddToCollection:!1,canBan:!1,displayCovers:!1,formatListAttributes:!1,inCollection:!1,isBanned:!1,localFile:!1,offline:!1});class zs{_totalLength=0;constructor(e,t,n){this._cosmos=t,this._localStorageAPI=n,this._client=new xs._w(e),this._events=new Bs.Q,this._subscribeToTracksUpdates()}getCapabilities(){return{canSort:!0,canFilter:!0,canFetchAllTracks:!0}}getEvents(){return this._events}getIsEnabled(){const e=this._localStorageAPI.getItem(js);return!(e instanceof Error)&&e}setIsEnabled(e){this._localStorageAPI.setItem(js,e),this._emitUpdate()}subscribeIsEnabled(e){return this._localStorageAPI.getEvents().addListener(Ms.r.UPDATE,(t=>{t.data.key===js&&e(t.data.value)}))}async browseForFolder(){return function(e){return{path:e.path||null}}(await this._cosmos.post("sp://desktop/v1/browse_for_folder"))}async getSources(){const e=await this._client.getSources({});return{defaultSources:e.defaultSources.map((e=>({enabled:e.enabled,id:Fs(e.id)}))),folders:e.folders}}async addFolder(e){Hs((await this._client.addFolder({path:e.path})).result)}async removeFolder(e){Hs((await this._client.removeFolder({path:e.path})).result)}async mutateDefaultSource(e){Hs((await this._client.mutateDefaultSource({id:Vs(e.id),enabled:e.enabled})).result)}async getTracks(e,t){const n=await this._client.getTracks({query:{sortBy:Gs(e),textFilter:t??"",range:void 0,minLength:0,removeDuplicateLinks:!1},policy:Ws});return void 0!==n.data?n.data.item.map(ks):[]}_subscribeToTracksUpdates(){let e=!0;this._client.subscribeTracks(xs.mo.fromPartial({query:{range:{start:0,length:0}}}),(t=>{this._totalLength=t.data?.unfilteredLength??0,e?e=!1:this._emitUpdate()}))}_emitUpdate(){this._events.emit(Bs.T.UPDATE,{isEnabled:this.getIsEnabled(),totalLength:this._totalLength})}}var Ks=n(40184),Ys=n(70896),qs=n(50993),$s=n(31420);class Zs{constructor(e){this._metadataServiceClient=e}async fetch(e,t){const n=await this._metadataServiceClient.fetch($s.Rr.fromPartial({extensionQuery:t.map((t=>({extensionKind:t,entityUri:e})))})),i=Object.fromEntries(e.map((e=>[e,{}])));for(const{extensionKind:e,entityExtension:r}of n.extension){const n=e;if((0,Di.up)(n,t))for(const{entityUri:e,extensionData:t}of r){if(!(e in i))continue;const r=!!t?.value&&(0,Di.V$)(n);i[e][n]=r?(0,Di.iy)(n,t.value):t}}return Object.entries(i).map((([e,t])=>({uri:e,extensions:t})))}async expire(e,t){await this._metadataServiceClient.expire($s.vq.fromPartial({extensionKind:t,entityUri:e}))}}var Qs=n(16946),Js=n(16947),Xs=n(68649),ea=n(35035),ta=n(87672),na=n(26702);function ia(e,t){t=t.split(":").map((e=>encodeURIComponent(e))).join(":");const n=(0,C.o_h)(t,{parseUnknown:!0});if(null===n)throw new Error(`URI "${t}" is invalid!`);switch(n.type){case C.NQG.TRACK:case C.NQG.LOCAL:case C.NQG.EPISODE:case C.NQG.SHOW:case C.NQG.PLAYLIST:case C.NQG.PLAYLIST_V2:case C.NQG.COLLECTION:case C.NQG.COLLECTION_ALBUM:case C.NQG.COLLECTION_ARTIST:return t;case C.NQG.ALBUM:return(0,C.Uu7)(e,n.id).toURI();case C.NQG.ARTIST:return(0,C.g1K)(e,n.id).toURI();default:return console.warn(`URI "${t}" is can not be downloaded!`),null}}function ra(e){const t=(0,C.o_h)(e);if(null===t)throw new Error(`URI "${e}" is invalid!`);switch(t.type){case C.NQG.ALBUM:case C.NQG.ARTIST:case C.NQG.TRACK:case C.NQG.LOCAL:case C.NQG.EPISODE:case C.NQG.SHOW:case C.NQG.PLAYLIST:case C.NQG.PLAYLIST_V2:case C.NQG.COLLECTION:return e;case C.NQG.COLLECTION_ALBUM:return(0,C.Q00)(t.id).toURI();case C.NQG.COLLECTION_ARTIST:return(0,C.ITr)(t.id).toURI();default:return console.warn(`URI "${e}" is can not be downloaded!`),null}}function sa(e=!1,t=!1){return(n,i=!0)=>(0,C.gHQ)(n)||(0,C.WB1)(n)?i?ea.vs.YES:ea.vs.NO_PERMISSION_HIDE:e?ea.vs.YES:t?ea.vs.NO_PERMISSION_HIDE:ea.vs.NO_PERMISSION}let aa=function(e){return e[e.CONTEXT=0]="CONTEXT",e[e.ITEM=1]="ITEM",e[e.UNRECOGNIZED=2]="UNRECOGNIZED",e}({});function oa(e){const t=(0,C.o_h)(e);if(null===t)return aa.UNRECOGNIZED;switch(t.type){case C.NQG.ALBUM:case C.NQG.ARTIST:case C.NQG.SHOW:case C.NQG.PLAYLIST:case C.NQG.PLAYLIST_V2:case C.NQG.COLLECTION:case C.NQG.COLLECTION_ALBUM:case C.NQG.COLLECTION_ARTIST:return aa.CONTEXT;case C.NQG.TRACK:case C.NQG.EPISODE:return aa.ITEM;default:return aa.UNRECOGNIZED}}var la=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}(la||{});function ca(e){switch(e.connection.status){case la.ONLINE:return ea.uJ.ONLINE;case la.OFFLINE:return ea.uJ.OFFLINE;case la.FORCED_OFFLINE:return ea.uJ.FORCED_OFFLINE;case la.RECONNECTING:return ea.uJ.RECONNECTING;default:return ea.uJ.OFFLINE}}function ua(e){const t=e?Number(e.totalTracks):0,n=e?Number(e.downloadedTracks):0;return{syncing:e?.downloading??!1,percentage:e?.percentComplete??0,totalItems:t,currentItem:Math.min(n+1,t)}}function da(e){switch(e){case Js.zZ.SUCCESS:return ea.O4.SUCCESS;case Js.zZ.GENERIC:return ea.O4.GENERIC;case Js.zZ.DISK_FULL:return ea.O4.DISK_FULL;case Js.zZ.EXPIRED:return ea.O4.EXPIRED;case Js.zZ.TOO_MANY_TRACKS:return ea.O4.TOO_MANY_TRACKS;case Js.zZ.NOT_ALLOWED:return ea.O4.NOT_ALLOWED;case Js.zZ.CONNECTION_DISABLED:return ea.O4.CONNECTION_DISABLED;case Js.zZ.DEVICE_LIMIT_REACHED:return ea.O4.DEVICE_LIMIT_REACHED;case Js.zZ.UNRECOGNIZED:default:return ea.O4.UNRECOGNIZED}}function pa(e){let t=[];return(0,ls.X)((n=>{t.forEach((e=>e.cancel())),t=[],(0,na.F)(Array.from(n.keys()),(n=>t.push(e(n))),100)}),100)}class ma extends ta.p{constructor(e,t,n,i,r){super(),this._username=e,this._cosmos=t,this._offline=n,this._productState=i,this._cache=r,this.setupConnectivityEvents(),this.setupErrorEvents(),this.setupCapabilitiesEvents(),this.setupTotalProgressEvents(),this.setupContextProgressEvents(),this.setupContextAndItemAvailabilityEvents()}setupConnectivityEvents(){let e=0,t=null;this.onAddListener(ta.I.UPDATE_CONNECTIVITY,(()=>{1==++e&&(t=this._cosmos.sub("sp://connectivity-manager/v1/connection",(e=>this.emit(ta.I.UPDATE_CONNECTIVITY,{connectivity:ca(e)}))))})),this.onRemoveListener(ta.I.UPDATE_CONNECTIVITY,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupErrorEvents(){let e=0,t=null;this.onAddListener(ta.I.ERROR,(()=>{1==++e&&(t=this._offline.subscribeError({},(({code:e})=>this.emit(ta.I.ERROR,{code:da(e)}))))})),this.onRemoveListener(ta.I.ERROR,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupCapabilitiesEvents(){let e=0,t=null;this.onAddListener(ta.I.UPDATE_CAPABILITIES,(()=>{1==++e&&(t=this._productState.subValues({},(({pairs:e})=>{e.offline&&this.emit(ta.I.UPDATE_CAPABILITIES,{capabilites:{canDownload:sa("1"===e.offline,"1"===e["streaming-only-premium"])}})})))})),this.onRemoveListener(ta.I.UPDATE_CAPABILITIES,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupTotalProgressEvents(){let e=0,t=null;this.onAddListener(ta.I.UPDATE_TOTAL_PROGRESS,(()=>{1==++e&&(t=this._offline.subscribeTotalProgress({},(({progress:e})=>this.emit(ta.I.UPDATE_TOTAL_PROGRESS,{progress:ua(e)}))))})),this.onRemoveListener(ta.I.UPDATE_TOTAL_PROGRESS,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupContextProgressEvents(){const e=e=>{const t=ra(e.uri);null!==t&&this.emit(ta.I.UPDATE_CONTEXT_PROGRESS,{uri:t,progress:ua(e.progress)})},t=pa((t=>this._offline.subscribeContextsProgress({uris:t},(({progresses:t})=>t.forEach((t=>e(t)))))));this.onAddListener(ta.I.UPDATE_CONTEXT_PROGRESS,(e=>{const n=ia(this._username,e.data.options.uri);null!==n&&t.subscribe(n)})),this.onRemoveListener(ta.I.UPDATE_CONTEXT_PROGRESS,(e=>{const n=ia(this._username,e.data.options.uri);null!==n&&t.unsubscribe(n)}))}setupContextAndItemAvailabilityEvents(){const e=e=>{const t=ra(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Js.W1.DOWNLOADED:return ea.kw.YES;case Js.W1.DOWNLOADING:return ea.kw.DOWNLOADING;case Js.W1.WAITING:case Js.W1.REQUESTED:return ea.kw.WAITING;case Js.W1.NOT_DOWNLOADED:case Js.W1.ERROR:case Js.W1.UNRECOGNIZED:default:return ea.kw.NO}}(e);this._cache.set(t,n),this.emit(ta.I.UPDATE_AVAILABILITY,{uri:t,availability:n})},t=pa((t=>this._offline.subscribeContexts({uris:t},(({contexts:t})=>t.forEach((t=>{void 0!==t.context&&e(t.context)})))))),n=e=>{const t=ra(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Js.C8.DOWNLOADED:return ea.kw.YES;case Js.C8.DOWNLOADING:return ea.kw.DOWNLOADING;case Js.C8.WAITING_FOR_REDOWNLOAD:case Js.C8.WAITING:case Js.C8.WAITING_LIMIT_EXCEEDED:return ea.kw.WAITING;case Js.C8.NOT_DOWNLOADED:case Js.C8.ERROR:case Js.C8.DOWNLOADED_EXPIRED:case Js.C8.UNRECOGNIZED:default:return ea.kw.NO}}(e);this._cache.set(t,n),this.emit(ta.I.UPDATE_AVAILABILITY,{uri:t,availability:n})},i=pa((e=>this._offline.subscribeItems({uris:e},(({items:e})=>e.forEach((e=>n(e)))))));this.onAddListener(ta.I.UPDATE_AVAILABILITY,(e=>{const n=ia(this._username,e.data.options.uri);if(null===n)return;const r=oa(n);r===aa.CONTEXT?t.subscribe(n):r===aa.ITEM&&i.subscribe(n)})),this.onRemoveListener(ta.I.UPDATE_AVAILABILITY,(e=>{const n=ia(this._username,e.data.options.uri);if(null===n)return;const r=oa(n);r===aa.CONTEXT?t.unsubscribe(n):r===aa.ITEM&&i.unsubscribe(n)}))}}var ha=n(85829);const fa=(0,n(96566).g)(Js.W1);function ga(e){if(fa(e))switch(e){case Js.W1.UNRECOGNIZED:return ea.kw.NO;case Js.W1.REQUESTED:case Js.W1.WAITING:return ea.kw.WAITING;case Js.W1.DOWNLOADING:return ea.kw.DOWNLOADING;case Js.W1.DOWNLOADED:return ea.kw.YES;case Js.W1.ERROR:case Js.W1.NOT_DOWNLOADED:return ea.kw.NO;default:return(0,ut.k)(e),ea.kw.NO}return ea.kw.NO}function Ea(e){const t=e.entityInfo;if(void 0===t)return null;const n=(0,C.o_h)(t.uri);if(null===n)return null;switch(n.type){case C.NQG.ARTIST:case C.NQG.COLLECTION_ARTIST:return function(e){return{type:yt.c.ARTIST,uri:ra(e.uri)??"",name:e.name,images:[{url:e.imageUri,label:"standard"}]}}(t);case C.NQG.ALBUM:case C.NQG.COLLECTION_ALBUM:return function(e,t){return{type:yt.c.ALBUM,uri:ra(e.uri)??"",name:e.name,artists:[{type:yt.c.ARTIST,uri:t?.artistUri??"",name:t?.artistName??""}],images:[{url:e.imageUri,label:"standard"}]}}(t,e.album);case C.NQG.SHOW:return function(e,t){return{type:yt.c.SHOW,uri:e.uri,name:e.name,publisher:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.show);case C.NQG.PLAYLIST:case C.NQG.PLAYLIST_V2:return function(e,t){return{type:yt.c.PLAYLIST,uri:e.uri,name:e.name,creatorName:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.playlist);case C.NQG.COLLECTION:return function(e){return{type:e.uri.endsWith("your-episodes")?yt.c.YOUR_EPISODES:yt.c.LIKED_SONGS,uri:e.uri}}(t);default:return null}}class _a{_cache=new Map;constructor(e,t,n,i,r,s){this._username=e,this._storage=n,this._offline=i,this._yourLibrary=r,this._productState=s,this._events=new ma(this._username,t,this._offline,this._productState,this._cache),this._events.addListener(ta.I.UPDATE_CAPABILITIES,(e=>this._canDownload=e.data.capabilites.canDownload)),this._canDownload=sa()}getCapabilities(){return{canDownload:(e,t)=>this._canDownload(e,t),canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return(await this._yourLibrary.all(Si.WT.fromPartial({header:{allPlaylists:!0,filters:{filter:[Si.jO.DOWNLOADED]},length:1e3}}))).entity.map(Ea).filter(As.P)}getAvailabilitySync(e){return this._cache.get(e)??ea.kw.NO}async getContextForDevices(e){const t=await new Promise((t=>{const n=this._offline.subscribeDevicesWithContext(Js.U9.fromPartial({uri:e}),(e=>{t(e),n.cancel()}))}));return t.deviceWithContext.filter((e=>!!e.device&&e.isSupported&&!!e.device.capabilities?.remoteDownloadsEnabled)).map((({device:e,context:t})=>{const{deviceId:n,cacheId:i,isLocal:r,name:s,type:a,lastSeenAt:o,platform:l}=e;return{deviceId:n,cacheId:i,deviceType:a,clientPlatform:l,isLocal:r,name:s,type:(0,ha.I)(a),lastSeenAtMs:o?.getTime()??0,contextDownloadAvailability:ga(t?.state),contextDownloadPercentage:t?.percentComplete??0}})).sort(((e,t)=>Number(t.isLocal)-Number(e.isLocal)))}async addDownload(e,t){const n=ia(this._username,e);null!==n&&await this._offline.addDownload(Js.WN.fromPartial({uri:n,device:t}))}async removeDownload(e,t){const n=ia(this._username,e);null!==n&&await this._offline.removeDownload(Js.WN.fromPartial({uri:n,device:t}))}async removeAllDownloads(){await this._offline.removeAllDownloads({})}async removeCache(){await this._storage.deleteUnlockedItems({})}async getStatistics(){const e=await this._storage.getStats({});return{currentSizeMB:Number(e.currentSize),currentLockedSizeMB:Number(e.currentLockedSize)}}}var ya=n(17121),va=n(32792);class ba{_info=null;getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!0,canGetFiles:!0,puffinEnabled:!0}}_isLocal=!1;_isAvailable=!1;_volume=-1;constructor(e,t,n){this._playbackService=e,this._storageService=t,this._connectServiceClient=n,this._events=new va.T,this._playbackService.subPlaybackInfo({},(async e=>{this._info=e,this._events.emit(va._.INFO,e)})),this._playbackService.subVolume({},(({volume:e})=>{this._volume=e,this.emitVolume()})),this._connectServiceClient&&this._connectServiceClient.state(s.d1.fromPartial({includeLocalDevice:!0}),(({devices:e})=>{const t=e.find((e=>e.isActive));t?(this._isLocal=t.isSelf,this._isAvailable=t.supportsVolume):(this._isLocal=!1,this._isAvailable=!0),this.emitVolume()}))}getEvents(){return this._events}async getVolume(){return this.getVolumeInternal()}async setVolume(e){this._playbackService.setVolume({source:a.Sf.USER,volume:e,connectLoggingParams:void 0})}async raiseVolume(){this._playbackService.raiseVolume({source:a.Sf.USER,connectLoggingParams:void 0})}async lowerVolume(){this._playbackService.lowerVolume({source:a.Sf.USER,connectLoggingParams:void 0})}async getPlaybackInfo(){return this._info}async getFiles(e){const t=await this._playbackService.getFiles({uri:e});if(t.status!==a.e6.GETFILES_OK)throw new Error(`Failed to get files for URI '${e}'. Error code: ${t.status}`);const n=await Promise.all(t.files.map((({fileId:e})=>this._storageService.getFileRanges({fileId:e,realm:Xs.Mx.STREAM}))));return t.files.map(((e,t)=>({...e,byteSize:n[t].byteSizeKnown?Number(n[t].byteSize):-1,byteRanges:n[t].ranges.map((e=>({fromByte:Number(e.fromByte),toByte:Number(e.toByte)})))})))}getVolumeInternal(){return this._isAvailable?this._volume:-1}emitVolume(){this._events.emit(va._.VOLUME,{volume:this.getVolumeInternal(),isLocal:this._isLocal})}}var Sa=n(61985),Aa=n(82445),Ca=n(89133),Ta=n(87464);const Ia={specificRestricted:!1,externalizationRestricted:!1,processingCapabilitiesRestricted:!1};var Oa=n(36406);class wa{constructor(e){this._localStorageAPI=e}setDevices(e){this._localStorageAPI.setItem(Oa.M4,e)}getDevices(){const e=this._localStorageAPI.getItem(Oa.M4);return e instanceof Error?null:e}getDevice(e){if(!e)return null;const t=this.getDevices();return t?.[e]??null}addDevice(e,t){if(!e)return;const n=this.getDevices();this.setDevices({...n,[e]:t})}updateDevice(e,t){if(!e)return;const n=this.getDevices();n?.[e]&&this.setDevices({...n,[e]:{...n[e],...t}})}removeDevice(e){if(!e)return;const t=this.getDevices();if(t){const{[e]:n,...i}=t;this.setDevices(i)}}}class Na{getFilterState(){return Promise.resolve(null)}getDevices(){return Promise.resolve([])}getFiltersEvents(){return null}setCurrentDevice(){return Promise.resolve(void 0)}getSavedDevices(){return[]}removeCurrentDevice(){}isNormalizationOverriden(){return!1}disableNormalizationOverride(){}isAvailable(){return!1}}const Ra=e=>e?.filterFiles.map((e=>e.id))??[],Pa=`${Cs.I_}/better-sound-filters/v1`;class La{_devicesCache=new Map;_deviceFiltersCache=new Map;_filterBytesCache=new Map;_inflightGetDevicesCache=new Le.od;_inflightGetFiltersCache=new Le.od;async fetchFilterBytesFromCDN(e){if(!this._filterBytesCache.has(e.id)){const t=await fetch(e.url);if(!t.ok)throw new Error(`CDN request for filter ${e.id} failed with status ${t.status}`);const n=await t.arrayBuffer();if(!(n.byteLength>0))throw new Error(`CDN returned null for filter ${e.id}!`);{const t=new Uint8Array(n);this._filterBytesCache.set(e.id,t)}}}async getFilterBytesForDevice(e){const t=e.specificEnabled?.filterFiles||[],n=e.specificDisabled?.filterFiles||[],i=e.externalizationEnabled?.filterFiles||[],r=e.externalizationDisabled?.filterFiles||[],s=t.concat(n,i,r);await Promise.all(s.map((e=>this.fetchFilterBytesFromCDN(e))))}constructor(e){this._builder=e}async getDevices(){if(this._devicesCache.size>0)return this._devicesCache;const e=(await this._inflightGetDevicesCache.create("getDevices",(()=>this._builder.build().withoutMarket().withJsonContentType().withHost(Pa).withPath("/get-devices/").send()))).body.devices;return this._devicesCache.size!==e.length&&(this._devicesCache.clear(),e.forEach((e=>this._devicesCache.set(e.id,e)))),this._devicesCache}async getFiltersForDevice(e,t){if(!e)return null;const n=this._deviceFiltersCache.get(e);if(n)return n;const i=(await this.getDevices()).get(e)??{brand:"",model:""},r=(await this._inflightGetFiltersCache.create(`getFiltersForDevice:${i.brand}:${i.model}`,(()=>this._builder.build().withoutMarket().withJsonContentType().withHost(Pa).withPath(`/map-device-to-filters/?brand=${encodeURIComponent(i.brand)}&model=${encodeURIComponent(i.model)}&format=${t.version}`).send()))).body;await this.getFilterBytesForDevice(r);const s=r;return this._deviceFiltersCache.set(e,s),s}async getFilterDataForDevice(e,t,n,i){const r=await this.getFiltersForDevice(e,i);if(!r)throw new Error(`No filters exist for device ${e}`);const s=Ra(t?r.specificEnabled:r.specificDisabled);return{filterData:Ra(n?r.externalizationEnabled:r.externalizationDisabled).concat(s||[]).map((e=>{const t=this.getFilterBytes(e);if(!t)throw new Error(`Filter ${e} not found!`);return t})),deviceFilters:r}}getFilterBytes(e){return this._filterBytesCache.get(e)}}const Da={specificEnabled:!1,externalizationEnabled:!1};class ka{getCurrentAudioDeviceId(){return this._audioOutputDevicesApi.getDefaultDevice()?.id??null}constructor(e,t,n){this._audioOutputDevicesApi=e,this._devicePersister=t,this._externalAccessoryAPI=n}getCurrentDeviceState(){const e=this.getCurrentAudioDeviceId();return this._devicePersister.getDevice(e)}updateCurrentDeviceState(e){const t=this.getCurrentAudioDeviceId();return t?(this._devicePersister.updateDevice(t,{filterState:e}),e):Da}setCurrentDevice(e,t=null){const n=this.getCurrentAudioDeviceId();if(null===e)return this._devicePersister.updateDevice(n,{predictedState:t,headphoneDevice:null}),Da;const i=this._devicePersister.getDevice(n);return i?(this._devicePersister.updateDevice(n,{headphoneDevice:e}),null!==i.filterState?i.filterState:Da):(this._devicePersister.addDevice(n,{headphoneDevice:e,filterState:null,predictedState:t}),Da)}async predictDevice(e,t){let n,i=null;if(e.transportType===un.Yg.BLUETOOTH){const r=await this._externalAccessoryAPI.lookup(e.name);if(!r.model||!r.brand||r.type===rs.G.UNKNOWN)return{maybeDevice:void 0,predictedState:null};n=Array.from(t.values()).find((e=>e.deviceName.toLowerCase().includes(r.model.toLowerCase())&&e.brand.toLowerCase().includes(r.brand.toLowerCase()))),i={predictedBrand:r.brand,predictedModel:r.model,wasMatched:!!n}}return{maybeDevice:n,predictedState:i}}}let xa=function(e){return e.UNKNOWN="UNKNOWN",e.NON_AMBIGUOUS_DEVICE="NON_AMBIGUOUS_DEVICE",e.AMBIGUOUS_DEVICE="AMBIGUOUS_DEVICE",e.UNRECOGNIZED="UNRECOGNIZED",e}({});function Ua(e,t){return{specificEnabled:e.specificEnabled&&!t.specificRestricted&&!t.processingCapabilitiesRestricted,externalizationEnabled:e.externalizationEnabled&&!t.externalizationRestricted}}var Ma=n(29746);const Ba=e=>{const t=e?.item?.type,n=e?.item?.mediaType;switch(t){case yt.c.CHAPTER:return"audiobook";case yt.c.EPISODE:return"audio"===n?"audio_podcast":"unknown";case yt.c.TRACK:return"track";default:return"unknown"}};class ja{async _initializeCurrentDevice(e,t){if(!e)return void this.setCurrentDevice(null,t);const n=this._devicePersister.getDevice(e?.id);if(n)return void this.setCurrentDevice(n.headphoneDevice,t);if(e.terminalType!==un.FI.HEADPHONES&&e.transportType!==un.Yg.BLUETOOTH)return void this.setCurrentDevice(null,t);const i=await this.getDevices(),{maybeDevice:r,predictedState:s}=await this._playbackFiltersDeviceService.predictDevice(e,i);this.setCurrentDevice(r??null,t,s)}async updateCurrentDeviceState(e){const t=this._playbackFiltersDeviceService.updateCurrentDeviceState(e);return this.setFilters(t)}async _updateCurrentFilter(){const{currentState:e}=await this._currentDeviceFilterState();await this.setFilters(e,!1)}async setFilters(e,t){const n=this._playbackFiltersDeviceService.getCurrentDeviceState(),{specificEnabled:i,externalizationEnabled:r}=Ua(e,this._contentRestrictions);if(this._shouldOverrideNormalization&&(n?await this._puffin.enterProcessingEnvironment({}):await this._puffin.leaveProcessingEnvironment({})),!n||!i&&!r||!n.headphoneDevice){try{await this._puffin.disableProcessing({reason:t?Aa.By.USER_INITIATED:Aa.By.UNKNOWN})}finally{this._events.emit(Ca.n.UPDATE,{})}return}const s=n.headphoneDevice.id,{filterData:a,deviceFilters:o}=await this._playbackFiltersService.getFilterDataForDevice(s,i,r,await this._puffin.libraryVersion({}));try{await this._puffin.filter(Aa.cj.fromPartial({filters:a,isO:i,isV:r,reason:t?Aa.By.USER_INITIATED:Aa.By.UNKNOWN}))}finally{((e,t,n,i)=>{const r=t.getState();e.send((0,Ma.v)({specific_enabled:n.specificEnabled,externalization_enabled:n.externalizationEnabled,specific_filter_id:n.specificEnabled?i.specificEnabled?.id:i.specificDisabled?.id,content_type:Ba(r),content_uri:r?.item?.uri,specific_enabled_revision:i.specificEnabled?.revision,format:i.externalizationEnabled?.format}))})(this._eventSender,this.__playerAPI,e,o),this._events.emit(Ca.n.UPDATE,{})}}async _currentDeviceFilterState(){const e=this._playbackFiltersDeviceService.getCurrentDeviceState(),t=(e?.headphoneDevice??null)?.id;return function(e,t,n,i,r){const s=e?.filterState??{specificEnabled:!1,externalizationEnabled:!1},a=e?.headphoneDevice??null,o=((e,t)=>({canTuneHeadphones:!(!e||!e.specificEnabled||t.specificRestricted||t.processingCapabilitiesRestricted)&&e.specificEnabled.filterFiles.length>0,canTuneStudio:!1}))(t,n);return{headphoneDevice:a,audioDevice:i.getDefaultDevice(),predictedState:e?.predictedState??null,isOnboarded:null!==e&&null!==e.filterState,currentState:Ua(s,n),contentRestrictions:n,toggleTuneHeadphones:e&&o.canTuneHeadphones?()=>r({specificEnabled:!s.specificEnabled,externalizationEnabled:s.externalizationEnabled}):null,toggleTuneStudio:e&&o.canTuneStudio?()=>r({specificEnabled:s.specificEnabled,externalizationEnabled:!s.externalizationEnabled}):null,setFilterState:e=>r(e),wasAmbiguous:t?.status===xa.AMBIGUOUS_DEVICE}}(e,t?await this._playbackFiltersService.getFiltersForDevice(t,await this._puffin.libraryVersion({})):null,this._contentRestrictions,this._audioOutputDevicesAPI,this.updateCurrentDeviceState.bind(this))}constructor(e,t,n,i,r,s,a){this._builder=e,this._puffin=t,this._localStorageAPI=n,this.__eventSender=i,this.__playerAPI=r,this._audioOutputDevicesAPI=s,this._externalAccessoryAPI=a,this._events=new Ca.G,this._contentRestrictions=Ia,this._eventSender=this.__eventSender,this._playerAPI=this.__playerAPI,this._devicePersister=new wa(this._localStorageAPI),this._playbackFiltersService=new La(e),this._playbackFiltersDeviceService=new ka(this._audioOutputDevicesAPI,this._devicePersister,this._externalAccessoryAPI);const o=this._localStorageAPI.getItem(Oa.UT);this._shouldOverrideNormalization=o instanceof Error||!o,this._puffin.subscribeToErrors({},(e=>console.error("Puffin service error!",e))),this._audioOutputDevicesAPI.getEvents().addListener(pn.B.DEVICE_CONNECTED,(async()=>{const e=this._audioOutputDevicesAPI.getDefaultDevice();await this._initializeCurrentDevice(e,!1)})),((e,t,n)=>{let i={...Ia};t.subscribeToProcessingCompatibility({},(e=>{const t={...i};e.isCompatible?t.processingCapabilitiesRestricted=!1:t.processingCapabilitiesRestricted=!0,i.processingCapabilitiesRestricted!==t.processingCapabilitiesRestricted&&n(t),i=t})),e.getEvents().addListener(Ta.gd.UPDATE,(({data:e})=>{const t=e?.item?.type,r=e?.item?.mediaType,s={...i};switch(t){case yt.c.CHAPTER:case yt.c.EPISODE:s.specificRestricted="video"===r||"mixed"===r,s.externalizationRestricted=!0;break;case yt.c.TRACK:s.specificRestricted="video"===r,s.externalizationRestricted=!1;break;case yt.c.UNKNOWN:break;default:s.specificRestricted=!0,s.externalizationRestricted=!0}i.specificRestricted===s.specificRestricted&&i.externalizationRestricted===s.externalizationRestricted||n(s),i=s}))})(this._playerAPI,this._puffin,(e=>{this._contentRestrictions={...e},this._updateCurrentFilter()}))}async getDevices(){const e=await this._playbackFiltersService.getDevices();return Array.from(e.values())}async getFilterState(){return this._currentDeviceFilterState()}async setCurrentDevice(e,t,n){const i=this._playbackFiltersDeviceService.setCurrentDevice(e,n??null);return this.setFilters(i,t)}getSavedDevices(){const e=this._devicePersister.getDevices();return null===e?[]:Object.values(e).filter((e=>null!==e.filterState))}async removeCurrentDevice(e){await this.setCurrentDevice(null,e);const t=this._audioOutputDevicesAPI.getDefaultDevice(),n=t?.id??null;this._devicePersister.removeDevice(n),this._initializeCurrentDevice(t,e),this._events.emit(Ca.n.UPDATE,{})}getFiltersEvents(){return this._events}isNormalizationOverriden(){return this._shouldOverrideNormalization}disableNormalizationOverride(){this._localStorageAPI.setItem(Oa.UT,!0),this._shouldOverrideNormalization=!1,this._events.emit(Ca.n.NORMALIZATION_OVERRIDE_DISABLED,{})}isAvailable(){return!0}}var Fa=n(25357);var Va=n(61451);function Ga(e){return Et.xd.fromPartial({uid:e.uid??"",uri:e.uri,metadata:e.metadata??{}})}function Ha({uri:e,url:t,nextPageUrl:n,items:i,metadata:r}){if(void 0!==t)return Et.hn.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==i)return Et.hn.fromPartial({tracks:i.map(Ga),nextPageUrl:n,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function Wa(e){return Et.uF.fromPartial({disallowPausingReasons:e?.disallowPausingReasons,disallowResumingReasons:e?.disallowResumingReasons,disallowSeekingReasons:e?.disallowSeekingReasons,disallowSkippingPrevReasons:e?.disallowSkippingPreviousReasons,disallowSkippingNextReasons:e?.disallowSkippingNextReasons,disallowTogglingRepeatContextReasons:e?.disallowTogglingRepeatContextReasons,disallowTogglingRepeatTrackReasons:e?.disallowTogglingRepeatTrackReasons,disallowTogglingShuffleReasons:e?.disallowTogglingShuffleReasons,disallowSettingPlaybackSpeedReasons:e?.disallowSettingPlaybackSpeedReasons})}function za({uri:e,url:t,pages:n,metadata:i,restrictions:r}){return void 0!==n?Et.ob.fromPartial({uri:e,url:t,pages:n.map(Ha),metadata:i,restrictions:Wa(r),isLoading:!1}):Et.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoading:!0,restrictions:Wa(r)})}function Ka(e){return Et.xi.fromPartial({featureIdentifier:e.featureIdentifier??"",featureVersion:e.featureVersion??"",referrerIdentifier:e.referrerIdentifier??"",viewUri:e.viewURI??"",externalReferrer:e.externalReferrer??""})}function Ya(e,{shuffle:t,repeat:n,modes:i}){const r=Et.Vk.fromPartial({modes:i});return void 0!==t?r.shufflingContext={value:t}:(0,C.WB1)(e.uri)&&(r.shufflingContext={value:!1}),void 0!==n?(r.repeatingContext={value:n!==Fa.p.REPEAT_NONE},r.repeatingTrack={value:n===Fa.p.REPEAT_TRACK}):(0,C.WB1)(e.uri)&&(r.repeatingContext={value:!1},r.repeatingTrack={value:!1}),r}function qa(e,t){return Et.YH.fromPartial({skipTo:void 0!==t.skipTo?(n=t.skipTo,{pageUrl:n.pageURL??"",pageIndex:void 0!==n.pageIndex?{value:BigInt(n.pageIndex)}:void 0,trackUid:n.uid??"",trackUri:n.uri??"",trackIndex:void 0!==n.index?{value:BigInt(n.index)}:void 0}):void 0,seekTo:void 0!==t.seekTo?{value:BigInt(t.seekTo)}:void 0,playerOptionsOverride:Ya(e,t)});var n}function $a({uri:e,url:t,nextPageUrl:n,items:i,metadata:r}){if(void 0!==t)return as.hn.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==i)return as.hn.fromPartial({tracks:i.map(Ga),nextPageUrl:n,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function Za({uri:e,url:t,pages:n,metadata:i,restrictions:r}){return void 0!==n?as.ob.fromPartial({uri:e,url:t,pages:n.map($a),metadata:i,restrictions:Wa(r),isLoading:!1}):as.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoading:!0})}function Qa(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}const Ja=(e=[])=>e.map((e=>{switch(e){case Us.YB.AVAILABLE_OFFLINE:return Cr.l98.AVAILABLE_OFFLINE;case Us.YB.IN_PROGRESS:return Cr.l98.IN_PROGRESS;case Us.YB.UNPLAYED:return Cr.l98.UNPLAYED;case Us.YB.ARTIST_NOT_BANNED:return Cr.l98.ARTIST_NOT_BANNED;case Us.YB.AVAILABLE:return Cr.l98.AVAILABLE;case Us.YB.NOT_BANNED:return Cr.l98.NOT_BANNED;case Us.YB.NOT_EPISODE:return Cr.l98.NOT_EPISODE;case Us.YB.NOT_EXPLICIT:return Cr.l98.NOT_EXPLICIT;case Us.YB.NOT_FULLY_PLAYED:return Cr.l98.NOT_FULLY_PLAYED;default:return(0,ut.k)(e),Cr.l98.UNRECOGNIZED}}));function Xa(e){if(void 0===e)return Cr.RHQ.NO_SORT;const{field:t,order:n}=e;switch(t){case Us.nw.TITLE:return n===Us.xB.DESC?Cr.RHQ.NAME_DESC:Cr.RHQ.NAME_ASC;case Us.nw.ADDED_AT:return n===Us.xB.DESC?Cr.RHQ.ADD_TIME_DESC:Cr.RHQ.ADD_TIME_ASC;case Us.nw.ADDED_BY:return n===Us.xB.DESC?Cr.RHQ.ADDED_BY_DESC:Cr.RHQ.ADDED_BY_ASC;case Us.nw.ALBUM:return n===Us.xB.DESC?Cr.RHQ.ALBUM_NAME_DESC:Cr.RHQ.ALBUM_NAME_ASC;case Us.nw.ARTIST:return n===Us.xB.DESC?Cr.RHQ.ARTIST_NAME_DESC:Cr.RHQ.ARTIST_NAME_ASC;case Us.nw.DURATION:return n===Us.xB.DESC?Cr.RHQ.DURATION_DESC:Cr.RHQ.DURATION_ASC;case Us.nw.SHOW_NAME:return n===Us.xB.DESC?Cr.RHQ.SHOW_NAME_DESC:Cr.RHQ.SHOW_NAME_ASC;case Us.nw.PUBLISH_DATE:return n===Us.xB.DESC?Cr.RHQ.PUBLISH_DATE_DESC:Cr.RHQ.PUBLISH_DATE_ASC;default:return(0,ut.k)(t),Cr.RHQ.NO_SORT}}function eo(e){const t=Ja(e?.filterPredicates);return e?.includeRecommendations||t.push(Cr.l98.NOT_RECOMMENDATION),Cr.bpJ.fromPartial({supportedPlaceholderTypes:[Cr.JaG.SHOW],textFilter:Qa(e?.filter),sortBy:Xa(e?.sort),showUnavailable:!0,range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,boolPredicates:t})}const to=[{error:Et.wM.FORBIDDEN,reasons:"already_paused"}];function no(e){if(e.error!==Et.wM.OK&&!to.some((t=>t.error===e.error&&t.reasons===e.reasons)))throw new Error(`Command failed with code '${e.error}' and reasons '${e.reasons}'`);return{}}function io(e){return Et.OU.fromPartial({commandInitiatedTime:{value:BigInt(Date.now())},interactionIds:e?.interactionId?[e.interactionId]:void 0,pageInstanceIds:e?.pageInstanceId?[e.pageInstanceId]:void 0})}async function ro(e,t,n,i,r,s){var a,o;t&&await(a=n.maybeResync(i.uri),o=750,Promise.race([a,new Promise((e=>setTimeout(e,o)))]));const l=Cr.wQe.fromPartial({playlistQuery:eo(i.playlistQueryOptions),context:za(i),preparePlayOptions:qa(i,s),playOrigin:Ka(r),loggingParams:io(s.loggingParams)});return await e.play(l)}async function so(e,t,n,i,r){return e.setQueue(Et.LC.fromPartial({nextTracks:t,prevTracks:n,queueRevision:BigInt(i),loggingParams:io(r)}))}function ao(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.image_url,label:"standard"},{url:e.image_small_url,label:"small"},{url:e.image_large_url,label:"large"},{url:e.image_xlarge_url,label:"xlarge"})}function oo(e){return{milliseconds:(t=e,n=-1,t?parseInt(t,10):n)};var t,n}function lo(e){return"true"===e?.toLowerCase()}const co=9;function uo(e,t){if(void 0===e)return[];const n="artist_uri",i="artist_name",r=[{type:t,uri:e[n]??"",name:e[i]??""}];for(let s=1;s<=co;++s){const a=`${n}:${s}`,o=`${i}:${s}`;if(!e[a]||!e[o])break;r.push({type:t,uri:e[a]??"",name:e[o]??""})}return r}function po(e){return{type:yt.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:ao(e)}}function mo(e){return{type:yt.c.SHOW,uri:e.album_uri??"",name:e.album_title??"",images:ao(e)}}function ho(e){return{type:yt.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:ao(e)}}function fo(e){return{type:yt.c.AUDIOBOOK,uri:e.album_uri??"",name:e.album_title??"",images:ao(e)}}function go(e,t){return(0,C.U_m)(t.uri)||(0,C.PkR)(t.uri)?function(e,t){const n=t.metadata;return{type:yt.c.TRACK,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:oo(n.duration),album:po(n),artists:uo(n,yt.c.ARTIST),isLocal:lo(n.is_local),isExplicit:lo(n.is_explicit),is19PlusOnly:lo(n.is_19_plus),hasAssociatedVideo:!!n.video_association,provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t):(0,C.gHQ)(t.uri)?function(e){return"true"===e.metadata.is_audiobook_chapter}(t)?function(e,t){const n=t.metadata;return{type:yt.c.CHAPTER,uri:t.uri,uid:t.uid,artists:[],name:n.title??"",mediaType:n["media.type"]??"audio",duration:oo(n.duration),book:fo(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:lo(n.is_explicit),is19PlusOnly:lo(n.is_19_plus),get images(){return this.book.images}}}(e,t):function(e,t){const n=t.metadata;return{type:yt.c.EPISODE,uri:t.uri,uid:t.uid,artists:[],name:n.title??"",mediaType:n["media.type"]??"audio",duration:oo(n.duration),show:mo(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:lo(n.is_explicit),is19PlusOnly:lo(n.is_19_plus),get images(){return this.show.images}}}(e,t):(0,C.AIy)(t.uri)?function(e,t){const n=t.metadata,i=lo(n.is_podcast_advertisement),r=n.artist_name??null;return{type:yt.c.AD,uri:t.uri,uid:t.uid,title:n.title??null,advertiser:i?r:n.advertiser??null,url:n.click_url??null,id:n.ad_id??null,mediaType:n["media.type"]??"audio",duration:oo(n.duration),images:ao(n),videoOrientation:n["ad.video_orientation"],isPodcastAd:i,isSkippableAd:lo(n["ad.is_skippable"]),isTestAd:lo(n["ad.is_test"]),provider:e.provider.length>0?e.provider:null,metadata:t.metadata}}(e,t):function(e,t){const n=t.metadata;return{type:yt.c.UNKNOWN,uri:t.uri,uid:t.uid??null,name:n.title??"",mediaType:n["media.type"]??"audio",duration:oo(n.duration),album:ho(n),artists:uo(n,yt.c.ARTIST),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t)}var Eo=n(13659),_o=n(78613);const yo={canPause:!0,canResume:!0,canSeek:!0,canSkipPrevious:!0,canSkipNext:!0,canToggleRepeatContext:!0,canToggleRepeatTrack:!0,canToggleShuffle:!0,canToggleSmartShuffle:!0,disallowPausingReasons:[],disallowResumingReasons:[],disallowSeekingReasons:[],disallowSkippingPreviousReasons:[],disallowSkippingNextReasons:[],disallowSettingPlaybackSpeedReasons:[],disallowTogglingRepeatContextReasons:[],disallowTogglingRepeatTrackReasons:[],disallowTogglingShuffleReasons:[],disallowTransferringPlaybackReasons:[],disallowAddToQueueReasons:[],disallowSetQueueReasons:[],disallowSignals:{}};function vo(e=[]){return e.map((e=>Eo.D.includes(e)?e:"unknown"))}function bo(e){const t={};for(const n in e)(0,_o.F)(n)&&(t[n]=vo(e[n].reasons));return t}function So(e){return{canPause:0===e.disallowPausingReasons.length,canResume:0===e.disallowResumingReasons.length,canSeek:0===e.disallowSeekingReasons.length,canSkipPrevious:0===e.disallowSkippingPrevReasons.length,canSkipNext:0===e.disallowSkippingNextReasons.length,canToggleRepeatContext:0===e.disallowTogglingRepeatContextReasons.length,canToggleRepeatTrack:0===e.disallowTogglingRepeatTrackReasons.length,canToggleShuffle:0===e.disallowTogglingShuffleReasons.length,canToggleSmartShuffle:0===(e.disallowSettingModes.context_enhancement?.values.RECOMMENDATION?.reasons?.filter((e=>"already_set"!==e)).length??0),disallowPausingReasons:vo(e.disallowPausingReasons),disallowResumingReasons:vo(e.disallowResumingReasons),disallowSeekingReasons:vo(e.disallowSeekingReasons),disallowSkippingPreviousReasons:vo(e.disallowSkippingPrevReasons),disallowSkippingNextReasons:vo(e.disallowSkippingNextReasons),disallowTogglingRepeatContextReasons:vo(e.disallowTogglingRepeatContextReasons),disallowTogglingRepeatTrackReasons:vo(e.disallowTogglingRepeatTrackReasons),disallowTogglingShuffleReasons:vo(e.disallowTogglingShuffleReasons),disallowTransferringPlaybackReasons:vo(e.disallowTransferringPlaybackReasons),disallowAddToQueueReasons:vo(e.disallowAddToQueueReasons),disallowSetQueueReasons:vo(e.disallowSetQueueReasons),disallowSettingPlaybackSpeedReasons:vo(e.disallowSettingPlaybackSpeedReasons),disallowSignals:bo(e.disallowSignals)}}var Ao=n(29475);const Co={bitrateLevel:Ao.Yn.UNKNOWN,strategy:Ao.ZT.UNKNOWN,targetBitrateLevel:Ao.Yn.UNKNOWN,targetBitrateAvailable:!1,losslessStatus:Ao.p4.NONE};function To(e){const t=e=>{switch(e){case Et.$E.LOW:return Ao.Yn.LOW;case Et.$E.NORMAL:return Ao.Yn.NORMAL;case Et.$E.HIGH:return Ao.Yn.HIGH;case Et.$E.VERY_HIGH:return Ao.Yn.VERY_HIGH;case Et.$E.HIFI:return Ao.Yn.LOSSLESS;case Et.$E.HIFI24:return Ao.Yn.LOSSLESS_24;default:return Ao.Yn.UNKNOWN}};return{bitrateLevel:t(e.bitrateLevel),strategy:(()=>{switch(e.strategy){case Et.Mc.BEST_MATCHING:return Ao.ZT.BEST_MATCHING;case Et.Mc.BACKEND_ADVISED:return Ao.ZT.BACKEND_ADVISED;case Et.Mc.OFFLINED_FILE:return Ao.ZT.OFFLINED_FILE;case Et.Mc.CACHED_FILE:return Ao.ZT.CACHED_FILE;case Et.Mc.LOCAL_FILE:return Ao.ZT.LOCAL_FILE;default:return Ao.ZT.UNKNOWN}})(),targetBitrateLevel:t(e.targetBitrateLevel),targetBitrateAvailable:e.targetBitrateAvailable,losslessStatus:(()=>{switch(e.hifiStatus){case Et.o_.UNRECOGNIZED:case Et.o_.NONE:default:return Ao.p4.NONE;case Et.o_.OFF:return Ao.p4.OFF;case Et.o_.ON:return Ao.p4.ON}})()}}var Io=n(23091);var Oo=n(70207);function wo(e){return new Oo.q3(function(e){switch(e){case Et.tE.SUCCESS:return Oo.Z9.SUCCESS;case Et.tE.PLAYBACK_STUCK:return Oo.Z9.PLAYBACK_STUCK;case Et.tE.PLAYBACK_ERROR:return Oo.Z9.PLAYBACK_ERROR;case Et.tE.LICENSE_CHANGE:return Oo.Z9.LICENSE_CHANGE;case Et.tE.PLAY_RESTRICTED:return Oo.Z9.PLAY_RESTRICTED;case Et.tE.STOP_RESTRICTED:return Oo.Z9.STOP_RESTRICTED;case Et.tE.UPDATE_RESTRICTED:return Oo.Z9.UPDATE_RESTRICTED;case Et.tE.PAUSE_RESTRICTED:return Oo.Z9.PAUSE_RESTRICTED;case Et.tE.RESUME_RESTRICTED:return Oo.Z9.RESUME_RESTRICTED;case Et.tE.SKIP_TO_PREV_RESTRICTED:return Oo.Z9.SKIP_TO_PREV_RESTRICTED;case Et.tE.SKIP_TO_NEXT_RESTRICTED:return Oo.Z9.SKIP_TO_NEXT_RESTRICTED;case Et.tE.SKIP_TO_NON_EXISTENT_TRACK:return Oo.Z9.SKIP_TO_NON_EXISTENT_TRACK;case Et.tE.SEEK_TO_RESTRICTED:return Oo.Z9.SEEK_TO_RESTRICTED;case Et.tE.TOGGLE_REPEAT_CONTEXT_RESTRICTED:return Oo.Z9.TOGGLE_REPEAT_CONTEXT_RESTRICTED;case Et.tE.TOGGLE_REPEAT_TRACK_RESTRICTED:return Oo.Z9.TOGGLE_REPEAT_TRACK_RESTRICTED;case Et.tE.SET_OPTIONS_RESTRICTED:return Oo.Z9.SET_OPTIONS_RESTRICTED;case Et.tE.TOGGLE_SHUFFLE_RESTRICTED:return Oo.Z9.TOGGLE_SHUFFLE_RESTRICTED;case Et.tE.SET_QUEUE_RESTRICTED:return Oo.Z9.SET_QUEUE_RESTRICTED;case Et.tE.INTERRUPT_PLAYBACK_RESTRICTED:return Oo.Z9.INTERRUPT_PLAYBACK_RESTRICTED;case Et.tE.ONE_TRACK_UNPLAYABLE:return Oo.Z9.ONE_TRACK_UNPLAYABLE;case Et.tE.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:return Oo.Z9.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED;case Et.tE.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return Oo.Z9.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED;case Et.tE.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED:return Oo.Z9.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED;case Et.tE.QUEUE_REVISION_MISMATCH:return Oo.Z9.QUEUE_REVISION_MISMATCH;case Et.tE.VIDEO_PLAYBACK_ERROR:return Oo.Z9.VIDEO_PLAYBACK_ERROR;case Et.tE.VIDEO_GEOGRAPHICALLY_RESTRICTED:return Oo.Z9.VIDEO_GEORESTRICTED;case Et.tE.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return Oo.Z9.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case Et.tE.VIDEO_UNSUPPORTED_CLIENT_VERSION:return Oo.Z9.VIDEO_UNSUPPORTED_CLIENT_VERSION;case Et.tE.VIDEO_UNSUPPORTED_KEY_SYSTEM:return Oo.Z9.VIDEO_UNSUPPORTED_KEY_SYSTEM;case Et.tE.VIDEO_MANIFEST_DELETED:return Oo.Z9.VIDEO_MANIFEST_DELETED;case Et.tE.VIDEO_COUNTRY_RESTRICTED:return Oo.Z9.VIDEO_COUNTRY_RESTRICTED;case Et.tE.VIDEO_UNAVAILABLE:return Oo.Z9.VIDEO_UNAVAILABLE;case Et.tE.VIDEO_CATALOGUE_RESTRICTED:return Oo.Z9.VIDEO_CATALOGUE_RESTRICTED;case Et.tE.INVALID:return Oo.Z9.INVALID;case Et.tE.TIMEOUT:return Oo.Z9.TIMEOUT;case Et.tE.PLAYBACK_REPORTING_ERROR:return Oo.Z9.PLAYBACK_REPORTING_ERROR;case Et.tE.AUDIOBOOK_NOT_PLAYABLE:return Oo.Z9.AUDIOBOOK_NOT_PLAYABLE;case Et.tE.UNKNOWN:return Oo.Z9.UNKNOWN;case Et.tE.UNRECOGNIZED:default:return Oo.Z9.UNRECOGNIZED}}(e.code),e.data.reasons?e.data.reasons.split(","):[])}let No=!1;class Ro extends Ta.JW{constructor(e,t,n){super(),this._client=e;let i=null,r=null;this._client.getState(Et.T1.fromPartial({prevTracksCap:{value:BigInt(n)},nextTracksCap:{value:BigInt(t)}}),(e=>{const t=function(e){const t={timestamp:Number(e.timestamp),context:{uri:e.contextUri,url:e.contextUrl,metadata:e.contextMetadata},index:{pageURI:e.pageMetadata.page_uri??null,pageIndex:void 0!==e.index?.page?Number(e.index.page):null,itemIndex:void 0!==e.index?.track?Number(e.index.track):null},item:null,shuffle:null,smartShuffle:null,repeat:null,speed:void 0!==e.playbackSpeed?.value?Number(e.playbackSpeed.value):1,speedEsperanto:e.options?.playbackSpeed??1,positionAsOfTimestamp:Number(e.positionAsOfTimestamp?.value??0),duration:void 0!==e.duration?Number(e.duration.value):null,hasContext:e.isPlaying&&void 0!==e.track,isPaused:e.isPaused,isBuffering:e.isBuffering,restrictions:void 0!==e.restrictions?So(e.restrictions):yo,previousItems:[],nextItems:[],playbackQuality:void 0!==e.playbackQuality?To(e.playbackQuality):Co,playbackId:e.playbackId.length>0?(0,Io.U5)(e.playbackId):null,sessionId:e.sessionId,signals:e.signals};return void 0!==e.options&&(t.shuffle=e.options.shufflingContext,e.options.repeatingTrack?t.repeat=Fa.p.REPEAT_TRACK:e.options.repeatingContext?t.repeat=Fa.p.REPEAT_CONTEXT:t.repeat=Fa.p.REPEAT_NONE,t.smartShuffle=e.options.shufflingContext&&("RECOMMENDATION"===e.options.modes.context_enhancement||"true"===e.contextMetadata.enhanced_context)),void 0!==e.track&&void 0!==e.track.contextTrack&&(t.item=go(e.track,e.track.contextTrack)),e.prevTracks.forEach((e=>{e.contextTrack&&t.previousItems.push(go(e,e.contextTrack))})),e.nextTracks.forEach((e=>{e.contextTrack&&t.nextItems.push(go(e,e.contextTrack))})),t}(e);e.timestamp===BigInt(0)?null===r&&(r=setTimeout((()=>{this.emit(Ta.gd.UPDATE,t)}),500)):(null!==r&&(clearTimeout(r),r=null),this.emit(Ta.gd.UPDATE,t),null!==i&&function(e,t){const n=e.contextUri===t.contextUri,i=e.sessionId===t.sessionId,r=(s=e.playbackId,a=t.playbackId,s.byteLength===a.byteLength&&s.every(((e,t)=>e===a[t])));var s,a;const o=t.isPaused,l=t.positionAsOfTimestamp?.value===BigInt(0);return n&&i?(o||(No=!0),!r&&No&&o&&l):(No=!1,!1)}(i,e)&&this.emit(Ta.gd.CONTEXT_WRAPAROUND,{contextURI:e.contextUri,previousItemURI:i.track?.contextTrack?.uri??null}),i=e)})),this._client.getError(Et.mc.fromPartial({}),(e=>{this.emit(Ta.gd.ERROR,wo(e))}))}}var Po=n(98220);class Lo{_queue=null;timeoutId=null;constructor(e,t,n,i){this._client=e,this._events=t,this.getRepeatMode=n,this._shouldRenderSecondRepeatedContextItemsIteration=i,this._client.getQueue(Et.jy.fromPartial({}),(e=>{const t=!e.track?.contextTrack||0===e.nextTracks.length;this._queue=e,this._queueState=this.convertQueueState(e,this.getRepeatMode()),clearTimeout(this.timeoutId??0),t?this.timeoutId=setTimeout((()=>{this._events.emitQueueUpdate(this._queueState)}),500):this._events.emitQueueUpdate(this._queueState)})),this._queueState=(0,Po.RU)([],this.getRepeatMode(),this._shouldRenderSecondRepeatedContextItemsIteration)}convertQueueState(e,t){const n=e?.track&&e.track.contextTrack?go(e.track,e.track.contextTrack):null,i=this._queue?.nextTracks?.filter((e=>e.contextTrack)).map((e=>go(e,e.contextTrack)))??[],r=n?[n,...i]:i;return(0,Po.RU)(r,t,this._shouldRenderSecondRepeatedContextItemsIteration)}isSameItem(e,t){return e.uid&&t.contextTrack?.uid?e.uid===t.contextTrack?.uid:e.uri===t.contextTrack?.uri}isQueued(e){return"queue"===e.provider}markAsQueued(e){return Et.zz.fromPartial({...e,contextTrack:Et.xd.fromPartial({...e.contextTrack,metadata:{...e.contextTrack?.metadata,is_queued:"true"}}),provider:"queue"})}createQueueItem(e,t){return Et.zz.fromPartial({contextTrack:Et.xd.fromPartial({uri:e.uri,metadata:{is_queued:t.toString()}}),provider:t?"queue":"context"})}async addToQueue(e,t){if(null!==this._queue)if(1===e.length)await async function(e,{uid:t,uri:n},i){return e.addToQueue(Et.jx.fromPartial({track:{uid:t??void 0,uri:n},loggingParams:io(i)}))}(this._client,e[0],t);else{const n=e.map((e=>this.createQueueItem(e,!0))),i=[...this._queue?.nextTracks||[]],r=i.map((e=>e.provider)).lastIndexOf("queue");i.splice(r+1,0,...n),await so(this._client,i,this._queue.prevTracks,this._queue.queueRevision.toString(),t)}}async removeFromQueue(e){null!==this._queue&&await so(this._client,this._queue.nextTracks.filter((t=>!e.some((e=>this.isSameItem(e,t))))),this._queue.prevTracks,this._queue.queueRevision.toString())}async clearQueue(){null!==this._queue&&await so(this._client,this._queue.nextTracks.filter((e=>!this.isQueued(e))),this._queue.prevTracks,this._queue.queueRevision.toString())}async reorderQueue(e,t){if(null===this._queue)return;const n=[...this._queue?.nextTracks||[]];await so(this._client,(0,Po.jl)(e,n,t,this.isSameItem,this.isQueued,this.markAsQueued),this._queue.prevTracks,this._queue.queueRevision.toString())}async insertIntoQueue(e,t,n){if(null===this._queue)return;const i=[...this._queue?.nextTracks||[]];await so(this._client,(0,Po.Ry)(e,i,t,this.isSameItem,this.isQueued,this.createQueueItem),this._queue.prevTracks,this._queue.queueRevision.toString(),n)}getQueue(){return this._queueState}getInternalQueue(){return this._queue}}const Do=e=>(0,C.WB1)(e);var ko=n(16368);var xo=n(55347);function Uo(e){return`context://${e}`}class Mo{_state=null;forcedShuffle=!1;constructor(e,t,n,i,r,s,a,o,l,c,u,d,p,m){this._prefs=e,this._contextPlayer=t,this._collection=n,this._playlistServiceClient=i,this._playlistPlayServiceClient=r,this._contextualShuffle=s,this._smartShuffleEligibility=a,this._defaultFeatureVersion=o,this._isLegacySmartShuffleEnabled=l,this._isCentralizedSmartShuffleEnabled=c,this._isResyncBeforePlayPlaylistEnabled=u,this._playlistResyncerAPI=d,this._shouldRenderSecondRepeatedContextItemsIteration=p,this._podcastPlaybackSpeedEndpoint=m,this._events=new Ro(this._contextPlayer,50,1),this._queue=new Lo(this._contextPlayer,this._events,(()=>this._state?.repeat??Fa.p.REPEAT_NONE),this._shouldRenderSecondRepeatedContextItemsIteration),this._events.addListener(Ta.gd.UPDATE,(({data:e})=>{this._state=e,this.forcedShuffle&&e&&!1===e.shuffle&&e.restrictions.canToggleShuffle&&!Do(e.context.uri)&&this.setShuffle(!0)})),this.referrer="PlayerCore_UnknownReferrer"}setDefaultFeatureVersion(e){void 0===e.featureVersion&&(e.featureVersion=this._defaultFeatureVersion)}getCapabilities(){return{canChangeSpeed:!0,canChangeVolume:!0,canPlayMultipleContextPages:!0,maxNextTracks:50,hasDecoratedQueue:!0}}getEvents(){return this._events}getState(){return this._state}getReferrer(){return this.referrer}setReferrer(e){this.referrer=e}async play(e,t,n={}){const i={...n},r={...e};if("your_library"===t.featureIdentifier&&n.skipTo?.index){const e=Math.floor(n.skipTo.index/150),t={index:n.skipTo.index-150*e,pageIndex:e};i.skipTo={...i.skipTo,...t}}if(this.forcedShuffle&&!Do(r.uri))i.shuffle=!0;else if(this._isCentralizedSmartShuffleEnabled){const e=di(r.uri);if(e||(0,C.tbX)(r.uri)){const t=await(this._contextualShuffle?.getContextualShuffleMode(r.uri)),n=t===ci.j.SMART_SHUFFLE;n&&e&&(r.url=Uo((0,xo.f)(pi.DK,!0))),i.shuffle=(0,ko.C)(t),i.modes={context_enhancement:n?"RECOMMENDATION":"NONE"}}}else if(this._isLegacySmartShuffleEnabled){const e=di(r.uri);let t=r.uri;const n=await(this._contextualShuffle?.getContextualShuffleMode(r.uri))??ci.j.OFF;n===ci.j.SMART_SHUFFLE&&e&&(({lensUri:t}=await this._smartShuffleEligibility.getEligibility(r.uri)),r.url=Uo((0,xo.f)(t,!0))),i.shuffle=(0,ko.C)(n),((e,t,n)=>{(0,C.tbX)(e)?n.requestLenses(Cr.K02.fromPartial({uri:e,lenses:[{identifier:"enhance",active:t}]})):Promise.resolve(null)})(t,n===ci.j.SMART_SHUFFLE,this._playlistServiceClient)}if(this._events.emitPlaySync(r,t,i))return;this.setDefaultFeatureVersion(t);const s=(0,C.tbX)(r.uri),a=(0,C.Z0m)(r.uri)&&!r.uri.endsWith("your-episodes")||(0,C.KBG)(r.uri)||(0,C.eW8)(r.uri),o=!!r.url;a&&!o?await async function(e,t,n,i){const r=as.o$.fromPartial({sort:t.metadata?.[Va.W.LIST_UTIL_SORT],filter:t.metadata?.[Va.W.LIST_UTIL_FILTER],context:Za(t),preparePlayOptions:qa(t,i),playOrigin:Ka(n),loggingParams:io(i.loggingParams)}),s=(0,C.o_h)(t.uri);return s?.type===C.NQG.COLLECTION_ARTIST?(r.id=s.id,await e.playArtist(r)):s?.type===C.NQG.COLLECTION_ALBUM?(r.id=s.id,await e.playAlbum(r)):await e.playTracks(r)}(this._collection,r,t,i):!s&&!n.useListPlatformPlay||o?await async function(e,t,n,i){return e.play(Et.kN.fromPartial({preparePlayRequest:Et.fQ.fromPartial({context:za(t),playOrigin:Ka(n),options:qa(t,i)}),loggingParams:io(i.loggingParams)})).then(no)}(this._contextPlayer,r,t,i):await ro(this._playlistPlayServiceClient,this._isResyncBeforePlayPlaylistEnabled,this._playlistResyncerAPI,r,t,i)}async pause(){this._events.emitPauseSync()||await async function(e){return e.pause(Et.Uq.fromPartial({loggingParams:io()})).then(no)}(this._contextPlayer)}async resume(){this._events.emitResumeSync()||await async function(e){return e.resume(Et.dR.fromPartial({loggingParams:io()})).then(no)}(this._contextPlayer)}async skipToNext(e){this._events.emitSkipToNextSync()||await async function(e,t,n){const i={};return void 0!==n&&t&&(i.track=t.nextTracks.find((e=>(!n.uid||e.contextTrack?.uid===n.uid)&&e.contextTrack?.uri===n.uri))?.contextTrack),e.skipNext(Et.od.fromPartial({...i,loggingParams:io()})).then(no)}(this._contextPlayer,this._queue.getInternalQueue(),e)}async skipTo(e){this._events.emitSkipToNextSync()||await async function(e,t){const n={track:t};return e.skipNext(Et.od.fromPartial({...n,loggingParams:io()})).then(no)}(this._contextPlayer,Ga(e))}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await async function(e){return e.skipPrev(Et.iy.fromPartial({allowSeeking:!0,loggingParams:io()})).then(no)}(this._contextPlayer)}async seekTo(e){await async function(e,t,n=null){return e.seekTo(Et.vn.fromPartial({position:BigInt(Math.floor(t)),relative:Et.w8.BEGINNING,options:{onlyForPlaybackId:n??void 0},loggingParams:io()})).then(no)}(this._contextPlayer,e,this._state?.playbackId?(0,Io.xJ)(this._state.playbackId):null)}async seekBy(e){await async function(e,t,n=null){return e.seekTo(Et.vn.fromPartial({position:BigInt(Math.floor(t)),relative:Et.w8.CURRENT,options:{onlyForPlaybackId:n??void 0},loggingParams:io()})).then(no)}(this._contextPlayer,e,this._state?.playbackId?(0,Io.xJ)(this._state.playbackId):null)}async seekForward(e){await this.seekBy(e)}async seekBackward(e){await this.seekBy(-e)}async setShuffle(e){await async function(e,t){return e.setShufflingContext(Et.Zb.fromPartial({shufflingContext:t,loggingParams:io()})).then(no)}(this._contextPlayer,this.forcedShuffle||e)}async setRepeat(e){await async function(e,t){let n=!1,i=!1;switch(t){case Fa.p.REPEAT_NONE:n=!1,i=!1;break;case Fa.p.REPEAT_CONTEXT:n=!0,i=!1;break;case Fa.p.REPEAT_TRACK:n=!0,i=!0}return e.setOptions(Et.y4.fromPartial({repeatingTrack:{value:i},repeatingContext:{value:n},loggingParams:io()})).then(no)}(this._contextPlayer,e)}async setSpeed(e){this._podcastPlaybackSpeedEndpoint!==en._9.ESPERANTO?await async function(e,t){await e.set({entries:{"audio.episode.speed":{number:BigInt(Math.round(100*t))}}})}(this._prefs,e):await async function(e,t){return e.setOptions(Et.y4.fromPartial({playbackSpeed:t,loggingParams:io()})).then(no)}(this._contextPlayer,e)}async canPlayEncryptedContent(){return!0}async refreshCurrentContext(){}async updateContext(e,t,n){t&&async function(e,t,n,i){const{playlistQueryOptions:r,...s}=n;e.updateContext(Et.eM.fromPartial({sessionId:t,context:s,loggingParams:io(i?.loggingParams)})).then(no)}(this._contextPlayer,e,t,n)}async sendSignal(e,t){await async function(e,t,n,i){return e.signal(Et.gU.fromPartial({signalId:t,options:i,parameters:n,loggingParams:io()}))}(this._contextPlayer,e,t)}canSendSignal(e){const t=this._state?.signals;return!!t&&(!(t.length<=0)&&t.includes(e))}async addToQueue(e,t){if(!this._events.emitQueueActionSync(Ta.UC.ADD))try{await this._queue.addToQueue(e,t),this._events.emitQueueActionComplete(Ta.UC.ADD)}catch(e){throw this._events.emitQueueActionComplete(Ta.UC.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(Ta.UC.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(Ta.UC.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(Ta.UC.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(Ta.UC.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(Ta.UC.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(Ta.UC.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(Ta.UC.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(Ta.UC.REORDER)}catch(e){throw this._events.emitQueueActionComplete(Ta.UC.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t,n){if(!this._events.emitQueueActionSync(Ta.UC.INSERT))try{await this._queue.insertIntoQueue(e,t,n),this._events.emitQueueActionComplete(Ta.UC.INSERT)}catch(e){throw this._events.emitQueueActionComplete(Ta.UC.INSERT,e instanceof Error?e:new Error("Unknown error object")),e}}getQueue(){return this._queue.getQueue()}getForcedShuffle(){return this.forcedShuffle}setForcedShuffle(e){this.forcedShuffle=e}async playAsNextInQueue(e){const t=e.map((e=>Ga(e)));await async function(e,t,n){await e.playAsNextInQueue(Et.bf.fromPartial({tracks:t,options:n,loggingParams:io()}))}(this._contextPlayer,t)}}var Bo=n(43281);var jo=n(21108),Fo=n(9786),Vo=n(91318),Go=n(78905),Ho=n(15538),Wo=n(20150),zo=n(96661);class Ko extends zo.N{_subscriptions=new Map;constructor(e){super(),this._dataClient=e}onBatchChanged(e){this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{if(!this._subscriptions.has(t)){const e=this._dataClient.subscribe({uri:t,query:Cr.bpJ.fromPartial({range:{start:0,length:0},updateThrottlingMs:100,showUnavailable:!0}),policy:{playlist:Cr.fu_.fromPartial({name:!0,description:!0,picture:!0}),item:void 0,track:void 0,episode:void 0}},(()=>{this.emit(Wo.Lj.UPDATE,{uri:t})}));this._subscriptions.set(t,e)}}))}}function Yo(e){return Object.prototype.hasOwnProperty.call(e,"uid")}function qo(e){const{before:t,after:n}=e;return"start"===t?{before:"start"}:void 0!==t?{before:Yo(t)?t.uid:t.uri}:"end"===n?{after:"end"}:void 0!==n?{after:Yo(n)?n.uid:n.uri}:{}}const $o=Cr.gop.fromPartial({username:!0,link:!0,name:!0,image:!0,thumbnail:!0,color:!0}),Zo=Cr.fu_.fromPartial({link:!0,name:!0,loaded:!0,totalLength:!0,duration:!0,description:!0,picture:!0,playable:!0,canReportAnnotationAbuse:!0,followed:!0,followers:!0,ownedBySelf:!0,published:!0,formatListType:!0,formatListAttributes:!0,containsSpotifyTracks:!0,containsTracks:!0,containsEpisodes:!0,owner:$o,madeFor:$o,allows:{insert:!0,remove:!0},numberOfEpisodes:!0,numberOfTracks:!0,collaboratingUsers:{count:!0,limit:5,collaborator:{user:$o,numberOfItems:!0,numberOfTracks:!0,numberOfEpisodes:!0,isOwner:!0}},basePermission:!0,userCapabilities:!0,extension:[Cr.UHM.ROOTLISTABILITY_TRAIT],lenses:!0,lengthIgnoringTextFilter:!0,numberOfItemsPerLinkType:!0,unrangedLength:!0}),Qo=Cr.fu_.fromPartial({unrangedLength:!0}),Jo=Cr.MvQ.fromPartial({hasLyrics:!0,link:!0,name:!0,length:!0,playable:!0,isAvailableInMetadataCatalogue:!0,locallyPlayable:!0,playableLocalTrack:!0,discNumber:!0,trackNumber:!0,isExplicit:!0,previewId:!0,isLocal:!0,isPremiumOnly:!0,playableTrackLink:!0,popularity:!0,is19PlusOnly:!0,trackDescriptors:!0,extension:[Cr.UHM.VIDEO_ASSOCIATIONS]}),Xo=Cr.ycN.fromPartial({link:!0,name:!0,covers:!0}),el=Cr.Sdk.fromPartial({link:!0,name:!0}),tl=Cr.oUG.fromPartial({track:Jo,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:$o,album:{album:Xo,artist:el},artist:el}),nl={link:!0,length:!0,name:!0,number:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,publishDate:!0,extension:[Cr.UHM.PODCAST_SUBSCRIPTIONS],is19PlusOnly:!0,isBookChapter:!0,isPodcastShort:!0,covers:!0,description:!0},il=Cr.q$c.fromPartial(nl),rl=Cr.q$c.fromPartial({...nl,extension:[Cr.UHM.PODCAST_SUBSCRIPTIONS,Cr.UHM.GATED_ENTITY_RELATIONS]}),sl={episode:il,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:$o,show:Cr.QVI.fromPartial({link:!0,name:!0,covers:!0,isMusicAndTalk:!0,extension:[],isBook:!0}),signals:!0,isRecommendation:!0,playedState:{playable:!0,timeLeft:!0,isPlayed:!0}},al=Cr.C4N.fromPartial(sl),ol=Cr.C4N.fromPartial({...sl,episode:rl}),ll=Cr.MTo.fromPartial({uri:!0,collectionState:!0,extensionPolicy:[{linkType:Cr.JaG.SHOW,extension:Cr.UHM.SHOW_ACCESS},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.COVER_IMAGE},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.AUDIOBOOK_SPECIFICS},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.PLAYABILITY},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.SHOW_V4},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.HTML_DESCRIPTION},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.PODCAST_RATING},{linkType:Cr.JaG.SHOW,extension:Cr.UHM.AUDIOBOOK_GENRE}]}),cl=Cr.NYH.fromPartial({addTime:!0,folder:{rowId:!0,link:!0,name:!0,rows:!0}}),ul=Cr.xJU.fromPartial({addTime:!0,playlist:{allows:{insert:!0,remove:!0},canReportAnnotationAbuse:!0,description:!0,duration:!0,formatListAttributes:!0,formatListType:!0,link:!0,loadState:!0,loaded:!0,name:!0,ownedBySelf:!0,owner:{link:!0,name:!0,username:!0},picture:!0,playable:!0,published:!0,rowId:!0,totalLength:!0}}),dl=Cr.q5f.fromPartial({folder:{folder:{rows:!0}},playlist:{playlist:{ownedBySelf:!0}}}),pl=Cr.q5f.fromPartial({folder:cl,playlist:ul});var ml=n(98228);function hl(e){return void 0===e?[]:function(...e){return e.filter((({url:e,label:t})=>e&&t)).map((({url:e,label:t})=>({url:e,label:t})))}({url:e.standardLink,label:"standard"},{url:e.smallLink,label:"small"},{url:e.largeLink,label:"large"},{url:e.xlargeLink,label:"xlarge"},{url:e.imageUri,label:"standard"},{url:e.thumbnailUri,label:"small"})}function fl(e){return e?{type:yt.c.USER,uri:e.link,username:e.username,displayName:e.displayName,images:hl(e)}:null}function gl(e){return"number"!=typeof e?null:new Date(1e3*e)}function El(e){return e.reduce(((e,t)=>(e[t.key]=t.value,e)),{})}function _l(e){return{milliseconds:e}}function yl(e){return{isOwner:e.isOwner,tracksAdded:e.numberOfItems,user:e.user&&fl(e.user)}}function vl(e){return{isOwner:e.isOwner,tracksAdded:e.numTracks,user:e.user&&fl(e.user)}}function bl(e,t){return t&&t.basePermissionLevel!==Cr.e6Z.CONTRIBUTOR?{count:t?.numTotalMembers||0,items:(t?.members||[]).map(vl)}:{count:e?.count||0,items:(e?.collaborator||[]).map(yl)}}function Sl(e){return!e||!ml.E.includes(e)}function Al(e,t,n,i=[]){const r=or(e.extension),s=r.rootlistabilityTrait,a=r.autoLens?.lensesToApply;return{type:yt.c.PLAYLIST,uri:e.link,name:e.name,description:e.description,images:hl(e.pictures),madeFor:fl(e.madeFor),owner:fl(e.owner),totalLength:t?.unrangedLength??e.totalLength,unfilteredTotalLength:e.lengthIgnoringTextFilter,totalLikes:t?.numFollowers??null,duration:t?.duration?(p=t.duration,{milliseconds:1e3*Number(p),isEstimate:!1}):null,isLoaded:e.isLoaded,isOwnedBySelf:e.ownedBySelf,isPublished:e.published,isRootlistable:s?.rootlistable??!0,isSaved:e.followed,hasEpisodes:t?.containsEpisodes??null,hasSpotifyTracks:t?.containsSpotifyTracks??null,hasSpotifyAudiobooks:!!t?.numberOfItemsPerLinkType?.find((({linkType:e})=>e===Cr.JaG.SHOW))?.numItems,canAdd:e.allows?.canInsert??!1,canRemove:e.allows?.canRemove??!1,canPlay:t?.playable??null,formatListData:(u=e.formatListType,d=e.formatListAttributes,{type:u,attributes:El(d)}),canReportAnnotationAbuse:e.canReportAnnotationAbuse,hasDateAdded:Sl(e.formatListType),permissions:(o=t?.userCapabilities,l=t?.collaborators,c=t?.basePermission,o||l||c?{canView:!!o?.canView,canAdministratePermissions:o?.canAdministratePermissions||!1,canCancelMembership:o?.canCancelMembership||!1,isPrivate:c?.permissionLevel===Cr.e6Z.BLOCKED}:null),collaborators:bl(t?.collaborators,n),appliedLenses:i,autoLenses:a};var o,l,c,u,d,p}function Cl(e){return{type:yt.c.ARTIST,uri:e.link,name:e.name}}function Tl(e){return{type:yt.c.ARTIST,uri:e.link,name:e.name}}function Il(e){return e?{type:yt.c.ALBUM,uri:e.link,name:e.name,artist:e.artist&&Tl(e.artist),images:hl(e.covers)}:null}function Ol(e,t,n){const i=or(e.extension);return{type:yt.c.TRACK,uri:e.link,name:e.name,album:Il(e.album),artists:e.artist.map(Cl),discNumber:e.discNumber,trackNumber:e.trackNumber,duration:_l(1e3*e.length),isExplicit:e.isExplicit,isLocal:e.isLocal,isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly,hasAssociatedVideo:(i.videoAssociations?.videoAssociation?.length||0)>0,bpm:i.playlistTuner?.bpm??void 0,key:i.playlistTuner?.key?(r=i.playlistTuner.key,r.mode===Qi.c3.MODE_MINOR?`${r.key}m`:r.key):void 0,isBanned:n?.isBanned??!1};var r}function wl(e,t){return{type:yt.c.SHOW,uri:e.link,name:e.name,publisher:e.publisher,images:hl(e.covers),mediaType:t}}function Nl(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function Rl(e,t){let n=Li.M.Unknown;return n=t.isPlayed?Li.M.Completed:t.timeLefte.name))??[]}function Ul(e){return e.is19PlusOnly?{label:Tr.x7.NineteenPlus}:e.isExplicit?{label:Tr.x7.Explicit}:{label:Tr.x7.Unknown}}function Ml(e){return void 0===e?[]:function(...e){return e.filter((({url:e})=>e)).map((({url:e,width:t,height:n})=>({url:e,width:t,height:n})))}({url:e.standardLink,width:300,height:300},{url:e.smallLink,width:64,height:64},{url:e.largeLink,width:640,height:640})}function Bl(e,t){const n=e.length-t.timeLeft;return{playPositionMilliseconds:1e3*n,playPosition:n,state:t.isPlayed?Tr._w.Completed:Tr._w.NotStarted}}function jl(e){if(!e.publishDate)return null;const t=1e3*Number(e.publishDate);return{isoString:new Date(t).toISOString(),precision:Tr.by.Day}}function Fl(e){return e.mediaTypeEnum===Cr.Cix.VODCAST||e.mediaTypeEnum===Cr.Cix.VIDEO?[Ll.Cx.Audio,Ll.Cx.Video]:e.mediaTypeEnum===Cr.Cix.AUDIO?[Ll.Cx.Audio]:[]}function Vl(e,t){if(!e||!t)throw new Error("Error while constructing chapter metadata");const n=or(e.extension);return{type:yt.c.CHAPTER,uri:e.link,name:e.name,duration:{milliseconds:1e3*e.length},description:e.description,coverArt:Ml(e.covers)??[],audio:{items:[]},audioPreview:null,htmlDescription:n.htmlDescription?.htmlDescription||"",sharingInfo:null,contentRating:Ul(e),playedState:Bl(e,t),book:Hl(e.show),playability:Gl(t,n),isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly}}function Gl(e,t){const n=!!t?.podcastSubscription?.isPaywalled;return{playable:n?!!t?.podcastSubscription?.isUserSubscribed:e.isPlayable,reason:n?Ll.Uk.PaymentRequired:Ll.Uk.Unknown}}function Hl(e){return e?{uri:e.link,name:e.name,coverArt:Ml(e.covers)??[],trailer:null}:null}function Wl(e,t,n){if(!e||!t)throw new Error("Error while constructing episode");const i=or(e.extension);return{type:yt.c.EPISODE,uri:e.link,name:e.name,description:e.description,htmlDescription:i.htmlDescription?.htmlDescription||"",episodeType:Tr.I_.Unknown,coverArt:Ml(e.covers)??[],playedState:Bl(e,t),mediaTypes:Fl(e),audio:{items:[]},audioPreview:null,sharingInfo:null,segmentsCount:i.podcastSegments?.playbackSegments.length||0,podcast:(r=e.show,r?{uri:r.link,name:r.name,coverArt:Ml(r.covers)??[],trailer:null,showTypes:[]}:null),podcastSubscription:kl(i),releaseDate:jl(e),playability:Gl(t),contentRating:Ul(e),duration:{milliseconds:1e3*e.length},contentInformation:i.contentInformation||null,transcript:i.transcripts?.transcripts||null,gatedEntityRelations:i.gatedEntityRelations||null,hasGatedEntityRelationAccess:!!n?.isUserMemberOfAtLeastOneGroup,upsellExplanation:n?.upsellLink};var r}const zl=e=>{switch(e){case c.j8.TRAILER:return Ll.t5.TRAILER;case c.j8.CONTINUE_LISTENING:return Ll.t5.CONTINUE_LISTENING;case c.j8.LATEST_PUBLISHED:return Ll.t5.LATEST_PUBLISHED;case c.j8.UP_NEXT:return Ll.t5.UP_NEXT;case c.j8.FIRST_PUBLISHED:return Ll.t5.FIRST_PUBLISHED;default:return Ll.t5.UNKNOWN}};function Kl(e){if(e?.item)return{type:zl(e.label),data:Wl(e.item.episodeMetadata,e.item.episodePlayState)}}function Yl(e,t){const n=e.auxiliarySections?.trailerSection?.item,i=n?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing trailer");return{type:yt.c.EPISODE,uri:t.link,name:t.name,coverArt:Ml(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:Ul(t),mediaTypes:Fl(t)}}(n):null,r=e.header?.showMetadata;if(!r)throw new Error("Error while constructing podcast metadata");const s=or(r.extension),a=(0,Dl.E)(s.showAccess?.unlockedBy),o=t?.showAccess;return{type:yt.c.SHOW,uri:r.link,name:r.name,description:r.description||"",htmlDescription:s.htmlDescription?.htmlDescription||"",coverArt:Ml(r.covers)??[],trailer:i,topics:s.podcastTopics?.topics||[],podcastType:(c=r,c.isMusicAndTalk?"SHOW":"PODCAST"),showTypes:[],publisherName:r.publisher,consumptionOrder:(l=r.consumptionOrder,"sequential"===l?"sequential":"episodic"===l?"episodic":"recent"),nextBestEpisode:Kl(e.auxiliarySections?.nextBestEpisodeSection),gatedContentAccessReason:a,isLocked:null===a,rating:s?.rating,gatedEntityRelations:s.gatedEntityRelations||null,hasGatedEntityRelationAccess:!!o?.isUserMemberOfAtLeastOneGroup,upsellExplanation:o?.upsellLink,gatedEntityCoverArt:t?.coverArt?Ml(t.coverArt):void 0,courseCategory:s.courseSpecifics?.primaryCategory||null};var l,c}function ql(e,t){return{text:e,type:t}}function $l(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,n=e?.unlockedBy?.includes(xi.UG.ABP);return t&&!n}function Zl(e){return e.map((e=>({uri:e.destinationUri,title:e.contextualName})))}function Ql(e,t){const n=t.auxiliarySections?.trailerSection?.item,i=n?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing sample");return{type:yt.c.CHAPTER,uri:t.link,name:t.name,coverArt:Ml(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:Ul(t),isPlayable:e.episodePlayState?.isPlayable??!1}}(n):null,r=t.header?.showMetadata;if(!r)throw new Error("Error while constructing book metadata");const s=or(r.extension),a=xl(s),{explanation:o}=e.getCappingStatus(s.showAccess);return{isPreRelease:!1,type:yt.c.AUDIOBOOK,uri:r.link,name:r.name,coverArt:Ml(r.covers)??[],authorName:r.publisher,narrators:a,sample:i,htmlDescriptionPlain:s.htmlDescription?.htmlDescription,rating:s?.rating,isExplicit:r.isExplicit,duration:Number(s.audiobookSpecifics?.duration_ms),copyrights:(l=s.audiobookSpecifics?.credits?.publishers?.map((e=>e.name))??[],c=r.copyright,[...l.map((e=>ql(e,"P"))),...c.map((e=>ql(e,"C")))]),publishDate:s.audiobookSpecifics?.publish_date,price:s?.audiobookPrice,isLocked:$l(s?.showAccess),consumptionCapExplanation:o,signifierText:s.showAccess?.signifier?.text,resumeEpisodeLink:t.header?.showPlayState?.resumeEpisodeLink,topics:s.audiobookGenres?Zl(s.audiobookGenres.genres):[]};var l,c}function Jl(e){return e?.prerelease?.entity?.copyright.map((e=>{let t;switch(e.type){case Gi.C_.COPYRIGHT_TYPE_P:t="P";break;case Gi.C_.COPYRIGHT_TYPE_C:t="C";break;default:t=null}return{text:e.text??"",type:t}})).filter((e=>!!e.type&&!!e.text))??[]}function Xl(e,t){const n=or(t);return{type:yt.c.AUDIOBOOK,images:n.coverImage?.coverImages.map((e=>({url:`https://i.scdn.co/image/${(0,Io.U5)(e.fileId)}`,width:e.width,height:e.height})))??[],name:n.audiobookSpecifics?.main_title||"",uri:e,durationMs:Number(n.audiobookSpecifics?.duration_ms)||0,authorName:n.audiobookSpecifics?.credits?.authors?.map((e=>e.name)).join(v.Ru.getSeparator())||"",isLocked:$l(n.showAccess),isExplicit:n.showV4?.explicit,isOutOfMarket:!1===n.playability?.isPlayable&&n.playability?.reason===Ki.Nc.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED,consumptionCapExplanation:n.showAccess?.consumptionCapped,description:n.htmlDescription?.htmlDescription,signifierText:n.showAccess?.signifier?.text,rating:{average:n.rating?.averageRating?.average,showAverage:!!n.rating?.averageRating?.showAverage},topics:n.audiobookGenres?.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))??[]}}function ec(e,t){if(!e?.item)throw new Error("Invalid playlist response!");return{items:e.item.map((e=>function(e){const t={uid:e.rowId,playIndex:null,addedAt:(n=e.addTime,gl(n)?.toISOString()??null),addedBy:fl(e.addedBy),formatListAttributes:El(e.formatListAttributes)};var n;return void 0!==e.trackMetadata&&void 0!==e.trackPlayState?{...t,...Ol(e.trackMetadata,e.trackPlayState,e.collectionState)}:void 0!==e.episodeMetadata&&void 0!==e.episodePlayState?{...t,...Pl(e.episodeMetadata,e.episodePlayState)}:void 0===e.trackMetadata&&void 0===e.episodeMetadata&&void 0!==e.extension?{...t,...Xl(e.uri,e.extension)}:null}(e))),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength}}function tc(e){return e.some((e=>e.uid.length>0))?{rows:e.map((e=>e.uid))}:{uris:e.map((e=>e.uri))}}function nc(e){const t=e?.statusCode??0;if(t<200||t>299)throw new Error(e?.reason??"Unknown error!")}class ic{constructor(e,t,n,i,r,s=!1,a=!1){this._playlistDataClient=e,this._playlistServiceClient=t,this._smartShuffleEligibilityAPI=n,this._builder=i,this._resyncAPI=r,this._isTunaEnabled=s,this._isGatedPodcastsEnabled=a,this._events=new Ko(e)}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0,canMoveMultipleItems:!0,canFetchAllTracks:!0,canDecorateAddedBy:!0,hasUidsGeneratedFromIndicies:!1}}getEvents(){return this._events}_getPlaylistEpisodeDecorationPolicy(){return this._isGatedPodcastsEnabled?ol:al}async getPlaylist(e,t,n){t?.withSync&&this.resync(e);const i=!n||0!==n.limit;let r=i?tl:void 0;r?.track&&this._isTunaEnabled&&n?.isExtraColumnsEnabled&&(r={...r,track:{...r.track,extension:[...r.track.extension,Cr.UHM.PLAYLIST_TUNER]}});let s=Zo;this._isTunaEnabled&&(s={...s,extension:[...s.extension,Cr.UHM.AUTO_LENS]}),(0,C.tbX)(e)||(s={...s,followers:!1});const a=this._playlistDataClient.get({uri:e,query:eo(n),policy:Cr.gXE.fromPartial({playlist:s,track:r,episode:i?this._getPlaylistEpisodeDecorationPolicy():void 0,item:i?ll:void 0})});let o=Promise.resolve(null);t?.hydrateCollaboratorsWithMembers&&(o=this._playlistServiceClient.getMembers(Cr.zOt.fromPartial({uri:e})));const[l,c]=await Promise.all([a,o]);if(403===l.status?.statusCode)return function(e){return{metadata:{type:yt.c.PLAYLIST,uri:e,name:"",description:"",images:[],madeFor:null,owner:{type:yt.c.USER,uri:"",username:"",displayName:"",images:[]},totalLength:0,unfilteredTotalLength:0,totalLikes:null,duration:null,isLoaded:!1,isOwnedBySelf:!1,isPublished:!1,isRootlistable:!1,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:!1,canRemove:!1,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!1,permissions:{isPrivate:!1,canView:!1,canAdministratePermissions:!1,canCancelMembership:!1},collaborators:null},contents:{totalLength:0,offset:0,limit:0,items:[]}}}(e);const u=l.data,d=l.data?.playlist?.playlistMetadata,p=c?.response,m=l.data?.playlist?.lenses?.appliedLenses.map((e=>e.name));if(!u||!d)throw new Error("Invalid playlist or members response!");return function(e,t,n,i){return{metadata:Al(e,t,n,i),contents:ec(t)}}(d,u,p,m)}async getContents(e,t){return ec((await this._playlistDataClient.get({uri:e,query:eo(t),policy:Cr.gXE.fromPartial({playlist:Qo,track:tl,episode:this._getPlaylistEpisodeDecorationPolicy(),item:ll})})).data)}async getMetadata(e,t){return(await this.getPlaylist(e,t,{offset:0,limit:0})).metadata}async resync(e,t){t?.maybe?await this._resyncAPI.maybeResync(e):await this._resyncAPI.resync(e)}async add(e,t,n,i){if(!this._events.emitAddSync(e,t,i))try{nc((await this._playlistServiceClient.modify(Cr.oVT.fromPartial({uri:e,request:Cr.Eas.fromPartial({operation:"add",uris:t,...qo(n)})}))).status),this._events.emitAddComplete(e,null,t,i)}catch(n){throw this._events.emitAddComplete(e,(0,Ho.z)(n),t,i),n}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{nc((await this._playlistServiceClient.modify(Cr.oVT.fromPartial({uri:e,request:Cr.Eas.fromPartial({operation:"move",rows:t.map((e=>e.uid)),...qo(n)})}))).status),this._events.emitMoveComplete(e,null,t)}catch(n){throw this._events.emitMoveComplete(e,(0,Ho.z)(n),t),n}}async remove(e,t){if(!this._events.emitRemoveSync(e,t))try{nc((await this._playlistServiceClient.modify(Cr.oVT.fromPartial({uri:e,request:Cr.Eas.fromPartial({operation:"remove",...tc(t)})}))).status),this._events.emitRemoveComplete(e,null,t)}catch(n){throw this._events.emitRemoveComplete(e,(0,Ho.z)(n),t),n}}async uploadImage(e){return(0,Go.V)(this._builder,e)}async setAttributes(e,t){nc((await this._playlistServiceClient.modify(Cr.oVT.fromPartial({uri:e,request:{operation:"set",attributes:t}}))).status)}async clearAttributes(e,t){nc((await this._playlistServiceClient.modify(Cr.oVT.fromPartial({uri:e,request:{operation:"clear",attributesToClear:t}}))).status)}async updateDetails(e,t){if(this._events.emitUpdateSync(e,t))return;const n={},i=[];if("name"in t){if(!t.name)throw Error("Can not set empty playlist name!");n.name=t.name}"description"in t&&(void 0===t.description||""===t.description?i.push(2):n.description=t.description);let r=null;if(t.imageUploadToken){const n=(0,C.o_h)(e).id;r=await(0,Vo.H)(this._builder,n,t.imageUploadToken)}null!==r?n.picture=(0,Io.U5)(r):null===t.imageUploadToken&&i.push(3);try{Object.keys(n).length>0&&await this.setAttributes(e,n),i.length>0&&await this.clearAttributes(e,i),this._events.emitUpdateComplete(e,null,t)}catch(n){throw this._events.emitUpdateComplete(e,(0,Ho.z)(n),t),n}}async _getLensedPlaylistUri(e){if((0,C.Z0m)(e)){const{lensUri:t}=await this._smartShuffleEligibilityAPI.getEligibility(e);return t}return e}async requestLenses(e,t,n){await this._playlistServiceClient.requestLenses(Cr.K02.fromPartial({uri:e,lenses:[{identifier:t,active:n}]}))}async sendSignal(e,t,n){if(this._events.emitSendSignalSync(e,t,n))return;const i=await this._getLensedPlaylistUri(e);try{nc((n?await this._playlistServiceClient.signalItem(Cr.$zj.fromPartial({itemUri:i,itemId:n,signal:{identifier:t}})):await this._playlistServiceClient.signal(Cr.Kue.fromPartial({listUri:i,signal:{identifier:t}}))).status),this._events.emitSendSignalComplete(e,t,n)}catch(i){this._events.emitSendSignalComplete(e,t,n,(0,Ho.z)(i))}}async resolvePlaylistFormatURI(e){return(0,Fo._)(this._builder,e)}async getRecommendedTracks(e,t,n){return await(0,jo.u)(this._builder,e,t,n)}async getRecommendedBookUris(e,t,n){return await(0,jo.w)(this._builder,e,t,n)}}var rc=n(82726),sc=n(35612);function ac(e=Cr.e6Z.UNKNOWN){switch(e){case Cr.e6Z.UNKNOWN:return"UNKNOWN";case Cr.e6Z.BLOCKED:return"BLOCKED";case Cr.e6Z.CONTRIBUTOR:return"CONTRIBUTOR";case Cr.e6Z.VIEWER:return"VIEWER";case Cr.e6Z.UNRECOGNIZED:return"UNKNOWN";default:return(0,ut.d)(e),"UNKNOWN"}}function oc(e){switch(e){case"UNKNOWN":return Cr.e6Z.UNKNOWN;case"BLOCKED":return Cr.e6Z.BLOCKED;case"CONTRIBUTOR":return Cr.e6Z.CONTRIBUTOR;case"VIEWER":return Cr.e6Z.VIEWER;default:return(0,ut.d)(e),Cr.e6Z.UNKNOWN}}function lc(e){return{canView:e?.canView??!1,canAdministratePermissions:e?.canAdministratePermissions??!1,canEditMetadata:e?.canEditMetadata??!1,canEditItems:e?.canEditItems??!1,canCancelMembership:e?.canCancelMembership??!1}}function cc(e){return{isFollowed:e.followState===Cr.$NQ.CAN_BE_UNFOLLOWED,isOwner:e.isOwner,permissionLevel:ac(e.permissionLevel),user:e.user&&fl(e.user),songsAdded:e.numTracks}}function uc(e=[]){return e.map(cc)}class dc{constructor(e,t){this._client=e,this._builder=t,this._events=new rc.KD}getCapabilities(){return{}}getEvents(){return this._events}async getPermissionGrant(e,t){const n={operation:rc.mA.GET_PERMISSION_GRANT,uri:e};this._events.emitOperationSync(n);try{const i=await(0,sc.S1)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,(0,Ho.z)(e)),e}}async claimPermissions(e,t){const n={operation:rc.mA.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(n);try{const i=await(0,sc.f5)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,(0,Ho.z)(e)),e}}async getMembers(e){const t=(await this._client.getMembers({uri:e,limit:void 0})).response;return{basePermissionLevel:ac(t?.basePermissionLevel),capabilities:lc(t?.capabilities),members:uc(t?.members)}}subscribeToMembers(e,t){return this._client.subscribeToMembers({uri:e,limit:void 0},(e=>{const n=e.response,i={basePermissionLevel:ac(n?.basePermissionLevel),capabilities:lc(n?.capabilities),members:uc(n?.members)};t(null,i)})).cancel}async removeMember(e,t){const n={operation:rc.mA.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(n);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:Cr.e6Z.UNKNOWN,timeoutMs:1e3}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,e),e}}async setMemberPermission(e,t,n){const i={operation:rc.mA.SET_MEMBER_PERMISSION,uri:e,permissionLevel:n};this._events.emitOperationSync(i);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:oc(n),timeoutMs:1e3}),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,(0,Ho.z)(e)),e}}async setBasePermission(e,t){const n={operation:rc.mA.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(n);try{await this._client.setBasePermission({uri:e,request:{permissionLevel:oc(t),timeoutMs:1e3}}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,(0,Ho.z)(e)),e}}}class pc{constructor(e){this._playlistServiceClient=e,this.lastSync=new Map}async resync(e){await this._playlistServiceClient.resync(Cr.Vr.fromPartial({playlistUris:[e]})),this.lastSync.set(e,Date.now())}async maybeResync(e){const t=this.lastSync.get(e);(void 0===t||Date.now()-t>216e5)&&await this.resync(e)}}var mc=n(78565),hc=n(98871),fc=n(59384),gc=n(55809),Ec=n(94572),_c=n(39559);class yc extends _c.D{_subscription=null;constructor(e,t){super(),this._dataClient=e,this._contains=t}subscribeToUpdates(){this._dataClient.subscribe({query:{range:{start:0,length:0},updateThrottlingMs:100},policy:{folder:{folder:{name:!0}},playlist:{playlist:{name:!0}}}},(()=>{this.onUpdate()}))}unsubscribeFromUpdates(){null!==this._subscription&&(this._subscription.cancel(),this._subscription=null)}async onUpdate(){this.emit(Ec.tD.UPDATE,null),this.onContainsItems(this._aggregator.getBatch())}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),n=await this._contains(t);this.emitUpdateItems(t,n)}}}function vc(e){return"notFound"===e.loadState}function bc(e){return"forbidden"===e.loadState}function Sc(e){const t=e.playlistMetadata;return vc(t)||bc(t)?function(e,t){return{type:"placeholder",uri:t.link,addedAt:gl(e.addTime),isNotFound:vc(t),isForbidden:bc(t)}}(e,t):{addedAt:gl(e.addTime),...Al(t)}}function Ac(e,t){const n=e.folderMetadata,i=(e.item??[]).map((e=>function(e,t){if(e.folder)return Ac(e.folder,t);if(e.playlist)return Sc(e.playlist);throw new Error("Invalid playlist cosmos response!")}(e,t)));return i.forEach(t),{type:"folder",addedAt:gl(e.addTime),items:i,name:n.name,uri:n.link}}function Cc(e){if(void 0===e)return Cr.xAU.NO_SORT;const{field:t,order:n}=e;switch(t){case mc.nw.NAME:return n===mc.xB.DESC?Cr.xAU.NAME_DESC:Cr.xAU.NAME_ASC;case mc.nw.ADDED_AT:return n===mc.xB.DESC?Cr.xAU.ADD_TIME_DESC:Cr.xAU.ADD_TIME_ASC;case mc.nw.RECENTLY_PLAYED:return n===mc.xB.DESC?Cr.xAU.RECENTLY_PLAYED_RANK_DESC:Cr.xAU.RECENTLY_PLAYED_RANK_ASC;case mc.nw.RELEVANCE:return n===mc.xB.DESC?Cr.xAU.FRECENCY_SCORE_DESC:Cr.xAU.FRECENCY_SCORE_ASC;case mc.nw.AVAILABLE_OFFLINE:return n===mc.xB.DESC?Cr.xAU.OFFLINE_STATE_DESC:Cr.xAU.OFFLINE_STATE_ASC;default:return(0,ut.k)(t),Cr.xAU.NO_SORT}}class Tc{_cache=null;_decorationCache=new Le.fq(3e5);constructor(e,t,n,i){var r,s;this._rootlistDataClient=e,this._rootlistModificationClient=t,this._playlistDataClient=n,this._builder=i,this._events=(r=this._rootlistDataClient,s=this.contains.bind(this),new yc(r,s))}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0}}async getMetadata(){const e=await this._rootlistDataClient.get({policy:dl});return nc(e.status),function(e){const t=[...e.item];let n=0,i=0;for(;t.length>0;){const e=t[0];e.folder?t.push(...e.folder.item):(!0===e.playlist?.playlistMetadata?.ownedBySelf&&n++,i++),t.shift()}return{ownedPlaylistCount:n,playlistCount:i}}(e.data?.root)}async getContents(e){const t=await this._rootlistDataClient.get({query:{folderUri:e?.folderUri,sortBy:Cc(e?.sort),textFilter:(0,hc.QG)(e?.filter),range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,flattenTree:e?.flatten},policy:pl});nc(t.status);const n=new Set,i={...Ac(t.data?.root,(e=>{(0,mc.Af)(e)&&n.add(e.uri)})),totalItemCount:t.data?.unrangedLength};return this._cache=n,e?.decorateImagesAndOwner&&await(0,gc.k)(this._builder,this._decorationCache,(0,fc.sh)(i)),i}getEvents(){return this._events}onUpdateItems(e,t){if(null!==this._cache){const n=this._cache;e.forEach((e=>t?n.add(e):n.delete(e)))}this._events.emitUpdateItems(e,t)}async applyModification(e){const t=await this._rootlistModificationClient.modify(Cr.C5T.fromPartial({request:e}));if(nc(t.status),!t.response.success)throw new Error("Failed to apply rootlist modification!");return t.response}async renameFolder(e,t){await this.applyModification({operation:"set",attributes:{name:t},rows:[e.uri]})}async createFolder(e,t){return await this.applyModification({operation:"create",createItemKind:Cr.EtD.CREATE_ITEM_KIND_FOLDER,...qo(t),name:e})}async moveFolder(e,t){await this.move(e,t)}async removeFolder(e){await this.applyModification({operation:"remove",contents:!0,rows:[e]})}async createPlaylist(e,t,n){if(this._events.emitCreatePlaylistSync(e,t,n))return null;try{const i=await this.applyModification({operation:"create",createItemKind:Cr.EtD.CREATE_ITEM_KIND_PLAYLIST,...qo(t),name:e});return this._events.emitCreatePlaylistComplete(e,t,i.uri,null,n),i.uri}catch(i){return this._events.emitCreatePlaylistComplete(e,t,null,(0,Ho.z)(i),n),null}}async add(e,t){if(!this._events.emitAddSync(e,t))try{this.onUpdateItems(e,!0),await this.applyModification({operation:"add",uris:e,...qo(t)}),this._events.emitAddComplete(e,t)}catch(n){this.onUpdateItems(e,!1),this._events.emitAddComplete(e,t,(0,Ho.z)(n))}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this.applyModification({operation:"move",rows:[e.uri],...qo(t)}),this._events.emitMoveComplete(e,t,null,n)}catch(n){this._events.emitMoveComplete(e,t,(0,Ho.z)(n))}}async remove(e){if(this._events.emitRemoveSync(e))return;const t=e.map((e=>e.uri));try{this.onUpdateItems(t,!1),await this.applyModification({operation:"remove",rows:t}),this._events.emitRemoveComplete(e)}catch(n){this.onUpdateItems(t,!0),this._events.emitRemoveComplete(e,(0,Ho.z)(n))}}async contains(e){const t=await this._rootlistDataClient.contains({items:e});return nc(t.status),t.response?.found}containsSync(e){return null!==this._cache?this._cache.has(e):void 0}async getPublishedState(e){const t=await this._playlistDataClient.get({uri:e,query:{range:{start:0,length:0}},policy:{playlist:{published:!0}}});return nc(t.status),t.data?.playlist?.playlistMetadata?.published??!1}async setPublishedState(e,t){await this.applyModification({operation:"set",attributes:{publishedState:t?Cr.Kpc.PUBLISHED_STATE_PUBLISHED:Cr.Kpc.PUBLISHED_STATE_NOT_PUBLISHED},rows:[e]})}}var Ic=n(43863),Oc=n(61767);const wc=(0,On.u)("PlaylistResyncAPI");class Nc{_subs=new Set;_inFlightCache=new Le.od;constructor(e,t=new Le.fq(36e5)){this.productStateApi=e,this.cache=t,this.productStateApi.subValues(l.kM.fromPartial({}),(async e=>{const t=this.mapKeys(e.pairs),n=this.cache.get("productState");let i;n?(i={...n,...t},this.cache.set("productState",i)):i=await this.getValues();for(const e of this._subs)try{e(i)}catch(t){console.error("Error in `ProductState` sub:",{sub:e,error:t})}}))}mapKeys({country_code:e,type:t,...n}){const i={...n};return void 0!==e&&(i.country=e),void 0!==t&&(i.product=t),i}async getValues(){const e=this.cache.get("productState");if(e)return e;const t=await this._inFlightCache.create("getValues",(()=>this.productStateApi.getValues(l.kM.fromPartial({})))),n=this.mapKeys(t.pairs);return this.cache.set("productState",n),n}getCachedValues(){return this.cache.get("productState")??null}subValues(e){return this._subs.add(e),()=>{this._subs.delete(e)}}async setValues(e){await this.productStateApi.putValues(l.n3.fromPartial({pairs:e}))}}var Rc=n(40294),Pc=n(87634),Lc=n(19096);function Dc(e,t){const n=new Pc.BM(e);return new Lc.j((e=>function(e,t){return e.addOnNewConnectionID({},(({id:e})=>t(e)))}(n,e)),((e,t,i)=>function(e,t,n,i){const r=e=>i({ident:e.Ident?.Ident??"",timestamp:Date.now(),attributes:e.Attributes,payloads:e.Payloads});return n?e.addOnPushedMessageForIdentFilter({Prefix:t},r):e.addOnPushedMessageForIdent({Ident:t},r)}(n,e,t,i)),t)}var kc=n(53249),xc=n(35008),Uc=n(34858);const Mc=Uc.pw.fromPartial({includeCollectionSongs:!0,includeYourEpisodes:!0,artistPolicy:{timestamp:!0,artistPolicy:{link:!0,name:!0,portraits:!0}},albumPolicy:{timestamp:!0,albumPolicy:{link:!0,name:!0,covers:!0},artistsPolicy:{link:!0,name:!0}},showPolicy:{timestamp:!0,showPolicy:{isBook:!0,link:!0,name:!0,publisher:!0,covers:!0,extension:[c.UH.AUDIOBOOK_SPECIFICS,c.UH.SHOW_ACCESS]}},playlistPolicy:{timestamp:!0,playlistPolicy:{link:!0,name:!0,description:!0,picture:!0,owner:{link:!0,name:!0}}},trackPolicy:{timestamp:!0,trackPolicy:{link:!0,name:!0,isExplicit:!0,is19PlusOnly:!0},albumPolicy:{link:!0,name:!0,covers:!0},artistsPolicy:{link:!0,name:!0}},episodePolicy:{timestamp:!0,showPolicy:{link:!0,name:!0,publisher:!0,covers:!0,extension:[c.UH.AUDIOBOOK_SPECIFICS]}},collectionTracksPolicy:{link:!0,timestamp:!0}});function Bc(e){return e?[{url:e,label:"standard"}]:[]}class jc extends xc.K5{_contexts=null;_cancellable=null;constructor(e,t){super(),this._client=new Uc.oW(e),this._events=t}getEvents(){return this._events}getContexts(){return null===this._cancellable&&(this._cancellable=this._client.stream(Mc,(e=>{this._contexts=function(e){const t=new Set;return e.context.map((e=>{if(e.artist){const t=e.artist.artistMetadata;return{type:xc.d2.ARTIST,uri:t?.link??"",name:t?.name??"",images:Bc(t?.portraits?.standardLink),timestampMs:e.artist.addTime}}if(e.album){const t=e.album.albumMetadata,n=new Set;return{type:xc.d2.ALBUM,uri:t?.link??"",name:t?.name??"",images:Bc(t?.covers?.standardLink),artists:t?.artists.map((e=>({uri:e.link,name:e.name}))).filter((e=>!n.has(e.uri)&&n.add(e.uri)))??[],timestampMs:e.album.addTime}}if(e.show){const t=e.show.showMetadata,n=or(t?.extension??[]);if(void 0!==n.audiobookSpecifics||t?.isBook){const i=n.audiobookSpecifics,r=n.showAccess?.signifier?.text,s=n.showAccess?.isUserMemberOfAtLeastOneGroup??!1;return{type:xc.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:Bc(t?.covers?.standardLink),authors:i?.credits?.authors.map((e=>e.name))??[],timestampMs:e.show.addTime,consumptionCapExplanation:n.showAccess?.consumptionCapped,signifierText:r,isPlayable:s}}return{type:xc.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:Bc(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.show.addTime}}if(e.playlist){const t=e.playlist.playlistMetadata;return{type:xc.d2.PLAYLIST,uri:t?.link??"",name:t?.name??"",description:t?.description??"",images:Bc(t?.pictures?.standardLink),owner:{uri:t?.owner?.link??"",displayName:t?.owner?.displayName??""},attributes:t?.formatListAttributes??[],timestampMs:e.playlist.addTime}}if(e.track){const t=e.track.trackMetadata;return{type:xc.d2.TRACK,uri:t?.link??"",name:t?.name??"",images:Bc(t?.album?.covers?.standardLink),artists:t?.artist.map((e=>({uri:e.link,name:e.name})))??[],isExplicit:t?.isExplicit??!1,isMOGEFRestricted:t?.is19PlusOnly??!1,timestampMs:e.track.addTime}}if(e.episode){const t=e.episode.showMetadata,n=or(t?.extension??[]);if(void 0!==n.audiobookSpecifics){const i=n.audiobookSpecifics;return{type:xc.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:Bc(t?.covers?.standardLink),authors:i.credits?.authors.map((e=>e.name))??[],timestampMs:e.episode.addTime}}return{type:xc.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:Bc(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.episode.addTime}}return e.collectionTracks&&(0,C.Z0m)(e.collectionTracks.link)?e.collectionTracks.link.endsWith("your-episodes")?{type:xc.d2.YOUR_EPISODES,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:{type:xc.d2.LIKED_SONGS,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:null})).filter(As.P).sort(((e,t)=>t.timestampMs-e.timestampMs)).filter((e=>!t.has(e.uri)&&t.add(e.uri)))}(e),this._events.emit(xc.m5.UPDATE,this._contexts)}))),this._contexts}}var Fc=n(96057);const Vc={field:Fc.K$.AVAILABLE,operator:Fc.uj.EQUALS,value:!0};var Gc=function(e){return e.TITLE="TITLE",e}(Gc||{});const Hc={[Fc.K$.AVAILABLE]:Fc.K$.AVAILABLE,[Fc.K$.NAME]:Gc.TITLE,[Fc.K$.TEXT]:Fc.K$.TEXT,[Fc.K$.ISPLAYED]:Fc.K$.ISPLAYED,[Fc.K$.STARTEDPLAYING]:Fc.K$.STARTEDPLAYING},Wc={[Fc.K$.AVAILABLE]:["available"],[Fc.K$.TEXT]:["text"],[Fc.K$.NAME]:["name"],[Fc.K$.ISPLAYED]:["isPlayed"],[Fc.K$.STARTEDPLAYING]:["progress"],[Gc.TITLE]:["title"]},zc={[Fc.uj.CONTAINS]:"contains",[Fc.uj.EQUALS]:"eq",[Fc.uj.NOT_EQUALS]:"!=",[Fc.uj.GREATER_THAN]:">"};function Kc(e){return e.map((e=>{const{field:t,operator:n,value:i}=e;return`${Wc[t]} ${zc[n]} ${encodeURIComponent(i)}`})).join(",")}var Yc=function(e){return e.ADDED_AT="ADDED_AT",e.DURATION="DURATION",e.TITLE="TITLE",e}(Yc||{});const qc={[Fc.WY.PUBLISH_DATE]:Yc.ADDED_AT},$c={[Fc.WY.PUBLISH_DATE]:["number","publishDate","name"],[Yc.ADDED_AT]:["added_at"],[Yc.DURATION]:["duration"],[Yc.TITLE]:["title"]};var Zc=n(52384),Qc=n(41833),Jc=n(36416);class Xc extends Jc.r{_subscriptions=new Map;constructor(e){super(),this._show_client=e,this.onAddListener(Jc.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(Jc.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)})),this._aggregator=(0,ls.X)((e=>{this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._subscriptions.set(t,this._show_client.subDecorate(c.NC.fromPartial({item:[t],showPolicy:{showPolicy:{isBook:!0,extension:[c.UH.SHOW_ACCESS]},showPlayedStatePolicy:{resumeEpisodeLink:!0}}}),(e=>{const n=e.response?.show.find((e=>e.link===t));void 0!==n&&n.showPlayState?.resumeEpisodeLink&&n.showMetadata?.isBook&&this.emit(Jc.K.UPDATE_RESUME_EPISODE_LINK,{uri:t,resumeEpisodeLink:n.showPlayState?.resumeEpisodeLink})})))}))}))}}var eu=n(38307),tu=n(91742);var nu=n(48076);const iu=(e=!1)=>{const t=[c.UH.PODCAST_SUBSCRIPTIONS,c.UH.CONTENT_WARNING];return e&&t.push(c.UH.GATED_ENTITY_RELATIONS),c.pt.fromPartial({showPolicy:{showPolicy:{link:!0,name:!0,publisher:!0,covers:!0}},episodePolicy:{link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:t},episodePlayedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0},episodeCollectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},episodeSyncPolicy:{offline:!0,syncProgress:!0},progress:!0})},ru=(e=!1)=>{const t=[c.UH.AUDIOBOOK_SPECIFICS,c.UH.PODCAST_SUBSCRIPTIONS,c.UH.PODCAST_TOPICS,c.UH.HTML_DESCRIPTION,c.UH.EPISODE_TRANSCRIPTS,c.UH.PODCAST_RATING,c.UH.AUDIOBOOK_PRICE,c.UH.SHOW_ACCESS,c.UH.AUDIOBOOK_RELATIONS,c.UH.PLAYABILITY,c.UH.AUDIOBOOK_GENRE,c.UH.PRERELEASE,c.UH.COURSE_SPECIFICS];return e&&t.push(c.UH.GATED_ENTITY_RELATIONS),c.iz.fromPartial({showPolicy:{link:!0,name:!0,description:!0,publisher:!0,isExplicit:!0,covers:!0,mediaTypeEnum:!0,copyrights:!0,isMusicAndTalk:!0,isBook:!0,consumptionOrder:!0,extension:t},showPlayedStatePolicy:{resumeEpisodeLink:!0}})},su=(e=!1)=>{const t=[c.UH.SHOW_ACCESS,c.UH.PODCAST_SEGMENTS,c.UH.PODCAST_SUBSCRIPTIONS,c.UH.HTML_DESCRIPTION,c.UH.CONTENT_WARNING,c.UH.EPISODE_TRANSCRIPTS];return e&&t.push(c.UH.GATED_ENTITY_RELATIONS),Cr.q$c.fromPartial({link:!0,length:!0,name:!0,manifestId:!0,previewId:!0,previewManifestId:!0,description:!0,publishDate:!0,covers:!0,freezeFrames:!0,language:!0,available:!0,mediaTypeEnum:!0,number:!0,backgroundable:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0,extension:t})},au=(e=!1)=>c.pt.fromPartial({episodeCollectionPolicy:{isNew:!0},episodePlayedStatePolicy:{playable:!0,timeLeft:!0,isPlayed:!0},episodePolicy:su(e)}),ou=(e=!1)=>c.pt.fromPartial({showPolicy:{showPolicy:{link:!0,name:!0,publisher:!0,covers:!0}},episodePolicy:su(e),episodePlayedStatePolicy:{timeLeft:!0,isPlayed:!0,playable:!0,playabilityRestriction:!0,lastPlayedAt:!0},episodeCollectionPolicy:{isFollowingShow:!0,isInListenLater:!0,isNew:!0},episodeSyncPolicy:{offline:!0,syncProgress:!0},progress:!0});class lu{capabilities={canSort:!0,canFilter:!0,canGetDefaultSort:!0,canGetShowPlayedState:!0,canMarkAsFinished:!0};constructor(e,t,n,i,r){this.isGatedPodcastsEnabled=t,this._builder=n,this._audiobookCappingAPI=i,this._pubSubAPI=r,this._podcast_paywalls_client=new Zc.lb(e),this._show_service_client=new c.Gy(e),this._events=new Xc(this._show_service_client),this._metadata_service_client=new $s.sp(e),(0,nu.t)(this._pubSubAPI,this._onShowAccessUpdate.bind(this))}async getMetadata(e){const t=(0,C.o_h)(e).id,n=await this._show_service_client.getShow(c.bU.fromPartial({showId:t,range:{start:0,limit:1},headerPolicy:ru(this.isGatedPodcastsEnabled),listPolicy:au(this.isGatedPodcastsEnabled),sectionsPolicy:{trailerSection:!0,nextBestEpisode:!0},includeExtensionsOnError:!0}));if(void 0===n.response||n.status?.code!==c.D7.SUCCESS){if(n.response?.header?.showMetadata?.extension){const e=or(n.response.header.showMetadata.extension);if(function(e){return e.audiobookSpecifics&&e.prerelease?.releaseTime&&e.prerelease?.releaseTime>new Date||!1}(e))return function(e,t){if(!t?.prerelease)throw new Error("Error while constructing prerelease metadata");const{explanation:n}=e.getCappingStatus(t.showAccess);return{isPreRelease:!0,type:yt.c.AUDIOBOOK,uri:t.prerelease.uri,name:t.prerelease.entity?.name??"",coverArt:t.prerelease.entity?.covers.map((e=>({...e,url:e.uri})))??[],authorName:t.prerelease.entity?.agents.map((e=>e.name)).join(", "),narrators:xl(t),sample:null,htmlDescriptionPlain:t.htmlDescription?.htmlDescription,rating:null,isExplicit:t.prerelease.entity?.explicit??!1,duration:Number(t.audiobookSpecifics?.duration_ms),copyrights:Jl(t),publishDate:t.prerelease.releaseTime,preReleaseEndDateTime:t.prerelease.releaseTime,price:t?.audiobookPrice,isLocked:$l(t?.showAccess),consumptionCapExplanation:n,signifierText:t.showAccess?.signifier?.text,topics:t.audiobookGenres?Zl(t.audiobookGenres.genres):[]}}(this._audiobookCappingAPI,e);if(!e.playability?.isPlayable&&e.playability?.reason===Ki.Nc.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED)throw new eu.W("Requested audiobook is out of market",{cause:n.status?.reason,redirectUri:e.audiobookRelation?.sameBookUri})}throw new Error("Error while getting show metadata")}const i=await async function({response:e},t,n){const i=e?.header?.showMetadata;if(!n||!i||i?.isBook)return null;const{gatedEntityRelations:r,showAccess:s}=or(i.extension),a=r?.entitiesWithValueProps.at(0)?.uri;if(!a||!(0,C.WB1)(a)||i.link===a)return{showAccess:s??null,coverArt:i.covers};const{response:o}=await t.getDecorate(c.NC.fromPartial({item:[a],showPolicy:{showPolicy:{covers:!0,extension:[c.UH.SHOW_ACCESS]}}})),{showAccess:l}=or(o?.show.at(0)?.showMetadata?.extension);return{showAccess:l??null,coverArt:o?.show.at(0)?.showMetadata?.covers}}(n,this._show_service_client,this.isGatedPodcastsEnabled);return function(e,t,n){const i=t.header?.showMetadata;if(i?.isBook)return Ql(e,t);if(!i)throw new Error("Error while constructing metadata");return Yl(t,n)}(this._audiobookCappingAPI,n.response,i)}async getAccessInfo(e,t={}){!0===t.withPurge&&await Promise.all([this._metadata_service_client.purge({entityUri:[e],extensionKind:$s.UH.SHOW_ACCESS}),this._metadata_service_client.purge({entityUri:[e],extensionKind:$s.UH.GATED_ENTITY_RELATIONS})]);const n=[c.UH.SHOW_ACCESS];this.isGatedPodcastsEnabled&&n.push(c.UH.GATED_ENTITY_RELATIONS);const i=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],showPolicy:{showPolicy:{extension:n}}}));if(void 0===i.response)throw new Error("decorate request error");return function(e,t){let n={};const i=t.show.map((e=>e.showMetadata?.extension)).filter((e=>null!==e));for(const e of i)if(e&&(n=or(e),n.showAccess))break;const{explanation:r}=e.getCappingStatus(n.showAccess);return{prompt:n?.showAccess?.prompt,upsellLink:n?.showAccess?.upsellLink,basic:n?.showAccess?.basic,multiPass:n?.showAccess?.multiPass&&{title:n?.showAccess?.multiPass?.title,body:n?.showAccess?.multiPass?.soaDescription,soaPartners:n?.showAccess?.multiPass?.soaPartner},gatedEntityRelations:n?.gatedEntityRelations,consumptionCapped:r??void 0}}(this._audiobookCappingAPI,i.response)}async getBookContents(e,t){t.doRefreshSubscription&&await this._podcast_paywalls_client.putShowSubscription(Zc.D$.fromPartial({showUri:e}));const n=(0,C.o_h)(e).id,i=await this._show_service_client.getShow(c.bU.fromPartial({showId:n,range:{start:t.offset,limit:t.limit},listPolicy:iu(this.isGatedPodcastsEnabled)}));if(void 0===i.response||i.status?.code!==c.D7.SUCCESS)throw new Error("Error while getting show metadata");return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLengthVl(e.episodeMetadata,e.episodePlayState)))}}(i.response,t.offset,t.limit)}async getContents(e,t){const n=(0,C.o_h)(e).id,i=function(e){if(e?.field===Fc.WY.PUBLISH_DATE&&e.order===Fc.AX.ASC)return c.xB.PUBLISH_DATE_ASC;if(e?.field===Fc.WY.PUBLISH_DATE&&e.order===Fc.AX.DESC)return c.xB.PUBLISH_DATE_DESC;return c.xB.CONSUMPTION_ORDER_ASC}(t.sort),r=function(e=[]){return e=e||[],Kc([...e,Vc])}(t.filters),s=await this._show_service_client.getShow(c.bU.fromPartial({showId:n,sortOrder:i,filter:r,headerPolicy:this.isGatedPodcastsEnabled?ru(this.isGatedPodcastsEnabled):void 0,listPolicy:iu(this.isGatedPodcastsEnabled),range:{start:t.offset,limit:t.limit}}));if(void 0===s.response||s.status?.code!==c.D7.SUCCESS)throw new Error(`Error while getting show metadata: ${s.status?.reason}`);return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLengthWl(e.episodeMetadata,e.episodePlayState)))}}(s.response,t.offset,t.limit)}async getEpisodeOrChapter(e){const t=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],episodePolicy:ou(this.isGatedPodcastsEnabled)}));if(void 0===t.response)throw new Error("decorate request error");return function(e,t){const n=e.episode?.[0];if(!n||!n.episodeMetadata)throw new Error("Error while constructing episode");if(n.episodeMetadata.isBookChapter)return Vl(n.episodeMetadata,n.episodePlayState);if(!n.episodeMetadata)throw new Error("Error while constructing episode");return Wl(n.episodeMetadata,n.episodePlayState,t)}(t.response,await async function({response:e},t,n){const i=e?.episode.at(0)?.episodeMetadata;if(!n||!i||i?.isBookChapter)return null;const{gatedEntityRelations:r}=or(i.extension),s=r?.entitiesWithValueProps.at(0)?.uri;if(!s||!(0,C.gHQ)(s))return null;const{response:a}=await t.getDecorate(c.NC.fromPartial({item:[s],episodePolicy:{showPolicy:{showPolicy:{link:!0}}}})),o=a?.episode.at(0)?.episodeMetadata?.show?.link;if(!o||!(0,C.WB1)(o))return null;const{response:l}=await t.getDecorate(c.NC.fromPartial({item:[o],showPolicy:{showPolicy:{extension:[c.UH.SHOW_ACCESS]}}})),{showAccess:u}=or(l?.show.at(0)?.showMetadata?.extension);return u??null}(t,this._show_service_client,this.isGatedPodcastsEnabled))}async checkoutBook(e){return await(0,Qc.S)(e)}getPlayerSort(e){return e?function(e){const{field:t,order:n}=e;return $c[t].map((e=>n?`${e} ${n}`:e))}(function(e){return{field:qc[e.field],order:e.order}}(e)).join(", "):""}getPlayerFilter(e=[]){return Kc(function(e){return(e=e||[]).map((e=>{const t=Hc[e.field],n=function(e){return"string"==typeof e.value?`"${e.value}"`:e.value}(e);return{...e,field:t,value:n}}))}(e))}getEvents(){return this._events}async getShowPlayedState(e){const t=await this._show_service_client.getShow(c.bU.fromPartial({showId:(0,C.o_h)(e).id,headerPolicy:c.iz.fromPartial({showPlayedStatePolicy:{playedTime:!0,label:!0}})}));if(void 0===t.response)throw new Error("decorate request error");return t.response.header?.showPlayState?function(e){const t=e.response?.header?.showPlayState;if(!t)return null;const n=Number(t.playedTime);let i;switch(t.label){case 0:i=Ll.H7.Unknown;break;case 1:i=Ll.H7.NotStarted;break;case 2:i=Ll.H7.InProgress;break;case 3:i=Ll.H7.Completed;break;default:i=Ll.H7.Unrecogniced}return{playPositionMilliseconds:1e3*n,state:i}}(t):null}async updateUserRating(e,t){const n=await(0,tu.p)(this._builder,e,t);return await this._metadata_service_client.expire($s.vq.fromPartial({extensionKind:$s.UH.PODCAST_RATING,entityUri:[e]})),this._events.emit(Jc.K.UPDATE_RATING,{uri:e}),n}async markShowPlayedLegacy(e,t){t?this._show_service_client.markShowAsPlayed(c.jC.fromPartial({showId:(0,C.o_h)(e).id,state:c.dO.PLAYED})):await this._show_service_client.markShowAsPlayed(c.jC.fromPartial({showId:(0,C.o_h)(e).id,state:c.dO.UNPLAYED})),this._events.emit(Jc.K.UPDATE_PLAYED_STATE,{uri:e})}async invalidateShowMetadataCaches(e){await this._metadata_service_client.expire($s.vq.fromPartial({extensionKind:$s.UH.PLAYABILITY,entityUri:[e]}))}async _onShowAccessUpdate(e){await this._metadata_service_client.expire($s.vq.fromPartial({entityUri:e,extensionKind:$s.UH.SHOW_ACCESS}));for(const t of e)this._events.emit(Jc.K.UPDATE_SHOW_ACCESS,{uri:t})}}var cu=n(23289),uu=n(11336),du=n(71581),pu=n(31106),mu=n(16581),hu=n(40535),fu=n(74147);class gu{_isDsaEnabled=!1;constructor(e,t,n,i,r){this._contextPlayer=e,this._player=t,this._smartShuffleEligibility=n,this._productStateApi=i,this._centralizedContextualShuffle=r,this._events=new uu.L,(0,du.w)(this._productStateApi,(e=>{this._isDsaEnabled=e,e&&(0,fu.Z)(this._player,this)})),(0,hu.V)(this._centralizedContextualShuffle,this._syncShuffle.bind(this),this._events)}async _syncShuffle(e,t){}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();return(0,pu.B)(e,t?.context.uri,!1!==t?.restrictions.canToggleShuffle,(async()=>this._isContextUriActive(e)?!0===t?.restrictions.canToggleSmartShuffle:this._smartShuffleEligibility.getEligibility(e).then((({canSmartShuffle:e})=>e))),!1)}async getShuffle(e){if(this._isContextUriActive(e)){const e=this._player.getState();return e?.shuffle&&e.smartShuffle?cu.j.SMART_SHUFFLE:e?.shuffle?cu.j.ON:cu.j.OFF}return this._centralizedContextualShuffle.getContextualShuffleMode(e)}async setShuffle(e,t){if(t===cu.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");if(this._events.emitUpdateShuffleModeSync(e,t),this._isContextUriActive(e)){const n=di(e),i=this._player.getState()?.smartShuffle,r=t===cu.j.SMART_SHUFFLE;if(await async function(e,t){return e.setOptions(t).then(no)}(this._contextPlayer,Et.y4.fromPartial({shufflingContext:{value:t!==cu.j.OFF},modes:{context_enhancement:r?"RECOMMENDATION":"NONE"}})),n&&(i||r)){const t=Uo(r?(0,xo.f)(pi.DK,!0):e);await this._player.updateContext(null,{uri:e,url:t})}}else await this._centralizedContextualShuffle.setContextualShuffleMode(e,t);this._events.emitUpdateShuffleModeCompleteSync(e,t)}_isContextUriActive(e){const t=this._player.getState();return!!t?.context&&(0,mu.b8)(e,t.context.uri)}}var Eu=n(81861);class _u extends M.e{}const yu="enhance";async function vu({playlistDataServiceClient:e,playlistServiceClient:t,uri:n,isActive:i,timeout:r=5e3}){return await t.requestLenses(Cr.K02.fromPartial({uri:n,lenses:[{identifier:yu,active:i}]})),new Promise(((s,a)=>{let o=null;const{cancel:l}=e.subscribe(Cr.qrL.fromPartial({uri:n,query:{range:{start:0,length:0}},policy:{playlist:{lenses:!0}}}),(e=>{!!e.data?.playlist?.lenses?.appliedLenses.find((e=>e.name===yu))===i&&(l(),null!==o&&clearTimeout(o),s())}));r&&(o=setTimeout((()=>{l(),i&&t.requestLenses(Cr.K02.fromPartial({uri:n,lenses:[{identifier:yu,active:!1}]})),a(new _u(`${i?"Enabling":"Disabling"} Smart Shuffle failed after ${r}ms.`))}),r))}))}var bu=n(32257);class Su{_isDsaEnabled=!1;constructor(e,t,n,i,r,s,a,o,l){if(this._player=e,this._playlistServiceClient=t,this._playlistDataServiceClient=n,this._contextualShuffle=i,this._smartShuffleEligibility=r,this._productStateApi=s,this._history=a,this.isSmartShuffleEnabled=o,this.isNewShuffleModeOrderEnabled=l,this._events=new uu.L,(0,du.w)(this._productStateApi,(e=>{this._isDsaEnabled=e,e&&(0,fu.Z)(this._player,this)})),this.isSmartShuffleEnabled)(0,hu.V)(this._contextualShuffle,this._syncShuffle.bind(this),this._events);else{const e=e=>{const t=(0,C.o_h)(e);t?.type===C.NQG.PLAYLIST_V2&&vu({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:t.toURI(),isActive:!1})};this._player.getEvents().addListener(Ta.gd.ACTION,(t=>{t.data.action===Ta.Ik.PLAY&&e(t.data.context.uri)})),this._history.listen((async t=>{e(t.pathname)}))}}async _syncShuffle(e,t){let n=this._player.getState();const i=n?.context.uri,r=(0,C.o_h)(e)?.type===C.NQG.COLLECTION,s=t===cu.j.SMART_SHUFFLE;let a=e;r&&(a=(await this._smartShuffleEligibility.getEligibility(e)).lensUri),await vu({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:a,isActive:s}),n?.context&&(0,mu.b8)(e,i)&&(await this._player.setShuffle((0,Eu.C)(t)),n=this._player.getState(),r?this._player.updateContext(null,{uri:e,url:Uo((0,xo.f)(s?a:e,s)),metadata:{...n?.context.metadata,enhanced_context:s?"true":void 0}}):n&&this._player.updateContext(null,{...n.context,metadata:{...n.context.metadata,enhanced_context:s?"true":void 0}}))}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();return(0,pu.B)(e,t?.context.uri,!1!==t?.restrictions.canToggleShuffle,(()=>this._smartShuffleEligibility.getEligibility(e).then((({canSmartShuffle:e})=>e))),this.isNewShuffleModeOrderEnabled)}async getShuffle(e){const t=this._player.getState(),n=t?.context.uri;let i=await this._contextualShuffle.getContextualShuffleMode(e);return(0,mu.b8)(e,n)&&(i=(0,bu.l)(t)??i),i===cu.j.SMART_SHUFFLE&&this._isDsaEnabled?cu.j.ON:i}async setShuffle(e,t){if(this._events.emitUpdateShuffleModeSync(e,t),t===cu.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");await this._contextualShuffle.setContextualShuffleMode(e,t)}}var Au=n(24549),Cu=n(69880),Tu=n(90862);class Iu{constructor(e){this.karaokeServiceClient=new Cu.Pm(e)}getCapabilities(){return{isSupported:!0}}async setVocalVolume(e){await this.karaokeServiceClient.postVocalVolume({volume:e})}async setStatus(e){await this.karaokeServiceClient.postStatus({status:e===Tu.nW.ENABLED?Cu.Fr.ENABLED:Cu.Fr.DISABLED})}async getStatus(){const{status:e}=await this.karaokeServiceClient.getStatus({});return e===Cu.Fr.ENABLED?Tu.nW.ENABLED:Tu.nW.DISABLED}}class Ou{constructor(e){this._metadataServiceClient=e}async getEligibility(e){const t=(await this._metadataServiceClient.fetch($s.Rr.fromPartial({extensionQuery:[{extensionKind:$s.UH.SMART_SHUFFLE,entityUri:[e]}]}))).extension.at(0),n=t?.extensionKind,i=t?.entityExtension.at(0)?.extensionData?.value,r=void 0===n||void 0===i?null:or([{extensionKind:n,data:i}]),s=r?.smartShuffle??null;return{canSmartShuffle:s?.enabled??!1,lensUri:s?.uri||e}}}var wu=n(13569),Nu=n(76562),Ru=n(21398),Pu=n(15779);const Lu="@webgate/social-connect";class Du{constructor(e,t){this._transport=e,this._requestBuilder=t}onConnected(e){this._transport.on(Cn.TransportEvent.CONNECTED,e),this._transport.on(Cn.TransportEvent.RECONNECTED,e)}async fetchCurrentSession(e){try{const{body:t}=await this._requestBuilder.build().withHost(`${Lu}/v2/devices/${e}/jam_status`).withJsonContentType().withoutMarket().send();return t}catch(e){if(e instanceof Ru.O&&404===e.status)return null;throw e}}async createSession(){const{body:e}=await this._requestBuilder.build().withHost(`${Lu}/v2/sessions/current_or_new?activate=true`).withJsonContentType().withoutMarket().send();return e}async leaveSession(e){try{return await this._requestBuilder.build().withMethod("POST").withHost(`${Lu}/v3/sessions/${e}/leave`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof Ru.O&&404===e.status)return!0;throw e}}async deleteSession(e){try{return await this._requestBuilder.build().withMethod("DELETE").withHost(`${Lu}/v3/sessions/${e}`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof Ru.O&&404===e.status)return!0;throw e}}async joinSession(e,t,n,i){const r=new URLSearchParams;r.set("playback_control","REMOTE"===n?"listen_and_control":"control"),r.set("join_type",t),i&&r.set("local_device_id",i);const{body:s}=await this._requestBuilder.build().withMethod("POST").withHost(`${Lu}/v2/sessions/join/${e}?${r.toString()}`).withJsonContentType().withoutMarket().send();return s}async getSessionInfo(e){try{const{body:t}=await this._requestBuilder.build().withHost(`${Lu}/v2/sessions/info/${e}`).withJsonContentType().withoutMarket().send();return t}catch(e){if(e instanceof Ru.O&&404===e.status)return null;throw e}}async removeSessionMember(e,t){const{body:n}=await this._requestBuilder.build().withMethod("POST").withHost(`${Lu}/v3/sessions/${e}/member/${t}/kick`).withJsonContentType().withoutMarket().send();return n}async kickAllParticipants(e){const{body:t}=await this._requestBuilder.build().withMethod("POST").withHost(`${Lu}/v3/sessions/${e}/participant/all/kick`).withJsonContentType().withoutMarket().send();return t}async setQueueOnlyMode(e){const{body:t}=await this._requestBuilder.build().withMethod("PUT").withHost(`${Lu}/v2/sessions/current/queue_only_mode/${e?"enabled":"disabled"}`).withJsonContentType().withoutMarket().send();return t}async setParticipantVolumeControl(e){const{body:t}=await this._requestBuilder.build().withMethod("PUT").withHost(`${Lu}/v2/sessions/current/volume_control/${e?"ENABLED":"DISABLED"}`).withJsonContentType().withoutMarket().send();return t}async setBroadcastStatus(e,t){const n={deviceBroadcastStatus:{timestamp:Date.now().toString(),broadcastStatus:e,deviceId:t??""}};try{const{body:e}=await this._requestBuilder.build().withMethod("POST").withHost(`${Lu}/v2/devices/set_broadcast_status`).withJsonContentType().withoutMarket().withBody(Pu.FI.toJSON(n)).send();return e}catch(e){throw(0,O.UD)(e),e}}}var ku=n(8046),xu=n(92976);class Uu extends ku.M{_update_subscription=null;_message_subscription=null;constructor(e){super(),this._pubSubAPI=e}subscribeToUpdates(){this._update_subscription||(this._update_subscription=this._pubSubAPI.subscribe({ident:"social-connect/v2/session_update",onMessage:e=>this.onSessionUpdate(e)}))}unsubscribeToUpdates(){null!==this._update_subscription&&this._update_subscription.cancel()}onSessionUpdate(e){e.payloads.forEach((e=>{const t=JSON.parse((0,Io.dI)(e));(0,xu.HP)(t)&&this.emit(ku.n.SESSION_UPDATE,t)}))}subscribeToMessages(){this._message_subscription||(this._message_subscription=this._pubSubAPI.subscribe({ident:"social-connect/v2/session_messages",onMessage:e=>this.onSessionMessage(e)}))}unsubscribeToMessages(){null!==this._message_subscription&&this._message_subscription.cancel()}onSessionMessage(e){e.payloads.forEach((e=>{const t=JSON.parse((0,Io.dI)(e));(0,xu.Vl)(t)&&this.emit(ku.n.SESSION_MESSAGE,t)}))}}var Mu=n(6530);class Bu{constructor(e,t){this.productStateApi=t,this.isJamFreeEnabled="1"===e["social-session-free-tier"],this.isJamPremiumEnabled="1"===e["social-session"],this.listeners=new Set,this.productStateApi.subValues((e=>{const t="1"===e["social-session-free-tier"],n="1"===e["social-session"],i=t!==this.isJamFreeEnabled||n!==this.isJamPremiumEnabled;this.isJamFreeEnabled=t,this.isJamPremiumEnabled=n,i&&this.listeners.forEach((e=>e(this.getJamExperience())))}))}getJamExperience(){return this.isJamPremiumEnabled?Mu.lz.PREMIUM:this.isJamFreeEnabled?Mu.lz.FREE:Mu.lz.NONE}addListener(e){return this.listeners.add(e),()=>this.listeners.delete(e)}}var ju=n(6725),Fu=n(22933),Vu=n(15728);const Gu=e=>{switch(e){case Vu.kr.UNRECOGNIZED:return Mu.kr.UNRECOGNIZED;case Vu.kr.UNSPECIFIED_VERSION:return Mu.kr.UNSPECIFIED;case Vu.kr.V4:return Mu.kr.V4;case Vu.kr.V6:return Mu.kr.V6;default:return Mu.kr.UNSPECIFIED}},Hu=e=>({ipVersion:Gu(e.ipVersion),prefixLength:e.prefixLength});var Wu=n(52266),zu=n(330);function Ku(e){switch(e){case xu.bq.COMPUTER:return zu.Z.COMPUTER;case xu.bq.TABLET:return zu.Z.TABLET;case xu.bq.SMARTPHONE:return zu.Z.SMARTPHONE;case xu.bq.SPEAKER:return zu.Z.SPEAKER;case xu.bq.TV:return zu.Z.TV;case xu.bq.AVR:return zu.Z.AVR;case xu.bq.STB:return zu.Z.STB;case xu.bq.AUDIO_DONGLE:return zu.Z.AUDIO_DONGLE;case xu.bq.GAME_CONSOLE:return zu.Z.GAME_CONSOLE;case xu.bq.CAST_VIDEO:return zu.Z.CAST_VIDEO;case xu.bq.CAST_AUDIO:return zu.Z.CAST_AUDIO;case xu.bq.AUTOMOBILE:return zu.Z.AUTOMOBILE;case xu.bq.SMARTWATCH:return zu.Z.SMARTWATCH;default:return zu.Z.UNKNOWN_TYPE}}function Yu(e){switch(e){case xu.bq.CAST_VIDEO:case xu.bq.CAST_AUDIO:return zu.x.CAST;case xu.bq.COMPUTER:case xu.bq.TABLET:case xu.bq.SMARTPHONE:case xu.bq.GAME_CONSOLE:case xu.bq.SPEAKER:return zu.x.CONNECT;default:return zu.x.UNSPECIFIED_TECH}}function qu(e){switch(e){case xu.bq.COMPUTER:return"COMPUTER";case xu.bq.TABLET:return"TABLET";case xu.bq.SMARTPHONE:return"SMARTPHONE";case xu.bq.SPEAKER:return"SPEAKER";case xu.bq.TV:return"TV";case xu.bq.AVR:return"AVR";case xu.bq.STB:return"STB";case xu.bq.AUDIO_DONGLE:return"AUDIO_DONGLE";case xu.bq.GAME_CONSOLE:return"GAME_CONSOLE";case xu.bq.CAST_VIDEO:return"CAST_VIDEO";case xu.bq.CAST_AUDIO:return"CAST_AUDIO";case xu.bq.AUTOMOBILE:return"AUTOMOBILE";case xu.bq.SMARTWATCH:return"SMARTWATCH";default:return"UNKNOWN_TYPE"}}function $u(e){switch(e){case xu.bq.CAST_VIDEO:case xu.bq.CAST_AUDIO:return"CAST";case xu.bq.COMPUTER:case xu.bq.TABLET:case xu.bq.TV:case xu.bq.SMARTPHONE:case xu.bq.GAME_CONSOLE:case xu.bq.SPEAKER:case xu.bq.AUTOMOBILE:return"CONNECT";default:return"UNSPECIFIED_TECH"}}var Zu=n(97265);class Qu{broadcastStatusUpdatesSubscription=null;broadcastStatus={current:null};latestScanningResponse=null;networkInterfaces=[];activeDeviceId=null;sessionId=null;constructor(e,t,n,i,r){this._pubSubAPI=t,this._partyPooperServiceClient=n,this._socialConnectServiceClient=i,this._eventSender=r,this._desktop_local_net_session_client=new Vu.J4(e),this.subscribeToBroadcastStatusUpdates(),this.startScanningForLocalNetSessionDevices(),this.startSubscribingToNetworkInterfaces(),this.events=new Wu.s(this.broadcastStatus)}startScanningForLocalNetSessionDevices(){return this._desktop_local_net_session_client.startScanning({},(e=>{const t={devices:e.devices.map((e=>({...e,isNew:!this.latestScanningResponse?.devices.some((t=>t.deviceId===e.deviceId))})))};this.latestScanningResponse=t,this.events.emit(Wu.P.SCAN_UPDATE,{})}))}startSubscribingToNetworkInterfaces(){return this._desktop_local_net_session_client.subNetworkInterfaces({},(e=>{this.networkInterfaces=e.networkInterfaces.map(Hu)}))}getLocalNetSessionDevices(){return this.latestScanningResponse}async startBroadcastingLocalNetSessionDevice(e){const t={tech:Yu(e.deviceType??xu.bq.UNKNOWN),type:Ku(e.deviceType??xu.bq.UNKNOWN),title:e.deviceName,token:e.joinSessionToken,deviceId:await Zu.V.hash(e.hostActiveDeviceId)};await this._desktop_local_net_session_client.stopBroadcasting({}),await this._desktop_local_net_session_client.startBroadcasting({device:t}),this.events.emit(Wu.P.BROADCAST_NUDGE,{broadcastStatus:this.broadcastStatus.current,deviceId:this.activeDeviceId}),this.sessionId===e.sessionId&&this.activeDeviceId===e.hostActiveDeviceId||this._eventSender.send((0,ju.k)({session_id:e.sessionId,tech:$u(e.deviceType),type:qu(e.deviceType),reason:"start_broadcast_signal"})),this.sessionId=e.sessionId,this.activeDeviceId=e.hostActiveDeviceId}async stopBroadcastingLocalNetSessionDevice(){await this._desktop_local_net_session_client.stopBroadcasting({}),this.sessionId&&this._eventSender.send((0,Fu.C)({session_id:this.sessionId,reason:"stop_broadcast_signal"})),this.sessionId=null}subscribeToBroadcastStatusUpdates(){this.broadcastStatusUpdatesSubscription||(this.broadcastStatusUpdatesSubscription=this._pubSubAPI.subscribe({ident:"social-connect/v2/broadcast_status_update",onMessage:e=>{const t=Pu.dR.fromJSON(JSON.parse((0,Io.dI)(e.payloads[0])));this.handleBroadcastStatusUpdate(t.deviceBroadcastStatus?.broadcastStatus??null)}}))}handleBroadcastStatusUpdate(e){const t=(0,Pu.sV)(e);switch(this.broadcastStatus.current=t,t){case Pu.ez.BROADCAST_ON:case Pu.ez.BROADCAST_OFF:case Pu.ez.BROADCAST_UNAVAILABLE:case Pu.ez.BROADCAST_STATUS_UNKNOWN:}this.events.emit(Wu.P.BROADCAST_STATUS_UPDATE,t)}async getLocalNetSesssionDeviceVisibility(e){return this._partyPooperServiceClient.present(e,this.networkInterfaces)}async setBroadcastStatus(e){await this._socialConnectServiceClient.setBroadcastStatus(e,this.activeDeviceId)}getEvents(){return this.events}}var Ju=n(51975);let Xu=function(e){return e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.V4=1]="V4",e[e.V6=2]="V6",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function ed(e){switch(e){case 0:case"UNSPECIFIED":return Xu.UNSPECIFIED;case 1:case"V4":return Xu.V4;case 2:case"V6":return Xu.V6;default:return Xu.UNRECOGNIZED}}let td=function(e){return e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.INVISIBLE=1]="INVISIBLE",e[e.VISIBLE=2]="VISIBLE",e[e.NOTIFY=3]="NOTIFY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function nd(e){switch(e){case 0:case"UNSPECIFIED":return td.UNSPECIFIED;case 1:case"INVISIBLE":return td.INVISIBLE;case 2:case"VISIBLE":return td.VISIBLE;case 3:case"NOTIFY":return td.NOTIFY;default:return td.UNRECOGNIZED}}const id={fromJSON:e=>({sessionId:ad(e.sessionId)?globalThis.String(e.sessionId):"",networkInterfaces:globalThis.Array.isArray(e?.networkInterfaces)?e.networkInterfaces.map((e=>rd.fromJSON(e))):[]}),toJSON(e){const t={};return""!==e.sessionId&&(t.sessionId=e.sessionId),e.networkInterfaces?.length&&(t.networkInterfaces=e.networkInterfaces.map((e=>rd.toJSON(e)))),t},create:e=>id.fromPartial(e??{}),fromPartial(e){const t={sessionId:"",networkInterfaces:[]};return t.sessionId=e.sessionId??"",t.networkInterfaces=e.networkInterfaces?.map((e=>rd.fromPartial(e)))||[],t}};const rd={fromJSON:e=>({prefixLength:ad(e.prefixLength)?globalThis.Number(e.prefixLength):0,ipVersion:ad(e.ipVersion)?ed(e.ipVersion):0}),toJSON(e){const t={};return 0!==e.prefixLength&&(t.prefixLength=Math.round(e.prefixLength)),0!==e.ipVersion&&(t.ipVersion=function(e){switch(e){case Xu.UNSPECIFIED:return"UNSPECIFIED";case Xu.V4:return"V4";case Xu.V6:return"V6";case Xu.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.ipVersion)),t},create:e=>rd.fromPartial(e??{}),fromPartial(e){const t={prefixLength:0,ipVersion:0};return t.prefixLength=e.prefixLength??0,t.ipVersion=e.ipVersion??0,t}};const sd={fromJSON:e=>({visibility:ad(e.visibility)?nd(e.visibility):0}),toJSON(e){const t={};return 0!==e.visibility&&(t.visibility=function(e){switch(e){case td.UNSPECIFIED:return"UNSPECIFIED";case td.INVISIBLE:return"INVISIBLE";case td.VISIBLE:return"VISIBLE";case td.NOTIFY:return"NOTIFY";case td.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.visibility)),t},create:e=>sd.fromPartial(e??{}),fromPartial(e){const t={visibility:0};return t.visibility=e.visibility??0,t}};function ad(e){return null!=e}const od=e=>{switch(e){case Mu.kr.V4:return Xu.V4;case Mu.kr.V6:return Xu.V6;case Mu.kr.UNSPECIFIED:return Xu.UNSPECIFIED;case Mu.kr.UNRECOGNIZED:return Xu.UNRECOGNIZED;default:throw new Error(`Unknown IpVersion: ${e}`)}},ld=e=>({prefixLength:e.prefixLength,ipVersion:od(e.ipVersion)});class cd{constructor(e){this._requestBuilder=e}async present(e,t){const n=((e,t)=>({sessionId:e,networkInterfaces:t.map(ld)}))(e,t);try{const{body:e}=await this._requestBuilder.build().withHost("@webgate/party-pooper/v1/present").withJsonContentType().withMethod("POST").withBody(id.toJSON(n)).withoutMarket().send();return(e=>{switch(e.visibility){case td.VISIBLE:return Mu.MS.VISIBLE;case td.INVISIBLE:return Mu.MS.INVISIBLE;case td.NOTIFY:return Mu.MS.NOTIFY;case td.UNSPECIFIED:return Mu.MS.UNSPECIFIED;case td.UNRECOGNIZED:return Mu.MS.UNRECOGNIZED;default:throw new Error(`Unknown LocalDeviceVisibility: ${e.visibility}`)}})(sd.fromJSON(e))}catch(e){if(e instanceof Ru.O&&404===e.status)return Mu.MS.UNRECOGNIZED;throw e}}}var ud=n(35685),dd=n(11837),pd=n(85856),md=n(56394),hd=n(17206),fd=n(78118),gd=n(88319);var Ed=n(52429),_d=n(57361),yd=n(22167);class vd{constructor(e){this._cosmos=e}async getUser(){const{username:e}=await this._cosmos.get("sp://desktop/v1/session"),t=await async function(e,t){const n={name:t,images:[]};try{const{profiles:i}=await e.get("sp://core-profile/v1/profiles",{usernames:[t]});return i.length>0?i[0]:n}catch(e){return n}}(this._cosmos,e);return{type:yt.c.USER,uri:(0,C.Qjr)(e).toURI(),username:e,displayName:t.name,avatarBackgroundColor:t.color,images:t.images?.map((e=>({url:e.url,width:e.maxWidth,height:e.maxHeight})))||[]}}}var bd=n(83669);function Sd(e,t){return null!==e?{...e,market:"from_token",locale:t,valid:!0}:{accessToken:"accessToken",accessTokenExpirationTimestampMs:0,isAnonymous:!1,market:"from_token",locale:t,valid:!1}}async function Ad(e){return await fetch(`i18n/${e}.json`).then((e=>e.json()))}async function Cd(e){const t=await async function(e){const t="language";try{const n=await e.get({key:t});return n.entries[t]?.string??y.h.en}catch{return y.h.en}}((0,o.dn)(e));try{const e=await Ad(t);return{localeForTranslation:t,localeForFormatting:navigator.language,translations:e}}catch(e){const n=y.h.en;(0,i.Z)({message:`Attempt to use desired locale '${t}' failed. Using fallback '${n}'.`}),(0,O.UD)(e);try{return{localeForTranslation:n,localeForFormatting:n,translations:await Ad(n)}}catch(e){throw(0,O.Lu)(e),new Error(`Error when getting fallback translation: ${e}`)}}}function Td(e){return e.registerValue(_i.t,(0,Zt.h)()).registerValue(is.VI,(0,is.n1)()).registerFactory(kn.T,(e=>new Mn(e.resolve(_i.t)))).registerFactory(bd.L,(e=>function(e){return new vd(e)}(e.resolve(_i.t)))).registerFactory(Rc.c,(e=>new Nc(new l.EW(e.resolve(is.VI))))).registerFactory(Rn,(e=>new Pn)).registerFactory(Xe.sD,(e=>function(e,t){const n=(0,fd.F)(Cn.createBaseTransport,(0,gd.M)(),e);return n.addPlugin(hd.kJ,{WebSocket}),n.addPlugin((()=>t)),n.connect(),n}(e.resolve(kn.T),e.resolve(Rn)))).registerFactory(An.X,(e=>function(e,t,n){return new xn(e,t,n,new Ln.x)}(e.resolve(_i.t),e.resolve(kn.T),e.resolve(Rn))))}async function Id(e){navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then((e=>e.forEach((e=>e.unregister()))));const t="65b708073fc0480ea92a077233ca87bd",n=function(){const e=window.navigator.userAgent.match(st);return e?.groups?.version||"unknown"}(),i=(0,es.I)();Td(i);const[y,C,T,O,N,U,M]=await async function(e){const t=e.resolve(kn.T),n=e.resolve(_i.t),i=e.resolve(is.VI),r=e.resolve(bd.L),s=e.resolve(Rc.c),[a,o,l,c,u,d,p]=await Promise.all([it(n),t.getToken(),(0,Sn.k)(i),rt(n),Cd(i),r.getUser(),s.getValues()]);return[a,u,Sd(o,u.localeForTranslation),l,c,d,p]}(i);v.Ru.initialize(C),(0,Je.K)(i.resolve(Xe.sD),T,n,y.app_platform),vi(i.resolve(_i.t));const B=U?.username||null,j=B??"anonymous";i.registerFactory(Xe.KM,(e=>nt(y,e.resolve(Xe.sD),{clientId:t,ownerProvider:()=>B,storagePrefix:`${t}-desktop-ui`,useInMemoryStorage:!1,useOptimizedESS2NA:!1})));const F=new ot({timeout:1e4,clientId:y.remote_config_client_id,transport:i.resolve(Xe.sD),eventSender:i.resolve(Xe.KM),version:n,sp_t_cookie:y.event_sender_context_information?.installation_id}),V=await F.resolve({username:B}),G=g.Vk.merge(V,N);i.registerFactory(qs.m,(e=>new qs.P(j)));const H=(0,wt.s)(i.resolve(qs.m)),W=g.Vk.merge(V,N,H);i.registerValue(cn.z,ln.n.getInstance()),i.registerFactory(ms.zk,(e=>(0,ms.lY)(e.resolve(cn.z),W.getValue(on.v5s)))),i.registerFactory(ps.o,(e=>(0,ps.q)(e.resolve(ms.zk)))),i.registerFactory(Xe.Fi,(e=>{if(B&&y.is_developer_mode){const t=e.resolve(qs.m),n="lastVisitedLocation",i=t.getItem(n);let s;return s=i instanceof Ks.m||i instanceof Ys.Y?(0,r.sC)({initialEntries:void 0}):(0,r.sC)({initialEntries:[encodeURI(i)]}),s.listen((e=>{t.setItem(n,e.pathname)})),s}return(0,r.sC)()})),i.registerFactory(yd.p,(e=>new _d.J(e.resolve(cn.z)))),i.registerFactory(ci.I,(e=>{const t=W.getValue(en.gl),n=new li.C(e.resolve(hs.$));return t?function(e,t,n){return new Ei(new ui.S(e),t,n)}(e.resolve(is.VI),n,e.resolve(kc.b)):n})),i.registerFactory(hs.$,(e=>new hs.E(j))),i.registerFactory(ct.P,(e=>new ft(new m.Ms(e.resolve(is.VI)),new d.hA(e.resolve(is.VI))))),i.registerFactory(lt.Z,(e=>new lt.o(new p.f_(e.resolve(is.VI))))),i.registerFactory(an.L,(e=>new sn(new h.$A(e.resolve(is.VI))))),i.registerFactory(kc.b,(e=>Dc(e.resolve(is.VI),y.is_developer_mode))),i.registerFactory(wc,(e=>{return t=e.resolve(is.VI),new pc(new Cr.to1(t));var t})),i.registerFactory(Bn.U,(e=>new ti(new s.Pc(e.resolve(is.VI))))),i.registerFactory(Vn.c,(e=>new ri(new s.Pc(e.resolve(is.VI))))),i.registerFactory(Gn.x,(e=>new si(new s.Pc(e.resolve(is.VI))))),i.registerFactory(jn.r,(e=>new ni(new s.Pc(e.resolve(is.VI))))),i.registerFactory(ai.b_,(e=>new ai.m5(e.resolve(qs.m)))),i.registerFactory(ai.Hb,(e=>e.resolve(ai.b_))),i.registerFactory(ai.hQ,(e=>e.resolve(ai.b_))),i.registerFactory(Fn.h,(e=>{const t=new s.Pc(e.resolve(is.VI));return W.getValue(en.ug)?new ii(new ei(t),new oi.k(e.resolve(ai.hQ))):new ii(new ei(t))})),i.registerFactory(Vn.c,(e=>new ri(new s.Pc(e.resolve(is.VI))))),i.registerFactory(Bo.H,(e=>{const t=W.getValue(en.uy),n=W.getValue(en.gl),i=W.getValue(en.vU),r=!1===W.getValue(on.eWj),s=W.getValue(en.hd);return function(e,t,n,i,r,s,a,l,c,u){return new Mo((0,o.dn)(e),new Et.GD(e),new as.ve(e),new Cr.to1(e),new Cr.hb0(e),t,n,i,r,s,a,l,c,u)}(e.resolve(is.VI),e.resolve(ci.I),e.resolve(wu.z),"xpui_2025-01-13_1736790015473_5eaa090",t,n,i,e.resolve(wc),r,s)})),i.registerFactory(Ze.W,(e=>new $e.P(e.resolve(Bo.H),e.resolve(Sa.B)))),i.registerFactory(wu.z,(e=>{return t=e.resolve(is.VI),new Ou(new $s.sp(t));var t})),i.registerFactory(Au.X,(e=>{const t=W.getValue(en.uy),n=W.getValue(en.Mc);return W.getValue(en.gl)?(i=e.resolve(Bo.H),r=e.resolve(wu.z),s=e.resolve(Rc.c),a=e.resolve(is.VI),o=e.resolve(ci.I),new gu(new Et.GD(a),i,r,s,o)):function(e,t,n,i,r,s,a,o){return new Su(e,new Cr.to1(r),new Cr.hm7(r),t,n,i,s,a,o)}(e.resolve(Bo.H),e.resolve(ci.I),e.resolve(wu.z),e.resolve(Rc.c),e.resolve(is.VI),e.resolve(Xe.Fi),t,n);var i,r,s,a,o})),i.registerFactory(Sa.B,(e=>function(e,t){const n=new a.NI(e),i=(0,Xs.k7)(e);return new ba(n,i,t)}(e.resolve(is.VI),new s.Pc(e.resolve(is.VI))))),i.registerFactory(un.iY,(e=>{return t=e.resolve(is.VI),new fn(new dn.Ag(t));var t})),i.registerFactory(rs.P,(e=>(0,ss.W)(e.resolve(cn.z)))),i.registerFactory(Oa.Ak,(e=>function(e,t,n,i,r,s,a,o){if("1"!==o["is-puffin"])return new Na;const l=new Aa.zW(e);return new ja(t,l,n,i,r,s,a)}(e.resolve(is.VI),e.resolve(cn.z),e.resolve(qs.m),e.resolve(Xe.KM),e.resolve(Bo.H),e.resolve(un.iY),e.resolve(rs.P),M))),i.registerFactory(ya.v,(e=>function(e,t,n){const i=new Xs.LN(n),r=new Js.rM(n),s=new Si.HG(n),a=new l.EW(n);return new _a(e,t,i,r,s,a)}(B??"anonymous",e.resolve(_i.t),e.resolve(is.VI)))),i.registerFactory(mi.Ho,(e=>{const t=W.getValue(on.MCN),n=W.getValue(on.H30),i=W.getValue(on.ihJ);return function(e,t,n,i,r,s){return new Ps(new Si.HG(e),new as.ve(e),new Es.Ww(e),n,t,i,r,s)}(e.resolve(is.VI),B,e.resolve(cn.z),t,n,i)})),i.registerFactory(mc.Yi,(e=>{return t=e.resolve(is.VI),n=e.resolve(cn.z),new Tc(new Cr.Bl$(t),new Cr.ZxE(t),new Cr.hm7(t),n);var t,n})),i.registerFactory(Ic.Ki,(e=>{const t=W.getValue(on.MCN);return function(e,t,n,i,r,s){return new ic(new Cr.hm7(e),new Cr.to1(e),t,n,i,r,s)}(e.resolve(is.VI),e.resolve(wu.z),e.resolve(cn.z),e.resolve(wc),!1,t)})),i.registerFactory(Oc.O,(e=>{return t=e.resolve(is.VI),n=e.resolve(cn.z),new dc(new Cr.to1(t),n);var t,n})),i.registerFactory(bi.p,(e=>{return t=e.resolve(is.VI),n=e.resolve(mi.Ho),i=e.resolve(Ic.Ki),new Xr(new Si.HG(t),n,i);var t,n,i})),i.registerFactory(Fc.fZ,(e=>{const t=W.getValue(on.MCN);return new lu(e.resolve(is.VI),t,e.resolve(cn.z),e.resolve(gn.Z),e.resolve(kc.b))})),i.registerFactory(gn.Z,(e=>{return t=e.resolve(cn.z),n=e.resolve(is.VI),i=e.resolve(Bo.H),r=e.resolve(kc.b),s=(t,n)=>e.resolve(Fc.fZ).getAccessInfo(t,n),new bn(t,i,r,new En.J1(n),s);var t,n,i,r,s})),i.registerFactory(Pt.u,(e=>new Rt(new l.EW(e.resolve(is.VI)),e.resolve(Ic.Ki)))),i.registerFactory(Ls.sl,(e=>new zs(e.resolve(is.VI),e.resolve(_i.t),e.resolve(qs.m)))),i.registerFactory(Tt.W,(e=>new Ct(e.resolve(is.VI),e.resolve(ps.o)))),i.registerFactory(xe.u,(e=>new Fe(e.resolve(_i.t),new p.f_(e.resolve(is.VI)),new u.ef(e.resolve(is.VI))))),i.registerFactory(Oe._,(e=>new we(e.resolve(_i.t)))),i.registerFactory(qe.t,(e=>new Ye.T(e.resolve(ms.zk)))),i.registerFactory(Ot.H,(e=>new It(new E.aA(e.resolve(is.VI))))),i.registerFactory(Ut.g,(e=>new xt(e.resolve(is.VI)))),i.registerFactory(xc.X6,(e=>new jc(e.resolve(is.VI),new xc.hr))),i.registerFactory(Te.JD,(()=>new Ie)),i.registerFactory(Ae.v,(e=>(0,Se.v)(e.resolve(ms.zk)))),i.registerFactory(Tu.qh,(e=>new Iu(e.resolve(is.VI)))),i.registerFactory(Ne.jW,(e=>{return t=e.resolve(is.VI),new ke(new Re.MI(t));var t})),i.registerFactory(Ke.u,(e=>new ze((0,o.dn)(e.resolve(is.VI)),e.resolve(qs.m)))),i.registerFactory(A.Y,(e=>new I(new P(e.resolve(cn.z)),new R(e.resolve(kc.b),e.resolve(cn.z)),new w(e.resolve(kc.b),new P(e.resolve(cn.z)),new R(e.resolve(kc.b),e.resolve(cn.z)))))),i.registerFactory(L.h,(e=>new k(new D(e.resolve(kc.b),e.resolve(cn.z))))),i.registerFactory(x.$,(e=>new ye((0,o.dn)(e.resolve(is.VI)),e.resolve(Rc.c),new a.NI(e.resolve(is.VI)),new s.Pc(e.resolve(is.VI)),e.resolve(Ot.H))));{const t=(await b.Q.getAdState()).app_startup_id.value;i.registerFactory(S.M,(n=>(0,Qe.K)({container:e,history:n.resolve(Xe.Fi),eventSender:n.resolve(Xe.KM),playerAPI:n.resolve(Bo.H),appStartupId:t,resolver:W}))),i.registerFactory(rn.n,(e=>{const t=e.resolve(is.VI),n=e.resolve(S.M),i=W.getValue(en.kr),r=W.getValue(en.NL);return new nn(e.resolve(_i.t),new c.Gy(t),new l.EW(t),new E.aA(t),new a.NI(t),new f._X(t),(0,o.dn)(t),W,e.resolve(Xe.KM),n.vto.factories,t,r,i)}))}var z,K;z=i.resolve(is.VI),K="xpui",new ns(new ts.NH(z),K);const Y=new Ed.T(_.vR.getUBILogger({eventSender:i.resolve(Xe.KM),disableAutoBackgroundMonitoring:!1,authenticationProvider:{isAuthenticated:()=>null!==U},contextualProviders:{playContextUriProvider:{getPlayContextUri:()=>i.resolve(Bo.H).getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>i.resolve(Bo.H).getState()?.playbackId??null}}}));i.resolve(xe.u).setTitlebarHeight(xe.b);W.getValue(on.p5T)&&(0,Ce.n)();const q=W.getValue(en.uy);i.registerFactory(ud.j,(e=>{const t=W.getValue(en.PE);return function(e,t,n,i,r,s,a,o,l,c){const u=new Du(i,r);return new Nu.o(u,new Uu(n),s,new Bu(e,t),Mu._H.ENABLED,a,l?new Qu(o,n,new cd(r),u,c):new Ju.P)}(M,e.resolve(Rc.c),e.resolve(kc.b),e.resolve(Xe.sD),e.resolve(cn.z),e.resolve(yd.p),(()=>(0,md.C)(i.resolve(Fn.h))),e.resolve(is.VI),t,e.resolve(Xe.KM))})),i.registerFactory(dd.v,(e=>new pd.s(e.resolve(ud.j))));const $=W.getValue(on.Tq1);return q&&!$&&((0,ve.$)(i.resolve(Bo.H),i.resolve(Ic.Ki),i.resolve(ci.I),i.resolve(wu.z)),(0,be.m)(i.resolve(Au.X),i.resolve(wu.z),i.resolve(Bo.H),i.resolve(Ic.Ki),i.resolve(Fn.h))),i.resolve(gn.Z),i.registerFactory(Qs.Z,(e=>function(e){return new Zs(new $s.sp(e))}(e.resolve(is.VI)))),i.registerFactory(ds.n,(e=>function(e){return new us(new as.ve(e))}(e.resolve(is.VI)))),{version:n,container:e,operatingSystem:(0,gt.D)(),isDeveloperMode:y.is_developer_mode,isVideoSupported:!0,isWebPSupported:!0,enableCastConnect:!1,initialUser:U,initialProductState:M,username:j,getServiceWorkerMessenger:async()=>()=>new Promise((()=>{})),getRegistry:()=>i,getSession:()=>T,getTransport:()=>i.resolve(Xe.sD),getEventSender:()=>i.resolve(Xe.KM),getTranslations:()=>C.translations,getFeatureFlags:()=>O,getHistory:()=>i.resolve(Xe.Fi),getAdManagers:()=>i.resolve(S.M),getRemoteConfiguration:()=>G,getRemoteConfigurationWithLocalOverrides:()=>W,getGraphQLLoader:()=>i.resolve(ms.zk),getPlatformData:()=>y,getSEOExperiments:()=>({}),getSingAlongAPI:()=>i.resolve(Tu.qh),getUBILogger:()=>Y,getCollectionPlatformAPI:()=>i.resolve(Ne.jW),getEqualizerAPI:()=>i.resolve(Ke.u),getBuddyFeedAPI:()=>i.resolve(A.Y),getBuddyFeedLegacyAPI:()=>i.resolve(L.h),getSettingsAPI:()=>i.resolve(x.$),getRequestBuilder:()=>i.resolve(cn.z),getAudioOutputDevicesAPI:()=>i.resolve(un.iY),getPlaybackFiltersAPI:()=>i.resolve(Oa.Ak),getUrlDispenserServiceClient:()=>i.resolve(yd.p),getExternalAccessoryAPI:()=>i.resolve(rs.P)}}},95058:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,o:()=>r});var i=n(36285);class r{constructor(e){this._updateUiClient=e}async setWindowButtonsVisibility(e){await this._updateUiClient.setButtonsVisibility({showButtons:e})}}const s=(0,i.u)("NativeAPI")},18753:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({})},95752:(e,t,n)=>{"use strict";n.d(t,{f:()=>i});let i=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},7699:(e,t,n)=>{"use strict";n.d(t,{D:()=>r,P:()=>s});var i=n(36285);let r=function(e){return e[e.UPDATE_NONE=0]="UPDATE_NONE",e[e.UPDATE_AVAILABLE=1]="UPDATE_AVAILABLE",e[e.UPDATE_PROCESSING=2]="UPDATE_PROCESSING",e[e.UPDATE_READY=3]="UPDATE_READY",e}({});const s=(0,i.u)("UpdateAPI")},27236:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(7699),r=n(30157);function s(){return(0,r.N)(i.P)}},5689:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(30758),r=n(27236);function s(){const e=(0,r.t)(),[t,n]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const{cancel:t}=e.subscribe(n);return t}),[e,n]),t}},72762:(e,t,n)=>{"use strict";n.d(t,{Ek:()=>c,My:()=>o,aS:()=>a,wD:()=>l});var i=n(18753),r=n(95752),s=n(32963);const a=/Spotify\/(?.+)\s/;function o(){if(!!window.navigator.userAgent.match(a))return i.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?i.m.PWA:i.m.Web}function l(){const e="serviceWorker"in window.navigator,t=-1!==window.location.search.indexOf("pwa=1"),n=(0,s.D)()===r.f.ChromeOS;return e&&(n||t)}function c(){return o()===i.m.Desktop}},32963:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,f:()=>o});var i=n(9856),r=n.n(i),s=n(95752);function a(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?s.f.macOS:"Windows"===e?s.f.Windows:"Linux"===e?s.f.Linux:"Chrome OS"===e?s.f.ChromeOS:s.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},82212:(e,t,n)=>{"use strict";n.d(t,{createPlatformWeb:()=>Fo});var i=n(83407),r=n(92336),s=n(11776),a=n(31417),o=n(87633),l=n(47601);class c{getCapabilities(){return{isSupported:!1}}subscribeToBuddyActivity(){return{cancel:()=>{}}}fetchFriendActivity(){throw new Error("Method not implemented.")}fetchFriendActivityWithSubscriptions(e,t){throw new Error("Method not implemented.")}}var u=n(19049);class d{getCapabilities(){return{isSupported:!1}}subscribeToBuddyActivity(){return{cancel:()=>{}}}fetchFriendActivity(){throw new Error("Method not implemented.")}}const p="https://spclient.wg.spotify.com/ads-identity-web-enricher/v1/gpcSignals";var m=n(20992),h=n(17365);class f{constructor(e){this.key=e,this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.subValue=this.subValue.bind(this)}async getValue(){throw new h.N(`${this.key} is not supported.`)}subValue(){return()=>{}}async setValue(){throw new h.N(`${this.key} is not supported.`)}}class g{constructor(){this.allowExplicitContent=new f("contentPreferences.allowExplicitContent"),this.explicitContentForceDisallowed=new f("contentPreferences.explicitContentForceDisallowed")}}class E{constructor(){this.nativeNotificationOnPlayerTransition=new f("display.nativeNotificationOnPlayerTransition"),this.nativeOverlayOnMediaKeys=new f("display.nativeOverlayOnMediaKeys"),this.newReleasesAnnoucements=new f("display.newReleasesAnnoucements")}}class _{constructor(){this.isEmployee=new f("employee.isEmployee"),this.developerMode=new f("employee.developerMode"),this.showChromeToolbar=new f("employee.showChromeToolbar")}}class y{constructor(){this.streamingQuality=new f("quality.streamingQuality"),this.maxSupportedQuality=new f("quality.maxSupportedQuality"),this.downloadAudioQuality=new f("quality.downloadAudioQuality"),this.normalizeVolume=new f("quality.normalizeVolume"),this.autoAdjustQuality=new f("quality.autoAdjustQuality"),this.volumeLevel=new f("quality.volumeLevel"),this.remoteQuality=new f("quality.remoteQuality"),this.getFormats=this.getFormats.bind(this)}async getFormats(){return[]}}class v{constructor(){this.autoPublishPlaylist=new f("social.autoPublishPlaylist"),this.privateSession=new f("social.privateSession"),this.shareListeningActivity=new f("social.shareListeningActivity"),this.showMyTopArtists=new f("social.showMyTopArtists")}}class b{constructor(){this.language=new f("language"),this.quality=new y,this.social=new v,this.autoPlay=new f("autoplay"),this.viewportZoom=new f("app.browser.zoom-level"),this.display=new E,this.contentPreferences=new g,this.employee=new _}}var S=n(23577),A=n(35773),C=n(42068),T=n(16283),I=n(134),O=n(70028);class w{constructor(e,t,n,i){this.storage=e,this.storageKey=t,this.playerApi=n,this.libraryApi=i}executeAction(e,t){(function(e,t){return e===O.IA&&!!t})(e,t)&&this.playerApi.play(t.context,t.origin,t.options),function(e,t){return e===O.j8&&!!t}(e,t)&&this.libraryApi.add({uris:t.uris})}triggerActions(){const e=this.storage.getItem(this.storageKey);if(e){this.cleanActions();try{const t=JSON.parse(e);if(!function(e){return!!(e&&e.key&&e.action)}(t))return;this.executeAction(t.key,t.action)}catch(e){return}}}storeAction(...[e,t]){this.storage.setItem("PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",JSON.stringify(!0)),this.storage.setItem(this.storageKey,JSON.stringify({key:e,action:t}))}cleanActions(){this.storage.removeItem(this.storageKey)}}var N=n(59761),R=n(33234);class P{async copy(e){(0,R.l)(e)}async paste(){return await navigator.clipboard.readText()}}var L=n(77195);class D{events=new L.r0;constructor(e){this.sets=e||{}}getEvents(){return this.events}async get(e){return(this.sets[e]||[]).map((e=>({uri:e,addTime:BigInt(0)})))}subscribe(e,t){return()=>{}}async add(e,t){this.sets[e]=(this.sets[e]||[]).concat(t),this.events.emitSync(L.ar.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){this.sets[e]=(this.sets[e]||[]).filter((e=>!t.includes(e))),this.events.emitSync(L.ar.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){return t.map((t=>!!this.sets?.[e]?.includes(t)))}containsSync(e,t){return this.sets?.[e]?.includes(t)}subscribeContains(e,t,n){const i=t.map((t=>!!this.sets?.[e]?.includes(t)));n(i);const r=({data:{set:r,uris:s}})=>{if(e!==r)return;s.some((e=>{const n=t.indexOf(e);return!1===i[n]}))&&(s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!0)})),n(i))},s=({data:{set:r,uris:s}})=>{if(e!==r)return;s.some((e=>{const n=t.indexOf(e);return!0===i[n]}))&&(s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!1)})),n(i))};return this.events.addListener(L.ar.ADDED,r),this.events.addListener(L.ar.REMOVED,s),()=>{this.events.removeListener(L.ar.ADDED,r),this.events.removeListener(L.ar.REMOVED,s)}}}var k=n(81964),x=n(33549);class U extends x.e{}var M=n(72671);const B=`${M.I_}/collection/v2`;var j=n(85515),F=n(23091);const V=new RegExp(String.raw`hm://collection/([^/]*)/[^/]*/json`);class G{inFlightCache=new j.od;constructor(e,t,n){this._builder=e,this._pubSubAPI=t,this._username=n,this.cacheBySet=Object.fromEntries(L.QZ.map((e=>[e,new j.GG(72e5,864e5)]))),this.events=new k.g(this.subscribeContains.bind(this),this.cacheBySet),this._subscribeToCollectionChangedMessages()}_subscribeToCollectionChangedMessages(){if(!this._username)return;this._pubSubAPI.subscribe({ident:"hm://collection/",isPrefix:!0,onMessage:({ident:e,payloads:t})=>{if(0===t.length)return;const n=e.match(V)?.[1];if(!n||!(0,L.tV)(n))return;const{items:i}=JSON.parse((0,F.dI)(t[0])),{added:r,removed:s}=i.reduce(((e,{type:t,identifier:n,removed:i})=>{const r=`spotify:${t}:${n}`;return i?e.removed.push(r):e.added.push(r),e}),{added:[],removed:[]});r.length>0&&this.events.emit(L.ar.ADDED,{set:n,uris:r,source:"server"}),s.length>0&&this.events.emit(L.ar.REMOVED,{set:n,uris:s,source:"server"})}})}getEvents(){return this.events}async get(e){if(!this._username)throw new U("Username is required");const t=await function(e,t,n){return e.build().withHost(B).withPath("/paging").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n})).withEndpointIdentifier("/paging").send()}(this._builder,this._username,e);return t.body.items.map((({uri:e,added_at:t})=>({uri:e,addTime:BigInt(t)})))}subscribe(e,t){if(!this._username)throw new U("Username is required");this.get(e).then(t);const n=({data:{set:n}})=>{e===n&&this.get(e).then(t)};return this.events.addListener(L.ar.ADDED,n),this.events.addListener(L.ar.REMOVED,n),()=>{this.events.removeListener(L.ar.ADDED,n),this.events.removeListener(L.ar.REMOVED,n)}}async add(e,t){if(!this._username)throw new U("Username is required");await function(e,t,n,i){return e.build().withHost(B).withPath("/write").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e})))})).withEndpointIdentifier("/collection/v2/add").send()}(this._builder,this._username,e,t),this.events.emit(L.ar.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){if(!this._username)throw new U("Username is required");await function(e,t,n,i){return e.build().withHost(B).withPath("/write").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e,is_removed:!0})))})).withEndpointIdentifier("/collection/v2/remove").send()}(this._builder,this._username,e,t),this.events.emit(L.ar.REMOVED,{set:e,uris:t,source:"client"})}getInFlightCacheKey(e,t){return`${e}:${t}`}async contains(e,t){if(!this._username)throw new U("Username is required");const n=[],i=[],r=[];t.forEach((t=>{this.cacheBySet[e].has(t)?n.push(t):this.inFlightCache.has(t)?i.push(t):r.push(t)}));const s=Object.fromEntries(n.map((t=>[t,this.cacheBySet[e].get(t)]))),a=Promise.all(i.map((t=>this.inFlightCache.get(this.getInFlightCacheKey(e,t))))).then((e=>Object.fromEntries(i.map(((t,n)=>[t,e[n]])))));let o={};if(r.length>0){const t=function(e,t,n,i){return e.build().withHost(B).withPath("/contains").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e})))})).withEndpointIdentifier("/collection/v2/contains").send()}(this._builder,this._username,e,r).then((e=>Object.fromEntries(r.map(((t,n)=>[t,e.body.found[n]]))))),n=new Promise(((e,t)=>setTimeout(t,1e4,new Error("In-flight timeout exceeded"))));r.forEach((i=>{const r=t.then((({[i]:e})=>e));this.inFlightCache.set(this.getInFlightCacheKey(e,i),Promise.race([r,n]))})),o=await t,r.forEach((t=>{this.cacheBySet[e].set(t,o[t])}))}const l=await a;return t.map((e=>o[e]??l[e]??s[e]))}containsSync(e,t){return this.cacheBySet[e].peek(t)}subscribeContains(e,t,n){let i=[];this.contains(e,t).then((e=>{i=e,n(e)}));const r=({data:{set:r,uris:s}})=>{if(e!==r)return;s.some((e=>{const n=t.indexOf(e);return!1===i[n]}))&&(i=i.slice(),s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!0)})),n(i))},s=({data:{set:r,uris:s}})=>{if(e!==r)return;s.some((e=>{const n=t.indexOf(e);return!0===i[n]}))&&(i=i.slice(),s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!1)})),n(i))};return this.events.addListener(L.ar.ADDED,r),this.events.addListener(L.ar.REMOVED,s),()=>{this.events.removeListener(L.ar.ADDED,r),this.events.removeListener(L.ar.REMOVED,s)}}}var H=n(97330),W=n(33961);class z{enableMenuItem(){return Promise.resolve()}disableMenuItem(){return Promise.resolve()}setTitlebarHeight(){return Promise.resolve()}enablePLEEndpoint(){return Promise.resolve()}notifyUsableStateReached(){return Promise.resolve()}notifyReadyStateReached(){return Promise.resolve()}notifyViewLoaded(){return Promise.resolve()}getEvents(){return new W.M}}var K=n(40093),Y=n(40892),q=n(47912),$=n(27731),Z=n(11462);class Q extends Y.W{constructor(e){super(e),this.webAudioFilters=[]}setEnabledState(e){this.localStorageAPI.setItem(q.D,e);const t=(e,t)=>{this.webAudioFilters[t]&&(this.webAudioFilters[t].gain.value=e.gain)};e?this.filters.forEach(t):$.fG.flat.filters.forEach(t)}getEnabledState(){const e=this.localStorageAPI.getItem(q.D);return!(e instanceof Error)&&e}subscribeToEnabledState(e){const t=this.localStorageAPI.getItem(q.D);e(!(t instanceof Error)&&t);return this.localStorageAPI.getEvents().addListener(Z.r.UPDATE,(t=>{t.data.key===q.D&&e(t.data.value)}))}connectAudioProcessor(e){const t=new AudioContext({latencyHint:"playback"}),n=t.createMediaElementSource(e);this.webAudioFilters=this.filters.map(((e,n)=>{const i=t.createBiquadFilter();return i.frequency.value=e.frequency,0===n?i.type="lowshelf":n===this.filters.length-1?i.type="highshelf":(i.type="peaking",i.Q.value=5),i.gain.value=e.gain,i})),this.webAudioFilters.reduce(((e,t)=>(e.connect(t),t)),n).connect(t.destination),document.addEventListener("click",(()=>{t.resume()}),{once:!0})}async setFilterGain(e,t){const n=Math.max(-$.Zs,Math.min(t,$.Zs)),i=this.filters.findIndex((t=>t.key===e));this.webAudioFilters[i]&&(this.webAudioFilters[i].gain.value=n),this.filters[i].gain=n}async getFilters(){return this.filters}isSupported(){return"AudioContext"in window}}var J=n(16311),X=n(24109),ee=n(998),te=n(12032),ne=n(77975),ie=n(11459),re=n(91008),se=n(87464),ae=n(20150);var oe=n(47481),le=n(95058),ce=n(18753),ue=n(7699),de=n(9856),pe=n.n(de);class me{async getVersionInfo(){return{containerVersion:pe().parse(navigator.userAgent).browser.version||"unknown",containerBuildType:"unknown",containerPlatform:"unknown",uiVersion:"xpui_2025-01-13_1736790015473_5eaa090",cefVersion:"unknown",cefRuntime:"unknown",buildSystem:"unknown"}}subscribe(){return{cancel:()=>{}}}async prepareUpdate(){}async applyUpdate(){window.location.reload()}}var he=n(32963),fe=n(38234),ge=n(88970);const Ee=(e,t)=>[(0,ge.ks)(e),(0,ge.Ow)({version:"xpui_2025-01-13_1736790015473_5eaa090"}),(0,ge.ws)(),(0,ge.p4)(t)],_e=(e,t,n,i,r,s)=>{const a=(0,fe.kE)({transport:e,suppressPersist:false,context:Ee(t,n),storagePrefix:r,ownerProvider:i,useOptimizedESS2NA:s});return a};var ye=n(28999),ve=n(32304);function be(e,t,n){return Math.min(Math.max(e,t),n)}var Se=n(32792),Ae=n(68800);const Ce=.0625;class Te{_volume=null;_remoteVolume=null;constructor(e){this._harmony=e,this._events=new Se.T,this._events.addListener(Se._.VOLUME,(({data:{volume:e,isLocal:t}})=>{this._volume=e||0,t&&(0,Ae.Y0)(e)})),this._harmony.addListener(ve.bi.VOLUME_CHANGED,(({data:{volume:e,remote:t}})=>{this._events.emit(Se._.VOLUME,{volume:e,isLocal:!t})})),this._harmony.addListener(ve.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(({data:{deviceInfo:e}})=>{if(null!==e){const t=this._remoteVolume!==e.volume;t&&!e.local&&(this._remoteVolume=e.volume||0,this._events.emit(Se._.VOLUME,{volume:this._remoteVolume,isLocal:!1})),null!==this._remoteVolume&&t&&e.local&&(this._remoteVolume=null,this._events.emit(Se._.VOLUME,{volume:e.volume,isLocal:!0}))}}))}getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!1,canGetFiles:!1,puffinEnabled:!1}}getEvents(){return this._events}async getVolume(){return await this._harmony.getVolume()}async setVolume(e){const t=be(e,0,1);await this._harmony.setVolume(t)}async raiseVolume(){null!==this._volume&&await this.setVolume(this._volume+Ce)}async lowerVolume(){null!==this._volume&&await this.setVolume(this._volume-Ce)}async getPlaybackInfo(){return null}async getFiles(){throw new Error("Not implemented!")}}var Ie=n(79126);const Oe=.0625;class we{_volume=null;constructor(e){this._overture=e,this._events=new Se.T,this._events.addListener(Se._.VOLUME,(({data:{volume:e}})=>{this._volume=e})),this._overture.addListener(Ie.LW.VOLUME_CHANGED,(({data:e})=>{this._events.emit(Se._.VOLUME,{volume:e.volume,isLocal:!0})}))}getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!1,canGetFiles:!1,puffinEnabled:!1}}getEvents(){return this._events}async getVolume(){return await this._overture.getVolume()}async setVolume(e){const t=be(e,0,1);await this._overture.setVolume(t)}async raiseVolume(){null!==this._volume&&await this.setVolume(this._volume+Oe)}async lowerVolume(){null!==this._volume&&await this.setVolume(this._volume-Oe)}async getPlaybackInfo(){return null}async getFiles(){throw new Error("Not implemented!")}}var Ne=n(46173),Re=n(35163),Pe=n(82585),Le=n(61451),De=n(25357),ke=n(13659),xe=n(29475),Ue=n(7307),Me=n(85907),Be=n(78613);function je(e,{shuffle:t}){return(void 0!==t||!(0,re.WB1)(e.uri))&&t}function Fe(e,{repeat:t}){if(void 0===t&&(0,re.WB1)(e.uri))return ve.pM.OFF;switch(t){case De.p.REPEAT_NONE:return ve.pM.OFF;case De.p.REPEAT_CONTEXT:return ve.pM.CONTEXT;case De.p.REPEAT_TRACK:return ve.pM.TRACK;default:return}}function Ve({featureIdentifier:e,featureVersion:t,referrerIdentifier:n,viewURI:i,externalReferrer:r}){return{featureIdentifier:e,featureVersion:t,referrerIdentifier:n,viewURI:i,externalReferrer:r}}function Ge(e,t,n){return{contextURI:e.uri,trackUID:n.skipTo?.uid,trackURI:n.skipTo?.uri,index:n.skipTo?.index,pageIndex:n.skipTo?.pageIndex,initialOffset:n.seekTo,shuffle:je(e,n),repeatMode:Fe(e,n),filter:e.metadata?.[Le.W.FILTERING_PREDICATE],sort:e.metadata?.[Le.W.SORTING_CRITERIA],playOrigin:Ve(t),paused:n.paused,loggingParams:n.loggingParams}}const He=new RegExp(String.raw`^q[0-9]+$`);function We(e,t,n){const i=!!e.uid&&He.test(e.uid),r=n??(i?"queue":null);return(0,re.U_m)(e.uri)||(0,re.PkR)(e.uri)?function(e,t,n){return{type:Ue.c.TRACK,uri:t.linked_from?.uri?t.linked_from.uri:t.uri,uid:t.uid??null,name:t.name??"",mediaType:t.media_type??"audio",duration:{milliseconds:t.duration_ms??0},album:{type:Ue.c.ALBUM,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},artists:t.artists?.map((({uri:e,name:t})=>({type:Ue.c.ARTIST,uri:e,name:t||""})))??[],isLocal:(0,re.PkR)(t.uri),provider:e,metadata:n,get images(){return this.album.images}}}(r,e,t):(0,re.gHQ)(e.uri)?"chapter"===e.content_type?function(e,t,n){return{type:Ue.c.CHAPTER,uri:t.uri,uid:t.uid??null,artists:t.artists?.map((({uri:e,name:t})=>({type:Ue.c.ARTIST,uri:e,name:t||""})))??[],name:t.name??"",mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},book:{type:Ue.c.AUDIOBOOK,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},provider:e,metadata:n,get images(){return this.book.images}}}(r,e,t):function(e,t,n){return{type:Ue.c.EPISODE,uri:t.uri,uid:t.uid??null,artists:t.artists?.map((({uri:e,name:t})=>({type:Ue.c.ARTIST,uri:e,name:t||""})))??[],name:t.name??"",mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},show:{type:Ue.c.SHOW,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},provider:e,metadata:n,get images(){return this.show.images}}}(r,e,t):(0,re.AIy)(e.uri)?function(e,t,n){return{type:Ue.c.AD,uri:t.uri,uid:t.uid??null,title:t.name??null,advertiser:t.artists?.[0].name??null,url:t.artists?.[0].uri??null,id:null,mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},images:t.album?.images??[],isPodcastAd:!1,isSkippableAd:!1,isTestAd:!1,provider:e,metadata:n}}(r,e,t):function(e,t,n){return{type:Ue.c.UNKNOWN,uri:t.uri,uid:t.uid??null,name:t.name??"",mediaType:t.media_type,duration:{milliseconds:-1},album:{type:Ue.c.ALBUM,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},artists:t.artists?.map((({uri:e,name:t})=>({type:Ue.c.ARTIST,uri:e,name:t||""})))??[],provider:e,metadata:n,get images(){return this.album.images}}}(r,e,t)}function ze(e){switch(e){default:case ve.pM.OFF:return De.p.REPEAT_NONE;case ve.pM.CONTEXT:return De.p.REPEAT_CONTEXT;case ve.pM.TRACK:return De.p.REPEAT_TRACK}}function Ke(e){switch(e){case ve.d2.DEFAULT:case ve.d2.UNKNOWN:case void 0:return{bitrateLevel:xe.Yn.UNKNOWN};case ve.d2.LOW:return{bitrateLevel:xe.Yn.LOW};case ve.d2.NORMAL:return{bitrateLevel:xe.Yn.NORMAL};case ve.d2.HIGH:return{bitrateLevel:xe.Yn.HIGH};case ve.d2.VERY_HIGH:return{bitrateLevel:xe.Yn.VERY_HIGH};case ve.d2.HIFI:return{bitrateLevel:xe.Yn.LOSSLESS};default:return(0,Me.d)(e)}}function Ye(e=[]){return e.map((e=>ke.D.includes(e)?e:"unknown"))}function qe(e){const t={};for(const n in e)(0,Be.F)(n)&&(t[n]=Ye(e[n].reasons));return t}function $e({disallow_pausing_reasons:e=[],disallow_resuming_reasons:t=[],disallow_seeking_reasons:n=[],disallow_skipping_prev_reasons:i=[],disallow_skipping_next_reasons:r=[],disallow_toggling_repeat_context_reasons:s=[],disallow_toggling_repeat_track_reasons:a=[],disallow_toggling_shuffle_reasons:o=[],disallow_transferring_playback_reasons:l=[],disallow_add_to_queue_reasons:c=[],disallow_set_queue_reasons:u=[],disallow_setting_modes:d={},disallow_signals:p={}}){return{canPause:0===e.length,canResume:0===t.length,canSeek:0===n.length,canSkipPrevious:0===i.length,canSkipNext:0===r.length,canToggleRepeatContext:0===s.length,canToggleRepeatTrack:0===a.length,canToggleShuffle:0===o.length,canToggleSmartShuffle:0===(d.context_enhancement?.values.RECOMMENDATION?.reasons?.filter((e=>"already_set"!==e)).length??0),disallowPausingReasons:Ye(e),disallowResumingReasons:Ye(t),disallowSeekingReasons:Ye(n),disallowSkippingPreviousReasons:Ye(i),disallowSkippingNextReasons:Ye(r),disallowTogglingRepeatContextReasons:Ye(s),disallowTogglingRepeatTrackReasons:Ye(a),disallowTogglingShuffleReasons:Ye(o),disallowTransferringPlaybackReasons:Ye(l),disallowAddToQueueReasons:Ye(c),disallowSetQueueReasons:Ye(u),disallowSettingPlaybackSpeedReasons:Ye(l),disallowSignals:qe(p)}}var Ze=n(70207);class Qe extends se.JW{constructor(e){super(),this._harmony=e,this._harmony.addListener(ve.bi.STATE_CHANGED,(({data:{state:e}})=>{this.emit(se.gd.UPDATE,function(e){if(null===e)return null;const t=null!==e.context.uri,n=null!==e.track_window.current_track;return{sessionId:"",timestamp:e.timestamp,context:{uri:e.context.uri??"",metadata:e.context.metadata},index:{pageURI:null,pageIndex:null,itemIndex:null},item:(i=e.track_window.current_track,null===i?null:We(i,i.metadata??void 0)),shuffle:e.shuffle,smartShuffle:e.shuffle_mode===ve.jb.SMART,repeat:ze(e.repeat_mode),speed:e.playback_features?.playback_speed?.current??1,speedEsperanto:e.playback_features?.playback_speed?.selected??1,playbackQuality:Ke(e.playback_quality),playbackId:e.playback_id,positionAsOfTimestamp:e.position,duration:e.duration,restrictions:$e(e.restrictions),hasContext:t&&n,isPaused:e.paused,isBuffering:e.loading,previousItems:e.track_window.previous_tracks.map((e=>We(e,e.metadata||void 0))),nextItems:e.track_window.next_tracks.map((e=>We(e,e.metadata||void 0))),signals:e.playback_features?.signal_ids};var i}(e))})),this._harmony.addListener(ve.bi.ERROR,(({data:{error:e}})=>{e.unrecoverable?this.emit(se.gd.ERROR,new Ze.bt(Ze.Z9.PLAYBACK_ERROR,[],e)):this.emit(se.gd.ERROR,new Ze.q3(Ze.Z9.PLAYBACK_ERROR,[],e))}))}}var Je=n(98220),Xe=n(93293);class et{_queue=null;_cache=new j.GG(36e5,3e5);constructor(e,t,n,i,r){this._events=e,this._queueManager=t,this._loader=n,this.getRepeatMode=i,this._shouldRenderSecondRepeatedContextItemsIteration=r,this._queueManager.addListener(ve.bi.PLAYER_QUEUE_CHANGED,(async e=>{this._queue=e.data.internalPlayerQueue,this._state=await this.getQueueState(),this._events.emitQueueUpdate(this._state)})),this._state=(0,Je.RU)([],this.getRepeatMode(),this._shouldRenderSecondRepeatedContextItemsIteration)}async getQueueState(){const e=this._queue?.current_track?We(this._queue?.current_track,this._queue?.current_track.metadata,this._queue?.current_track.provider):null,t=this._queue?.next_items.filter((e=>!e.hidden_in_queue)).map((e=>We(e,e.metadata,e.provider)))??[];let n=e?[e,...t]:t;try{n=await(0,Xe.L)(this._loader,this._cache,n)}catch(e){console.error(e)}return(0,Je.RU)(n,this.getRepeatMode(),this._shouldRenderSecondRepeatedContextItemsIteration)}isSameItem(e,t){return e.uid&&t.uid?e.uid===t.uid:e.uri===t.uri}isQueued(e){return"queue"===e.provider}markAsQueued(e){return{...e,provider:"queue",metadata:{...e.metadata,is_queued:"true"}}}createQueueItem(e,t){return{uri:e.uri,type:"track",provider:t?"queue":"context",metadata:{is_queued:t.toString()}}}async addToQueue(e){this._queueManager.addToQueue(e.map((e=>e.uri)))}async removeFromQueue(e){null!==this._queue&&this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:this._queue.next_items?.filter((t=>!e.some((e=>this.isSameItem(e,t))))),previous_items:this._queue.previous_items})}async clearQueue(){null!==this._queue&&this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:this._queue.next_items.filter((e=>!this.isQueued(e))),previous_items:this._queue.previous_items})}async reorderQueue(e,t){if(null===this._queue)return;const n=[...this._queue.next_items];this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:(0,Je.jl)(e,n,t,this.isSameItem,this.isQueued,this.markAsQueued),previous_items:this._queue.previous_items})}async insertIntoQueue(e,t){if(null===this._queue)return;const n=[...this._queue.next_items];this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:(0,Je.Ry)(e,n,t,this.isSameItem,this.isQueued,this.createQueueItem),previous_items:this._queue.previous_items})}getQueue(){return this._state}getInternalQueue(){return this._queue}}var tt=n(16368),nt=n(55347);class it{_state=null;constructor(e,t,n,i,r,s){this._harmony=e,this._defaultFeatureVersion=n,this._contextualShuffle=i,this._isSmartShuffleEnabled=r,this._shouldRenderSecondRepeatedContextItemsIteration=s,this._events=new Qe(this._harmony),this._events.addListener(se.gd.UPDATE,(({data:e})=>{this._state=e})),this._queue=new et(this._events,this._harmony.getQueueManager(),t,(()=>this._state?.repeat??De.p.REPEAT_NONE),this._shouldRenderSecondRepeatedContextItemsIteration),this.referrer="PlayerHarmony_UnknownReferrer"}setDefaultFeatureVersion(e){void 0===e.featureVersion&&(e.featureVersion=this._defaultFeatureVersion)}getCapabilities(){return{canChangeSpeed:!0,canChangeVolume:!0,canPlayMultipleContextPages:!0,maxNextTracks:2,hasDecoratedQueue:!0}}getEvents(){return this._events}getState(){return this._state}getReferrer(){return this.referrer}setReferrer(e){this.referrer=e}async sendSignal(e){await this._harmony.sendCustomSignal(e)}canSendSignal(e){const t=this._state?.signals;return!!t&&(!(t.length<=0)&&t.includes(e))}async play(e,t,n={}){let i=!1;if(this._isSmartShuffleEnabled){const t=await(this._contextualShuffle?.getContextualShuffleMode(e.uri))??Pe.j.OFF;n.shuffle=(0,tt.C)(t),i=t===Pe.j.SMART_SHUFFLE}if(!this._events.emitPlaySync(e,t,n))if(this.setDefaultFeatureVersion(t),e.pages)this._harmony.playPages(e.pages.map((e=>({tracks:e.items?.map((({uri:e,uid:t})=>({uri:e,uid:t??void 0}))),pageURL:e.url,nextPageURL:e.nextPageUrl,metadata:e.metadata}))),null,Ge(e,t,n));else{if(i)try{e={...e,uri:(0,nt.f)(e.uri,!0)}}catch(e){(0,Re.UD)(e)}this._harmony.playURI(e.uri,null,Ge(e,t,n))}}async pause(){this._events.emitPauseSync()||await this._harmony.pause()}async resume(){this._events.emitResumeSync()||await this._harmony.resume()}async skipToNext(e){if(this._events.emitSkipToNextSync())return;let t;const n=this._queue.getInternalQueue();e&&n&&(t=n.next_items.find((t=>(!e.uid||t.uid===e.uid)&&t.uri===e.uri))),await this._harmony.nextTrack(null,{track:t})}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await this._harmony.smartPreviousTrack()}async skipTo(){throw new Error("Not implemented")}async seekTo(e){await this._harmony.seek(e)}async seekForward(e){await this._harmony.seekForward(e)}async seekBackward(e){await this._harmony.seekBackward(e)}async setShuffle(e){await this._harmony.setShuffle(e)}async setRepeat(e){switch(e){case De.p.REPEAT_NONE:await this._harmony.setRepeatMode(ve.pM.OFF);break;case De.p.REPEAT_CONTEXT:await this._harmony.setRepeatMode(ve.pM.CONTEXT);break;case De.p.REPEAT_TRACK:await this._harmony.setRepeatMode(ve.pM.TRACK)}}async setSpeed(e){await this._harmony.setPlaybackSpeed(e)}async canPlayEncryptedContent(){return void 0!==(await this._harmony.getMediaConfig()).keysystem}async refreshCurrentContext(){let e;const t=this.getState()?.context.uri;if(this._isSmartShuffleEnabled&&t){(await(this._contextualShuffle?.getContextualShuffleMode(t))??Pe.j.OFF)===Pe.j.SMART_SHUFFLE&&(e={contextURI:(0,nt.f)(t,!0)})}await this._harmony.updateCurrentContext(null,e)}async updateContext(e,t,n){this._harmony.updateCurrentContext(null,{contextURI:t.uri,contextMetadata:t.metadata})}async addToQueue(e){if(!this._events.emitQueueActionSync(se.UC.ADD))try{await this._queue.addToQueue(e),this._events.emitQueueActionComplete(se.UC.ADD)}catch(e){throw this._events.emitQueueActionComplete(se.UC.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(se.UC.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(se.UC.REORDER)}catch(e){throw this._events.emitQueueActionComplete(se.UC.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t){if(!this._events.emitQueueActionSync(se.UC.INSERT))try{await this._queue.insertIntoQueue(e,t),this._events.emitQueueActionComplete(se.UC.INSERT)}catch(e){throw this._events.emitQueueActionComplete(se.UC.INSERT,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(se.UC.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(se.UC.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(se.UC.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(se.UC.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(se.UC.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(se.UC.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}getQueue(){return this._queue.getQueue()}getForcedShuffle(){return!1}setForcedShuffle(){}async playAsNextInQueue(e){const t=e.map((e=>({uri:e.uri,uid:e.uid??"",metadata:e.metadata??{}})));await this._harmony.playAsNextInQueue(t)}}var rt=n(99859);const st={type:Ue.c.UNKNOWN,uri:"",uid:"",name:"",images:[],mediaType:"audio",duration:{milliseconds:-1},album:{type:Ue.c.ALBUM,uri:"",name:"",images:[]},artists:[{type:Ue.c.ARTIST,uri:"",name:""}],provider:null};function at(e){return function(...e){return e.filter((({url:e,height:t,width:n})=>Boolean(e)&&Boolean(t)&&Boolean(n))).map((({url:e,width:t,height:n})=>({url:e,height:parseInt(n??"0",10),width:parseInt(t??"0",10)})))}({url:e.image_url,height:e.image_height,width:e.image_width},{url:e.image_url_small,height:e.image_height_small,width:e.image_width_small},{url:e.image_url_large,height:e.image_height_large,width:e.image_width_large},{url:e.image_url_xlarge,height:e.image_height_xlarge,width:e.image_width_xlarge})}function ot(e,t){return null===e?null:(0,re.U_m)(e.uri)||(0,re.PkR)(e.uri)?function(e,t){const n=e.metadata;return{type:Ue.c.TRACK,uri:e.uri,uid:null,name:n.title??"",mediaType:e.mediaType,duration:{milliseconds:t},album:{type:Ue.c.ALBUM,uri:n.album_uri??"",name:n.album_title??"",images:at(n)},artists:[{type:Ue.c.ARTIST,uri:n.artist_uri??"",name:n.artist_name??""}],isLocal:(0,re.PkR)(e.uri),isExplicit:!1,is19PlusOnly:!1,provider:null,get images(){return this.album.images}}}(e,t):(0,re.gHQ)(e.uri)?function(e,t){const n=e.metadata;return{type:Ue.c.EPISODE,uri:e.uri,uid:null,name:n.title??"",mediaType:e.mediaType,duration:{milliseconds:t},show:{type:Ue.c.SHOW,uri:n.album_uri??"",name:n.album_title??"",images:at(n)},provider:null,get images(){return this.show.images}}}(e,t):(0,re.AIy)(e.uri)?function(e,t){const n=e.metadata;return{type:Ue.c.AD,uri:e.uri,uid:null,title:n.title??null,advertiser:n.artist_name??null,url:n.artist_uri??null,id:n.ad_id??null,mediaType:e.mediaType,duration:{milliseconds:t},images:[],isPodcastAd:!1,isSkippableAd:!1,isTestAd:!1,provider:null}}(e,t):{...st,uri:e.uri,metadata:e.metadata||null}}function lt(e){switch(e){case Ie.pM.CONTEXT:return De.p.REPEAT_CONTEXT;case Ie.pM.TRACK:return De.p.REPEAT_TRACK;case Ie.pM.NONE:default:return De.p.REPEAT_NONE}}function ct({playbackState:e}){return{canPause:!!e.playing,canResume:!e.playing,canSeek:!0,canSkipPrevious:!1,canSkipNext:!1,canToggleRepeatContext:!1,canToggleRepeatTrack:!1,canToggleShuffle:!1,disallowPausingReasons:e.playing?[]:["already_paused"],disallowResumingReasons:e.playing?["already_playing"]:[],disallowSeekingReasons:[],disallowSkippingPreviousReasons:["unknown"],disallowSkippingNextReasons:["unknown"],disallowTogglingRepeatContextReasons:["unknown"],disallowTogglingRepeatTrackReasons:["unknown"],disallowTogglingShuffleReasons:["unknown"],disallowTransferringPlaybackReasons:[],disallowAddToQueueReasons:[],disallowSetQueueReasons:[],disallowSettingPlaybackSpeedReasons:[],disallowSignals:{}}}function ut(e){const t=e.hasContext||e.isPaused||e.isBuffering;return{canSeek:t??!1,disallowSeekingReasons:t?[]:["not_playing_track"]}}function dt(e){if(null===e)return null;const t=e.playbackState,n=e.track,i=n?.metadata,r=function(e){const t=e.track,n=t?.metadata;return n?.contextURI||t?.uri||null}(e);return r?{sessionId:"",timestamp:Date.now(),context:{uri:r??"",metadata:i},index:{pageURI:null,pageIndex:null,itemIndex:null},item:n?ot(n,t.duration):null,shuffle:!1,repeat:lt(Ie.pM.NONE),speed:1,playbackQuality:{bitrateLevel:xe.Yn.UNKNOWN},playbackId:null,positionAsOfTimestamp:t.position,duration:t.duration,restrictions:{...ct(e),...ut({hasContext:!!n&&!!r,isPaused:!t.playing,isBuffering:!1})},hasContext:!!n&&!!r,isPaused:!t.playing,previousItems:[],nextItems:[]}:null}const pt=200,mt=400;var ht=n(43798);const ft={"com.apple.fps.1_0":"fairplay","com.widevine.alpha":"widevine","com.microsoft.playready":"playready"},gt=e=>e.pages?.length&&e.pages[0].items?.length?e.pages[0].items[0]:e,Et=async(e,t,n,i="com.widevine.alpha",r)=>{const s={...t.metadata,contextURI:t!==e?e.uri:null};if(t.metadata?.externalResolvedUrl)return(0,Ie.a2)({uri:t.uri,url:t.metadata?.externalResolvedUrl,fileId:"",metadata:s,logData:r});if("episode"===(0,re.o_h)(t.uri)?.type){const e=s.media_type,n="yes"===s.useAuthEndpoint,a=((e,t=!1,n="audio")=>t?`@webgate/${ft[e]}-license/v1/${n}/license`:`https://spclient.wg.spotify.com/${ft[e]}-license/v1/unauth/${n}/license`)(i,n,e),o=await(0,ht.Nu)(t,i,e);return(0,Ie.a2)({uri:t.uri,licenseEndpoint:a,metadata:s,logData:r,fileId:"",noAuth:!n,...o})}const a=new Error(`No valid solution has been found to play this item (${t?.uri})`);throw n.emitSync(se.gd.ERROR,new Ze.bt(Ze.Z9.ONE_TRACK_UNPLAYABLE,[],a)),a};function _t(e,t){const n=function(e){const t=new se.JW;let n,i,r={sessionId:"",timestamp:0,context:{uri:""},index:{pageURI:null,pageIndex:null,itemIndex:null},item:null,shuffle:!1,repeat:De.p.REPEAT_NONE,speed:1,playbackQuality:{bitrateLevel:xe.Yn.UNKNOWN},playbackId:null,positionAsOfTimestamp:0,duration:0,restrictions:{canPause:!1,canResume:!1,canSeek:!1,canSkipNext:!1,canSkipPrevious:!1,canToggleRepeatContext:!1,canToggleRepeatTrack:!1,canToggleShuffle:!1,disallowPausingReasons:["not_playing_track"],disallowResumingReasons:["not_playing_track"],disallowSeekingReasons:["not_playing_track"],disallowSkippingPreviousReasons:["not_playing_context"],disallowSkippingNextReasons:["not_playing_context"],disallowTogglingRepeatContextReasons:["not_playing_context"],disallowTogglingRepeatTrackReasons:["not_playing_context"],disallowTogglingShuffleReasons:["not_playing_context"],disallowTransferringPlaybackReasons:[],disallowAddToQueueReasons:[],disallowSetQueueReasons:[],disallowSettingPlaybackSpeedReasons:[],disallowSignals:{}},hasContext:!1,isPaused:!1,isBuffering:!1,previousItems:[],nextItems:[]};function s(e){return{...r,...e,context:{...r.context,...e?.context}}}function a(e){r=s(e),t.emit(se.gd.UPDATE,r)}async function o(){a(dt(await e.getCurrentState()))}async function l(e){if(e){if(n)return;n=setTimeout((()=>{n=null,a({isBuffering:e})}),pt)}else n?(clearTimeout(n),n=null,a({isBuffering:e})):i||(i=setTimeout((()=>{i=null,a({isBuffering:e})}),mt))}async function c(){const t=await e.getCurrentState(),n=dt(t),i=n?{...n,isBuffering:!1,hasContext:!1,isPaused:!1,positionAsOfTimestamp:r.duration}:{positionAsOfTimestamp:r.duration,position:r.duration,isBuffering:!1,hasContext:!1,isPaused:!1,restrictions:ct(t)},o=s(i),l=ut(i);a({...o,restrictions:{...i.restrictions,...l}})}return e.on(Ie.LW.ERROR,(e=>{const{error:n}=e.data;n.unrecoverable?t.emit(se.gd.ERROR,new Ze.bt(Ze.Z9.PLAYBACK_ERROR,[],n)):t.emit(se.gd.ERROR,new Ze.q3(Ze.Z9.PLAYBACK_ERROR,[],n))})),e.on(Ie.LW.PAUSED,o),e.on(Ie.LW.PROGRESS,(async()=>{Date.now()-r.timestamp>=1e3&&o(),(r.isBuffering||n)&&((await e.getCurrentState()).playbackState.buffering||l(!1))})),e.on(Ie.LW.TRACK_LOADED,o),e.on(Ie.LW.TRACK_ENDED,c),e.on(Ie.LW.LIST_ENDED,c),e.on(Ie.LW.BUFFERING_START,(async()=>{await l(!0)})),e.on(Ie.LW.BUFFERING_END,(async()=>{await l(!1)})),e.on(Ie.LW.AUTOPLAY_FAILED,(async()=>{await l(!1)})),e.on(Ie.LW.BEFORE_TRACK_LOAD,(async()=>{await l(!0)})),e.on(Ie.LW.POSITION_CHANGED,(async()=>{(await e.getCurrentState()).playbackState.playing&&await l(!0)})),t}(e);let i,r=null,s="PlayerOverture_UnknownReferrer",a={unloadedSeekPosition:0,playArgs:null};const o=async()=>{if(void 0===i){const t=await e.getMediaConfig();i=t.keysystem}return i};return n.addListener(se.gd.UPDATE,(({data:e})=>{r=e})),"undefined"!=typeof window&&o(),{getCapabilities:()=>({canChangeSpeed:!1,canChangeVolume:!0,canPlayMultipleContextPages:!1,maxNextTracks:0,hasDecoratedQueue:!1}),canPlayEncryptedContent:async()=>void 0!==await o(),getEvents:()=>n,getState:()=>r,getReferrer:()=>s,setReferrer(e){s=e},async play(i,r,s){if(n.emitPlaySync(i,r,s??{}))return;const l=await o(),c=gt(i),u=await Et(i,c,n,l,t),d=(0,Ie.X7)({tracks:[u]}),p={index:s?.skipTo?.index??void 0,initialPosition:s?.seekTo??0};await e.playList(d,p),a={playArgs:[i,r,s],unloadedSeekPosition:0}},async pause(){n.emitPauseSync()||await e.pause()},async resume(){if(!!(await e.getCurrentState()).track){if(n.emitResumeSync())return;await e.resume()}else if(a.playArgs){const[e,t,n]=a.playArgs;await this.play(e,t,{...n,seekTo:a.unloadedSeekPosition})}else;},async skipToNext(){n.emitSkipToNextSync()||await e.nextTrack()},async skipTo(){throw new Error("Not implemented")},async skipToPrevious(){n.emitSkipToPreviousSync()||await e.previousTrack()},async seekTo(t){(await e.getCurrentState()).track?await e.seek(t):a.unloadedSeekPosition=t},async seekForward(t){const n=(await e.getCurrentState()).playbackState.position;await e.seek(n+t)},async seekBackward(t){const n=(await e.getCurrentState()).playbackState.position;await e.seek(n-t)},async setShuffle(){throw new Error("setShuffle is not supported in Overture")},async setRepeat(){throw new Error("setRepeat is not supported in Overture")},async setSpeed(){throw new Error("setSpeed is not supported in Overture")},async refreshCurrentContext(){},async updateContext(){throw new Error("Updating context not possible with Overture.")},async addToQueue(){throw new Error("addToQueue is not supported in Overture")},async clearQueue(){throw new Error("clearQueue is not supported in Overture")},async removeFromQueue(){throw new Error("removeFromQueue is not supported in Overture")},async reorderQueue(){throw new Error("reorderQueue is not supported in Overture")},async insertIntoQueue(){throw new Error("insertIntoQueue is not supported in Overture")},getQueue(){throw new Error("getQueue is not supported in Overture")},getForcedShuffle:()=>!1,setForcedShuffle(){},sendSignal(e){throw new Error("sendSignal is not supported in Overture")},canSendSignal:e=>!1,async playAsNextInQueue(){throw new Error("playAsNextInQueue is not supported in Overture")}}}const yt=()=>window.documentPictureInPicture?.window?.document.querySelector(".VideoPlayer__container")||window.document.querySelector(".VideoPlayer__container"),vt={inject:(e,t)=>{if("video"===t){const t=yt();t&&e.parentNode!==t&&t.appendChild(e)}},eject:(e,t,n)=>{const i=yt();i&&e.parentNode===i&&n!==t&&i.removeChild(e)}};const bt=5e3,St="data-translations-url-for-locale";const At=async()=>new Promise((e=>{const t=new globalThis.Image;t.onload=()=>e(1===t.width),t.onerror=()=>e(!1),t.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="}));let Ct=function(e){return e.ALWAYS="always",e.OVERLAY="overlay",e}({});var Tt=n(95752);function It(){switch((0,he.D)()){case Tt.f.Windows:return"windows";case Tt.f.macOS:return"osx";case Tt.f.Linux:return"linux";case Tt.f.ChromeOS:return"chromeos";case Tt.f.Other:default:return"other"}}const Ot=()=>({os_name:It(),os_settings:{scroller_style:Ct.ALWAYS,double_click_interval_ms:1/0},app_platform:"WebPlayer",client_name:"web-player",client_version_triple:"0.0.0",client_version_quadruple:"0.0.0.0",client_version_quintuple:"0.0.0.0-unknown",client_capabilities:{can_autostart:!1,can_restart:!1,can_show_track_notifications:!1,can_show_system_media_controls:!1,can_minimize_or_exit_on_close:!1},event_sender_installation_id_hex:"",is_developer_mode:!1,remote_config_client_id:"web-player"});var wt=n(95175);class Nt{async setWindowButtonsVisibility(){}}var Rt=n(10168);class Pt{getContents(){return Promise.resolve({})}getEvents(){return{addListener:()=>{},removeListener:()=>{}}}getCapabilities(){return{isSupported:!1}}}var Lt=n(56488);class Dt{subscribeToPrivateSession(){return()=>{}}async setPrivateSession(){}getCapabilities(){return{isSupported:!1}}}var kt=n(95273),xt=n(10721),Ut=n(74916);class Mt{constructor(e){this._playlistAPI=e}isURIReportable(e){return(0,Ut.X)(e)}canReportPlaylist(e,t){return(0,Ut.v)(this._playlistAPI,e,t,!0)}getReportURL(e,t){const n=new URL("https://support.spotify.com/abuse");return n.searchParams.append("uri",e),n.searchParams.append("platform","desktop-web"),t&&n.searchParams.append("playback_timestamp",""+t/1e3),Promise.resolve(n.href)}}var Bt=n(6383);class jt{getCapabilities(){return{isSupported:!1}}async getSegments(){return[]}async getArtists(){return[]}}async function Ft(){let e=null;if("serviceWorker"in navigator){const{Workbox:t}=await n.e(4151).then(n.bind(n,16561));e=new t("/service-worker.js"),e.register()}return async function(t){if(e){const n=await e.messageSW(t);return JSON.parse(n)}return new Promise((()=>{}))}}var Vt=n(23613),Gt=n(68436),Ht=n(43329);class Wt{_events=new Gt.p;_hasSubtitleSupport=!1;_isLocal=!0;_subtitleLanguages=[];constructor(e,t){if(this._harmony=e,null===this._harmony)return void(this._hasSubtitleSupport=!1);this._hasSubtitleSupport=t.getValue(Ht.hU),this._harmony.addListener(ve.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(({data:e})=>{this._isLocal=e.deviceInfo?.local??!0}));let n=null;this._harmony.addListener(ve.bi.STATE_CHANGED,(({data:e})=>{const t=e.state?.track_window?.current_track,i=t?.uri??null,r="episode"===t?.type;this._hasSubtitleSupport&&this._isLocal&&r?i!==n&&(setTimeout((async()=>{const e=await this._harmony.getSubtitleLanguages();this.setSubtitleLanguages(e)}),1e3),n=i):this.setSubtitleLanguages([])}))}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(Gt.S.SUBTITLE_LANGUAGES_CHANGED,e)}getCapabilities(){return{hasSubtitleSupport:this._hasSubtitleSupport,hasMinimizeBitrateSupport:!1,hasPipSupport:!1}}getEvents(){return this._events}async getSubtitleLanguages(){return this._subtitleLanguages}async getPreferredSubtitleLanguage(){return null===this._harmony?null:this._harmony.getActiveSubtitleLanguage()}async setPreferredSubtitleLanguage(e){null!==this._harmony&&(null!==e?(this._harmony.setSubtitleLanguage(e),this._harmony.showSubtitles()):this._harmony.hideSubtitles())}setMinimizeBitrate(e){}setWindow(e){}}class zt{getZoomLevel(){throw new Error("Method not implemented.")}setZoomLevel(e){}zoomIn(){}zoomOut(){}getCapabilities(){return{canGetZoomLevel:!1,canSetZoomLevel:!1,canZoomIn:!1,canZoomOut:!1}}}var Kt=n(49645),Yt=n(38501),qt=n(1599),$t=n(69962),Zt=n(92443),Qt=n(76730);class Jt{constructor(){this._events=new Qt.e}getDefaultDevice(){return null}getDevices(){return[]}getEvents(){return this._events}}var Xt=n(53460),en=n(99887),tn=n(49042);const nn="web-player";var rn=n(67781),sn=n(51337),an=n(40731);class on{_events=new sn.x;_state=an.h;constructor(e){this._tokenProvider=e,this._tokenProvider.addOnTokenChanged((e=>this.onTokenChanged(e)))}onTokenChanged(e){this._state={isAuthorized:null!==e&&!(0,rn.H)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(sn.m.UPDATE,this._state)}getCapabilities(){return{canGetSessionTransferURL:!1}}getEvents(){return this._events}getState(){return this._state}tryAuthorize(){throw new Error("Not implemented!")}async getSessionTransferURL(){throw new Error("Getting a session transfer URL is not possible on web!")}}var ln=n(67485),cn=n(51736);class un extends cn.w{constructor(e,t){var n;super(),this._productType=e,this._tokenFromServer=t,(n=this._tokenFromServer)&&["accessToken","accessTokenExpirationTimestampMs","isAnonymous"].every((e=>e in n))||(this._tokenFromServer=null)}async loadToken(){if(null!==this._tokenFromServer&&!(0,rn.H)(this._tokenFromServer))return this._tokenFromServer;return(await(0,ln.i)(qt.n.getInstance(),"transport",this._productType)).body}}var dn=n(66281),pn=n(35290),mn=n(59640),hn=n(22871),fn=n(89088),gn=n(69931),En=n(62642);function _n(e,t,n){return!e&&(!t?.startsWith("harmony:")||!n.startsWith("Web Player")&&!n.startsWith("Mobile Web Player"))}function yn(e,t){if(t)switch(e){case gn.B.INCOMPATIBLE:return En.bU.INCOMPATIBLE;case gn.B.UNAVAILABLE:return En.bU.UNAVAILABLE;case gn.B.AD_PLAYING:return En.bU.AD_PLAYING;case gn.B.NARRATION:return En.bU.NARRATION;case gn.B.WAKING_UP:return En.bU.WAKING_UP;case gn.B.TIMED_OUT_WAKEUP:return En.bU.TIMED_OUT_WAKEUP;case gn.B.PREMIUM_REQUIRED:return En.bU.PREMIUM_REQUIRED;case gn.B.NOT_INSTALLED:return En.bU.NOT_INSTALLED;case gn.B.NOT_AUTHORIZED:return En.bU.NOT_AUTHORIZED;case gn.B.UNSUPPORTED:return En.bU.UNSUPPORTED_URI;default:return}}function vn(e,t){const{id:n,name:i,type:r,is_group:s,local:a,is_active:o,is_being_activated:l,is_controllable:c,disallow_transfer_reason:u,volume:d,playback_features:p,version:m,capabilities:h}=e;return{id:n,connectStateId:n,name:i??"",type:r,isGroup:s,isLocal:a,isActive:o,isConnecting:l,currentState:yn(u,t),isDisabled:!c||t&&Boolean(u),disabledReason:yn(u,t),volume:d,losslessSupport:{fullySupported:!!p?.hifi_status?.fully_supported,deviceSupported:!!p?.hifi_status?.device_supported,userEligible:!!p?.hifi_status?.user_eligible},supportsLogout:_n(a,m,i),supportsDJNarration:h.supports_dj,supportedMediaTypes:null}}function bn(e,t){return t?En.zP.CONNECTING:e&&!e.isLocal?En.zP.CONNECTED:En.zP.NOT_CONNECTED}function Sn(e,t=!1){const n=e.map((e=>vn(e,t)));let i=n.find((e=>e.isActive));if(!i){const e=n.findIndex((e=>e.isLocal));-1!==e&&(i={...n[e],isActive:!0},n[e]=i)}const r=n.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:bn(i,r),activeDevice:i??null,connectingDevice:r??null,devices:n}}function An(e){return{success:e}}class Cn{constructor(e){this.harmony=e}async logout(e){if(null===e||0===e.length)throw new Error("missing device id");return An(await this.harmony.logout(e))}async setPreferredIncarnation(){throw new Error("Device Incarnation not supported")}}var Tn=n(78736);class In extends Tn.a{constructor(e,t){super(),this.harmony=e,this.useDisabledReasons=t;let n=null;this.harmony.addListener(ve.bi.DEVICES_CHANGED,(({data:e})=>{e.devices&&e.devices.length>0&&(n=Sn(e.devices,this.useDisabledReasons),this.emit(Tn.P.UPDATE,n))})),this.harmony.addListener(ve.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(async({data:e})=>{if(e.deviceInfo)if(n&&n.activeDevice?.id===e.deviceInfo.id)this.emit(Tn.P.UPDATE,function(e,t,n=!1){const i=vn(t,n),r=e.devices.findIndex((e=>e.isActive)),s=[...e.devices];return-1!==r&&(s[r]=i),{...e,connectionStatus:bn(i,void 0),activeDevice:i,devices:s}}(n,e.deviceInfo,this.useDisabledReasons));else{const e=await this.harmony.getDevices();e&&e.length>0&&(n=Sn(e,this.useDisabledReasons),this.emit(Tn.P.UPDATE,n))}}))}}class On{state=null;constructor(e,t,n){this.harmony=e,this.useDisabledReasons=t,this.connectRestrictor=n,this.events=new In(this.harmony,this.useDisabledReasons),this.events.addListener(Tn.P.UPDATE,(({data:e})=>{if(n&&null!==e){const t=n.updateRestrictedListOfDevices(e.devices??[]);this.state={...e,devices:t}}else this.state=e}))}getConnectState(){return this.state}getActiveDevice(){return this.state?.activeDevice??null}getDevices(){return this.state?.devices??[]}getEvents(){return this.events}}class wn{async startActiveDiscovery(){Promise.resolve()}}class Nn{state=null;constructor(e,t){this.harmony=e,this.useDisabledReasons=t,this.events=new In(this.harmony,this.useDisabledReasons),this.events.addListener(Tn.P.UPDATE,(({data:e})=>{this.state=e}))}getCapabilities(){return{supportsLocalDiscovery:!1}}getState(){return this.state}getEvents(){return this.events}async updateListOfDevices(){throw new Error("Discovering devices on local network is not supported in Harmony")}async transferPlayback(e,t){await this.harmony.transfer(e,{loggingParams:t})}async logout(e){if(null===e||0===e.length)throw new Error("missing device id");return An(await this.harmony.logout(e))}async setPreferredIncarnation(){throw new Error("Device Incarnation not supported")}}class Rn{constructor(e){this.harmony=e}async transferPlayback(e,t){await this.harmony.transfer(e,{loggingParams:t})}async pullToLocalDevice(e){await this.harmony.transfer(null,{loggingParams:e})}}var Pn=n(20442),Ln=n(11408),Dn=n(36285);const kn=(0,Dn.u)("ConnectRestrictorAPI");class xn{async logout(){return Promise.resolve({success:!0})}async setPreferredIncarnation(){return Promise.resolve({success:!0})}}class Un extends Tn.a{}class Mn{constructor(){this.events=new Un}getConnectState(){return null}getActiveDevice(){return null}getDevices(){return[]}getEvents(){return this.events}}class Bn{async startActiveDiscovery(){}}class jn{constructor(){this.events=new Un}getCapabilities(){return{supportsLocalDiscovery:!1}}getState(){return null}getEvents(){return this.events}async updateListOfDevices(){}async transferPlayback(e,t){}async logout(){return Promise.resolve({success:!0})}async setPreferredIncarnation(){return Promise.resolve({success:!0})}}class Fn{async transferPlayback(e,t){}async pullToLocalDevice(e){}}var Vn=n(9401),Gn=n(45917),Hn=n(8732),Wn=n(57776);n(59147);const zn=new Wn.l("isCurated","query","e4ed1f91a2cc5415befedb85acf8671dc1a4bf3ca1a5b945a6386101a22e28a6",null);var Kn=n(59593),Yn=n(26184),qn=n(7069);class $n extends Kn.s{constructor(e,t,n,i){super(e),this._containsItems=t,n.addListener(Yn.UV.OPERATION_COMPLETE,(async({data:{uris:t,operation:n}})=>{const i=t.filter(qn.g);if(n===Yn.tS.ADD){const t=i.filter((t=>!0!==e.get(t)));this.emitUpdateCuratedItems(t,!0)}else if(n===Yn.tS.REMOVE){i.forEach((t=>e.delete(t)));const t=await this._containsItems(...i);this.emitUpdateCuratedItems(i,t)}})),i.addListener(ae.Lj.OPERATION_COMPLETE,(async({data:e})=>{const t=e.operation===ae.sP.ADD?e.uris.filter(qn.g):[];t.length&&this.emitUpdateCuratedItems(t,!0);const n=e.operation===ae.sP.REMOVE?e.items.map((e=>e.uri)).filter(qn.g):[];if(n.length){const e=await this._containsItems(...n);this.emitUpdateCuratedItems(n,e)}}))}async onCuratedBatchChanged(e){if(0===e.size)return;const t=Array.from(e.keys()),n=await this._containsItems(...t);this.emitUpdateCuratedItems(t,n)}}class Zn extends Kn.s{subscribeToUpdates(){}unsubscribeFromUpdates(){}emitUpdateItems(){}emitOperationComplete(){}async onCuratedBatchChanged(e){}}var Qn=n(61207),Jn=n(31567),Xn=n(16157);const ei=new Wn.l("applyCurations","mutation","05b739a3a73091c213385233b9d3ed8a857c2ca29d2eebadb3d04ed12e288697",null),ti=new Wn.l("editablePlaylists","query","acb5390f2929bdcad4c6afe1c08bdbe09375f50fdb29d75244f67e9aee77ebc4",null);var ni=n(20817),ii=n(34613),ri=n(68993),si=n(95651);function ai(e,t){(0,ri.j)(e,"EditablePlaylistPage","Error fetching `editablePlaylists` via GraphQL!");const{items:n,totalCount:i}=e,{limit:r=i??0,offset:s=0}=t;return{items:n.map((({item:e,pinned:t,curates:n})=>{switch(e.__typename){case"LibraryFolderResponseWrapper":return function(e,t){const n="Folder"===e.data.__typename?e.data:null;return n?{type:Ue.c.FOLDER,uri:n.uri,name:n.name,pinned:t}:null}(e,t);case"LibraryPseudoPlaylistResponseWrapper":return function(e,t,n){const i="PseudoPlaylist"===e.data.__typename?e.data:null;return i?{type:i.uri===ni.BP?Ue.c.LIKED_SONGS:Ue.c.YOUR_EPISODES,uri:i.uri,name:i.name,pinned:t,images:(0,si.r)(i.image??null),hasCuratedItems:n,color:(0,ii.m)(i.image.extractedColors)}:null}(e,t,n);case"PlaylistResponseWrapper":return function(e,t,n){const i="Playlist"===e.data.__typename?e.data:null;return i?{type:Ue.c.PLAYLIST,uri:i.uri,name:i.name,pinned:t,images:(0,si.r)(i.images.items.at(0)??null),hasCuratedItems:n,color:(0,ii.m)(i.images.items.at(0)?.extractedColors)}:null}(e,t,n);case"UnknownType":return null;default:return(0,Me.k)(e),null}})),limit:r,totalLength:i,offset:s}}class oi{_isCuratedInFlightCache=new j.od;_isCuratedCache=new j.GG(6e5,864e5);constructor(e,t,n,i){this._loader=e,this._libraryAPI=t,this._isAnonymous=i,this._events=function(e,t,n,i,r){return r?new Zn(e):new $n(e,t,n,i)}(this._isCuratedCache,this.isCurated.bind(this),this._libraryAPI.getEvents(),n,this._isAnonymous)}getCapabilities(){return{canSort:!1,canFilterOnCurationState:!1}}getEvents(){return this._events}async getCurationContexts(e){const{curatedItemUri:t,offset:n=0,limit:i,textFilter:r="",folderUri:s}=e,a=await this._loader(ti,{offset:n,limit:i,textFilter:r,folderUri:s,uris:[t]});return ai(a?.data?.me?.editablePlaylists??null,e)}async curateItems(e,t,n){if(this._events.emitOperationSync(Hn.jy.CURATE_ITEMS,e,t,n))return null;const i=[],r=[],s=[],a=[],o=this.isCuratedSync(e);let l;const c=[{contextUris:t,curationType:Xn.I8.Curate},{contextUris:n,curationType:Xn.I8.Uncurate}].map((({contextUris:e,curationType:t})=>e.map((e=>{if(!(0,re.tbX)(e)&&!(0,re.Z0m)(e))throw new Qn.e(`Curation ${t} for ${e} not supported`);return{contextUri:e,curationType:t}})))).flat();let u;c.some((({curationType:e})=>e===Xn.I8.Curate))&&!o&&(this._events.emitUpdateCuratedItems([e],!0),l=!0);let d=null;const p=await this._loader(ei,{input:{curations:c,itemUris:[e]}});p?.data?.applyCurations.map(((t,n)=>{const{contextUri:o,curationType:l}=c[n];"GenericError"===t.__typename?(d??=new Qn.e(`Failed to apply curation "${l}" for "${e}" in "${o}" due to: ${t.message}"`),l===Xn.I8.Curate?s.push(o):l===Xn.I8.Uncurate&&a.push(o)):("TrackResponseWrapper"===t.__typename&&"Track"===t.data.__typename||"EpisodeOrChapterResponseWrapper"===t.__typename&&"Episode"===t.data.__typename)&&(u=t.data.isCurated,l===Xn.I8.Curate?i.push(o):l===Xn.I8.Uncurate&&r.push(o))}));const m=Promise.resolve(u??this.isCurated(e).then((([e])=>e)));if(m.then((t=>{t!==l&&this._events.emitUpdateCuratedItems([e],t)})),(i.length||r.length)&&this._events.emitOperationComplete(Hn.jy.CURATE_ITEMS,e,i,r),s.length||a.length)throw this._events.emitOperationComplete(Hn.jy.CURATE_ITEMS,e,s,a,d),d;return m}getDefaultCurationContextUri=Jn.o;async curateDefault(e){const t=this.getDefaultCurationContextUri(e);if(this._events.emitOperationSync(Hn.jy.CURATE_ITEMS,e,[t],[]))return;let n=!1;try{this.isCuratedSync(e)||(n=!0,this._events.emitUpdateCuratedItems([e],!0)),await this._libraryAPI.add({uris:[e],silent:!0}),this._events.emitOperationComplete(Hn.jy.CURATE_ITEMS,e,[t],[])}catch(i){n&&this.isCurated(e).then((t=>{this._events.emitUpdateCuratedItems([e],t)}));const r=new Qn.e(`Failed curating "${e}" into default context`,{cause:i});throw this._events.emitOperationComplete(Hn.jy.CURATE_ITEMS,e,[t],[],r),r}}_fetchIsCurated=async(...e)=>{const t=await this._loader(zn,{uris:e}),n=t?.data?.lookup;return e.map(((e,t)=>{const i=n?.[t];return!(!i||!("TrackResponseWrapper"===i.__typename&&"Track"===i.data.__typename||"EpisodeOrChapterResponseWrapper"===i.__typename&&"Episode"===i.data.__typename))&&i.data.isCurated}))};async isCurated(...e){const t=[],n=[],i=[];e.forEach((e=>{this._isCuratedCache.has(e)?t.push(e):this._isCuratedInFlightCache.has(e)?n.push(e):i.push(e)}));const r=Object.fromEntries(t.map((e=>[e,this._isCuratedCache.get(e)]))),s=Promise.all(n.map((e=>this._isCuratedInFlightCache.get(e)))).then((e=>Object.fromEntries(n.map(((t,n)=>[t,e[n]])))));let a={};if(i.length>0){const e=this._fetchIsCurated(...i).then((e=>Object.fromEntries(i.map(((t,n)=>[t,e[n]]))))),t=new Promise(((e,t)=>setTimeout(t,1e4,new Error("In-flight timeout exceeded"))));i.forEach((n=>{const i=e.then((({[n]:e})=>e));this._isCuratedInFlightCache.set(n,Promise.race([i,t]))})),a=await e,i.forEach((e=>{this._isCuratedCache.set(e,a[e])}))}const o=await s;return e.map((e=>a[e]??o[e]??r[e]))}isCuratedSync(e){return this._isCuratedCache.peek(e)}getAvailableSortOrders(){return[]}}var li=n(42221),ci=n(72046),ui=n(18852),di=n(93885),pi=n(54580);class mi{_events=new pi.N;getEvents(){return this._events}getCapabilities(){return{canBan:!1}}async addContextTrackBan(e,t){throw new Error("Method not implemented.")}async removeContextTrackBan(e,t){throw new Error("Method not implemented.")}}var hi=n(34671),fi=n(71506),gi=n(51028),Ei=n(36649);const _i=new RegExp(String.raw`hm://collection/(collection|listenlater|show|artist)/.+/json`);class yi extends Ei.w{_subscription=null;constructor(e,t,n){super(e),this._containsItems=t,this._pubSubAPI=n}onMessage({ident:e,payloads:t}){if(!_i.test(e))return;if(void 0===t||0===t.length)return;const{items:n}=JSON.parse((0,F.dI)(t[0]));if(!Array.isArray(n))return;let i=!1,r=!1,s=!1,a=!1,o=!1;for(const e of n)switch(e.type){case"album":{const t=(0,re.Q00)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),i=!0;break}case"artist":{const t=(0,re.ITr)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),r=!0;break}case"episode":{const t=(0,re.iMK)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),s=!0;break}case"show":{const t=(0,re.Mci)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),a=!0;break}case"track":{const t=(0,re.Mce)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),o=!0;break}}i&&this.emit(Yn.UV.UPDATE,{list:Yn.Ir.ALBUMS}),r&&this.emit(Yn.UV.UPDATE,{list:Yn.Ir.ARTISTS}),s&&this.emit(Yn.UV.UPDATE,{list:Yn.Ir.EPISODES}),a&&(this.emit(Yn.UV.UPDATE,{list:Yn.Ir.SHOWS}),this.emit(Yn.UV.UPDATE,{list:Yn.Ir.BOOKS})),o&&this.emit(Yn.UV.UPDATE,{list:Yn.Ir.TRACKS})}subscribeToUpdates(){this._subscription=this._pubSubAPI.subscribe({ident:"hm://collection/",isPrefix:!0,onMessage:e=>this.onMessage(e)})}unsubscribeFromUpdates(){null!==this._subscription&&this._subscription.cancel()}async onBatchChanged(e){if(0===e.size)return;const t=Array.from(e.keys()),n=await this._containsItems(t);this.emitUpdateItems(t,n)}}class vi extends Ei.w{subscribeToUpdates(){}unsubscribeFromUpdates(){}emitUpdateItems(){}emitOperationComplete(){}async onBatchChanged(){}}var bi=n(49725);const Si=new Wn.l("addToLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),Ai=new Wn.l("removeFromLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),Ci=new Wn.l("pinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),Ti=new Wn.l("unpinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null);function Ii(e){const t=e.map((e=>(0,re.o_h)(e))).map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===t)throw new Error("Given URIs need to be of the same type!");return t}function Oi(e){return e===re.NQG.ALBUM||e===re.NQG.ARTIST||e===re.NQG.TRACK||e===re.NQG.SHOW||e===re.NQG.EPISODE}var wi=n(13719);const Ni=new Wn.l("libraryV3","query","41d4750506899bcf8ce7450ab31169037e2ff2edf36f0caf29fd904f7c12853a",null);var Ri=n(75049),Pi=n(63775);function Li(e){switch(e){case Xn._m.Album:return"album";case Xn._m.Ep:return"ep";case Xn._m.Single:return"single";case Xn._m.Compilation:return"compilation";default:return"album"}}function Di(e,t){const n=(0,ri.Jt)(e,"data");return"NotFound"===n.__typename?null:"Album"!==n.__typename?function(e){const t={type:Ue.c.ARTIST,uri:"",name:""};return{type:Ue.c.ALBUM,uri:e,name:"",images:[],artists:[t],release:{isoString:new Date(1970,1).toISOString(),precision:Xn.by.Year},pinned:!1,addedAt:null,lastPlayedAt:null,canPin:ni.oT.NO,isPremiumOnly:!1,albumType:"album"}}(e._uri):{type:Ue.c.ALBUM,uri:n.uri,name:n.name,artists:(0,Pi.K)(n.artists),images:(0,si.r)(n.coverArt),release:(0,Ri.mp)(n.date),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.coverArt?.extractedColors),isPremiumOnly:n.playability.reason===Xn.$c.CatalogueRestricted,albumType:Li(n.type)}}function ki(e,t){const n=(0,ri.Jt)(e,"data");return"Artist"!==n.__typename?(i=e._uri,{type:Ue.c.ARTIST,uri:i,name:"",images:[],pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null}):{type:Ue.c.ARTIST,uri:e._uri,name:n.profile.name,images:(0,si.r)(n.visuals.avatarImage),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.visuals.avatarImage?.extractedColors)};var i}var xi=n(35529),Ui=n(61983);function Mi(e,t){const n=(0,ri.Jt)(e,"data");if("Audiobook"!==n.__typename)return"RestrictedContent"===n.__typename?null:(i=e._uri,{type:Ue.c.AUDIOBOOK,uri:i,name:"",authorName:"",images:[],isLocked:!1,pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null});var i;const r=(0,ri.Jt)(n,"authors");return{type:n.isPreRelease&&!n.accessInfo?.isUserMemberOfAtLeastOneGroup?Ue.c.PRE_RELEASE_BOOK:Ue.c.AUDIOBOOK,uri:e._uri,name:n.name,authorName:r?.[0]?.name??"",images:(0,si.r)(n.coverArt),isLocked:(0,xi.e$)(n.accessInfo),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.coverArt?.extractedColors),consumptionCapExplanation:(0,Ui.e)(n.accessInfo),isPlayable:n.accessInfo?.isUserMemberOfAtLeastOneGroup??!1}}function Bi(e,t,n,i=!1){const r=(0,ri.Jt)(e,"data");return"Folder"!==r.__typename?(s=e._uri,{type:Ue.c.FOLDER,uri:s,rowId:s,name:"",pinned:!1,canPin:ni.oT.NO,numberOfFolders:0,numberOfPlaylists:0,canReorder:!1,isFlattened:!1,addedAt:null,lastPlayedAt:null,isEmpty:!1}):{type:Ue.c.FOLDER,uri:r.uri,rowId:r.uri,name:r.name,pinned:t.pinned,canPin:t.pinnable?ni.oT.YES:ni.oT.NO,numberOfFolders:r.folderCount,numberOfPlaylists:r.playlistCount,folderDepth:t.depth,canReorder:n,isFlattened:i,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),isEmpty:0===r.folderCount&&0===r.playlistCount};var s}var ji=n(61714);function Fi(){return{type:Ue.c.USER,name:"",uri:"",id:"",username:"",images:[]}}function Vi(e,t,n,i,r){if(r.has(e._uri))return null;const s=(0,ri.Jt)(e,"data");if("Playlist"!==s.__typename||null===s.revisionId)return a=e._uri,o=t.depth,l=t.pinned,{type:Ue.c.PLAYLIST,uri:a,name:"",images:[],pinned:l,canPin:ni.oT.NO,owner:Fi(),folderDepth:o,canReorder:!1,canView:!1,addedAt:null,lastPlayedAt:null,isBooklist:!1,isEmpty:null,namePrefix:null};var a,o,l;const c=(0,ri.Jt)(s,"ownerV2"),u=(0,ri.Jt)(c,"data"),d=i.update(e._uri,{name:s.name,description:s.description??void 0,images:(0,si.r)(s.images.items.at(0)??null)},(0,F.tX)(s.revisionId));return{type:Ue.c.PLAYLIST,uri:s.uri,name:d.name??"",namePrefix:null,images:d.images??[],pinned:t.pinned,canPin:t.pinnable?ni.oT.YES:ni.oT.NO,folderDepth:t.depth,canAddTo:s.currentUserCapabilities.canEditItems,canReorder:n,canView:s.currentUserCapabilities.canView,owner:"User"===u.__typename?{type:Ue.c.USER,uri:u.uri,name:u.name,username:u.username,images:(0,si.r)(u.avatar)??null,id:u.id}:Fi(),addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(s.images.items.at(0)?.extractedColors),isBooklist:(0,ji.p)(s.attributes),isEmpty:null}}function Gi(e,t){const n=(0,ri.Jt)(e,"data");return"Podcast"!==n.__typename?(i=e._uri,{type:Ue.c.SHOW,uri:i,name:"",publisher:"",images:[],pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null}):{type:Ue.c.SHOW,uri:e._uri,name:n.name,publisher:n.publisher?.name??"",images:(0,si.r)(n.coverArt),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.coverArt?.extractedColors)};var i}function Hi(e,t){return e._uri===ni.BP?function(e,t){const n=(0,ri.Jt)(e,"data");if("PseudoPlaylist"!==n.__typename)return i=e._uri,{type:Ue.c.LIKED_SONGS,uri:i,name:"",images:[],pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null};var i;return{type:Ue.c.LIKED_SONGS,uri:n.uri,name:n.name,images:n.image.sources,pinned:t.pinned,canPin:ni.oT.YES,numberOfSongs:n.count,addedAt:null,lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.image.extractedColors)}}(e,t):function(e,t){const n=(0,ri.Jt)(e,"data");if("PseudoPlaylist"!==n.__typename)return i=e._uri,{type:Ue.c.YOUR_EPISODES,uri:i,name:"",images:[],pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null};var i;return{type:Ue.c.YOUR_EPISODES,uri:n.uri,name:n.name,images:n.image.sources,pinned:t.pinned,canPin:ni.oT.YES,addedAt:null,lastPlayedAt:(0,Ri.Cg)(t.playedAt),color:(0,ii.m)(n.image.extractedColors)}}(e,t)}function Wi(e,t){const n=(0,ri.Jt)(e,"data");return"NotFound"===n.__typename?null:"PreRelease"!==n.__typename?function(e){const t={type:Ue.c.ARTIST,uri:"",name:""};return{type:Ue.c.PRE_RELEASE_ALBUM,uri:e,name:"",images:[],artists:[t],pinned:!1,addedAt:null,lastPlayedAt:null,canPin:ni.oT.NO}}(e._uri):{type:Ue.c.PRE_RELEASE_ALBUM,uri:n.uri,name:n.preReleaseContent?.name??"",artists:(0,Pi.a)(n.preReleaseContent?.artists),images:(0,si.r)(n.preReleaseContent?.coverArt??null),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),color:(0,ii.m)(n.preReleaseContent?.coverArt?.extractedColors),lastPlayedAt:null}}function zi(e){const t=e.items?.at(0)?.data;return"Artist"===t?.__typename?(0,si.r)(t.visuals.avatarImage):[]}function Ki(e){const t=e.items[0].data;if("Artist"===t.__typename)return(0,ii.m)(t.visuals.avatarImage?.extractedColors)}function Yi(e,t){const n=(0,ri.Jt)(e,"data");return"ConcertV2"!==n.__typename?(i=e._uri,{type:Ue.c.CONCERT,uri:i,name:"",images:[],pinned:!1,canPin:ni.oT.NO,addedAt:null,lastPlayedAt:null,cityName:"",locationName:"",startTime:null}):{type:Ue.c.CONCERT,uri:e._uri,name:n.title,images:zi(n.artists),pinned:t.pinned,canPin:ni.oT.YES,addedAt:(0,Ri.Cg)(t.addedAt),lastPlayedAt:(0,Ri.Cg)(t.playedAt),cityName:n.location.city,locationName:n.location.name,startTime:22===n.startDateIsoString.length?new Date(n.startDateIsoString.substring(0,16)).toString():n.startDateIsoString,color:Ki(n.artists)};var i}const qi=new Set(["Writable"]);function $i(e,t,n,i=new Set){if("LibraryInvalidFilterIdError"===e?.__typename)throw new ni.c_(e.invalidFilterId);if("LibraryInvalidSortOrderIdError"===e?.__typename)throw new ni.IU(e.invalidSortOrderId);if("NotFound"===e?.__typename)throw new ni.db(e.message??"Folder not found");(0,ri.j)(e,"LibraryPage","Error fetching library via GraphQL!");const r=n?.filters?.[0],s="Playlists"===r&&"Custom Order"===e.selectedSortOrder.id,a=!!n?.textFilter,o=e.breadcrumbs;return{items:(e.items??[]).map((e=>function(e,t,n,i,r){const s=(0,ri.Jt)(e,"item"),a={pinned:e.pinned,addedAt:e.addedAt,playedAt:e.playedAt,depth:e.depth,pinnable:e.pinnable};switch(s.__typename){case"PreReleaseResponseWrapper":return Wi(s,a);case"AlbumResponseWrapper":return Di(s,a);case"ArtistResponseWrapper":return ki(s,a);case"AudiobookResponseWrapper":return Mi(s,a);case"PodcastOrAudiobookResponseWrapper":case"PodcastResponseWrapper":return Gi(s,a);case"PlaylistResponseWrapper":return Vi(s,a,t,i,r);case"LibraryPseudoPlaylistResponseWrapper":return Hi(s,a);case"LibraryFolderResponseWrapper":return Bi(s,a,t,n);case"ConcertV2ResponseWrapper":return Yi(s,a);case"ConcertResponseWrapper":return null;default:return(0,Me.k)(s,"Type not recognized"),null}}(e,s,a,t,i))),offset:e.pagingInfo.offset,limit:e.pagingInfo.limit,totalLength:e.totalCount,unfilteredTotalLength:e.totalCount,passedFilterIds:n?.filters??[],availableFilters:e.availableFilters.filter((e=>!qi.has(e.id))),selectedFilters:e.selectedFilters,availableSortOrders:e.availableSortOrders,selectedSortOrder:e.selectedSortOrder,primaryFilter:Zi(r)??void 0,hasUnfilteredItems:!!a||e.totalCount>0,hasTextFilter:a,reorderAllowed:s,passedFolderUri:n?.folderUri,openedFolderName:o?.at(-1)?.name,parentFolderUri:o?.at(-2)?.uri}}function Zi(e){switch(e){case"Albums":return Ue.c.ALBUM;case"Artists":return Ue.c.ARTIST;case"Playlists":return Ue.c.PLAYLIST;case"Podcasts & Shows":return Ue.c.SHOW;case"Audiobooks":return Ue.c.AUDIOBOOK;case"Events":return Ue.c.CONCERT;default:return null}}var Qi=n(59029),Ji=n(72051);function Xi(e){return{milliseconds:e.totalMilliseconds}}var er=n(34647),tr=n(16717),nr=n(53149);function ir(e){return{type:Ue.c.EPISODE,uri:e,name:"",description:"",duration:{milliseconds:0},playedState:{timeLeft:{milliseconds:0},state:Ji.M.Unknown},images:[],languages:[],release:{isoString:new Date(1970,1).toISOString(),precision:Xn.by.Year},show:{type:Ue.c.SHOW,uri:"",name:"",publisher:"",images:[],mediaType:Qi.Q.UNKNOWN},podcastSubscription:{isPaywalled:!1,isUserSubscribed:!1},isPlayable:!1,isExplicit:!1,is19PlusOnly:!1}}function rr(e){return{type:Ue.c.SHOW,uri:e,name:"",publisher:"",images:[],mediaType:Qi.Q.UNKNOWN}}function sr(e){const t=e.playlistV2;(0,ri.j)(t,"Playlist","Error fetching library via GraphQL!");const n=t.content;return(0,ri.j)(n,"PlaylistItemsPage","Error fetching library via GraphQL!"),{items:n.items.map((e=>{const t=e.itemV2;return(0,ri.j)(t,"EpisodeOrChapterResponseWrapper","Error fetching library via GraphQL!"),function(e){const t=(0,ri.Jt)(e,"data");if("Episode"!==t.__typename)return ir(e._uri);const n="gatedEntityRelations"in e.data?(0,xi.Gv)(e.data.gatedEntityRelations):void 0,i=t.podcastV2,r=i.data,s="Podcast"!==r.__typename?rr(i._uri):(0,er.jM)(r);return{type:Ue.c.EPISODE,uri:e._uri,name:t.name,description:t.description??"",duration:Xi(t.duration),playedState:(0,er.fS)(t.duration,t.playedState),images:(0,si.r)(t.coverArt),languages:(0,tr.S)(t.language),release:(0,Ri.mp)(t.releaseDate),show:s,podcastSubscription:(0,er.Wx)(t.restrictions,t.playability),isPlayable:(a=t.playability,a?.playable??!1),isExplicit:(0,nr.V)(t.contentRating),is19PlusOnly:(0,nr.r)(t.contentRating),gatedEntityRelations:n};var a}(t)})),offset:n.pagingInfo.offset,limit:n.pagingInfo.limit,totalLength:n.totalCount,unfilteredTotalLength:n.totalCount}}var ar=n(1103);function or(e){const t=(0,ri.Jt)(e,"addedAt"),n=(0,ri.Jt)(e,"track"),i=(0,ri.Jt)(n,"data");return"Track"!==i.__typename?function(e,t){const n={type:Ue.c.ARTIST,uri:"",name:""};return{type:Ue.c.TRACK,uri:e,name:"",album:{type:Ue.c.ALBUM,uri:"",name:"",images:[],artist:n},artists:[n],duration:{milliseconds:0},discNumber:0,trackNumber:0,isPlayable:!1,isExplicit:!1,is19PlusOnly:!1,isLocal:!1,addedAt:(0,Ri.JO)(t),isBanned:!1}}(n._uri,t):{type:Ue.c.TRACK,uri:n._uri,name:i.name,album:(0,ar.h)((0,ri.Jt)(i,"albumOfTrack")),artists:(0,ar.S)(i.artists),duration:Xi(i.duration),discNumber:i.discNumber,trackNumber:i.trackNumber,isPlayable:i.playability.playable,isExplicit:(0,nr.V)(i.contentRating),is19PlusOnly:(0,nr.r)(i.contentRating),isLocal:!1,addedAt:(0,Ri.JO)(t),hasAssociatedVideo:(i.associationsV2.totalCount||0)>0,isBanned:!1}}const lr=new Wn.l("areEntitiesInLibrary","query","6ec3f767111e1f88a68058560f961161679d2cd4805ff3b8cb4b25c83ccbd6e0",null);async function cr(e,t,n,i){const r=new Set,s={};for(const t of i){const n=e.get(t);if(void 0===n){const e=(0,re.o_h)(t);if(null===e||(a=e.type)!==re.NQG.ALBUM&&a!==re.NQG.ARTIST&&a!==re.NQG.TRACK&&a!==re.NQG.SHOW&&a!==re.NQG.EPISODE)throw new Error("Unknown URI type!");r.add(t)}else s[t]=n}var a;if(r.size>0){const i=[...r];(await t.create(`${lr.name}:${JSON.stringify(i)}`,(()=>n(lr,{uris:i},["uris"]).then((e=>({data:e})))))).data.map((e=>e.lookup)).flat().forEach(((t,n)=>{const r="data"in t&&"saved"in t.data&&t.data.saved;s[i[n]]=r,e.set(i[n],r)}))}return i.map((e=>s[e]))}const ur=new Wn.l("fetchLibraryTracks","query","1cb5df9343e3e11ecca539ee85621136f8c1226768a9b7641012c4e6a2339872",null),dr=new Wn.l("fetchLibraryEpisodes","query","68cdd9d515cc0850ad9c7d90c129508bec9e02848cf4002ec9c947eb238432fe",null),pr=new Wn.l("fetchLibraryEpisodesWithGatedEntityRelations","query","68cdd9d515cc0850ad9c7d90c129508bec9e02848cf4002ec9c947eb238432fe",null),mr=0,hr=50,fr={items:[],totalLength:0,unfilteredTotalLength:0,offset:0,limit:0},gr={...fr,primaryFilter:void 0,passedFilterIds:[],availableFilters:[],selectedFilters:[],availableSortOrders:[],selectedSortOrder:{id:"",name:""},hasUnfilteredItems:!1,hasTextFilter:!1,reorderAllowed:!1,passedFolderUri:void 0},Er=new Set([Ue.c.TRACK,Ue.c.ALBUM,Ue.c.ARTIST,Ue.c.SHOW,Ue.c.EPISODE,Ue.c.AUDIOBOOK]);class _r{_cache=new Map;_inFlightCache=new j.od;constructor(e,t,n,i,r,s=new Set,a,o){this._loader=e,this._playlistAttributesCache=n,this._isAnonymous=i,this._currentUsername=r,this.filteredPlaylists=s,this._isGatedPodcastsEnabled=a,this._isEventsInYourLibraryEnabled=o,this._events=function(e,t,n,i){return i?new vi(e):new yi(e,t,n)}(this._cache,(async e=>await cr(this._cache,this._inFlightCache,this._batchedLoader,e)),t,this._isAnonymous),this._batchedLoader=(0,hi.q)(this._loader,50)}getCapabilities(){return{canSort:!1,canFilter:!1,canSortTracksAndEpisodes:!1,canFilterTracksAndEpisodes:!1,canModifyOffline:!1,canGetTracksByArtistOrAlbum:!1,canMarkEpisodesAsDone:!1,canFetchAllItems:!1,canPin:!0,canTextFilterContentsInRealtime:!1}}checkIfLoggedIn(){if(this._isAnonymous)throw new Error("LibraryAPI is not available for anonymous users!")}query(e,t){return this._inFlightCache.create(`${e.name}:${JSON.stringify(t)}`,(()=>this._loader(e,t)))}markAsInLibrary(e){e.items.forEach((e=>{e&&Er.has(e.type)&&this._cache.set(e.uri,!0)}))}async getTracks(e={}){if(this._isAnonymous)return fr;if(void 0!==e.uri)return{items:[],offset:0,limit:0,totalLength:0,unfilteredTotalLength:0};const{offset:t=mr,limit:n=hr}=e,i=await this.query(ur,{offset:t,limit:n}),r=(s=i?.data?.me?.library?.tracks??null,(0,ri.j)(s,"UserLibraryTrackPage","Error fetching library shows via GraphQL!"),{items:s.items.map(or),offset:s.pagingInfo.offset,limit:s.pagingInfo.limit,totalLength:s.totalCount,unfilteredTotalLength:s.totalCount});var s;return this.markAsInLibrary(r),r}async getTracksFilterTags(){return[]}async getEpisodes(e={}){if(this._isAnonymous)return fr;const{offset:t=mr,limit:n=hr}=e,i=await this.query(this._isGatedPodcastsEnabled?pr:dr,{uri:"spotify:playlist:37i9dQZF1FgnTBfUlzkeKt",offset:t,limit:n});if(!i?.data)return fr;const r=sr(i.data);return this.markAsInLibrary(r),r}getEvents(){return this._events}onUpdateItems(e,t){this._events.emitUpdateItems(e,t)}async add({uris:e,silent:t}){if(!this._events.emitOperationSync(Yn.tS.ADD,e,t)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!0),await async function(e,t){if(!Oi(Ii(t)))throw new Error("Unknown URI type!");await e(Si,{uris:t},["uris"])}(this._batchedLoader,e),this._events.emitOperationComplete(Yn.tS.ADD,e,null,t)}catch(n){throw this.onUpdateItems(e,!1),this._events.emitOperationComplete(Yn.tS.ADD,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}}async remove({uris:e,silent:t}){if(!this._events.emitOperationSync(Yn.tS.REMOVE,e,t)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!1),await async function(e,t){if(!Oi(Ii(t)))throw new Error("Unknown URI type!");await e(Ai,{uris:t},["uris"])}(this._batchedLoader,e),this._events.emitOperationComplete(Yn.tS.REMOVE,e,null,t)}catch(n){throw this.onUpdateItems(e,!0),this._events.emitOperationComplete(Yn.tS.REMOVE,e,n instanceof Error?n:new Error("Unknown error object"),t),n}}}async contains(...e){if(this._isAnonymous)return new Array(e.length).fill(!1);const t=await cr(this._cache,this._inFlightCache,this._batchedLoader,e);return this.onUpdateItems(e,t),t}containsSync(e){return!this._isAnonymous&&this._cache.get(e)}markAsPlayed(){return Promise.resolve()}markAsUnPlayed(){return Promise.resolve()}async pin(e){const t=await async function(e,t,n){const i=await e(Ci,{uri:(0,bi.c)(t,n)});return i?.data?.pinItemInLibrary?.pinResult??null}(this._loader,e,this._currentUsername);t===Xn.to.FailedItemLimitReached?this._events.emitUpdatePinErrorTooManyPins(e,4):t===Xn.to.Successful&&this._events.emitUpdatePin(e,!0)}async unpin(e){await async function(e,t,n){await e(Ti,{uri:(0,bi.c)(t,n)})}(this._loader,e,this._currentUsername),this._events.emitUpdatePin(e,!1)}async getContents(e){if(this._isAnonymous)return gr;const t=!!e?.textFilter,n=await this.query(Ni,{filters:e?.filters,order:e?.sortOrder??null,textFilter:e?.textFilter??null,features:[!1===e?.includeLikedSongs?null:Xn.Yu.LikedSongs,!1===e?.includeYourEpisodes?null:Xn.Yu.YourEpisodes,!1===e?.includePreReleases?null:Xn.Yu.Prereleases,this._isEventsInYourLibraryEnabled?Xn.Yu.Events:null].filter(wi.P),limit:e?.limit,offset:e?.offset,flatten:t,expandedFolders:t?void 0:e?.expandedFolders,folderUri:(0,re.fpb)(e?.folderUri)?e?.folderUri:null,includeFoldersWhenFlattening:!0}),i=$i(n?.data?.me?.libraryV3??null,this._playlistAttributesCache,e,this.filteredPlaylists);return this.markAsInLibrary(i),i}async getAlbum(){return null}getContentsPrimaryFilterId(e){return function(e){switch(e){case Ue.c.ALBUM:return"Albums";case Ue.c.ARTIST:return"Artists";case Ue.c.PLAYLIST:return"Playlists";case Ue.c.SHOW:return"Podcasts & Shows";case Ue.c.AUDIOBOOK:return"Audiobooks";default:return null}}(e)}getFilterLabel(e){return e.toLowerCase().replace(/\s/g,"_")}getSortOrderLabel(e){return e.toLowerCase().replace(/\s/g,"_")}getStaticallyKnownFilters(){return{playlist:{filterId:"Playlists",sortOrderIds:{customSort:"Custom Order"}}}}getRecentsSortOrderId(){return"Recents"}}var yr=n(39838),vr=n(56837);class br{constructor(){this._events=new vr.Q}getCapabilities(){return{canSort:!1,canFilter:!1,canFetchAllTracks:!1}}getEvents(){return this._events}getIsEnabled(){return!1}setIsEnabled(e){}subscribeIsEnabled(e){return()=>{}}browseForFolder(){return Promise.resolve({path:null})}async getTracks(e){return Promise.reject()}async getSources(){return Promise.reject()}async mutateDefaultSource(e){return Promise.reject()}async addFolder(e){return Promise.reject()}async removeFolder(e){return Promise.reject()}}var Sr=n(50993),Ar=n(16946),Cr=n(69662),Tr=n(21364),Ir=n(22795),Or=n.n(Ir);function wr(){return{typeUrl:"",value:new Uint8Array(0)}}const Nr={encode:(e,t=Or().Writer.create())=>(""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=wr();for(;n.pos>>3){case 1:if(10!==e)break;r.typeUrl=n.string();continue;case 2:if(18!==e)break;r.value=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Nr.fromPartial(e??{}),fromPartial(e){const t=wr();return t.typeUrl=e.typeUrl??"",t.value=e.value??new Uint8Array(0),t}};const Rr={encode:(e,t=Or().Writer.create())=>(0!==e.statusCode&&t.uint32(8).int32(e.statusCode),""!==e.etag&&t.uint32(18).string(e.etag),""!==e.locale&&t.uint32(26).string(e.locale),"0"!==e.cacheTtlInSeconds&&t.uint32(32).int64(e.cacheTtlInSeconds),"0"!==e.offlineTtlInSeconds&&t.uint32(40).int64(e.offlineTtlInSeconds),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={statusCode:0,etag:"",locale:"",cacheTtlInSeconds:"0",offlineTtlInSeconds:"0"};for(;n.pos>>3){case 1:if(8!==e)break;r.statusCode=n.int32();continue;case 2:if(18!==e)break;r.etag=n.string();continue;case 3:if(26!==e)break;r.locale=n.string();continue;case 4:if(32!==e)break;r.cacheTtlInSeconds=Lr(n.int64());continue;case 5:if(40!==e)break;r.offlineTtlInSeconds=Lr(n.int64());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Rr.fromPartial(e??{}),fromPartial(e){const t={statusCode:0,etag:"",locale:"",cacheTtlInSeconds:"0",offlineTtlInSeconds:"0"};return t.statusCode=e.statusCode??0,t.etag=e.etag??"",t.locale=e.locale??"",t.cacheTtlInSeconds=e.cacheTtlInSeconds??"0",t.offlineTtlInSeconds=e.offlineTtlInSeconds??"0",t}};const Pr={encode:(e,t=Or().Writer.create())=>(void 0!==e.header&&Rr.encode(e.header,t.uint32(10).fork()).ldelim(),""!==e.entityUri&&t.uint32(18).string(e.entityUri),void 0!==e.extensionData&&Nr.encode(e.extensionData,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={header:void 0,entityUri:"",extensionData:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.header=Rr.decode(n,n.uint32());continue;case 2:if(18!==e)break;r.entityUri=n.string();continue;case 3:if(26!==e)break;r.extensionData=Nr.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Pr.fromPartial(e??{}),fromPartial(e){const t={header:void 0,entityUri:"",extensionData:void 0};return t.header=void 0!==e.header&&null!==e.header?Rr.fromPartial(e.header):void 0,t.entityUri=e.entityUri??"",t.extensionData=void 0!==e.extensionData&&null!==e.extensionData?Nr.fromPartial(e.extensionData):void 0,t}};function Lr(e){return e.toString()}Or().util.Long!==Tr.A&&(Or().util.Long=Tr.A,Or().configure());const Dr={encode:(e,t=Or().Writer.create())=>(0!==e.extensionKind&&t.uint32(8).int32(e.extensionKind),""!==e.etag&&t.uint32(18).string(e.etag),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={extensionKind:0,etag:""};for(;n.pos>>3){case 1:if(8!==e)break;r.extensionKind=n.int32();continue;case 2:if(18!==e)break;r.etag=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Dr.fromPartial(e??{}),fromPartial(e){const t={extensionKind:0,etag:""};return t.extensionKind=e.extensionKind??0,t.etag=e.etag??"",t}};const kr={encode(e,t=Or().Writer.create()){""!==e.entityUri&&t.uint32(10).string(e.entityUri);for(const n of e.query)Dr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={entityUri:"",query:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.entityUri=n.string();continue;case 2:if(18!==e)break;r.query.push(Dr.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>kr.fromPartial(e??{}),fromPartial(e){const t={entityUri:"",query:[]};return t.entityUri=e.entityUri??"",t.query=e.query?.map((e=>Dr.fromPartial(e)))||[],t}};function xr(){return{country:"",catalogue:"",taskId:new Uint8Array(0)}}const Ur={encode:(e,t=Or().Writer.create())=>(""!==e.country&&t.uint32(10).string(e.country),""!==e.catalogue&&t.uint32(18).string(e.catalogue),0!==e.taskId.length&&t.uint32(26).bytes(e.taskId),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=xr();for(;n.pos>>3){case 1:if(10!==e)break;r.country=n.string();continue;case 2:if(18!==e)break;r.catalogue=n.string();continue;case 3:if(26!==e)break;r.taskId=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Ur.fromPartial(e??{}),fromPartial(e){const t=xr();return t.country=e.country??"",t.catalogue=e.catalogue??"",t.taskId=e.taskId??new Uint8Array(0),t}};const Mr={encode(e,t=Or().Writer.create()){void 0!==e.header&&Ur.encode(e.header,t.uint32(10).fork()).ldelim();for(const n of e.entityRequest)kr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={header:void 0,entityRequest:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.header=Ur.decode(n,n.uint32());continue;case 2:if(18!==e)break;r.entityRequest.push(kr.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Mr.fromPartial(e??{}),fromPartial(e){const t={header:void 0,entityRequest:[]};return t.header=void 0!==e.header&&null!==e.header?Ur.fromPartial(e.header):void 0,t.entityRequest=e.entityRequest?.map((e=>kr.fromPartial(e)))||[],t}};const Br={encode:(e,t=Or().Writer.create())=>(0!==e.providerErrorStatus&&t.uint32(8).int32(e.providerErrorStatus),"0"!==e.cacheTtlInSeconds&&t.uint32(16).int64(e.cacheTtlInSeconds),"0"!==e.offlineTtlInSeconds&&t.uint32(24).int64(e.offlineTtlInSeconds),t),decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={providerErrorStatus:0,cacheTtlInSeconds:"0",offlineTtlInSeconds:"0"};for(;n.pos>>3){case 1:if(8!==e)break;r.providerErrorStatus=n.int32();continue;case 2:if(16!==e)break;r.cacheTtlInSeconds=Gr(n.int64());continue;case 3:if(24!==e)break;r.offlineTtlInSeconds=Gr(n.int64());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Br.fromPartial(e??{}),fromPartial(e){const t={providerErrorStatus:0,cacheTtlInSeconds:"0",offlineTtlInSeconds:"0"};return t.providerErrorStatus=e.providerErrorStatus??0,t.cacheTtlInSeconds=e.cacheTtlInSeconds??"0",t.offlineTtlInSeconds=e.offlineTtlInSeconds??"0",t}};const jr={encode(e,t=Or().Writer.create()){void 0!==e.header&&Br.encode(e.header,t.uint32(10).fork()).ldelim(),0!==e.extensionKind&&t.uint32(16).int32(e.extensionKind);for(const n of e.extensionData)Pr.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={header:void 0,extensionKind:0,extensionData:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.header=Br.decode(n,n.uint32());continue;case 2:if(16!==e)break;r.extensionKind=n.int32();continue;case 3:if(26!==e)break;r.extensionData.push(Pr.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>jr.fromPartial(e??{}),fromPartial(e){const t={header:void 0,extensionKind:0,extensionData:[]};return t.header=void 0!==e.header&&null!==e.header?Br.fromPartial(e.header):void 0,t.extensionKind=e.extensionKind??0,t.extensionData=e.extensionData?.map((e=>Pr.fromPartial(e)))||[],t}};const Fr={encode:(e,t=Or().Writer.create())=>t,decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={};for(;n.posFr.fromPartial(e??{}),fromPartial:e=>({})};const Vr={encode(e,t=Or().Writer.create()){void 0!==e.header&&Fr.encode(e.header,t.uint32(10).fork()).ldelim();for(const n of e.extendedMetadata)jr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Or().Reader?e:Or().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={header:void 0,extendedMetadata:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.header=Fr.decode(n,n.uint32());continue;case 2:if(18!==e)break;r.extendedMetadata.push(jr.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>Vr.fromPartial(e??{}),fromPartial(e){const t={header:void 0,extendedMetadata:[]};return t.header=void 0!==e.header&&null!==e.header?Fr.fromPartial(e.header):void 0,t.extendedMetadata=e.extendedMetadata?.map((e=>jr.fromPartial(e)))||[],t}};function Gr(e){return e.toString()}Or().util.Long!==Tr.A&&(Or().util.Long=Tr.A,Or().configure());class Hr{constructor(e){this._requestBuilder=e}async fetch(e,t){const n=await this._requestBuilder.build().withMethod("POST").withHost(M.I_).withPath("/extended-metadata/v0/extended-metadata").withEndpointIdentifier("/extended-metadata/v0/extended-metadata").withJsonContentType().withResponseType("arraybuffer").withHeaders([{key:"accept",value:"application/protobuf"}]).withoutMarket().withBody(Mr.fromPartial({entityRequest:e.map((e=>({entityUri:e,query:t.map((e=>({extensionKind:e})))})))})).send(),{extendedMetadata:i}=Vr.decode(new Uint8Array(n.body)),r=Object.fromEntries(e.map((e=>[e,{}])));for(const{extensionKind:e,extensionData:n}of i)if((0,Cr.up)(e,t))for(const{entityUri:t,extensionData:i}of n){if(!(t in r))continue;const n=!!i?.value&&(0,Cr.V$)(e);r[t][e]=n?(0,Cr.iy)(e,i.value):i}return Object.entries(r).map((([e,t])=>({uri:e,extensions:t})))}async expire(e,t){}}var Wr=n(17121),zr=n(35035),Kr=n(87672);const Yr="https://spclient.wg.spotify.com/offline/v1";async function qr(e,t,n,i=!1){if(!n)throw new Error("Passing a `deviceKey` is required in `OfflineWeb`");const r={operations:[{operation:i?"REMOVE":"ADD",uri:t}]};await e.build().withHost(Yr).withMethod("POST").withPath(`/devices/${n.deviceId}/cache/${n.cacheId}/resources:write`).withEndpointIdentifier("/devices/{deviceId}/cache/{cacheId}/resources:write").withJsonContentType().withBody(r).withoutMarket().send()}var $r=n(85829),Zr=n(96566),Qr=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.REQUESTED="REQUESTED",e.PENDING="PENDING",e.DOWNLOADING="DOWNLOADING",e.DOWNLOADED="DOWNLOADED",e.FAILURE="FAILURE",e}(Qr||{});const Jr=(0,Zr.g)(Qr);function Xr(e){if(Jr(e))switch(e){case Qr.UNSPECIFIED:return zr.kw.NO;case Qr.REQUESTED:case Qr.PENDING:return zr.kw.WAITING;case Qr.DOWNLOADING:return zr.kw.DOWNLOADING;case Qr.DOWNLOADED:return zr.kw.YES;case Qr.FAILURE:return zr.kw.NO;default:return(0,Me.k)(e),zr.kw.NO}return zr.kw.NO}class es{_events=new Kr.p;constructor(e){this._builder=e}getCapabilities(){return{canDownload:()=>zr.vs.NO_CAPABILITY,canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return Promise.reject()}getAvailabilitySync(){return zr.kw.NO}async getContextForDevices(e){const t=await async function(e,t){return await e.build().withHost(Yr).withPath("/devicesWithResource").withEndpointIdentifier("/devicesWithResource").withMethod("POST").withoutMarket().withJsonContentType().withBody({uri:t}).send()}(this._builder,e);return 200!==t.status?[]:function({deviceWithResource:e}){return e.filter((({is_supported:e,device:t})=>e&&t.capabilities.remote_downloads_enabled)).map((({device:{device_id:e,cache_id:t,name:n,type:i,platform:r,last_seen_at:s},resource:a})=>({deviceId:e,cacheId:t,deviceType:i,clientPlatform:r,isLocal:!1,name:n,type:(0,$r.I)(i),lastSeenAtMs:new Date(s).getTime(),contextDownloadAvailability:Xr(a?.state),contextDownloadPercentage:a?.progress??0})))}(t.body)}async addDownload(e,t){await qr(this._builder,e,t)}async removeDownload(e,t){await qr(this._builder,e,t,!0)}async removeAllDownloads(){return Promise.reject()}async removeCache(){return Promise.reject()}async getStatistics(){return Promise.reject()}}var ts=n(61985),ns=n(36406),is=n(89133);class rs{constructor(){this._events=new is.G}getDevices(){throw new Error("Method not implemented.")}getFilterState(){throw new Error("Method not implemented.")}setCurrentDevice(){throw new Error("Method not implemented.")}restorePreviouslyActiveDevice(){throw new Error("Method not implemented.")}getFiltersEvents(){return this._events}getSavedDevices(){throw new Error("Method not implemented.")}removeCurrentDevice(){throw new Error("Method not implemented.")}isNormalizationOverriden(){throw new Error("Method not implemented.")}disableNormalizationOverride(){throw new Error("Method not implemented.")}isAvailable(){return!1}}var ss=n(43281),as=n(21108),os=n(9786),ls=n(91318),cs=n(78905);const us=new Wn.l("addToPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),ds=new Wn.l("removeFromPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),ps=new Wn.l("moveItemsInPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null);function ms(e){return{url:e.url,width:e.width,height:e.height}}function hs(e){return{type:Ue.c.ARTIST,uri:e.uri,name:e.profile.name}}function fs(e){switch(e){case Xn.Ll.Audio:return Qi.Q.AUDIO;case Xn.Ll.Video:return Qi.Q.VIDEO;case Xn.Ll.Mixed:return Qi.Q.MIXED;case Xn.Ll.Unknown:return Qi.Q.UNKNOWN;default:return(0,Me.d)(e)}}function gs(e,t){let n=!1;return e&&t!==Xn.$c.PaymentRequired&&(n=!0),{isPaywalled:e,isUserSubscribed:n}}function Es(e){return{type:Ue.c.EPISODE,uri:e.uri,name:e.name,description:e.description??"",duration:{milliseconds:e.episodeDuration.totalMilliseconds},playedState:(0,er.fS)(e.episodeDuration,e.playedState),images:e.coverArt?.sources.map(ms)??[],languages:e.language?[e.language.code]:[],release:(0,Ri.mp)(e.releaseDate),show:"Podcast"===e.podcastV2.data.__typename?(t=e.podcastV2.data,{type:Ue.c.SHOW,uri:t.uri,name:t.name,publisher:t.publisher?.name??"",images:t.coverArt?.sources.map(ms)??[],mediaType:fs(t.mediaType)}):null,podcastSubscription:gs(e.restrictions?.paywallContent??!1,e.playability.reason),gatedEntityRelations:"gatedEntityRelations"in e?(0,xi.Gv)(e.gatedEntityRelations):void 0,isPlayable:e.playability.playable,isExplicit:e.contentRating?.label===Xn.x7.Explicit,is19PlusOnly:e.contentRating?.label===Xn.x7.NineteenPlus};var t}function _s(e,t){if(null===e||null===e.itemV2)return null;const n={uid:e.uid,playIndex:t,addedAt:e.addedAt?.isoString||null,addedBy:(i=e.addedBy,null===i||"User"!==i.data.__typename?null:{type:Ue.c.USER,uri:i.data.uri,username:i.data.username,displayName:i.data.name??null,images:i.data.avatar?.sources?.map(ms)||[]}),formatListAttributes:e.attributes?.reduce(((e,{key:t,value:n})=>(e[t]=n,e)),{})??{}};var i,r,s,o,l;switch(e.itemV2.__typename){case"TrackResponseWrapper":return"Track"===e.itemV2.data.__typename?{...(o=e.itemV2.data,{type:Ue.c.TRACK,uri:o.uri,name:o.name,duration:{milliseconds:o.trackDuration.totalMilliseconds},album:o.albumOfTrack?(l=o.albumOfTrack,{type:Ue.c.ALBUM,uri:l.uri,name:l.name,artist:hs(l.artists.items[0]),images:l.coverArt?.sources.map(ms)??[]}):null,artists:o.artists.items.map(hs),discNumber:o.discNumber,trackNumber:o.trackNumber,isExplicit:o.contentRating?.label===Xn.x7.Explicit,is19PlusOnly:o.contentRating?.label===Xn.x7.NineteenPlus,isPlayable:o.playability.playable,isLocal:!1,hasAssociatedVideo:(o.associationsV2.totalCount||0)>0,isBanned:!1}),...n}:null;case"LocalTrackResponseWrapper":return"LocalTrack"===e.itemV2.data.__typename?{...(s=e.itemV2.data,{type:Ue.c.TRACK,uri:s.uri,name:s.name,album:{type:Ue.c.ALBUM,uri:"",name:s.albumName??"",artist:{type:Ue.c.ARTIST,uri:"",name:s.artistName??""},images:[]},artists:[{type:Ue.c.ARTIST,uri:"",name:s.artistName??""}],duration:{milliseconds:s.localTrackDuration?.totalMilliseconds??0},discNumber:0,trackNumber:0,isPlayable:!1,isExplicit:!1,is19PlusOnly:!1,isLocal:!0,isBanned:!1}),...n}:null;case"EpisodeOrChapterResponseWrapper":return"Episode"===e.itemV2.data.__typename?{...Es(e.itemV2.data),...n}:null;case"PodcastOrAudiobookResponseWrapper":return"Audiobook"===e.itemV2.data.__typename?{...(r=e.itemV2.data,{type:Ue.c.AUDIOBOOK,uri:r.uri,name:r.name,description:r.htmlDescriptionPlain??"",authorName:r.authors?.map((e=>e?.name)).join(a.Ru.getSeparator())||"",images:r.coverArt?.sources||[],durationMs:r.audiobookDuration?.totalMilliseconds,isLocked:(0,xi.e$)(r.accessInfo),isExplicit:r.contentRating?.label===Xn.x7.Explicit,consumptionCapExplanation:(0,Ui.e)(r.accessInfo),signifierText:r.accessInfo?.signifier?.text??void 0,rating:{average:r.rating?.averageRating?.average,showAverage:!!r.rating?.averageRating?.showAverage},topics:r.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))||[]}),...n}:null;case"UnknownType":case null:case void 0:return null;default:return(0,Me.k)(e.itemV2),null}}function ys(e){if("PlaylistItemsPage"!==e.content?.__typename)throw new Error("Error fetching playlist via GraphQL!");return{items:e.content.items?.map(_s)||[],offset:e.content.pagingInfo.offset,limit:e.content.pagingInfo.limit,totalLength:e.content.totalCount}}function vs(e){if(null===e)return null;const t=e.attributes,n=t["madeFor.name"]??null,i=t["madeFor.username"]??null,r="1"===t["madeFor.displayed"];return null!==i&&r?{type:Ue.c.USER,uri:`spotify:user:${encodeURIComponent(i)}`,username:i,displayName:n,images:[]}:null}function bs(e,t,n){if("PlaylistItemsPage"!==n.content?.__typename||null===n.revisionId)throw new Error("Error fetching playlist via GraphQL!");const i=n.content.items.length===n.content.totalCount&&n.content.items?.every((e=>"UnknownType"===e?.itemV2?.__typename||"PodcastOrAudiobookResponseWrapper"===e.itemV2.__typename&&"Audiobook"!==e.itemV2.data.__typename||"EpisodeOrChapterResponseWrapper"===e.itemV2.__typename&&"Episode"!==e.itemV2.data.__typename))?0:n.content.totalCount,r=function(e){if("PlaylistItemsPage"!==e.content?.__typename)throw new Error("Error fetching playlist via GraphQL!");const t={duration:0,count:0,unsupportedCount:0},{duration:n,count:i,unsupportedCount:r}=e.content.items?.reduce(((e,t)=>{if(null===t||null===t.itemV2)return e;const n=t.itemV2;switch(n.__typename){case"TrackResponseWrapper":"Track"===n.data.__typename&&(e.duration+=n.data.trackDuration.totalMilliseconds,e.count++);break;case"LocalTrackResponseWrapper":"LocalTrack"===n.data.__typename&&(e.duration+=n.data.localTrackDuration?.totalMilliseconds||0,e.count++);break;case"EpisodeOrChapterResponseWrapper":"Episode"===n.data.__typename&&(e.duration+=n.data.episodeDuration.totalMilliseconds,e.count++);break;case"UnknownType":case"PodcastOrAudiobookResponseWrapper":e.unsupportedCount++;break;default:(0,Me.k)(n)}return e}),t)??t,s=e.content.totalCount===e.content.items.length,a=i"EpisodeOrChapterResponseWrapper"===e?.itemV2?.__typename&&"Episode"===e.itemV2.data.__typename))??!1,u=n.content.items?.some((e=>"TrackResponseWrapper"===e?.itemV2?.__typename))??!1,d=l,p=l,m=i>0,h=(f=n.format,g=n.attributes,f?null===g?{type:f,attributes:{}}:{type:f,attributes:g.reduce(((e,{key:t,value:n})=>(e[t]=n,e)),{})}:null);var f,g;const E=n.content.items?.some((e=>"PodcastOrAudiobookResponseWrapper"===e?.itemV2?.__typename&&"Audiobook"===e.itemV2.data.__typename)),_=t.update(n.uri,{name:n.name,description:n.description??"",images:n.images.items?.at(0)?.sources.map(ms)??[]},(0,F.tX)(n.revisionId));return{isPublished:!1,type:Ue.c.PLAYLIST,uri:n.uri,name:_.name??"",description:_.description??"",images:_.images??[],totalLength:i,unfilteredTotalLength:i,totalLikes:n.followers,duration:r,owner:o,madeFor:vs(h),isLoaded:s,isOwnedBySelf:l,isRootlistable:!0,isSaved:a,hasEpisodes:c,hasSpotifyTracks:u,hasSpotifyAudiobooks:E,canAdd:d,canRemove:p,canPlay:m,formatListData:h,canReportAnnotationAbuse:!1,collaborators:null,permissions:null,hasDateAdded:!1,sharingInfo:n.sharingInfo}}function Ss(e){const{before:t,after:n}=e;if("start"===t)return{moveType:Xn.nz.TopOfPlaylist,fromUid:null};if("end"===n)return{moveType:Xn.nz.BottomOfPlaylist,fromUid:null};if(void 0!==t)return{moveType:Xn.nz.BeforeUid,fromUid:t.uid};if(void 0!==n)return{moveType:Xn.nz.AfterUid,fromUid:n.uid};throw new Error("Couldn't determine position to insert tracks based on input")}var As=n(96661);const Cs=new RegExp(String.raw`hm://playlist/v2/playlist/(?.+)`);class Ts extends As.N{_uris=new Set;_subscription=null;constructor(e){super(),this._pubSubAPI=e,this.onMessage=this.onMessage.bind(this)}onBatchChanged(e){this._uris=new Set(e.keys()),null===this._subscription&&e.size>0&&(this._subscription=this._pubSubAPI.subscribe({ident:"hm://playlist/v2/playlist/",isPrefix:!0,onMessage:e=>this.onMessage(e)}))}onMessage({ident:e}){const t=e.match(Cs);if(void 0!==t?.groups?.base62Id){const e=(0,re.Pse)(t.groups.base62Id).toURI();this._uris.has(e)&&this.emit(ae.Lj.UPDATE,{uri:e})}}}var Is=n(98228);function Os(e){e.formatListData?.type?e.hasDateAdded=!Is.E.includes(e.formatListData.type):e.hasDateAdded=!0}var ws=n(15538),Ns=n(61026),Rs=n(74611);const Ps="enhance";const Ls=new Wn.l("fetchPlaylist","query","19ff1327c29e99c208c86d7a9d8f1929cfdf3d3202a0ff4253c821f1901aa94d",null),Ds=new Wn.l("fetchPlaylistWithGatedEntityRelations","query","19ff1327c29e99c208c86d7a9d8f1929cfdf3d3202a0ff4253c821f1901aa94d",null),ks=new Wn.l("fetchPlaylistMetadata","query","19ff1327c29e99c208c86d7a9d8f1929cfdf3d3202a0ff4253c821f1901aa94d",null),xs=new Wn.l("fetchPlaylistContents","query","19ff1327c29e99c208c86d7a9d8f1929cfdf3d3202a0ff4253c821f1901aa94d",null),Us=new Wn.l("fetchPlaylistContentsWithGatedEntityRelations","query","19ff1327c29e99c208c86d7a9d8f1929cfdf3d3202a0ff4253c821f1901aa94d",null);class Ms{_inFlightCache=new j.od;constructor(e,t,n,i,r,s){this._builder=e,this._loader=t,this._playlistAttributesCache=i,this._username=r,this._isGatedPodcastsEnabled=s,this._events=function(e){return new Ts(e)}(n)}emitUpdate(e){this._events.emit(ae.Lj.UPDATE,{uri:e})}getCapabilities(){return{canSort:!1,canFilter:!1,canModifyOffline:!1,canMoveMultipleItems:!0,canFetchAllTracks:!1,canDecorateAddedBy:!0,hasUidsGeneratedFromIndicies:!1}}query(e,t){return this._inFlightCache.create(`${e.name}:${JSON.stringify(t)}`,(()=>this._loader(e,t)))}async getPlaylist(e,t={},n={}){const i=await this.query(this._isGatedPodcastsEnabled?Ds:Ls,{uri:e,offset:n.offset??0,limit:n.limit??0});if("Playlist"!==i?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");const r=function(e,t,n){if("Playlist"!==n?.__typename)throw new Error("Error fetching playlist via GraphQL!");return{metadata:bs(e,t,n),contents:ys(n)}}(this._username,this._playlistAttributesCache,i.data.playlistV2);return Os(r.metadata),r}async getMetadata(e){const t=await this.query(ks,{uri:e,offset:0,limit:100});if("Playlist"!==t?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");const n=bs(this._username,this._playlistAttributesCache,t.data.playlistV2);return Os(n),n}async getContents(e,t){const n=await this.query(this._isGatedPodcastsEnabled?Us:xs,{uri:e,offset:t?.offset??0,limit:t?.limit??50});if("Playlist"!==n?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");return ys(n?.data.playlistV2)}getEvents(){return this._events}async add(e,t,n,i){if(!this._events.emitAddSync(e,t,i))try{await this._loader(us,{uris:t,playlistUri:e,newPosition:Ss(n)}),this.emitUpdate(e),this._events.emitAddComplete(e,null,t,i)}catch(n){this._events.emitAddComplete(e,(0,ws.z)(n),t,i)}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this._loader(ps,{playlistUri:e,uids:t.map((e=>e.uid)),newPosition:Ss(n)}),this.emitUpdate(e),this._events.emitMoveComplete(e,null,t)}catch(n){this._events.emitMoveComplete(e,(0,ws.z)(n),t)}}async remove(e,t,n){if(!this._events.emitRemoveSync(e,t,n))try{await this._loader(ds,{playlistUri:e,uids:t.map((e=>e.uid))}),this.emitUpdate(e),this._events.emitRemoveComplete(e,null,t,n)}catch(i){this._events.emitRemoveComplete(e,(0,ws.z)(i),t,n)}}async uploadImage(e){return(0,cs.V)(this._builder,e)}async updateDetails(e,t){if(!this._events.emitUpdateSync(e,t))try{const n=await(0,ls.k)(this._builder,e,t);null!==n&&this._playlistAttributesCache.update(e,{name:t.name,description:t.description,images:t.image?[t.image]:void 0},n),this.emitUpdate(e),this._events.emitUpdateComplete(e,null,t)}catch(n){this._events.emitUpdateComplete(e,(0,ws.z)(n),t)}}async resolvePlaylistFormatURI(e){return(0,os._)(this._builder,e)}async getRecommendedTracks(e,t,n){return await(0,as.u)(this._builder,e,t,n)}async getRecommendedBookUris(e,t,n){return await(0,as.w)(this._builder,e,t,n)}async resync(){}async sendSignal(e,t,n){if(!this._events.emitSendSignalSync(e,t,n))try{await async function(e,t,n,i){const r=(0,re.o_h)(t).id,s=Rs.HN.fromPartial({identifier:n,data:Rs.tu.encode(Rs.tu.fromPartial({lensIdentifier:Ps,itemId:i?(0,F.xJ)(i):void 0})).finish()}),a=Ns.wK.toJSON(Ns.wK.fromPartial({emittedSignals:[s]}));await e.build().withMethod("POST").withHost(M.eX).withPath(`/playlist/${r}/signals`).withEndpointIdentifier("/playlist/{id}/signals").withQueryParameters({"spotify-apply-lenses":Ps}).withoutMarket().withJsonContentType().withBody(a).send()}(this._builder,e,t,n),this._events.emitSendSignalComplete(e,t,n)}catch(i){this._events.emitSendSignalComplete(e,t,n,(0,ws.z)(i))}}requestLenses(e,t,n){throw new Error("Method not implemented.")}}var Bs=n(43863),js=n(61767),Fs=n(78565),Vs=n(35612),Gs=n(82726),Hs=n(83785);function Ws(e){const t=(0,re.o_h)(e);return t?t.id:""}const zs={basePermissionLevel:"UNKNOWN",memberPermissions:{}};class Ks{_cache=new j.od;constructor(e){this._builder=e,this._events=new Gs.KD}getCapabilities(){return{}}getEvents(){return this._events}async getMemberPermissions(e){const t=Ws(e);return(await this._cache.create(`metadata:${t}`,(()=>this._builder.build().withHost(M.ZJ).withMethod("GET").withPath(`/playlist/${t}/permission/members`).withEndpointIdentifier("/playlist/{playlistId}/permission/members").withoutMarket().send()))).body||zs}async getPermissionGrant(e,t){return await(0,Vs.S1)(this._builder,e,t)}async claimPermissions(e,t){const n={operation:Gs.mA.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(n);try{const i=await(0,Vs.f5)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,e),e}}async getMembers(e){const{memberPermissions:t,basePermissionLevel:n}=await this.getMemberPermissions(e);return{members:Object.entries(t).map((([e,t])=>({permissionLevel:t.permissionLevel,songsAdded:0,user:(0,Hs.w)({id:e,uri:e,display_name:e})}))),basePermissionLevel:n}}subscribeToMembers(e,t){return this.getMembers(e).then((e=>{t(null,e)})).catch((e=>{t(e)})),()=>{}}async removeMember(e,t){const n=Ws(e),i={operation:Gs.mA.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(i);try{await this._builder.build().withHost(M.ZJ).withMethod("DELETE").withPath(`/playlist/${n}/permission/member/user/${encodeURIComponent(t)}`).withEndpointIdentifier("/playlist/{id}/permission/member/user/{username}").withJsonContentType().withoutMarket().send(),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}async setMemberPermission(e,t,n){const i=Ws(e),r={operation:Gs.mA.SET_MEMBER_PERMISSION,uri:e,permissionLevel:n};this._events.emitOperationSync(r);try{const{memberPermissions:s}=await this.getMemberPermissions(e);await this._builder.build().withHost(M.ZJ).withMethod("POST").withPath(`/playlist/${i}/permission/member/user/${encodeURIComponent(t)}`).withEndpointIdentifier("/playlist/{id}/permission/member/user/{username}").withJsonContentType().withBody({...s[t],permissionLevel:n}).withoutMarket().send(),this._events.emitOperationComplete(r)}catch(e){throw this._events.emitOperationComplete(r,e),e}}async setBasePermission(e,t){const n=Ws(e),i={operation:Gs.mA.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(i);try{const r=await(0,Vs.N4)(this._builder,e);await this._builder.build().withHost(M.ZJ).withMethod("POST").withPath(`/playlist/${n}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withJsonContentType().withBody({...r,permissionLevel:t}).withoutMarket().send(),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}}var Ys=n(59384),qs=n(14150),$s=n(94572),Zs=n(55136),Qs=n(39559);const Js=new RegExp(String.raw`hm://playlist/v2/user/.+/rootlist`),Xs=new RegExp(String.raw`hm://playlist/v2/playlist/.+`);class ea extends Qs.D{_subscription=null;constructor(e,t){super(),this._pubSubAPI=e,this._contains=t}subscribeToUpdates(){this._subscription=this._pubSubAPI.subscribe({ident:"hm://playlist/v2/",isPrefix:!0,onMessage:e=>{Js.test(e.ident)?this.onRootlistMessage(e):Xs.test(e.ident)&&this.onPlaylistMessage(e)}})}unsubscribeFromUpdates(){null!==this._subscription&&this._subscription.cancel()}async onRootlistMessage(e){const t=e?.payloads?.[0];if(void 0===t)return;const n=Zs.d0.decode(t);void 0!==n.parentRevision&&void 0!==n.newRevision&&(this.emitSync($s.tD.UPDATE,{revision:n.parentRevision,newRevision:n.newRevision}),this.onContainsItems(this._aggregator.getBatch()))}async onPlaylistMessage(e){const t=e?.payloads?.[0];if(void 0===t)return;(function(e,...t){return void 0!==e.ops?.find((e=>{const n=e.updateListAttributes?.newAttributes;return void 0!==n&&t.some((e=>!1===n.noValue?.includes(e)))}))})(Zs.Lg.decode(t),Ns.Dr.LIST_NAME,Ns.Dr.LIST_COLLABORATIVE)&&this.emit($s.tD.UPDATE,null)}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),n=await this._contains(t);this.emitUpdateItems(t,n)}}}var ta=n(52898);function na(e){if(e.byteLength<4)return-1;return new DataView(e.buffer,e.byteOffset).getUint32(0)}function ia(e){return`${new DataView(e.buffer,e.byteOffset).getUint32(0)},${(0,F.U5)(e.subarray(4)).padEnd(40,"0")}`}var ra=n(55809);function sa(e,t){const n=(0,re.o_h)(e.uri,{parseUnknown:!0}),i=t.contents?.items?.findIndex((e=>(0,ta.B2)(n,(0,re.o_h)(e.uri,{parseUnknown:!0}))));return i??-1}const aa={revision:new Uint8Array,length:0,attributes:void 0,contents:void 0,diff:void 0,syncResult:void 0,resultingRevisions:[],multipleHeads:!1,upToDate:!1,nonces:[],timestamp:"",ownerUsername:"",abuseReportingEnabled:!1,capabilities:void 0,geoblock:[],changesRequireResync:!1,createdAt:"",appliedLenses:void 0},oa={type:"folder",uri:"",addedAt:null,name:"",items:[],hash:"",rawItemCount:0};class la{_cache=null;_decorationCache=new j.fq(3e5);_fetchContentsPromise=null;_applyChangesPromise=null;constructor(e,t,n,i){this._builder=e,this._username=n,this._isAnonymous=i,this._events=new ea(t,this.contains.bind(this)),this._events.addListener($s.tD.UPDATE,(e=>{null!==e.data&&null!==this._cache?this.fetchContents(e.data.newRevision):this._cache=null}))}getCapabilities(){return{canSort:!1,canFilter:!1,canModifyOffline:!1}}getUsername(){if(null===this._username)throw new Error("RootlistAPI is not available for anonymous users!");return this._username}async fetchContents(e=null){if(this._fetchContentsPromise)return await this._fetchContentsPromise;if(this._isAnonymous)return Promise.resolve({data:aa,tree:oa});const t=this.getUsername();return(null===this._cache||null!==e&&na(e)>na(this._cache.data.revision))&&(this._fetchContentsPromise=new Promise(((n,i)=>{(async function(e,t,n=null){const i=await e.build().withHost(M.eX).withMethod("GET").withPath(`/user/${encodeURIComponent(t)}/rootlist`).withEndpointIdentifier("/user/{username}/rootlist").withoutMarket().withQueryParameters({decorate:"revision,length,attributes,timestamp,owner",...null!==n?{revision:ia(n)}:{bustCache:Date.now()}}).send();return Ns.jB.fromJSON(i.body)})(this._builder,t,e).then((e=>{if(function(e){return void 0!==e.revision}(e)){const i=new Ys.IJ(t).build(e);n({data:e,tree:i})}else i(new Error("Response is missing revision!"))})).catch(i)})).finally((()=>{this._fetchContentsPromise=null})),this._cache=await this._fetchContentsPromise),this._cache}async applyChanges(e){if(null!==this._applyChangesPromise)throw new Error("Refusing to apply multiple deltas at the same time!");return this._applyChangesPromise=async function(e,t,n){const i=await e.build().withMethod("POST").withHost(M.eX).withPath(`/user/${encodeURIComponent(t)}/rootlist/changes`).withEndpointIdentifier("/user/{username}/rootlist/changes").withoutMarket().withJsonContentType().withBody(Ns.Qm.toJSON(n)).send();return Ns.jB.fromJSON(i.body).revision??null}(this._builder,this.getUsername(),e).then((async e=>{await this.fetchContents(e)})).finally((()=>{this._applyChangesPromise=null})),this._applyChangesPromise}async waitForPendingChanges(){this._applyChangesPromise&&await this._applyChangesPromise}async getRootNode(){const{tree:e}=await this.fetchContents();return e}async getFolderNode(e){if(!e.folderUri)throw new Error("Folder URI not provided!");const t=await this.getRootNode(),n=(0,Ys.N7)(t,e.folderUri);if(null===n)throw new Error("Folder not found!");return n}emitUpdate(){this._events.emit($s.tD.UPDATE,null)}getEvents(){return this._events}async getMetadata(){await this.waitForPendingChanges();const e=[...(await this.getRootNode()).items];let t=0,n=0;for(;e.length>0;){const i=e[0];(0,Fs.sA)(i)?e.push(...i.items):((0,Fs.Af)(i)&&i.isOwnedBySelf&&t++,n++),e.shift()}return{ownedPlaylistCount:t,playlistCount:n}}async getContents(e){await this.waitForPendingChanges();const t=await(e?.folderUri?this.getFolderNode(e):this.getRootNode());let n;if(e?.flatten){const e=(0,Ys.dG)(t);n={...e,totalItemCount:e.items.length}}else n={...t,totalItemCount:t.items.length};const i=e?.offset??0,r=e?.limit?i+e.limit:void 0;return n.items=n.items.slice(i,r),e?.decorateImagesAndOwner&&await(0,ra.k)(this._builder,this._decorationCache,(0,Ys.sh)(n)),n}async renameFolder(e,t){const[n]=(0,ta.nK)({folderUri:e.uri,name:t}),[i]=(0,ta.nK)({name:t}),[r]=(0,ta.nK)({folderUri:e.uri}),s=(new qs.a).add([i],{before:{uri:r}}).remove([{uri:r}]).add([n],{before:{uri:i}}).remove([{uri:i}]).buildListChanges();await this.applyChanges(s),this.emitUpdate()}async createFolder(e,t){if(!this._username)throw new Error("Cannot create a folder if not logged in");const n=(0,ta.Yu)(8),i=(0,ta.p0)(this._username,n,e),r=(new qs.a).add((0,ta.nK)({name:e,hash:n}),t).buildListChanges();return await this.applyChanges(r),this.emitUpdate(),{uri:i}}async moveFolder(e,t){const{data:n}=await this.fetchContents(),i=await this.getFolderNode({folderUri:e.uri}),r=sa(e,n),s=function(e,t){const{before:n,after:i}=e,{length:r}=t;return void 0===n==(void 0===i)?-1:"start"===n?0:"end"===i?void 0===r?Number.NaN:r:n?sa(n,t):i?sa(i,t)+1:-1}(t,n),a=i.rawItemCount;if(s>=r&&se.uri)));return e.map((e=>i.has(e)))}containsSync(e){const t=this._cache?.data.contents?.items;return t?void 0!==t.find((t=>t.uri===e)):void 0}async getPublishedState(e){await this.waitForPendingChanges();const t=await this.getRootNode(),n=(0,Ys.q1)(t,e);return!(!n||!(0,Fs.Af)(n))&&n.isPublished}async setPublishedState(e,t){const n=(new qs.a).updateItemAttributes({newAttributes:{values:{public:t}},item:{uri:e}}).buildListChanges();await this.applyChanges(n),this.emitUpdate()}}class ca{_cache=new j.fq;get(e){return this._cache.get(e)??null}update(e,t,n){const i=na(n),r=this._cache.get(e);if(void 0===r||i>r.sequenceNumber){const n={...r,...Object.fromEntries(Object.entries(t).filter((([,e])=>void 0!==e))),sequenceNumber:i};return this._cache.set(e,n),n}return r}}var ua=n(40294);const da=new Wn.l("accountAttributes","query","4fbd57be3c6ec2157adcc5b8573ec571f61412de23bbb798d8f6a156b7d34cdf",null);class pa{_subs=new Set;_inFlightCache=new j.od;_cache=new j.fq(36e5);constructor(e,t,n){this._request=e,this._pubsub=t,this._isAnonymous=n,this._pubsub.subscribe({ident:"spotify:user:attributes:mutated",onMessage:async()=>{const e=await this.fetchProductState();this._cache.set("productState",e);for(const t of this._subs)try{t(e)}catch(n){console.error(`Subscriber ${t} throw when receiving product state ${e}`,n)}}})}async _fetchProductState(e){const t=await e(da,{}),n=t?.data?.me?.account,i=n?.attributes;if(!n||!i)return Promise.reject("Failed fetching account attributes!");const r=n.country??void 0,s=n.product?.toLowerCase()??void 0,a=i.onDemand??void 0,o=i.catalogue?.toLowerCase()??void 0,l=i.dsaModeEnabled??void 0,c=i.dsaModeAvailable??void 0,u=i.optInTrialPremiumOnlyMarket??void 0,d=i.multiUserPlanCurrentSize??void 0,p=i.multiUserPlanMemberType??void 0;return{country:r,catalogue:o,product:s,"on-demand":a?"1":"0","dsa-mode-enabled":l?"1":"0","dsa-mode-available":c?"1":"0","opt-in-trial-premium-only-market":u?"1":"0","multiuserplan-current-size":d?.toString(),"multiuserplan-member-type":p}}async fetchProductState(){return this._inFlightCache.create("fetchProductAttributes",(()=>this._fetchProductState(this._request)))}async getValues(){if(this._isAnonymous)return{};const e=this._cache.get("productState");if(e)return e;const t=await this.fetchProductState();return this._cache.set("productState",t),t}getCachedValues(){return this._cache.get("productState")??null}subValues(e){return this._subs.add(e),()=>{this._subs.delete(e)}}async setValues(e){}}var ma=n(53249),ha=n(30561),fa=n(19096);function ga(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ea(e,t){return new fa.j((t=>function(e,t){const n=e=>t(e.data.id);return e.addListener(ha.TransportEvent.CONNECTION_ID,n),{cancel:()=>{e.removeListener(ha.TransportEvent.CONNECTION_ID,n)}}}(e,t)),((t,n,i)=>function(e,t,n,i){const r=e=>i({ident:e.uri,timestamp:Date.now(),attributes:e.headers??{},payloads:e.payloads?.map((e=>{const t=e;try{return(0,F.tX)(t)}catch{return(0,F.sH)(t)}}))??[]}),s=new RegExp(n?`^${ga(t)}`:`^${ga(t)}$`);return e.matchMessages(s,r,ha.DEALER_PLUGIN_NAME),{cancel:()=>{e.unmatchMessages(s,r,ha.DEALER_PLUGIN_NAME)}}}(e,t,n,i)),t)}var _a=n(35008);const ya=new Wn.l("fetchEntitiesForRecentlyPlayed","query","fc1a9b5bfe89fd630191cf9c7de056ac66d137d9d52b1f5f43b548b4d187f85f",null);async function va(e,t){if(0===t.length)return[];const n=(await e(ya,{uris:t}))?.data?.lookup;if(!(0,wi.P)(n)||void 0===n)throw new Error(`Error fetching entities for URIs [${t}]`);if(1===n.length&&"PlaylistResponseWrapper"===n[0].__typename&&"NotFound"===n[0].data.__typename)throw new Error(`Error fetching entities for URIs [${t}]`);return function(e,t){const n=e.map((e=>{if("UnknownTypeWrapper"===e.__typename)return null;if("PreReleaseResponseWrapper"===e.__typename)return null;const n=e.data;switch(n.__typename){case"Album":return{_uri:e._uri,type:t||_a.d2.ALBUM,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],artists:n.artists.items.map((e=>({uri:e.uri,name:e.profile.name})))};case"Track":return{_uri:e._uri,type:_a.d2.TRACK,uri:n.uri,name:n.name,images:n.albumOfTrack?.coverArt?.sources??[],artists:n.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))),isExplicit:n.contentRating?.label===Xn.x7.Explicit,isMOGEFRestricted:n.contentRating?.label===Xn.x7.NineteenPlus};case"Playlist":if("User"!==n.ownerV2.data.__typename)throw new Error(`Error fetching playlist owner for URI ${n.uri}`);return{_uri:e._uri,type:t||_a.d2.PLAYLIST,uri:n.uri,name:n.name,images:n.images.items.at(0)?.sources??[],description:n.description??"",owner:{uri:n.ownerV2.data.uri,displayName:n.ownerV2.data.name??n.ownerV2.data.username??""},attributes:n.attributes??[]};case"Podcast":return{_uri:e._uri,type:_a.d2.SHOW,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],publisher:n.publisher?.name??""};case"Audiobook":return{_uri:e._uri,type:_a.d2.AUDIOBOOK,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],authors:n.authors?.map((e=>e?.name??""))??[],signifierText:n.accessInfo?.signifier?.text,consumptionCapExplanation:(0,Ui.e)(n.accessInfo),isPlayable:n.accessInfo?.isUserMemberOfAtLeastOneGroup??!1};case"Artist":return{_uri:e._uri,type:t||_a.d2.ARTIST,uri:n.uri,name:n.profile.name,images:n.visuals.avatarImage?.sources??[]};case"Episode":if("Podcast"!==n.podcastV2.data.__typename)throw new Error(`Error fetching show entity for URI ${e._uri}`);return{_uri:e._uri,type:_a.d2.SHOW,uri:n.podcastV2.data.uri,name:n.podcastV2.data.name,images:n.podcastV2.data.coverArt?.sources??[],publisher:n.podcastV2.data.publisher?.name??""};case"Chapter":if("Audiobook"!==n.audiobookV2.data.__typename)throw new Error(`Error fetching show entity for URI ${e._uri}`);return{_uri:e._uri,type:_a.d2.AUDIOBOOK,uri:n.audiobookV2.data.uri,name:n.audiobookV2.data.name,images:n.audiobookV2.data.coverArt?.sources??[],authors:n.audiobookV2.data.authors?.map((e=>e?.name??""))??[],isPlayable:n.audiobookV2.data.accessInfo?.isUserMemberOfAtLeastOneGroup??!1,signifierText:n.audiobookV2.data.accessInfo?.signifier?.text};default:return null}})).filter(wi.P);return n}(n)}async function ba(e,t){const n=[],i=[];t.forEach((e=>{switch(!0){case(0,re.Z0m)(e):n.push(e);break;case(0,re.t9X)(function(e){return(0,re.Cfh)(e)?(0,re.Ftz)(["playlist",(0,re.o_h)(e)?.args]).toURI():e}(e)):break;default:i.push(e)}}));const r=function(e){return e.map((e=>({type:e.endsWith("your-episodes")?_a.d2.YOUR_EPISODES:_a.d2.LIKED_SONGS,uri:e,_uri:e})))}(n);return[...await va(e,i),...r]}async function Sa(e,t){const n=t.map((e=>e.uri)),i=(await ba(e,n))?.map((e=>{const n={...e,timestampMs:t.find((t=>t.uri===e._uri))?.lastPlayedTime};return delete n._uri,n})).filter(wi.P);return i}async function Aa(e,t){return(await e.build().withMethod("GET").withHost(M.qE).withPath(`/user/${encodeURIComponent(t)}/recently-played`).withQueryParameters({format:"json",offset:0,limit:50,filter:"default,collection-new-episodes"}).withEndpointIdentifier("/user/{userId}/recently-played").send()).body}function Ca(e,t){return Array.from(e.concat(t??[]).reduce(((e,t)=>{let n=t.uri;(0,re.iwx)(n)&&(n=(0,re.Pse)((0,re.o_h)(n).id).toURI());const i=e.get(n);return(void 0===i||i.timestampMst.timestampMs-e.timestampMs))}class Ta extends _a.K5{_localContexts=[];_remoteContexts=null;_inFlightCache=new j.od;_listeners=0;_shouldRefresh=!1;_lastContextURI=null;static REMOTE_CONTEXTS_CACHE_KEY="remote-contexts";constructor(e,t,n,i,r){super(),this._request=t,this._builder=n,this._username=i,this._events=r,this._events.onAddListener(_a.m5.UPDATE,(()=>{this._listeners++})),this._events.onRemoveListener(_a.m5.UPDATE,(()=>{this._listeners--})),window.addEventListener("visibilitychange",this.onVisibilityChange),window.addEventListener("online",this.onOnlineChange),e.getEvents().addListener(se.gd.UPDATE,(({data:e})=>{this.onPlayerStateUpdate(e)}))}onVisibilityChange=()=>{document.hidden||(0!==this._listeners?this.refresh():this._shouldRefresh=!0)};onOnlineChange=()=>{navigator.onLine&&(0!==this._listeners?this.refresh():this._shouldRefresh=!0)};removeGlobalListeners(){window.removeEventListener("visibilitychange",this.onVisibilityChange),window.removeEventListener("online",this.onOnlineChange)}async onPlayerStateUpdate(e){const t=e?.context.uri??null;if(null===t||t===this._lastContextURI)return;this._lastContextURI=t;const n=this._localContexts.findIndex((e=>e.uri===t));if(-1!==n){const[e]=this._localContexts.splice(n,1);this._localContexts.unshift({...e,timestampMs:Date.now()})}else{const[e]=await this._inFlightCache.create(t,(()=>Sa(this._request,[{uri:t,lastPlayedTime:Date.now()}])));e&&this._localContexts.unshift(e)}const i=Ca(this._localContexts,this._remoteContexts??[]);this._events.emit(_a.m5.UPDATE,i)}async refresh(){if(null===this._username)return;const e=this._username,t=await this._inFlightCache.create(Ta.REMOTE_CONTEXTS_CACHE_KEY,(()=>async function(e,t,n){const[i]=[await Aa(e,n)];return await Sa(t,i.playContexts)}(this._builder,this._request,e)));this._remoteContexts=t.filter(wi.P);const n=Ca(this._localContexts,this._remoteContexts);this._events.emit(_a.m5.UPDATE,n)}getContexts(){return(null===this._remoteContexts||this._shouldRefresh)&&(this._shouldRefresh=!1,this.refresh()),0===this._localContexts.length&&null===this._remoteContexts?null:Ca(this._localContexts,this._remoteContexts??[])}getEvents(){return this._events}}var Ia=n(77407),Oa=n(28735),wa=n(1956);const Na=(0,Oa.Tw)(wa.pn).addMiddleware(wa.m4).addMiddleware(Ia.li).addMiddleware(wa.If).addMiddleware(wa.u0);var Ra=n(96057);const Pa=new Wn.l("queryShowAccessInfo","query","ea20dcdf5d3e1a0b0c3c2086659827e1a2c2ef637d6578834be648a5e3da44f4",null),La=new Wn.l("queryShowAccessInfoWithGatedPodcastsRelations","query","ea20dcdf5d3e1a0b0c3c2086659827e1a2c2ef637d6578834be648a5e3da44f4",null),Da=new Wn.l("queryShowMetadataV2","query","8ecbb8477e896c28ef9fd1afa521b253b2ab817387fd13f2be6cc8874bf2aa06",null),ka=new Wn.l("queryShowMetadataV2WithGatedEntityRelations","query","8ecbb8477e896c28ef9fd1afa521b253b2ab817387fd13f2be6cc8874bf2aa06",null);var xa=n(41031);const Ua=new Wn.l("queryBookChapters","query","9879e364e7cee8e656be5f003ac7956b45c5cc7dea1fd3c8039e6b5b2e1f40b4",null),Ma=new Wn.l("getEpisodeOrChapter","query","64da4fea3a7c4f6bef79aa85b96ba995397b8866dfef5d9e455d1a161437c1c0",null),Ba=new Wn.l("getEpisodeOrChapterWithGatedEntityRelations","query","64da4fea3a7c4f6bef79aa85b96ba995397b8866dfef5d9e455d1a161437c1c0",null),ja=new Wn.l("queryPodcastEpisodes","query","5989878c374a6c5d0fec1860968490efda78be6c4128cfedb0595be15785c68e",null),Fa=new Wn.l("queryPodcastEpisodesWithGatedEntityRelations","query","5989878c374a6c5d0fec1860968490efda78be6c4128cfedb0595be15785c68e",null);var Va=n(41833),Ga=n(36416),Ha=n(91742),Wa=n(48076);class za{capabilities={canSort:!1,canFilter:!1,canGetDefaultSort:!1,canGetShowPlayedState:!1,canMarkAsFinished:!1};constructor(e,t,n,i,r=!1){this._request=e,this._isAnonymous=t,this._builder=n,this._pubSubAPI=i,this._isGatedPodcastsEnabled=r,this._events=new Ga.r,(0,Wa.t)(this._pubSubAPI,this._onShowAccessUpdate.bind(this))}async getMetadata(e){const t=await(async(e,t,n=!1)=>{const i=await e(n?ka:Da,{uri:t});if("RestrictedContent"===i?.data?.podcastUnionV2.__typename)throw new Error(xa.Xz.RestrictedContent);if("Podcast"===i?.data?.podcastUnionV2?.__typename||"Audiobook"===i?.data?.podcastUnionV2?.__typename)return i.data.podcastUnionV2;throw new Error(xa.Xz.Generic)})(this._request,e,this._isGatedPodcastsEnabled);return(0,xi.pE)(t,this._isAnonymous)}async getBookContents(e,t){const n=await(async(e,t,n,i)=>{const r=await e(Ua,{uri:t,offset:n,limit:i});if("Audiobook"===r?.data?.podcastUnionV2?.__typename&&"ContextChapterPage"===r?.data.podcastUnionV2.chaptersV2?.__typename)return r.data.podcastUnionV2.chaptersV2;throw new Error("Error while requesting the chapters")})(this._request,e,t.offset,t.limit);return(0,xi.el)(n,this._isAnonymous)}async getContents(e,t){const n=await(async(e,t,n,i,r=!1)=>{const s=await e(r?Fa:ja,{uri:t,offset:n,limit:i});if("Podcast"===s?.data?.podcastUnionV2?.__typename&&"ContextEpisodePage"===s?.data?.podcastUnionV2.episodesV2?.__typename)return s.data.podcastUnionV2.episodesV2;throw new Error("Error while requesting the show episodes")})(this._request,e,t.offset,t.limit,this._isGatedPodcastsEnabled);return(0,xi.Wt)(n)}async getEpisodeOrChapter(e){const t=await(async(e,t,n=!1)=>{const i=await e(n?Ba:Ma,{uri:t});if("Episode"===i?.data?.episodeUnionV2?.__typename||"Chapter"===i?.data?.episodeUnionV2?.__typename)return i.data.episodeUnionV2;throw new Error("Error while requesting the episode or chapter")})(this._request,e,this._isGatedPodcastsEnabled);return(0,xi.Ar)(t,this._isAnonymous)}async updateUserRating(e,t){const n=await(0,Ha.p)(this._builder,e,t);return this._events.emit(Ga.K.UPDATE_RATING,{uri:e}),n}getPlayerSort(){return""}getPlayerFilter(){return""}async getAccessInfo(e){const t=await(async(e,t,n)=>{const i=await e(n?La:Pa,{uri:t});return"Audiobook"===i?.data?.podcastUnionV2.__typename||"Podcast"===i?.data?.podcastUnionV2.__typename?i.data.podcastUnionV2:null})(this._request,e,this._isGatedPodcastsEnabled);return(0,xi.Te)(t)}async checkoutBook(e){return await(0,Va.S)(e)}async getShowPlayedState(){return null}async invalidateShowMetadataCaches(){}async markShowPlayedLegacy(){}getEvents(){return this._events}async _onShowAccessUpdate(e){for(const t of e)this._events.emit(Ga.K.UPDATE_SHOW_ACCESS,{uri:t})}}var Ka=n(24549),Ya=n(23289),qa=n(11336),$a=n(71581),Za=n(16581),Qa=n(32781);const Ja=new Wn.l("centralisedStatePlayerOptions","query","e2dcfcab470854d4d1c7cb1a851438f14fe0a94d57db7f0b9dde492559d5395d",null),Xa={[Ya.j.OFF]:ve.jb.OFF,[Ya.j.ON]:ve.jb.ON,[Ya.j.SMART_SHUFFLE]:ve.jb.SMART};class eo{_isDsaEnabled=!1;_inFlightShuffleFieldsCache=new j.od;_shuffleFieldsCache=new j.GG(36e5,36e5);constructor(e,t,n,i,r,s){this._loader=e,this._harmony=t,this._player=n,this._connectDevicesAPI=i,this._productStateApi=r,this._pubSubAPI=s,this._events=new qa.L,(0,$a.w)(this._productStateApi,(e=>{this._isDsaEnabled=e})),(0,Qa.Q)(this._pubSubAPI,(async(e,t)=>{this._shuffleFieldsCache.delete(e),this._events.emitUpdateShuffleModeSync(e,t)}))}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();if(this._isContextUriActiveInPlayerState(e,t))return this._getAvailableShuffleModesFromPlayerState(t);const n=await this._getPlayerOptions(e);return n?this._getAvailableShuffleModesFromPlayerOptions(n):[Ya.j.OFF]}async getShuffle(e){const t=this._player.getState();if(this._isContextUriActiveInPlayerState(e,t))return this._getShuffleFromPlayerState(t);const n=await this._getPlayerOptions(e);return n?this._getShuffleFromPlayerOptions(n):Ya.j.OFF}async setShuffle(e,t){if(t===Ya.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");if(this._events.emitUpdateShuffleModeSync(e,t))return;const n=(await this._getLocalDevice())?.id??null;await(this._harmony?.setShuffleMode(Xa[t],n,{contextURI:e})),this._shuffleFieldsCache.delete(e),this._events.emitUpdateShuffleModeCompleteSync(e,t)}_getShuffleFromPlayerState(e){return e?.shuffle&&e?.smartShuffle?Ya.j.SMART_SHUFFLE:e?.shuffle?Ya.j.ON:Ya.j.OFF}_getShuffleFromPlayerOptions(e){const{shufflingContext:t,modes:n}=e,i="RECOMMENDATION"===n.find(to)?.modeValue;return t?i?Ya.j.SMART_SHUFFLE:Ya.j.ON:Ya.j.OFF}_getAvailableShuffleModesFromPlayerState(e){return[!e.shuffle||e.restrictions.canToggleShuffle?Ya.j.OFF:null,e.smartShuffle||e.restrictions.canToggleSmartShuffle?Ya.j.SMART_SHUFFLE:null,e.shuffle||e.restrictions.canToggleShuffle?Ya.j.ON:null].filter(wi.P)}_getAvailableShuffleModesFromPlayerOptions(e){const{shufflingContext:t,modes:n,restrictions:i}=e,r=this._getShuffleFromPlayerOptions(e),s=!i?.disallowTogglingShuffleReasons.length,a="RECOMMENDATION"===n.find(to)?.modeValue,o=i?.disallowSettingModes.find(to),l=!o?.modeRestrictions.find((({modeValue:e,reasons:t})=>"RECOMMENDATION"===e&&t.length)),c=!o?.modeRestrictions.find((({modeValue:e,reasons:t})=>"NONE"===e&&t.length)),u=[];return r!==Ya.j.OFF&&(t&&!s||a&&!c)||u.push(Ya.j.OFF),r!==Ya.j.ON&&(!t&&!s||a&&!c)||u.push(Ya.j.ON),(r===Ya.j.SMART_SHUFFLE||(t||s)&&l)&&u.push(Ya.j.SMART_SHUFFLE),u}async _waitForConnectDevices(){let e=()=>{};const t=new Promise((t=>{e=this._connectDevicesAPI.getEvents().addListener(Tn.P.UPDATE,(e=>{e.data&&t(e.data.devices)}))})),n=new Promise((e=>setTimeout((()=>e(null)),5e3))),i=await Promise.race([t,n]);return e(),i}async _getLocalDevice(){const e=this._connectDevicesAPI.getDevices();return e?.find((e=>e.isLocal))??(await this._waitForConnectDevices())?.find((e=>e.isLocal))??null}async _getPlayerOptions(e){const t=this._shuffleFieldsCache.get(e);if(t)return t;const n=await this._getLocalDevice();if(!n)return null;const i=await this._inFlightShuffleFieldsCache.create(e,(async()=>{const t=await this._loader(Ja,{uri:e,deviceInfo:{deviceId:n.id,deviceType:n.type,clientId:"65b708073fc0480ea92a077233ca87bd",clientVersion:"1.2.55.235.g5eaa0904",productId:"1"}});return"PlayerOptions"===t?.data?.playerOptions.__typename?t.data.playerOptions:null}));return i&&this._shuffleFieldsCache.set(e,i),i}_isContextUriActiveInPlayerState(e,t){return!!t?.context&&(0,Za.b8)(e,t.context.uri)}}function to({modeKey:e}){return"context_enhancement"===e}var no=n(81861),io=n(32257),ro=n(31106),so=n(40535),ao=n(74147);class oo{_isDsaEnabled=!1;constructor(e,t,n,i,r,s,a){this._player=e,this._contextualShuffle=t,this._smartShuffleEligibility=n,this._connectDevicesAPI=i,this._productStateAPI=r,this._isSmartShuffleEnabled=s,this.isNewShuffleModeOrderEnabled=a,this._events=new qa.L,(0,$a.w)(this._productStateAPI,(e=>{this._isDsaEnabled=e,e&&(0,ao.Z)(this._player,this)})),this._isSmartShuffleEnabled&&(0,so.V)(this._contextualShuffle,this.#i.bind(this),this._events)}async#i(e,t){const n=this._player.getState(),i=n?.context.uri,r=t===Ya.j.SMART_SHUFFLE;if(i&&(0,Za.b8)(e,i)){const e=(0,no.C)(t);this._player.getState()?.shuffle!==e&&await this._player.setShuffle(e),this._connectDevicesAPI.getActiveDevice()?.isLocal&&await this._player.updateContext(null,{uri:(0,nt.f)(i,r),metadata:{...n.context.metadata,enhanced_context:r?"true":void 0}})}}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();return(0,ro.B)(e,t?.context.uri,!1!==t?.restrictions.canToggleShuffle,(()=>this._smartShuffleEligibility.getEligibility(e).then((({canSmartShuffle:e})=>e))),this.isNewShuffleModeOrderEnabled)}async getShuffle(e){const t=this._player.getState(),n=t?.context.uri;let i=await this._contextualShuffle.getContextualShuffleMode(e);return(0,Za.b8)(e,n)&&(i=(0,io.l)(t)??i),i===Ya.j.SMART_SHUFFLE&&this._isDsaEnabled?Ya.j.ON:i}async setShuffle(e,t){if(this._events.emitUpdateShuffleModeSync(e,t),t===Ya.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");await this._contextualShuffle.setContextualShuffleMode(e,t)}}var lo=n(90862);class co{getCapabilities(){return{isSupported:!1}}async setVocalVolume(e){}async setStatus(e){}async getStatus(){return lo.nW.DISABLED}}var uo=n(13569);const po=new Wn.l("smartShuffle","query","3384085be84fbf2f855b024f99bc06cded1c0fd71af3a8fb8abb84e9656faba2",null);class mo{_smartShuffleEligibilityCache=new j.fq(864e5);constructor(e){this._request=e}async getEligibility(e){const t=this._smartShuffleEligibilityCache.get(e);if(void 0!==t)return t;const n=await this._request(po,{uris:[e]}),i=n?.data?.lookup.at(0),r=i&&"data"in i&&"smartShuffle"in i.data?i.data.smartShuffle:{available:null,uri:null},s={canSmartShuffle:r?.available??!1,lensUri:r?.uri||e};return this._smartShuffleEligibilityCache.set(e,s),s}}var ho=n(35685),fo=n(11837),go=n(85856),Eo=n(56394),_o=n(76562),yo=n(6530),vo=n(8046);class bo extends vo.M{subscribeToUpdates(){}unsubscribeToUpdates(){}subscribeToMessages(){}unsubscribeToMessages(){}}class So{constructor(e){this.transport=e}onConnected(e){this.transport.on(ha.TransportEvent.CONNECTED,e),this.transport.on(ha.TransportEvent.RECONNECTED,e)}async getSessionInfo(e){const{body:t}=await this.transport.request(`@webgate/social-connect/v2/sessions/info/${e}`,{responseType:"json"});return t}async fetchCurrentSession(){return null}async createSession(){return null}async leaveSession(){return!1}async deleteSession(){return!1}async joinSession(){return null}async removeSessionMember(){return null}async kickAllParticipants(){return null}async setQueueOnlyMode(){return null}async setParticipantVolumeControl(){return null}async setBroadcastStatus(){return null}}class Ao{constructor(e=yo.lz.UNKNOWN){this.jamExperience=e}getJamExperience(){return this.jamExperience}addListener(e){return()=>{}}}var Co=n(51975);var To=n(17206),Io=n(67902),Oo=n(88319),wo=n(78118),No=n(47547);class Ro{name="allow-offline-requests";constructor(){this.onBeforeProcessRequest=this.onBeforeProcessRequest.bind(this)}onBeforeProcessRequest(e){const{data:t}=e;t.options?.metadata?.noRequestTransform||navigator.onLine||(t.options=(0,No.K)(t.options,{allowOffline:!0,authorize:!1}))}attach(e,t){t.on(ha.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest)}detach(e,t){t.removeListener(ha.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest)}}function Po(){return new Ro}function Lo(e,t){const n=(0,wo.F)(ha.createBaseTransport,(0,Oo.M)(),e,t.transportOptions);return t.useDealer&&n.addPlugin(To.kJ,{WebSocket}),n.addPlugin(Po),n.addPlugin(Io.dW,function(e){const t=pe().getParser(window.navigator.userAgent),n=t.getPlatform();let i;switch(n.type){case pe().PLATFORMS_MAP.mobile:i="smartphone";break;case pe().PLATFORMS_MAP.tablet:i="tablet";break;case pe().PLATFORMS_MAP.desktop:i="computer";break;case pe().PLATFORMS_MAP.tv:i="tv";break;default:i=void 0}return{clientInfo:{clientID:"65b708073fc0480ea92a077233ca87bd",clientVersion:"1.2.55.235.g5eaa0904",os:t.getOSName(!0)??"unknown",osVersion:t.getOSVersion()??"unknown",deviceBrand:n.vendor??"unknown",deviceModel:n.model??"unknown",containerVersion:void 0,deviceID:e.deviceId,deviceType:i,platformIdentifier:void 0}}}(t.clientInfoOptions)),n.on(ha.TransportEvent.CONNECTED,(()=>{n.isAuthenticated()||n.authenticate()})),n.on(ha.TransportEvent.DISCONNECTED,(()=>{n.connect()})),n.connect(),n}var Do=n(52429),ko=n(57361),xo=n(22167),Uo=n(83669);const Mo=new Wn.l("profileAttributes","query","53bcb064f6cd18c23f752bc324a791194d20df612d8e1239c735144ab0399ced",null);class Bo{_inFlightCache=new j.od;constructor(e,t){this._request=e,this._isAnonymous=t}async getUser(){if(this._isAnonymous)return null;return(await this._inFlightCache.create("fetchProfileAndAccountAttributes",(()=>(async e=>{const t=await e(Mo,{}),n=t?.data?.me?.profile??null;return null===n?Promise.reject("Failed fetching account attributes!"):{user:{type:Ue.c.USER,uri:n.uri,username:n.username,displayName:n.name,images:n.avatar?.sources??[],avatarBackgroundColor:n.avatarBackgroundColor??0}}})(this._request)))).user}}function jo(e){return null===e?new xn:new Cn(e)}async function Fo(e){const t="65b708073fc0480ea92a077233ca87bd",n="1.2.55.235.g5eaa0904",h=(0,li.I)(),f=Ot(),{translations:g,locale:E}=await async function(){const e=document.head.querySelector(`link[${St}]`),t=e.getAttribute("href"),n=e.getAttribute(St),i=new AbortController,r=setTimeout((()=>i.abort()),bt),s=await fetch(t,{signal:i.signal}).then((e=>e.json())).catch((()=>({})));return clearTimeout(r),{translations:s,translationsUrl:t,locale:n}}();a.Ru.initialize({localeForTranslation:E,localeForFormatting:E,translations:g});const _=(0,ye.C)("session"),y=(0,ye.C)("config"),v=(0,ye.C)("features"),R=(0,ye.C)("seo"),k=r.Vk.fromJSON((0,ye.x)("remote-configuration")),{correlationId:x}=y,U={accessToken:_.accessToken,accessTokenExpirationTimestampMs:_.accessTokenExpirationTimestampMs,isAnonymous:_.isAnonymous,market:_.isAnonymous?y.market:"from_token",locale:E,valid:!0};h.registerFactory(rn.T,(e=>new un(nn,(0,ye.C)("session")))),h.registerFactory(tn.X,(e=>new on(e.resolve(rn.T)))),h.registerFactory(oe.sD,(e=>Lo(e.resolve(rn.T),{useDealer:!_.isAnonymous,clientInfoOptions:{deviceId:x}}))),(0,ie.K)(h.resolve(oe.sD),U,n,f.app_platform),h.registerFactory(oe.Fi,(()=>(0,i.zR)())),h.registerValue($t.z,qt.n.getInstance()),h.registerFactory(Wr.v,(e=>new es(e.resolve($t.z)))),h.registerFactory(fi.zk,(e=>(0,fi.lY)(e.resolve($t.z)))),h.registerFactory(hi.o,(e=>(0,hi.q)(e.resolve(fi.zk)))),h.registerFactory(Uo.L,(e=>new Bo(e.resolve(fi.zk),_.isAnonymous))),h.registerFactory(ua.c,(e=>{const t=Ea(e.resolve(oe.sD),!1);return new pa(e.resolve(fi.zk),t,_.isAnonymous)}));const M=h.resolve(Uo.L),B=h.resolve(ua.c),[j,F,V]=await Promise.all([M.getUser(),B.getValues(),At()]),W=j?.username??null,Y=W??"anonymous";h.registerFactory(Sr.m,(()=>new Sr.P(Y)));const q=new Na({timeout:1e4,clientId:f.remote_config_client_id,transport:h.resolve(oe.sD),eventSender:_e(h.resolve(oe.sD),t,x,(()=>W),`${t}-web-player-rc`,!1),initialConfiguration:k}),$=function(){const e=(0,wt.v8)("client-web_remote-config-overrides")||"";try{return r.Vk.fromJSON(JSON.parse(e)["web-player"]||{})}catch(e){return r.Vk.builder().build()}}(),Z=await q.resolve({auth:null!==j}),de=r.Vk.merge(Z,$),pe=(0,kt.s)(h.resolve(Sr.m)),fe=r.Vk.merge(Z,$,pe);h.registerFactory(gi.$,(()=>new gi.E(Y))),h.registerFactory(ma.b,(e=>{const t=fe.getValue(Yt.DHV);return Ea(e.resolve(oe.sD),t)})),h.registerFactory(K.u,(e=>new Q(e.resolve(Sr.m)))),h.registerFactory(K.u,(e=>new Q(e.resolve(Sr.m))));const ge=(0,Dn.u)("PlayerSDK");h.registerFactory(ge,(t=>{const n=t.resolve(K.u),i=fe.getValue(Ht.AM);return function(e,{isAnonymous:t,type:n,createPlayer:i}){if(t)return{harmony:null,overture:(0,rt.ds)(e,{platform_identifier:(0,rt.F7)(n),config:{preinitMediaElement:!1,enableWithoutEME:!0,unauthenticatedLogs:!0,videoPlayerContainer:".VideoPlayer__container",audioPlayerContainer:".VideoPlayer__container"},autoActivateElement:!0})};return{harmony:(0,Ne.nD)(e,{platformIdentifier:(0,Ne.F7)(n),createPlayer:i,playerContainerManager:vt}),overture:null}}(t.resolve(oe.sD),{isAnonymous:_.isAnonymous,type:e===ce.m.PWA?"desktopInstall":"desktop",createPlayer:e=>{const t=document.createElement(e);return n.isSupported()&&i&&n.connectAudioProcessor(t),t}})})),h.registerFactory(Pe.I,(e=>new Vn.C(e.resolve(gi.$)))),h.registerFactory(te.W,(e=>new ee.P(e.resolve(ss.H),e.resolve(ts.B)))),h.registerFactory(uo.z,(e=>new mo(e.resolve(fi.zk)))),h.registerFactory(ss.H,(e=>{const n=fe.getValue(Ht.uy),i=!1===fe.getValue(Yt.eWj);return function({harmony:e,overture:t},n,{clientId:i},r,s,a){if(null!==e)return new it(e,n,"xpui_2025-01-13_1736790015473_5eaa090",r,s,a);if(null!==t){const{correlationId:e}=(0,ye.C)("config");return _t(t,{clientId:i,correlationId:e})}throw new Error("Unable to create PlayerAPI without a Harmony or Overture instance!")}(e.resolve(ge),e.resolve(hi.o),{clientId:t},e.resolve(Pe.I),n,i)})),h.registerFactory(dn.U,(e=>{const t=fe.getValue(Ht.V1);return n=e.resolve(ge).harmony,i=t,null===n?new jn:new Nn(n,i);var n,i})),h.registerFactory(pn.r,(e=>jo(e.resolve(ge).harmony))),h.registerFactory(fn.x,(e=>{return null===(t=e.resolve(ge).harmony)?new Fn:new Rn(t);var t})),h.registerFactory(pn.r,(e=>jo(e.resolve(ge).harmony))),h.registerFactory(Pn.b_,(e=>new Pn.m5(e.resolve(Sr.m)))),h.registerFactory(Pn.Hb,(e=>e.resolve(Pn.b_))),h.registerFactory(Pn.hQ,(e=>e.resolve(Pn.b_))),h.registerFactory(kn,(e=>new Ln.k(e.resolve(Pn.hQ)))),h.registerFactory(mn.h,(e=>{const t=fe.getValue(Ht.V1),n=fe.getValue(Ht.ug);return function(e,t,n,i){return null===e?new Mn:i?new On(e,t,n):new On(e,t)}(e.resolve(ge).harmony,t,e.resolve(kn),n)})),h.registerFactory(hn.c,(e=>null===e.resolve(ge).harmony?new Bn:new wn)),h.registerFactory(Ka.X,(e=>{const t=fe.getValue(Ht.uy),n=fe.getValue(Ht.Mc);return fe.getValue(Ht.gl)?new eo(e.resolve(fi.zk),e.resolve(ge).harmony,e.resolve(ss.H),e.resolve(mn.h),e.resolve(ua.c),e.resolve(ma.b)):new oo(e.resolve(ss.H),e.resolve(Pe.I),e.resolve(uo.z),e.resolve(mn.h),e.resolve(ua.c),t,n)})),h.registerFactory(ts.B,(e=>function({harmony:e,overture:t}){if(null!==e)return new Te(e);if(null!==t)return new we(t);throw new Error("Unable to create PlaybackAPI without a Harmony or Overture instance!")}(e.resolve(ge)))),h.registerFactory(ns.Ak,(e=>new rs)),h.registerFactory(ue.P,(e=>new me)),h.registerFactory(Kt.L,(e=>new zt)),h.registerFactory(le.Z,(e=>new Nt));const Ee=(0,Dn.u)("PlaylistAttributesCache");h.registerFactory(Ee,(e=>new ca)),h.registerFactory(ni.Ho,(e=>{const t=fe.getValue(Yt.p5T),n=fe.getValue(Yt.MCN),i=fe.getValue(Yt.ihJ);return new _r(e.resolve(fi.zk),e.resolve(ma.b),e.resolve(Ee),_.isAnonymous,W,t?new Set:new Set([I.N6]),n,i)})),h.registerFactory(H.u,(()=>new z)),h.registerFactory(yr.sl,(()=>new br)),h.registerFactory(Rt.W,(()=>new Pt)),h.registerFactory(T.v,(e=>(0,C.v)(e.resolve(fi.zk)))),h.registerFactory(Fs.Yi,(e=>new la(e.resolve($t.z),e.resolve(ma.b),W,_.isAnonymous))),h.registerFactory(Bs.Ki,(e=>{const t=fe.getValue(Yt.MCN);return new Ms(e.resolve($t.z),e.resolve(fi.zk),e.resolve(ma.b),e.resolve(Ee),W,t)})),h.registerFactory(js.O,(e=>new Ks(e.resolve($t.z)))),h.registerFactory(Gn.p,(e=>new oi(e.resolve(fi.zk),e.resolve(ni.Ho),e.resolve(Bs.Ki).getEvents(),_.isAnonymous))),h.registerFactory(Ra.fZ,(e=>{const t=fe.getValue(Yt.MCN);return new za(e.resolve(fi.zk),_.isAnonymous,e.resolve($t.z),e.resolve(ma.b),t)})),h.registerFactory(xt.u,(e=>new Mt(e.resolve(Bs.Ki)))),h.registerFactory(N._,(()=>new P)),h.registerFactory(Lt.H,(()=>new Dt)),h.registerFactory(Bt.g,(()=>new jt)),h.registerFactory(X.t,(e=>new J.T(e.resolve(fi.zk)))),h.registerFactory(_a.X6,(e=>{const t=new _a.hr;return new Ta(e.resolve(ss.H),e.resolve(fi.zk),e.resolve($t.z),W,t)})),h.registerFactory(xo.p,(e=>new ko.J(e.resolve($t.z)))),h.registerFactory(oe.KM,(e=>_e(e.resolve(oe.sD),t,x,(()=>W),`${t}-web-player`,fe.getValue(Yt.p0m)))),h.registerFactory(O.JD,(e=>new w(sessionStorage,"ACTION_STORE_KEY",e.resolve(ss.H),e.resolve(ni.Ho)))),h.registerFactory(Vt.n,(e=>new Wt(e.resolve(ge).harmony,fe))),h.registerFactory(lo.qh,(()=>new co));const ve=h.resolve(ss.H),be=new Do.T(s.vR.getUBILogger({eventSender:h.resolve(oe.KM),disableAutoBackgroundMonitoring:!1,authenticationProvider:{isAuthenticated:()=>null!==j},contextualProviders:{playContextUriProvider:{getPlayContextUri:()=>ve.getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>ve.getState()?.playbackId??null}}}));h.registerFactory(L.jW,(e=>_.isAnonymous?new D:new G(e.resolve($t.z),e.resolve(ma.b),W))),h.registerFactory(o.M,(t=>(0,ne.K)({container:e,history:t.resolve(oe.Fi),eventSender:t.resolve(oe.KM),playerAPI:ve,appStartupId:"",resolver:fe}))),h.registerFactory(l.Y,(()=>new c)),h.registerFactory(u.h,(()=>new d)),h.registerFactory(m.$,(()=>new b)),h.registerFactory(ci.P,(e=>(0,ui.W)(e.resolve($t.z)))),h.registerFactory(Xt.Z,(e=>new en.r(e.resolve($t.z),e.resolve(ss.H),e.resolve(ma.b),((t,n)=>e.resolve(Ra.fZ).getAccessInfo(t,n))))),h.registerFactory(Zt.iY,(()=>new Jt)),h.registerFactory(ho.j,(e=>function(e,t,n){return new _o.o(new So(e),new bo,t,new Ao,yo._H.RESTRICTED,n,new Co.P)}(e.resolve(oe.sD),e.resolve(xo.p),(()=>(0,Eo.C)(h.resolve(mn.h)))))),h.registerFactory(fo.v,(e=>new go.s(e.resolve(ho.j)))),h.registerFactory(Ar.Z,(e=>{return t=e.resolve($t.z),new Hr(t);var t})),h.registerFactory(di.n,(e=>new mi)),function(e,t,n){const i=e.getEvents(),r=t.getEvents();let s=null;const a=t=>{s&&(0,re.B2u)(t,s)&&n.getActiveDevice()?.isLocal&&e.refreshCurrentContext()},o=e=>{a(e.data.uri)},l=e=>{e.data.operation===ae.sP.SIGNAL&&"minus"===e.data.signalIdentifier&&a(e.data.uri)};i.addListener(se.gd.UPDATE,(({data:e})=>{const t=e?.context.uri??null;null!==s&&null!==t&&s!==t&&(r.removeListener(ae.Lj.UPDATE,o,{uri:s}),r.removeListener(ae.Lj.OPERATION_COMPLETE,l),s=null),null===s&&null!==t&&(0,re.tbX)(t)&&(s=t,r.addListener(ae.Lj.UPDATE,o,{uri:s}),r.addListener(ae.Lj.OPERATION_COMPLETE,l))}))}(h.resolve(ss.H),h.resolve(Bs.Ki),h.resolve(mn.h));const Se=fe.getValue(Ht.uy),Ae=fe.getValue(Yt.Tq1);Se&&!Ae&&((0,S.$)(h.resolve(ss.H),h.resolve(Bs.Ki),h.resolve(Pe.I),h.resolve(uo.z)),(0,A.m)(h.resolve(Ka.X),h.resolve(uo.z),h.resolve(ss.H),h.resolve(Bs.Ki),h.resolve(mn.h))),function(e){navigator.globalPrivacyControl&&fetch(p,{method:"POST",cache:"no-cache",keepalive:!0,headers:{Authorization:`Bearer ${e.accessToken}`}})}(U);const Ce=fe.getValue(Ht.Ri);return h.resolve(Xt.Z),{version:n,container:e,operatingSystem:(0,he.D)(),isDeveloperMode:!1,isVideoSupported:(0,Ne.aX)(),isWebPSupported:V,enableCastConnect:Ce,initialUser:j,initialProductState:F,username:Y,getServiceWorkerMessenger:Ft,getRegistry:()=>h,getSession:()=>U,getTransport:()=>h.resolve(oe.sD),getEventSender:()=>h.resolve(oe.KM),getTranslations:()=>g,getFeatureFlags:()=>v,getHistory:()=>h.resolve(oe.Fi),getAdManagers:()=>h.resolve(o.M),getRemoteConfiguration:()=>de,getRemoteConfigurationWithLocalOverrides:()=>fe,getGraphQLLoader:()=>h.resolve(fi.zk),getPlatformData:()=>f,getSEOExperiments:()=>R,getSingAlongAPI:()=>h.resolve(lo.qh),getUBILogger:()=>be,getCollectionPlatformAPI:()=>h.resolve(L.jW),getEqualizerAPI:()=>h.resolve(K.u),getBuddyFeedAPI:()=>h.resolve(l.Y),getBuddyFeedLegacyAPI:()=>h.resolve(u.h),getSettingsAPI:()=>h.resolve(m.$),getRequestBuilder:()=>h.resolve($t.z),getAudioOutputDevicesAPI:()=>h.resolve(Zt.iY),getPlaybackFiltersAPI:()=>h.resolve(ns.Ak),getUrlDispenserServiceClient:()=>h.resolve(xo.p),getExternalAccessoryAPI:()=>h.resolve(ci.P)}}},10168:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});const i=(0,n(36285).u)("PlayHistoryAPI")},81823:(e,t,n)=>{"use strict";n.d(t,{I:()=>s,X:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{_numListeners=0;constructor(){super(),this.onAddListener(r.UPDATE,this.onListenerAdded.bind(this)),this.onRemoveListener(r.UPDATE,this.onListenerRemoved.bind(this))}onListenerAdded(){++this._numListeners,this.startListening()}onListenerRemoved(){0==--this._numListeners&&this.stopListening()}}},98855:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(44621);function r(){return(0,i.q)().getCapabilities().isSupported}},44621:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var i=n(10168),r=n(30157);function s(){return(0,r.N)(i.W)}},30493:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var i=n(30758),r=n(85387),s=n(91008),a=n(31417),o=n(38682),l=n(23936),c=n(75603),u=n(81834),d=n(29074),p=n(81752),m=n(13719);function h(){const e=(0,r.Zp)(),t=(0,d.m)(),n=(0,p._)(),{request:h}=(0,i.useContext)(u.j),f=(0,i.useCallback)((async(e,i)=>{const{name:r,trackUris:s}=await(0,c.s)(e,0,h),a=await n.createPlaylist(r,i,!0);return a&&await t.add(a,s,{before:"start"}),a}),[t,n,h]),g=(0,i.useCallback)((async(e,i)=>{const r=await(0,c.P)(e[0],h),s=await n.createPlaylist(r,i,!0);return s&&await t.add(s,e,{before:"start"}),s}),[t,n,h]),E=(0,i.useCallback)((async(e,i)=>{const r=await t.getMetadata(e),s=await t.getContents(e,{offset:0,limit:r.totalLength}),a=(0,o.Bq)(r.name),l=await n.createPlaylist(a,i,!0);return l&&await t.add(l,s.items.map((e=>e?.uri??null)).filter(m.P),{before:"start"}),l}),[t,n]);return{createPlaylist:(0,i.useCallback)((async(t,i)=>{const{ownedPlaylistCount:r}=await n.getMetadata(),o=a.Ru.get("playlist.new-default-name",r+1),c=await n.createPlaylist(o,i??{before:"start"}),u=(0,s.o_h)(c);return u&&e(`/playlist/${u.id}`,{state:{referrer:"your_library",navigationalRoot:l.g.CREATE_PLAYLIST,interactionId:t}}),c}),[n,e]),createPlaylistFromAlbum:f,createPlaylistFromTracks:g,createPlaylistFromPlaylist:E}}},75603:(e,t,n)=>{"use strict";n.d(t,{s:()=>p,P:()=>d});var i=n(91008),r=n(31417),s=n(39912),a=n(57776);n(59147);const o=new a.l("getAlbumNameAndTracks","query","8628ad33de3267d7bef516c76a746979a5f98891a2c9eaff3dfec828abdcd983",null),l=new a.l("getEpisodeName","query","508f9db2e7dc340c338950dc67a6045ee1406703646f23b760986fa689c239b1",null),c=new a.l("getPodcastOrBookName","query","631676b4cf1eb7c93d1133e3f1f17e5bfe8d6a5e2fb9560148bac61f1531f267",null),u=new a.l("getTrackName","query","3dee761788854e8dd9239e13ce0d712da031fb8c2036f096a1c765062b410660",null);async function d(e,t){const n=r.Ru.get("playlist.default_playlist_name");try{if((0,i.gHQ)(e)){const n=await t(l,{uri:e});if("Episode"===n?.data?.episodeUnionV2?.__typename)return n.data.episodeUnionV2.name}if((0,i.U_m)(e)){const n=await t(u,{uri:e});if("Track"===n?.data?.trackUnion?.__typename)return n.data.trackUnion.name}if((0,i.WB1)(e)){const n=await t(c,{uri:e});if("Podcast"===n?.data?.podcastUnionV2?.__typename||"Audiobook"===n?.data?.podcastUnionV2?.__typename)return n.data.podcastUnionV2.name}return n}catch{return n}}async function p(e,t,n){const i=await n(o,{uri:e,offset:t,limit:200});if("Album"===i?.data?.albumUnion?.__typename){const{name:r,tracksV2:a}=i.data.albumUnion,o=a.items.filter(s.u).map((e=>e.track.uri));if(a.pagingInfo.nextOffset){if(a.pagingInfo.nextOffset<=t||0===o.length)throw new Error(`Error while requesting ${e} content, unexpected nextOffset`);const i=await p(e,a.pagingInfo.nextOffset,n);return{name:r,trackUris:o.concat(i.trackUris)}}return{name:r,trackUris:o}}throw new Error(`Error while requesting ${e} content`)}},56488:(e,t,n)=>{"use strict";n.d(t,{H:()=>i});const i=(0,n(36285).u)("PrivateSessionAPI")},22389:(e,t,n)=>{"use strict";n.d(t,{u:()=>y});const i=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"}),r=/\p{White_Space}/u,s=/\p{P}/u,a=/\p{sc=Han}/u;function o(e){return null!==e&&r.test(e)}function l(e){return null!==e&&(e<="/"||e>=":"&&e<="@"||"\\"===e||o(e))}function c(e){return null!==e&&s.test(e)}function u(e){return null!==e&&a.test(e)}class d{constructor(e,t,n){if(t<0||n<0||t+n>e.length)throw new RangeError;this.data=e,this.offset=t,this.length=n,this.position=0}static from(e){const t=Array.from(e.normalize("NFC"));return new d(t,0,t.length)}toString(){return this.data.slice(this.offset,this.offset+this.length).join("")}slice(e=0,t=this.length){if(e<0||t>this.length)throw new RangeError;const n=this.offset+e,i=t-e;return new d(this.data,n,i)}nextCodePoint(){return this.position===this.length?null:this.data[this.offset+this.position++]}}function p(e){let t;do{t=e.nextCodePoint()}while(null!==t&&o(t)||c(t));return t}function m(e,t){let n=p(e),r=p(t);if(null===r)return{offset:0,length:0};const s=e.offset+e.position-1;let a=e.offset+e.position;for(;;){if(null===n&&null===r)return{offset:s,length:a-s};if(null===r)return{offset:s,length:a-s};if(null===n)return null;if(0!==i.compare(n,r))return null;a=e.offset+e.position,n=p(e),r=p(t)}}function h(e,t){let n,i,r;do{i=e.position,n=e.nextCodePoint()}while(null!==n&&o(n));if(t?.segmentQuotedStrings&&function(e){return null!==e&&('"'===e||"'"===e)}(n)){const t=n;i=e.position;do{r=e.position,n=e.nextCodePoint()}while(null!==n&&n!==t);return null===n&&i===r?null:e.slice(i,r)}do{if(r=e.position,t?.segmentCJKUnifieIdeographs&&u(n))break;n=e.nextCodePoint()}while(null!==n&&!l(n));return null===n&&i===r?null:e.slice(i,r)}function f(e){return h(e,{segmentQuotedStrings:!0,segmentCJKUnifieIdeographs:!1})}function g(e){return h(e,{segmentQuotedStrings:!1,segmentCJKUnifieIdeographs:!0})}function E(e,t){const n=[];for(let i=g(e);null!==i;i=g(e)){let r=m(i,t.slice());null===r?(r=m(e.slice(i.offset),t.slice()),null===r||n.push(r)):n.push(r)}return n}function _(e,t){return e.offset===t.offset&&e.length===t.length}function y(e,...t){const n=d.from(e),i=[];for(let e=f(n);null!==e;e=f(n)){const n=[];for(let i=0;ie.range.length>0&&n.findIndex((t=>_(e.range,t.range)))===t)))}return i.length>0?i:null}},4564:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,k:()=>a});var i=n(46352);const r="react-query";function s(){return{persistClient:async e=>{await(0,i.hZ)(r,e)},restoreClient:async()=>await(0,i.Jt)(r),removeClient:async()=>{await(0,i.yH)(r)}}}function a(){return(0,i.yH)(r)}},95273:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,s:()=>s});var i=n(92336);const r="remote-config-overrides";function s(e){const t=e.getItem(r);if(t instanceof Error)return i.Vk.empty();try{return i.Vk.fromJSON(t)}catch(e){return i.Vk.empty()}}},10721:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});const i=(0,n(36285).u)("ReportAPI")},74916:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,v:()=>a});var i=n(91008),r=n(65645);const s=e=>(0,i.tbX)(e)||(0,i.ecE)(e)||(0,i.gHQ)(e)||(0,i.APS)(e)||(0,i.WB1)(e)||(0,i.eI1)(e),a=(e,t,n,i)=>e.getMetadata(t).then((e=>{const t="chart"===e.formatListData?.type,r=!!e.formatListData;return!(!(i&&!r||!i&&e.canReportAnnotationAbuse)||t||n===e.owner.uri)})).catch((e=>((0,r.v)(e),!1)))},6383:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});const i=(0,n(36285).u)("SegmentsAPI")},6837:(e,t,n)=>{"use strict";n.d(t,{L:()=>A});var i=n(30758),r=n(62411),s=n(85387),a=n(3074),o=n.n(a),l=n(48517),c=n(14343),u=n(91008),d=n(31417),p=n(98293),m=n(29195),h=n(53133),f=n(37410),g=n(89402),E=n(11595),_=n(38501),y=n(27301),v=n(33558),b=n(34814),S=n(33234);const A=({sharingInfo:e,uri:t,interactionData:n,playlistType:a})=>{const A=(0,g.W)(),C=(0,r.wA)(),{pathname:T}=(0,s.zy)(),I=(0,f.W)({type:"link",uri:t}),{enqueueSnackbar:O}=(0,h.d)(),w=d.Ru.getLocaleForURLPath(),N=(0,b.E)(),R=(0,c.NC)(_.vnr),P=(0,m.vh)(),{getShareUri:L}=(0,E.X)(),D="voting-playlist"===a,k=(0,i.useCallback)(((n,i)=>{let r=e;const s=n===t;r?.shareUrl&&s||(r=((e,t,n)=>{const i=(0,u.o_h)(e)?.toURL(),r=o().create().hex.replace(/-/g,"").substr(0,16),s=(0,u.Lce)(e).toURL(`${y.iG}${v.CT}${n}/`);return{shareUrl:t&&i?`${s}?si=${r}`:`${i}?si=${r}`,shareId:r}})(n,I,w));const a=r?.shareUrl||"";let l=a;if(i){const e=new URL(a);i.forEach(((t,n)=>e.searchParams.set(n,t))),l=e.toString()}return{shareUrl:l,shareId:r?.shareId}}),[e,I,t,w]),x=(0,i.useCallback)((async(e,t)=>{let n=[{key:"app_destination",value:"copy_link"}];t&&(n=n.concat(Array.from(t).map((([e,t])=>({key:e,value:t})))));const{full_url:i,shareable_url:r,share_id:s}=await N.getShortUrl(e,{customData:n});return{shareUrl:D&&!R&&i?i:r,shareId:s}}),[N,D,R]);return{onCopyLink:(0,i.useCallback)((async e=>{let i=t;try{i=await L(t)}catch(e){console.error(e)}const r=R&&!I||D;let s=k(i,e);try{r&&(s=await x(i,e))}catch(e){console.error(e)}const{shareUrl:a,shareId:o}=s;if(A(n),(0,S.l)(a),C((0,p.pf)(a)),O(d.Ru.get("feedback.link-copied")),o){const e=(0,u.o_h)(T);P.send((0,l.c)({share_id:o,entity_uri:t,destination_id:"copy-link",source_page:e?.type||"",source_page_uri:e?.toURI()||""}))}}),[L,t,R,I,D,k,A,n,C,O,x,T,P])}}},11595:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var i=n(30758),r=n(14343),s=n(91008),a=n(38501),o=n(30157),l=n(16946),c=n(15198);const u=()=>{const e=(0,o.N)(l.Z),t=(0,r.NC)(a.Zxi,{loadingValue:!1});return{getShareUri:(0,i.useCallback)((async n=>{if(!t)return n;if(!(0,s.tbX)(n))return n;const[i]=await e.fetch([n],[c.U.SHARE_TRAIT]),r=i.extensions[c.U.SHARE_TRAIT]?.shareOptions.at(0);if(r?.shareUri)return r.shareUri;if(r?.extensionKind===c.U.INSTANCE_SHARING||r?.extensionKind===c.U.SNAPSHOT_SHARING){const[t]=await e.fetch([n],[r.extensionKind]),i=t.extensions[r.extensionKind]?.shareUri;if(i)return i}return n}),[e,t])}}},23613:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});const i=(0,n(36285).u)("VideoAPI")},68436:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,p:()=>s});var i=n(93827);let r=function(e){return e.SUBTITLE_LANGUAGES_CHANGED="subtitle_languages_changed",e.PICTURE_IN_PICTURE_CHANGED="picture_in_picture_changed",e}({});class s extends i.V{}},98320:(e,t,n)=>{"use strict";n.d(t,{$:()=>s});var i=n(23613),r=n(30157);function s(){return(0,r.N)(i.n)}},8989:(e,t,n)=>{"use strict";n.d(t,{K:()=>d});var i=n(30758),r=n(60238),s=n(31193),a=n(98320),o=n(68436),l=n(608),c=n(21549);const u=o.S.SUBTITLE_LANGUAGES_CHANGED;function d(){const e=(0,a.$)(),t=e.getCapabilities(),{videoPlayerMode:n}=(0,s.d)(),{uri:o}=(0,l.f)(),{spec:d,logger:p}=(0,c.r)(r.E,{data:{uri:o??"",identifier:n}}),[m,h]=(0,i.useState)([]),[f,g]=(0,i.useState)(null);(0,i.useEffect)((()=>{(async()=>{h(await e.getSubtitleLanguages())})();return e.getEvents().addListener(u,(({data:e})=>{h(e)}))}),[e,h]),(0,i.useEffect)((()=>{(async()=>{g(await e.getPreferredSubtitleLanguage())})()}),[e,g]);return{isSupported:t.hasSubtitleSupport,availableLanguages:m,preferredLanguage:f,setPreferredLanguage:async t=>{e.setPreferredSubtitleLanguage(t),g(t),t?p.logInteraction(d.subtitlesButtonFactory().hitUiReveal()):p.logInteraction(d.subtitlesButtonFactory().hitUiHide())}}}},49645:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});const i=(0,n(36285).u)("ZoomAPI")},65794:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(49645),r=n(30157);function s(){return(0,r.N)(i.L)}},20463:(e,t,n)=>{"use strict";n.d(t,{$k:()=>I,no:()=>O,oU:()=>x,tf:()=>w});var i=n(91008),r=n(70243),s=n(31367),a=n(98293),o=n(21951),l=n(57239),c=n(74941),u=n(50161),d=n(70028),p=n(65924),m=n(5781),h=n(36061),f=n(9534),g=n(27301),E=n(13338),_=n(26184),y=n(87464),v=n(45627),b=n(37163),S=n(16581),A=n(94572),C=n(7307),T=n(55303);const I={START_RADIO:"START_RADIO"},O={SAVE_TRACK:"SAVE_TRACK",SAVE_EPISODE:"SAVE_EPISODE",SAVE_ALBUM:"SAVE_ALBUM",SAVE_PRERELEASE:"SAVE_PRERELEASE"},w={FOLLOW_USER:"FOLLOW_USER"},N=/(^PLAY_.+|QUEUE_UPDATE)/i,R={...{[m.Gs]:m.Gs},...s.gK},P=()=>{const e={...R};return delete e.DEVICE_INFO_CHANGED,delete e.PLAYBACK_CLEAR_DATA,delete e.QUEUE_UPDATE,e},L=(e,t)=>{e.dispatch((0,a.H2)(t))},D=(e,t)=>{if(P()[t.type]){if((e=>e.type!==m.Gs&&!![s.gK.PLAYBACK_ERROR].includes(e.type))(t))return!1;const[n,i]=(e=>{const t=P();switch(e.type){case t.FOLLOW_PLAYLIST:return[!0,{triggerId:o.D,triggerAction:e}];case t.CREATE_PLAYLIST:return[!0,{triggerId:u.x,triggerAction:e}];case t.ADD_TO_QUEUE:case m.Gs:return[!0,{triggerId:c.d,triggerAction:e}];default:return[!1,null]}})(t),r=N.test(t.type);if(e.dispatch((0,E.$W)(t,r?E.l_.PLAY:E.l_.USER_INVESTMENT)),n)l.h.set((e=>({...e,...i})));else{const n=t.uri||t.contextURI;if(L(e,n),t.type===f.xM)return!1}return!0}return!1};function k(e,t){if(e===_.tS.ADD){if((0,i.U_m)(t))return[!0,{triggerId:c.d,triggerAction:{type:O.SAVE_TRACK}}];if((0,i.gHQ)(t))return[!0,{triggerId:c.d,triggerAction:{type:O.SAVE_EPISODE}}]}return e===y.Ik.PLAY&&(0,i.Cfh)(t)?[!0,{triggerId:c.d,triggerAction:{type:I.START_RADIO}}]:e===A.ut.ADD||e===A.ut.CREATE_PLAYLIST?[!0,{triggerId:u.x,triggerAction:{type:null}}]:e===p.JK.FOLLOW_USER?[!0,{triggerId:c.d,triggerAction:{type:w.FOLLOW_USER}}]:[!1,null]}const x=(e,t,n,s,a)=>o=>{const c=e.getEvents(),u=t.getEvents(),E=n.getEvents(),I=s.getEvents();return c.addListener(y.gd.ACTION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:r}=(0,h.Ht)(i);if(!r)return!1;switch(e.action){case y.Ik.PLAY:{const{context:i,options:r}=e,a=function(e){return e.pages&&e.pages.length>0&&e.pages[0].items&&e.pages[0].items.length>0?e.pages[0].items[0]:null}(i);if(a?.type===C.c.EPISODE&&(s=a,void 0===s.metadata?.anonymousPlaybackAllowed||s.metadata.anonymousPlaybackAllowed))return!1;const o=r?.skipTo?.uri??i.uri;n.storeAction(d.IA,e);const[c,u]=k(y.Ik.PLAY,o);return c?(l.h.set((e=>({...e,...u}))),!0):(L(t,o),!0)}case y.Ik.SKIP_TO_NEXT:case y.Ik.SKIP_TO_PREVIOUS:return L(t,null),!0;default:return!1}var s})(e.data,o,a)&&e.preventDefault()})),u.addListener(_.UV.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:r}=(0,h.Ht)(i);if(!r)return!1;if(e.operation===_.tS.ADD){const[i]=e.uris;n.storeAction(d.j8,e);const[r,s]=k(_.tS.ADD,i);return r?(l.h.set((e=>({...e,...s}))),!0):(L(t,i),!0)}return!1})(e.data,o,a)&&e.preventDefault()})),E.addListener(A.tD.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:r}=(0,h.Ht)(i);if(!r)return!1;switch(e.operation){case A.ut.ADD:{const[i]=e.uris;n.storeAction(d.YZ,e);const[r,s]=k(A.ut.ADD,i);return r?(l.h.set((e=>({...e,...s}))),!0):(L(t,i),!0)}case A.ut.CREATE_PLAYLIST:{const[e,n]=k(A.ut.CREATE_PLAYLIST,"");return e?(l.h.set((e=>({...e,...n}))),!0):(L(t,null),!0)}default:return!1}})(e.data,o,a)&&e.preventDefault()})),I.addListener(p.mc.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:r}=(0,h.Ht)(i);if(!r)return!1;if(e.operation===p.JK.FOLLOW_USER){const[i]=e.uris;n.storeAction(d.Hv,e);const[r,s]=k(p.JK.FOLLOW_USER,i);return r?(l.h.set((e=>({...e,...s}))),!0):(L(t,i),!0)}return!1})(e.data,o,a)&&e.preventDefault()})),t=>n=>{const s=o.getState(),{isAnonymous:l}=(0,h.Ht)(s),c=new URL(location.href).searchParams.has("signupPrompt");if(l){if(!D(o,n)){switch(n.type){case r.gK.ANONYMOUS_LOGIN_CLICK:{const t=e.getState();if(function(e){return(0,S.uW)(e)===b.i.PLAYING&&(0,v.p)(e?.item??void 0)}(t)){const n=function(e,t){if(!e?.item)return null;const n={uri:e.context.uri,pages:[{items:[{type:e.item.type,uri:e.item.uri,uid:e.item.uid,metadata:e.item.metadata,provider:e.item.provider}]}]},i={referrerIdentifier:t.getReferrer(),featureIdentifier:"unknown"},r={seekTo:e.positionAsOfTimestamp??void 0};return{action:y.Ik.PLAY,context:n,origin:i,options:r}}(t,e);n&&a.storeAction(d.IA,n)}setTimeout(T.PW,500);break}case r.gK.ANONYMOUS_SIGNUP_CLICK:setTimeout(T.ie,500);break;case r.gK.ANONYMOUS_PREMIUM_CLICK:setTimeout((()=>{window.location.assign(g.BW)}),500);break;case f.xM:c&&L(o,(0,i.o_h)(location.pathname)?.toURI()||""),(0,m.cU)(e,".main-view-container .os-viewport-native-scrollbars-invisible",(0,m.pL)(o),(0,m.ox)(o))}t(n)}}else t(n)}}},5781:(e,t,n)=>{"use strict";n.d(t,{Gs:()=>s,cU:()=>c,ox:()=>l,pL:()=>o});var i=n(87464),r=n(24620);const s="ANONYMOUS_PLAYBACK_HOOK",a=(e,t)=>{const n=t?.item?.type;e.dispatch((e=>({type:s,entityType:e}))(n))},o=e=>t=>{a(e,t)},l=e=>(t,n,i)=>{const s=e.getState(),a=s?.ui?.modal,o=((e,t,n,i)=>{const s=((0,r.s)(n)??0)>1e4,a=document.hasFocus();return!e&&s&&a&&i&&"now-playing-view"!==t})(t,a,n,i);return o},c=(e,t,n,r)=>{let s=!1,a=Date.now(),o=document.querySelector(t);const l=e.getEvents(),c=()=>{a=Date.now()},u=()=>{o||(o=document.querySelector(t),o&&o.addEventListener("scroll",c))},d=l.addListener(i.gd.UPDATE,(({data:e})=>{u();const t=Date.now()-a>1e3;r(s,e,t)&&(s=!0,n(e),d(),o&&o.removeEventListener("scroll",c))}));u()}},23660:(e,t,n)=>{"use strict";n.d(t,{m0:()=>A,kp:()=>D,f0:()=>k});var i=n(39637),r=n(91008),s=n(31417),a=n(98293),o=n(55460),l=n(15987),c=n(27042),u=n(87464);var d=n(65782),p=n(36061),m=n(9534),h=n(40184),f=n(70896),g=n(50993),E=n(21996),_=n(13869),y=n(6530),v=n(62478);function b(e){return"/"===e?"spotify:home":/^\/collection/.test(e)?"spotify:collection":/^\/artist/.test(e)?e.replace("/artist/","spotify:artist:"):/^\/album/.test(e)?e.replace("/album/","spotify:album:"):/^\/playlist/.test(e)?e.replace("/playlist/","spotify:playlist:"):/^\/genre/.test(e)?e.replace("/genre/","spotify:genre:"):/^\/search/.test(e)?"spotify:search":""}function S(e){return(0,l.Tv)(e)}const A="web-modal",C={pattern:"app:start",type:"CLIENT_EVENT"},T={pattern:"app:deprecation:start",type:"CLIENT_EVENT"},I={pattern:"app:deprecation:click",type:"CLIENT_EVENT"},O={pattern:"context:start",type:"CLIENT_EVENT"},w=(0,E.D)()===_.f.macOS,N=(0,E.D)()===_.f.Windows,R={pattern:`context:start:${(0,E.D)().toLowerCase()}`,type:"CLIENT_EVENT"},P={pattern:"jammable:context:start",type:"CLIENT_EVENT"};let L=null;function D(){return L}const k=(e,t,n)=>l=>E=>_=>{const D=E(_),k=l.getState(),{dispatch:x}=l,{isAnonymous:U}=(0,p.Ht)(k),M=t.getState(),B=t.getEvents();let j=!1,F="";function V(e){e&&x((0,c.vx)(e))}function G(e,t){const n=new g.P("quicksilver_message");let i=t;if(t)return n.setItem(e,t),t;const r=n.getItem(e);return r instanceof h.m||r instanceof f.Y||(i=r),i}if(U)return D;switch(_.type){case a.gK.INITIALISE_QUICKSILVER:!function(e){L=(0,i.ns)((0,v.V)().toPublic(),{actions:["DISMISS","URL","EXTERNAL_URL"],app:{platform:"WebPlayer",clientId:"65b708073fc0480ea92a077233ca87bd"},enableLogs:!1,formats:[A],locale:s.Ru.getLocaleForTranslation(),env:d.x,triggerTypes:["URI","CLIENT_EVENT"]}),L.start(),L.on(i.qY.CONNECTED,(()=>{e((0,c.rI)())}))}(x),B.addListener(u.gd.ACTION,(e=>{j||e.data.action!==u.Ik.PLAY||(j=!0,x((0,c.V$)())),function(e,t){if(e.data.action!==u.Ik.PLAY)return;const n=(0,r.o_h)(e.data.context.uri);n&&((0,r.tbX)(n)||(0,r._Tv)(n)||(0,r.ecE)(n))&&t((0,c.Su)())}(e,x)}));break;case a.gK.TRIGGER_CLICK_DEPRECATION_MESSAGE:L&&!S(M)&&(F=b(e.location.pathname),L.requestMessage({appUri:F,trigger:I}).then((e=>G(T.pattern,e))).then(V));break;case d.Q.TRIGGER_APP_START_IN_APP_MESSAGE:L&&!S(M)&&(L.requestMessage({appUri:"spotify:home",trigger:C}).then(V),k.session.productState?.["client-deprecated"]&&L.requestMessage({appUri:"spotify:home",trigger:T}).then((e=>G(T.pattern,e))).then(V));break;case d.Q.TRIGGER_CONTEXT_START_IN_APP_MESSAGE:L&&!S(M)&&L.requestMessage({appUri:"spotify:home",trigger:O}).then(V);break;case d.Q.TRIGGER_CONTEXT_START_PLATFORM_IN_APP_MESSAGE:L&&(w||N)&&!S(M)&&L.requestMessage({appUri:"spotify:home",trigger:R}).then(V);break;case d.Q.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:if(n.getEnabled()===y._H.ENABLED&&n.getJamExperience()!==y.lz.NONE&&L&&!S(M)){const t=(0,r.o_h)(e.location.pathname)?.toURI()??"spotify:home";L.requestMessage({appUri:t,trigger:P}).then(V)}break;case a.gK.UPDATE_UI_HISTORY_STATE:F=b(e.location.pathname),L&&!S(M)&&F&&L.requestMessage({appUri:F,trigger:{pattern:F,type:"URI"}}).then(V);break;case o.QN.SHOW_BILLBOARD_AD_VIEW:x((0,c.yv)());break;case d.Q.PREVIEW_IN_APP_MESSAGE:L&&_.creativeId&&L.previewMessage({appUri:_.appUri||"spotify:home",creativeId:_.creativeId}).then(V);break;case d.Q.SET_IN_APP_MESSAGING_ENV:L&&L.setEnv(_.env);break;case m.tQ:L&&L.stop()}return D}},30503:(e,t,n)=>{"use strict";function i(e=!1){let t=document.getElementById("main");return!t&&e&&(t=document.createElement("div"),t.id="main",document.body.appendChild(t)),t}n.d(t,{e:()=>i})},91128:(e,t,n)=>{"use strict";n.d(t,{JQ:()=>ne,cI:()=>Y,r8:()=>$,bL:()=>Q,UU:()=>q,ug:()=>ee,XL:()=>Z});var i=n(5545),r=n(333),s=n(31367),a=n(78566),o=n(98293),l=n(30631),c=n(47756);const u=(e={mode:c.YU.none},t)=>{switch(t.type){case l.Bg.SET_LYRICS_MODE:return{...e,mode:t.mode};case l.Bg.SET_LYRICS_TRANSLATION_LANGUAGE:return{...e,translationLanguage:t.language};default:return e}};var d=n(7019),p=n(37460),m=n(38501),h=n(27831);const f=(e={message:null,isOpen:!1},t)=>{switch(t.type){case o.gK.HIDE_UNSUPPORTED_MESSAGE:return{...e,message:null,isOpen:!1};case o.gK.SHOW_UNSUPPORTED_MESSAGE:return{...e,message:t.message,isOpen:!0};default:return e}},g=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!1};case o.gK.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!0};default:return e}},E=(e={isOpen:!1,hasOccurred:!1},t)=>{switch(t.type){case o.gK.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!1};case o.gK.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!0,hasOccurred:!0};default:return e}},_=e=>{const t=e?.getRemoteConfigurationWithLocalOverrides?.().getValue(m.rkp);return(e={isOpen:!1},n)=>{if(t)return{isOpen:!1};switch(n.type){case h.J:{const{product:t,country:i,policies:r}=n.data;return"premium"===t&&!r?.opt_in_trial_premium_only_market||"KR"!==i?e:{...e,isOpen:!0}}case o.gK.HIDE_PREMIUM_MODAL:return{...e,isOpen:!1};case o.gK.SHOW_PREMIUM_MODAL:return{...e,isOpen:!0};default:return e}}},y=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.HIDE_L2L_MODAL:return{...e,isOpen:!1};case o.gK.SHOW_L2L_MODAL:return{...e,isOpen:!0};default:return e}},v=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.HIDE_S2L_MODAL:return{...e,isOpen:!1};case o.gK.SHOW_S2L_MODAL:return{...e,isOpen:!0};default:return e}},b=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!0,uri:t.uri};case o.gK.CLOSE_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!1};default:return e}},S=(e={isOpen:!1,actionType:"cancel"},t)=>{switch(t.type){case o.gK.OPEN_REVERT_CHANGES_TUNA_DIALOG:return{...e,isOpen:!0,uri:t.uri,callback:t.callback,actionType:t.actionType};case o.gK.CLOSE_REVERT_CHANGES_TUNA_DIALOG:return{...e,isOpen:!1};default:return e}},A=(e={isOpen:!1,item:null},t)=>{switch(t.type){case o.gK.OPEN_DSA_DIALOG:return{...e,isOpen:!0,item:t.item};case o.gK.CLOSE_DSA_DIALOG:return{...e,isOpen:!1,item:null};default:return e}},C=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_DELETE_FOLDER_DIALOG:return{...e,isOpen:!0,uri:t.uri,onDeleteCallback:t.onDeleteCallback};case o.gK.CLOSE_DELETE_FOLDER_DIALOG:return{...e,isOpen:!1};default:return e}},T=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_EXPLICIT_CONTENT_DIALOG:return{...e,isOpen:!0};case o.gK.CLOSE_EXPLICIT_CONTENT_DIALOG:return{...e,isOpen:!1};default:return e}},I=(e={isOpen:!1,isPrerelease:!1},t)=>{switch(t.type){case o.gK.OPEN_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!0,uri:t.uri,isPrerelease:t.isPrerelease};case o.gK.CLOSE_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!1};default:return e}},O=(e={isOpen:!1,playlistUri:null},t)=>{switch(t.type){case o.gK.OPEN_LEAVE_PLAYLIST_DIALOG:return{isOpen:!0,playlistUri:t.playlistUri};case o.gK.CLOSE_LEAVE_PLAYLIST_DIALOG:return{isOpen:!1,playlistUri:t.playlistUri};default:return e}},w=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_BLOCK_USER_DIALOG:return{...e,isOpen:!0,uri:t.uri,name:t.name};case o.gK.CLOSE_BLOCK_USER_DIALOG:return{...e,isOpen:!1};default:return e}},N=(e={uri:null,isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_SIGNUP_PROMPT_DIALOG:return{...e,uri:t.uri,isOpen:!0};case o.gK.CLOSE_SIGNUP_PROMPT_DIALOG:return{...e,isOpen:!1};default:return e}},R=(e={isError:!1,name:""},t)=>{switch(t.type){case s.gK.CDM_ERROR:return{...e,isError:!0,name:"cdmerror"};case s.gK.HARMONY_MAX_SUBSCRIPTIONS_REACHED:return{...e,isError:!0,name:"max_subscriptions_reached"};default:return e}},P=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_FULLSCREEN_MODE:return{isOpen:!0};case o.gK.CLOSE_FULLSCREEN_MODE:case o.gK.LEAVE_FULLSCREEN:return{isOpen:!1};default:return e}},L=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.CONNECT_DEVICE_PICKER_OPENED:return{...e,isOpen:!0};case o.gK.CONNECT_DEVICE_PICKER_CLOSED:return{...e,isOpen:!1};default:return e}},D=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.SHOW_CONNECT_NUDGE:return{...e,isOpen:!0};case o.gK.HIDE_CONNECT_NUDGE:return{...e,isOpen:!1};default:return e}},k=(e={isRTL:!1},t)=>t.type===a.gK.SET_RTL_MODE?{...e,isRTL:t.isRTL}:e,x=(e={canGoBack:!1,canGoForward:!1},t)=>t.type===o.gK.UPDATE_UI_HISTORY_STATE?t.historyState:e,U=(e={isOpen:!1},t)=>t.type===o.gK.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY?{...e,isOpen:t.isOpen}:e,M=(e={isOpen:!1,trackUri:""},t)=>t.type===o.gK.SHOW_TRACK_CREDITS?{...e,isOpen:t.isOpen,trackUri:t.trackUri}:e,B=(e={isOpen:!1,data:null},t)=>{switch(t.type){case o.gK.OPEN_ARTIST_ABOUT_DIALOG:return{...e,data:t.data,isOpen:!0};case o.gK.CLOSE_ARTIST_ABOUT_DIALOG:return{...e,data:null,isOpen:!1};default:return e}},j=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_RESTRICTIONS_MODAL:return{...e,isOpen:!0};case o.gK.CLOSE_RESTRICTIONS_MODAL:return{...e,isOpen:!1};default:return e}},F=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!0};case o.gK.CLOSE_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!1};default:return e}},V=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_CLEAR_CACHE_DIALOG:return{...e,isOpen:!0};case o.gK.CLOSE_CLEAR_CACHE_DIALOG:return{...e,isOpen:!1};default:return e}},G=(e={isOpen:!1,name:"",handleRename:()=>{}},t)=>{switch(t.type){case"OPEN_RENAME_FOLDER_MODAL":return{...e,isOpen:!0,name:t.name,handleRename:t.handleRename};case"CLOSE_RENAME_FOLDER_MODAL":return{...e,isOpen:!1};default:return e}},H=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_YOUR_DJ_UPSELL_MODAL:return{isOpen:!0};case o.gK.CLOSE_YOUR_DJ_UPSELL_MODAL:return{isOpen:!1};default:return e}},W=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{uri:t.uri,isOpen:!0,onConfirm:t.onConfirm,onCancel:t.onCancel,remoteDeviceInfo:t.remoteDeviceInfo};case o.gK.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{isOpen:!1};default:return e}},z=(e={isOpen:!1,consumptionCapExplanation:{title:"",body:"",cta:""}},t)=>{switch(t.type){case o.gK.OPEN_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!0,consumptionCapExplanation:t.consumptionCapExplanation};case o.gK.CLOSE_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!1};default:return e}},K=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_JAM_MODAL:return{...e,isOpen:!0,modalType:t.modalType,joinToken:t.joinToken,memberToRemove:t.memberToRemove,jamDeviceInfo:t.jamDeviceInfo};case o.gK.CLOSE_JAM_MODAL:return{...e,isOpen:!1,modalType:void 0,joinToken:void 0,memberToRemove:void 0,jamDeviceInfo:void 0};default:return e}},Y=(0,i.Z0)({name:"smartShuffle",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),q=(0,i.Z0)({name:"turnOffPersonalizedRecommendationsModal",initialState:{isOpen:!1,onConfirm:()=>{}},reducers:{open:(e,t)=>{e.isOpen=!0,e.onConfirm=t.payload.onConfirm},close:e=>{e.isOpen=!1}}}),$=(0,i.Z0)({name:"learnMorePersonalizedRecommendationsModalSlice",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),Z=(0,i.Z0)({name:"yourSoundCapsuleModalSlice",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),Q=(0,i.Z0)({name:"personalizedRecommendationsError",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),J=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_SHOW_RATING_MODAL:return{isOpen:!0,uri:t.uri,metadata:t.metadata};case o.gK.CLOSE_SHOW_RATING_MODAL:return{isOpen:!1};default:return e}},X=(0,i.Z0)({name:"editRefinersModal",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),ee=(0,i.Z0)({name:"videoNotSupportedModal",initialState:{isOpen:!1,onConfirm:()=>{},onCancel:()=>{}},reducers:{open:(e,t)=>{e.isOpen=!0,e.onCancel=t.payload.onCancel,e.onConfirm=t.payload.onConfirm},close:e=>{e.isOpen=!1}}}),te=(0,i.Z0)({name:"deleteCommentDialog",initialState:{isOpen:!1,onConfirm:()=>{}},reducers:{open:(e,t)=>{e.isOpen=!0,e.onConfirm=t.payload.onConfirm},close:e=>{e.isOpen=!1}}}),ne=e=>(0,r.HY)({premiumDialog:_(e),loginToListenDialog:y,signupToListenDialog:v,deletePlaylistDialog:b,deleteFolderDialog:C,removeFromLibraryDialog:I,leavePlaylistDialog:O,blockUserDialog:w,improvedSignupPromptDialog:N,unsupportedBrowser:f,offlineDeviceLimitReachedDialog:g,playbackNotSupportedErrorDialog:E,errorPage:R,fullscreenMode:P,connectDevicePicker:L,connectNudge:D,videoPlayer:p.F3,textDirection:k,history:x,keyboardShortcutsHelpModal:U,trackCreditsModal:M,removeDownloadsDialog:F,clearCacheDialog:V,renameFolderModal:G,artistAboutDialog:B,yourDJUpsellDialog:H,lyrics:u,removeDownloadConfirmationDialog:W,bookConsumptionCapModal:z,dsaDialog:A,jamModalState:K,restrictionsModalState:j,introducingSmartShuffleModal:Y.reducer,turnOffPersonalizedRecommendationsModal:q.reducer,learnMorePersonalizedRecommendationsModal:$.reducer,transcript:d.d,personalizedRecommendationsErrorModal:Q.reducer,showRatingModalState:J,editRefinersModal:X.reducer,changesTunaDialog:S,yourSoundCapsuleModal:Z.reducer,videoNotSupportedModal:ee.reducer,explicitContentDialog:T,deleteCommentDialog:te.reducer})},38501:(e,t,n)=>{"use strict";n.d(t,{$GE:()=>C,Au4:()=>v,BCG:()=>r.BC,BYw:()=>de,CVw:()=>Xe,CXJ:()=>r.CX,DGB:()=>ee,DHV:()=>A,DKh:()=>Ce,DqB:()=>r.Dq,GwQ:()=>mt,H30:()=>vt,HI4:()=>We,HJU:()=>kt,HO:()=>r.HO,HYy:()=>ue,IZ_:()=>ke,IqJ:()=>r.Iq,J1t:()=>je,JKv:()=>x,JSO:()=>K,JhO:()=>U,KYh:()=>wt,KkE:()=>$,KvH:()=>me,LDS:()=>H,LX5:()=>J,Lbd:()=>At,Lh5:()=>he,Lkd:()=>F,Ln9:()=>re,MCN:()=>ut,MX4:()=>it,NtL:()=>fe,NzS:()=>_t,O14:()=>r.O1,OBX:()=>d,OlV:()=>r.Ol,PV7:()=>Ve,Pfj:()=>dt,QIZ:()=>Ae,QMQ:()=>ae,QTs:()=>r.QT,SAn:()=>se,SqX:()=>o,StW:()=>p,TId:()=>Y,Tb_:()=>_,Tq1:()=>Et,U4t:()=>xe,U5l:()=>k,UPi:()=>r.UP,UiV:()=>It,UrL:()=>T,UuM:()=>Tt,WAA:()=>r.WA,WAq:()=>ye,WYm:()=>le,WdJ:()=>s,Wvg:()=>xt,YSK:()=>X,YVK:()=>r.YV,Z85:()=>Be,ZDY:()=>bt,ZK8:()=>Z,ZXG:()=>Ke,ZoB:()=>Oe,Zxi:()=>ft,_Ie:()=>st,_p8:()=>D,a4n:()=>y,b2:()=>Te,bOR:()=>W,bYw:()=>z,c3z:()=>h,cLA:()=>ne,cgF:()=>B,d5A:()=>P,dz_:()=>rt,e6f:()=>c,eNL:()=>Ut,eSY:()=>St,eWj:()=>j,eZG:()=>Ot,enc:()=>r.en,g3o:()=>l,hWV:()=>ve,htx:()=>_e,iGu:()=>gt,ihJ:()=>Nt,ikI:()=>yt,k4Y:()=>Le,k6b:()=>Se,khs:()=>tt,lDH:()=>ce,lFB:()=>Me,mA2:()=>r.mA,mip:()=>Rt,mzn:()=>ht,n2U:()=>Je,o4S:()=>Qe,o5i:()=>at,oFY:()=>Ne,oFv:()=>nt,ojr:()=>ct,oyV:()=>Ze,p0m:()=>a,p5T:()=>O,pZ0:()=>ie,pj7:()=>N,q4i:()=>be,qVe:()=>V,qht:()=>S,rkp:()=>we,s6w:()=>Ue,sMR:()=>qe,skl:()=>pe,t84:()=>Ge,tE2:()=>et,tP9:()=>pt,tsC:()=>I,tuf:()=>Ye,uEj:()=>Lt,ucV:()=>De,ueo:()=>m,ugz:()=>r.ug,uyM:()=>w,v5s:()=>Dt,vQ3:()=>M,vc0:()=>$e,vnr:()=>Ee,wIO:()=>R,wMq:()=>Pe,wWq:()=>Pt,wXB:()=>Re,wl5:()=>Ie,wq9:()=>G,x8:()=>ot,xEc:()=>Q,xWh:()=>Ct,x_7:()=>r.x_,xkq:()=>te,y2l:()=>oe,yJ8:()=>ge,yOO:()=>f,yon:()=>E,yt8:()=>b,yux:()=>g,z53:()=>L,zJD:()=>u,ztB:()=>ze});var i=n(92336),r=n(43329);let s=function(e){return e.DISABLED="DISABLED",e.HELMET="HELMET",e.HELMET_AND_SOUND="HELMET_AND_SOUND",e.FELIX="FELIX",e}({});const a=(0,i.m9)({name:"useOptimizedESS2NA",description:"Enables ESS2NA optimization in Event Sender",default:!1}),o=(0,i.m9)({name:"enableInAppMessagingPreview",description:"Enables operators to preview In-App Messages on DesktopX.",default:!1}),l=(0,i.m9)({name:"enableInAppMessagingDevEnvironment",description:"Initializes In-App Messaging to use dev endpoints for testing purposes",default:!1}),c=(0,i.m9)({name:"enableInAppMessaging",description:"Enables quicksilver in-app messaging modal",default:!0}),u=(0,i.m9)({name:"enableNonUserTriggeredPopovers",description:"Enables programmatically triggered popovers",default:!0}),d=(0,i.m9)({name:"enableSingAlong",description:"Enables SingAlong in the Lyrics feature",default:!1}),p=((0,i.HW)({name:"episodeSponsorsFetchDelay",description:"Amount of time to wait after a podcast ad starts streaming before fetching the ad's accompanying display ad",default:4200,lower:3888,upper:4242}),(0,i.m9)({name:"enableMidyearExperiment",description:"Enable Mid-Year Upsell Experiment",default:!1})),m=(0,i.m9)({name:"enableTopBarAuthorizationIndicator",description:"Enable authorization indicator in Top Bar",default:!1}),h=(0,i.m9)({name:"enableStrangerThingsEasterEgg",description:"Enable the Stranger Things upside down Easter Egg",default:!1}),f=(0,i.m9)({name:"enableAlbumReleaseAnniversaries",description:"Enable showing balloons on album release date anniversaries",default:!1}),g=(0,i.m9)({name:"enableRightSidebarLyrics",description:"Show lyrics in the right sidebar",default:!1}),E=(0,i.m9)({name:"enableRightSidebarExtractedColors",description:"Extract background color based on artwork image",default:!1}),_=(0,i.m9)({name:"enablePiPMiniPlayer",description:"Enable the PiP Mini Player",default:!0}),y=(0,i.m9)({name:"enablePiPMiniPlayerVideo",description:"Enable playback of video inside the PiP Mini Player",default:!0}),v=(0,i.m9)({name:"enableCinemaMode",description:"Enable cinema mode",default:!0}),b=(0,i.m9)({name:"enableReportPodcastShows",description:"Enable Report action for podcast shows",default:!1}),S=(0,i.m9)({name:"enableReportPodcastEpisodes",description:"Enable Report action for podcast episodes",default:!1}),A=(0,i.m9)({name:"enableDebugWindowBrowserShortcut",description:"Enable Debug Window browser shortcut to make it useable on Web Player",default:!1}),C=(0,i.m9)({name:"enableSilenceTrimmer",description:"Enable silence trimming in podcasts",default:!1}),T=(0,i.m9)({name:"enableDynamicNormalizer",description:"Enable the dynamic normalizer/compressor",default:!1}),I=(0,i.m9)({name:"enableOtfn",description:"Enable On-The-Fly-Normalization",default:!1}),O=(0,i.m9)({name:"enableYourDJ",description:'Enables the "Your DJ" feature',default:!1}),w=(0,i.m9)({name:"enablePremiumPage",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Recurring Markets",default:!1}),N=(0,i.m9)({name:"enablePremiumPagePrepaid",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Prepaid Markets",default:!1}),R=(0,i.m9)({name:"enablePremiumPageKorea",description:"Rollout Premium Page feature for Korea in the Desktop/Webplayer",default:!1}),P=(0,i.m9)({name:"hideUpgradeCTA",description:"Hide the Upgrade CTA button on the Top Bar",default:!1}),L=(0,i.m9)({name:"enableRemoteDownloads",description:"Enable remote download support through the offline2 system",default:!1}),D=(0,i.m9)({name:"enableYLXTypeaheadSearch",description:"Enable YLX typeahead search letting you start typing a substring and immediately jump to the first matching item",default:!1}),k=((0,i.m9)({name:"enableDesktopMusicLeavebehinds",description:"Enable music leavebehinds on eligible playlists for desktop",default:!1}),(0,i.m9)({name:"enableCanvasAds",description:"Enable Canvas for ads",default:!1})),x=((0,i.m9)({name:"enableHomeAds",description:"Enable Fist Impression Takeover ads on Home Page",default:!1}),(0,i.BL)({name:"enableMandalorianEasterEgg",description:"Enable the Mandalorian easter-egg",values:s,default:s.DISABLED})),U=(0,i.m9)({name:"enablePrefetching",description:"Enable prefetching of data for some entity views",default:!1}),M=(0,i.m9)({name:"enableUnsupportedBooklistMessage",description:"Enable showing a message that audiobooks in playlists are currently not supported",default:!1}),B=(0,i.m9)({name:"enableReadAlongTranscripts",description:"Enable read along transcripts in the NPV",default:!0}),j=(0,i.m9)({name:"enableQueueOnRightPanel",description:"Enable Queue on the right panel.",default:!0}),F=(0,i.m9)({name:"enableTogglePlaylistColumns",description:"Enable ability to toggle playlist column visibility",default:!1}),V=(0,i.m9)({name:"enableExtraTracklistColumns",description:"Enable extra tracklist columns",default:!1}),G=(0,i.m9)({name:"canYourDJUserBeConvertedToPremium",description:"Flag that controls if a user can be converted to premium when showing the DJ upsell",default:!0}),H=(0,i.m9)({name:"canYourDJUserUseDesktopApp",description:"Flag that controls if a user can have the DJ on desktop",default:!1}),W=(0,i.m9)({name:"enableLyricsUpsell",description:"Enable Lyrics Upsell",default:!1});let z=function(e){return e.CONTROL="CONTROL",e.TRUNCATED_LYRICS="TRUNCATED_LYRICS",e.EMPTY_LYRICS="EMPTY_LYRICS",e}({});const K=(0,i.BL)({name:"forceLyricsUpsell",description:"Force Lyrics Upsell for testing",values:z,default:z.CONTROL}),Y=(0,i.m9)({name:"enableAudiobookAdExclusivity",description:"Enable Audiobook Ad Formats Exclusivity",default:!0});let q=function(e){return e.CONTROL="CONTROL",e.UPSELL_SIMPLE="UPSELL_SIMPLE",e.UPSELL_POPOVER="UPSELL_POPOVER",e}({});(0,i.BL)({name:"musicVideosPremiumUpsell",description:"Testing Premium upsell for Free users on music videos",values:q,default:q.CONTROL});const $=(0,i.m9)({name:"enableNPVideosV2",description:"Enable NPV 2.0 Video experience for testing",default:!1}),Z=(0,i.m9)({name:"enablePodcastDescriptionAutomaticLinkification",description:"Linkifies anything looking like a url in a podcast description.",default:!1}),Q=(0,i.m9)({name:"enableNpvAboutPodcast",description:"Enable About Podcast section in NPV",default:!1}),J=(0,i.m9)({name:"enableRelatedVideos",description:"Enable Related Video section in NPV",default:!1}),X=(0,i.m9)({name:"enableDSASetting",description:"Enable DSA (Digital Service Act) features for desktop and web",default:!1}),ee=((0,i.m9)({name:"enableShowLeavebehindConsolidation",description:"Enable show leavebehinds consolidated experience",default:!1}),(0,i.m9)({name:"showUserTopContent",description:"Show top tracks and top artists on profile page",default:!0})),te=((0,i.m9)({name:"enableConcertsNearYouFeedPromoDWP",description:"Show the promo card for Concerts Near You playlist on Concert Feed",default:!1}),(0,i.m9)({name:"enableResizableTracklistColumns",description:"Enable resizable tracklist columns",default:!1})),ne=(0,i.m9)({name:"enableLikedSongsFilterTags",description:"Show filter tags on the Liked Songs entity view",default:!1}),ie=(0,i.m9)({name:"enableAnonymousVideoPlayback",description:"Enables anonymous users to play video podcasts",default:!1}),re=(0,i.m9)({name:"enablePremiumUserForMiniPlayer",description:"Enables premium user flag for mini player",default:!1}),se=(0,i.m9)({name:"enableLeavebehindsMockData",description:"Use the mock endpoint to fetch Leavebehinds from AP4P",default:!1}),ae=(0,i.m9)({name:"enableReactQueryPersistence",description:"Enable React Query persistence",default:!0}),oe=(0,i.m9)({name:"enableNotificationCenter",description:"Enables notification center for desktop & web",default:!1}),le=(0,i.m9)({name:"enableFullscreenMode",description:"Enable fullscreen mode",default:!1}),ce=(0,i.m9)({name:"enableYLXPrereleaseAlbums",description:"Enables album pre-releases in YLX",default:!1}),ue=(0,i.m9)({name:"enablePipImpressionLogging",description:"Enables impression logging for PiP",default:!1}),de=((0,i.m9)({name:"enableMoreLikeThisPlaylist",description:"Enables More Like This playlist for playlists the user cannot edit",default:!1}),(0,i.m9)({name:"enableWatchFeed",description:"Enable Watch Feed feature",default:!1})),pe=((0,i.m9)({name:"enableWatchFeedEntityPages",description:"Enable Watch Feed feature on entity pages",default:!1}),(0,i.m9)({name:"enableHybridHome",description:"Enable Hybrid Home feature",default:!1}),(0,i.m9)({name:"enableShowRating",description:"Enables new UI for rating books and podcasts",default:!1})),me=((0,i.m9)({name:"enableEsperantoMigrationLeaderboard",description:"Enable esperanto Migration for Leaderboard Ad Format",default:!0}),(0,i.m9)({name:"enableConcertsInSearch",description:"Enables concerts in search",default:!1})),he=(0,i.m9)({name:"enableLocalConcertsInSearch",description:"Enables local concert recommendations in search",default:!1});let fe=function(e){return e.CONTROL="control",e.CANVAS_PLAY_LOOP="canvas-play-loop",e.CANVAS_PLAY_ON_HOVER="canvas-play-on-hover",e}({});const ge=(0,i.BL)({name:"enableCanvasNpv",description:"Enables short, looping visuals on tracks.",default:fe.CONTROL,values:fe}),Ee=(0,i.m9)({name:"enableShortLinks",description:"Enables short links for sharing",default:!1}),_e=(0,i.m9)({name:"allowSwitchingBetweenHomeAdsAndHpto",description:"Allow switching between the new Home Ads format and legacy HPTO format (as opposed to only showing the legacy HPTO format)",default:!1}),ye=((0,i.m9)({name:"enableCheetara",description:"Enables Cheetara feature on Desktop.",default:!1}),(0,i.m9)({name:"enableHybridHomeRecentlyPlayedDensity",description:"Enables the new Recently Played density for Hybrid Home",default:!1})),ve=(0,i.m9)({name:"enableHybridHomeLowDensity",description:"Enables the new low density (grid) for Hybrid Home",default:!1}),be=(0,i.m9)({name:"enableHybridHomeFeedBaseline",description:"Enables the new Feed Baseline for Hybrid Home",default:!1}),Se=(0,i.m9)({name:"enableSpotlight",description:"Enables the Spotlight component on home",default:!1}),Ae=(0,i.m9)({name:"enableNpvCreditsImpressions",description:"Enable impressions for credits in the Now Playing View for desktop and web",default:!1}),Ce=((0,i.HW)({name:"foregroundSessionDebounceTime",description:"Debounce time in milliseconds for foreground session tracking.",default:0,lower:0,upper:6e4}),(0,i.m9)({name:"enableVenuePages",description:"Enables venus pages",default:!1})),Te=(0,i.m9)({name:"enableVideoAutoplayHome",description:"Enables video autoplay on home",default:!1}),Ie=(0,i.m9)({name:"enableVideoAutoplayNPV",description:"Enables video autoplay in NPV",default:!1}),Oe=(0,i.m9)({name:"enableVideoAutoplayAlways",description:"Enables video autoplay in all the surfaces. Has priority over the other flags",default:!1}),we=(0,i.m9)({name:"disablePremiumOnlyModal",description:"Disable the Premium Only Modal",default:!1}),Ne=(0,i.m9)({name:"enableYourSoundCapsuleModal",description:"Enables showing a modal on desktop to users who have clicked on a Your Sound Capsule share link",default:!1}),Re=(0,i.m9)({name:"enableTuna",description:"Enables Tuna feature",default:!1}),Pe=((0,i.m9)({name:"enableYscUpgradeEligible",description:"Determines if a user is in a country where Your Sound Capsule is available",default:!1}),(0,i.m9)({name:"enableScrollDrivenAnimations",description:"Enables scroll driven animations for cards and shelved",default:!1}));const Le=(0,i.m9)({name:"enableHomeSubfeedFeedBaseline",description:"Enables 1D cards in subfeed pages",default:!1}),De=(0,i.m9)({name:"enableYourEpisodesListPlatform",description:"Enables Your Episodes on list platform",default:!1}),ke=(0,i.m9)({name:"enableLikedSongsListPlatform",description:"Enables Liked Songs on list platform",default:!1}),xe=(0,i.m9)({name:"enableOfflineAlbumsListPlatform",description:"Enable offline albums loaded over List Platform",default:!1}),Ue=(0,i.m9)({name:"enableLyrics",description:"Feature flag that controls the availability of the lyrics feature",default:!0}),Me=(0,i.m9)({name:"enableAlignedCurationSavedIn",description:"Enables the Saved In section in Aligned Curation",default:!1}),Be=(0,i.HW)({name:"enableSearchCategoryResultsCaching",description:"Enable caching of search category results. The number defines the amount of result pages to keep in cache.",default:2,lower:0,upper:10}),je=(0,i.m9)({name:"enableVideoUnsupportedTransfer",description:"Enables option to transfer to local playback when trying to enable video on device that does not support it.",default:!1});let Fe=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT_A="variant-a",e.VARIANT_B="variant-b",e.VARIANT_C="variant-c",e}({});const Ve=(0,i.BL)({name:"enableChartsMVPUserTestDWP1",description:"Enable Charts MVP User Test 1 on unauth dwp home page",values:Fe,default:Fe.DEFAULT}),Ge=(0,i.m9)({name:"enableBuddyFeedBatchSubs",description:"Switches to using the new endpoints to subscribe and unsubscribe in batches instead of for each individual friend",default:!1});let He=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});const We=(0,i.BL)({name:"enableBrotliCompressionViaCDN",description:"Enable Brotli compression via Fastly CDN",values:He,default:He.Default});let ze=function(e){return e.CONTROL="CONTROL",e.WEBPLAYERPDP="WEBPLAYERPDP",e}({});const Ke=(0,i.BL)({name:"ugoTestOrganicPointsIntoWebPlayerPDP",description:"Testing Organic Entry points into PDP",values:ze,default:ze.CONTROL});let Ye=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});const qe=(0,i.BL)({name:"enableLyricsReturnsHoldbackDWP",description:"Enable holdback group for lyrics returns",values:Ye,default:Ye.Default});let $e=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});const Ze=(0,i.BL)({name:"enableLyricsReturnsTreatmentDWP",description:"Enable treatment group for lyrics returns",values:$e,default:$e.Default}),Qe=(0,i.m9)({name:"enableSurveyAds",description:"Enable Spotify Brand Lift (SBL) Surveys in the NPV",default:!1}),Je=(0,i.m9)({name:"enableTheStageDesktop",description:"Enable embeddable microsite experience (The Stage)",default:!1}),Xe=(0,i.m9)({name:"enableTheStageDesktopDebug",description:"Enable debug messages for The Stage",default:!1}),et=(0,i.m9)({name:"enableConcertUserLocationSelector",description:"Enable user location selector on concerts",default:!1}),tt=(0,i.m9)({name:"enableLyricsFullAvailabilityCheck",description:"Enable full availability check before showing the mic button for lyrics",default:!1}),nt=((0,i.m9)({name:"enableEFlag",description:"Enables the Employee Flag to send to Sentry.",default:!1}),(0,i.m9)({name:"enableMarkBookAsFinished",description:"Enable the ability to mark a book as finished",default:!1})),it=(0,i.m9)({name:"enableHomeCarousels",description:"Enable carousels on home",default:!1}),rt=(0,i.m9)({name:"enableDesktopOnboarding",description:"Enable new minimal Desktop Onboarding experience",default:!1}),st=(0,i.m9)({name:"enableHomePin",description:"Enable pinning of home shelves",default:!1}),at=(0,i.m9)({name:"enableFeedBaselineAudioPreviews",description:"Enable audio previews in the Big Cards",default:!1}),ot=(0,i.m9)({name:"enableFeedBaselineVideoPreviews",description:"Enable video previews in the Big Cards",default:!1});let lt=function(e){return e.DEFAULT="default",e.CONTROL="control",e.TOP="top",e.SECOND="second",e}({});const ct=(0,i.BL)({name:"enableUnauthHomeTrending",description:"Enables new Trending Songs shelf on unauth home",values:lt,default:lt.DEFAULT}),ut=(0,i.m9)({name:"enableGatedPodcasts",description:"Enable gated podcasts experience",default:!1}),dt=(0,i.m9)({name:"disableLatestEpisodeOnShow",description:"Hide latest episode block on show page",default:!1});let pt=function(e){return e.Default="default",e.Control="control",e.Above="above",e.Below="below",e}({});const mt=(0,i.BL)({name:"enablePopularEpisodesOnShowDWP",description:"Enables popular episodes on show entity pages",values:pt,default:pt.Default}),ht=(0,i.m9)({name:"enableImprovedCinemaMode",description:"Enable improved cinema mode",default:!1}),ft=((0,i.m9)({name:"enableDirectDownloadFunnel",description:"Enable direct downloads from web player download page and top bar button",default:!0}),(0,i.m9)({name:"enablePersonalizedShare",description:"Enable personalized share",default:!1})),gt=(0,i.m9)({name:"enableUserCommentsForEpisodes",description:"Enable user comments for podcast episodes",default:!1}),Et=(0,i.m9)({name:"enableUnifiedSmartShuffleSignals",description:"Enable sending explicit Smart Shuffle signals via the Player and allow it to handle implicit signals internally",default:!1}),_t=(0,i.m9)({name:"enableAudiobookCopyrightsOverride",description:"Override to enable showing copyrights on audiobook pages",default:!1}),yt=(0,i.HW)({name:"enableAmbientModeTimer",description:"Enable the cinema mode to go into ambientMode after a certain time of no mouse interaction",default:3,lower:2,upper:10}),vt=(0,i.m9)({name:"enableAlbumSortByReleaseDate",description:"Enable ability to sort collection albums by release date",default:!1}),bt=(0,i.m9)({name:"enablePeekNpv",description:"Enable the Peek NPV feature",default:!1}),St=(0,i.m9)({name:"enableFeedBaselineTranscripts",description:"Enable transcripts in the Big Cards",default:!1}),At=(0,i.m9)({name:"enableConcertsNotInterested",description:"Enable user to set not interested on concerts",default:!1}),Ct=(0,i.m9)({name:"enableGlobalCreateButton",description:"Enable plus button for creating different types of playlists from global nav bar",default:!1}),Tt=(0,i.m9)({name:"enableZoomSettingsUIDesktop",description:"Enable zoom settings from the settings page on Desktop",default:!1});let It=function(e){return e.OFF="off",e.REAL="real",e.RAND="rand",e}({});const Ot=(0,i.BL)({name:"feedBaselineAudioWaveMode",description:"Enable audio wave in the Big Cards",default:It.OFF,values:It}),wt=(0,i.m9)({name:"enableConnectedStateObserver",description:"Enable observer that logs errors related to connected state and ad info",default:!0}),Nt=(0,i.m9)({name:"enableEventsInYourLibrary",description:"Enable event chips and event items in your library",default:!1}),Rt=(0,i.m9)({name:"enableEsperantoAdStateReportManager",description:"Enables esperanto migration of the adStateReportManager",default:!1}),Pt=(0,i.HW)({name:"homeSectionsLimits",description:"Defines the number of items per shelf on the home page",default:10,lower:10,upper:40}),Lt=(0,i.HW)({name:"homeFullPageSectionsLimits",description:"Define the number of items on the full page shelf",default:20,lower:20,upper:50}),Dt=(0,i.m9)({name:"enablePathfinderPostV2Query",description:"Enable POST V2 query for Pathfinder",default:!1}),kt=(0,i.m9)({name:"enableAudiobookCardPlayButton",description:"Enable play button on audiobook cards on home, search and browse",default:!1}),xt=(0,i.m9)({name:"enableAuthorPage",description:"Enable author page",default:!1}),Ut=(0,i.m9)({name:"enableAmbientModeForMiniplayer",description:"Enable Ambient Mode for Miniplayer",default:!1})},66534:(e,t,n)=>{"use strict";n.d(t,{Ch:()=>c,P8:()=>s,e2:()=>a,jV:()=>l,ob:()=>o,yA:()=>r});const i=e=>`:${e}`,r=i("showId"),s=e=>`/show/${e}`,a=s(r),o=i("episodeId"),l=e=>`/episode/${e}`,c=l(o)},86551:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>i,mo:()=>s,q:()=>r});const i=e=>{let t;return t=e.session.user?e.session.user.country:e.session.market,void 0===t&&e.session.productState&&(t=e.session.productState.country),t},r=e=>"KR"===i(e),s=e=>"RU"===i(e)},21020:(e,t,n)=>{"use strict";n.d(t,{MU:()=>a,NR:()=>o,uX:()=>s});var i=n(42551);const r=e=>e.features,s=(0,i.Mz)(r,(e=>e?.enableShows||!1)),a=(0,i.Mz)(r,(e=>e?.enableI18nLocales||!1)),o=(0,i.Mz)(r,(e=>e?.isI18nAdditionalPagesEnabled||!1))},691:(e,t,n)=>{"use strict";n.d(t,{LO:()=>c,QT:()=>l,nc:()=>u,oc:()=>o,uY:()=>a});var i=n(42551),r=n(7307);const s=e=>e.seoExperiment,a=(0,i.Mz)(s,(e=>e?.uri)),o=(0,i.Mz)(s,(e=>e?.[r.c.TRACK])),l=(0,i.Mz)(s,(e=>e?.[r.c.ARTIST])),c=(0,i.Mz)(s,(e=>e?.[r.c.PLAYLIST])),u=(0,i.Mz)(s,(e=>e?.[r.c.PLAYLISTV2]))},36061:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>c,F6:()=>l,Ht:()=>i,Mn:()=>o,Yb:()=>a,mB:()=>r,oo:()=>s});const i=e=>e.session,r=e=>e.session?.user||void 0,s=e=>e.session?.productState?.catalogue,a=e=>"free"===e.session?.productState?.catalogue?.toLowerCase(),o=e=>e.session?.user?.display_name,l=e=>e.session?.user?.id,c=e=>"1"===e.session?.productState?.["filter-explicit-content"]},83747:(e,t,n)=>{"use strict";n.d(t,{GP:()=>i,fl:()=>r,ml:()=>s});const i=e=>e.ui.improvedSignupPromptDialog.isOpen,r=e=>e.ui.yourSoundCapsuleModal.isOpen,s=e=>e.ui.videoNotSupportedModal.isOpen},27831:(e,t,n)=>{"use strict";n.d(t,{J:()=>i,O:()=>r});const i="REQUEST_ME_SUCCESS",r="REQUEST_PRODUCT_STATE_SUCCESS"},78412:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>r,IE:()=>l,Rv:()=>u,ZQ:()=>c,a7:()=>o,oM:()=>a,wH:()=>s,zf:()=>d});var i=n(9534);function r(){return{type:i.xM}}function s(){return{type:i.tQ}}function a(){return{type:i.l3}}function o(e){return{type:i.ro,authData:e}}function l(e){return{type:i.Zz,name:e}}function c(e){return{type:i.L0,images:e}}function u(e){return{type:i.Vx,country:e}}function d(e){return{type:i.dD,locale:e}}},9534:(e,t,n)=>{"use strict";n.d(t,{L0:()=>s,Vx:()=>c,Zz:()=>r,dD:()=>u,l3:()=>l,ro:()=>i,tQ:()=>o,xM:()=>a});const i="ACCESS_TOKEN_UPDATE_SUCCESS",r="UPDATE_DISPLAY_NAME_SUCCESS",s="PROFILE_IMAGES_UPDATE_SUCCESS",a="LOAD",o="LOGOUT_REQUEST",l="LOGOUT_SUCCESS",c="SET_COUNTRY_OVERRIDE",u="SET_LOCALE_OVERRIDE"},47756:(e,t,n)=>{"use strict";n.d(t,{EL:()=>s,YU:()=>i,aY:()=>r});let i=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e}({}),r=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e.fullscreen="fullscreen",e}({}),s=function(e){return e.INVITE="invite",e.JOIN="join",e.JOIN_LISTENING_SESSION="joinListeningSession",e.JOIN_NEARBY_JAM="join_nearby_jam",e.REDIRECT="redirect",e.LEAVE_SESSION="leaveSession",e.END_SESSION="endSession",e.SESSION_ENDED="sessionEnded",e.REMOVE_PARTICIPANT="remove_participant",e.ERROR="error",e}({})},33549:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});class i extends Error{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace?.(this,this.constructor)}}},42795:(e,t,n)=>{"use strict";n.d(t,{Pm:()=>l,s1:()=>d,yV:()=>r});var i=n(39332);let r=function(e){return e.DEFAULT="DEFAULT",e.YLX="YLX",e.HOME_REGULAR_DENSITY="HOME_REGULAR_DENSITY",e.HOME_HIGH_DENSITY="HOME_HIGH_DENSITY",e.HOME_LOW_DENSITY="HOME_LOW_DENSITY",e.HOME_FEED_BASELINE="HOME_FEED_BASELINE",e.WATCH_FEED="WATCH_FEED",e.MUSIC_VIDEOS="MUSIC_VIDEOS",e.BROWSE="BROWSE",e}({});const s=Number(i.A.screenLg.replace("px",""))||1200,a=Number(i.A.homeRegularDensityMinWidth.replace("px",""))||210,o=Number(i.A.homeRegularDensityMinWidthSmallScreens.replace("px",""))||160,l=Number(i.A.homeFeedBaselineMinWidth.replace("px",""))||380,c=(e,t)=>{const{gridWidth:n,columnGap:i}=e,r=Math.max(1,Math.ceil((n+i)/(t+i)));return Math.ceil((r*t-(r-1)*i)/(r+1)+1)},u={[r.DEFAULT]:()=>({getMinimumColumnWidth:()=>180}),[r.YLX]:(e=1)=>({getMinimumColumnWidth:()=>170*e}),[r.BROWSE]:()=>({getMinimumColumnWidth:({gridWidth:e})=>e<520?180:e<1280?254:300}),[r.HOME_REGULAR_DENSITY]:()=>({getMinimumColumnWidth:({gridWidth:e})=>e({getMinimumColumnWidth:({gridWidth:e})=>e({getMinimumColumnWidth:()=>370,getMaxRowCount:()=>2}),[r.WATCH_FEED]:()=>({getMinimumColumnWidth:e=>c(e,210)}),[r.MUSIC_VIDEOS]:()=>({getMinimumColumnWidth:e=>c(e,400)}),[r.HOME_FEED_BASELINE]:()=>({getMaxRowCount:()=>100,getMinimumColumnWidth:()=>l})},d=(e,t)=>u[e](t)},71217:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,O:()=>r});const i=e=>e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement||e instanceof HTMLDivElement;let r=function(e){return e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right",e.HOME="home",e.END="end",e}({})},42871:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(30758);const r=({ref:e,getFocusElement:t,onFocus:n,preventScroll:r,deps:s=[]})=>{const a=(0,i.useRef)(t),o=(0,i.useRef)(n);a.current=t,o.current=n;const l=(0,i.useRef)(null);(0,i.useEffect)((()=>{l.current=document.activeElement;const t=a.current?.(e.current)??e.current;n?o.current?.(t):t?.focus({preventScroll:r})}),s)}},73891:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(30758),r=n(22949);const s=(e,t=!1)=>{const n=(0,i.useCallback)((()=>{if(!e.current)return;Array.from(e.current.querySelectorAll(r.ru)).forEach((e=>e.setAttribute("tabindex","-1")))}),[e]);(0,i.useEffect)(n),(0,i.useEffect)((()=>{let i=null;return t&&(i=new MutationObserver(n),i.observe(e.current,{childList:!0,subtree:!0})),()=>i?.disconnect()}),[t,e,n])}},6217:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var i=n(30758);const r=({onRestoreFocus:e,deps:t=[]}={})=>{const n=(0,i.useRef)(null);(0,i.useRef)(e).current=e,(0,i.useEffect)((()=>(n.current=document.activeElement,()=>{e?e?.(n.current):n.current?.focus({preventScroll:!0})})),t)}},22949:(e,t,n)=>{"use strict";n.d(t,{MS:()=>l,fk:()=>o,nu:()=>s,oj:()=>r,ru:()=>a,tM:()=>c});const i=["a[href]:not([data-skip-in-keyboard-nav])","button:not([data-skip-in-keyboard-nav])","input:not([data-skip-in-keyboard-nav])",'[role="button"]:not([data-skip-in-keyboard-nav])','[role="progressbar"]:not([data-skip-in-keyboard-nav])'],r=i.map((e=>`${e}:focus-visible`)).join(", "),s=i.join(", "),a=['a:not([data-roving-interactive="1"])','button:not([data-roving-interactive="1"])','[role="button"]:not([data-roving-interactive="1"])','[role="progressbar"]:not([data-skip-in-keyboard-nav])'].join(", ");function o(e){const t=e.querySelector(s),n=e.querySelector('[tabindex="0"]')||t;return!!n&&(n.setAttribute("tabindex","0"),n.setAttribute("data-roving-interactive","1"),!0)}function l(e,t,{preventScroll:n}={preventScroll:!1}){t&&(e&&(e.removeAttribute("data-roving-interactive"),e.tabIndex=-1),t.tabIndex=0,t.setAttribute("data-roving-interactive","1"),t.focus({preventScroll:n}))}function c(e){return!!e&&!!e.querySelector(s)}},67174:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(31417);function r({h:e,m:t,s:n},r=" "){return[e?i.Ru.get("time.hours.short",e):"",t?i.Ru.get("time.minutes.short",t):"",n?i.Ru.get("time.seconds.short",n):""].filter((e=>""!==e)).join(r)}},55671:(e,t,n)=>{"use strict";n.d(t,{BG:()=>i,W$:()=>a,qF:()=>s,yf:()=>r});const i=["/daily-mix-hub","/made-for-you","/genre/made-for-x-hub","/genre/made-for-x-hub-blend"],r="/genre/0JQ5DAt0tbjZptfcdMSKl3",s="/genre/0JQ5DAqbMKFz6FAsUtgAab",a="/genre/0JQ5DAudkNjCgYMM0TZXDr"},27301:(e,t,n)=>{"use strict";n.d(t,{$K:()=>g,BW:()=>c,Bl:()=>p,Kw:()=>m,M0:()=>f,Oo:()=>l,S5:()=>s,Vd:()=>h,iG:()=>i,k$:()=>a,nw:()=>d,vE:()=>o,xD:()=>r,zd:()=>u});const i="https://open.spotify.com/",r="https://www.spotify.com/account/overview/",s="https://www.spotify.com/logout",a="https://www.spotify.com/account/privacy/",o="https://www.spotify.com/account/profile/",l="https://www.spotify.com/account/login-methods/",c="https://www.spotify.com/premium/",u="https://www.spotify.com/us/purchase/panel/",d="https://support.spotify.com/",p="https://www.spotify.com/legal/cookies-policy/",m="https://spotify.com/download",h="https://support.spotify.com/ru-ru/contact-spotify-legal-form/",f="https://spotify.com/premium/?utm_source=app&utm_medium=desktop&utm_campaign=upgrade",g="/__noul__"},33558:(e,t,n)=>{"use strict";n.d(t,{CT:()=>s,IH:()=>p,IU:()=>a,NW:()=>l,Xn:()=>c,Xq:()=>d,_h:()=>o,eA:()=>m,r0:()=>u});var i=n(63058),r=n(7307);const s="intl-",a=(new RegExp(`${`/${s}`}([a-zA-Z0-9-]+)`),[]),o=[i.h.id,i.h.de,"pt",i.h.ja,i.h.fr,i.h.ar,i.h.es,i.h.tr,i.h.it],l=[...o,...a],c=i.h.en,u=[],d=[],p=[],m=[r.c.ALBUM,r.c.ARTIST,r.c.TRACK,r.c.PREMIUM],[h]=(a.length>0?a[0]:o[0],i.h.hu,o);a.length||i.h.ca,i.h.zhCN,i.h.es419,i.h.es},30147:(e,t,n)=>{"use strict";n.d(t,{bi:()=>a,ql:()=>s,v7:()=>o,zz:()=>r});var i=n(30758);const r=(0,i.createContext)(""),s=(0,i.createContext)(null),a=(0,i.createContext)({scrollNodeRef:{current:null},scrollNodeChildRef:{current:null}}),o=()=>{const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'ScrollNodeContext' without 'ScrollNodeContext.Provider'!");return e.scrollNodeRef}},98712:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});let i=function(e){return e.XSMALL="XSMALL",e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e.XLARGE="XLARGE",e}({})},51354:(e,t,n)=>{"use strict";n.d(t,{o:()=>r,y:()=>s});var i=n(30758);const r=(0,i.createContext)(void 0),s=()=>(0,i.useContext)(r)},66583:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,x:()=>a});var i=n(30758),r=n(99644);function s(e,t,n){const[s,a]=(0,i.useState)(),o=Object.entries(e).sort(((e,t)=>t[1]-e[1]));return{ref:(0,r.w)({refOrElement:n,observeOnly:t,observeOnMount:!0,onResize:({[t]:e})=>{if(void 0===e)return;const n=o.find((([,t])=>e>=t)),i=n&&n[0];i&&i!==s&&a(i)}}),breakpoint:s}}function a(e,t){return s(e,"width",t)}function o(e,t){return s(e,"height",t)}},37488:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var i=n(30758),r=n(27102);const s=(e=!0)=>{const t=(0,r.ox)(),n=(0,r.ZY)(),[s,a]=(0,i.useState)((()=>!(!e||!n)&&n.hasFocus()));return(0,i.useEffect)((()=>{const i=()=>{a(!0)},r=()=>{a(!1)};return n&&e&&(a(n.hasFocus()),t?.addEventListener("focus",i),t?.addEventListener("blur",r)),()=>{t?.removeEventListener("focus",i),t?.removeEventListener("blur",r)}}),[n,e,t]),s}},72750:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(30758),r=n(30147);function s(e,{executeOnceOnStart:t=!1,disabled:n=!1}={}){const{scrollNodeRef:s}=(0,i.useContext)(r.bi);(0,i.useEffect)((()=>{const i=s.current;if(!n&&i){if(i.addEventListener("scroll",e),t)try{const t={...new Event("scroll"),target:i};e(t)}catch(e){}return()=>i.removeEventListener("scroll",e)}}),[s,e,t,n])}},19830:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var i=n(30758),r=n(59961);const s=e=>{const t=(0,i.useMemo)((()=>(0,r.c)()?null:window.matchMedia(e)),[e]),[n,s]=(0,i.useState)((()=>!t||t.matches));return(0,i.useEffect)((()=>{if(!t||!t.addEventListener)return()=>{};const e=e=>{s(e.matches)};return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[t]),n}},59390:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var i=n(30758);function r(e){return(0,i.useMemo)((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}},34990:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var i=n(19830);const r=()=>(0,i.U)("(prefers-reduced-motion: reduce)")},99644:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var i=n(30758),r=n(59961);function s(e){return!(0,r.c)()&&e instanceof HTMLElement}let a;const o={subscribersByElement:new WeakMap,get resizeObserver(){return a||(a=new ResizeObserver((e=>{Array.isArray(e)&&e.forEach((t=>{const n={width:Math.round(t.contentRect.width),height:Math.round(t.contentRect.height)};(o.subscribersByElement.get(t.target)??new Set).forEach((i=>{i(n,t,e)}))}))}))),a}};function l({onResize:e,refOrElement:t,observeOnly:n,observeOnMount:r=!1}){const a=(0,i.useRef)(e);a.current=e;const l=(0,i.useRef)(n);l.current=n;const c=(0,i.useRef)({width:-1,height:-1}),u=(0,i.useCallback)(((e,t,n)=>{if(!a.current)return;const i=c.current.width!==e.width,r=c.current.height!==e.height;("width"===l.current&&i||"height"===l.current&&r||!l.current&&(i||r))&&a.current(e,t,n),c.current.width=e.width,c.current.height=e.height}),[]),d=function({refOrElement:e,subscriber:t}){let n=null;const r=(0,i.useRef)(null),a=(0,i.useRef)(null),o=(0,i.useRef)(null),l=(0,i.useRef)(),c=(0,i.useRef)(t);c.current=t;const u=(0,i.useCallback)((()=>{let t=null;a.current?t=a.current:r.current?t=r.current:s(e)&&(t=e),o.current!==t&&(l.current&&(l.current(),l.current=null),o.current=t,t&&c.current&&(l.current=c.current(t)))}),[e]),d=(0,i.useCallback)((e=>{a.current=e,u()}),[u]);e&&!s(e)&&(n=e);const p=(0,i.useCallback)((()=>{n?.current!==r.current&&(n&&(r.current=n.current),u())}),[n,n?.current,u]);return(0,i.useLayoutEffect)(p,[p]),(0,i.useEffect)(p,[p]),(0,i.useEffect)((()=>()=>{l?.current?.()}),[]),d}({refOrElement:t,subscriber:e=>(r&&u({width:e.offsetWidth,height:e.offsetHeight},null,[]),o.subscribersByElement.has(e)||(o.resizeObserver.observe(e),o.subscribersByElement.set(e,new Set)),o.subscribersByElement.get(e)?.add(u),()=>{o.subscribersByElement.get(e)?.delete(u),0===o.subscribersByElement.get(e)?.size&&(o.resizeObserver.unobserve(e),o.subscribersByElement.delete(e))})});return d}},66530:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var i=n(30758);function r(){const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,i.useCallback)((()=>e.current),[])}},35163:(e,t,n)=>{"use strict";n.d(t,{Jy:()=>u,Lu:()=>c,OV:()=>d,UD:()=>l,ig:()=>p,sV:()=>o});var i=n(18837),r=n(18254),s=n(22560);const a=["open.spotifycdn.com","xpui.app.spotify.com"],o=()=>(0,i.o5)(),l=e=>{(0,r.Cp)(e),console.error(e)},c=e=>{(0,i.v4)((t=>{t.setTag("FatalError","true"),l(e)}))},u=(e,t)=>{(0,i.v4)((n=>{n.setTag("ErrorBoundary",t),c(e)}))},d=e=>{(0,i.v4)((t=>{t.setTag("TopLevelError","true"),c(e)}))},p=(e,t,n={},i,r)=>{try{(0,s.T)({dsn:e,allowUrls:a,sampleRate:.1,tracesSampleRate:0,environment:"production",release:t,...n,integrations:r,ignoreErrors:[/\/[\dA-F]{8}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{12}\/main\.js/,/^NotFoundError: Failed to execute '(removeChild|insertBefore)' on 'Node': The node.*child.*this node.$/,/ResizeObserver loop limit exceeded/,"PresentationRequest",/DA97E0680A7030159BC0C0EE3A1D098E947A08E3/,/^This Suspense boundary received an update before it finished hydrating/]});const l=o();i&&l.setTag("container",i),""!==document.referrer&&l.setExtra("referrer",document.referrer)}catch(e){console.error(e)}}},82935:(e,t,n)=>{"use strict";n.d(t,{f:()=>o,h:()=>a});var i=n(97701),r=n(63096),s=n(59961);const a=(e=[],{desiredSize:t=300,desiredLabel:n=""}={})=>{0===t&&(t=300);const i=!(0,s.c)()&&(window?.devicePixelRatio>1||window?.matchMedia&&window?.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches)?2:1;return(0,r.g)(e,{desiredSize:t*i,desiredLabel:n})?.url},o=e=>{if(-1===e||Number.isNaN(e))return"-:--";const{hours:t,minutes:n,seconds:r}=(0,i.S)(e);return`${t>0?`${t}:`:""}${t>0&&n<10?`0${n}`:n}:${r<10?`0${r}`:r}`}},49769:(e,t,n)=>{"use strict";n.d(t,{X:()=>a});class i extends Map{}class r{_batch=new i;_additions=new i;_deletions=new i;_timeoutId=null;constructor(e,t,n,i,r=0){this._onBatch=e,this._onAdd=t,this._onRemove=n,this._onUpdate=i,this._timeout=r}onUpdate(){this._timeoutId=null,this._onUpdate(this._batch,this._additions,this._deletions),this._onBatch(this._batch)}scheduleUpdate(){null===this._timeoutId&&(this._timeoutId=setTimeout(this.onUpdate.bind(this),this._timeout))}getBatch(){return this._batch}subscribe(e,t){this._onAdd(this._additions,e,t),this._onRemove(this._deletions,e,t),this.scheduleUpdate()}unsubscribe(e,t){this._onAdd(this._deletions,e,t),this._onRemove(this._additions,e,t),this.scheduleUpdate()}}class s extends r{}function a(e,t=0){return new s(e,((e,t)=>{const n=e.get(t);void 0!==n?e.set(t,n+1):e.set(t,1)}),((e,t)=>{const n=e.get(t);void 0!==n&&(n-1==0?e.delete(t):e.set(t,n-1))}),((e,t,n)=>{n.forEach(((t,n)=>{const i=e.get(n)||0;i-t<=0?e.delete(n):e.set(n,i-t)})),n.clear(),t.forEach(((t,n)=>{const i=e.get(n)||0;e.set(n,i+t)})),t.clear()}),t)}},26702:(e,t,n)=>{"use strict";async function i(e,t,n=50){const i=[];for(let r=0;ri})},43798:(e,t,n)=>{"use strict";n.d(t,{gf:()=>l,QH:()=>c,Nu:()=>d});var i=n(1599),r=n(72671);const s=async(e,t,n)=>(n??="com.widevine.alpha",(await e.build().withMethod("GET").withHost(r.FN).withPath(`/unauth/episode/${t}/${n}`).withEndpointIdentifier("/unauth/episode/{episodeId}/{keysystem}").send()).body);var a=n(91008),o=n(31921);function l(e){return 0===e.showTypes?.length}function c(e,t){return e.uri===t.trailer?.uri}const u=e=>{const t=e?.split(".").pop()?.split("?")[0]?.toUpperCase();return t&&t in o.g?t:o.g.MP3};async function d(e,t,n){const r=(0,a.o_h)(e.uri),o=await s(i.n.getInstance(),r?.id,t);if("video"===n)return{format:"MANIFEST_ID",mediaType:n,noManifest:!1,fileId:o.video?.[0].manifestId};const l="ALLOWED"===o.passthrough?u(o.passthroughUrl):o.format?.replace(/_(128|256)/,""),c="NONE"!==o.passthrough,d=c&&o.passthroughUrl;return{format:l,mediaType:n??"audio",noManifest:c,url:d?o.passthroughUrl:o.url[0],fileId:d?"":o.fileId}}},1599:(e,t,n)=>{"use strict";n.d(t,{n:()=>S});var i=n(68355),r=n(32810),s=n(21398),a=n(69962),o=n(30561);function l(e){return`${e.method}::${e.host}${e.path}::${JSON.stringify(e.queryParameters)}`}function c(e,t,n){try{(0,r.fE)({metric_type:i.MetricTypes.COUNTER,what:"request-rate",value:1,tags:{endpoint:e,statusCode:t,isFatal:n}}).catch((()=>({})))}catch(e){}}class u extends a.t{constructor(e){super(e),this.pendingRequests=new Set}resetPendingRequests(){this.pendingRequests=new Set}build(){const e=super.build();let t;return e.onBeforeSend=()=>{if(t=l(e),this.pendingRequests.has(t)){const e=new Error(`DUPLICATE_REQUEST_ERROR: Already sent this request (${t})`);throw e.name="DUPLICATE_REQUEST_ERROR",e}"GET"===e.method.toUpperCase()&&this.pendingRequests.add(t)},e.onAfterSend=n=>{t=l(e);let a="unknown",u=!1;if(null!==e.endpointIdentifier&&(u=!0,a=`${e.method} ${e.hostIdentifier||"unknown-host"}::${e.endpointIdentifier}`),this.pendingRequests.delete(t),n){u&&c(a,JSON.stringify(n.status||0),JSON.stringify(0===(e.endpointIdentifier||"").indexOf("/me")));if(("code"in n?n.code:void 0)!==o.TransportErrors.HTTP_REQUEST_ABORTED)throw s.O.fromResponse(n,e.method)}else if(u){c(a,"200","false");const t=Date.now()-(e.startTimestamp||0);!function(e,t,n){try{(0,r.fE)({metric_type:i.MetricTypes.TIMER,what:"request-duration",value:n,tags:{endpoint:e,statusCode:t}}).catch((()=>({})))}catch(e){}}(a,"200",i.Time.fromMillis(t).asNanos())}},e}}var d=n(74663),p=n(56324),m=n(72817),h=n.n(m),f=n(59208),g=n.n(f);const E=h()(p.fetch);async function _(e,t,n=1e4){const i=new(g()),r=i.signal,a=setTimeout((()=>i.abort()),n),o=function(e){return e&&void 0!==e.retries&&e.retries>0?E:p.fetch}(t);return o(e,{...t,signal:r}).then((e=>(clearTimeout(a),e))).catch((i=>{if("AbortError"===i.name)throw new s.J({timeout:n,url:e,method:t?.method??"get"});throw clearTimeout(a),i}))}class y{constructor(e,t){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._includeCredentials=!1,this._endpointIdentifier=null,this._abortSignal=null,this}withQueryParameters(e){this.queryParameters=e}withResponseType(e){this.responseType=e}withPostData(e){this.postData=e}withEndpointIdentifier(e){this._endpointIdentifier=e}addHeader(e,t){return this._headers[e]=t,this}includeCredentials(){return this._includeCredentials=!0,this}withAbortSignal(e){return this._abortSignal=e,this}async send(){let e;this.postData&&(e=this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?JSON.stringify(this.postData):this.postData);const t=new URLSearchParams(this.queryParameters).toString(),n=i.Timer.start(),a=await _(`${this.url}${t?`?${t}`:""}`,{method:this.method,body:e,credentials:this._includeCredentials?"include":void 0,signal:this._abortSignal,headers:{"User-Agent":{}.SERVER_UA,"Content-Type":v(this.responseType),...this._headers}},1e4);if((0,r.fE)({metric_type:i.MetricTypes.TIMER,what:"isomorphic-request-time",value:n.end().nanoseconds,tags:this._endpointIdentifier?{endpoint:this._endpointIdentifier}:{}}),!a.ok)throw s.O.fromResponse(a,this.method||"GET");return{body:"text"===this.responseType?await a.text():await a.json(),status:a.status}}}function v(e){return"text"===e?"text/plain":"application/json"}let b=null;class S{static setSession(e){if(!e)return;const{accessToken:t}=e,n=this.getInstance();n.accessToken=t,t||n.resetPendingRequests()}static setLocale(e){this.getInstance().locale=e}static setGlobalRequestHeaders(e){this.getInstance().globalRequestHeaders=e}static setMarket(e){this.getInstance().market=e}static resetInstance(){b=null}static getInstance(e={}){return b||(b=this.createNew(e)),b}static createNew(e){const{Constructor:t=u,fromServer:n=!1}=e;return new t(n?y:d.H)}}},67485:(e,t,n)=>{"use strict";n.d(t,{i:()=>r,r:()=>s});var i=n(72671);function r(e,t,n){return e.build().withHost(i.Go).withHostIdentifier("https://open.spotify.com").withPath("/get_access_token").withQueryParameters({reason:t,productType:n}).withoutMarket().withoutAuthorization().withEndpointIdentifier("/get_access_token").send()}function s(e){return e.build().withHost(i.Go).withHostIdentifier("https://open.spotify.com").withPath("/logout").withoutMarket().withoutAuthorization().withEndpointIdentifier("/logout").send()}},72671:(e,t,n)=>{"use strict";n.d(t,{CC:()=>K,Cd:()=>_,D8:()=>U,Dk:()=>S,EN:()=>N,FN:()=>O,Go:()=>c,Hj:()=>C,I9:()=>F,I_:()=>r,J8:()=>E,L1:()=>w,LG:()=>M,LW:()=>b,MR:()=>m,MW:()=>V,QU:()=>u,RQ:()=>D,SX:()=>z,Ty:()=>I,XE:()=>T,Yt:()=>Y,ZJ:()=>P,Zc:()=>o,_1:()=>R,ao:()=>j,d:()=>y,dv:()=>H,eX:()=>h,i6:()=>A,ip:()=>p,mz:()=>f,o1:()=>G,oD:()=>g,p1:()=>B,qE:()=>d,sG:()=>W,sp:()=>k,t2:()=>L,tc:()=>v,us:()=>x});const{WEB_API_URL:i,SPCLIENT_WG_URL:r,PARTNER_API_ENDPOINT:s,ACCOUNTS_HOST:a,EXP_WG_ENDPOINT:o,INT_WG_ENDPOINT:l}={WEB_API_URL:"https://api.spotify.com",SPCLIENT_WG_URL:"https://spclient.wg.spotify.com",EXP_WG_ENDPOINT:"https://exp.wg.spotify.com",ACCOUNTS_HOST:"https://accounts.spotify.com",PARTNER_API_ENDPOINT:"https://api-partner.spotify.com",INT_WG_ENDPOINT:"https://wgint.spotify.net"},c="",u=`${i}/v1`,d=`${r}/recently-played/v3`,p=`${r}/sponsoredplaylist/v1`,m=`${r}/sponsoredplaylist/v1/sponsored`,h=`${r}/playlist/v2`,f=`${r}/inspiredby-mix/v2`,g=`${r}/ads`,E=`${s}/pathfinder/v1`,_=`${s}/pathfinder/v2`,y=`${r}/age-verification/v1`,v=`${r}/concerts`,b=`${r}/presence-view`,S=`${r}/presence2`,A=`${r}/track-credits-view`,C=`${r}/color-lyrics/v2`,T=`${r}/metadata/4`,I=`${r}/user-profile-view/v3`,O=`${r}/soundfinder/v1`,w=`${r}/`,N=`${r}/socialgraph/v2`,R=`${r}/ondemand-selector/v2`,P=`${r}/playlist-permission/v1`,L=`${r}/blend-invitation`,D=`${r}/spotify.audiobookcashier.v1.AudiobookCashier`,k=`${r}/the-stage/v1`,x=`${r}/profile-privacy`,U=`${r}/user-verification-service/v0`,M=`${r}/cultural-moment/v1`,B=`${r}/algotorial-sharing-service/v1`,j=`${r}/transcript-read-along/v2`,F=`${r}/podcast-ap4p`,V=`${r}/ad-dsa-metadata-lookup`,G=`${r}/content-filter/v1`,H=`${r}/gander/v1`,W=`${r}/playlistextender`,z=`${r}/assisted-curation/v1/recommendations/curation/uri`,K=`${r}/ratings/v1`,Y="https://admocker.spotify.com"},23491:(e,t,n)=>{"use strict";n.d(t,{BT:()=>c,GG:()=>o,Np:()=>l,Yf:()=>a,io:()=>s,xA:()=>r});var i=n(72671);const r=e=>e.build().withHost(i.LW).withMethod("GET").withoutMarket().withPath("/v1/buddylist").withJsonContentType().withEndpointIdentifier("/v1/buddylist").send(),s=(e,t)=>e.build().withHost(i.LW).withMethod("GET").withoutMarket().withPath(`/v2/init-friend-feed/${encodeURIComponent(t)}`).withJsonContentType().withEndpointIdentifier("/v2/init-friend-feed/{connectionId}").send(),a=(e,t)=>e.build().withHost(i.LW).withMethod("GET").withoutMarket().withPath(`/v1/user/${encodeURIComponent(t)}`).withJsonContentType().withEndpointIdentifier("/v1/user").send(),o=(e,t,n)=>e.build().withHost(i.Dk).withMethod("POST").withoutMarket().withJsonContentType().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("POST:/sub/user/:username/connection_id/:connection_id").send(),l=(e,t,n)=>e.build().withHost(i.Dk).withMethod("DELETE").withoutMarket().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("DELETE:/sub/user/:username/connection_id/:connection_id").send(),c=(e,t,n)=>e.build().withHost(i.Dk).withMethod("POST").withoutMarket().withPath("/sub/remove-subscriptions").withEndpointIdentifier("/sub/remove-subscriptions").withJsonContentType().withBody({target_usernames:t,connection_id:n}).send()},37295:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createCheckoutSession:()=>a,getEpisode:()=>s,getShow:()=>r});var i=n(72671);function r(e,t,n){return e.build().withHost(i.QU).withPath(`/shows/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("shows/{showId}").send()}function s(e,t,n){return e.build().withHost(i.QU).withPath(`/episodes/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("episodes/{episodeId}").send()}function a(e,t){const n="undefined"!=typeof window&&window.navigator&&window.navigator.platform||"";let r=null;return-1!==n.indexOf("Mac")?r="OSX":-1!==n.indexOf("Win")?r="Win32":-1!==n.indexOf("Linux")&&(r="Linux"),e.build().withMethod("POST").withHost(i.RQ).withPath("/CheckoutBook").withoutMarket().withBody(JSON.stringify(t)).withEndpointIdentifier("show/{showId}").withHeaders([{key:"App-Platform",value:r??"Browser"}]).send()}},21398:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,O:()=>i});class i extends Error{static fromResponse(e,t){return new i({message:e.statusText,url:e.url,method:t,status:e.status,response:e})}constructor(e){const{message:t,url:n,method:i,status:r,response:s}=e;super(t),this.name="HttpResponseError",this.requestUrl=n,this.requestMethod=i,this.status=r,this.response=s}}class r extends i{constructor(e){const{timeout:t,url:n,method:i}=e;super({message:`${i.toUpperCase()} ${n} timed out (${t}ms)`,url:n,method:i,status:503}),this.name="HttpRequestTimeoutError",this.timeout=t}}},16565:(e,t,n)=>{"use strict";n.d(t,{$:()=>r,D:()=>s});const i=()=>"undefined"==typeof window||void 0===window.gtag||void 0===window.google_tag_manager,r=(e,t,n)=>{i()||window.gtag("event",t,{event_category:e,event_label:n})},s=e=>{i()||window.gtag("pageview",{pathname:e})}},69962:(e,t,n)=>{"use strict";n.d(t,{z:()=>o,t:()=>l});var i=n(36285);let r;class s{constructor(){this._accessToken=null,this._market="",this._headers=[],this._globalRequestHeaders=[],this._shouldSendMarket=!0,this._shouldSendGlobalHeaders=!0,this._locale=null,this._shouldSendLocale=!1,this._shouldSendAuthorization=!0,this._host="",this._hostIdentifier="",this.path="",this.responseType="json",this.queryParameters=void 0,this._method="GET",this.jsonContentType=!1,this.body=null,this._endpointIdentifier=null,this._startTimestamp=null,this._includeCredentials=!1,this._abortSignal=null}static setRequestImplementation(e){r=e}getRequestImplementation(){return r}set accessToken(e){this._accessToken=e}get market(){return this._market}set market(e){this._market=e}get locale(){return this._locale}set locale(e){this._locale=e}get globalRequestHeaders(){return this._globalRequestHeaders}set globalRequestHeaders(e){this._globalRequestHeaders=e}get startTimestamp(){return this._startTimestamp}get host(){return this._host}get hostIdentifier(){return this._hostIdentifier||this._host}get method(){return this._method}get endpointIdentifier(){return this._endpointIdentifier}get abortSignal(){return this._abortSignal}withHost(e){return this._host=e,this}withHostIdentifier(e){return this._hostIdentifier=e,this}withPath(e){return this.path=e,this}withResponseType(e){return this.responseType=e,this}withEndpointIdentifier(e){return this._endpointIdentifier=e,this}withQueryParameters(e){return this.queryParameters=e,this}withBody(e){return this.body=e,this}withMethod(e){return this._method=e,this}withoutMarket(){return this._shouldSendMarket=!1,this}withoutGlobalHeaders(){return this._shouldSendGlobalHeaders=!1,this}withoutAuthorization(){return this._shouldSendAuthorization=!1,this}withLocale(e){return this._shouldSendLocale=!0,e&&(this._locale=e),this}withJsonContentType(){return this.jsonContentType=!0,this}withHeaders(e){return this._headers=e,this}withCredentials(){return this._includeCredentials=!0,this}fromURL(e){const t=new URL(e);return this.withHost(t.origin),this.withPath(t.pathname),this.withQueryParameters(Array.from(t.searchParams.entries()).reduce(((e,[t,n])=>({...e,[t]:n})),{})),this}withAbortSignal(e){return this._abortSignal=e,this}onBeforeSend(e){}onAfterSend(e){}async send(){const e=new r(this.method,`${this._host}${this.path}`,this._shouldSendAuthorization);this._shouldSendMarket&&this.market&&(this.queryParameters={...this.queryParameters,market:this.market}),this._shouldSendLocale&&this.locale&&(this.queryParameters={...this.queryParameters,locale:this.locale}),this.locale&&e.addHeader("Accept-Language",this.locale),e.withQueryParameters(this.queryParameters),e.withResponseType(this.responseType),e.withEndpointIdentifier(this._endpointIdentifier),this._abortSignal&&e.withAbortSignal(this._abortSignal),this._shouldSendAuthorization&&this._accessToken&&e.addHeader("Authorization",`Bearer ${this._accessToken}`),e.addHeader("Accept","application/json"),this._includeCredentials&&e.includeCredentials(),this._shouldSendGlobalHeaders&&this._globalRequestHeaders.length>0&&this._globalRequestHeaders.forEach((([t,n])=>{e.addHeader(t,n)}));for(let t=0;t(this.onAfterSend(),e))).catch((e=>{throw this.onAfterSend(e),e}))}}var a=n(74663);const o=(0,i.u)("RequestBuilder");class l{constructor(e){this._accessToken=null,this._market="",this._locale="",this._globalRequestHeaders=[],this._RequestImplementation=e||a.H}get accessToken(){return this._accessToken}set accessToken(e){this._accessToken=e}get globalRequestHeaders(){return this._globalRequestHeaders}set globalRequestHeaders(e){this._globalRequestHeaders=e}get market(){return this._market}set market(e){this._market=e}get locale(){return this._locale}set locale(e){this._locale=e}resetPendingRequests(){}build(){s.setRequestImplementation(this._RequestImplementation);const e=new s;return e.accessToken=this._accessToken,e.market=this.market,e.locale=this.locale,e.globalRequestHeaders=this.globalRequestHeaders,e}}},74663:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(62478);class r{constructor(e,t,n){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._authorize=n,this._includeCredentials=!1,this._abortSignal=void 0,this}withQueryParameters(e){this.queryParameters=e}withPostData(e){this.postData=e}withResponseType(e){this.responseType=e}withEndpointIdentifier(){}addHeader(e,t){return this._headers[e]=t,this}includeCredentials(){return this._includeCredentials=!0,this}withAbortSignal(e){return this._abortSignal=e,this}async send(){const e=(0,i.V)(),t=new URLSearchParams(this.queryParameters).toString(),n=`${this.url}${t?`?${t}`:""}`,r={method:this.method,responseType:this.responseType,headers:this._headers,authorize:this._authorize,rejectNotOk:!0,signal:this._abortSignal};return this._includeCredentials&&(r.credentials="include"),this.postData&&(this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?r.payload=JSON.stringify(this.postData):r.payload=this.postData),e.request(n,r).then((e=>e)).catch((e=>{throw e}))}}},92443:(e,t,n)=>{"use strict";n.d(t,{FI:()=>r,Yg:()=>s,iY:()=>a,lS:()=>o});var i=n(36285);let r=function(e){return e.UNKNOWN="unknown",e.SPEAKERS="speakers",e.HEADPHONES="headphones",e.DISPLAY_DEVICE="display_device",e}({}),s=function(e){return e.UNKNOWN="unknown",e.BUILT_IN="built_in",e.VIRTUAL="virtual",e.USB="usb",e.BLUETOOTH="bluetooth",e.DISPLAY_DEVICE="display_device",e.AIRPLAY="airplay",e}({});const a=(0,i.u)("AudioOutputDevicesAPI"),o=e=>e?.terminalType===r.HEADPHONES||e?.transportType===s.UNKNOWN||e?.transportType===s.USB||e?.transportType===s.VIRTUAL},76730:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,e:()=>s});var i=n(93827);let r=function(e){return e.DEVICE_CONNECTED="deviceConnected",e}({});class s extends i.V{}},25016:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,c:()=>r});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'AudioOutputDevicesContext' without 'AudioOutputDevicesProvided'!");return e}},82662:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(30758),r=n(25016);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.V)();n.current=t,(0,i.useEffect)((()=>s.getEvents().addListener(e,(e=>{n.current(e)}))),[e,s])}},71681:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var i=n(30758),r=n(25016),s=n(82662),a=n(76730);const o=()=>{const e=(0,r.V)(),[t,n]=(0,i.useState)((()=>e.getDefaultDevice()));return(0,s.k)(a.B.DEVICE_CONNECTED,(()=>{n(e.getDefaultDevice())})),t}},53460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(36285).u)("AudiobookCappingAPI")},2395:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,r:()=>s});var i=n(93827);let r=function(e){return e.UPDATE_CAPPING="update_capping",e}({});class s extends i.V{}},99887:(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var i=n(2395),r=n(59426),s=n(91008),a=n(87464);class o{_events=new i.r;constructor(e,t,n,i){this._fetcher=new r.m(e);const o=this.onUpdateCapping.bind(this);!function(e,t,n){e.getEvents().addListener(a.gd.ERROR,(async()=>{try{const i=e.getState();if(null===i)return;const r=i.context.uri;if(!(0,s.WB1)(r))return;const a=await t(r,{withPurge:!0}),o=a?.consumptionCapped??null;null!==o&&n({isCapped:!0,explanation:o})}catch(e){}}))}(t,i,o),function(e,t,n){e.subscribe({ident:"hm://show-access/user-capped",onMessage:async()=>{const e=await t.fetch();n({isCapped:!0,explanation:e})}}),e.subscribe({ident:"hm://show-access/user-quota-changed",onMessage:()=>n({isCapped:!1,explanation:null})})}(n,this._fetcher,o)}getEvents(){return this._events}getCappingStatus(e){return void 0===e?{isCapped:!1,explanation:null}:{isCapped:void 0!==e.consumptionCapped,explanation:e.consumptionCapped??null}}onUpdateCapping(e){this._events.emit(i.S.UPDATE_CAPPING,e)}}},59426:(e,t,n)=>{"use strict";n.d(t,{i:()=>s,m:()=>a});var i=n(72671),r=n(31417);function s(){return{title:r.Ru.get("shared.audiobook-capping.offline-capping-explanation.title"),body:r.Ru.get("shared.audiobook-capping.offline-capping-explanation.body"),cta:r.Ru.get("shared.audiobook-capping.offline-capping-explanation.cta")}}class a{_inFlightPromise=null;constructor(e){this._builder=e}async fetch(){return this._inFlightPromise||(this._inFlightPromise=this._builder.build().withMethod("POST").withHost(i.I_).withPath("/capping-api/spotify.cappingapi.v1.CappingExplanation/GetAudiobooksExplanation").withoutMarket().send().then((e=>e.body)).catch((()=>Promise.resolve(null))).finally((()=>{this._inFlightPromise=null}))),this._inFlightPromise}}},7493:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var i=n(30758),r=n(2395),s=n(53460),a=n(30157);function o(e){const t=(0,a.N)(s.Z).getEvents();(0,i.useEffect)((()=>t.addListener(r.S.UPDATE_CAPPING,e)),[t,e])}},49042:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});const i=(0,n(36285).u)("AuthorizationAPI")},51337:(e,t,n)=>{"use strict";n.d(t,{m:()=>r,x:()=>s});var i=n(93827);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},40731:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});const i={isAuthorized:!1,token:null,retryAttempt:null,retryAt:null}},67781:(e,t,n)=>{"use strict";n.d(t,{H:()=>r,T:()=>i});const i=(0,n(36285).u)("TokenProvider");function r(e){return Date.now()>=e.accessTokenExpirationTimestampMs}},51736:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});class i{_token=null;_promise=null;_callbacks=[];async getToken({preferCached:e=!1}={}){if(e&&null!==this._token)return this._token;if(null!==this._promise)return this._promise;this._promise=this.loadToken();try{this._token=await this._promise,this._callbacks.forEach((e=>e(this._token)))}finally{this._promise=null}return this._token}addOnTokenChanged(e){this._callbacks.push(e),e(this._token)}}},495:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,r:()=>s});var i=n(26380);const r=(0,n(45695).h)();async function s(){await r.post("sp://desktop/v1/logout")}async function a(e){const t=new i.EW(e);return{enableShows:await t.getValues(i.kM.fromPartial({})).then((e=>"1"===e.pairs["shows-collection"]))}}},79701:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var i=n(49042),r=n(30157);function s(){return(0,r.N)(i.X)}},72680:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var i=n(30758),r=n(51337),s=n(79701);function a(){const e=(0,s.v)(),[t,n]=(0,i.useState)(e.getState());return(0,i.useEffect)((()=>e.getEvents().addListener(r.m.UPDATE,(e=>{n(e.data)}))),[e]),t}},19329:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(30758),r=n(79701);function s(){const e=(0,r.v)(),{canGetSessionTransferURL:t}=e.getCapabilities();return{openURL:(0,i.useCallback)(((e,t="_blank")=>{window.open(e,t)}),[]),openURLWithSessionTransfer:(0,i.useCallback)((async(n,i="_blank")=>{if(t){const t=await e.getSessionTransferURL(n);window.open(t,i)}else window.open(n,i)}),[e,t]),useGetURLWithSessionTransfer:n=>{const[r,s]=(0,i.useState)(n);return(0,i.useEffect)((()=>{t&&async function(){const t=await e.getSessionTransferURL(n);s(t)}()}),[n]),r}}}},85515:(e,t,n)=>{"use strict";n.d(t,{GG:()=>s,fq:()=>r,od:()=>a});const i=864e5;class r{_cache=new Map;constructor(e=null){if(this._ttl=e,null!==e&&(e<1||e>i))throw new Error("TTL should be between 1 (1 ms) and 86400000 (1 day).")}isExpired(e){return null!==e.expiry&&e.expiry{this.isExpired(e)&&this._cache.delete(t)}))}}class s extends r{constructor(e,t){super(e),setInterval(this.cleanup.bind(this),t)}}class a extends r{constructor(){super(null)}deleteOnSettle(e,t){return t.then((()=>this.delete(e)),(()=>this.delete(e))),t}create(e,t){const n=super.create(e,t);return this.deleteOnSettle(e,n)}set(e,t){super.set(e,this.deleteOnSettle(e,t))}}},23838:(e,t,n)=>{"use strict";n.d(t,{extractColors:()=>p});var i=n(411);const r="https://local-image.spotify.com";let s=function(e){return e[e.ARRAY_BUFFER=0]="ARRAY_BUFFER",e[e.IMAGE_BITMAP=1]="IMAGE_BITMAP",e}({});var a=n(95592),o=n.n(a);var l=n(87145);const c=new function(){return o()('(()=>{"use strict";let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function r(t,r,n=1e-6){return Math.abs(t-r)[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})?$/i.exec(t),n=r?.groups?.r,s=r?.groups?.g,o=r?.groups?.b,i=r?.groups?.a;if(void 0===n||void 0===s||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r:n,g:s,b:o,a:i}}function i(t){const{a:r}=o(t);if(!r)return 1;return function(t,r,n){const s=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:r,maximumFractionDigits:n});return Number(s)}(parseInt(r,16)/255,0,2)}function e(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function a({rgb:{r:t,g:r,b:n}}){return.2126*e(t/255)+.7152*e(r/255)+.0722*e(n/255)}function h(t,r){const n=a(t),s=a(r);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}class u{constructor(t,r,n,s=1){this.rgb=t,this.hsl=r,this.hsv=n,this.a=s}static BLACK=u.fromRGB({r:0,g:0,b:0});static WHITE=u.fromRGB({r:255,g:255,b:255});static fromRGB(t,n){if(t.r<0||t.g<0||t.b<0||t.r>255||t.g>255||t.b>255||n&&n<0||n&&n>1)throw Error(`Invalid RGB color: ${JSON.stringify(t)}, alpha: ${n}`);const s=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=Math.min(o,i,e),u=a-h;let c;const l=(a+h)/2,g=a;c=r(u,0)?0:r(g,o)?60*(0+(i-e)/u):r(g,i)?60*(2+(e-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const f=0===l||1===l?0:(g-l)/Math.min(l,1-l);return{h:Math.round(c),s:f,l}}(t),o=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=a-Math.min(o,i,e);let u;const c=a;u=r(h,0)?0:r(c,o)?60*(0+(i-e)/h):r(c,i)?60*(2+(e-o)/h):60*(4+(o-i)/h),u%=360,u<0&&(u+=360);const l=0===c?0:h/c;return{h:Math.round(u),s:l,v:c}}(t);return new u(t,s,o,n)}static fromHex(t,r){const n=function(t){const{r,g:n,b:s}=o(t);return{r:parseInt(r,16),g:parseInt(n,16),b:parseInt(s,16)}}(t),s=i(t);return u.fromRGB(n,r??s)}static fromHSV(t,r){const n=function({h:t,s:r,v:n}){const s=n*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromHSL(t,r){const n=function({h:t,s:r,l:n}){const s=(1-Math.abs(2*n-1))*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s/2;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromInt(t,r){const n=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}}(t);return u.fromRGB(n,r)}static fromCSS(t,r){const n=function(t,r){const n=t.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{rgb:{r:parseInt(t,10),g:parseInt(s,10),b:parseInt(o,10)},rgbAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(n){const{rgb:t,rgbAlpha:r}=n;return u.fromRGB(t,r)}const s=function(t){const r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r)return r[1];return null}(t);if(s)return u.fromHex(s,r);const o=function(t,r){const n=t.match(/^hsla?\\((\\d+),\\s*(\\d+)%,\\s*(\\d+)%(?:,\\s*(\\d*(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{hsl:{h:parseInt(t,10),s:parseInt(s,10)/100,l:parseInt(o,10)/100},hslAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(o){const{hsl:t,hslAlpha:r}=o;return u.fromHSL(t,r)}throw new Error(`Invalid or unsupported CSS color: ${t}`)}toCSS(r){switch(r){case t.HEX:return`#${n((o=this).rgb.r)}${n(o.rgb.g)}${n(o.rgb.b)}`;case t.HEXA:return function(t){return`#${n(t.rgb.r)}${n(t.rgb.g)}${n(t.rgb.b)}${n(Math.floor(255*t.a))}`}(this);case t.RGB:return function(t){return`rgb(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b})`}(this);case t.RGBA:return function(t){return`rgba(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b}, ${t.a})`}(this);case t.HSL:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsl(${r}, ${s(n)}, ${s(o)})`}(this);case t.HSLA:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsla(${r}, ${s(n)}, ${s(o)}, ${t.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var o}toRGBA255(){return{r:this.rgb.r,g:this.rgb.g,b:this.rgb.b,a:255*this.a}}contrastAdjust(t,r=4.5){let n=u.BLACK;if("light"===t&&(n=u.WHITE),n!==u.BLACK&&n!==u.WHITE)throw new Error("Only supports contrast calculation between black and white.");let s=h(this,n);if(s>=r)return this;let o=this.hsv.v,i=n===u.WHITE?-.02:.02,e=Number.MAX_VALUE,a=null;for(let t=0;t<100&&e>.07&&o>=0&&o<=1;t++){o=Math.min(o+i,1),a=u.fromHSV({h:this.hsv.h,s:this.hsl.s,v:o}),s=h(a,u.WHITE);const t=Math.round(10*Math.abs(s-r))/10;t>e&&(i*=-.5),e=t}return null===a?this:a}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(t){const{rgb:r,hsl:n,hsv:s,a:o}=JSON.parse(t);return new u(r,n,s,o)}}class c{constructor(t,r){this.color=t,this.population=r}static fromColor(t,r){return new c(t,r)}static fromRGB(t,r){return new c(u.fromRGB(t),r)}}class l{constructor(t,r=[]){this._comparator=t,this._data=r}swap(t,r){[this._data[t],this._data[r]]=[this._data[r],this._data[t]]}compare(t,r){return this._comparator(this._data[t],this._data[r])}bubbleUp(t){for(;t>0;){const r=t-1>>>1;if(this.compare(t,r)>=0)break;this.swap(t,r),t=r}}bubbleDown(t){const r=this._data.length;for(;;){const n=1+(t<<1),s=n+1;let o=t;if(n0;)yield this.pop()}}const g=31;function f(t){const r=(t>>>10&31)<<3,n=(t>>>5&31)<<3,s=(t>>>0&31)<<3;return u.fromRGB({r,g:n,b:s})}function p(t,r){return Math.round((t>>>3)/r)<<3}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return t*g*g+r*g+n-(s*g*g+o*g+i)}function m({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return r*g*g+t*g+n-(o*g*g+s*g+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return n*g*g+r*g+t-(i*g*g+o*g+s)}class w{constructor(t,r){this.min=t,this.max=r}size(){return this.max-this.min+1}clampTo(t){this.min=this.max=t}extendTo(t){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}class _{_population=0;_spanR=new w(0,0);_spanG=new w(0,0);_spanB=new w(0,0);constructor(t){this._swatches=t,this.fitBox()}getVolume(){return this._spanR.size()*this._spanG.size()*this._spanB.size()}getColorCount(){return this._swatches.length}getAverageColor(){let t=0,r=0,n=0,s=0;for(const{color:o,population:i}of this._swatches)s+=i,t+=i*o.rgb.r,r+=i*o.rgb.g,n+=i*o.rgb.b;const o=p(t,s),i=p(r,s),e=p(n,s);return c.fromRGB({r:o,g:i,b:e},s)}canSplit(){return this.getColorCount()>1}split(){if(!this.canSplit())throw new Error("Can not split a box with only 1 color");const t=this.findSplitPoint(),r=new _(this._swatches.slice(t+1,this._swatches.length));return this._swatches.splice(t+1),this.fitBox(),r}fitBox(){this._population=0;for(let t=0;tt(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t=r)return Math.min(this._swatches.length-1,t);return 0}getLongestDimensionComparator(){const t=this._spanR.size(),r=this._spanG.size(),n=this._spanB.size();return t>=r&&t>=n?b:r>=t&&r>=n?m:d}}class M{queue=new l(((t,r)=>r.getVolume()-t.getVolume()));_swatches=[];constructor(t){this._options=t}static fromPixels(t,r){return new M(r).quantize(t)}quantize(t){const r=new Array(32768).fill(0);let n=0,s=0,o=0;for(let s=t.next();!s.done;s=t.next()){n++;r[((i=s.value)>>>0&255)>>3<<10|(i>>>8&255)>>3<<5|(i>>>16&255)>>3]++}var i;for(let t=0;tthis._options.maxColors&&(this._swatches=this.quantizePixels(this._options.maxColors)),{swatches:this._swatches,totalPixels:n,totalColors:s,totalSaturationFromHSV:o}}quantizePixels(t){this.queue.push(new _(this._swatches)),this.splitBoxes(t);const r=Array.from(this.queue.popAll()).map((t=>t.getAverageColor())),n=this._options.filter;return void 0!==n?r.filter((t=>n(t.color))):r}splitBoxes(t){for(;this.queue.size()null!==t&&r(t)>r(n)?t:n),null)}const x=30,S=80,R=2,A=.0016,B=.3,$=.1,G=45,I=.4,C=.6,E=.1,H=.02;function L(t,r,n){return(t-r)/(n-r)}function T(t){return(t%=360)<0?360+t:t}function y(t,r){const n=function(t){let r=Number.MAX_VALUE;for(const n of t)r=Math.min(r,n);r=-1*Math.abs(r);let n=0,s=360;for(const o of t){const t=T(o+r);t<180&&t>n&&(n=t),t>=180&&t=n.hue1&&r<=n.hue2?L(T(r),n.hue1,n.hue2):(s=360-n.hue2,L(T(r+s),0,T(n.hue1+s)))}function F(t,r){const n=t.map((t=>t.color.hsv.h)),s=function(t){let r=0,n=0;for(const s of t)r+=Math.cos(s/180*Math.PI),n+=Math.sin(s/180*Math.PI);const s=r/t.length,o=n/t.length,i=180*Math.atan2(o,s)/Math.PI%360;return i>=0?i:360-Math.abs(i)}(n),o=y(n,s);return o>I||o{return t.population/r>H||(n=t.color.hsv.h,o=s,i=G,Math.min(Math.abs(o-n),360-Math.abs(o-n))t.population/r>=A)).filter((t=>!(o>=$+E)||function({hsv:t}){return(t.v>.85||t.v<.15)&&t.s<.2||t.v<.15||t.s<.2||t.s<.2&&t.v<.4?0:(t.v+t.s)/2}(t.color)>=B));if(0===i.length)return null;const e=F(i,r),a=function(t){return t.map((t=>t.color.hsv.h)).every((t=>t>=x&&t<=S))}(e);return v(e,(t=>P(t,a,r)))}const D={min:.3,target:.5,max:.7},N={min:0,target:.26,max:.45},q={min:.55,target:.74,max:1},k={min:.35,target:1,max:1},V={min:0,target:.3,max:.4},X={saturation:.24,luminance:.52,population:.24},O={vibrantLight:{lightness:q,saturation:k,weights:X},vibrant:{lightness:D,saturation:k,weights:X},vibrantDark:{lightness:N,saturation:k,weights:X},mutedLight:{lightness:q,saturation:V,weights:X},muted:{lightness:D,saturation:V,weights:X},mutedDark:{lightness:N,saturation:V,weights:X}},U=c.fromRGB({r:83,g:83,b:83},1),J=c.fromRGB({r:83,g:83,b:83},1),j=c.fromRGB({r:127,g:127,b:127},1);function W(t,r){const{color:{hsl:n}}=t;return n.s>=r.saturation.min&&n.s<=r.saturation.max&&n.l>=r.lightness.min&&n.l<=r.lightness.max}function K(t,r,n){const{color:{hsl:s}}=t;let o=0,i=0,e=0;return r.weights.saturation>0&&(o=r.weights.saturation*(1-Math.abs(s.s-r.saturation.target))),r.weights.luminance>0&&(i=r.weights.luminance*(1-Math.abs(s.l-r.lightness.target))),r.weights.population>0&&(e=r.weights.population*(t.population/n)),o+i+e}let Y=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});const Q=self;const Z=t=>!function({hsl:t}){return t.l<=.05}(t)&&!function({hsl:t}){return t.l>=.95}(t)&&!function({hsl:t}){return t.h>=10&&t.h<=37&&t.s<=.82}(t)&&function({hsv:t}){return t.v>.2}(t);Q.addEventListener("message",(t=>{const[r,n]=t.data,s=function(t){if(t.source===Y.IMAGE_BITMAP){const r=t.data,n=new OffscreenCanvas(r.width,r.height).getContext("2d");return n.drawImage(r,0,0,r.width,r.height),n.getImageData(0,0,r.width,r.height).data.buffer}return t.data}(n),o=function*(t,r){const n=new Uint32Array(t),s=Math.ceil(n.length/r);for(let t=0;tt.population)),a={};for(const[r,n]of Object.entries(o)){const s=v(t.filter((t=>!i.has(t.color.toString()))).filter((t=>W(t,n))),(t=>K(t,n,e?.population||1)));null!==s&&(a[r]=s,i.add(s.color.toString()))}const h=z(Object.values(a),r,n,s),u=h?c.fromColor(h.color.contrastAdjust("dark"),1):null,l=h?c.fromColor(h.color.contrastAdjust("light"),1):null;return{dominantSwatch:e,visRefSwatch:h||U,visRefDarkSwatch:u||J,visRefLightSwatch:l||j,visRefIsFallback:null===h,targetSwatches:a}}(i.swatches,i.totalPixels,i.totalColors,i.totalSaturationFromHSV);Q.postMessage([r,{colorRawJson:e.color.stringify(),colorLightJson:h.color.stringify(),colorDarkJson:a.color.stringify()}])}))})();\n',"Worker",void 0,void 0)};let u=0;async function d(e){const t=u++,n=new Promise(((e,n)=>{c.addEventListener("message",(n=>{const[r,s]=n.data;r===t&&e({colorRaw:i.Q.parse(s.colorRawJson),colorDark:i.Q.parse(s.colorDarkJson),colorLight:i.Q.parse(s.colorLightJson)})})),c.addEventListener("error",n)}));return c.postMessage([t,e],[e.data]),await n}async function p(e){let t;try{t=await async function(e){const t=new Image;return t.crossOrigin="anonymous",function(e){const t=0===e.indexOf("spotify:image:"),n=0===e.indexOf("spotify:mosaic:"),i=0===e.indexOf("spotify:localfileimage:");return t||n||i}(e)?t.src=`${r}?uri=${encodeURIComponent(e)}`:t.src=e,await t.decode(),t}(e)}catch(e){return Promise.resolve(l.A)}const n=t.naturalWidth,i=t.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const e=await window.createImageBitmap(t);return await async function(e){return await d({source:s.IMAGE_BITMAP,data:e})}(e)}const a=document.createElement("canvas"),o=a.getContext("2d");return a.width=n,a.height=i,o.drawImage(t,0,0,n,i),await async function(e){return await d({source:s.ARRAY_BUFFER,data:e.data.buffer})}(o.getImageData(0,0,n,i))}},7938:(e,t,n)=>{"use strict";n.d(t,{j:()=>a,n:()=>o});var i=n(411),r=n(57776);n(59147);const s=new r.l("fetchExtractedColors","query","86bdf61bb598ee07dc85d6c3456d9c88eb94f33178509ddc9b33fc9710aa9e9c",null);function a(e){return i.Q.fromHex(e)}async function o(e,t){Array.isArray(t)||(t=[t]);const n=await e(s,{uris:t}),{extractedColors:i}=n?.data||{};if(!i)throw new Error("Failed to fetch multiple extracted colors!");return i.map((e=>"ExtractedColors"!==e.__typename?null:{colorRaw:a(e.colorRaw.hex),colorDark:a(e.colorDark.hex),colorLight:a(e.colorLight.hex),isFallback:e.colorRaw.isFallback&&e.colorDark.isFallback&&e.colorLight.isFallback}))}},36620:(e,t,n)=>{"use strict";n.d(t,{j:()=>l});var i=n(7938),r=n(85515),s=n(59961),a=n(87145);const o=new r.fq;async function l(e,t){Array.isArray(t)||(t=[t]);const r=await Promise.all(t.map((e=>o.get(e))));if(r.every((e=>!!e)))return r;try{const r=await(0,i.n)(e,t),l=await function(e,t){const i=t.map((async(t,i)=>{if(t&&!t.isFallback)return t;if(""===e[i])return a.A;if(!(0,s.c)()){const{extractColors:t}=await Promise.resolve().then(n.bind(n,23838));return t(e[i])}return a.A}));return Promise.all(i)}(t,r);return l.forEach(((e,n)=>{o.set(t[n],Promise.resolve(e))})),l}catch{if(!(0,s.c)()){const{extractColors:e}=await Promise.resolve().then(n.bind(n,23838));return Promise.all(t.map((t=>{const n=e(t);return o.set(t,n),n})))}return Promise.resolve([a.A])}}},87145:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(85505),r=n(7938);const s={colorRaw:(0,r.j)(i.l0o),colorDark:(0,r.j)(i.l0o),colorLight:(0,r.j)(i.l0o)}},37948:(e,t,n)=>{"use strict";n.d(t,{r:()=>c,z:()=>u});var i=n(30758),r=n(85505),s=n(36475),a=n(36620),o=n(81834),l=n(50486);function c(e=null){const{request:t}=(0,i.useContext)(o.j),{data:n}=(0,l.I)({queryKey:["extracted-color",e],queryFn:()=>e?(0,a.j)(t,e).then((([{colorDark:e,colorLight:t,colorRaw:n}])=>({colorDark:e.toCSS(s.a.HEX),colorLight:t.toCSS(s.a.HEX),colorRaw:n.toCSS(s.a.HEX)}))):null,gcTime:864e5,staleTime:216e5,enabled:!!e});return n??void 0}function u(e=null,t=r.l0o,n="colorRaw"){return c(e)?.[n]??t}},411:(e,t,n)=>{"use strict";n.d(t,{Q:()=>c});var i=n(36475),r=n(1447);function s(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));const t=/^#?(?[a-f\d]{2})(?[a-f\d]{2})(?[a-f\d]{2})(?[a-f\d]{2})?$/i.exec(e),n=t?.groups?.r,i=t?.groups?.g,r=t?.groups?.b,s=t?.groups?.a;if(void 0===n||void 0===i||void 0===r)throw new Error(`Invalid hex color code "${e}"`);return{r:n,g:i,b:r,a:s}}function a(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o({rgb:{r:e,g:t,b:n}}){return.2126*a(e/255)+.7152*a(t/255)+.0722*a(n/255)}function l(e,t){const n=o(e),i=o(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}class c{constructor(e,t,n,i=1){this.rgb=e,this.hsl=t,this.hsv=n,this.a=i}static BLACK=c.fromRGB({r:0,g:0,b:0});static WHITE=c.fromRGB({r:255,g:255,b:255});static fromRGB(e,t){if(e.r<0||e.g<0||e.b<0||e.r>255||e.g>255||e.b>255||t&&t<0||t&&t>1)throw Error(`Invalid RGB color: ${JSON.stringify(e)}, alpha: ${t}`);const n=function({r:e,g:t,b:n}){const i=e/255,s=t/255,a=n/255,o=Math.max(i,s,a),l=Math.min(i,s,a),c=o-l;let u;const d=(o+l)/2,p=o;u=(0,r.vn)(c,0)?0:(0,r.vn)(p,i)?60*(0+(s-a)/c):(0,r.vn)(p,s)?60*(2+(a-i)/c):60*(4+(i-s)/c),u%=360,u<0&&(u+=360);const m=0===d||1===d?0:(p-d)/Math.min(d,1-d);return{h:Math.round(u),s:m,l:d}}(e),i=function({r:e,g:t,b:n}){const i=e/255,s=t/255,a=n/255,o=Math.max(i,s,a),l=o-Math.min(i,s,a);let c;const u=o;c=(0,r.vn)(l,0)?0:(0,r.vn)(u,i)?60*(0+(s-a)/l):(0,r.vn)(u,s)?60*(2+(a-i)/l):60*(4+(i-s)/l),c%=360,c<0&&(c+=360);const d=0===u?0:l/u;return{h:Math.round(c),s:d,v:u}}(e);return new c(e,n,i,t)}static fromHex(e,t){const n=function(e){const{r:t,g:n,b:i}=s(e);return{r:parseInt(t,16),g:parseInt(n,16),b:parseInt(i,16)}}(e),i=function(e){const{a:t}=s(e);if(!t)return 1;const n=parseInt(t,16)/255;return(0,r.LI)(n,0,2)}(e);return c.fromRGB(n,t??i)}static fromHSV(e,t){const n=function({h:e,s:t,v:n}){const i=n*t,r=e/60,s=i*(1-Math.abs(r%2-1));let a;a=r>=0&&r<=1?[i,s,0]:r>1&&r<=2?[s,i,0]:r>2&&r<=3?[0,i,s]:r>3&&r<=4?[0,s,i]:r>4&&r<=5?[s,0,i]:r>5&&r<=6?[i,0,s]:[0,0,0];const o=n-i;return{r:Math.round(255*(a[0]+o)),g:Math.round(255*(a[1]+o)),b:Math.round(255*(a[2]+o))}}(e);return c.fromRGB(n,t)}static fromHSL(e,t){const n=function({h:e,s:t,l:n}){const i=(1-Math.abs(2*n-1))*t,r=e/60,s=i*(1-Math.abs(r%2-1));let a;a=r>=0&&r<=1?[i,s,0]:r>1&&r<=2?[s,i,0]:r>2&&r<=3?[0,i,s]:r>3&&r<=4?[0,s,i]:r>4&&r<=5?[s,0,i]:r>5&&r<=6?[i,0,s]:[0,0,0];const o=n-i/2;return{r:Math.round(255*(a[0]+o)),g:Math.round(255*(a[1]+o)),b:Math.round(255*(a[2]+o))}}(e);return c.fromRGB(n,t)}static fromInt(e,t){const n=function(e){return{r:e>>16&255,g:e>>8&255,b:255&e}}(e);return c.fromRGB(n,t)}static fromCSS(e,t){const n=function(e,t){const n=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){const[e,i,r,s]=n.slice(1),a=t??parseFloat(s);return{rgb:{r:parseInt(e,10),g:parseInt(i,10),b:parseInt(r,10)},rgbAlpha:Number.isNaN(a)?void 0:a}}return null}(e,t);if(n){const{rgb:e,rgbAlpha:t}=n;return c.fromRGB(e,t)}const i=function(e){const t=e.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(t)return t[1];return null}(e);if(i)return c.fromHex(i,t);const r=function(e,t){const n=e.match(/^hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*(?:\.\d+)?))?\)$/);if(n){const[e,i,r,s]=n.slice(1),a=t??parseFloat(s);return{hsl:{h:parseInt(e,10),s:parseInt(i,10)/100,l:parseInt(r,10)/100},hslAlpha:Number.isNaN(a)?void 0:a}}return null}(e,t);if(r){const{hsl:e,hslAlpha:t}=r;return c.fromHSL(e,t)}throw new Error(`Invalid or unsupported CSS color: ${e}`)}toCSS(e){switch(e){case i.a.HEX:return t=this,`#${(0,r.nj)(t.rgb.r)}${(0,r.nj)(t.rgb.g)}${(0,r.nj)(t.rgb.b)}`;case i.a.HEXA:return function(e){return`#${(0,r.nj)(e.rgb.r)}${(0,r.nj)(e.rgb.g)}${(0,r.nj)(e.rgb.b)}${(0,r.nj)(Math.floor(255*e.a))}`}(this);case i.a.RGB:return function(e){return`rgb(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b})`}(this);case i.a.RGBA:return function(e){return`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.a})`}(this);case i.a.HSL:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsl(${t}, ${(0,r.wF)(n)}, ${(0,r.wF)(i)})`}(this);case i.a.HSLA:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsla(${t}, ${(0,r.wF)(n)}, ${(0,r.wF)(i)}, ${e.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var t}toRGBA255(){return{r:this.rgb.r,g:this.rgb.g,b:this.rgb.b,a:255*this.a}}contrastAdjust(e,t=4.5){let n=c.BLACK;if("light"===e&&(n=c.WHITE),n!==c.BLACK&&n!==c.WHITE)throw new Error("Only supports contrast calculation between black and white.");let i=l(this,n);if(i>=t)return this;let r=this.hsv.v,s=n===c.WHITE?-.02:.02,a=Number.MAX_VALUE,o=null;for(let e=0;e<100&&a>.07&&r>=0&&r<=1;e++){r=Math.min(r+s,1),o=c.fromHSV({h:this.hsv.h,s:this.hsl.s,v:r}),i=l(o,c.WHITE);const e=Math.round(10*Math.abs(i-t))/10;e>a&&(s*=-.5),a=e}return null===o?this:o}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(e){const{rgb:t,hsl:n,hsv:i,a:r}=JSON.parse(e);return new c(t,n,i,r)}}},34613:(e,t,n)=>{"use strict";function i(e){if(!e?.colorDark.isFallback)return e?.colorDark.hex}n.d(t,{m:()=>i})},1447:(e,t,n)=>{"use strict";function i(e,t,n=1e-6){return Math.abs(e-t)a,nj:()=>r,vn:()=>i,wF:()=>s})},36475:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});let i=function(e){return e[e.HEX=0]="HEX",e[e.HEXA=1]="HEXA",e[e.RGB=2]="RGB",e[e.RGBA=3]="RGBA",e[e.HSL=4]="HSL",e[e.HSLA=5]="HSLA",e}({})},66281:(e,t,n)=>{"use strict";n.d(t,{U:()=>i});const i=(0,n(36285).u)("ConnectAPI")},35290:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});const i=(0,n(36285).u)("ConnectDeviceManagementAPI")},59640:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});const i=(0,n(36285).u)("ConnectDevicesAPI")},22871:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=(0,n(36285).u)("ConnectDiscoveryAPI")},78736:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,a:()=>s});var i=n(93827);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},89088:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});const i=(0,n(36285).u)("ConnectTransferAPI")},95387:(e,t,n)=>{"use strict";n.d(t,{H:()=>i});let i=function(e){return e.JAM="JAM",e.NEARBY_JAM="NEARBY_JAM",e}({})},3225:(e,t,n)=>{"use strict";n.d(t,{Ad:()=>p,Bx:()=>h,C7:()=>u,HV:()=>c,gS:()=>d,kp:()=>f});var i=n(95387),r=n(62642),s=n(330),a=n(92976);const o={[a.bq.COMPUTER]:r.bq.COMPUTER,[a.bq.TABLET]:r.bq.TABLET,[a.bq.SMARTPHONE]:r.bq.SMARTPHONE,[a.bq.SPEAKER]:r.bq.SPEAKER,[a.bq.TV]:r.bq.TV,[a.bq.AVR]:r.bq.AVR,[a.bq.STB]:r.bq.STB,[a.bq.AUDIO_DONGLE]:r.bq.AUDIO_DONGLE,[a.bq.GAME_CONSOLE]:r.bq.GAME_CONSOLE,[a.bq.CAST_VIDEO]:r.bq.CAST_VIDEO,[a.bq.CAST_AUDIO]:r.bq.CAST_AUDIO,[a.bq.AUTOMOBILE]:r.bq.AUTOMOBILE,[a.bq.SMARTWATCH]:r.bq.SMARTWATCH,[a.bq.CHROMEBOOK]:r.bq.CHROMEBOOK,[a.bq.CAR_THING]:r.bq.CarThing,[a.bq.HOME_THING]:r.bq.HomeThing,[a.bq.UNKNOWN]:r.bq.UNKNOWN,[a.bq.UNKNOWN_SPOTIFY]:r.bq.UNKNOWN,[a.bq.OBSERVER]:r.bq.UNKNOWN,[a.bq.UNRECOGNIZED]:r.bq.UNKNOWN},l={[s.Z.COMPUTER]:r.bq.COMPUTER,[s.Z.TABLET]:r.bq.TABLET,[s.Z.SMARTPHONE]:r.bq.SMARTPHONE,[s.Z.SPEAKER]:r.bq.SPEAKER,[s.Z.TV]:r.bq.TV,[s.Z.AVR]:r.bq.AVR,[s.Z.STB]:r.bq.STB,[s.Z.AUDIO_DONGLE]:r.bq.AUDIO_DONGLE,[s.Z.GAME_CONSOLE]:r.bq.GAME_CONSOLE,[s.Z.CAST_VIDEO]:r.bq.CAST_VIDEO,[s.Z.CAST_AUDIO]:r.bq.CAST_AUDIO,[s.Z.AUTOMOBILE]:r.bq.AUTOMOBILE,[s.Z.SMARTWATCH]:r.bq.SMARTWATCH,[s.Z.CARTHING]:r.bq.CarThing,[s.Z.HOMETHING]:r.bq.HomeThing,[s.Z.UNKNOWN_TYPE]:r.bq.UNKNOWN,[s.Z.UNRECOGNIZED]:r.bq.UNKNOWN,[s.Z.SPEAKER_GROUP]:r.bq.SPEAKER,[s.Z.MAYBE_HEADPHONES]:r.bq.SPEAKER};function c(e){return"nearbyJamSession"in e}function u(e){return"jamSession"in e}function d(e){return{id:e.id,connectStateId:e.connectStateId,sortingId:e.connectStateId,name:e.name,modelDisplayName:e.modelDisplayName,type:e.type,isActive:e.isActive,isLocal:e.isLocal,isLocalNetwork:e.isLocalNetwork,isGroup:e.isGroup,isDisabled:e.isDisabled,supportsLogout:e.supportsLogout,supportsHiFi:e.losslessSupport.fullySupported,disabledReason:e.disabledReason,incarnation:e.incarnation}}function p(e){return e?{token:e.joinSessionToken,sessionId:e.sessionId,participants:e.sessionMembers.map((e=>({id:e.id,username:e.username,displayName:e.displayName,imageUrl:e.imageUrl,largeImageUrl:e.largeImageUrl}))),wifiBroadcast:e.wifiBroadcast,isSessionOwner:e.isSessionOwner,sessionOwnerId:e.sessionOwnerId,jamType:i.H.JAM}:{token:"",sessionId:"",participants:[],wifiBroadcast:!1,isSessionOwner:!1,sessionOwnerId:"",jamType:i.H.JAM}}function m(e,t,n){return t?{token:t.joinSessionToken,sessionId:t.sessionId,participants:t.sessionMembers.map((e=>({id:e.id,username:e.username,displayName:e.displayName,imageUrl:e.imageUrl,largeImageUrl:e.largeImageUrl}))),wifiBroadcast:t.wifiBroadcast,isSessionOwner:t.isSessionOwner,sessionOwnerId:t.sessionOwnerId,jamType:e}:n?{token:n.token,sessionId:n.deviceId,participants:[],wifiBroadcast:!0,isSessionOwner:!1,sessionOwnerId:"",jamType:e}:{token:"",sessionId:"",participants:[],wifiBroadcast:!0,isSessionOwner:!1,sessionOwnerId:"",jamType:e}}function h(e,t){let n=r.bq.UNKNOWN;t?.deviceType?n=o[t.deviceType]:e.type&&(n=l[e.type]);const a=e.type===s.Z.SPEAKER_GROUP;return{id:e.deviceId,connectStateId:t?.hostActiveDeviceId??"",sortingId:t?.hostActiveDeviceId??"",name:e.title,type:n,isActive:!1,isLocal:!1,isLocalNetwork:!0,isGroup:a,isDisabled:!1,supportsLogout:!1,supportsHiFi:!1,nearbyJamSession:m(i.H.NEARBY_JAM,t,e)}}function f(e,t){let n=r.bq.UNKNOWN;t?.deviceType?n=o[t.deviceType]:e.type&&(n=l[e.type]);const a=e.type===s.Z.SPEAKER_GROUP;return{id:e.deviceId,connectStateId:t?.hostActiveDeviceId??"",sortingId:t?.hostActiveDeviceId??"",name:e.title,type:n,isActive:!1,isLocal:!1,isLocalNetwork:!0,isGroup:a,isDisabled:!1,supportsLogout:!1,supportsHiFi:!1,jamSession:m(i.H.JAM,t,e)}}},82921:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(59640),r=n(30157);function s(){return(0,r.N)(i.h)}},47782:(e,t,n)=>{"use strict";n.d(t,{O:()=>s});var i=n(22871),r=n(30157);function s(){return(0,r.N)(i.c)}},93758:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var i=n(30758),r=n(82921);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.Z)();n.current=t,(0,i.useEffect)((()=>s.getEvents().addListener(e,(e=>{n.current(e)}))),[s,e])}},43013:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,l:()=>a});var i=n(62642),r=n(79237);const s=e=>{let t,n=!1;return e.connectionStatus===i.zP.CONNECTING?(n=!0,t=e.connectingDevice):e.connectionStatus===i.zP.CONNECTED&&(n=!0,t=e.activeDevice),{isPlayingRemotely:n,connectionStatus:e.connectionStatus,remoteDevice:t}},a=()=>(0,r.v)((e=>s(e).isPlayingRemotely))},79237:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var i=n(30758),r=n(78736),s=n(62642),a=n(93758),o=n(82921);const l={connectionStatus:s.zP.NOT_CONNECTED,activeDevice:null,connectingDevice:null,devices:[]};function c(e,t=((e,t)=>e===t)){const n=(0,o.Z)(),[s,c]=(0,i.useState)((()=>{const t=n.getConnectState()??l;return e(t)}));return(0,a.W)(r.P.UPDATE,(n=>{const i=n.data??l,r=e(i);t(s,r)||c(r)})),s}},20442:(e,t,n)=>{"use strict";n.d(t,{Hb:()=>c,b_:()=>l,hQ:()=>u,m5:()=>d});var i=n(50248),r=n(36285),s=n(40184),a=n(70896);const o="connectDeviceRestriction",l=(0,r.u)("ConnectRestrictions"),c=(0,r.u)("ConnectRestrictionsAPI"),u=(0,r.u)("ConnectRestrictionStateAPI");class d{constructor(e){this.localStorageAPI=e}restrict(e){const t=this.localStorageAPI.getItem(o),n=t instanceof s.m||t instanceof a.Y;return n||!n&&e>t?(this.localStorageAPI.setItem(o,e),{kind:"success"}):{kind:"failed",failureReason:i.v.CONNECT_ALREADY_RESTRICTED}}getRestrictionState(){const e=this.localStorageAPI.getItem(o);return e instanceof s.m||e instanceof a.Y?{isRestricted:!1,reason:null}:{isRestricted:!0,reason:e}}}},50248:(e,t,n)=>{"use strict";n.d(t,{m:()=>i,v:()=>r});let i=function(e){return e[e.CONNECT_DEBUG=0]="CONNECT_DEBUG",e}({}),r=function(e){return e[e.CONNECT_ALREADY_RESTRICTED=0]="CONNECT_ALREADY_RESTRICTED",e}({})},11408:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var i=n(62642);class r{constructor(e){this.connectRestrictions=e,this.connectRestrictions=e}updateRestrictedListOfDevices(e){return this.connectRestrictions.getRestrictionState().isRestricted?e.map((e=>e.isLocal?e:{...e,isDisabled:!0,disabledReason:i.bU.RESTRICTED})):e}}},62642:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>o,Ts:()=>c,bU:()=>a,bq:()=>r,gX:()=>s,zP:()=>i});let i=function(e){return e.NOT_CONNECTED="not_connected",e.CONNECTING="connecting",e.CONNECTED="connected",e}({}),r=function(e){return e.UNKNOWN="unknown",e.COMPUTER="computer",e.TABLET="tablet",e.SMARTPHONE="smartphone",e.SPEAKER="speaker",e.TV="tv",e.AVR="avr",e.STB="stb",e.AUDIO_DONGLE="audio_dongle",e.GAME_CONSOLE="game_console",e.CAST_VIDEO="cast_video",e.CAST_AUDIO="cast_audio",e.AUTOMOBILE="automobile",e.SMARTWATCH="smartwatch",e.CHROMEBOOK="chromebook",e.CarThing="carthing",e.HomeThing="homething",e}({}),s=function(e){return e.CONNECTING="connecting",e.LOGGED_IN="logged_in",e.NOT_LOGGED_IN="not_logged_in",e.SLEEPING="sleeping",e.NOT_LOADED="not_loaded",e.UNKNOWN="unknown",e}({}),a=function(e){return e.INCOMPATIBLE="incompatible",e.UNAVAILABLE="unavailable",e.PREMIUM_REQUIRED="premium_required",e.NOT_INSTALLED="not_installed",e.UNSUPPORTED_URI="unsupported_uri",e.NOT_AUTHORIZED="not_authorized",e.AD_PLAYING="ad_playing",e.NARRATION="narration",e.WAKING_UP="waking_up",e.TIMED_OUT_WAKEUP="timed_out_wakeup",e.UNKNOWN="unknown",e.RESTRICTED="restricted",e}({}),o=function(e){return e.Audio="AUDIO",e.Mixed="MIXED",e.Video="VIDEO",e}({});const l=["cast","connect"];function c(e){return Boolean(l.find((t=>t===e)))}},65645:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});const i=!1;function r(...e){var t;t=()=>{console.error(...e)},i&&t()}},82585:(e,t,n)=>{"use strict";n.d(t,{I:()=>s,j:()=>r});var i=n(36285);let r=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({});const s=(0,i.u)("ContextualShuffleAPI")},58752:(e,t,n)=>{"use strict";n.d(t,{$:()=>r,E:()=>s});var i=n(93827);let r=function(e){return e.UPDATE="update",e.UPDATE_COMPLETE="update_complete",e.UPDATE_ERROR="update_error",e}({});class s extends i.V{emitUpdateContextualShuffleModeSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE,{shuffleMode:t,contextURI:e});return n}emitUpdateContextualShuffleModeCompleteSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_COMPLETE,{shuffleMode:t,contextURI:e});return n}emitUpdateContextualShuffleModeErrorSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_ERROR,{shuffleMode:t,contextURI:e});return n}}},9401:(e,t,n)=>{"use strict";n.d(t,{C:()=>d});let i=function(e){return e.OFF="OFF",e.LOCAL="LOCAL",e.SMART="SMART",e}({});var r=n(82585),s=n(24344),a=n(96566),o=n(58752);const l={[i.OFF]:r.j.OFF,[i.LOCAL]:r.j.ON,[i.SMART]:r.j.SMART_SHUFFLE},c={[r.j.OFF]:i.OFF,[r.j.ON]:i.LOCAL,[r.j.SMART_SHUFFLE]:i.SMART},u=(0,a.g)(i);class d{_events=new o.E;constructor(e){this._indexedDbAPI=e,this._indexedDbAPI.getEvents().addListener(s.w.UPDATE,(e=>{if("shuffle-state"===e.data.storeName&&u(e.data.value)){const t=l[e.data.value];this._events.emitUpdateContextualShuffleModeCompleteSync(e.data.key,t)}})),this._indexedDbAPI.getEvents().addListener(s.w.DELETE,(e=>{"shuffle-state"===e.data.storeName&&this._events.emitUpdateContextualShuffleModeCompleteSync(e.data.key,r.j.OFF)}))}async getContextualShuffleMode(e){const t=await this._indexedDbAPI.getItem("shuffle-state",e);return t instanceof Error?r.j.OFF:l[t]}async setContextualShuffleMode(e,t){if(this._events.emitUpdateContextualShuffleModeSync(e,t))return;const n=c[t];if(n===i.OFF){const n=await this._indexedDbAPI.deleteItem("shuffle-state",e);if(n instanceof Error)throw this._events.emitUpdateContextualShuffleModeErrorSync(e,t),n}else{const i=await this._indexedDbAPI.setItem("shuffle-state",e,n);if(i instanceof Error)throw this._events.emitUpdateContextualShuffleModeErrorSync(e,t),i}}getEvents(){return this._events}}},95175:(e,t,n)=>{"use strict";n.d(t,{n0:()=>a,v8:()=>o});class i{createCookie(e,t=document){const{name:n,value:i,days:r,domain:s,secure:a=!0,samesite:o="none"}=e;let l="";if(r){const e=new Date;e.setTime(Date.now()+24*r*60*60*1e3),l=`; expires=${e.toUTCString()}`}else l="";let c=`${n}=${i}${l}; path=/`;s&&s.length&&(c+=`;domain=${s}`),i&&(!0===a&&(c+=";secure"),c+=`;samesite=${o}`),t.cookie=c}readCookie(e,t=document){try{const n=t.cookie;return n.split(";").map((e=>e.trim().split("="))).reduce(((e,t)=>(e.set(t[0],t[1]),e)),new Map).get(e)}catch(e){return}}deleteCookie(e,t=document,n){this.createCookie({name:e,value:"",days:-1,domain:n},t)}}let r=null;const s=()=>(r||(r=new i),r);function a(e,t=document){s().createCookie(e,t)}function o(e,t=document){return s().readCookie(e,t)}},77655:(e,t,n)=>{"use strict";n.d(t,{$:()=>a,t:()=>s});var i=n(36285),r=n(12418);const s=(0,i.u)("Cosmos");class a{constructor(e,t){this.resolver=e,this.requestFactory=t}head(e,t){return this.resolve(r.I.HEAD,e,null,t).then((e=>e.headers))}get(e,t,n){return this.resolve(r.I.GET,e,t,n).then((e=>e.body))}post(e,t=null,n){return this.resolve(r.I.POST,e,t,n).then((e=>e.body))}put(e,t,n){return this.resolve(r.I.PUT,e,t,n).then((e=>e.body))}del(e,t,n){return this.resolve(r.I.DELETE,e,t,n).then((e=>e.body))}patch(e,t,n){return this.resolve(r.I.PATCH,e,t,n).then((e=>e.body))}sub(e,t,n=(e=>{console.error(e)}),i=null,s={}){const a=this.requestFactory(r.I.SUB,e,s,i);return this.resolver.resolve(a,(e=>t(e.body)),n)}postSub(e,t=null,n,i=(e=>{console.error(e)})){const s=this.requestFactory(r.I.SUB,e,{},t);return this.resolver.resolve(s,(e=>n(e.body)),i)}request(e,t,n=null,i){return this.resolve(e,t,n,i)}resolve(e,t,n=null,i={}){return new Promise(((r,s)=>{const a=this.requestFactory(e,t,i,n);this.resolver.resolve(a,r,s)}))}}},45695:(e,t,n)=>{"use strict";n.d(t,{h:()=>u});var i=n(77655),r=n(12418),s=n(32111);class a{constructor(e,t,n){this.status=e,this.headers=(0,s.T)(t),this.body=this.parseBody(n)}static isSuccessStatus(e){return e>=200&&e<=299}static parse(e){const t=JSON.parse(e),n=this.isSuccessStatus(t.status)&&t.body?t.body:"";return new a(t.status,t.headers||{},n)}parseBody(e){return""!==e?JSON.parse(e):{}}}var o=n(91771),l=n.n(o);class c{constructor(e,t){this.send=e,this.cancel=t}resolve(e,t,n){const i=this.send({request:e.stringify(),persistent:e.method===r.I.SUB,onSuccess:i=>this.onSuccess(e,i,t,n),onFailure:(t,i)=>this.onFailure(e,t,i,n)});return{cancel:()=>{this.cancel(i)}}}onSuccess(e,t,n,i){try{const r=a.parse(t);if(a.isSuccessStatus(r.status))n(r);else{i(l()(r.status,`${e.method} request to ${e.uri} failed with status code ${r.status}`))}}catch(t){const n=t instanceof Error?t.message:"(unknown error object)";i(new Error(`${e.method} request to ${e.uri} failed with exception '${n}'`))}}onFailure(e,t,n,i){i(new Error(`${e.method} request to ${e.uri} request failed with error code ${t} (${n})`))}}function u(){const e=function(){const e=n.g.window||{};return new c(e.sendCosmosRequest,e.cancelCosmosRequest)}(),t=(...e)=>new r.K(...e);return new i.$(e,t)}},12418:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,K:()=>s});var i=n(32111);let r=function(e){return e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.SUB="SUB",e.PATCH="PATCH",e}({});class s{constructor(e,t,n,r){this.uri=t,this.headers=(0,i.T)(n),this.body=this.stringifyBody(r||""),this.method=e}stringify(){return JSON.stringify({headers:this.headers,body:this.body,method:this.method,uri:this.uri})}stringifyBody(e){return"string"!=typeof e?JSON.stringify(e):e}static parse(e){const t=JSON.parse(e);return new s(t.method,t.uri,t.headers,t.body)}}},32111:(e,t,n)=>{"use strict";function i(e){return Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})}n.d(t,{T:()=>i})},45917:(e,t,n)=>{"use strict";n.d(t,{F:()=>r,p:()=>s});var i=n(36285);let r=function(e){return e[e.NONE=0]="NONE",e[e.ONLY_CURATED=1]="ONLY_CURATED",e[e.ONLY_UNCURATED=2]="ONLY_UNCURATED",e}({});const s=(0,i.u)("CurationAPI")},61207:(e,t,n)=>{"use strict";n.d(t,{e:()=>r});var i=n(33549);class r extends i.e{}},31567:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(91008),r=n(20817);function s(e){switch((0,i.o_h)(e)?.type){case i.NQG.TRACK:case i.NQG.LOCAL_TRACK:return r.BP;case i.NQG.EPISODE:return r.Xn;default:return r.gv}}},8732:(e,t,n)=>{"use strict";n.d(t,{FR:()=>a,jy:()=>r,oq:()=>s});var i=n(93827);let r=function(e){return e.CURATE_ITEMS="curate_items",e}({}),s=function(e){return e.UPDATE_CURATED_ITEM="update_curated_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},59593:(e,t,n)=>{"use strict";n.d(t,{s:()=>s});var i=n(49769),r=n(8732);class s extends r.FR{constructor(e){super(),this.cache=e,this.aggregator=(0,i.X)(this.onCuratedBatchChanged.bind(this),100),this.onAddListener(r.oq.UPDATE_CURATED_ITEM,(e=>{this.aggregator.subscribe(e.data.options.uri)})),this.onRemoveListener(r.oq.UPDATE_CURATED_ITEM,(e=>{this.aggregator.unsubscribe(e.data.options.uri)}))}emitUpdateCuratedItems(e,t){Array.isArray(t)?e.forEach(((e,n)=>{this.cache.set(e,t[n]),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t[n]})})):e.forEach((e=>{this.cache.set(e,t),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t})}))}emitOperationSync(e,t,n,i){return this.emitSync(r.oq.OPERATION,{operation:e,curatedItemUri:t,addedCurationContextUris:n,removedCurationContextUris:i}).defaultPrevented}emitOperationComplete(e,t,n,i,s=null){this.emit(r.oq.OPERATION_COMPLETE,{operation:e,curatedItemUri:t,addedCurationContextUris:n,removedCurationContextUris:i,error:s})}}},7069:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var i=n(91008);function r(e){const t=(0,i.o_h)(e);return t?.type===i.NQG.TRACK||t?.type===i.NQG.LOCAL_TRACK||t?.type===i.NQG.EPISODE}},36025:(e,t,n)=>{"use strict";n.d(t,{KY:()=>o,cX:()=>s,mb:()=>c,rw:()=>l});var i=n(99146),r=n(28999);const s=(e,t,n)=>(n&&e.searchParams.set("t",n.toString()),t&&(e.searchParams.has("utm_source")||e.searchParams.set("utm_source",t)),e.searchParams.has("utm_medium")||e.searchParams.set("utm_medium",(0,i.X)()?"mobile":"desktop"),e);function a(e,t=!0){const n=new URL("undefined"!=typeof location&&location.href?location.href:"https://open.spotify.com");let i=null;if(e){const r=e.toURL();i=new URL(r),t&&n.searchParams.forEach(((e,t)=>{i.searchParams.set(t,e)}))}else i=n,t||(i.search="");i.searchParams.delete("nd"),i.searchParams.delete("fallback"),i.searchParams.set("go","1");const s=(0,r.C)("config");return"string"==typeof s?.correlationId&&i.searchParams.append("sp_cid",s.correlationId),i}function o(e,t){const n=a(e,t);return n.searchParams.set("fallback","getapp"),n}function l(e,t){const n=a(e,t);return n.searchParams.set("fallback","download"),n}function c(){return new URL(`https://www.spotify.com/download${window.location.search}`)}},13338:(e,t,n)=>{"use strict";n.d(t,{$W:()=>a,H2:()=>o,Jf:()=>i,f6:()=>r,l_:()=>s});const i="STORE_DEFERRED_ACTION",r="PULL_DEFERRED_ACTION";let s=function(e){return e.PLAY="play",e.PLAYING="playing",e.USER_INVESTMENT="user-investment",e}({});const a=(e,t)=>({type:i,storeAction:e,actionIntent:t}),o=()=>({type:r})},42221:(e,t,n)=>{"use strict";n.d(t,{I:()=>i.I});var i=n(22183)},99724:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});const i=(0,n(30758).createContext)(null)},30157:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var i=n(30758),r=n(99724);function s(e){return function(){const e=(0,i.useContext)(r.N);if(null===e)throw new Error("Trying to use 'RegistryContext' without 'RegistryProvider'!");return e}().resolve(e)}},22183:(e,t,n)=>{"use strict";function i(e,t,n,i){const r=[{node:e,path:[]}],s={terminate:!1,exclude:!1};let a=i;for(;r.length>0;){const{node:e,path:i}=r.pop();if(a=n(a,e,i,s),!0===s.terminate)return a;if(!0===s.exclude){s.exclude=!1;continue}const o=e.getNodes(t).reverse();r.push(...o.map((t=>({node:t,path:[...i,e]}))))}return a}n.d(t,{I:()=>E});let r=function(e){return e[e.FORWARD=0]="FORWARD",e[e.BACKWARD=1]="BACKWARD",e}({});class s extends Error{}class a{_parents=new Set;_children=new Map;constructor(e,t,n){this._key=t,this._value=n,null!==e&&this._parents.add(e)}addChild(e,t){let n=this._children.get(e);return void 0!==n?(n._parents.add(this),n):(function(e,t,n){t(e,r.BACKWARD,((e,t,i)=>{const r=i.map((e=>e.getKey()));if(r.includes(n))throw new s(`Found dependency cycle! ${[n,...r].reverse().join(" -> ")}`)}),void 0)}(this,i,e),n=new a(this,e,t),this._children.set(e,n),n)}removeChild(e){this._children.delete(e)}getNodes(e){switch(e){default:case r.FORWARD:return this.getChildren();case r.BACKWARD:return this.getParents()}}getParents(){return Array.from(this._parents.values())}getChildren(){return Array.from(this._children.values())}isRoot(){return 0===this._parents.size}getKey(){return this._key}getValue(){return this._value}}class o extends a{constructor(e,t){super(null,e,t)}}class l{addChild(){return this}removeChild(){}getNodes(){return[]}getParents(){return[]}getChildren(){return[]}isRoot(){return!0}getKey(){throw new Error("Method not supported.")}getValue(){throw new Error("Method not supported.")}}let c=function(e){return e[e.ROOT=0]="ROOT",e[e.DEPENDENCY=1]="DEPENDENCY",e[e.INSTANCE=2]="INSTANCE",e[e.VALUE=3]="VALUE",e}({});var u=n(36285);class d extends Error{}class p{constructor(e,t){this._resolve=e,this._wrap=t}resolve(e){return m(e,this.resolveImpl(e))}resolveNoThrow(e){return this.resolveImpl(e)}resolveImpl(e){return this._resolve(e)}wrap(e,t){return this.wrapImpl(e,t)}wrapImpl(e,t){return this._wrap(e,t)}}function m(e,t){if(null===t)throw new d(`No registration was found for token '${(0,u.o)(e)}'!`);return t}function h(e,t){e.getChildren().forEach((e=>{const n=t.addChild(e.getKey(),e.getValue());h(e,n)}))}function f(e){const t=new o(e.getKey(),e.getValue());return h(e,t),t}class g{_map=new Map;_tree=function(){return new l}();constructor(e=[]){this._parents=e}registerValue(e,t){return this.registerImpl(e,{instance:t})}registerFactory(e,t){return this.registerImpl(e,{factory:t,instance:void 0})}registerImpl(e,t){const n=(0,u.o)(e);return this._tree.addChild(`dependency:${n}`,{type:c.DEPENDENCY,name:n,token:e}),this._map.set(e,t),this}resolve(e){return m(e,this.resolveImpl(this._tree,e))}resolveNoThrow(e){return this.resolveImpl(this._tree,e)}resolveImpl(e,t){{const n=(0,u.o)(t);e=e.addChild(`dependency:${n}`,{type:c.DEPENDENCY,name:n,token:t})}const n=this._map.get(t);if(void 0===n){for(const e of this._parents){const n=e.resolveNoThrow(t);if(null!==n)return n}return null}if(function(e){return void 0!==e.instance}(n))return n.instance;const i=new p((t=>this.resolveImpl(e,t)),((t,n)=>this.wrapImpl(e,t,n)));const r=n.factory(i);{const t=function(e){return null===e?"null":"object"==typeof e?e.constructor.name:typeof e}(r);e=e.addChild(`instance:${t}`,{type:c.INSTANCE,name:t})}return n.instance=r}wrap(e,t){return this.wrapImpl(this._tree,e,t)}wrapImpl(e,t,n){return e=e.addChild(`value:${n}`,{type:c.VALUE,name:n}),t}getDependencyTree(){return this._map.forEach(((e,t)=>this.resolve(t))),f(this._tree)}}function E(e=[]){return new g(e)}},36285:(e,t,n)=>{"use strict";function i(e){return Symbol.for(e)}function r(e){return e.description??e.toString()}n.d(t,{o:()=>r,u:()=>i})},72191:(e,t,n)=>{"use strict";function i(e,t){return{backgroundBase:e[t].backgroundBase.toRGBA255(),backgroundTinted:e[t].backgroundTintedBase.toRGBA255(),textBase:e[t].textBase.toRGBA255(),textSubdued:e[t].textSubdued.toRGBA255(),textBrightAccent:e[t].textBrightAccent.toRGBA255()}}function r(e){return{"--background-base":e.background.base,"--background-highlight":e.background.highlight,"--background-press":e.background.press,"--background-elevated-base":e.background.elevated.base,"--background-elevated-highlight":e.background.elevated.highlight,"--background-elevated-press":e.background.elevated.press,"--background-tinted-base":e.background.tinted.base,"--background-tinted-highlight":e.background.tinted.highlight,"--background-tinted-press":e.background.tinted.press,"--text-base":e.text.base,"--text-subdued":e.text.subdued,"--text-bright-accent":e.text.brightAccent,"--text-negative":e.text.negative,"--text-warning":e.text.warning,"--text-positive":e.text.positive,"--text-announcement":e.text.announcement,"--essential-base":e.essential.base,"--essential-subdued":e.essential.subdued,"--essential-bright-accent":e.essential.brightAccent,"--essential-negative":e.essential.negative,"--essential-warning":e.essential.warning,"--essential-positive":e.essential.positive,"--essential-announcement":e.essential.announcement,"--decorative-base":e.decorative.base,"--decorative-subdued":e.decorative.subdued}}n.d(t,{I:()=>r,c:()=>i})},27483:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});var i=n(411);function r(e){if(!e)return null;const t=function(e){return"alpha"in e}(n=e)?{r:n.red??0,g:n.green??0,b:n.blue??0,a:n.alpha??1}:n;var n;return i.Q.fromRGB(t,function(e,t,n){if(t===n)throw new Error("Minimum and maximum values cannot be the same.");return(e-t)/(n-t)}(t.a,0,255))}function s(e){if(!e)return null;const t=r(e.backgroundBase),n=r(e.backgroundTintedBase),i=r(e.textBase),s=r(e.textBrightAccent),a=r(e.textSubdued);return t&&n&&i&&s&&a?{backgroundBase:t,backgroundTintedBase:n,textBase:i,textBrightAccent:s,textSubdued:a}:null}function a(e){const t=r(e?.encoreBaseSetTextColor),n=s(e?.minContrast),i=s(e?.highContrast),a=s(e?.higherContrast);return t&&n&&i&&a?{encoreBaseSetTextColor:t,minContrast:n,highContrast:i,higherContrast:a}:null}},3773:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var i=n(33549);class r extends i.e{}},46131:(e,t,n)=>{"use strict";n.d(t,{DO:()=>s,XN:()=>r});var i=n(57776);n(59147);const r=new i.l("getDynamicColors","query","f0f112945d6d745bd8ff790317bbf8d310036da75df33130490e9d6dc96c59d9",null),s=new i.l("getDynamicColorsByUris","query","f0f112945d6d745bd8ff790317bbf8d310036da75df33130490e9d6dc96c59d9",null)},93827:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(9138);class r{constructor(e=new i.bk){this._emitter=e,this._emitter=e||new i.bk}createEvent(e,t){return this._emitter.createEvent(e,t)}addListener(e,t,n){this._emitter.addListener(e,t,n);return()=>{this.removeListener(e,t,n)}}removeListener(e,t,n){return this._emitter.removeListener(e,t,n),this}onAddListener(e,t){return this._emitter.onAddListener(e,t),this}onRemoveListener(e,t){return this._emitter.onRemoveListener(e,t),this}emit(e,t){return this._emitter.emit(e,t)}emitSync(e,t){return this._emitter.emitSync(e,t)}}},27241:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var i=n(53638);function r(){return(0,i.n1)()}},53638:(e,t,n)=>{"use strict";n.d(t,{VI:()=>o,n1:()=>c});var i=n(36285);class r{constructor(e,t=0){this._output=e,this._offset=t,this._view=new DataView(this._output.buffer,this._output.byteOffset)}write(e){this._view.setInt32(this._offset,e.byteLength),this._output.set(e,this._offset+4),this._offset+=e.byteLength+4}}function s(e){const t=new TextEncoder,n=t.encode(e.service),i=t.encode(e.method),s=e.payload,a=new Uint8Array(4+n.byteLength+4+i.byteLength+4+s.byteLength),o=new r(a);return o.write(n),o.write(i),o.write(s),a.buffer}class a extends Error{constructor(){super("aborted")}}const o=(0,i.u)("EsperantoTransport");class l{constructor(e,t){this._onSend=e,this._onCancel=t}callSingle(e,{signal:t}={}){let n;return new Promise(((i,r)=>{const s=this.call(e,!1,i,r);t?.addEventListener("abort",n=()=>{s.cancel(),r(new a)})})).finally((()=>t?.removeEventListener("abort",n)))}callStream(e,t){return this.call(e,!0,t,(e=>{throw e}))}call(e,t,n,i){const r=this._onSend({request:s(e),persistent:t,onSuccess:t=>{t instanceof ArrayBuffer?n(new Uint8Array(t)):i(new Error(`${e.service}.${e.method} failed with invalid payload!`))},onFailure:(t,n)=>{i(new Error(`${e.service}.${e.method} failed with code: ${n}`))}}),a=this._onCancel;return{cancel(){a(r)}}}}function c(){const e=n.g.window||{};return new l(e.executeEsperantoCall,e.cancelEsperantoCall)}},72046:(e,t,n)=>{"use strict";n.d(t,{G:()=>r,P:()=>s});var i=n(36285);let r=function(e){return e.UNKNOWN="unknown",e.CAR="car",e.HEADPHONES="headphones",e.SPEAKER="speaker",e.WEARABLE="wearable",e}({});const s=(0,i.u)("ExternalAccessoryAPI")},53481:(e,t,n)=>{"use strict";n.d(t,{b:()=>r,u:()=>s});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'ExternalAccessoryContext' without 'ExternalAccessoryProvider'!");return e}},18852:(e,t,n)=>{"use strict";n.d(t,{W:()=>f});var i=n(72671),r=n(85515),s=n(72046);let a=function(e){return e[e.unknown=0]="unknown",e[e.car=1]="car",e[e.headphones=2]="headphones",e[e.speaker=3]="speaker",e[e.wearable=4]="wearable",e[e.other=5]="other",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 0:case"unknown":return a.unknown;case 1:case"car":return a.car;case 2:case"headphones":return a.headphones;case 3:case"speaker":return a.speaker;case 4:case"wearable":return a.wearable;case 5:case"other":return a.other;default:return a.UNRECOGNIZED}}let l=function(e){return e[e.none=0]="none",e[e.regex=1]="regex",e[e.model=2]="model",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function c(e){switch(e){case 0:case"none":return l.none;case 1:case"regex":return l.regex;case 2:case"model":return l.model;default:return l.UNRECOGNIZED}}const u={fromJSON:e=>({category:d(e.category)?o(e.category):0,company:d(e.company)?globalThis.String(e.company):"",model:d(e.model)?globalThis.String(e.model):"",version:d(e.version)?globalThis.String(e.version):"",interapp:!!d(e.interapp)&&globalThis.Boolean(e.interapp),inferenceMethod:d(e.inferenceMethod)?c(e.inferenceMethod):0,confidence:d(e.confidence)?globalThis.Number(e.confidence):0,displayName:d(e.displayName)?globalThis.String(e.displayName):""}),toJSON(e){const t={};return 0!==e.category&&(t.category=function(e){switch(e){case a.unknown:return"unknown";case a.car:return"car";case a.headphones:return"headphones";case a.speaker:return"speaker";case a.wearable:return"wearable";case a.other:return"other";case a.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.category)),""!==e.company&&(t.company=e.company),""!==e.model&&(t.model=e.model),""!==e.version&&(t.version=e.version),!0===e.interapp&&(t.interapp=e.interapp),0!==e.inferenceMethod&&(t.inferenceMethod=function(e){switch(e){case l.none:return"none";case l.regex:return"regex";case l.model:return"model";case l.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.inferenceMethod)),0!==e.confidence&&(t.confidence=e.confidence),""!==e.displayName&&(t.displayName=e.displayName),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={category:0,company:"",model:"",version:"",interapp:!1,inferenceMethod:0,confidence:0,displayName:""};return t.category=e.category??0,t.company=e.company??"",t.model=e.model??"",t.version=e.version??"",t.interapp=e.interapp??!1,t.inferenceMethod=e.inferenceMethod??0,t.confidence=e.confidence??0,t.displayName=e.displayName??"",t}};function d(e){return null!=e}const p=`${i.I_}/external-accessory-mapping-serving/v1`;function m(e){switch(e){case a.car:return s.G.CAR;case a.headphones:return s.G.HEADPHONES;case a.speaker:return s.G.SPEAKER;case a.wearable:return s.G.WEARABLE;case a.UNRECOGNIZED:case a.unknown:default:return s.G.UNKNOWN}}class h{_cache=new r.fq(864e5);constructor(e){this._builder=e}async lookup(e){return this._cache.create(e,(()=>this.sendLookupRequest(e)))}async sendLookupRequest(e){const t=await this._builder.build().withoutMarket().withJsonContentType().withHost(p).withPath(`/lookup/${e}`).send(),{category:n,company:i,model:r,displayName:s}=u.fromJSON(t.body);return{type:m(n),brand:i,model:r,displayName:s}}}function f(e){return new h(e)}},93885:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});const i=(0,n(36285).u)("FeedbackAPI")},54580:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,c:()=>r});var i=n(93827);let r=function(e){return e.UPDATE_CONTEXTUAL_BAN="update_contextual_ban",e}({});class s extends i.V{}},53377:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(30758),r=n(14343),s=n(91008),a=n(13134),o=n(43329);function l(e,t,n,l){const c=(0,r.NC)(o.en,{loadingValue:!1}),u=(0,a.j)();return(0,i.useMemo)((()=>c&&u.getCapabilities().canBan&&(0,s.U_m)(e)&&((0,s.tbX)(t)||(0,s._Tv)(t))&&(!n||!!l)),[n,t,u,l,c,e])}},57270:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var i=n(14343),r=n(54580),s=n(13134),a=n(43329),o=n(30758);function l(e,t,n){const l=(0,i.NC)(a.en,{loadingValue:!1}),[c,u]=(0,o.useState)(l&&n),d=(0,s.j)();return(0,o.useEffect)((()=>l?d.getEvents().addListener(r.c.UPDATE_CONTEXTUAL_BAN,(n=>{n.data.contextUri===e&&n.data.uri===t&&u(n.data.isBanned)}),{contextUri:e,uri:t}):()=>{}),[e,d,l,t]),!!c}},13134:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var i=n(30157),r=n(93885);function s(){return(0,i.N)(r.n)}},93629:(e,t,n)=>{"use strict";n.d(t,{SP:()=>r,X8:()=>i,ge:()=>s,kH:()=>a});const i=async e=>e.requestFullscreen?e.requestFullscreen({navigationUI:"hide"}):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():Promise.resolve(),r=async()=>document.fullscreenElement&&document.exitFullscreen?document.exitFullscreen():document.mozFullScreen&&document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen&&document.webkitExitFullscreen?document.webkitExitFullscreen():Promise.resolve(),s=()=>!!(document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen),a=()=>!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)},74096:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var i=n(30758),r=n(93629);const s=e=>{const t=(0,i.useRef)(e);t.current=e,(0,i.useEffect)((()=>{const e=()=>{t.current((0,r.ge)())};return window.addEventListener("fullscreenchange",e),document.addEventListener("fullscreenchange",e),window.addEventListener("fullscreenChange",e),document.addEventListener("fullscreenChange",e),window.addEventListener("webkitfullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),window.addEventListener("mozfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),()=>{window.removeEventListener("fullscreenchange",e),document.removeEventListener("fullscreenchange",e),window.removeEventListener("fullscreenChange",e),document.removeEventListener("fullscreenChange",e),window.removeEventListener("mozfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),window.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e)}}),[])}},34671:(e,t,n)=>{"use strict";n.d(t,{o:()=>i,q:()=>s});const i=(0,n(36285).u)("GraphQLBatchedLoader"),r=50;function s(e,t=r){return async(n,i,r,s)=>{const a=[],o=Math.max(...r.map((e=>i[e]?.length??0)));for(let l=0;l{o[e]=o[e]?.slice(l,l+t)})),void 0!==s?a.push(e(n,o,s)):a.push(e(n,o))}return(await Promise.all(a)).map((e=>{if(null===e||void 0!==e.errors||null===e.data)throw new Error("GraphQL batched query failed!");return e.data}))}}},81834:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});const i=(0,n(30758).createContext)({request:()=>{throw new Error("GraphQL Context not initialized with Request object")}})},57776:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});class i{constructor(e,t,n,i){this.name=e,this.operation=t,this.sha256Hash=n,this.value=i}}},71506:(e,t,n)=>{"use strict";n.d(t,{lY:()=>o,zk:()=>a});var i=n(36285),r=n(72671),s=n(21398);const a=(0,i.u)("GraphQLLoader");function o(e,t){return async(n,i,a={},o=[],u=null)=>{const{operation:d}=n;if("subscription"===d)throw new Error("GraphQL subscriptions are not supported!");const p=await async function(e,t,n,i={},a=[],o=null,u){const{operation:d}=t;try{let s;return s=u?await async function(e,t,n,i,s,a=null){const{name:o}=t;return e.build().withHost(r.Cd).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withQueryParameters(i).withBody({variables:n,operationName:o,extensions:l(t)}).withHeaders(s).withEndpointIdentifier(`/query/${o}`).withAbortSignal(a).send()}(e,t,n,i,a,o):"mutation"===d?await async function(e,t,n,i){const{name:s}=t;return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({variables:n,operationName:s,extensions:l(t)}).withQueryParameters({...i}).withEndpointIdentifier(`/query/${s}`).send()}(e,t,n,i):await async function(e,t,n,i,s,a=null){const{name:o}=t;return e.build().withHost(r.J8).withMethod("GET").withoutMarket().withPath("/query").withJsonContentType().withQueryParameters({operationName:o,variables:JSON.stringify(n),extensions:JSON.stringify(l(t)),...i}).withHeaders(s).withEndpointIdentifier(`/query/${o}`).withAbortSignal(a).send()}(e,t,n,i,a,o),s.body?.errors?.some((e=>"PersistedQueryNotFound"===e.message))?c(e,t,n,i):s}catch(r){const a=405;if(r instanceof s.O&&r.status===a)return c(e,t,n,i);throw r}}(e,n,i,a,o,u,t);return p.body}}function l(e){return{persistedQuery:{version:1,sha256Hash:e.sha256Hash}}}async function c(e,t,n,i){const{name:s,value:a}=t;if(null===a)throw new Error(`Fallback query for "${s}" is not available!`);return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({operationName:s,variables:n,query:a,extensions:l(t)}).withQueryParameters({...i}).withEndpointIdentifier(`/query/${s}`).send()}},27963:(e,t,n)=>{"use strict";async function i(e,t,n,i,r){try{const s=await e(t,n,i,r);return s?.errors?Promise.reject(s?.errors):s}catch(e){return e instanceof Error?Promise.reject([{message:e.message}]):Promise.reject(null)}}n.d(t,{c:()=>i})},59147:(e,t,n)=>{"use strict";n.d(t,{I:()=>c,i:()=>l});var i=n(30758),r=n(16273),s=n(50486),a=n(81834),o=n(27963);const l=6e4;function c(e,t,n){const l=(0,r.jE)(),{request:c}=(0,i.useContext)(a.j),{name:u,operation:d,sha256Hash:p}=e,m="query"===d,h=m&&n?.gcTime?n?.gcTime:0,f=m&&n?.staleTime?n?.staleTime:0,g=(0,i.useRef)([u,t,p]);g.current=[u,t,p];const{data:E,isLoading:_,error:y}=(0,s.I)({queryKey:g.current,queryFn:()=>(0,o.c)(c,e,t),...n,gcTime:h,staleTime:f,meta:{persist:!0}}),v=(0,i.useCallback)((()=>l.invalidateQueries({queryKey:g.current,exact:!0})),[l]);return{data:E?.data??null,extensions:E?.extensions,error:y??null,loading:_,invalidate:v}}},51028:(e,t,n)=>{"use strict";n.d(t,{$:()=>v,E:()=>b});var i=n(83844),r=n(36285),s=n(33549);class a extends s.e{constructor(e,t){super(e,t)}}class o extends s.e{constructor(e,t){super(e,t)}}n(1903);class l extends s.e{constructor(e,t){super(e,t)}}class c extends s.e{constructor(e,t){super(e,t)}}class u extends s.e{constructor(e,t){super(e,t)}}class d extends s.e{constructor(e,t){super(e,t)}}class p extends s.e{}const m={0:e=>{const t=e;return t.createObjectStore("shuffle-state"),t}};var h=n(24344);function f(e){e instanceof Error&&!(e instanceof o)&&console.error(e,"cause:",e.cause)}class g{constructor(e){this.name=e}close(){}dispatchEvent(){return!1}addEventListener(){}removeEventListener(){}postMessage(){}onmessage(){}onmessageerror(){}}class E extends(window.BroadcastChannel??g){postMessage(e){super.postMessage(e)}addEventListener(e,t,n){super.addEventListener(e,t,n)}}class _ extends s.e{constructor(e,t){super(e,t)}}var y=n(35163);const v=(0,r.u)("IndexedDbAPI");class b{constructor(e){this.name=`${e}:client-web`,this.version=1,this._events=new h.H,this._channel=new E(this.name),this._channel.addEventListener("message",(e=>{const{type:t,payload:n}=e.data;if(t===h.w.UPDATE){const{storeName:e,key:t,value:i}=n;this._events.emit(h.w.UPDATE,{storeName:e,key:t,value:i})}else if(t===h.w.DELETE){const{storeName:e,key:t}=n;this._events.emit(h.w.DELETE,{storeName:e,key:t})}}))}getEvents(){return this._events}async openDb(){let e=!0;const t=async()=>(0,i.P2)(this.name,this.version,{upgrade(e,t,n){!function(e,t,n){if(!n)throw new p(`Version change triggered for version ${t} but there is no new version to migrate to.`);let i=t;for(;i"VersionError"===n.name&&e?(e=!1,(0,y.UD)(new a("Newer IndexedDB version installed than expected. Deleting DB and setting it to expected version.",{cause:n})),await(0,i.MR)(this.name),t()):n)),n=await t().catch((r=this.version,e=>{if(e instanceof DOMException)switch(e.name){case"ConstraintError":return new _(`ConstraintError while opening database version "${r}"`,{cause:e});case"VersionError":return new a(e.message,{cause:e});case"AbortError":return new l(`AbortError while opening database version "${r}"`,{cause:e})}return new c(`Error opening database version "${r}"`,{cause:e})}));var r;return f(n),n}async getItem(e,t){const n=await this.openDb();if(n instanceof Error)return n;const i=await n.get(e,t).then((n=>void 0===n?new o(`Key "${t}" not found in store "${e}". DB version: "${this.version}"`,{cause:void 0}):n)).catch(((e,t,n)=>i=>{if(i instanceof DOMException)switch(i.name){case"NotFoundError":return new o(`Key "${n}" not found in store "${t}". DB version: "${e}"`,{cause:i});case"InvalidStateError":return new d(`InvalidStateError when reading key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})}return new c(`Error reading key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})})(this.version,e,t));return f(i),i}async setItem(e,t,n){const i=await this.openDb();if(i instanceof Error)return i;const r=await i.put(e,n,t).catch(((e,t)=>n=>{if(n instanceof DOMException)switch(n.name){case"QuotaExceededError":return new u(`Quota exceeded when writing to object store "${t}". DB version: "${e}"`,{cause:n});case"AbortError":return new l(`Abort occured when writing to object store "${t}". DB version: "${e}"`,{cause:n})}return new c(`Error writing to "${t}". DB version: "${e}"`,{cause:n})})(this.version,e));return f(r),r instanceof Error||(this._channel.postMessage({type:h.w.UPDATE,payload:{storeName:e,key:t,value:n}}),this._events.emit(h.w.UPDATE,{storeName:e,key:t,value:n})),r}async deleteItem(e,t){const n=await this.openDb();if(n instanceof Error)return n;const i=n.delete(e,t).catch(((e,t,n)=>i=>{if(i instanceof DOMException)switch(i.name){case"NotFoundError":return new o(`Key "${n}" not found in store "${t}". DB version: "${e}"`,{cause:i});case"InvalidStateError":return new d(`InvalidStateError when deleting key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})}return new c(`Error deleting key "${n}" from store "${t}". DB version: "${e}"`,{cause:i})})(this.version,e,t));return f(i),i instanceof Error||(this._channel.postMessage({type:h.w.DELETE,payload:{storeName:e,key:t}}),this._events.emit(h.w.DELETE,{storeName:e,key:t})),i}}},24344:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,w:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e.DELETE="delete",e}({});class s extends i.V{}},20817:(e,t,n)=>{"use strict";n.d(t,{BP:()=>s,E3:()=>o,Ho:()=>p,IU:()=>u,Xn:()=>a,c_:()=>c,db:()=>d,gv:()=>r,oT:()=>l});var i=n(36285);const r="spotify:collection",s="spotify:collection:tracks",a="spotify:collection:your-episodes",o="spotify:collection:local-files";let l=function(e){return e[e.YES=0]="YES",e[e.NO_IN_FOLDER=1]="NO_IN_FOLDER",e[e.NO=2]="NO",e}({});class c extends Error{constructor(e){super(`"${e}" is not a valid YLX filter.`),Object.setPrototypeOf(this,c.prototype)}}class u extends Error{constructor(e){super(`"${e}" is not a valid YLX sort order.`),Object.setPrototypeOf(this,u.prototype)}}class d extends Error{constructor(e){super(`${e}`),Object.setPrototypeOf(this,d.prototype)}}const p=(0,i.u)("LibraryAPI")},26184:(e,t,n)=>{"use strict";n.d(t,{Ir:()=>r,UV:()=>a,b7:()=>l,tS:()=>s,uL:()=>o});var i=n(93827);let r=function(e){return e.ALBUMS="albums",e.ARTISTS="artists",e.SHOWS="shows",e.TRACKS="tracks",e.EPISODES="episodes",e.BOOKS="books",e.EVENTS="events",e}({}),s=function(e){return e.ADD="add",e.REMOVE="remove",e}({}),a=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.UPDATE_PIN="update_pin",e.UPDATE_PIN_ERROR="update_pin_error",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({}),o=function(e){return e[e.TOO_MANY_PINS=0]="TOO_MANY_PINS",e[e.NO_PIN_IN_FOLDER=1]="NO_PIN_IN_FOLDER",e}({});class l extends i.V{}},67291:(e,t,n)=>{"use strict";n.d(t,{HI:()=>s,Hh:()=>i,tl:()=>r});let i=function(e){return e.TEXT="TEXT",e.TAGS="TAGS",e}({}),r=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e&&e.startsWith("tags contains")?{field:i.TAGS,operator:r.CONTAINS,value:e.slice(14)}:"string"==typeof e?{field:i.TEXT,operator:r.CONTAINS,value:e.trim()}:e}},13357:(e,t,n)=>{"use strict";n.d(t,{Sw:()=>r,ci:()=>s,xB:()=>i});let i=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),r=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ALBUM_NAME="ALBUM_NAME",e.ADDED_AT="ADDED_AT",e}({}),s=function(e){return e.NAME="NAME",e.SHOW_NAME="SHOW_NAME",e.ADDED_AT="ADDED_AT",e}({})},36649:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(49769),r=n(26184);class s extends r.b7{_numListeners=0;constructor(e){super(),this._cache=e,this._aggregator=(0,i.X)(this.onBatchChanged.bind(this),100),this.onAddListener(r.UV.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(r.UV.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(r.UV.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates(),this._aggregator.subscribe(e.data.options.uri)})),this.onRemoveListener(r.UV.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates(),this._aggregator.unsubscribe(e.data.options.uri)}))}emitUpdateItems(e,t){Array.isArray(t)?e.forEach(((e,n)=>{this._cache.set(e,t[n]),this.emit(r.UV.UPDATE_ITEM,{uri:e,isInLibrary:t[n]})})):e.forEach((e=>{this._cache.set(e,t),this.emit(r.UV.UPDATE_ITEM,{uri:e,isInLibrary:t})}))}emitUpdatePin(e,t){this.emit(r.UV.UPDATE_PIN,{uri:e,isPinned:t})}emitUpdatePinErrorTooManyPins(e,t){this.emit(r.UV.UPDATE_PIN_ERROR,{reason:r.uL.TOO_MANY_PINS,uri:e,maximumPinnedItems:t})}emitOperationSync(e,t,n){return this.emitSync(r.UV.OPERATION,{operation:e,uris:t,silent:n}).defaultPrevented}emitOperationComplete(e,t,n=null,i){this.emit(r.UV.OPERATION_COMPLETE,{operation:e,uris:t,error:n,silent:i})}}},8629:(e,t,n)=>{"use strict";n.d(t,{c:()=>l,q:()=>s});var i=n(61451),r=n(13357);function s(e,t){void 0!==t&&(e.metadata=e.metadata??{},e.metadata[i.W.SORTING_CRITERIA]=function({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?a.TRACK_NAME_ASC:a.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?a.TRACK_ARTIST_NAME_ASC:a.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?a.TRACK_ALBUM_NAME_ASC:a.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?a.TRACK_ADDED_AT_ASC:a.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}(t),e.metadata[i.W.LIST_UTIL_SORT]=l(t))}var a=function(e){return e.TRACK_NAME_ASC="title ASC",e.TRACK_NAME_DESC="title DESC",e.TRACK_ARTIST_NAME_ASC="artist_name ASC, album_title, album_disc_number, album_track_number",e.TRACK_ARTIST_NAME_DESC="artist_name DESC, album_title, album_disc_number, album_track_number",e.TRACK_ALBUM_NAME_ASC="album_title ASC, album_disc_number, album_track_number",e.TRACK_ALBUM_NAME_DESC="album_title DESC, album_disc_number, album_track_number",e.TRACK_ADDED_AT_ASC="added_at ASC, album_title, album_artist_name, album_disc_number, album_track_number",e.TRACK_ADDED_AT_DESC="added_at DESC, album_title, album_artist_name, album_disc_number, album_track_number",e}(a||{});var o=function(e){return e.TRACK_NAME_ASC="name ASC",e.TRACK_NAME_DESC="name DESC",e.TRACK_ARTIST_NAME_ASC="artist.name ASC,album.name,discNumber,trackNumber",e.TRACK_ARTIST_NAME_DESC="artist.name DESC,album.name,discNumber,trackNumber",e.TRACK_ALBUM_NAME_ASC="album.name ASC,discNumber,trackNumber",e.TRACK_ALBUM_NAME_DESC="album.name DESC,discNumber,trackNumber",e.TRACK_ADDED_AT_ASC="addTime ASC,album.name,album.artist.name,discNumber,trackNumber",e.TRACK_ADDED_AT_DESC="addTime DESC,album.name,album.artist.name,discNumber,trackNumber",e}(o||{});function l({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?o.TRACK_NAME_ASC:o.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?o.TRACK_ARTIST_NAME_ASC:o.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?o.TRACK_ALBUM_NAME_ASC:o.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?o.TRACK_ADDED_AT_ASC:o.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}},41806:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var i=n(67291);const r={[i.Hh.TEXT]:"text",[i.Hh.TAGS]:"tags"},s={[i.tl.CONTAINS]:"contains"};function a(e){return e.map((e=>{const{field:t,operator:n,value:a}=e;if(t!==i.Hh.TEXT&&t!==i.Hh.TAGS||n!==i.tl.CONTAINS)throw new Error("Invalid filter params!");return`${r[t]} ${s[n]} ${encodeURIComponent(a)}`})).join(",")}},49725:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var i=n(91008),r=n(20817);function s(e,t){if(t){if(e===r.BP)return(0,i.fHB)(t).toURI();if(e===r.Xn)return(0,i.fHB)(t,"your-episodes").toURI()}return e===r.E3?"spotify:local-files":e}},93004:(e,t,n)=>{"use strict";n.d(t,{DK:()=>a,H3:()=>r,_J:()=>s,iU:()=>i});const i="37i9dQZF1FgnTBfUlzkeKt",r=`spotify:playlist:${i}`,s="37i9dQZF1F5p3rmiWPIYgZ",a=`spotify:playlist:${s}`},20784:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var i=n(20817),r=n(30157);function s(){return(0,r.N)(i.Ho)}},24533:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(30758),r=n(20784),s=n(81752),a=n(91008),o=n(26184),l=n(94572);function c(e,t){const n=(0,r.f)(),c=(0,s._)();(0,i.useEffect)((()=>function(e,t,n,i){const r=(0,a.o_h)(n)?.type;switch(r){case a.NQG.ALBUM:case a.NQG.ARTIST:case a.NQG.SHOW:case a.NQG.TRACK:case a.NQG.LOCAL_TRACK:case a.NQG.EPISODE:return e.getEvents().addListener(o.UV.UPDATE_ITEM,(e=>{e.data.uri===n&&i(e.data.isInLibrary)}),{uri:n});case a.NQG.PLAYLIST:case a.NQG.PLAYLIST_V2:return t.getEvents().addListener(l.tD.UPDATE_ITEM,(e=>{e.data.uri===n&&i(e.data.isInRootlist)}),{uri:n});default:return()=>{}}}(n,c,e,t)),[n,c,e,t])}function u(e,t=!1){const n=(0,r.f)(),o=(0,s._)(),l=(0,i.useCallback)((()=>function(e,t,n){const i=(0,a.o_h)(n)?.type;switch(i){case a.NQG.ALBUM:case a.NQG.ARTIST:case a.NQG.SHOW:case a.NQG.TRACK:case a.NQG.LOCAL_TRACK:case a.NQG.EPISODE:return e.containsSync(n);case a.NQG.PLAYLIST:case a.NQG.PLAYLIST_V2:return t.containsSync(n)}}(n,o,e)||t),[t,n,o,e]),[u,d]=(0,i.useState)(l);(0,i.useEffect)((()=>{d(l)}),[l]);const p=(0,i.useCallback)((async t=>{await async function(e,t,n,i){const r=(0,a.o_h)(n)?.type;switch(r){case a.NQG.ALBUM:case a.NQG.ARTIST:case a.NQG.SHOW:case a.NQG.EPISODE:case a.NQG.LOCAL_TRACK:case a.NQG.TRACK:i?e.add({uris:[n]}):e.remove({uris:[n]});break;case a.NQG.PLAYLIST:case a.NQG.PLAYLIST_V2:i?t.add([n],{before:"start"}):t.remove([{uri:n}])}}(n,o,e,t)}),[e,n,o]);return c(e,d),[u,p]}},39838:(e,t,n)=>{"use strict";n.d(t,{bV:()=>r,kW:()=>s,sl:()=>a});var i=n(36285);const r="spotify:internal:local-files";let s=function(e){return e.UNKNOWN="unknown",e.ITUNES="itunes",e.DOWNLOADS="downloads",e.MY_MUSIC="my_music",e.WINDOWS_MUSIC_LIBRARY="windows_music_library",e.UNRECOGNIZED="unrecognized",e}({});const a=(0,i.u)("LocalFilesAPI")},56837:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,T:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},58493:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(39838),r=n(30157);function s(){return(0,r.N)(i.sl)}},68507:(e,t,n)=>{"use strict";n.d(t,{o:()=>r});var i=n(58493);function r(){return(0,i.A)().getCapabilities()}},50993:(e,t,n)=>{"use strict";n.d(t,{m:()=>d,P:()=>p});var i=n(36285),r=n(35163),s=n(11462),a=n(33549);class o extends a.e{}var l=n(40184);class c extends a.e{static getSize(e){return`${(JSON.stringify(e).length/1024).toFixed(2)}KB`}constructor(){super(`Local storage quota exceeded. Total size used: ${c.getSize(localStorage)}`),Object.setPrototypeOf(this,c.prototype)}}var u=n(70896);const d=(0,i.u)("LocalStorageAPI");class p{items={};max_retries=3;auto_cleanup=!1;constructor(e,t){this.namespace=e,this._events=new s.G,this.max_retries=t?.max_retries??this.max_retries,this.auto_cleanup=t?.auto_cleanup??this.auto_cleanup,this.listenToStorageEvents()}createNamespacedKey(e){return`${this.namespace}:${e}`}parseLocalStorageValue(e,t){try{const n=JSON.parse(t);return this.items[e]=n,n}catch(n){return console.error(`Failed to parse value ${t} for key ${e}`),new u.Y(t)}}listenToStorageEvents(){window.addEventListener("storage",(e=>{const{key:t,newValue:n,oldValue:i}=e;if(null!==t&&null!==n&&t.startsWith(this.namespace)&&n!==i){const e=this.parseLocalStorageValue(t,n);this.items[t]=e,this._events.emit(s.r.UPDATE,{key:t.replace(`${this.namespace}:`,""),value:e})}}))}getEvents(){return this._events}getItem(e){const t=this.createNamespacedKey(e),n=this.items[t];if(t in this.items)return n;const i=window.localStorage.getItem(t);return null===i?new l.m(e):this.parseLocalStorageValue(t,i)}setItem(e,t){this.setItemInternal(e,t,this.max_retries)}setItemInternal(e,t,n){if(0===n)return void(0,r.UD)(new Error("LocalStorage retried too many times"));const i=this.createNamespacedKey(e),a=JSON.stringify(t),l=window.localStorage.getItem(i);if(l!==a){this.items[i]=t;try{window.localStorage.setItem(i,a)}catch(i){if(console.error("LocalStorage quota exceeded (no space left)"),(0,r.UD)(new c),this.auto_cleanup)return this.toggleItemsTypeAndCleanup(),this.setItemInternal(e,t,n-1)}try{this._events.emitSync(s.r.UPDATE,{key:e,value:t})}catch(t){const n=new o(`Failed to emit UPDATE event for key: ${e}`,{cause:t});console.error(n,`value: ${l}`),(0,r.UD)(n)}}}toggleItemsTypeAndCleanup(){Object.keys(localStorage).forEach((e=>{"true"!==localStorage[e]&&"false"!==localStorage[e]||localStorage.setItem(e,"true"===localStorage[e]?"1":"0"),e.startsWith(this.namespace)&&localStorage.removeItem(e)}))}clearItem(e){const t=this.createNamespacedKey(e);window.localStorage.removeItem(t),delete this.items[t]}}},11462:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,r:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e}({});class s extends i.V{}},40184:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});class i extends Error{constructor(e){super(`"${e}" not found in local storage.`),Object.setPrototypeOf(this,i.prototype)}}},70896:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});class i extends Error{constructor(e){super(`Failed to JSON.parse value "${e}"`),Object.setPrototypeOf(this,i.prototype)}}},62021:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var i=n(30758),r=n(88308),s=n(37842),a=n(11462);const o=(e,t)=>{const n=(0,s.q)(),o=(0,i.useRef)(n.getItem(e)),[l,c]=(0,i.useState)(o.current instanceof Error?t:o.current),u=(0,i.useCallback)((t=>{o.current=t,n.setItem(e,t)}),[e,n]);return(0,r.Ij)((()=>{o.current instanceof Error&&u(t)}),[t,u]),(0,i.useEffect)((()=>{const t=n.getEvents(),i=n.getItem(e);return i instanceof Error||c(i),t.addListener(a.r.UPDATE,(t=>{t.data.key===e&&(o.current=t.data.value,c(t.data.value))}))}),[e,n]),[l,u]}},16946:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(36285).u)("MetadataExtensions")},69662:(e,t,n)=>{"use strict";n.d(t,{UH:()=>F.U,iy:()=>K,up:()=>z,V$:()=>H});var i=n(26924),r=n(48427),s=n(1178),a=n(56258),o=n(98538),l=n(68995),c=n(69247),u=n(28983),d=n(13589),p=n(40537),m=n(57161),h=n(77614),f=n(27051),g=n(73647),E=n(90795),_=n(66556),y=n(69030),v=n(49182),b=n(79561),S=n(93155),A=n(82550),C=n(689),T=n(19002),I=n(65008),O=n(62899),w=n(22795),N=n.n(w);const R={encode:(e,t=N().Writer.create())=>(""!==e.shareUri&&t.uint32(10).string(e.shareUri),t),decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={shareUri:""};for(;n.pos>>3){case 1:if(10!==e)break;r.shareUri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>R.fromPartial(e??{}),fromPartial(e){const t={shareUri:""};return t.shareUri=e.shareUri??"",t}};const P={encode(e,t=N().Writer.create()){for(const n of e.shareOptions)L.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={shareOptions:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.shareOptions.push(L.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>P.fromPartial(e??{}),fromPartial(e){const t={shareOptions:[]};return t.shareOptions=e.shareOptions?.map((e=>L.fromPartial(e)))||[],t}};const L={encode:(e,t=N().Writer.create())=>(void 0!==e.shareUri&&t.uint32(10).string(e.shareUri),void 0!==e.extensionKind&&t.uint32(16).int32(e.extensionKind),t),decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={shareUri:void 0,extensionKind:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.shareUri=n.string();continue;case 2:if(16!==e)break;r.extensionKind=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>L.fromPartial(e??{}),fromPartial(e){const t={shareUri:void 0,extensionKind:void 0};return t.shareUri=e.shareUri??void 0,t.extensionKind=e.extensionKind??void 0,t}};const D={encode(e,t=N().Writer.create()){""!==e.type&&t.uint32(10).string(e.type),""!==e.name&&t.uint32(18).string(e.name),void 0!==e.description&&t.uint32(26).string(e.description),void 0!==e.contentHierarchyParent&&x.encode(e.contentHierarchyParent,t.uint32(34).fork()).ldelim();for(const n of e.contributors)k.encode(n,t.uint32(42).fork()).ldelim();return t},decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:"",name:"",description:void 0,contentHierarchyParent:void 0,contributors:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.type=n.string();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 3:if(26!==e)break;r.description=n.string();continue;case 4:if(34!==e)break;r.contentHierarchyParent=x.decode(n,n.uint32());continue;case 5:if(42!==e)break;r.contributors.push(k.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({type:U(e.type)?globalThis.String(e.type):"",name:U(e.name)?globalThis.String(e.name):"",description:U(e.description)?globalThis.String(e.description):void 0,contentHierarchyParent:U(e.contentHierarchyParent)?x.fromJSON(e.contentHierarchyParent):void 0,contributors:globalThis.Array.isArray(e?.contributors)?e.contributors.map((e=>k.fromJSON(e))):[]}),toJSON(e){const t={};return""!==e.type&&(t.type=e.type),""!==e.name&&(t.name=e.name),void 0!==e.description&&(t.description=e.description),void 0!==e.contentHierarchyParent&&(t.contentHierarchyParent=x.toJSON(e.contentHierarchyParent)),e.contributors?.length&&(t.contributors=e.contributors.map((e=>k.toJSON(e)))),t},create:e=>D.fromPartial(e??{}),fromPartial(e){const t={type:"",name:"",description:void 0,contentHierarchyParent:void 0,contributors:[]};return t.type=e.type??"",t.name=e.name??"",t.description=e.description??void 0,t.contentHierarchyParent=void 0!==e.contentHierarchyParent&&null!==e.contentHierarchyParent?x.fromPartial(e.contentHierarchyParent):void 0,t.contributors=e.contributors?.map((e=>k.fromPartial(e)))||[],t}};const k={encode:(e,t=N().Writer.create())=>(""!==e.name&&t.uint32(10).string(e.name),void 0!==e.uri&&t.uint32(18).string(e.uri),t),decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:"",uri:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.name=n.string();continue;case 2:if(18!==e)break;r.uri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:U(e.name)?globalThis.String(e.name):"",uri:U(e.uri)?globalThis.String(e.uri):void 0}),toJSON(e){const t={};return""!==e.name&&(t.name=e.name),void 0!==e.uri&&(t.uri=e.uri),t},create:e=>k.fromPartial(e??{}),fromPartial(e){const t={name:"",uri:void 0};return t.name=e.name??"",t.uri=e.uri??void 0,t}};const x={encode:(e,t=N().Writer.create())=>(""!==e.name&&t.uint32(10).string(e.name),""!==e.uri&&t.uint32(18).string(e.uri),t),decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:"",uri:""};for(;n.pos>>3){case 1:if(10!==e)break;r.name=n.string();continue;case 2:if(18!==e)break;r.uri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:U(e.name)?globalThis.String(e.name):"",uri:U(e.uri)?globalThis.String(e.uri):""}),toJSON(e){const t={};return""!==e.name&&(t.name=e.name),""!==e.uri&&(t.uri=e.uri),t},create:e=>x.fromPartial(e??{}),fromPartial(e){const t={name:"",uri:""};return t.name=e.name??"",t.uri=e.uri??"",t}};function U(e){return null!=e}var M=n(77081);const B={encode(e,t=N().Writer.create()){for(const n of e.availableReleases)j.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={availableReleases:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.availableReleases.push(j.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({availableReleases:globalThis.Array.isArray(e?.availableReleases)?e.availableReleases.map((e=>j.fromJSON(e))):[]}),toJSON(e){const t={};return e.availableReleases?.length&&(t.availableReleases=e.availableReleases.map((e=>j.toJSON(e)))),t},create:e=>B.fromPartial(e??{}),fromPartial(e){const t={availableReleases:[]};return t.availableReleases=e.availableReleases?.map((e=>j.fromPartial(e)))||[],t}};const j={encode:(e,t=N().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),t),decode(e,t){const n=e instanceof N().Reader?e:N().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:""};for(;n.pos>>3){case 1:if(10!==e)break;r.uri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON(e){return{uri:(t=e.uri,null!=t?globalThis.String(e.uri):"")};var t},toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),t},create:e=>j.fromPartial(e??{}),fromPartial(e){const t={uri:""};return t.uri=e.uri??"",t}};var F=n(15198),V=n(96566);const G={[F.U.AUDIOBOOK_GENRE]:i.IH.decode,[F.U.AUDIOBOOK_RELATIONS]:r.kL.decode,[F.U.AUTO_LENS]:s.K.decode,[F.U.CONCEPT]:a.ji.decode,[F.U.CONTENT_WARNING]:o.r.decode,[F.U.COVER_IMAGE]:l.DN.decode,[F.U.GATED_ENTITY_RELATIONS]:c.gy.decode,[F.U.LIST_TUNER_AUDIO_ANALYSIS]:u.$.decode,[F.U.LIST_TUNER_CUEPOINTS]:d.jf.decode,[F.U.AUDIOBOOK_SPECIFICS]:p.N0.decode,[F.U.SHOW_V4]:m.wv.decode,[F.U.PLAYABILITY]:h.NX.decode,[F.U.PLAYLIST_TUNER]:f.gu.decode,[F.U.PODCAST_TOPICS]:g.BV.decode,[F.U.PODCAST_SEGMENTS]:E.HP.decode,[F.U.PODCAST_SUBSCRIPTIONS]:_.UE.decode,[F.U.EPISODE_TRANSCRIPTS]:y.YT.decode,[F.U.PRERELEASE]:v.r6.decode,[F.U.PODCAST_RATING]:b.a9.decode,[F.U.ROOTLISTABILITY_TRAIT]:S.n.decode,[F.U.SHOW_ACCESS]:A.Cb.decode,[F.U.SMART_SHUFFLE]:C.J.decode,[F.U.TRACK_V4]:T.CC.decode,[F.U.VIDEO_ASSOCIATIONS]:I.KY.decode,[F.U.SHARE_TRAIT]:P.decode,[F.U.INSTANCE_SHARING]:R.decode,[F.U.SNAPSHOT_SHARING]:R.decode,[F.U.COURSE_SPECIFICS]:O.vj.decode,[F.U.IDENTITY_TRAIT]:D.decode,[F.U.VISUAL_IDENTITY_TRAIT]:M.L.decode,[F.U.AVAILABLE_RELEASES]:B.decode};function H(e){return e in G}const W=(0,V.g)(F.U);function z(e,t){return W(e)&&t.includes(e)}function K(e,t){return H(e)?G[e](t):null}},26924:(e,t,n)=>{"use strict";n.d(t,{IH:()=>a});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.contextualName&&t.uint32(18).string(e.contextualName),0!==e.depth&&t.uint32(24).int32(e.depth),""!==e.parentId&&t.uint32(34).string(e.parentId),""!==e.destinationUri&&t.uint32(42).string(e.destinationUri),""!==e.shortName&&t.uint32(50).string(e.shortName),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={id:"",contextualName:"",depth:0,parentId:"",destinationUri:"",shortName:""};for(;n.pos>>3){case 1:if(10!==e)break;s.id=n.string();continue;case 2:if(18!==e)break;s.contextualName=n.string();continue;case 3:if(24!==e)break;s.depth=n.int32();continue;case 4:if(34!==e)break;s.parentId=n.string();continue;case 5:if(42!==e)break;s.destinationUri=n.string();continue;case 6:if(50!==e)break;s.shortName=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={id:"",contextualName:"",depth:0,parentId:"",destinationUri:"",shortName:""};return t.id=e.id??"",t.contextualName=e.contextualName??"",t.depth=e.depth??0,t.parentId=e.parentId??"",t.destinationUri=e.destinationUri??"",t.shortName=e.shortName??"",t}};const a={encode(e,t=r().Writer.create()){for(const n of e.genres)s.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={genres:[]};for(;n.pos>>3){case 1:if(10!==e)break;a.genres.push(s.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={genres:[]};return t.genres=e.genres?.map((e=>s.fromPartial(e)))||[],t}}},48427:(e,t,n)=>{"use strict";n.d(t,{kL:()=>s});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(""!==e.sameBookUri&&t.uint32(10).string(e.sameBookUri),0!==e.action&&t.uint32(16).int32(e.action),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={sameBookUri:"",action:0};for(;n.pos>>3){case 1:if(10!==e)break;s.sameBookUri=n.string();continue;case 2:if(16!==e)break;s.action=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={sameBookUri:"",action:0};return t.sameBookUri=e.sameBookUri??"",t.action=e.action??0,t}}},1178:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){for(const n of e.lensesToApply)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={lensesToApply:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.lensesToApply.push(n.string());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={lensesToApply:[]};return t.lensesToApply=e.lensesToApply?.map((e=>e))||[],t}}},56258:(e,t,n)=>{"use strict";n.d(t,{ji:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){""!==e.translatedLibraryName&&t.uint32(10).string(e.translatedLibraryName),""!==e.imageUri&&t.uint32(26).string(e.imageUri);for(const n of e.conceptClass)o.encode(n,t.uint32(34).fork()).ldelim();return void 0!==e.libraryClass&&o.encode(e.libraryClass,t.uint32(42).fork()).ldelim(),Object.entries(e.translationMap).forEach((([e,n])=>{a.encode({key:e,value:n},t.uint32(50).fork()).ldelim()})),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={translatedLibraryName:"",imageUri:"",conceptClass:[],libraryClass:void 0,translationMap:{}};for(;n.pos>>3){case 1:if(10!==e)break;s.translatedLibraryName=n.string();continue;case 3:if(26!==e)break;s.imageUri=n.string();continue;case 4:if(34!==e)break;s.conceptClass.push(o.decode(n,n.uint32()));continue;case 5:if(42!==e)break;s.libraryClass=o.decode(n,n.uint32());continue;case 6:if(50!==e)break;const t=a.decode(n,n.uint32());void 0!==t.value&&(s.translationMap[t.key]=t.value);continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON(e){return{translatedLibraryName:l(e.translatedLibraryName)?globalThis.String(e.translatedLibraryName):"",imageUri:l(e.imageUri)?globalThis.String(e.imageUri):"",conceptClass:globalThis.Array.isArray(e?.conceptClass)?e.conceptClass.map((e=>o.fromJSON(e))):[],libraryClass:l(e.libraryClass)?o.fromJSON(e.libraryClass):void 0,translationMap:(t=e.translationMap,"object"==typeof t&&null!==t?Object.entries(e.translationMap).reduce(((e,[t,n])=>(e[t]=String(n),e)),{}):{})};var t},toJSON(e){const t={};if(""!==e.translatedLibraryName&&(t.translatedLibraryName=e.translatedLibraryName),""!==e.imageUri&&(t.imageUri=e.imageUri),e.conceptClass?.length&&(t.conceptClass=e.conceptClass.map((e=>o.toJSON(e)))),void 0!==e.libraryClass&&(t.libraryClass=o.toJSON(e.libraryClass)),e.translationMap){const n=Object.entries(e.translationMap);n.length>0&&(t.translationMap={},n.forEach((([e,n])=>{t.translationMap[e]=n})))}return t},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={translatedLibraryName:"",imageUri:"",conceptClass:[],libraryClass:void 0,translationMap:{}};return t.translatedLibraryName=e.translatedLibraryName??"",t.imageUri=e.imageUri??"",t.conceptClass=e.conceptClass?.map((e=>o.fromPartial(e)))||[],t.libraryClass=void 0!==e.libraryClass&&null!==e.libraryClass?o.fromPartial(e.libraryClass):void 0,t.translationMap=Object.entries(e.translationMap??{}).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=globalThis.String(n)),e)),{}),t}};const a={encode:(e,t=r().Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={key:"",value:""};for(;n.pos>>3){case 1:if(10!==e)break;s.key=n.string();continue;case 2:if(18!==e)break;s.value=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({key:l(e.key)?globalThis.String(e.key):"",value:l(e.value)?globalThis.String(e.value):""}),toJSON(e){const t={};return""!==e.key&&(t.key=e.key),""!==e.value&&(t.value=e.value),t},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={key:"",value:""};return t.key=e.key??"",t.value=e.value??"",t}};const o={encode:(e,t=r().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.translatedName&&t.uint32(18).string(e.translatedName),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:"",translatedName:""};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.translatedName=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({uri:l(e.uri)?globalThis.String(e.uri):"",translatedName:l(e.translatedName)?globalThis.String(e.translatedName):""}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),""!==e.translatedName&&(t.translatedName=e.translatedName),t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={uri:"",translatedName:""};return t.uri=e.uri??"",t.translatedName=e.translatedName??"",t}};function l(e){return null!=e}},98538:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});var i=n(21364),r=n(22795),s=n.n(r);const a={encode:(e,t=s().Writer.create())=>(""!==e.cardHeaderText&&t.uint32(10).string(e.cardHeaderText),""!==e.cardBodyText&&t.uint32(18).string(e.cardBodyText),""!==e.buttonText&&t.uint32(26).string(e.buttonText),""!==e.buttonTarget&&t.uint32(34).string(e.buttonTarget),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};for(;n.pos>>3){case 1:r.cardHeaderText=n.string();break;case 2:r.cardBodyText=n.string();break;case 3:r.buttonText=n.string();break;case 4:r.buttonTarget=n.string();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({cardHeaderText:o(e.cardHeaderText)?String(e.cardHeaderText):"",cardBodyText:o(e.cardBodyText)?String(e.cardBodyText):"",buttonText:o(e.buttonText)?String(e.buttonText):"",buttonTarget:o(e.buttonTarget)?String(e.buttonTarget):""}),toJSON(e){const t={};return void 0!==e.cardHeaderText&&(t.cardHeaderText=e.cardHeaderText),void 0!==e.cardBodyText&&(t.cardBodyText=e.cardBodyText),void 0!==e.buttonText&&(t.buttonText=e.buttonText),void 0!==e.buttonTarget&&(t.buttonTarget=e.buttonTarget),t},fromPartial(e){const t={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};return t.cardHeaderText=e.cardHeaderText??"",t.cardBodyText=e.cardBodyText??"",t.buttonText=e.buttonText??"",t.buttonTarget=e.buttonTarget??"",t}};function o(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},62899:(e,t,n)=>{"use strict";n.d(t,{vj:()=>o});var i=n(22795),r=n.n(i);let s=function(e){return e[e.COURSE_CATEGORY_UNSPECIFIED=0]="COURSE_CATEGORY_UNSPECIFIED",e[e.COURSE_CATEGORY_MUSIC_AND_AUDIO=1]="COURSE_CATEGORY_MUSIC_AND_AUDIO",e[e.COURSE_CATEGORY_TECHNOLOGY=2]="COURSE_CATEGORY_TECHNOLOGY",e[e.COURSE_CATEGORY_HEALTH_AND_FITNESS=3]="COURSE_CATEGORY_HEALTH_AND_FITNESS",e[e.COURSE_CATEGORY_ART_AND_DESIGN=4]="COURSE_CATEGORY_ART_AND_DESIGN",e[e.COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY=5]="COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY",e[e.COURSE_CATEGORY_LANGUAGE=6]="COURSE_CATEGORY_LANGUAGE",e[e.COURSE_CATEGORY_BUSINESS_AND_MARKETING=7]="COURSE_CATEGORY_BUSINESS_AND_MARKETING",e[e.COURSE_CATEGORY_PERSONAL_DEVELOPMENT=8]="COURSE_CATEGORY_PERSONAL_DEVELOPMENT",e[e.COURSE_CATEGORY_FINANCE=9]="COURSE_CATEGORY_FINANCE",e[e.COURSE_CATEGORY_OTHER=10]="COURSE_CATEGORY_OTHER",e[e.COURSE_CATEGORY_LIFESTYLE=11]="COURSE_CATEGORY_LIFESTYLE",e[e.COURSE_CATEGORY_COOKING=12]="COURSE_CATEGORY_COOKING",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function a(e){switch(e){case 0:case"COURSE_CATEGORY_UNSPECIFIED":return s.COURSE_CATEGORY_UNSPECIFIED;case 1:case"COURSE_CATEGORY_MUSIC_AND_AUDIO":return s.COURSE_CATEGORY_MUSIC_AND_AUDIO;case 2:case"COURSE_CATEGORY_TECHNOLOGY":return s.COURSE_CATEGORY_TECHNOLOGY;case 3:case"COURSE_CATEGORY_HEALTH_AND_FITNESS":return s.COURSE_CATEGORY_HEALTH_AND_FITNESS;case 4:case"COURSE_CATEGORY_ART_AND_DESIGN":return s.COURSE_CATEGORY_ART_AND_DESIGN;case 5:case"COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY":return s.COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY;case 6:case"COURSE_CATEGORY_LANGUAGE":return s.COURSE_CATEGORY_LANGUAGE;case 7:case"COURSE_CATEGORY_BUSINESS_AND_MARKETING":return s.COURSE_CATEGORY_BUSINESS_AND_MARKETING;case 8:case"COURSE_CATEGORY_PERSONAL_DEVELOPMENT":return s.COURSE_CATEGORY_PERSONAL_DEVELOPMENT;case 9:case"COURSE_CATEGORY_FINANCE":return s.COURSE_CATEGORY_FINANCE;case 10:case"COURSE_CATEGORY_OTHER":return s.COURSE_CATEGORY_OTHER;case 11:case"COURSE_CATEGORY_LIFESTYLE":return s.COURSE_CATEGORY_LIFESTYLE;case 12:case"COURSE_CATEGORY_COOKING":return s.COURSE_CATEGORY_COOKING;default:return s.UNRECOGNIZED}}const o={encode:(e,t=r().Writer.create())=>(0!==e.primaryCategory&&t.uint32(8).int32(e.primaryCategory),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={primaryCategory:0};for(;n.pos>>3){case 1:if(8!==e)break;s.primaryCategory=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({primaryCategory:l(e.primaryCategory)?a(e.primaryCategory):0}),toJSON(e){const t={};return 0!==e.primaryCategory&&(t.primaryCategory=function(e){switch(e){case s.COURSE_CATEGORY_UNSPECIFIED:return"COURSE_CATEGORY_UNSPECIFIED";case s.COURSE_CATEGORY_MUSIC_AND_AUDIO:return"COURSE_CATEGORY_MUSIC_AND_AUDIO";case s.COURSE_CATEGORY_TECHNOLOGY:return"COURSE_CATEGORY_TECHNOLOGY";case s.COURSE_CATEGORY_HEALTH_AND_FITNESS:return"COURSE_CATEGORY_HEALTH_AND_FITNESS";case s.COURSE_CATEGORY_ART_AND_DESIGN:return"COURSE_CATEGORY_ART_AND_DESIGN";case s.COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY:return"COURSE_CATEGORY_PHOTO_AND_VIDEOGRAPHY";case s.COURSE_CATEGORY_LANGUAGE:return"COURSE_CATEGORY_LANGUAGE";case s.COURSE_CATEGORY_BUSINESS_AND_MARKETING:return"COURSE_CATEGORY_BUSINESS_AND_MARKETING";case s.COURSE_CATEGORY_PERSONAL_DEVELOPMENT:return"COURSE_CATEGORY_PERSONAL_DEVELOPMENT";case s.COURSE_CATEGORY_FINANCE:return"COURSE_CATEGORY_FINANCE";case s.COURSE_CATEGORY_OTHER:return"COURSE_CATEGORY_OTHER";case s.COURSE_CATEGORY_LIFESTYLE:return"COURSE_CATEGORY_LIFESTYLE";case s.COURSE_CATEGORY_COOKING:return"COURSE_CATEGORY_COOKING";case s.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.primaryCategory)),t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={primaryCategory:0};return t.primaryCategory=e.primaryCategory??0,t}};function l(e){return null!=e}},68995:(e,t,n)=>{"use strict";n.d(t,{DN:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){for(const n of e.coverImages)o.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={coverImages:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.coverImages.push(o.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={coverImages:[]};return t.coverImages=e.coverImages?.map((e=>o.fromPartial(e)))||[],t}};function a(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const o={encode:(e,t=r().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.size&&t.uint32(16).int32(e.size),0!==e.width&&t.uint32(24).int32(e.width),0!==e.height&&t.uint32(32).int32(e.height),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s=a();for(;n.pos>>3){case 1:if(10!==e)break;s.fileId=n.bytes();continue;case 2:if(16!==e)break;s.size=n.int32();continue;case 3:if(24!==e)break;s.width=n.int32();continue;case 4:if(32!==e)break;s.height=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>o.fromPartial(e??{}),fromPartial(e){const t=a();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}}},69247:(e,t,n)=>{"use strict";n.d(t,{gy:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){for(const n of e.entitiesWithValueProps)a.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={entitiesWithValueProps:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.entitiesWithValueProps.push(a.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={entitiesWithValueProps:[]};return t.entitiesWithValueProps=e.entitiesWithValueProps?.map((e=>a.fromPartial(e)))||[],t}};const a={encode(e,t=r().Writer.create()){""!==e.uri&&t.uint32(10).string(e.uri);for(const n of e.valueProps)l.encode(n,t.uint32(18).fork()).ldelim();return void 0!==e.summary&&o.encode(e.summary,t.uint32(26).fork()).ldelim(),void 0!==e.fallbackNavigation&&c.encode(e.fallbackNavigation,t.uint32(34).fork()).ldelim(),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:"",valueProps:[],summary:void 0,fallbackNavigation:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.valueProps.push(l.decode(n,n.uint32()));continue;case 3:if(26!==e)break;s.summary=o.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.fallbackNavigation=c.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={uri:"",valueProps:[],summary:void 0,fallbackNavigation:void 0};return t.uri=e.uri??"",t.valueProps=e.valueProps?.map((e=>l.fromPartial(e)))||[],t.summary=void 0!==e.summary&&null!==e.summary?o.fromPartial(e.summary):void 0,t.fallbackNavigation=void 0!==e.fallbackNavigation&&null!==e.fallbackNavigation?c.fromPartial(e.fallbackNavigation):void 0,t}};const o={encode:(e,t=r().Writer.create())=>(""!==e.forUserWithoutAccess&&t.uint32(10).string(e.forUserWithoutAccess),void 0!==e.forUserWithAccess&&t.uint32(18).string(e.forUserWithAccess),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={forUserWithoutAccess:"",forUserWithAccess:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.forUserWithoutAccess=n.string();continue;case 2:if(18!==e)break;s.forUserWithAccess=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={forUserWithoutAccess:"",forUserWithAccess:void 0};return t.forUserWithoutAccess=e.forUserWithoutAccess??"",t.forUserWithAccess=e.forUserWithAccess??void 0,t}};const l={encode:(e,t=r().Writer.create())=>(""!==e.displayText&&t.uint32(10).string(e.displayText),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={displayText:""};for(;n.pos>>3){case 1:if(10!==e)break;s.displayText=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={displayText:""};return t.displayText=e.displayText??"",t}};const c={encode:(e,t=r().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.description&&t.uint32(18).string(e.description),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:"",description:""};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.description=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={uri:"",description:""};return t.uri=e.uri??"",t.description=e.description??"",t}}},22450:(e,t,n)=>{"use strict";n.d(t,{D:()=>a});var i=n(21364),r=n(22795),s=n.n(r);const a={encode:(e,t=s().Writer.create())=>("0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={seconds:"0",nanos:0};for(;n.pos>>3){case 1:if(8!==e)break;r.seconds=n.int64().toString();continue;case 2:if(16!==e)break;r.nanos=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({seconds:o(e.seconds)?globalThis.String(e.seconds):"0",nanos:o(e.nanos)?globalThis.Number(e.nanos):0}),toJSON(e){const t={};return"0"!==e.seconds&&(t.seconds=e.seconds),0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function o(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},28983:(e,t,n)=>{"use strict";n.d(t,{$:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){0!==e.startMs&&t.uint32(8).int32(e.startMs),0!==e.periodMs&&t.uint32(16).int32(e.periodMs),t.uint32(26).fork();for(const n of e.loudness)t.int32(n);return t.ldelim(),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={startMs:0,periodMs:0,loudness:[]};for(;n.pos>>3){case 1:if(8!==e)break;s.startMs=n.int32();continue;case 2:if(16!==e)break;s.periodMs=n.int32();continue;case 3:if(24===e){s.loudness.push(n.int32());continue}if(26===e){const e=n.uint32()+n.pos;for(;n.poss.fromPartial(e??{}),fromPartial(e){const t={startMs:0,periodMs:0,loudness:[]};return t.startMs=e.startMs??0,t.periodMs=e.periodMs??0,t.loudness=e.loudness?.map((e=>e))||[],t}}},13589:(e,t,n)=>{"use strict";n.d(t,{jf:()=>s});var i=n(22795),r=n.n(i);const s={encode(e,t=r().Writer.create()){for(const n of e.cuepoints)a.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={cuepoints:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.cuepoints.push(a.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={cuepoints:[]};return t.cuepoints=e.cuepoints?.map((e=>a.fromPartial(e)))||[],t}};const a={encode:(e,t=r().Writer.create())=>(0!==e.positionMs&&t.uint32(8).int32(e.positionMs),0!==e.bpm&&t.uint32(16).int32(e.bpm),0!==e.type&&t.uint32(24).int32(e.type),!1!==e.best&&t.uint32(32).bool(e.best),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={positionMs:0,bpm:0,type:0,best:!1};for(;n.pos>>3){case 1:if(8!==e)break;s.positionMs=n.int32();continue;case 2:if(16!==e)break;s.bpm=n.int32();continue;case 3:if(24!==e)break;s.type=n.int32();continue;case 4:if(32!==e)break;s.best=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={positionMs:0,bpm:0,type:0,best:!1};return t.positionMs=e.positionMs??0,t.bpm=e.bpm??0,t.type=e.type??0,t.best=e.best??!1,t}}},40537:(e,t,n)=>{"use strict";n.d(t,{N0:()=>o});var i=n(21364),r=n(22795),s=n.n(r),a=n(22450);const o={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.credits&&l.encode(e.credits,t.uint32(18).fork()).ldelim(),""!==e.edition&&t.uint32(26).string(e.edition),"0"!==e.duration_ms&&t.uint32(32).int64(e.duration_ms),void 0!==e.publish_date&&a.D.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}(e.publish_date),t.uint32(42).fork()).ldelim(),""!==e.main_title&&t.uint32(50).string(e.main_title),""!==e.subtitle&&t.uint32(58).string(e.subtitle),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0,main_title:"",subtitle:""};for(;n.pos>>3){case 1:if(10!==e)break;r.uri=n.string();continue;case 2:if(18!==e)break;r.credits=l.decode(n,n.uint32());continue;case 3:if(26!==e)break;r.edition=n.string();continue;case 4:if(32!==e)break;r.duration_ms=n.int64().toString();continue;case 5:if(42!==e)break;r.publish_date=p(a.D.decode(n,n.uint32()));continue;case 6:if(50!==e)break;r.main_title=n.string();continue;case 7:if(58!==e)break;r.subtitle=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uri:h(e.uri)?String(e.uri):"",credits:h(e.credits)?l.fromJSON(e.credits):void 0,edition:h(e.edition)?String(e.edition):"",duration_ms:h(e.duration_ms)?String(e.duration_ms):"0",publish_date:h(e.publish_date)?m(e.publish_date):void 0,main_title:h(e.main_title)?String(e.main_title):"",subtitle:h(e.subtitle)?String(e.subtitle):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.credits&&(t.credits=e.credits?l.toJSON(e.credits):void 0),void 0!==e.edition&&(t.edition=e.edition),void 0!==e.duration_ms&&(t.duration_ms=e.duration_ms),void 0!==e.publish_date&&(t.publish_date=e.publish_date.toISOString()),void 0!==e.main_title&&(t.main_title=e.main_title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0,main_title:"",subtitle:""};return t.uri=e.uri??"",t.credits=void 0!==e.credits&&null!==e.credits?l.fromPartial(e.credits):void 0,t.edition=e.edition??"",t.duration_ms=e.duration_ms??"0",t.publish_date=e.publish_date??void 0,t.main_title=e.main_title??"",t.subtitle=e.subtitle??"",t}};const l={encode(e,t=s().Writer.create()){for(const n of e.publishers)c.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.authors)u.encode(n,t.uint32(26).fork()).ldelim();for(const n of e.narrators)d.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={publishers:[],authors:[],narrators:[]};for(;n.pos>>3){case 2:if(18!==e)break;r.publishers.push(c.decode(n,n.uint32()));continue;case 3:if(26!==e)break;r.authors.push(u.decode(n,n.uint32()));continue;case 4:if(34!==e)break;r.narrators.push(d.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({publishers:Array.isArray(e?.publishers)?e.publishers.map((e=>c.fromJSON(e))):[],authors:Array.isArray(e?.authors)?e.authors.map((e=>u.fromJSON(e))):[],narrators:Array.isArray(e?.narrators)?e.narrators.map((e=>d.fromJSON(e))):[]}),toJSON(e){const t={};return e.publishers?t.publishers=e.publishers.map((e=>e?c.toJSON(e):void 0)):t.publishers=[],e.authors?t.authors=e.authors.map((e=>e?u.toJSON(e):void 0)):t.authors=[],e.narrators?t.narrators=e.narrators.map((e=>e?d.toJSON(e):void 0)):t.narrators=[],t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={publishers:[],authors:[],narrators:[]};return t.publishers=e.publishers?.map((e=>c.fromPartial(e)))||[],t.authors=e.authors?.map((e=>u.fromPartial(e)))||[],t.narrators=e.narrators?.map((e=>d.fromPartial(e)))||[],t}};const c={encode:(e,t=s().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:h(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const u={encode:(e,t=s().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:h(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const d={encode:(e,t=s().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos>>3){case 2:if(18!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({name:h(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};function p(e){let t=1e3*(Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new Date(t)}function m(e){return e instanceof Date?e:"string"==typeof e?new Date(e):p(a.D.fromJSON(e))}function h(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},57161:(e,t,n)=>{"use strict";n.d(t,{wv:()=>l});var i=n(21364),r=n(22795),s=n.n(r);const a={encode:(e,t=s().Writer.create())=>(""!==e.language&&t.uint32(10).string(e.language),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={language:"",value:""};for(;n.pos>>3){case 1:if(10!==e)break;r.language=n.string();continue;case 2:if(18!==e)break;r.value=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={language:"",value:""};return t.language=e.language??"",t.value=e.value??"",t}};function o(){return{gid:new Uint8Array,name:"",localizedName:[],description:"",deprecatedPopularity:0,publisher:"",language:"",explicit:!1,coverImage:void 0,episode:[],copyright:[],restriction:[],keyword:[],mediaType:0,consumptionOrder:1,interpretRestrictionUsingGeoip:!1,salePeriod:[],availability:[],countryOfOrigin:"",categories:[],passthrough:0,employeeOnly:!1,trailerUri:"",isAudiobook:!1,isCreatorChannel:!1}}const l={encode(e,t=s().Writer.create()){0!==e.gid.length&&t.uint32(10).bytes(e.gid),""!==e.name&&t.uint32(18).string(e.name);for(const n of e.localizedName)a.encode(n,t.uint32(234).fork()).ldelim();""!==e.description&&t.uint32(514).string(e.description),0!==e.deprecatedPopularity&&t.uint32(520).sint32(e.deprecatedPopularity),""!==e.publisher&&t.uint32(530).string(e.publisher),""!==e.language&&t.uint32(538).string(e.language),!0===e.explicit&&t.uint32(544).bool(e.explicit),void 0!==e.coverImage&&g.encode(e.coverImage,t.uint32(554).fork()).ldelim();for(const n of e.episode)u.encode(n,t.uint32(562).fork()).ldelim();for(const n of e.copyright)E.encode(n,t.uint32(570).fork()).ldelim();for(const n of e.restriction)_.encode(n,t.uint32(578).fork()).ldelim();for(const n of e.keyword)t.uint32(586).string(n);0!==e.mediaType&&t.uint32(592).int32(e.mediaType),1!==e.consumptionOrder&&t.uint32(600).int32(e.consumptionOrder),!0===e.interpretRestrictionUsingGeoip&&t.uint32(608).bool(e.interpretRestrictionUsingGeoip);for(const n of e.salePeriod)S.encode(n,t.uint32(618).fork()).ldelim();for(const n of e.availability)y.encode(n,t.uint32(626).fork()).ldelim();""!==e.countryOfOrigin&&t.uint32(634).string(e.countryOfOrigin);for(const n of e.categories)v.encode(n,t.uint32(642).fork()).ldelim();return 0!==e.passthrough&&t.uint32(648).int32(e.passthrough),!0===e.employeeOnly&&t.uint32(656).bool(e.employeeOnly),""!==e.trailerUri&&t.uint32(666).string(e.trailerUri),!0===e.isAudiobook&&t.uint32(712).bool(e.isAudiobook),!0===e.isCreatorChannel&&t.uint32(720).bool(e.isCreatorChannel),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=o();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 29:if(234!==e)break;r.localizedName.push(a.decode(n,n.uint32()));continue;case 64:if(514!==e)break;r.description=n.string();continue;case 65:if(520!==e)break;r.deprecatedPopularity=n.sint32();continue;case 66:if(530!==e)break;r.publisher=n.string();continue;case 67:if(538!==e)break;r.language=n.string();continue;case 68:if(544!==e)break;r.explicit=n.bool();continue;case 69:if(554!==e)break;r.coverImage=g.decode(n,n.uint32());continue;case 70:if(562!==e)break;r.episode.push(u.decode(n,n.uint32()));continue;case 71:if(570!==e)break;r.copyright.push(E.decode(n,n.uint32()));continue;case 72:if(578!==e)break;r.restriction.push(_.decode(n,n.uint32()));continue;case 73:if(586!==e)break;r.keyword.push(n.string());continue;case 74:if(592!==e)break;r.mediaType=n.int32();continue;case 75:if(600!==e)break;r.consumptionOrder=n.int32();continue;case 76:if(608!==e)break;r.interpretRestrictionUsingGeoip=n.bool();continue;case 77:if(618!==e)break;r.salePeriod.push(S.decode(n,n.uint32()));continue;case 78:if(626!==e)break;r.availability.push(y.decode(n,n.uint32()));continue;case 79:if(634!==e)break;r.countryOfOrigin=n.string();continue;case 80:if(642!==e)break;r.categories.push(v.decode(n,n.uint32()));continue;case 81:if(648!==e)break;r.passthrough=n.int32();continue;case 82:if(656!==e)break;r.employeeOnly=n.bool();continue;case 83:if(666!==e)break;r.trailerUri=n.string();continue;case 89:if(712!==e)break;r.isAudiobook=n.bool();continue;case 90:if(720!==e)break;r.isCreatorChannel=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>l.fromPartial(e??{}),fromPartial(e){const t=o();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.localizedName=e.localizedName?.map((e=>a.fromPartial(e)))||[],t.description=e.description??"",t.deprecatedPopularity=e.deprecatedPopularity??0,t.publisher=e.publisher??"",t.language=e.language??"",t.explicit=e.explicit??!1,t.coverImage=void 0!==e.coverImage&&null!==e.coverImage?g.fromPartial(e.coverImage):void 0,t.episode=e.episode?.map((e=>u.fromPartial(e)))||[],t.copyright=e.copyright?.map((e=>E.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>_.fromPartial(e)))||[],t.keyword=e.keyword?.map((e=>e))||[],t.mediaType=e.mediaType??0,t.consumptionOrder=e.consumptionOrder??1,t.interpretRestrictionUsingGeoip=e.interpretRestrictionUsingGeoip??!1,t.salePeriod=e.salePeriod?.map((e=>S.fromPartial(e)))||[],t.availability=e.availability?.map((e=>y.fromPartial(e)))||[],t.countryOfOrigin=e.countryOfOrigin??"",t.categories=e.categories?.map((e=>v.fromPartial(e)))||[],t.passthrough=e.passthrough??0,t.employeeOnly=e.employeeOnly??!1,t.trailerUri=e.trailerUri??"",t.isAudiobook=e.isAudiobook??!1,t.isCreatorChannel=e.isCreatorChannel??!1,t}};function c(){return{gid:new Uint8Array,name:"",duration:0,audio:[],localizedName:[],description:"",number:0,publishTime:void 0,deprecatedPopularity:0,coverImage:void 0,language:"",explicit:!1,show:void 0,video:[],videoPreview:[],audioPreview:[],restriction:[],freezeFrame:void 0,keyword:[],interpretRestrictionUsingGeoip:!1,suppressMonetization:!1,salePeriod:[],allowBackgroundPlayback:!1,availability:[],externalUrl:"",originalAudio:void 0,employeeOnly:!1,rssGuid:"",type:0,seasonNumber:0,episodeNumber:0,isAudiobookChapter:!1}}const u={encode(e,t=s().Writer.create()){0!==e.gid.length&&t.uint32(10).bytes(e.gid),""!==e.name&&t.uint32(18).string(e.name),0!==e.duration&&t.uint32(56).sint32(e.duration);for(const n of e.audio)C.encode(n,t.uint32(98).fork()).ldelim();for(const n of e.localizedName)a.encode(n,t.uint32(186).fork()).ldelim();""!==e.description&&t.uint32(514).string(e.description),0!==e.number&&t.uint32(520).sint32(e.number),void 0!==e.publishTime&&m.encode(e.publishTime,t.uint32(530).fork()).ldelim(),0!==e.deprecatedPopularity&&t.uint32(536).sint32(e.deprecatedPopularity),void 0!==e.coverImage&&g.encode(e.coverImage,t.uint32(546).fork()).ldelim(),""!==e.language&&t.uint32(554).string(e.language),!0===e.explicit&&t.uint32(560).bool(e.explicit),void 0!==e.show&&l.encode(e.show,t.uint32(570).fork()).ldelim();for(const n of e.video)I.encode(n,t.uint32(578).fork()).ldelim();for(const n of e.videoPreview)I.encode(n,t.uint32(586).fork()).ldelim();for(const n of e.audioPreview)C.encode(n,t.uint32(594).fork()).ldelim();for(const n of e.restriction)_.encode(n,t.uint32(602).fork()).ldelim();void 0!==e.freezeFrame&&g.encode(e.freezeFrame,t.uint32(610).fork()).ldelim();for(const n of e.keyword)t.uint32(618).string(n);!0===e.interpretRestrictionUsingGeoip&&t.uint32(624).bool(e.interpretRestrictionUsingGeoip),!0===e.suppressMonetization&&t.uint32(632).bool(e.suppressMonetization);for(const n of e.salePeriod)S.encode(n,t.uint32(642).fork()).ldelim();!0===e.allowBackgroundPlayback&&t.uint32(648).bool(e.allowBackgroundPlayback);for(const n of e.availability)y.encode(n,t.uint32(658).fork()).ldelim();return""!==e.externalUrl&&t.uint32(666).string(e.externalUrl),void 0!==e.originalAudio&&p.encode(e.originalAudio,t.uint32(674).fork()).ldelim(),!0===e.employeeOnly&&t.uint32(680).bool(e.employeeOnly),""!==e.rssGuid&&t.uint32(690).string(e.rssGuid),0!==e.type&&t.uint32(696).int32(e.type),0!==e.seasonNumber&&t.uint32(704).int32(e.seasonNumber),0!==e.episodeNumber&&t.uint32(712).int32(e.episodeNumber),!0===e.isAudiobookChapter&&t.uint32(768).bool(e.isAudiobookChapter),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=c();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 7:if(56!==e)break;r.duration=n.sint32();continue;case 12:if(98!==e)break;r.audio.push(C.decode(n,n.uint32()));continue;case 23:if(186!==e)break;r.localizedName.push(a.decode(n,n.uint32()));continue;case 64:if(514!==e)break;r.description=n.string();continue;case 65:if(520!==e)break;r.number=n.sint32();continue;case 66:if(530!==e)break;r.publishTime=m.decode(n,n.uint32());continue;case 67:if(536!==e)break;r.deprecatedPopularity=n.sint32();continue;case 68:if(546!==e)break;r.coverImage=g.decode(n,n.uint32());continue;case 69:if(554!==e)break;r.language=n.string();continue;case 70:if(560!==e)break;r.explicit=n.bool();continue;case 71:if(570!==e)break;r.show=l.decode(n,n.uint32());continue;case 72:if(578!==e)break;r.video.push(I.decode(n,n.uint32()));continue;case 73:if(586!==e)break;r.videoPreview.push(I.decode(n,n.uint32()));continue;case 74:if(594!==e)break;r.audioPreview.push(C.decode(n,n.uint32()));continue;case 75:if(602!==e)break;r.restriction.push(_.decode(n,n.uint32()));continue;case 76:if(610!==e)break;r.freezeFrame=g.decode(n,n.uint32());continue;case 77:if(618!==e)break;r.keyword.push(n.string());continue;case 78:if(624!==e)break;r.interpretRestrictionUsingGeoip=n.bool();continue;case 79:if(632!==e)break;r.suppressMonetization=n.bool();continue;case 80:if(642!==e)break;r.salePeriod.push(S.decode(n,n.uint32()));continue;case 81:if(648!==e)break;r.allowBackgroundPlayback=n.bool();continue;case 82:if(658!==e)break;r.availability.push(y.decode(n,n.uint32()));continue;case 83:if(666!==e)break;r.externalUrl=n.string();continue;case 84:if(674!==e)break;r.originalAudio=p.decode(n,n.uint32());continue;case 85:if(680!==e)break;r.employeeOnly=n.bool();continue;case 86:if(690!==e)break;r.rssGuid=n.string();continue;case 87:if(696!==e)break;r.type=n.int32();continue;case 88:if(704!==e)break;r.seasonNumber=n.int32();continue;case 89:if(712!==e)break;r.episodeNumber=n.int32();continue;case 96:if(768!==e)break;r.isAudiobookChapter=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>u.fromPartial(e??{}),fromPartial(e){const t=c();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.duration=e.duration??0,t.audio=e.audio?.map((e=>C.fromPartial(e)))||[],t.localizedName=e.localizedName?.map((e=>a.fromPartial(e)))||[],t.description=e.description??"",t.number=e.number??0,t.publishTime=void 0!==e.publishTime&&null!==e.publishTime?m.fromPartial(e.publishTime):void 0,t.deprecatedPopularity=e.deprecatedPopularity??0,t.coverImage=void 0!==e.coverImage&&null!==e.coverImage?g.fromPartial(e.coverImage):void 0,t.language=e.language??"",t.explicit=e.explicit??!1,t.show=void 0!==e.show&&null!==e.show?l.fromPartial(e.show):void 0,t.video=e.video?.map((e=>I.fromPartial(e)))||[],t.videoPreview=e.videoPreview?.map((e=>I.fromPartial(e)))||[],t.audioPreview=e.audioPreview?.map((e=>C.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>_.fromPartial(e)))||[],t.freezeFrame=void 0!==e.freezeFrame&&null!==e.freezeFrame?g.fromPartial(e.freezeFrame):void 0,t.keyword=e.keyword?.map((e=>e))||[],t.interpretRestrictionUsingGeoip=e.interpretRestrictionUsingGeoip??!1,t.suppressMonetization=e.suppressMonetization??!1,t.salePeriod=e.salePeriod?.map((e=>S.fromPartial(e)))||[],t.allowBackgroundPlayback=e.allowBackgroundPlayback??!1,t.availability=e.availability?.map((e=>y.fromPartial(e)))||[],t.externalUrl=e.externalUrl??"",t.originalAudio=void 0!==e.originalAudio&&null!==e.originalAudio?p.fromPartial(e.originalAudio):void 0,t.employeeOnly=e.employeeOnly??!1,t.rssGuid=e.rssGuid??"",t.type=e.type??0,t.seasonNumber=e.seasonNumber??0,t.episodeNumber=e.episodeNumber??0,t.isAudiobookChapter=e.isAudiobookChapter??!1,t}};function d(){return{uuid:new Uint8Array}}const p={encode:(e,t=s().Writer.create())=>(0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=d();for(;n.pos>>3){case 1:if(10!==e)break;r.uuid=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>p.fromPartial(e??{}),fromPartial(e){const t=d();return t.uuid=e.uuid??new Uint8Array,t}};const m={encode:(e,t=s().Writer.create())=>(0!==e.year&&t.uint32(8).sint32(e.year),0!==e.month&&t.uint32(16).sint32(e.month),0!==e.day&&t.uint32(24).sint32(e.day),0!==e.hour&&t.uint32(32).sint32(e.hour),0!==e.minute&&t.uint32(40).sint32(e.minute),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={year:0,month:0,day:0,hour:0,minute:0};for(;n.pos>>3){case 1:if(8!==e)break;r.year=n.sint32();continue;case 2:if(16!==e)break;r.month=n.sint32();continue;case 3:if(24!==e)break;r.day=n.sint32();continue;case 4:if(32!==e)break;r.hour=n.sint32();continue;case 5:if(40!==e)break;r.minute=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={year:0,month:0,day:0,hour:0,minute:0};return t.year=e.year??0,t.month=e.month??0,t.day=e.day??0,t.hour=e.hour??0,t.minute=e.minute??0,t}};function h(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const f={encode:(e,t=s().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.size&&t.uint32(16).int32(e.size),0!==e.width&&t.uint32(24).sint32(e.width),0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=h();for(;n.pos>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.size=n.int32();continue;case 3:if(24!==e)break;r.width=n.sint32();continue;case 4:if(32!==e)break;r.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>f.fromPartial(e??{}),fromPartial(e){const t=h();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const g={encode(e,t=s().Writer.create()){for(const n of e.image)f.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={image:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.image.push(f.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>f.fromPartial(e)))||[],t}};const E={encode:(e,t=s().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),""!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:0,text:""};for(;n.pos>>3){case 1:if(8!==e)break;r.type=n.int32();continue;case 2:if(18!==e)break;r.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>E.fromPartial(e??{}),fromPartial(e){const t={type:0,text:""};return t.type=e.type??0,t.text=e.text??"",t}};const _={encode(e,t=s().Writer.create()){t.uint32(10).fork();for(const n of e.catalogue)t.int32(n);t.ldelim(),void 0!==e.countriesAllowed&&t.uint32(18).string(e.countriesAllowed),void 0!==e.countriesForbidden&&t.uint32(26).string(e.countriesForbidden),0!==e.type&&t.uint32(32).int32(e.type);for(const n of e.catalogueStr)t.uint32(42).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};for(;n.pos>>3){case 1:if(8===e){r.catalogue.push(n.int32());continue}if(10===e){const e=n.uint32()+n.pos;for(;n.pos_.fromPartial(e??{}),fromPartial(e){const t={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};return t.catalogue=e.catalogue?.map((e=>e))||[],t.countriesAllowed=e.countriesAllowed??void 0,t.countriesForbidden=e.countriesForbidden??void 0,t.type=e.type??0,t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t}};const y={encode(e,t=s().Writer.create()){for(const n of e.catalogueStr)t.uint32(10).string(n);return void 0!==e.start&&m.encode(e.start,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogueStr:[],start:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.catalogueStr.push(n.string());continue;case 2:if(18!==e)break;r.start=m.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>y.fromPartial(e??{}),fromPartial(e){const t={catalogueStr:[],start:void 0};return t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t.start=void 0!==e.start&&null!==e.start?m.fromPartial(e.start):void 0,t}};const v={encode(e,t=s().Writer.create()){""!==e.name&&t.uint32(10).string(e.name);for(const n of e.subcategories)b.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:"",subcategories:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.name=n.string();continue;case 2:if(18!==e)break;r.subcategories.push(b.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>v.fromPartial(e??{}),fromPartial(e){const t={name:"",subcategories:[]};return t.name=e.name??"",t.subcategories=e.subcategories?.map((e=>b.fromPartial(e)))||[],t}};const b={encode:(e,t=s().Writer.create())=>(""!==e.name&&t.uint32(10).string(e.name),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={name:""};for(;n.pos>>3){case 1:if(10!==e)break;r.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>b.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const S={encode(e,t=s().Writer.create()){for(const n of e.restriction)_.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.start&&m.encode(e.start,t.uint32(18).fork()).ldelim(),void 0!==e.end&&m.encode(e.end,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={restriction:[],start:void 0,end:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.restriction.push(_.decode(n,n.uint32()));continue;case 2:if(18!==e)break;r.start=m.decode(n,n.uint32());continue;case 3:if(26!==e)break;r.end=m.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>S.fromPartial(e??{}),fromPartial(e){const t={restriction:[],start:void 0,end:void 0};return t.restriction=e.restriction?.map((e=>_.fromPartial(e)))||[],t.start=void 0!==e.start&&null!==e.start?m.fromPartial(e.start):void 0,t.end=void 0!==e.end&&null!==e.end?m.fromPartial(e.end):void 0,t}};function A(){return{fileId:new Uint8Array,format:0}}const C={encode:(e,t=s().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),0!==e.format&&t.uint32(16).int32(e.format),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=A();for(;n.pos>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.format=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>C.fromPartial(e??{}),fromPartial(e){const t=A();return t.fileId=e.fileId??new Uint8Array,t.format=e.format??0,t}};function T(){return{fileId:new Uint8Array}}const I={encode:(e,t=s().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=T();for(;n.pos>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},create:e=>I.fromPartial(e??{}),fromPartial(e){const t=T();return t.fileId=e.fileId??new Uint8Array,t}};s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},77614:(e,t,n)=>{"use strict";n.d(t,{NX:()=>a,Nc:()=>s});var i=n(22795),r=n.n(i);let s=function(e){return e[e.PLAYABILITY_VERDICT_UNSPECIFIED=0]="PLAYABILITY_VERDICT_UNSPECIFIED",e[e.PLAYABILITY_VERDICT_PLAYABLE=1]="PLAYABILITY_VERDICT_PLAYABLE",e[e.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED=2]="PLAYABILITY_VERDICT_COUNTRY_RESTRICTED",e[e.PLAYABILITY_VERDICT_CATALOGUE_RESTRICTED=3]="PLAYABILITY_VERDICT_CATALOGUE_RESTRICTED",e[e.PLAYABILITY_VERDICT_UNAVAILABLE=4]="PLAYABILITY_VERDICT_UNAVAILABLE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const a={encode:(e,t=r().Writer.create())=>(!0===e.isPlayable&&t.uint32(8).bool(e.isPlayable),0!==e.reason&&t.uint32(16).int32(e.reason),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={isPlayable:!1,reason:0};for(;n.pos>>3){case 1:if(8!==e)break;s.isPlayable=n.bool();continue;case 2:if(16!==e)break;s.reason=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={isPlayable:!1,reason:0};return t.isPlayable=e.isPlayable??!1,t.reason=e.reason??0,t}}},27051:(e,t,n)=>{"use strict";n.d(t,{c3:()=>o,gu:()=>c});var i=n(22795),r=n.n(i);let s=function(e){return e[e.DANCEABILITY_UNKNOWN=0]="DANCEABILITY_UNKNOWN",e[e.DANCEABILITY_VERY_LOW=1]="DANCEABILITY_VERY_LOW",e[e.DANCEABILITY_LOW=2]="DANCEABILITY_LOW",e[e.DANCEABILITY_MEDIUM=3]="DANCEABILITY_MEDIUM",e[e.DANCEABILITY_HIGH=4]="DANCEABILITY_HIGH",e[e.DANCEABILITY_VERY_HIGH=5]="DANCEABILITY_VERY_HIGH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function a(e){switch(e){case 0:case"DANCEABILITY_UNKNOWN":return s.DANCEABILITY_UNKNOWN;case 1:case"DANCEABILITY_VERY_LOW":return s.DANCEABILITY_VERY_LOW;case 2:case"DANCEABILITY_LOW":return s.DANCEABILITY_LOW;case 3:case"DANCEABILITY_MEDIUM":return s.DANCEABILITY_MEDIUM;case 4:case"DANCEABILITY_HIGH":return s.DANCEABILITY_HIGH;case 5:case"DANCEABILITY_VERY_HIGH":return s.DANCEABILITY_VERY_HIGH;default:return s.UNRECOGNIZED}}let o=function(e){return e[e.MODE_UNKNOWN=0]="MODE_UNKNOWN",e[e.MODE_MINOR=1]="MODE_MINOR",e[e.MODE_MAJOR=2]="MODE_MAJOR",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function l(e){switch(e){case 0:case"MODE_UNKNOWN":return o.MODE_UNKNOWN;case 1:case"MODE_MINOR":return o.MODE_MINOR;case 2:case"MODE_MAJOR":return o.MODE_MAJOR;default:return o.UNRECOGNIZED}}const c={encode(e,t=r().Writer.create()){for(const n of e.tags)u.encode(n,t.uint32(10).fork()).ldelim();return 0!==e.bpm&&t.uint32(16).int32(e.bpm),void 0!==e.key&&d.encode(e.key,t.uint32(26).fork()).ldelim(),0!==e.danceability&&t.uint32(32).int32(e.danceability),!1!==e.preventPreviewBar&&t.uint32(40).bool(e.preventPreviewBar),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={tags:[],bpm:0,key:void 0,danceability:0,preventPreviewBar:!1};for(;n.pos>>3){case 1:if(10!==e)break;s.tags.push(u.decode(n,n.uint32()));continue;case 2:if(16!==e)break;s.bpm=n.int32();continue;case 3:if(26!==e)break;s.key=d.decode(n,n.uint32());continue;case 4:if(32!==e)break;s.danceability=n.int32();continue;case 5:if(40!==e)break;s.preventPreviewBar=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({tags:globalThis.Array.isArray(e?.tags)?e.tags.map((e=>u.fromJSON(e))):[],bpm:p(e.bpm)?globalThis.Number(e.bpm):0,key:p(e.key)?d.fromJSON(e.key):void 0,danceability:p(e.danceability)?a(e.danceability):0,preventPreviewBar:!!p(e.preventPreviewBar)&&globalThis.Boolean(e.preventPreviewBar)}),toJSON(e){const t={};return e.tags?.length&&(t.tags=e.tags.map((e=>u.toJSON(e)))),0!==e.bpm&&(t.bpm=Math.round(e.bpm)),void 0!==e.key&&(t.key=d.toJSON(e.key)),0!==e.danceability&&(t.danceability=function(e){switch(e){case s.DANCEABILITY_UNKNOWN:return"DANCEABILITY_UNKNOWN";case s.DANCEABILITY_VERY_LOW:return"DANCEABILITY_VERY_LOW";case s.DANCEABILITY_LOW:return"DANCEABILITY_LOW";case s.DANCEABILITY_MEDIUM:return"DANCEABILITY_MEDIUM";case s.DANCEABILITY_HIGH:return"DANCEABILITY_HIGH";case s.DANCEABILITY_VERY_HIGH:return"DANCEABILITY_VERY_HIGH";case s.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.danceability)),!1!==e.preventPreviewBar&&(t.preventPreviewBar=e.preventPreviewBar),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={tags:[],bpm:0,key:void 0,danceability:0,preventPreviewBar:!1};return t.tags=e.tags?.map((e=>u.fromPartial(e)))||[],t.bpm=e.bpm??0,t.key=void 0!==e.key&&null!==e.key?d.fromPartial(e.key):void 0,t.danceability=e.danceability??0,t.preventPreviewBar=e.preventPreviewBar??!1,t}};const u={encode:(e,t=r().Writer.create())=>(""!==e.conceptUri&&t.uint32(10).string(e.conceptUri),0!==e.weight&&t.uint32(21).float(e.weight),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={conceptUri:"",weight:0};for(;n.pos>>3){case 1:if(10!==e)break;s.conceptUri=n.string();continue;case 2:if(21!==e)break;s.weight=n.float();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({conceptUri:p(e.conceptUri)?globalThis.String(e.conceptUri):"",weight:p(e.weight)?globalThis.Number(e.weight):0}),toJSON(e){const t={};return""!==e.conceptUri&&(t.conceptUri=e.conceptUri),0!==e.weight&&(t.weight=e.weight),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={conceptUri:"",weight:0};return t.conceptUri=e.conceptUri??"",t.weight=e.weight??0,t}};const d={encode:(e,t=r().Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),0!==e.mode&&t.uint32(16).int32(e.mode),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={key:"",mode:0};for(;n.pos>>3){case 1:if(10!==e)break;s.key=n.string();continue;case 2:if(16!==e)break;s.mode=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({key:p(e.key)?globalThis.String(e.key):"",mode:p(e.mode)?l(e.mode):0}),toJSON(e){const t={};return""!==e.key&&(t.key=e.key),0!==e.mode&&(t.mode=function(e){switch(e){case o.MODE_UNKNOWN:return"MODE_UNKNOWN";case o.MODE_MINOR:return"MODE_MINOR";case o.MODE_MAJOR:return"MODE_MAJOR";case o.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.mode)),t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={key:"",mode:0};return t.key=e.key??"",t.mode=e.mode??0,t}};function p(e){return null!=e}},73647:(e,t,n)=>{"use strict";n.d(t,{BV:()=>o,sL:()=>d});var i=n(21364),r=n(22795),s=n.n(r);const a={},o={encode(e,t=s().Writer.create()){for(const n of e.topics)c.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...a};for(r.topics=[];n.pos>>3==1)r.topics.push(c.decode(n,n.uint32()));else n.skipType(7&e)}return r},fromJSON(e){const t={...a};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(c.fromJSON(n));return t},toJSON(e){const t={};return e.topics?t.topics=e.topics.map((e=>e?c.toJSON(e):void 0)):t.topics=[],t},fromPartial(e){const t={...a};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(c.fromPartial(n));return t}},l={uri:"",title:""},c={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.title&&t.uint32(18).string(e.title),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...l};for(;n.pos>>3){case 1:r.uri=n.string();break;case 2:r.title=n.string();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...l};return void 0!==e.uri&&null!==e.uri?t.uri=String(e.uri):t.uri="",void 0!==e.title&&null!==e.title?t.title=String(e.title):t.title="",t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.title&&(t.title=e.title),t},fromPartial(e){const t={...l};return void 0!==e.uri&&null!==e.uri?t.uri=e.uri:t.uri="",void 0!==e.title&&null!==e.title?t.title=e.title:t.title="",t}},u={htmlDescription:""},d={encode:(e,t=s().Writer.create())=>(void 0!==e.header&&m.encode(e.header,t.uint32(10).fork()).ldelim(),""!==e.htmlDescription&&t.uint32(18).string(e.htmlDescription),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...u};for(;n.pos>>3){case 1:r.header=m.decode(n,n.uint32());break;case 2:r.htmlDescription=n.string();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...u};return void 0!==e.header&&null!==e.header?t.header=m.fromJSON(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=String(e.htmlDescription):t.htmlDescription="",t},toJSON(e){const t={};return void 0!==e.header&&(t.header=e.header?m.toJSON(e.header):void 0),void 0!==e.htmlDescription&&(t.htmlDescription=e.htmlDescription),t},fromPartial(e){const t={...u};return void 0!==e.header&&null!==e.header?t.header=m.fromPartial(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=e.htmlDescription:t.htmlDescription="",t}},p={},m={encode:(e,t=s().Writer.create())=>t,decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...p};for(;n.pos({...p}),toJSON:e=>({}),fromPartial:e=>({...p})};s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},90795:(e,t,n)=>{"use strict";n.d(t,{HP:()=>l});var i=n(21364),r=n(22795),s=n.n(r);let a=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.TALK=1]="TALK",e[e.MUSIC=2]="MUSIC",e[e.UPSELL=3]="UPSELL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const o={episodeUri:"",canUpsell:!1,albumMosaicUri:"",artists:"",durationMs:0},l={encode(e,t=s().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.playbackSegments)u.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.embeddedSegments)p.encode(n,t.uint32(26).fork()).ldelim();!0===e.canUpsell&&t.uint32(32).bool(e.canUpsell),""!==e.albumMosaicUri&&t.uint32(42).string(e.albumMosaicUri);for(const n of e.artists)t.uint32(50).string(n);return 0!==e.durationMs&&t.uint32(56).int32(e.durationMs),t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...o};for(r.playbackSegments=[],r.embeddedSegments=[],r.artists=[];n.pos>>3){case 1:r.episodeUri=n.string();break;case 2:r.playbackSegments.push(u.decode(n,n.uint32()));break;case 3:r.embeddedSegments.push(p.decode(n,n.uint32()));break;case 4:r.canUpsell=n.bool();break;case 5:r.albumMosaicUri=n.string();break;case 6:r.artists.push(n.string());break;case 7:r.durationMs=n.int32();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...o};return t.episodeUri=void 0!==e.episodeUri&&null!==e.episodeUri?String(e.episodeUri):"",t.playbackSegments=(e.playbackSegments??[]).map((e=>u.fromJSON(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>p.fromJSON(e))),t.canUpsell=void 0!==e.canUpsell&&null!==e.canUpsell&&Boolean(e.canUpsell),t.albumMosaicUri=void 0!==e.albumMosaicUri&&null!==e.albumMosaicUri?String(e.albumMosaicUri):"",t.artists=(e.artists??[]).map((e=>String(e))),t.durationMs=void 0!==e.durationMs&&null!==e.durationMs?Number(e.durationMs):0,t},toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.playbackSegments?t.playbackSegments=e.playbackSegments.map((e=>e?u.toJSON(e):void 0)):t.playbackSegments=[],e.embeddedSegments?t.embeddedSegments=e.embeddedSegments.map((e=>e?p.toJSON(e):void 0)):t.embeddedSegments=[],void 0!==e.canUpsell&&(t.canUpsell=e.canUpsell),void 0!==e.albumMosaicUri&&(t.albumMosaicUri=e.albumMosaicUri),e.artists?t.artists=e.artists.map((e=>e)):t.artists=[],void 0!==e.durationMs&&(t.durationMs=e.durationMs),t},fromPartial(e){const t={...o};return t.episodeUri=e.episodeUri??"",t.playbackSegments=(e.playbackSegments??[]).map((e=>u.fromPartial(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>p.fromPartial(e))),t.canUpsell=e.canUpsell??!1,t.albumMosaicUri=e.albumMosaicUri??"",t.artists=(e.artists??[]).map((e=>e)),t.durationMs=e.durationMs??0,t}},c={uri:"",startMs:0,stopMs:0,durationMs:0,type:0,title:"",subtitle:"",imageUrl:"",actionUrl:"",isAbridged:!1},u={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.startMs&&t.uint32(16).int32(e.startMs),0!==e.stopMs&&t.uint32(24).int32(e.stopMs),0!==e.durationMs&&t.uint32(32).int32(e.durationMs),0!==e.type&&t.uint32(40).int32(e.type),""!==e.title&&t.uint32(50).string(e.title),""!==e.subtitle&&t.uint32(58).string(e.subtitle),""!==e.imageUrl&&t.uint32(66).string(e.imageUrl),""!==e.actionUrl&&t.uint32(74).string(e.actionUrl),!0===e.isAbridged&&t.uint32(80).bool(e.isAbridged),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...c};for(;n.pos>>3){case 1:r.uri=n.string();break;case 2:r.startMs=n.int32();break;case 3:r.stopMs=n.int32();break;case 4:r.durationMs=n.int32();break;case 5:r.type=n.int32();break;case 6:r.title=n.string();break;case 7:r.subtitle=n.string();break;case 8:r.imageUrl=n.string();break;case 9:r.actionUrl=n.string();break;case 10:r.isAbridged=n.bool();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...c};return t.uri=void 0!==e.uri&&null!==e.uri?String(e.uri):"",t.startMs=void 0!==e.startMs&&null!==e.startMs?Number(e.startMs):0,t.stopMs=void 0!==e.stopMs&&null!==e.stopMs?Number(e.stopMs):0,t.durationMs=void 0!==e.durationMs&&null!==e.durationMs?Number(e.durationMs):0,t.type=void 0!==e.type&&null!==e.type?function(e){switch(e){case 0:case"UNKNOWN":return a.UNKNOWN;case 1:case"TALK":return a.TALK;case 2:case"MUSIC":return a.MUSIC;case 3:case"UPSELL":return a.UPSELL;default:return a.UNRECOGNIZED}}(e.type):0,t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.subtitle=void 0!==e.subtitle&&null!==e.subtitle?String(e.subtitle):"",t.imageUrl=void 0!==e.imageUrl&&null!==e.imageUrl?String(e.imageUrl):"",t.actionUrl=void 0!==e.actionUrl&&null!==e.actionUrl?String(e.actionUrl):"",t.isAbridged=void 0!==e.isAbridged&&null!==e.isAbridged&&Boolean(e.isAbridged),t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.startMs&&(t.startMs=e.startMs),void 0!==e.stopMs&&(t.stopMs=e.stopMs),void 0!==e.durationMs&&(t.durationMs=e.durationMs),void 0!==e.type&&(t.type=function(e){switch(e){case a.UNKNOWN:return"UNKNOWN";case a.TALK:return"TALK";case a.MUSIC:return"MUSIC";case a.UPSELL:return"UPSELL";default:return"UNKNOWN"}}(e.type)),void 0!==e.title&&(t.title=e.title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),void 0!==e.imageUrl&&(t.imageUrl=e.imageUrl),void 0!==e.actionUrl&&(t.actionUrl=e.actionUrl),void 0!==e.isAbridged&&(t.isAbridged=e.isAbridged),t},fromPartial(e){const t={...c};return t.uri=e.uri??"",t.startMs=e.startMs??0,t.stopMs=e.stopMs??0,t.durationMs=e.durationMs??0,t.type=e.type??0,t.title=e.title??"",t.subtitle=e.subtitle??"",t.imageUrl=e.imageUrl??"",t.actionUrl=e.actionUrl??"",t.isAbridged=e.isAbridged??!1,t}},d={uri:"",absoluteStartMs:0,absoluteStopMs:0},p={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.absoluteStartMs&&t.uint32(16).int32(e.absoluteStartMs),0!==e.absoluteStopMs&&t.uint32(24).int32(e.absoluteStopMs),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...d};for(;n.pos>>3){case 1:r.uri=n.string();break;case 2:r.absoluteStartMs=n.int32();break;case 3:r.absoluteStopMs=n.int32();break;default:n.skipType(7&e)}}return r},fromJSON(e){const t={...d};return t.uri=void 0!==e.uri&&null!==e.uri?String(e.uri):"",t.absoluteStartMs=void 0!==e.absoluteStartMs&&null!==e.absoluteStartMs?Number(e.absoluteStartMs):0,t.absoluteStopMs=void 0!==e.absoluteStopMs&&null!==e.absoluteStopMs?Number(e.absoluteStopMs):0,t},toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.absoluteStartMs&&(t.absoluteStartMs=e.absoluteStartMs),void 0!==e.absoluteStopMs&&(t.absoluteStopMs=e.absoluteStopMs),t},fromPartial(e){const t={...d};return t.uri=e.uri??"",t.absoluteStartMs=e.absoluteStartMs??0,t.absoluteStopMs=e.absoluteStopMs??0,t}};s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},66556:(e,t,n)=>{"use strict";n.d(t,{UE:()=>o});var i=n(21364),r=n(22795),s=n.n(r);const a={isPaywalled:!1,isUserSubscribed:!1,userExplanation:0},o={encode:(e,t=s().Writer.create())=>(!0===e.isPaywalled&&t.uint32(8).bool(e.isPaywalled),!0===e.isUserSubscribed&&t.uint32(16).bool(e.isUserSubscribed),0!==e.userExplanation&&t.uint32(24).int32(e.userExplanation),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={...a};for(;n.pos>>3){case 1:r.isPaywalled=n.bool();break;case 2:r.isUserSubscribed=n.bool();break;case 3:r.userExplanation=n.int32();break;default:n.skipType(7&e)}}return r},fromPartial(e){const t={...a};return void 0!==e.isPaywalled&&null!==e.isPaywalled?t.isPaywalled=e.isPaywalled:t.isPaywalled=!1,void 0!==e.isUserSubscribed&&null!==e.isUserSubscribed?t.isUserSubscribed=e.isUserSubscribed:t.isUserSubscribed=!1,void 0!==e.userExplanation&&null!==e.userExplanation?t.userExplanation=e.userExplanation:t.userExplanation=0,t}};s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},69030:(e,t,n)=>{"use strict";n.d(t,{YT:()=>a});var i=n(21364),r=n(22795),s=n.n(r);n(22450);const a={encode(e,t=s().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.transcripts)o.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={episodeUri:"",transcripts:[]};for(;n.pos>>3){case 1:r.episodeUri=n.string();break;case 2:r.transcripts.push(o.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return r},fromJSON:e=>({episodeUri:l(e.episodeUri)?String(e.episodeUri):"",transcripts:Array.isArray(e?.transcripts)?e.transcripts.map((e=>o.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.transcripts?t.transcripts=e.transcripts.map((e=>e?o.toJSON(e):void 0)):t.transcripts=[],t},fromPartial(e){const t={episodeUri:"",transcripts:[]};return t.episodeUri=e.episodeUri??"",t.transcripts=e.transcripts?.map((e=>o.fromPartial(e)))||[],t}};const o={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.language&&t.uint32(18).string(e.language),!0===e.curated&&t.uint32(24).bool(e.curated),""!==e.cdnUrl&&t.uint32(34).string(e.cdnUrl),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const r={uri:"",language:"",curated:!1,cdnUrl:""};for(;n.pos>>3){case 1:r.uri=n.string();break;case 2:r.language=n.string();break;case 3:r.curated=n.bool();break;case 4:r.cdnUrl=n.string();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({uri:l(e.uri)?String(e.uri):"",language:l(e.language)?String(e.language):"",curated:!!l(e.curated)&&Boolean(e.curated),cdnUrl:l(e.cdnUrl)?String(e.cdnUrl):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.language&&(t.language=e.language),void 0!==e.curated&&(t.curated=e.curated),void 0!==e.cdnUrl&&(t.cdnUrl=e.cdnUrl),t},fromPartial(e){const t={uri:"",language:"",curated:!1,cdnUrl:""};return t.uri=e.uri??"",t.language=e.language??"",t.curated=e.curated??!1,t.cdnUrl=e.cdnUrl??"",t}};function l(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},49182:(e,t,n)=>{"use strict";n.d(t,{C_:()=>a,r6:()=>u});var i=n(22795),r=n.n(i),s=n(22450);let a=function(e){return e[e.COPYRIGHT_TYPE_UNSPECIFIED=0]="COPYRIGHT_TYPE_UNSPECIFIED",e[e.COPYRIGHT_TYPE_P=1]="COPYRIGHT_TYPE_P",e[e.COPYRIGHT_TYPE_C=2]="COPYRIGHT_TYPE_C",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 0:case"COPYRIGHT_TYPE_UNSPECIFIED":return a.COPYRIGHT_TYPE_UNSPECIFIED;case 1:case"COPYRIGHT_TYPE_P":return a.COPYRIGHT_TYPE_P;case 2:case"COPYRIGHT_TYPE_C":return a.COPYRIGHT_TYPE_C;default:return a.UNRECOGNIZED}}const l={encode(e,t=r().Writer.create()){""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.type&&t.uint32(18).string(e.type),""!==e.name&&t.uint32(26).string(e.name);for(const n of e.agents)p.encode(n,t.uint32(34).fork()).ldelim();for(const n of e.covers)d.encode(n,t.uint32(42).fork()).ldelim();void 0!==e.explicit&&t.uint32(48).bool(e.explicit);for(const n of e.copyright)c.encode(n,t.uint32(58).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:"",type:void 0,name:"",agents:[],covers:[],explicit:void 0,copyright:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.type=n.string();continue;case 3:if(26!==e)break;s.name=n.string();continue;case 4:if(34!==e)break;s.agents.push(p.decode(n,n.uint32()));continue;case 5:if(42!==e)break;s.covers.push(d.decode(n,n.uint32()));continue;case 6:if(48!==e)break;s.explicit=n.bool();continue;case 7:if(58!==e)break;s.copyright.push(c.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({uri:f(e.uri)?globalThis.String(e.uri):"",type:f(e.type)?globalThis.String(e.type):void 0,name:f(e.name)?globalThis.String(e.name):"",agents:globalThis.Array.isArray(e?.agents)?e.agents.map((e=>p.fromJSON(e))):[],covers:globalThis.Array.isArray(e?.covers)?e.covers.map((e=>d.fromJSON(e))):[],explicit:f(e.explicit)?globalThis.Boolean(e.explicit):void 0,copyright:globalThis.Array.isArray(e?.copyright)?e.copyright.map((e=>c.fromJSON(e))):[]}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),void 0!==e.type&&(t.type=e.type),""!==e.name&&(t.name=e.name),e.agents?.length&&(t.agents=e.agents.map((e=>p.toJSON(e)))),e.covers?.length&&(t.covers=e.covers.map((e=>d.toJSON(e)))),void 0!==e.explicit&&(t.explicit=e.explicit),e.copyright?.length&&(t.copyright=e.copyright.map((e=>c.toJSON(e)))),t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={uri:"",type:void 0,name:"",agents:[],covers:[],explicit:void 0,copyright:[]};return t.uri=e.uri??"",t.type=e.type??void 0,t.name=e.name??"",t.agents=e.agents?.map((e=>p.fromPartial(e)))||[],t.covers=e.covers?.map((e=>d.fromPartial(e)))||[],t.explicit=e.explicit??void 0,t.copyright=e.copyright?.map((e=>c.fromPartial(e)))||[],t}};const c={encode:(e,t=r().Writer.create())=>(void 0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={type:void 0,text:void 0};for(;n.pos>>3){case 1:if(8!==e)break;s.type=n.int32();continue;case 2:if(18!==e)break;s.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({type:f(e.type)?o(e.type):void 0,text:f(e.text)?globalThis.String(e.text):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case a.COPYRIGHT_TYPE_UNSPECIFIED:return"COPYRIGHT_TYPE_UNSPECIFIED";case a.COPYRIGHT_TYPE_P:return"COPYRIGHT_TYPE_P";case a.COPYRIGHT_TYPE_C:return"COPYRIGHT_TYPE_C";case a.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.text&&(t.text=e.text),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={type:void 0,text:void 0};return t.type=e.type??void 0,t.text=e.text??void 0,t}};const u={encode:(e,t=r().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.releaseTime&&s.D.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}(e.releaseTime),t.uint32(18).fork()).ldelim(),void 0!==e.entity&&l.encode(e.entity,t.uint32(26).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={uri:"",releaseTime:void 0,entity:void 0};for(;n.pos>>3){case 1:if(10!==e)break;a.uri=n.string();continue;case 2:if(18!==e)break;a.releaseTime=m(s.D.decode(n,n.uint32()));continue;case 3:if(26!==e)break;a.entity=l.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},fromJSON:e=>({uri:f(e.uri)?globalThis.String(e.uri):"",releaseTime:f(e.releaseTime)?h(e.releaseTime):void 0,entity:f(e.entity)?l.fromJSON(e.entity):void 0}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),void 0!==e.releaseTime&&(t.releaseTime=e.releaseTime.toISOString()),void 0!==e.entity&&(t.entity=l.toJSON(e.entity)),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={uri:"",releaseTime:void 0,entity:void 0};return t.uri=e.uri??"",t.releaseTime=e.releaseTime??void 0,t.entity=void 0!==e.entity&&null!==e.entity?l.fromPartial(e.entity):void 0,t}};const d={encode:(e,t=r().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.size&&t.uint32(18).string(e.size),void 0!==e.width&&t.uint32(24).sint32(e.width),void 0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:"",size:"",width:void 0,height:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.size=n.string();continue;case 3:if(24!==e)break;s.width=n.sint32();continue;case 4:if(32!==e)break;s.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({uri:f(e.uri)?globalThis.String(e.uri):"",size:f(e.size)?globalThis.String(e.size):"",width:f(e.width)?globalThis.Number(e.width):void 0,height:f(e.height)?globalThis.Number(e.height):void 0}),toJSON(e){const t={};return""!==e.uri&&(t.uri=e.uri),""!==e.size&&(t.size=e.size),void 0!==e.width&&(t.width=Math.round(e.width)),void 0!==e.height&&(t.height=Math.round(e.height)),t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={uri:"",size:"",width:void 0,height:void 0};return t.uri=e.uri??"",t.size=e.size??"",t.width=e.width??void 0,t.height=e.height??void 0,t}};const p={encode:(e,t=r().Writer.create())=>(void 0!==e.uri&&t.uint32(10).string(e.uri),""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={uri:void 0,name:""};for(;n.pos>>3){case 1:if(10!==e)break;s.uri=n.string();continue;case 2:if(18!==e)break;s.name=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({uri:f(e.uri)?globalThis.String(e.uri):void 0,name:f(e.name)?globalThis.String(e.name):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),""!==e.name&&(t.name=e.name),t},create:e=>p.fromPartial(e??{}),fromPartial(e){const t={uri:void 0,name:""};return t.uri=e.uri??void 0,t.name=e.name??"",t}};function m(e){let t=1e3*(globalThis.Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function h(e){return e instanceof globalThis.Date?e:"string"==typeof e?new globalThis.Date(e):m(s.D.fromJSON(e))}function f(e){return null!=e}},79561:(e,t,n)=>{"use strict";n.d(t,{a9:()=>l});var i=n(21364),r=n(22795),s=n(22450);const a={encode:(e,t=r.Writer.create())=>(""!==e.userId&&t.uint32(10).string(e.userId),""!==e.showUri&&t.uint32(18).string(e.showUri),0!==e.rating&&t.uint32(24).int32(e.rating),void 0!==e.ratedAt&&s.D.encode(c(e.ratedAt),t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof r.Reader?e:new r.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={userId:"",showUri:"",rating:0,ratedAt:void 0};for(;n.pos>>3){case 1:a.userId=n.string();break;case 2:a.showUri=n.string();break;case 3:a.rating=n.int32();break;case 4:a.ratedAt=u(s.D.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({userId:p(e.userId)?String(e.userId):"",showUri:p(e.showUri)?String(e.showUri):"",rating:p(e.rating)?Number(e.rating):0,ratedAt:p(e.ratedAt)?d(e.ratedAt):void 0}),toJSON(e){const t={};return void 0!==e.userId&&(t.userId=e.userId),void 0!==e.showUri&&(t.showUri=e.showUri),void 0!==e.rating&&(t.rating=Math.round(e.rating)),void 0!==e.ratedAt&&(t.ratedAt=e.ratedAt.toISOString()),t},fromPartial(e){const t={userId:"",showUri:"",rating:0,ratedAt:void 0};return t.userId=e.userId??"",t.showUri=e.showUri??"",t.rating=e.rating??0,t.ratedAt=e.ratedAt??void 0,t}};const o={encode:(e,t=r.Writer.create())=>(0!==e.average&&t.uint32(9).double(e.average),"0"!==e.totalRatings&&t.uint32(16).int64(e.totalRatings),!0===e.showAverage&&t.uint32(24).bool(e.showAverage),t),decode(e,t){const n=e instanceof r.Reader?e:new r.Reader(e);let i=void 0===t?n.len:n.pos+t;const s={average:0,totalRatings:"0",showAverage:!1};for(;n.pos>>3){case 1:s.average=n.double();break;case 2:s.totalRatings=n.int64().toString();break;case 3:s.showAverage=n.bool();break;default:n.skipType(7&e)}}return s},fromJSON:e=>({average:p(e.average)?Number(e.average):0,totalRatings:p(e.totalRatings)?String(e.totalRatings):"0",showAverage:!!p(e.showAverage)&&Boolean(e.showAverage)}),toJSON(e){const t={};return void 0!==e.average&&(t.average=e.average),void 0!==e.totalRatings&&(t.totalRatings=e.totalRatings),void 0!==e.showAverage&&(t.showAverage=e.showAverage),t},fromPartial(e){const t={average:0,totalRatings:"0",showAverage:!1};return t.average=e.average??0,t.totalRatings=e.totalRatings??"0",t.showAverage=e.showAverage??!1,t}};const l={encode:(e,t=r.Writer.create())=>(void 0!==e.averageRating&&o.encode(e.averageRating,t.uint32(10).fork()).ldelim(),void 0!==e.rating&&a.encode(e.rating,t.uint32(18).fork()).ldelim(),!0===e.canRate&&t.uint32(24).bool(e.canRate),t),decode(e,t){const n=e instanceof r.Reader?e:new r.Reader(e);let i=void 0===t?n.len:n.pos+t;const s={averageRating:void 0,rating:void 0,canRate:!1};for(;n.pos>>3){case 1:s.averageRating=o.decode(n,n.uint32());break;case 2:s.rating=a.decode(n,n.uint32());break;case 3:s.canRate=n.bool();break;default:n.skipType(7&e)}}return s},fromJSON:e=>({averageRating:p(e.averageRating)?o.fromJSON(e.averageRating):void 0,rating:p(e.rating)?a.fromJSON(e.rating):void 0,canRate:!!p(e.canRate)&&Boolean(e.canRate)}),toJSON(e){const t={};return void 0!==e.averageRating&&(t.averageRating=e.averageRating?o.toJSON(e.averageRating):void 0),void 0!==e.rating&&(t.rating=e.rating?a.toJSON(e.rating):void 0),void 0!==e.canRate&&(t.canRate=e.canRate),t},fromPartial(e){const t={averageRating:void 0,rating:void 0,canRate:!1};return t.averageRating=void 0!==e.averageRating&&null!==e.averageRating?o.fromPartial(e.averageRating):void 0,t.rating=void 0!==e.rating&&null!==e.rating?a.fromPartial(e.rating):void 0,t.canRate=e.canRate??!1,t}};function c(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function u(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}function d(e){return e instanceof Date?e:"string"==typeof e?new Date(e):u(s.D.fromJSON(e))}function p(e){return null!=e}r.util.Long!==i.A&&(r.util.Long=i.A,r.configure())},93155:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(void 0!==e.rootlistable&&t.uint32(8).bool(e.rootlistable),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={rootlistable:void 0};for(;n.pos>>3){case 1:if(8!==e)break;s.rootlistable=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={rootlistable:void 0};return t.rootlistable=e.rootlistable??void 0,t}}},82550:(e,t,n)=>{"use strict";n.d(t,{Cb:()=>o,UG:()=>a});var i=n(22795),r=n.n(i),s=n(81001);let a=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.ANCHOR_PAYWALL=1]="ANCHOR_PAYWALL",e[e.OAP_OTP=2]="OAP_OTP",e[e.OAP_LINKING=3]="OAP_LINKING",e[e.AUDIOBOOK_DIRECT_SALES=4]="AUDIOBOOK_DIRECT_SALES",e[e.ABP=5]="ABP",e[e.AUDIOBOOK_PROMOTION=6]="AUDIOBOOK_PROMOTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const o={encode(e,t=r().Writer.create()){void 0!==e.none&&d.encode(e.none,t.uint32(10).fork()).ldelim(),void 0!==e.legacy&&u.encode(e.legacy,t.uint32(18).fork()).ldelim(),void 0!==e.basic&&c.encode(e.basic,t.uint32(26).fork()).ldelim(),void 0!==e.upsellLink&&p.encode(e.upsellLink,t.uint32(34).fork()).ldelim(),void 0!==e.engagement&&m.encode(e.engagement,t.uint32(50).fork()).ldelim(),void 0!==e.multiPass&&E.encode(e.multiPass,t.uint32(74).fork()).ldelim(),void 0!==e.checkoutOnWebOverlay&&h.encode(e.checkoutOnWebOverlay,t.uint32(90).fork()).ldelim(),void 0!==e.freeCheckout&&f.encode(e.freeCheckout,t.uint32(98).fork()).ldelim(),void 0!==e.consumptionCapped&&g.encode(e.consumptionCapped,t.uint32(106).fork()).ldelim(),void 0!==e.prompt&&y.encode(e.prompt,t.uint32(42).fork()).ldelim(),!1!==e.isUserMemberOfAtLeastOneGroup&&t.uint32(64).bool(e.isUserMemberOfAtLeastOneGroup),t.uint32(82).fork();for(const n of e.unlockedBy)t.int32(n);t.ldelim(),t.uint32(114).fork();for(const n of e.unlockingMethods)t.int32(n);return t.ldelim(),void 0!==e.signifier&&l.encode(e.signifier,t.uint32(122).fork()).ldelim(),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,checkoutOnWebOverlay:void 0,freeCheckout:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[],unlockingMethods:[],signifier:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.none=d.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.legacy=u.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.basic=c.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.upsellLink=p.decode(n,n.uint32());continue;case 6:if(50!==e)break;s.engagement=m.decode(n,n.uint32());continue;case 9:if(74!==e)break;s.multiPass=E.decode(n,n.uint32());continue;case 11:if(90!==e)break;s.checkoutOnWebOverlay=h.decode(n,n.uint32());continue;case 12:if(98!==e)break;s.freeCheckout=f.decode(n,n.uint32());continue;case 13:if(106!==e)break;s.consumptionCapped=g.decode(n,n.uint32());continue;case 5:if(42!==e)break;s.prompt=y.decode(n,n.uint32());continue;case 8:if(64!==e)break;s.isUserMemberOfAtLeastOneGroup=n.bool();continue;case 10:if(80===e){s.unlockedBy.push(n.int32());continue}if(82===e){const e=n.uint32()+n.pos;for(;n.poso.fromPartial(e??{}),fromPartial(e){const t={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,checkoutOnWebOverlay:void 0,freeCheckout:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[],unlockingMethods:[],signifier:void 0};return t.none=void 0!==e.none&&null!==e.none?d.fromPartial(e.none):void 0,t.legacy=void 0!==e.legacy&&null!==e.legacy?u.fromPartial(e.legacy):void 0,t.basic=void 0!==e.basic&&null!==e.basic?c.fromPartial(e.basic):void 0,t.upsellLink=void 0!==e.upsellLink&&null!==e.upsellLink?p.fromPartial(e.upsellLink):void 0,t.engagement=void 0!==e.engagement&&null!==e.engagement?m.fromPartial(e.engagement):void 0,t.multiPass=void 0!==e.multiPass&&null!==e.multiPass?E.fromPartial(e.multiPass):void 0,t.checkoutOnWebOverlay=void 0!==e.checkoutOnWebOverlay&&null!==e.checkoutOnWebOverlay?h.fromPartial(e.checkoutOnWebOverlay):void 0,t.freeCheckout=void 0!==e.freeCheckout&&null!==e.freeCheckout?f.fromPartial(e.freeCheckout):void 0,t.consumptionCapped=void 0!==e.consumptionCapped&&null!==e.consumptionCapped?g.fromPartial(e.consumptionCapped):void 0,t.prompt=void 0!==e.prompt&&null!==e.prompt?y.fromPartial(e.prompt):void 0,t.isUserMemberOfAtLeastOneGroup=e.isUserMemberOfAtLeastOneGroup??!1,t.unlockedBy=e.unlockedBy?.map((e=>e))||[],t.unlockingMethods=e.unlockingMethods?.map((e=>e))||[],t.signifier=void 0!==e.signifier&&null!==e.signifier?l.fromPartial(e.signifier):void 0,t}};const l={encode:(e,t=r().Writer.create())=>(""!==e.text&&t.uint32(10).string(e.text),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={text:""};for(;n.pos>>3){case 1:if(10!==e)break;s.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={text:""};return t.text=e.text??"",t}};const c={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:""};for(;n.pos>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t}};const u={encode:(e,t=r().Writer.create())=>t,decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.posu.fromPartial(e??{}),fromPartial:e=>({})};const d={encode:(e,t=r().Writer.create())=>t,decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.posd.fromPartial(e??{}),fromPartial:e=>({})};const p={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.url=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>p.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",url:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.url=e.url??"",t}};const m={encode:(e,t=r().Writer.create())=>(""!==e.header&&t.uint32(10).string(e.header),""!==e.title&&t.uint32(18).string(e.title),""!==e.body&&t.uint32(26).string(e.body),""!==e.cta&&t.uint32(34).string(e.cta),""!==e.dismiss&&t.uint32(42).string(e.dismiss),""!==e.actionType&&t.uint32(50).string(e.actionType),""!==e.bodySecondary&&t.uint32(58).string(e.bodySecondary),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};for(;n.pos>>3){case 1:if(10!==e)break;s.header=n.string();continue;case 2:if(18!==e)break;s.title=n.string();continue;case 3:if(26!==e)break;s.body=n.string();continue;case 4:if(34!==e)break;s.cta=n.string();continue;case 5:if(42!==e)break;s.dismiss=n.string();continue;case 6:if(50!==e)break;s.actionType=n.string();continue;case 7:if(58!==e)break;s.bodySecondary=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};return t.header=e.header??"",t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.dismiss=e.dismiss??"",t.actionType=e.actionType??"",t.bodySecondary=e.bodySecondary??"",t}};const h={encode:(e,t=r().Writer.create())=>(""!==e.cta&&t.uint32(10).string(e.cta),""!==e.snackbarSuccess&&t.uint32(18).string(e.snackbarSuccess),""!==e.snackbarError&&t.uint32(26).string(e.snackbarError),""!==e.snackbarFulfilmentComplete&&t.uint32(34).string(e.snackbarFulfilmentComplete),void 0!==e.price&&s.ZC.encode(e.price,t.uint32(42).fork()).ldelim(),!1!==e.isPriceDisplayed&&t.uint32(48).bool(e.isPriceDisplayed),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={cta:"",snackbarSuccess:"",snackbarError:"",snackbarFulfilmentComplete:"",price:void 0,isPriceDisplayed:!1};for(;n.pos>>3){case 1:if(10!==e)break;a.cta=n.string();continue;case 2:if(18!==e)break;a.snackbarSuccess=n.string();continue;case 3:if(26!==e)break;a.snackbarError=n.string();continue;case 4:if(34!==e)break;a.snackbarFulfilmentComplete=n.string();continue;case 5:if(42!==e)break;a.price=s.ZC.decode(n,n.uint32());continue;case 6:if(48!==e)break;a.isPriceDisplayed=n.bool();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>h.fromPartial(e??{}),fromPartial(e){const t={cta:"",snackbarSuccess:"",snackbarError:"",snackbarFulfilmentComplete:"",price:void 0,isPriceDisplayed:!1};return t.cta=e.cta??"",t.snackbarSuccess=e.snackbarSuccess??"",t.snackbarError=e.snackbarError??"",t.snackbarFulfilmentComplete=e.snackbarFulfilmentComplete??"",t.price=void 0!==e.price&&null!==e.price?s.ZC.fromPartial(e.price):void 0,t.isPriceDisplayed=e.isPriceDisplayed??!1,t}};const f={encode:(e,t=r().Writer.create())=>(""!==e.snackbarAwaitingFulfilment&&t.uint32(10).string(e.snackbarAwaitingFulfilment),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={snackbarAwaitingFulfilment:""};for(;n.pos>>3){case 1:if(10!==e)break;s.snackbarAwaitingFulfilment=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>f.fromPartial(e??{}),fromPartial(e){const t={snackbarAwaitingFulfilment:""};return t.snackbarAwaitingFulfilment=e.snackbarAwaitingFulfilment??"",t}};const g={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),void 0!==e.ctaUrl&&t.uint32(34).string(e.ctaUrl),void 0!==e.dismiss&&t.uint32(42).string(e.dismiss),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",ctaUrl:void 0,dismiss:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.ctaUrl=n.string();continue;case 5:if(42!==e)break;s.dismiss=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",ctaUrl:void 0,dismiss:void 0};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.ctaUrl=e.ctaUrl??void 0,t.dismiss=e.dismiss??void 0,t}};const E={encode(e,t=r().Writer.create()){""!==e.title&&t.uint32(10).string(e.title),""!==e.soaDescription&&t.uint32(18).string(e.soaDescription);for(const n of e.soaPartner)_.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",soaDescription:"",soaPartner:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.soaDescription=n.string();continue;case 3:if(26!==e)break;s.soaPartner.push(_.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>E.fromPartial(e??{}),fromPartial(e){const t={title:"",soaDescription:"",soaPartner:[]};return t.title=e.title??"",t.soaDescription=e.soaDescription??"",t.soaPartner=e.soaPartner?.map((e=>_.fromPartial(e)))||[],t}};const _={encode:(e,t=r().Writer.create())=>(""!==e.displayName&&t.uint32(10).string(e.displayName),""!==e.linkUrl&&t.uint32(18).string(e.linkUrl),""!==e.logoUrl&&t.uint32(26).string(e.logoUrl),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={displayName:"",linkUrl:"",logoUrl:""};for(;n.pos>>3){case 1:if(10!==e)break;s.displayName=n.string();continue;case 2:if(18!==e)break;s.linkUrl=n.string();continue;case 3:if(26!==e)break;s.logoUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>_.fromPartial(e??{}),fromPartial(e){const t={displayName:"",linkUrl:"",logoUrl:""};return t.displayName=e.displayName??"",t.linkUrl=e.linkUrl??"",t.logoUrl=e.logoUrl??"",t}};const y={encode:(e,t=r().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos>>3){case 1:if(10!==e)break;s.title=n.string();continue;case 2:if(18!==e)break;s.body=n.string();continue;case 3:if(26!==e)break;s.cta=n.string();continue;case 4:if(34!==e)break;s.url=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>y.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:"",url:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t.url=e.url??"",t}}},689:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(!0===e.enabled&&t.uint32(8).bool(e.enabled),""!==e.uri&&t.uint32(18).string(e.uri),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={enabled:!1,uri:""};for(;n.pos>>3){case 1:if(8!==e)break;s.enabled=n.bool();continue;case 2:if(18!==e)break;s.uri=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={enabled:!1,uri:""};return t.enabled=e.enabled??!1,t.uri=e.uri??"",t}}},81001:(e,t,n)=>{"use strict";n.d(t,{ZC:()=>a});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(0!==e.amount&&t.uint32(9).double(e.amount),""!==e.currency&&t.uint32(18).string(e.currency),""!==e.formattedPrice&&t.uint32(26).string(e.formattedPrice),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={amount:0,currency:"",formattedPrice:""};for(;n.pos>>3){case 1:if(9!==e)break;s.amount=n.double();continue;case 2:if(18!==e)break;s.currency=n.string();continue;case 3:if(26!==e)break;s.formattedPrice=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={amount:0,currency:"",formattedPrice:""};return t.amount=e.amount??0,t.currency=e.currency??"",t.formattedPrice=e.formattedPrice??"",t}};const a={encode:(e,t=r().Writer.create())=>(void 0!==e.finalPrice&&s.encode(e.finalPrice,t.uint32(10).fork()).ldelim(),void 0!==e.finalListPrice&&s.encode(e.finalListPrice,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={finalPrice:void 0,finalListPrice:void 0};for(;n.pos>>3){case 1:if(10!==e)break;a.finalPrice=s.decode(n,n.uint32());continue;case 2:if(18!==e)break;a.finalListPrice=s.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={finalPrice:void 0,finalListPrice:void 0};return t.finalPrice=void 0!==e.finalPrice&&null!==e.finalPrice?s.fromPartial(e.finalPrice):void 0,t.finalListPrice=void 0!==e.finalListPrice&&null!==e.finalListPrice?s.fromPartial(e.finalListPrice):void 0,t}}},77081:(e,t,n)=>{"use strict";n.d(t,{L:()=>g});var i=n(22795),r=n.n(i);const s={encode:(e,t=r().Writer.create())=>(""!==e.cdnUrl&&t.uint32(10).string(e.cdnUrl),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={cdnUrl:""};for(;n.pos>>3){case 1:if(10!==e)break;s.cdnUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={cdnUrl:""};return t.cdnUrl=e.cdnUrl??"",t}};const a={encode(e,t=r().Writer.create()){for(const n of e.instances)o.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.extractedColorSet&&l.encode(e.extractedColorSet,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={instances:[],extractedColorSet:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.instances.push(o.decode(n,n.uint32()));continue;case 2:if(18!==e)break;s.extractedColorSet=l.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={instances:[],extractedColorSet:void 0};return t.instances=e.instances?.map((e=>o.fromPartial(e)))||[],t.extractedColorSet=void 0!==e.extractedColorSet&&null!==e.extractedColorSet?l.fromPartial(e.extractedColorSet):void 0,t}};const o={encode:(e,t=r().Writer.create())=>(void 0!==e.flatFile&&s.encode(e.flatFile,t.uint32(10).fork()).ldelim(),0!==e.size&&t.uint32(16).int32(e.size),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={flatFile:void 0,size:0};for(;n.pos>>3){case 1:if(10!==e)break;a.flatFile=s.decode(n,n.uint32());continue;case 2:if(16!==e)break;a.size=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={flatFile:void 0,size:0};return t.flatFile=void 0!==e.flatFile&&null!==e.flatFile?s.fromPartial(e.flatFile):void 0,t.size=e.size??0,t}};const l={encode:(e,t=r().Writer.create())=>(void 0!==e.minContrast&&c.encode(e.minContrast,t.uint32(10).fork()).ldelim(),void 0!==e.highContrast&&c.encode(e.highContrast,t.uint32(18).fork()).ldelim(),void 0!==e.higherContrast&&c.encode(e.higherContrast,t.uint32(26).fork()).ldelim(),void 0!==e.encoreBaseSetTextColor&&u.encode(e.encoreBaseSetTextColor,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={minContrast:void 0,highContrast:void 0,higherContrast:void 0,encoreBaseSetTextColor:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.minContrast=c.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.highContrast=c.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.higherContrast=c.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.encoreBaseSetTextColor=u.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={minContrast:void 0,highContrast:void 0,higherContrast:void 0,encoreBaseSetTextColor:void 0};return t.minContrast=void 0!==e.minContrast&&null!==e.minContrast?c.fromPartial(e.minContrast):void 0,t.highContrast=void 0!==e.highContrast&&null!==e.highContrast?c.fromPartial(e.highContrast):void 0,t.higherContrast=void 0!==e.higherContrast&&null!==e.higherContrast?c.fromPartial(e.higherContrast):void 0,t.encoreBaseSetTextColor=void 0!==e.encoreBaseSetTextColor&&null!==e.encoreBaseSetTextColor?u.fromPartial(e.encoreBaseSetTextColor):void 0,t}};const c={encode:(e,t=r().Writer.create())=>(void 0!==e.backgroundBase&&u.encode(e.backgroundBase,t.uint32(10).fork()).ldelim(),void 0!==e.backgroundTintedBase&&u.encode(e.backgroundTintedBase,t.uint32(18).fork()).ldelim(),void 0!==e.textBase&&u.encode(e.textBase,t.uint32(26).fork()).ldelim(),void 0!==e.textSubdued&&u.encode(e.textSubdued,t.uint32(34).fork()).ldelim(),void 0!==e.textBrightAccent&&u.encode(e.textBrightAccent,t.uint32(42).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={backgroundBase:void 0,backgroundTintedBase:void 0,textBase:void 0,textSubdued:void 0,textBrightAccent:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.backgroundBase=u.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.backgroundTintedBase=u.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.textBase=u.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.textSubdued=u.decode(n,n.uint32());continue;case 5:if(42!==e)break;s.textBrightAccent=u.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={backgroundBase:void 0,backgroundTintedBase:void 0,textBase:void 0,textSubdued:void 0,textBrightAccent:void 0};return t.backgroundBase=void 0!==e.backgroundBase&&null!==e.backgroundBase?u.fromPartial(e.backgroundBase):void 0,t.backgroundTintedBase=void 0!==e.backgroundTintedBase&&null!==e.backgroundTintedBase?u.fromPartial(e.backgroundTintedBase):void 0,t.textBase=void 0!==e.textBase&&null!==e.textBase?u.fromPartial(e.textBase):void 0,t.textSubdued=void 0!==e.textSubdued&&null!==e.textSubdued?u.fromPartial(e.textSubdued):void 0,t.textBrightAccent=void 0!==e.textBrightAccent&&null!==e.textBrightAccent?u.fromPartial(e.textBrightAccent):void 0,t}};const u={encode:(e,t=r().Writer.create())=>(0!==e.r&&t.uint32(8).int32(e.r),0!==e.g&&t.uint32(16).int32(e.g),0!==e.b&&t.uint32(24).int32(e.b),0!==e.a&&t.uint32(32).int32(e.a),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={r:0,g:0,b:0,a:0};for(;n.pos>>3){case 1:if(8!==e)break;s.r=n.int32();continue;case 2:if(16!==e)break;s.g=n.int32();continue;case 3:if(24!==e)break;s.b=n.int32();continue;case 4:if(32!==e)break;s.a=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={r:0,g:0,b:0,a:0};return t.r=e.r??0,t.g=e.g??0,t.b=e.b??0,t.a=e.a??0,t}};const d={encode:(e,t=r().Writer.create())=>(void 0!==e.flatFile&&s.encode(e.flatFile,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={flatFile:void 0};for(;n.pos>>3){case 1:if(10!==e)break;a.flatFile=s.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={flatFile:void 0};return t.flatFile=void 0!==e.flatFile&&null!==e.flatFile?s.fromPartial(e.flatFile):void 0,t}};const p={encode:(e,t=r().Writer.create())=>(void 0!==e.flatFile&&s.encode(e.flatFile,t.uint32(10).fork()).ldelim(),void 0!==e.transcript&&d.encode(e.transcript,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={flatFile:void 0,transcript:void 0};for(;n.pos>>3){case 1:if(10!==e)break;a.flatFile=s.decode(n,n.uint32());continue;case 2:if(18!==e)break;a.transcript=d.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>p.fromPartial(e??{}),fromPartial(e){const t={flatFile:void 0,transcript:void 0};return t.flatFile=void 0!==e.flatFile&&null!==e.flatFile?s.fromPartial(e.flatFile):void 0,t.transcript=void 0!==e.transcript&&null!==e.transcript?d.fromPartial(e.transcript):void 0,t}};const m={encode:(e,t=r().Writer.create())=>(void 0!==e.asset&&h.encode(e.asset,t.uint32(10).fork()).ldelim(),void 0!==e.fallbackImage&&a.encode(e.fallbackImage,t.uint32(18).fork()).ldelim(),void 0!==e.fallbackAudio&&p.encode(e.fallbackAudio,t.uint32(26).fork()).ldelim(),void 0!==e.transcript&&d.encode(e.transcript,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={asset:void 0,fallbackImage:void 0,fallbackAudio:void 0,transcript:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.asset=h.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.fallbackImage=a.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.fallbackAudio=p.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.transcript=d.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={asset:void 0,fallbackImage:void 0,fallbackAudio:void 0,transcript:void 0};return t.asset=void 0!==e.asset&&null!==e.asset?h.fromPartial(e.asset):void 0,t.fallbackImage=void 0!==e.fallbackImage&&null!==e.fallbackImage?a.fromPartial(e.fallbackImage):void 0,t.fallbackAudio=void 0!==e.fallbackAudio&&null!==e.fallbackAudio?p.fromPartial(e.fallbackAudio):void 0,t.transcript=void 0!==e.transcript&&null!==e.transcript?d.fromPartial(e.transcript):void 0,t}};const h={encode:(e,t=r().Writer.create())=>(void 0!==e.flatFile&&s.encode(e.flatFile,t.uint32(10).fork()).ldelim(),void 0!==e.hls&&f.encode(e.hls,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const a={flatFile:void 0,hls:void 0};for(;n.pos>>3){case 1:if(10!==e)break;a.flatFile=s.decode(n,n.uint32());continue;case 2:if(18!==e)break;a.hls=f.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return a},create:e=>h.fromPartial(e??{}),fromPartial(e){const t={flatFile:void 0,hls:void 0};return t.flatFile=void 0!==e.flatFile&&null!==e.flatFile?s.fromPartial(e.flatFile):void 0,t.hls=void 0!==e.hls&&null!==e.hls?f.fromPartial(e.hls):void 0,t}};const f={encode:(e,t=r().Writer.create())=>(""!==e.manifestId&&t.uint32(10).string(e.manifestId),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={manifestId:""};for(;n.pos>>3){case 1:if(10!==e)break;s.manifestId=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>f.fromPartial(e??{}),fromPartial(e){const t={manifestId:""};return t.manifestId=e.manifestId??"",t}};const g={encode:(e,t=r().Writer.create())=>(void 0!==e.squareCoverImage&&a.encode(e.squareCoverImage,t.uint32(10).fork()).ldelim(),void 0!==e.sixteenByNineCoverImage&&a.encode(e.sixteenByNineCoverImage,t.uint32(18).fork()).ldelim(),void 0!==e.nineBySixteenCoverImage&&a.encode(e.nineBySixteenCoverImage,t.uint32(26).fork()).ldelim(),void 0!==e.nineBySixteenCoverVideo&&m.encode(e.nineBySixteenCoverVideo,t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={squareCoverImage:void 0,sixteenByNineCoverImage:void 0,nineBySixteenCoverImage:void 0,nineBySixteenCoverVideo:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.squareCoverImage=a.decode(n,n.uint32());continue;case 2:if(18!==e)break;s.sixteenByNineCoverImage=a.decode(n,n.uint32());continue;case 3:if(26!==e)break;s.nineBySixteenCoverImage=a.decode(n,n.uint32());continue;case 4:if(34!==e)break;s.nineBySixteenCoverVideo=m.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={squareCoverImage:void 0,sixteenByNineCoverImage:void 0,nineBySixteenCoverImage:void 0,nineBySixteenCoverVideo:void 0};return t.squareCoverImage=void 0!==e.squareCoverImage&&null!==e.squareCoverImage?a.fromPartial(e.squareCoverImage):void 0,t.sixteenByNineCoverImage=void 0!==e.sixteenByNineCoverImage&&null!==e.sixteenByNineCoverImage?a.fromPartial(e.sixteenByNineCoverImage):void 0,t.nineBySixteenCoverImage=void 0!==e.nineBySixteenCoverImage&&null!==e.nineBySixteenCoverImage?a.fromPartial(e.nineBySixteenCoverImage):void 0,t.nineBySixteenCoverVideo=void 0!==e.nineBySixteenCoverVideo&&null!==e.nineBySixteenCoverVideo?m.fromPartial(e.nineBySixteenCoverVideo):void 0,t}}},15198:(e,t,n)=>{"use strict";n.d(t,{U:()=>i});let i=function(e){return e[e.UNKNOWN_EXTENSION=0]="UNKNOWN_EXTENSION",e[e.CANVAZ=1]="CANVAZ",e[e.STORYLINES=2]="STORYLINES",e[e.PODCAST_TOPICS=3]="PODCAST_TOPICS",e[e.PODCAST_SEGMENTS=4]="PODCAST_SEGMENTS",e[e.AUDIO_FILES=5]="AUDIO_FILES",e[e.TRACK_DESCRIPTOR=6]="TRACK_DESCRIPTOR",e[e.PODCAST_COUNTER=7]="PODCAST_COUNTER",e[e.ARTIST_V4=8]="ARTIST_V4",e[e.ALBUM_V4=9]="ALBUM_V4",e[e.TRACK_V4=10]="TRACK_V4",e[e.SHOW_V4=11]="SHOW_V4",e[e.EPISODE_V4=12]="EPISODE_V4",e[e.PODCAST_HTML_DESCRIPTION=13]="PODCAST_HTML_DESCRIPTION",e[e.PODCAST_QUOTES=14]="PODCAST_QUOTES",e[e.USER_PROFILE=15]="USER_PROFILE",e[e.CANVAS_V1=16]="CANVAS_V1",e[e.SHOW_V4_BASE=17]="SHOW_V4_BASE",e[e.SHOW_V4_EPISODES_ASSOC=18]="SHOW_V4_EPISODES_ASSOC",e[e.TRACK_DESCRIPTOR_SIGNATURES=19]="TRACK_DESCRIPTOR_SIGNATURES",e[e.PODCAST_AD_SEGMENTS=20]="PODCAST_AD_SEGMENTS",e[e.EPISODE_TRANSCRIPTS=21]="EPISODE_TRANSCRIPTS",e[e.PODCAST_SUBSCRIPTIONS=22]="PODCAST_SUBSCRIPTIONS",e[e.EXTRACTED_COLOR=23]="EXTRACTED_COLOR",e[e.PODCAST_VIRALITY=24]="PODCAST_VIRALITY",e[e.IMAGE_SPARKLES_HACK=25]="IMAGE_SPARKLES_HACK",e[e.PODCAST_POPULARITY_HACK=26]="PODCAST_POPULARITY_HACK",e[e.AUTOMIX_MODE=27]="AUTOMIX_MODE",e[e.CUEPOINTS=28]="CUEPOINTS",e[e.PODCAST_POLL=29]="PODCAST_POLL",e[e.EPISODE_ACCESS=30]="EPISODE_ACCESS",e[e.SHOW_ACCESS=31]="SHOW_ACCESS",e[e.PODCAST_QNA=32]="PODCAST_QNA",e[e.CLIPS=33]="CLIPS",e[e.SHOW_V5=34]="SHOW_V5",e[e.EPISODE_V5=35]="EPISODE_V5",e[e.PODCAST_CTA_CARDS=36]="PODCAST_CTA_CARDS",e[e.PODCAST_RATING=37]="PODCAST_RATING",e[e.DISPLAY_SEGMENTS=38]="DISPLAY_SEGMENTS",e[e.GREENROOM=39]="GREENROOM",e[e.USER_CREATED=40]="USER_CREATED",e[e.SHOW_DESCRIPTION=41]="SHOW_DESCRIPTION",e[e.SHOW_HTML_DESCRIPTION=42]="SHOW_HTML_DESCRIPTION",e[e.SHOW_PLAYABILITY=43]="SHOW_PLAYABILITY",e[e.EPISODE_DESCRIPTION=44]="EPISODE_DESCRIPTION",e[e.EPISODE_HTML_DESCRIPTION=45]="EPISODE_HTML_DESCRIPTION",e[e.EPISODE_PLAYABILITY=46]="EPISODE_PLAYABILITY",e[e.SHOW_EPISODES_ASSOC=47]="SHOW_EPISODES_ASSOC",e[e.CLIENT_CONFIG=48]="CLIENT_CONFIG",e[e.PLAYLISTABILITY=49]="PLAYLISTABILITY",e[e.AUDIOBOOK_V5=50]="AUDIOBOOK_V5",e[e.CHAPTER_V5=51]="CHAPTER_V5",e[e.AUDIOBOOK_SPECIFICS=52]="AUDIOBOOK_SPECIFICS",e[e.EPISODE_RANKING=53]="EPISODE_RANKING",e[e.HTML_DESCRIPTION=54]="HTML_DESCRIPTION",e[e.CREATOR_CHANNEL=55]="CREATOR_CHANNEL",e[e.AUDIOBOOK_PROVIDERS=56]="AUDIOBOOK_PROVIDERS",e[e.PLAY_TRAIT=57]="PLAY_TRAIT",e[e.CONTENT_WARNING=58]="CONTENT_WARNING",e[e.IMAGE_CUE=59]="IMAGE_CUE",e[e.STREAM_COUNT=60]="STREAM_COUNT",e[e.AUDIO_ATTRIBUTES=61]="AUDIO_ATTRIBUTES",e[e.NAVIGABLE_TRAIT=62]="NAVIGABLE_TRAIT",e[e.NEXT_BEST_EPISODE=63]="NEXT_BEST_EPISODE",e[e.AUDIOBOOK_PRICE=64]="AUDIOBOOK_PRICE",e[e.EXPRESSIVE_PLAYLISTS=65]="EXPRESSIVE_PLAYLISTS",e[e.DYNAMIC_SHOW_EPISODE=66]="DYNAMIC_SHOW_EPISODE",e[e.LIVE=67]="LIVE",e[e.SKIP_PLAYED=68]="SKIP_PLAYED",e[e.AD_BREAK_FREE_PODCASTS=69]="AD_BREAK_FREE_PODCASTS",e[e.ASSOCIATIONS=70]="ASSOCIATIONS",e[e.PLAYLIST_EVALUATION=71]="PLAYLIST_EVALUATION",e[e.CACHE_INVALIDATIONS=72]="CACHE_INVALIDATIONS",e[e.LIVESTREAM_ENTITY=73]="LIVESTREAM_ENTITY",e[e.SINGLE_TAP_REACTIONS=74]="SINGLE_TAP_REACTIONS",e[e.USER_COMMENTS=75]="USER_COMMENTS",e[e.CLIENT_RESTRICTIONS=76]="CLIENT_RESTRICTIONS",e[e.PODCAST_GUEST=77]="PODCAST_GUEST",e[e.PLAYABILITY=78]="PLAYABILITY",e[e.COVER_IMAGE=79]="COVER_IMAGE",e[e.SHARE_TRAIT=80]="SHARE_TRAIT",e[e.INSTANCE_SHARING=81]="INSTANCE_SHARING",e[e.ARTIST_TOUR=82]="ARTIST_TOUR",e[e.AUDIOBOOK_GENRE=83]="AUDIOBOOK_GENRE",e[e.CONCEPT=84]="CONCEPT",e[e.ORIGINAL_VIDEO=85]="ORIGINAL_VIDEO",e[e.SMART_SHUFFLE=86]="SMART_SHUFFLE",e[e.LIVE_EVENTS=87]="LIVE_EVENTS",e[e.AUDIOBOOK_RELATIONS=88]="AUDIOBOOK_RELATIONS",e[e.HOME_POC_BASECARD=89]="HOME_POC_BASECARD",e[e.AUDIOBOOK_SUPPLEMENTS=90]="AUDIOBOOK_SUPPLEMENTS",e[e.PAID_PODCAST_BANNER=91]="PAID_PODCAST_BANNER",e[e.FEWER_ADS=92]="FEWER_ADS",e[e.WATCH_FEED_SHOW_EXPLORER=93]="WATCH_FEED_SHOW_EXPLORER",e[e.TRACK_EXTRA_DESCRIPTORS=94]="TRACK_EXTRA_DESCRIPTORS",e[e.TRACK_EXTRA_AUDIO_ATTRIBUTES=95]="TRACK_EXTRA_AUDIO_ATTRIBUTES",e[e.TRACK_EXTENDED_CREDITS=96]="TRACK_EXTENDED_CREDITS",e[e.SIMPLE_TRAIT=97]="SIMPLE_TRAIT",e[e.AUDIO_ASSOCIATIONS=98]="AUDIO_ASSOCIATIONS",e[e.VIDEO_ASSOCIATIONS=99]="VIDEO_ASSOCIATIONS",e[e.PLAYLIST_TUNER=100]="PLAYLIST_TUNER",e[e.ARTIST_VIDEOS_ENTRYPOINT=101]="ARTIST_VIDEOS_ENTRYPOINT",e[e.ALBUM_PRERELEASE=102]="ALBUM_PRERELEASE",e[e.CONTENT_ALTERNATIVES=103]="CONTENT_ALTERNATIVES",e[e.SNAPSHOT_SHARING=105]="SNAPSHOT_SHARING",e[e.DISPLAY_SEGMENTS_COUNT=106]="DISPLAY_SEGMENTS_COUNT",e[e.PODCAST_FEATURED_EPISODE=107]="PODCAST_FEATURED_EPISODE",e[e.PODCAST_SPONSORED_CONTENT=108]="PODCAST_SPONSORED_CONTENT",e[e.PODCAST_EPISODE_TOPICS_LLM=109]="PODCAST_EPISODE_TOPICS_LLM",e[e.PODCAST_EPISODE_TOPICS_KG=110]="PODCAST_EPISODE_TOPICS_KG",e[e.EPISODE_RANKING_POPULARITY=111]="EPISODE_RANKING_POPULARITY",e[e.MERCH=112]="MERCH",e[e.COMPANION_CONTENT=113]="COMPANION_CONTENT",e[e.WATCH_FEED_ENTITY_EXPLORER=114]="WATCH_FEED_ENTITY_EXPLORER",e[e.ANCHOR_CARD_TRAIT=115]="ANCHOR_CARD_TRAIT",e[e.AUDIO_PREVIEW_PLAYBACK_TRAIT=116]="AUDIO_PREVIEW_PLAYBACK_TRAIT",e[e.VIDEO_PREVIEW_STILL_TRAIT=117]="VIDEO_PREVIEW_STILL_TRAIT",e[e.PREVIEW_CARD_TRAIT=118]="PREVIEW_CARD_TRAIT",e[e.SHORTCUTS_CARD_TRAIT=119]="SHORTCUTS_CARD_TRAIT",e[e.VIDEO_PREVIEW_PLAYBACK_TRAIT=120]="VIDEO_PREVIEW_PLAYBACK_TRAIT",e[e.COURSE_SPECIFICS=121]="COURSE_SPECIFICS",e[e.CONCERT=122]="CONCERT",e[e.CONCERT_LOCATION=123]="CONCERT_LOCATION",e[e.CONCERT_MARKETING=124]="CONCERT_MARKETING",e[e.CONCERT_PERFORMERS=125]="CONCERT_PERFORMERS",e[e.TRACK_PAIR_TRANSITION=126]="TRACK_PAIR_TRANSITION",e[e.CONTENT_TYPE_TRAIT=127]="CONTENT_TYPE_TRAIT",e[e.NAME_TRAIT=128]="NAME_TRAIT",e[e.ARTWORK_TRAIT=129]="ARTWORK_TRAIT",e[e.RELEASE_DATE_TRAIT=130]="RELEASE_DATE_TRAIT",e[e.CREDITS_TRAIT=131]="CREDITS_TRAIT",e[e.RELEASE_URI_TRAIT=132]="RELEASE_URI_TRAIT",e[e.ENTITY_CAPPING=133]="ENTITY_CAPPING",e[e.LESSON_SPECIFICS=134]="LESSON_SPECIFICS",e[e.CONCERT_OFFERS=135]="CONCERT_OFFERS",e[e.TRANSITION_MAPS=136]="TRANSITION_MAPS",e[e.ARTIST_HAS_CONCERTS=137]="ARTIST_HAS_CONCERTS",e[e.PRERELEASE=138]="PRERELEASE",e[e.PLAYLIST_ATTRIBUTES_V2=139]="PLAYLIST_ATTRIBUTES_V2",e[e.LIST_ATTRIBUTES_V2=140]="LIST_ATTRIBUTES_V2",e[e.LIST_METADATA=141]="LIST_METADATA",e[e.LIST_TUNER_AUDIO_ANALYSIS=142]="LIST_TUNER_AUDIO_ANALYSIS",e[e.LIST_TUNER_CUEPOINTS=143]="LIST_TUNER_CUEPOINTS",e[e.CONTENT_RATING_TRAIT=144]="CONTENT_RATING_TRAIT",e[e.COPYRIGHT_TRAIT=145]="COPYRIGHT_TRAIT",e[e.SUPPORTED_BADGES=146]="SUPPORTED_BADGES",e[e.BADGES=147]="BADGES",e[e.PREVIEW_TRAIT=148]="PREVIEW_TRAIT",e[e.ROOTLISTABILITY_TRAIT=149]="ROOTLISTABILITY_TRAIT",e[e.LOCAL_CONCERTS=150]="LOCAL_CONCERTS",e[e.RECOMMENDED_PLAYLISTS=151]="RECOMMENDED_PLAYLISTS",e[e.POPULAR_RELEASES=152]="POPULAR_RELEASES",e[e.RELATED_RELEASES=153]="RELATED_RELEASES",e[e.SHARE_RESTRICTIONS=154]="SHARE_RESTRICTIONS",e[e.CONCERT_OFFER=155]="CONCERT_OFFER",e[e.CONCERT_OFFER_PROVIDER=156]="CONCERT_OFFER_PROVIDER",e[e.ENTITY_BOOKMARKS=157]="ENTITY_BOOKMARKS",e[e.PRIVACY_TRAIT=158]="PRIVACY_TRAIT",e[e.DUPLICATE_ITEMS_TRAIT=159]="DUPLICATE_ITEMS_TRAIT",e[e.REORDERING_TRAIT=160]="REORDERING_TRAIT",e[e.PODCAST_RESUMPTION_SEGMENTS=161]="PODCAST_RESUMPTION_SEGMENTS",e[e.ARTIST_EXPRESSION_VIDEO=162]="ARTIST_EXPRESSION_VIDEO",e[e.PRERELEASE_VIDEO=163]="PRERELEASE_VIDEO",e[e.GATED_ENTITY_RELATIONS=164]="GATED_ENTITY_RELATIONS",e[e.RELATED_CREATORS_SECTION=165]="RELATED_CREATORS_SECTION",e[e.CREATORS_APPEARS_ON_SECTION=166]="CREATORS_APPEARS_ON_SECTION",e[e.PROMO_V1_TRAIT=167]="PROMO_V1_TRAIT",e[e.SPEECHLESS_SHARE_CARD=168]="SPEECHLESS_SHARE_CARD",e[e.TOP_PLAYABLES_SECTION=169]="TOP_PLAYABLES_SECTION",e[e.AUTO_LENS=170]="AUTO_LENS",e[e.PROMO_V3_TRAIT=171]="PROMO_V3_TRAIT",e[e.TRACK_CONTENT_FILTER=172]="TRACK_CONTENT_FILTER",e[e.HIGHLIGHTABILITY=173]="HIGHLIGHTABILITY",e[e.LINK_CARD_WITH_IMAGE_TRAIT=174]="LINK_CARD_WITH_IMAGE_TRAIT",e[e.TRACK_CLOUD_SECTION=175]="TRACK_CLOUD_SECTION",e[e.EPISODE_TOPICS=176]="EPISODE_TOPICS",e[e.VIDEO_THUMBNAIL=177]="VIDEO_THUMBNAIL",e[e.IDENTITY_TRAIT=178]="IDENTITY_TRAIT",e[e.VISUAL_IDENTITY_TRAIT=179]="VISUAL_IDENTITY_TRAIT",e[e.CONTENT_TYPE_V2_TRAIT=180]="CONTENT_TYPE_V2_TRAIT",e[e.PREVIEW_PLAYBACK_TRAIT=181]="PREVIEW_PLAYBACK_TRAIT",e[e.CONSUMPTION_EXPERIENCE_TRAIT=182]="CONSUMPTION_EXPERIENCE_TRAIT",e[e.PUBLISHING_METADATA_TRAIT=183]="PUBLISHING_METADATA_TRAIT",e[e.DETAILED_EVALUATION_TRAIT=184]="DETAILED_EVALUATION_TRAIT",e[e.ON_PLATFORM_REPUTATION_TRAIT=185]="ON_PLATFORM_REPUTATION_TRAIT",e[e.CREDITS_V2_TRAIT=186]="CREDITS_V2_TRAIT",e[e.HIGHLIGHT_PLAYABILITY_TRAIT=187]="HIGHLIGHT_PLAYABILITY_TRAIT",e[e.SHOW_EPISODE_LIST=188]="SHOW_EPISODE_LIST",e[e.AVAILABLE_RELEASES=189]="AVAILABLE_RELEASES",e[e.PLAYLIST_DESCRIPTORS=190]="PLAYLIST_DESCRIPTORS",e[e.LINK_CARD_WITH_ANIMATIONS_TRAIT=191]="LINK_CARD_WITH_ANIMATIONS_TRAIT",e[e.RECAP=192]="RECAP",e[e.AUDIOBOOK_COMPANION_CONTENT=193]="AUDIOBOOK_COMPANION_CONTENT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({})},19002:(e,t,n)=>{"use strict";n.d(t,{CC:()=>N});n(99974),n(1903);var i=n(21364),r=n(22795),s=n.n(r);let a=function(e){return e[e.ALBUM=1]="ALBUM",e[e.SINGLE=2]="SINGLE",e[e.COMPILATION=3]="COMPILATION",e[e.EP=4]="EP",e[e.AUDIOBOOK=5]="AUDIOBOOK",e[e.PODCAST=6]="PODCAST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 1:case"ALBUM":return a.ALBUM;case 2:case"SINGLE":return a.SINGLE;case 3:case"COMPILATION":return a.COMPILATION;case 4:case"EP":return a.EP;case 5:case"AUDIOBOOK":return a.AUDIOBOOK;case 6:case"PODCAST":return a.PODCAST;default:return a.UNRECOGNIZED}}let l=function(e){return e[e.ARTIST_ROLE_UNKNOWN=0]="ARTIST_ROLE_UNKNOWN",e[e.ARTIST_ROLE_MAIN_ARTIST=1]="ARTIST_ROLE_MAIN_ARTIST",e[e.ARTIST_ROLE_FEATURED_ARTIST=2]="ARTIST_ROLE_FEATURED_ARTIST",e[e.ARTIST_ROLE_REMIXER=3]="ARTIST_ROLE_REMIXER",e[e.ARTIST_ROLE_ACTOR=4]="ARTIST_ROLE_ACTOR",e[e.ARTIST_ROLE_COMPOSER=5]="ARTIST_ROLE_COMPOSER",e[e.ARTIST_ROLE_CONDUCTOR=6]="ARTIST_ROLE_CONDUCTOR",e[e.ARTIST_ROLE_ORCHESTRA=7]="ARTIST_ROLE_ORCHESTRA",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function c(e){switch(e){case 0:case"ARTIST_ROLE_UNKNOWN":return l.ARTIST_ROLE_UNKNOWN;case 1:case"ARTIST_ROLE_MAIN_ARTIST":return l.ARTIST_ROLE_MAIN_ARTIST;case 2:case"ARTIST_ROLE_FEATURED_ARTIST":return l.ARTIST_ROLE_FEATURED_ARTIST;case 3:case"ARTIST_ROLE_REMIXER":return l.ARTIST_ROLE_REMIXER;case 4:case"ARTIST_ROLE_ACTOR":return l.ARTIST_ROLE_ACTOR;case 5:case"ARTIST_ROLE_COMPOSER":return l.ARTIST_ROLE_COMPOSER;case 6:case"ARTIST_ROLE_CONDUCTOR":return l.ARTIST_ROLE_CONDUCTOR;case 7:case"ARTIST_ROLE_ORCHESTRA":return l.ARTIST_ROLE_ORCHESTRA;default:return l.UNRECOGNIZED}}let u=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e[e.LARGE=2]="LARGE",e[e.XLARGE=3]="XLARGE",e[e.XXLARGE=4]="XXLARGE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function d(e){switch(e){case 0:case"DEFAULT":return u.DEFAULT;case 1:case"SMALL":return u.SMALL;case 2:case"LARGE":return u.LARGE;case 3:case"XLARGE":return u.XLARGE;case 4:case"XXLARGE":return u.XXLARGE;default:return u.UNRECOGNIZED}}let p=function(e){return e[e.P=0]="P",e[e.C=1]="C",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function m(e){switch(e){case 0:case"P":return p.P;case 1:case"C":return p.C;default:return p.UNRECOGNIZED}}let h=function(e){return e[e.AD=0]="AD",e[e.SUBSCRIPTION=1]="SUBSCRIPTION",e[e.CATALOGUE_ALL=2]="CATALOGUE_ALL",e[e.SHUFFLE=3]="SHUFFLE",e[e.COMMERCIAL=4]="COMMERCIAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});let f=function(e){return e[e.STREAMING=0]="STREAMING",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function g(e){switch(e){case 0:case"STREAMING":return f.STREAMING;default:return f.UNRECOGNIZED}}let E=function(e){return e[e.OGG_VORBIS_96=0]="OGG_VORBIS_96",e[e.OGG_VORBIS_160=1]="OGG_VORBIS_160",e[e.OGG_VORBIS_320=2]="OGG_VORBIS_320",e[e.MP3_256=3]="MP3_256",e[e.MP3_320=4]="MP3_320",e[e.MP3_160=5]="MP3_160",e[e.MP3_96=6]="MP3_96",e[e.MP3_160_ENC=7]="MP3_160_ENC",e[e.AAC_24=8]="AAC_24",e[e.AAC_48=9]="AAC_48",e[e.MP4_128=10]="MP4_128",e[e.MP4_256=11]="MP4_256",e[e.MP4_128_DUAL=12]="MP4_128_DUAL",e[e.MP4_256_DUAL=13]="MP4_256_DUAL",e[e.MP4_128_CBCS=14]="MP4_128_CBCS",e[e.MP4_256_CBCS=15]="MP4_256_CBCS",e[e.FLAC_FLAC=16]="FLAC_FLAC",e[e.MP4_FLAC=17]="MP4_FLAC",e[e.XHE_AAC_24=18]="XHE_AAC_24",e[e.XHE_AAC_16=19]="XHE_AAC_16",e[e.XHE_AAC_12=20]="XHE_AAC_12",e[e.HE_AAC_64=21]="HE_AAC_64",e[e.FLAC_FLAC_24BIT=22]="FLAC_FLAC_24BIT",e[e.MP4_FLAC_24BIT=23]="MP4_FLAC_24BIT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function _(e){switch(e){case 0:case"OGG_VORBIS_96":return E.OGG_VORBIS_96;case 1:case"OGG_VORBIS_160":return E.OGG_VORBIS_160;case 2:case"OGG_VORBIS_320":return E.OGG_VORBIS_320;case 3:case"MP3_256":return E.MP3_256;case 4:case"MP3_320":return E.MP3_320;case 5:case"MP3_160":return E.MP3_160;case 6:case"MP3_96":return E.MP3_96;case 7:case"MP3_160_ENC":return E.MP3_160_ENC;case 8:case"AAC_24":return E.AAC_24;case 9:case"AAC_48":return E.AAC_48;case 10:case"MP4_128":return E.MP4_128;case 11:case"MP4_256":return E.MP4_256;case 12:case"MP4_128_DUAL":return E.MP4_128_DUAL;case 13:case"MP4_256_DUAL":return E.MP4_256_DUAL;case 14:case"MP4_128_CBCS":return E.MP4_128_CBCS;case 15:case"MP4_256_CBCS":return E.MP4_256_CBCS;case 16:case"FLAC_FLAC":return E.FLAC_FLAC;case 17:case"MP4_FLAC":return E.MP4_FLAC;case 18:case"XHE_AAC_24":return E.XHE_AAC_24;case 19:case"XHE_AAC_16":return E.XHE_AAC_16;case 20:case"XHE_AAC_12":return E.XHE_AAC_12;case 21:case"HE_AAC_64":return E.HE_AAC_64;case 22:case"FLAC_FLAC_24BIT":return E.FLAC_FLAC_24BIT;case 23:case"MP4_FLAC_24BIT":return E.MP4_FLAC_24BIT;default:return E.UNRECOGNIZED}}let y=function(e){return e[e.TOTAL=0]="TOTAL",e[e.COVERARTCP=1]="COVERARTCP",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function v(e){switch(e){case 0:case"TOTAL":return y.TOTAL;case 1:case"COVERARTCP":return y.COVERARTCP;default:return y.UNRECOGNIZED}}const b={encode:(e,t=s().Writer.create())=>(void 0!==e.language&&""!==e.language&&t.uint32(10).string(e.language),void 0!==e.value&&""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={language:"",value:""};for(;n.pos>>3){case 1:if(10!==e)break;r.language=n.string();continue;case 2:if(18!==e)break;r.value=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({language:ue(e.language)?globalThis.String(e.language):"",value:ue(e.value)?globalThis.String(e.value):""}),toJSON(e){const t={};return void 0!==e.language&&""!==e.language&&(t.language=e.language),void 0!==e.value&&""!==e.value&&(t.value=e.value),t},create:e=>b.fromPartial(e??{}),fromPartial(e){const t={language:"",value:""};return t.language=e.language??"",t.value=e.value??"",t}};function S(){return{gid:new Uint8Array(0),name:"",popularity:0,topTrack:[],albumGroup:[],singleGroup:[],compilationGroup:[],appearsOnGroup:[],genre:[],externalId:[],portrait:[],biography:[],activityPeriod:[],restriction:[],related:[],isPortraitAlbumCover:!1,portraitGroup:void 0,salePeriod:[],localizedName:[],availability:[],indexVersion:"0",compressedTopTrack:[]}}const A={encode(e,t=s().Writer.create()){void 0!==e.gid&&0!==e.gid.length&&t.uint32(10).bytes(e.gid),void 0!==e.name&&""!==e.name&&t.uint32(18).string(e.name),void 0!==e.popularity&&0!==e.popularity&&t.uint32(24).sint32(e.popularity);for(const n of e.topTrack)U.encode(n,t.uint32(34).fork()).ldelim();for(const n of e.albumGroup)j.encode(n,t.uint32(42).fork()).ldelim();for(const n of e.singleGroup)j.encode(n,t.uint32(50).fork()).ldelim();for(const n of e.compilationGroup)j.encode(n,t.uint32(58).fork()).ldelim();for(const n of e.appearsOnGroup)j.encode(n,t.uint32(66).fork()).ldelim();for(const n of e.genre)t.uint32(74).string(n);for(const n of e.externalId)Z.encode(n,t.uint32(82).fork()).ldelim();for(const n of e.portrait)G.encode(n,t.uint32(90).fork()).ldelim();for(const n of e.biography)W.encode(n,t.uint32(98).fork()).ldelim();for(const n of e.activityPeriod)B.encode(n,t.uint32(106).fork()).ldelim();for(const n of e.restriction)Y.encode(n,t.uint32(114).fork()).ldelim();for(const n of e.related)A.encode(n,t.uint32(122).fork()).ldelim();void 0!==e.isPortraitAlbumCover&&!1!==e.isPortraitAlbumCover&&t.uint32(128).bool(e.isPortraitAlbumCover),void 0!==e.portraitGroup&&H.encode(e.portraitGroup,t.uint32(138).fork()).ldelim();for(const n of e.salePeriod)$.encode(n,t.uint32(146).fork()).ldelim();for(const n of e.localizedName)b.encode(n,t.uint32(154).fork()).ldelim();for(const n of e.availability)q.encode(n,t.uint32(162).fork()).ldelim();void 0!==e.indexVersion&&"0"!==e.indexVersion&&t.uint32(168).int64(e.indexVersion);for(const n of e.compressedTopTrack)M.encode(n,t.uint32(178).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=S();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 3:if(24!==e)break;r.popularity=n.sint32();continue;case 4:if(34!==e)break;r.topTrack.push(U.decode(n,n.uint32()));continue;case 5:if(42!==e)break;r.albumGroup.push(j.decode(n,n.uint32()));continue;case 6:if(50!==e)break;r.singleGroup.push(j.decode(n,n.uint32()));continue;case 7:if(58!==e)break;r.compilationGroup.push(j.decode(n,n.uint32()));continue;case 8:if(66!==e)break;r.appearsOnGroup.push(j.decode(n,n.uint32()));continue;case 9:if(74!==e)break;r.genre.push(n.string());continue;case 10:if(82!==e)break;r.externalId.push(Z.decode(n,n.uint32()));continue;case 11:if(90!==e)break;r.portrait.push(G.decode(n,n.uint32()));continue;case 12:if(98!==e)break;r.biography.push(W.decode(n,n.uint32()));continue;case 13:if(106!==e)break;r.activityPeriod.push(B.decode(n,n.uint32()));continue;case 14:if(114!==e)break;r.restriction.push(Y.decode(n,n.uint32()));continue;case 15:if(122!==e)break;r.related.push(A.decode(n,n.uint32()));continue;case 16:if(128!==e)break;r.isPortraitAlbumCover=n.bool();continue;case 17:if(138!==e)break;r.portraitGroup=H.decode(n,n.uint32());continue;case 18:if(146!==e)break;r.salePeriod.push($.decode(n,n.uint32()));continue;case 19:if(154!==e)break;r.localizedName.push(b.decode(n,n.uint32()));continue;case 20:if(162!==e)break;r.availability.push(q.decode(n,n.uint32()));continue;case 21:if(168!==e)break;r.indexVersion=ce(n.int64());continue;case 22:if(178!==e)break;r.compressedTopTrack.push(M.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({gid:ue(e.gid)?oe(e.gid):new Uint8Array(0),name:ue(e.name)?globalThis.String(e.name):"",popularity:ue(e.popularity)?globalThis.Number(e.popularity):0,topTrack:globalThis.Array.isArray(e?.topTrack)?e.topTrack.map((e=>U.fromJSON(e))):[],albumGroup:globalThis.Array.isArray(e?.albumGroup)?e.albumGroup.map((e=>j.fromJSON(e))):[],singleGroup:globalThis.Array.isArray(e?.singleGroup)?e.singleGroup.map((e=>j.fromJSON(e))):[],compilationGroup:globalThis.Array.isArray(e?.compilationGroup)?e.compilationGroup.map((e=>j.fromJSON(e))):[],appearsOnGroup:globalThis.Array.isArray(e?.appearsOnGroup)?e.appearsOnGroup.map((e=>j.fromJSON(e))):[],genre:globalThis.Array.isArray(e?.genre)?e.genre.map((e=>globalThis.String(e))):[],externalId:globalThis.Array.isArray(e?.externalId)?e.externalId.map((e=>Z.fromJSON(e))):[],portrait:globalThis.Array.isArray(e?.portrait)?e.portrait.map((e=>G.fromJSON(e))):[],biography:globalThis.Array.isArray(e?.biography)?e.biography.map((e=>W.fromJSON(e))):[],activityPeriod:globalThis.Array.isArray(e?.activityPeriod)?e.activityPeriod.map((e=>B.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Y.fromJSON(e))):[],related:globalThis.Array.isArray(e?.related)?e.related.map((e=>A.fromJSON(e))):[],isPortraitAlbumCover:!!ue(e.isPortraitAlbumCover)&&globalThis.Boolean(e.isPortraitAlbumCover),portraitGroup:ue(e.portraitGroup)?H.fromJSON(e.portraitGroup):void 0,salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>$.fromJSON(e))):[],localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>b.fromJSON(e))):[],availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>q.fromJSON(e))):[],indexVersion:ue(e.indexVersion)?globalThis.String(e.indexVersion):"0",compressedTopTrack:globalThis.Array.isArray(e?.compressedTopTrack)?e.compressedTopTrack.map((e=>M.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=le(e.gid)),void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.popularity&&0!==e.popularity&&(t.popularity=Math.round(e.popularity)),e.topTrack?.length&&(t.topTrack=e.topTrack.map((e=>U.toJSON(e)))),e.albumGroup?.length&&(t.albumGroup=e.albumGroup.map((e=>j.toJSON(e)))),e.singleGroup?.length&&(t.singleGroup=e.singleGroup.map((e=>j.toJSON(e)))),e.compilationGroup?.length&&(t.compilationGroup=e.compilationGroup.map((e=>j.toJSON(e)))),e.appearsOnGroup?.length&&(t.appearsOnGroup=e.appearsOnGroup.map((e=>j.toJSON(e)))),e.genre?.length&&(t.genre=e.genre),e.externalId?.length&&(t.externalId=e.externalId.map((e=>Z.toJSON(e)))),e.portrait?.length&&(t.portrait=e.portrait.map((e=>G.toJSON(e)))),e.biography?.length&&(t.biography=e.biography.map((e=>W.toJSON(e)))),e.activityPeriod?.length&&(t.activityPeriod=e.activityPeriod.map((e=>B.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Y.toJSON(e)))),e.related?.length&&(t.related=e.related.map((e=>A.toJSON(e)))),void 0!==e.isPortraitAlbumCover&&!1!==e.isPortraitAlbumCover&&(t.isPortraitAlbumCover=e.isPortraitAlbumCover),void 0!==e.portraitGroup&&(t.portraitGroup=H.toJSON(e.portraitGroup)),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>$.toJSON(e)))),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>b.toJSON(e)))),e.availability?.length&&(t.availability=e.availability.map((e=>q.toJSON(e)))),void 0!==e.indexVersion&&"0"!==e.indexVersion&&(t.indexVersion=e.indexVersion),e.compressedTopTrack?.length&&(t.compressedTopTrack=e.compressedTopTrack.map((e=>M.toJSON(e)))),t},create:e=>A.fromPartial(e??{}),fromPartial(e){const t=S();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.popularity=e.popularity??0,t.topTrack=e.topTrack?.map((e=>U.fromPartial(e)))||[],t.albumGroup=e.albumGroup?.map((e=>j.fromPartial(e)))||[],t.singleGroup=e.singleGroup?.map((e=>j.fromPartial(e)))||[],t.compilationGroup=e.compilationGroup?.map((e=>j.fromPartial(e)))||[],t.appearsOnGroup=e.appearsOnGroup?.map((e=>j.fromPartial(e)))||[],t.genre=e.genre?.map((e=>e))||[],t.externalId=e.externalId?.map((e=>Z.fromPartial(e)))||[],t.portrait=e.portrait?.map((e=>G.fromPartial(e)))||[],t.biography=e.biography?.map((e=>W.fromPartial(e)))||[],t.activityPeriod=e.activityPeriod?.map((e=>B.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Y.fromPartial(e)))||[],t.related=e.related?.map((e=>A.fromPartial(e)))||[],t.isPortraitAlbumCover=e.isPortraitAlbumCover??!1,t.portraitGroup=void 0!==e.portraitGroup&&null!==e.portraitGroup?H.fromPartial(e.portraitGroup):void 0,t.salePeriod=e.salePeriod?.map((e=>$.fromPartial(e)))||[],t.localizedName=e.localizedName?.map((e=>b.fromPartial(e)))||[],t.availability=e.availability?.map((e=>q.fromPartial(e)))||[],t.indexVersion=e.indexVersion??"0",t.compressedTopTrack=e.compressedTopTrack?.map((e=>M.fromPartial(e)))||[],t}};function C(){return{gid:new Uint8Array(0),name:"",artist:[],type:1,label:"",date:void 0,popularity:0,genre:[],cover:[],externalId:[],disc:[],review:[],copyright:[],restriction:[],related:[],salePeriod:[],coverGroup:void 0,originalTitle:"",versionTitle:"",typeStr:"",visibilityBlock:[],earliestLiveTimestamp:"0",availability:[],windowedTrack:[],licensor:void 0,version:"0",feedGid:"",deliveryId:"",localizedName:[],indexVersion:"0",segmentBlockGid:[],courtesyLine:"",title:[],isMetadataHidden:!1,canonicalUri:"",artistWithRole:[],prereleaseConfig:void 0,labelId:[],implementationDetails:void 0,releaseAdmin:[]}}const T={encode(e,t=s().Writer.create()){void 0!==e.gid&&0!==e.gid.length&&t.uint32(10).bytes(e.gid),void 0!==e.name&&""!==e.name&&t.uint32(18).string(e.name);for(const n of e.artist)A.encode(n,t.uint32(26).fork()).ldelim();void 0!==e.type&&1!==e.type&&t.uint32(32).int32(e.type),void 0!==e.label&&""!==e.label&&t.uint32(42).string(e.label),void 0!==e.date&&F.encode(e.date,t.uint32(50).fork()).ldelim(),void 0!==e.popularity&&0!==e.popularity&&t.uint32(56).sint32(e.popularity);for(const n of e.genre)t.uint32(66).string(n);for(const n of e.cover)G.encode(n,t.uint32(74).fork()).ldelim();for(const n of e.externalId)Z.encode(n,t.uint32(82).fork()).ldelim();for(const n of e.disc)z.encode(n,t.uint32(90).fork()).ldelim();for(const n of e.review)t.uint32(98).string(n);for(const n of e.copyright)K.encode(n,t.uint32(106).fork()).ldelim();for(const n of e.restriction)Y.encode(n,t.uint32(114).fork()).ldelim();for(const n of e.related)T.encode(n,t.uint32(122).fork()).ldelim();for(const n of e.salePeriod)$.encode(n,t.uint32(130).fork()).ldelim();void 0!==e.coverGroup&&H.encode(e.coverGroup,t.uint32(138).fork()).ldelim(),void 0!==e.originalTitle&&""!==e.originalTitle&&t.uint32(146).string(e.originalTitle),void 0!==e.versionTitle&&""!==e.versionTitle&&t.uint32(154).string(e.versionTitle),void 0!==e.typeStr&&""!==e.typeStr&&t.uint32(162).string(e.typeStr);for(const n of e.visibilityBlock)ne.encode(n,t.uint32(170).fork()).ldelim();void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&t.uint32(176).int64(e.earliestLiveTimestamp);for(const n of e.availability)q.encode(n,t.uint32(186).fork()).ldelim();for(const n of e.windowedTrack)N.encode(n,t.uint32(194).fork()).ldelim();void 0!==e.licensor&&D.encode(e.licensor,t.uint32(202).fork()).ldelim(),void 0!==e.version&&"0"!==e.version&&t.uint32(208).int64(e.version),void 0!==e.feedGid&&""!==e.feedGid&&t.uint32(218).string(e.feedGid),void 0!==e.deliveryId&&""!==e.deliveryId&&t.uint32(226).string(e.deliveryId);for(const n of e.localizedName)b.encode(n,t.uint32(234).fork()).ldelim();void 0!==e.indexVersion&&"0"!==e.indexVersion&&t.uint32(240).int64(e.indexVersion);for(const n of e.segmentBlockGid)t.uint32(250).bytes(n);void 0!==e.courtesyLine&&""!==e.courtesyLine&&t.uint32(258).string(e.courtesyLine);for(const n of e.title)O.encode(n,t.uint32(266).fork()).ldelim();void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&t.uint32(272).bool(e.isMetadataHidden),void 0!==e.canonicalUri&&""!==e.canonicalUri&&t.uint32(282).string(e.canonicalUri);for(const n of e.artistWithRole)P.encode(n,t.uint32(290).fork()).ldelim();void 0!==e.prereleaseConfig&&re.encode(e.prereleaseConfig,t.uint32(298).fork()).ldelim();for(const n of e.labelId)Q.encode(n,t.uint32(306).fork()).ldelim();void 0!==e.implementationDetails&&I.encode(e.implementationDetails,t.uint32(314).fork()).ldelim();for(const n of e.releaseAdmin)ae.encode(n,t.uint32(322).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=C();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 3:if(26!==e)break;r.artist.push(A.decode(n,n.uint32()));continue;case 4:if(32!==e)break;r.type=n.int32();continue;case 5:if(42!==e)break;r.label=n.string();continue;case 6:if(50!==e)break;r.date=F.decode(n,n.uint32());continue;case 7:if(56!==e)break;r.popularity=n.sint32();continue;case 8:if(66!==e)break;r.genre.push(n.string());continue;case 9:if(74!==e)break;r.cover.push(G.decode(n,n.uint32()));continue;case 10:if(82!==e)break;r.externalId.push(Z.decode(n,n.uint32()));continue;case 11:if(90!==e)break;r.disc.push(z.decode(n,n.uint32()));continue;case 12:if(98!==e)break;r.review.push(n.string());continue;case 13:if(106!==e)break;r.copyright.push(K.decode(n,n.uint32()));continue;case 14:if(114!==e)break;r.restriction.push(Y.decode(n,n.uint32()));continue;case 15:if(122!==e)break;r.related.push(T.decode(n,n.uint32()));continue;case 16:if(130!==e)break;r.salePeriod.push($.decode(n,n.uint32()));continue;case 17:if(138!==e)break;r.coverGroup=H.decode(n,n.uint32());continue;case 18:if(146!==e)break;r.originalTitle=n.string();continue;case 19:if(154!==e)break;r.versionTitle=n.string();continue;case 20:if(162!==e)break;r.typeStr=n.string();continue;case 21:if(170!==e)break;r.visibilityBlock.push(ne.decode(n,n.uint32()));continue;case 22:if(176!==e)break;r.earliestLiveTimestamp=ce(n.int64());continue;case 23:if(186!==e)break;r.availability.push(q.decode(n,n.uint32()));continue;case 24:if(194!==e)break;r.windowedTrack.push(N.decode(n,n.uint32()));continue;case 25:if(202!==e)break;r.licensor=D.decode(n,n.uint32());continue;case 26:if(208!==e)break;r.version=ce(n.int64());continue;case 27:if(218!==e)break;r.feedGid=n.string();continue;case 28:if(226!==e)break;r.deliveryId=n.string();continue;case 29:if(234!==e)break;r.localizedName.push(b.decode(n,n.uint32()));continue;case 30:if(240!==e)break;r.indexVersion=ce(n.int64());continue;case 31:if(250!==e)break;r.segmentBlockGid.push(n.bytes());continue;case 32:if(258!==e)break;r.courtesyLine=n.string();continue;case 33:if(266!==e)break;r.title.push(O.decode(n,n.uint32()));continue;case 34:if(272!==e)break;r.isMetadataHidden=n.bool();continue;case 35:if(282!==e)break;r.canonicalUri=n.string();continue;case 36:if(290!==e)break;r.artistWithRole.push(P.decode(n,n.uint32()));continue;case 37:if(298!==e)break;r.prereleaseConfig=re.decode(n,n.uint32());continue;case 38:if(306!==e)break;r.labelId.push(Q.decode(n,n.uint32()));continue;case 39:if(314!==e)break;r.implementationDetails=I.decode(n,n.uint32());continue;case 40:if(322!==e)break;r.releaseAdmin.push(ae.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({gid:ue(e.gid)?oe(e.gid):new Uint8Array(0),name:ue(e.name)?globalThis.String(e.name):"",artist:globalThis.Array.isArray(e?.artist)?e.artist.map((e=>A.fromJSON(e))):[],type:ue(e.type)?o(e.type):1,label:ue(e.label)?globalThis.String(e.label):"",date:ue(e.date)?F.fromJSON(e.date):void 0,popularity:ue(e.popularity)?globalThis.Number(e.popularity):0,genre:globalThis.Array.isArray(e?.genre)?e.genre.map((e=>globalThis.String(e))):[],cover:globalThis.Array.isArray(e?.cover)?e.cover.map((e=>G.fromJSON(e))):[],externalId:globalThis.Array.isArray(e?.externalId)?e.externalId.map((e=>Z.fromJSON(e))):[],disc:globalThis.Array.isArray(e?.disc)?e.disc.map((e=>z.fromJSON(e))):[],review:globalThis.Array.isArray(e?.review)?e.review.map((e=>globalThis.String(e))):[],copyright:globalThis.Array.isArray(e?.copyright)?e.copyright.map((e=>K.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Y.fromJSON(e))):[],related:globalThis.Array.isArray(e?.related)?e.related.map((e=>T.fromJSON(e))):[],salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>$.fromJSON(e))):[],coverGroup:ue(e.coverGroup)?H.fromJSON(e.coverGroup):void 0,originalTitle:ue(e.originalTitle)?globalThis.String(e.originalTitle):"",versionTitle:ue(e.versionTitle)?globalThis.String(e.versionTitle):"",typeStr:ue(e.typeStr)?globalThis.String(e.typeStr):"",visibilityBlock:globalThis.Array.isArray(e?.visibilityBlock)?e.visibilityBlock.map((e=>ne.fromJSON(e))):[],earliestLiveTimestamp:ue(e.earliestLiveTimestamp)?globalThis.String(e.earliestLiveTimestamp):"0",availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>q.fromJSON(e))):[],windowedTrack:globalThis.Array.isArray(e?.windowedTrack)?e.windowedTrack.map((e=>N.fromJSON(e))):[],licensor:ue(e.licensor)?D.fromJSON(e.licensor):void 0,version:ue(e.version)?globalThis.String(e.version):"0",feedGid:ue(e.feedGid)?globalThis.String(e.feedGid):"",deliveryId:ue(e.deliveryId)?globalThis.String(e.deliveryId):"",localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>b.fromJSON(e))):[],indexVersion:ue(e.indexVersion)?globalThis.String(e.indexVersion):"0",segmentBlockGid:globalThis.Array.isArray(e?.segmentBlockGid)?e.segmentBlockGid.map((e=>oe(e))):[],courtesyLine:ue(e.courtesyLine)?globalThis.String(e.courtesyLine):"",title:globalThis.Array.isArray(e?.title)?e.title.map((e=>O.fromJSON(e))):[],isMetadataHidden:!!ue(e.isMetadataHidden)&&globalThis.Boolean(e.isMetadataHidden),canonicalUri:ue(e.canonicalUri)?globalThis.String(e.canonicalUri):"",artistWithRole:globalThis.Array.isArray(e?.artistWithRole)?e.artistWithRole.map((e=>P.fromJSON(e))):[],prereleaseConfig:ue(e.prereleaseConfig)?re.fromJSON(e.prereleaseConfig):void 0,labelId:globalThis.Array.isArray(e?.labelId)?e.labelId.map((e=>Q.fromJSON(e))):[],implementationDetails:ue(e.implementationDetails)?I.fromJSON(e.implementationDetails):void 0,releaseAdmin:globalThis.Array.isArray(e?.releaseAdmin)?e.releaseAdmin.map((e=>ae.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=le(e.gid)),void 0!==e.name&&""!==e.name&&(t.name=e.name),e.artist?.length&&(t.artist=e.artist.map((e=>A.toJSON(e)))),void 0!==e.type&&1!==e.type&&(t.type=function(e){switch(e){case a.ALBUM:return"ALBUM";case a.SINGLE:return"SINGLE";case a.COMPILATION:return"COMPILATION";case a.EP:return"EP";case a.AUDIOBOOK:return"AUDIOBOOK";case a.PODCAST:return"PODCAST";case a.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.label&&""!==e.label&&(t.label=e.label),void 0!==e.date&&(t.date=F.toJSON(e.date)),void 0!==e.popularity&&0!==e.popularity&&(t.popularity=Math.round(e.popularity)),e.genre?.length&&(t.genre=e.genre),e.cover?.length&&(t.cover=e.cover.map((e=>G.toJSON(e)))),e.externalId?.length&&(t.externalId=e.externalId.map((e=>Z.toJSON(e)))),e.disc?.length&&(t.disc=e.disc.map((e=>z.toJSON(e)))),e.review?.length&&(t.review=e.review),e.copyright?.length&&(t.copyright=e.copyright.map((e=>K.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Y.toJSON(e)))),e.related?.length&&(t.related=e.related.map((e=>T.toJSON(e)))),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>$.toJSON(e)))),void 0!==e.coverGroup&&(t.coverGroup=H.toJSON(e.coverGroup)),void 0!==e.originalTitle&&""!==e.originalTitle&&(t.originalTitle=e.originalTitle),void 0!==e.versionTitle&&""!==e.versionTitle&&(t.versionTitle=e.versionTitle),void 0!==e.typeStr&&""!==e.typeStr&&(t.typeStr=e.typeStr),e.visibilityBlock?.length&&(t.visibilityBlock=e.visibilityBlock.map((e=>ne.toJSON(e)))),void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&(t.earliestLiveTimestamp=e.earliestLiveTimestamp),e.availability?.length&&(t.availability=e.availability.map((e=>q.toJSON(e)))),e.windowedTrack?.length&&(t.windowedTrack=e.windowedTrack.map((e=>N.toJSON(e)))),void 0!==e.licensor&&(t.licensor=D.toJSON(e.licensor)),void 0!==e.version&&"0"!==e.version&&(t.version=e.version),void 0!==e.feedGid&&""!==e.feedGid&&(t.feedGid=e.feedGid),void 0!==e.deliveryId&&""!==e.deliveryId&&(t.deliveryId=e.deliveryId),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>b.toJSON(e)))),void 0!==e.indexVersion&&"0"!==e.indexVersion&&(t.indexVersion=e.indexVersion),e.segmentBlockGid?.length&&(t.segmentBlockGid=e.segmentBlockGid.map((e=>le(e)))),void 0!==e.courtesyLine&&""!==e.courtesyLine&&(t.courtesyLine=e.courtesyLine),e.title?.length&&(t.title=e.title.map((e=>O.toJSON(e)))),void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&(t.isMetadataHidden=e.isMetadataHidden),void 0!==e.canonicalUri&&""!==e.canonicalUri&&(t.canonicalUri=e.canonicalUri),e.artistWithRole?.length&&(t.artistWithRole=e.artistWithRole.map((e=>P.toJSON(e)))),void 0!==e.prereleaseConfig&&(t.prereleaseConfig=re.toJSON(e.prereleaseConfig)),e.labelId?.length&&(t.labelId=e.labelId.map((e=>Q.toJSON(e)))),void 0!==e.implementationDetails&&(t.implementationDetails=I.toJSON(e.implementationDetails)),e.releaseAdmin?.length&&(t.releaseAdmin=e.releaseAdmin.map((e=>ae.toJSON(e)))),t},create:e=>T.fromPartial(e??{}),fromPartial(e){const t=C();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.artist=e.artist?.map((e=>A.fromPartial(e)))||[],t.type=e.type??1,t.label=e.label??"",t.date=void 0!==e.date&&null!==e.date?F.fromPartial(e.date):void 0,t.popularity=e.popularity??0,t.genre=e.genre?.map((e=>e))||[],t.cover=e.cover?.map((e=>G.fromPartial(e)))||[],t.externalId=e.externalId?.map((e=>Z.fromPartial(e)))||[],t.disc=e.disc?.map((e=>z.fromPartial(e)))||[],t.review=e.review?.map((e=>e))||[],t.copyright=e.copyright?.map((e=>K.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Y.fromPartial(e)))||[],t.related=e.related?.map((e=>T.fromPartial(e)))||[],t.salePeriod=e.salePeriod?.map((e=>$.fromPartial(e)))||[],t.coverGroup=void 0!==e.coverGroup&&null!==e.coverGroup?H.fromPartial(e.coverGroup):void 0,t.originalTitle=e.originalTitle??"",t.versionTitle=e.versionTitle??"",t.typeStr=e.typeStr??"",t.visibilityBlock=e.visibilityBlock?.map((e=>ne.fromPartial(e)))||[],t.earliestLiveTimestamp=e.earliestLiveTimestamp??"0",t.availability=e.availability?.map((e=>q.fromPartial(e)))||[],t.windowedTrack=e.windowedTrack?.map((e=>N.fromPartial(e)))||[],t.licensor=void 0!==e.licensor&&null!==e.licensor?D.fromPartial(e.licensor):void 0,t.version=e.version??"0",t.feedGid=e.feedGid??"",t.deliveryId=e.deliveryId??"",t.localizedName=e.localizedName?.map((e=>b.fromPartial(e)))||[],t.indexVersion=e.indexVersion??"0",t.segmentBlockGid=e.segmentBlockGid?.map((e=>e))||[],t.courtesyLine=e.courtesyLine??"",t.title=e.title?.map((e=>O.fromPartial(e)))||[],t.isMetadataHidden=e.isMetadataHidden??!1,t.canonicalUri=e.canonicalUri??"",t.artistWithRole=e.artistWithRole?.map((e=>P.fromPartial(e)))||[],t.prereleaseConfig=void 0!==e.prereleaseConfig&&null!==e.prereleaseConfig?re.fromPartial(e.prereleaseConfig):void 0,t.labelId=e.labelId?.map((e=>Q.fromPartial(e)))||[],t.implementationDetails=void 0!==e.implementationDetails&&null!==e.implementationDetails?I.fromPartial(e.implementationDetails):void 0,t.releaseAdmin=e.releaseAdmin?.map((e=>ae.fromPartial(e)))||[],t}};const I={encode:(e,t=s().Writer.create())=>(void 0!==e.mediaType&&""!==e.mediaType&&t.uint32(10).string(e.mediaType),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={mediaType:""};for(;n.pos>>3){case 1:if(10!==e)break;r.mediaType=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({mediaType:ue(e.mediaType)?globalThis.String(e.mediaType):""}),toJSON(e){const t={};return void 0!==e.mediaType&&""!==e.mediaType&&(t.mediaType=e.mediaType),t},create:e=>I.fromPartial(e??{}),fromPartial(e){const t={mediaType:""};return t.mediaType=e.mediaType??"",t}};const O={encode:(e,t=s().Writer.create())=>(void 0!==e.language&&""!==e.language&&t.uint32(10).string(e.language),void 0!==e.isDefault&&!1!==e.isDefault&&t.uint32(16).bool(e.isDefault),void 0!==e.displayText&&""!==e.displayText&&t.uint32(26).string(e.displayText),void 0!==e.title&&""!==e.title&&t.uint32(34).string(e.title),void 0!==e.subtitle&&""!==e.subtitle&&t.uint32(42).string(e.subtitle),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={language:"",isDefault:!1,displayText:"",title:"",subtitle:""};for(;n.pos>>3){case 1:if(10!==e)break;r.language=n.string();continue;case 2:if(16!==e)break;r.isDefault=n.bool();continue;case 3:if(26!==e)break;r.displayText=n.string();continue;case 4:if(34!==e)break;r.title=n.string();continue;case 5:if(42!==e)break;r.subtitle=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({language:ue(e.language)?globalThis.String(e.language):"",isDefault:!!ue(e.isDefault)&&globalThis.Boolean(e.isDefault),displayText:ue(e.displayText)?globalThis.String(e.displayText):"",title:ue(e.title)?globalThis.String(e.title):"",subtitle:ue(e.subtitle)?globalThis.String(e.subtitle):""}),toJSON(e){const t={};return void 0!==e.language&&""!==e.language&&(t.language=e.language),void 0!==e.isDefault&&!1!==e.isDefault&&(t.isDefault=e.isDefault),void 0!==e.displayText&&""!==e.displayText&&(t.displayText=e.displayText),void 0!==e.title&&""!==e.title&&(t.title=e.title),void 0!==e.subtitle&&""!==e.subtitle&&(t.subtitle=e.subtitle),t},create:e=>O.fromPartial(e??{}),fromPartial(e){const t={language:"",isDefault:!1,displayText:"",title:"",subtitle:""};return t.language=e.language??"",t.isDefault=e.isDefault??!1,t.displayText=e.displayText??"",t.title=e.title??"",t.subtitle=e.subtitle??"",t}};function w(){return{gid:new Uint8Array(0),name:"",album:void 0,artist:[],number:0,discNumber:0,duration:0,popularity:0,explicit:!1,externalId:[],restriction:[],file:[],alternative:[],salePeriod:[],preview:[],tags:[],earliestLiveTimestamp:"0",hasLyrics:!1,availability:[],lyricsCountry:[],licensor:void 0,languageOfPerformance:[],localizedName:[],originalAudio:void 0,contentRating:[],indexVersion:"0",originalTitle:"",versionTitle:"",segmentBlockGid:[],artistWithRole:[],title:[],isMetadataHidden:!1,visibilityBlock:[],canonicalUri:"",prereleaseConfig:void 0,originalVideo:[]}}const N={encode(e,t=s().Writer.create()){void 0!==e.gid&&0!==e.gid.length&&t.uint32(10).bytes(e.gid),void 0!==e.name&&""!==e.name&&t.uint32(18).string(e.name),void 0!==e.album&&T.encode(e.album,t.uint32(26).fork()).ldelim();for(const n of e.artist)A.encode(n,t.uint32(34).fork()).ldelim();void 0!==e.number&&0!==e.number&&t.uint32(40).sint32(e.number),void 0!==e.discNumber&&0!==e.discNumber&&t.uint32(48).sint32(e.discNumber),void 0!==e.duration&&0!==e.duration&&t.uint32(56).sint32(e.duration),void 0!==e.popularity&&0!==e.popularity&&t.uint32(64).sint32(e.popularity),void 0!==e.explicit&&!1!==e.explicit&&t.uint32(72).bool(e.explicit);for(const n of e.externalId)Z.encode(n,t.uint32(82).fork()).ldelim();for(const n of e.restriction)Y.encode(n,t.uint32(90).fork()).ldelim();for(const n of e.file)X.encode(n,t.uint32(98).fork()).ldelim();for(const n of e.alternative)N.encode(n,t.uint32(106).fork()).ldelim();for(const n of e.salePeriod)$.encode(n,t.uint32(114).fork()).ldelim();for(const n of e.preview)X.encode(n,t.uint32(122).fork()).ldelim();for(const n of e.tags)t.uint32(130).string(n);void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&t.uint32(136).int64(e.earliestLiveTimestamp),void 0!==e.hasLyrics&&!1!==e.hasLyrics&&t.uint32(144).bool(e.hasLyrics);for(const n of e.availability)q.encode(n,t.uint32(154).fork()).ldelim();for(const n of e.lyricsCountry)t.uint32(162).string(n);void 0!==e.licensor&&D.encode(e.licensor,t.uint32(170).fork()).ldelim();for(const n of e.languageOfPerformance)t.uint32(178).string(n);for(const n of e.localizedName)b.encode(n,t.uint32(186).fork()).ldelim();void 0!==e.originalAudio&&x.encode(e.originalAudio,t.uint32(194).fork()).ldelim();for(const n of e.contentRating)ie.encode(n,t.uint32(202).fork()).ldelim();void 0!==e.indexVersion&&"0"!==e.indexVersion&&t.uint32(208).int64(e.indexVersion),void 0!==e.originalTitle&&""!==e.originalTitle&&t.uint32(218).string(e.originalTitle),void 0!==e.versionTitle&&""!==e.versionTitle&&t.uint32(226).string(e.versionTitle);for(const n of e.segmentBlockGid)t.uint32(250).bytes(n);for(const n of e.artistWithRole)P.encode(n,t.uint32(258).fork()).ldelim();for(const n of e.title)O.encode(n,t.uint32(266).fork()).ldelim();void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&t.uint32(272).bool(e.isMetadataHidden);for(const n of e.visibilityBlock)ne.encode(n,t.uint32(282).fork()).ldelim();void 0!==e.canonicalUri&&""!==e.canonicalUri&&t.uint32(290).string(e.canonicalUri),void 0!==e.prereleaseConfig&&se.encode(e.prereleaseConfig,t.uint32(298).fork()).ldelim();for(const n of e.originalVideo)te.encode(n,t.uint32(306).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=w();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 3:if(26!==e)break;r.album=T.decode(n,n.uint32());continue;case 4:if(34!==e)break;r.artist.push(A.decode(n,n.uint32()));continue;case 5:if(40!==e)break;r.number=n.sint32();continue;case 6:if(48!==e)break;r.discNumber=n.sint32();continue;case 7:if(56!==e)break;r.duration=n.sint32();continue;case 8:if(64!==e)break;r.popularity=n.sint32();continue;case 9:if(72!==e)break;r.explicit=n.bool();continue;case 10:if(82!==e)break;r.externalId.push(Z.decode(n,n.uint32()));continue;case 11:if(90!==e)break;r.restriction.push(Y.decode(n,n.uint32()));continue;case 12:if(98!==e)break;r.file.push(X.decode(n,n.uint32()));continue;case 13:if(106!==e)break;r.alternative.push(N.decode(n,n.uint32()));continue;case 14:if(114!==e)break;r.salePeriod.push($.decode(n,n.uint32()));continue;case 15:if(122!==e)break;r.preview.push(X.decode(n,n.uint32()));continue;case 16:if(130!==e)break;r.tags.push(n.string());continue;case 17:if(136!==e)break;r.earliestLiveTimestamp=ce(n.int64());continue;case 18:if(144!==e)break;r.hasLyrics=n.bool();continue;case 19:if(154!==e)break;r.availability.push(q.decode(n,n.uint32()));continue;case 20:if(162!==e)break;r.lyricsCountry.push(n.string());continue;case 21:if(170!==e)break;r.licensor=D.decode(n,n.uint32());continue;case 22:if(178!==e)break;r.languageOfPerformance.push(n.string());continue;case 23:if(186!==e)break;r.localizedName.push(b.decode(n,n.uint32()));continue;case 24:if(194!==e)break;r.originalAudio=x.decode(n,n.uint32());continue;case 25:if(202!==e)break;r.contentRating.push(ie.decode(n,n.uint32()));continue;case 26:if(208!==e)break;r.indexVersion=ce(n.int64());continue;case 27:if(218!==e)break;r.originalTitle=n.string();continue;case 28:if(226!==e)break;r.versionTitle=n.string();continue;case 31:if(250!==e)break;r.segmentBlockGid.push(n.bytes());continue;case 32:if(258!==e)break;r.artistWithRole.push(P.decode(n,n.uint32()));continue;case 33:if(266!==e)break;r.title.push(O.decode(n,n.uint32()));continue;case 34:if(272!==e)break;r.isMetadataHidden=n.bool();continue;case 35:if(282!==e)break;r.visibilityBlock.push(ne.decode(n,n.uint32()));continue;case 36:if(290!==e)break;r.canonicalUri=n.string();continue;case 37:if(298!==e)break;r.prereleaseConfig=se.decode(n,n.uint32());continue;case 38:if(306!==e)break;r.originalVideo.push(te.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({gid:ue(e.gid)?oe(e.gid):new Uint8Array(0),name:ue(e.name)?globalThis.String(e.name):"",album:ue(e.album)?T.fromJSON(e.album):void 0,artist:globalThis.Array.isArray(e?.artist)?e.artist.map((e=>A.fromJSON(e))):[],number:ue(e.number)?globalThis.Number(e.number):0,discNumber:ue(e.discNumber)?globalThis.Number(e.discNumber):0,duration:ue(e.duration)?globalThis.Number(e.duration):0,popularity:ue(e.popularity)?globalThis.Number(e.popularity):0,explicit:!!ue(e.explicit)&&globalThis.Boolean(e.explicit),externalId:globalThis.Array.isArray(e?.externalId)?e.externalId.map((e=>Z.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Y.fromJSON(e))):[],file:globalThis.Array.isArray(e?.file)?e.file.map((e=>X.fromJSON(e))):[],alternative:globalThis.Array.isArray(e?.alternative)?e.alternative.map((e=>N.fromJSON(e))):[],salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>$.fromJSON(e))):[],preview:globalThis.Array.isArray(e?.preview)?e.preview.map((e=>X.fromJSON(e))):[],tags:globalThis.Array.isArray(e?.tags)?e.tags.map((e=>globalThis.String(e))):[],earliestLiveTimestamp:ue(e.earliestLiveTimestamp)?globalThis.String(e.earliestLiveTimestamp):"0",hasLyrics:!!ue(e.hasLyrics)&&globalThis.Boolean(e.hasLyrics),availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>q.fromJSON(e))):[],lyricsCountry:globalThis.Array.isArray(e?.lyricsCountry)?e.lyricsCountry.map((e=>globalThis.String(e))):[],licensor:ue(e.licensor)?D.fromJSON(e.licensor):void 0,languageOfPerformance:globalThis.Array.isArray(e?.languageOfPerformance)?e.languageOfPerformance.map((e=>globalThis.String(e))):[],localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>b.fromJSON(e))):[],originalAudio:ue(e.originalAudio)?x.fromJSON(e.originalAudio):void 0,contentRating:globalThis.Array.isArray(e?.contentRating)?e.contentRating.map((e=>ie.fromJSON(e))):[],indexVersion:ue(e.indexVersion)?globalThis.String(e.indexVersion):"0",originalTitle:ue(e.originalTitle)?globalThis.String(e.originalTitle):"",versionTitle:ue(e.versionTitle)?globalThis.String(e.versionTitle):"",segmentBlockGid:globalThis.Array.isArray(e?.segmentBlockGid)?e.segmentBlockGid.map((e=>oe(e))):[],artistWithRole:globalThis.Array.isArray(e?.artistWithRole)?e.artistWithRole.map((e=>P.fromJSON(e))):[],title:globalThis.Array.isArray(e?.title)?e.title.map((e=>O.fromJSON(e))):[],isMetadataHidden:!!ue(e.isMetadataHidden)&&globalThis.Boolean(e.isMetadataHidden),visibilityBlock:globalThis.Array.isArray(e?.visibilityBlock)?e.visibilityBlock.map((e=>ne.fromJSON(e))):[],canonicalUri:ue(e.canonicalUri)?globalThis.String(e.canonicalUri):"",prereleaseConfig:ue(e.prereleaseConfig)?se.fromJSON(e.prereleaseConfig):void 0,originalVideo:globalThis.Array.isArray(e?.originalVideo)?e.originalVideo.map((e=>te.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=le(e.gid)),void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.album&&(t.album=T.toJSON(e.album)),e.artist?.length&&(t.artist=e.artist.map((e=>A.toJSON(e)))),void 0!==e.number&&0!==e.number&&(t.number=Math.round(e.number)),void 0!==e.discNumber&&0!==e.discNumber&&(t.discNumber=Math.round(e.discNumber)),void 0!==e.duration&&0!==e.duration&&(t.duration=Math.round(e.duration)),void 0!==e.popularity&&0!==e.popularity&&(t.popularity=Math.round(e.popularity)),void 0!==e.explicit&&!1!==e.explicit&&(t.explicit=e.explicit),e.externalId?.length&&(t.externalId=e.externalId.map((e=>Z.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Y.toJSON(e)))),e.file?.length&&(t.file=e.file.map((e=>X.toJSON(e)))),e.alternative?.length&&(t.alternative=e.alternative.map((e=>N.toJSON(e)))),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>$.toJSON(e)))),e.preview?.length&&(t.preview=e.preview.map((e=>X.toJSON(e)))),e.tags?.length&&(t.tags=e.tags),void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&(t.earliestLiveTimestamp=e.earliestLiveTimestamp),void 0!==e.hasLyrics&&!1!==e.hasLyrics&&(t.hasLyrics=e.hasLyrics),e.availability?.length&&(t.availability=e.availability.map((e=>q.toJSON(e)))),e.lyricsCountry?.length&&(t.lyricsCountry=e.lyricsCountry),void 0!==e.licensor&&(t.licensor=D.toJSON(e.licensor)),e.languageOfPerformance?.length&&(t.languageOfPerformance=e.languageOfPerformance),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>b.toJSON(e)))),void 0!==e.originalAudio&&(t.originalAudio=x.toJSON(e.originalAudio)),e.contentRating?.length&&(t.contentRating=e.contentRating.map((e=>ie.toJSON(e)))),void 0!==e.indexVersion&&"0"!==e.indexVersion&&(t.indexVersion=e.indexVersion),void 0!==e.originalTitle&&""!==e.originalTitle&&(t.originalTitle=e.originalTitle),void 0!==e.versionTitle&&""!==e.versionTitle&&(t.versionTitle=e.versionTitle),e.segmentBlockGid?.length&&(t.segmentBlockGid=e.segmentBlockGid.map((e=>le(e)))),e.artistWithRole?.length&&(t.artistWithRole=e.artistWithRole.map((e=>P.toJSON(e)))),e.title?.length&&(t.title=e.title.map((e=>O.toJSON(e)))),void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&(t.isMetadataHidden=e.isMetadataHidden),e.visibilityBlock?.length&&(t.visibilityBlock=e.visibilityBlock.map((e=>ne.toJSON(e)))),void 0!==e.canonicalUri&&""!==e.canonicalUri&&(t.canonicalUri=e.canonicalUri),void 0!==e.prereleaseConfig&&(t.prereleaseConfig=se.toJSON(e.prereleaseConfig)),e.originalVideo?.length&&(t.originalVideo=e.originalVideo.map((e=>te.toJSON(e)))),t},create:e=>N.fromPartial(e??{}),fromPartial(e){const t=w();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.album=void 0!==e.album&&null!==e.album?T.fromPartial(e.album):void 0,t.artist=e.artist?.map((e=>A.fromPartial(e)))||[],t.number=e.number??0,t.discNumber=e.discNumber??0,t.duration=e.duration??0,t.popularity=e.popularity??0,t.explicit=e.explicit??!1,t.externalId=e.externalId?.map((e=>Z.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Y.fromPartial(e)))||[],t.file=e.file?.map((e=>X.fromPartial(e)))||[],t.alternative=e.alternative?.map((e=>N.fromPartial(e)))||[],t.salePeriod=e.salePeriod?.map((e=>$.fromPartial(e)))||[],t.preview=e.preview?.map((e=>X.fromPartial(e)))||[],t.tags=e.tags?.map((e=>e))||[],t.earliestLiveTimestamp=e.earliestLiveTimestamp??"0",t.hasLyrics=e.hasLyrics??!1,t.availability=e.availability?.map((e=>q.fromPartial(e)))||[],t.lyricsCountry=e.lyricsCountry?.map((e=>e))||[],t.licensor=void 0!==e.licensor&&null!==e.licensor?D.fromPartial(e.licensor):void 0,t.languageOfPerformance=e.languageOfPerformance?.map((e=>e))||[],t.localizedName=e.localizedName?.map((e=>b.fromPartial(e)))||[],t.originalAudio=void 0!==e.originalAudio&&null!==e.originalAudio?x.fromPartial(e.originalAudio):void 0,t.contentRating=e.contentRating?.map((e=>ie.fromPartial(e)))||[],t.indexVersion=e.indexVersion??"0",t.originalTitle=e.originalTitle??"",t.versionTitle=e.versionTitle??"",t.segmentBlockGid=e.segmentBlockGid?.map((e=>e))||[],t.artistWithRole=e.artistWithRole?.map((e=>P.fromPartial(e)))||[],t.title=e.title?.map((e=>O.fromPartial(e)))||[],t.isMetadataHidden=e.isMetadataHidden??!1,t.visibilityBlock=e.visibilityBlock?.map((e=>ne.fromPartial(e)))||[],t.canonicalUri=e.canonicalUri??"",t.prereleaseConfig=void 0!==e.prereleaseConfig&&null!==e.prereleaseConfig?se.fromPartial(e.prereleaseConfig):void 0,t.originalVideo=e.originalVideo?.map((e=>te.fromPartial(e)))||[],t}};function R(){return{artistGid:new Uint8Array(0),artistName:"",role:0,localizedName:[]}}const P={encode(e,t=s().Writer.create()){void 0!==e.artistGid&&0!==e.artistGid.length&&t.uint32(10).bytes(e.artistGid),void 0!==e.artistName&&""!==e.artistName&&t.uint32(18).string(e.artistName),void 0!==e.role&&0!==e.role&&t.uint32(24).int32(e.role);for(const n of e.localizedName)b.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=R();for(;n.pos>>3){case 1:if(10!==e)break;r.artistGid=n.bytes();continue;case 2:if(18!==e)break;r.artistName=n.string();continue;case 3:if(24!==e)break;r.role=n.int32();continue;case 4:if(34!==e)break;r.localizedName.push(b.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({artistGid:ue(e.artistGid)?oe(e.artistGid):new Uint8Array(0),artistName:ue(e.artistName)?globalThis.String(e.artistName):"",role:ue(e.role)?c(e.role):0,localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>b.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.artistGid&&0!==e.artistGid.length&&(t.artistGid=le(e.artistGid)),void 0!==e.artistName&&""!==e.artistName&&(t.artistName=e.artistName),void 0!==e.role&&0!==e.role&&(t.role=function(e){switch(e){case l.ARTIST_ROLE_UNKNOWN:return"ARTIST_ROLE_UNKNOWN";case l.ARTIST_ROLE_MAIN_ARTIST:return"ARTIST_ROLE_MAIN_ARTIST";case l.ARTIST_ROLE_FEATURED_ARTIST:return"ARTIST_ROLE_FEATURED_ARTIST";case l.ARTIST_ROLE_REMIXER:return"ARTIST_ROLE_REMIXER";case l.ARTIST_ROLE_ACTOR:return"ARTIST_ROLE_ACTOR";case l.ARTIST_ROLE_COMPOSER:return"ARTIST_ROLE_COMPOSER";case l.ARTIST_ROLE_CONDUCTOR:return"ARTIST_ROLE_CONDUCTOR";case l.ARTIST_ROLE_ORCHESTRA:return"ARTIST_ROLE_ORCHESTRA";case l.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.role)),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>b.toJSON(e)))),t},create:e=>P.fromPartial(e??{}),fromPartial(e){const t=R();return t.artistGid=e.artistGid??new Uint8Array(0),t.artistName=e.artistName??"",t.role=e.role??0,t.localizedName=e.localizedName?.map((e=>b.fromPartial(e)))||[],t}};function L(){return{uuid:new Uint8Array(0)}}const D={encode:(e,t=s().Writer.create())=>(void 0!==e.uuid&&0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=L();for(;n.pos>>3){case 1:if(10!==e)break;r.uuid=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uuid:ue(e.uuid)?oe(e.uuid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.uuid&&0!==e.uuid.length&&(t.uuid=le(e.uuid)),t},create:e=>D.fromPartial(e??{}),fromPartial(e){const t=L();return t.uuid=e.uuid??new Uint8Array(0),t}};function k(){return{uuid:new Uint8Array(0)}}const x={encode:(e,t=s().Writer.create())=>(void 0!==e.uuid&&0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=k();for(;n.pos>>3){case 1:if(10!==e)break;r.uuid=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({uuid:ue(e.uuid)?oe(e.uuid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.uuid&&0!==e.uuid.length&&(t.uuid=le(e.uuid)),t},create:e=>x.fromPartial(e??{}),fromPartial(e){const t=k();return t.uuid=e.uuid??new Uint8Array(0),t}};const U={encode(e,t=s().Writer.create()){void 0!==e.country&&""!==e.country&&t.uint32(10).string(e.country);for(const n of e.track)N.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={country:"",track:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.country=n.string();continue;case 2:if(18!==e)break;r.track.push(N.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({country:ue(e.country)?globalThis.String(e.country):"",track:globalThis.Array.isArray(e?.track)?e.track.map((e=>N.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.country&&""!==e.country&&(t.country=e.country),e.track?.length&&(t.track=e.track.map((e=>N.toJSON(e)))),t},create:e=>U.fromPartial(e??{}),fromPartial(e){const t={country:"",track:[]};return t.country=e.country??"",t.track=e.track?.map((e=>N.fromPartial(e)))||[],t}};const M={encode(e,t=s().Writer.create()){for(const n of e.country)t.uint32(10).string(n);for(const n of e.track)N.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={country:[],track:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.country.push(n.string());continue;case 2:if(18!==e)break;r.track.push(N.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({country:globalThis.Array.isArray(e?.country)?e.country.map((e=>globalThis.String(e))):[],track:globalThis.Array.isArray(e?.track)?e.track.map((e=>N.fromJSON(e))):[]}),toJSON(e){const t={};return e.country?.length&&(t.country=e.country),e.track?.length&&(t.track=e.track.map((e=>N.toJSON(e)))),t},create:e=>M.fromPartial(e??{}),fromPartial(e){const t={country:[],track:[]};return t.country=e.country?.map((e=>e))||[],t.track=e.track?.map((e=>N.fromPartial(e)))||[],t}};const B={encode:(e,t=s().Writer.create())=>(void 0!==e.startYear&&0!==e.startYear&&t.uint32(8).sint32(e.startYear),void 0!==e.endYear&&0!==e.endYear&&t.uint32(16).sint32(e.endYear),void 0!==e.decade&&0!==e.decade&&t.uint32(24).sint32(e.decade),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={startYear:0,endYear:0,decade:0};for(;n.pos>>3){case 1:if(8!==e)break;r.startYear=n.sint32();continue;case 2:if(16!==e)break;r.endYear=n.sint32();continue;case 3:if(24!==e)break;r.decade=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({startYear:ue(e.startYear)?globalThis.Number(e.startYear):0,endYear:ue(e.endYear)?globalThis.Number(e.endYear):0,decade:ue(e.decade)?globalThis.Number(e.decade):0}),toJSON(e){const t={};return void 0!==e.startYear&&0!==e.startYear&&(t.startYear=Math.round(e.startYear)),void 0!==e.endYear&&0!==e.endYear&&(t.endYear=Math.round(e.endYear)),void 0!==e.decade&&0!==e.decade&&(t.decade=Math.round(e.decade)),t},create:e=>B.fromPartial(e??{}),fromPartial(e){const t={startYear:0,endYear:0,decade:0};return t.startYear=e.startYear??0,t.endYear=e.endYear??0,t.decade=e.decade??0,t}};const j={encode(e,t=s().Writer.create()){for(const n of e.album)T.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={album:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.album.push(T.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({album:globalThis.Array.isArray(e?.album)?e.album.map((e=>T.fromJSON(e))):[]}),toJSON(e){const t={};return e.album?.length&&(t.album=e.album.map((e=>T.toJSON(e)))),t},create:e=>j.fromPartial(e??{}),fromPartial(e){const t={album:[]};return t.album=e.album?.map((e=>T.fromPartial(e)))||[],t}};const F={encode:(e,t=s().Writer.create())=>(void 0!==e.year&&0!==e.year&&t.uint32(8).sint32(e.year),void 0!==e.month&&0!==e.month&&t.uint32(16).sint32(e.month),void 0!==e.day&&0!==e.day&&t.uint32(24).sint32(e.day),void 0!==e.hour&&0!==e.hour&&t.uint32(32).sint32(e.hour),void 0!==e.minute&&0!==e.minute&&t.uint32(40).sint32(e.minute),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={year:0,month:0,day:0,hour:0,minute:0};for(;n.pos>>3){case 1:if(8!==e)break;r.year=n.sint32();continue;case 2:if(16!==e)break;r.month=n.sint32();continue;case 3:if(24!==e)break;r.day=n.sint32();continue;case 4:if(32!==e)break;r.hour=n.sint32();continue;case 5:if(40!==e)break;r.minute=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({year:ue(e.year)?globalThis.Number(e.year):0,month:ue(e.month)?globalThis.Number(e.month):0,day:ue(e.day)?globalThis.Number(e.day):0,hour:ue(e.hour)?globalThis.Number(e.hour):0,minute:ue(e.minute)?globalThis.Number(e.minute):0}),toJSON(e){const t={};return void 0!==e.year&&0!==e.year&&(t.year=Math.round(e.year)),void 0!==e.month&&0!==e.month&&(t.month=Math.round(e.month)),void 0!==e.day&&0!==e.day&&(t.day=Math.round(e.day)),void 0!==e.hour&&0!==e.hour&&(t.hour=Math.round(e.hour)),void 0!==e.minute&&0!==e.minute&&(t.minute=Math.round(e.minute)),t},create:e=>F.fromPartial(e??{}),fromPartial(e){const t={year:0,month:0,day:0,hour:0,minute:0};return t.year=e.year??0,t.month=e.month??0,t.day=e.day??0,t.hour=e.hour??0,t.minute=e.minute??0,t}};function V(){return{fileId:new Uint8Array(0),size:0,width:0,height:0}}const G={encode:(e,t=s().Writer.create())=>(void 0!==e.fileId&&0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),void 0!==e.size&&0!==e.size&&t.uint32(16).int32(e.size),void 0!==e.width&&0!==e.width&&t.uint32(24).sint32(e.width),void 0!==e.height&&0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=V();for(;n.pos>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.size=n.int32();continue;case 3:if(24!==e)break;r.width=n.sint32();continue;case 4:if(32!==e)break;r.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({fileId:ue(e.fileId)?oe(e.fileId):new Uint8Array(0),size:ue(e.size)?d(e.size):0,width:ue(e.width)?globalThis.Number(e.width):0,height:ue(e.height)?globalThis.Number(e.height):0}),toJSON(e){const t={};return void 0!==e.fileId&&0!==e.fileId.length&&(t.fileId=le(e.fileId)),void 0!==e.size&&0!==e.size&&(t.size=function(e){switch(e){case u.DEFAULT:return"DEFAULT";case u.SMALL:return"SMALL";case u.LARGE:return"LARGE";case u.XLARGE:return"XLARGE";case u.XXLARGE:return"XXLARGE";case u.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.size)),void 0!==e.width&&0!==e.width&&(t.width=Math.round(e.width)),void 0!==e.height&&0!==e.height&&(t.height=Math.round(e.height)),t},create:e=>G.fromPartial(e??{}),fromPartial(e){const t=V();return t.fileId=e.fileId??new Uint8Array(0),t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const H={encode(e,t=s().Writer.create()){for(const n of e.image)G.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={image:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.image.push(G.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({image:globalThis.Array.isArray(e?.image)?e.image.map((e=>G.fromJSON(e))):[]}),toJSON(e){const t={};return e.image?.length&&(t.image=e.image.map((e=>G.toJSON(e)))),t},create:e=>H.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>G.fromPartial(e)))||[],t}};const W={encode(e,t=s().Writer.create()){void 0!==e.text&&""!==e.text&&t.uint32(10).string(e.text);for(const n of e.portrait)G.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.portraitGroup)H.encode(n,t.uint32(26).fork()).ldelim();for(const n of e.localizedText)b.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={text:"",portrait:[],portraitGroup:[],localizedText:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.text=n.string();continue;case 2:if(18!==e)break;r.portrait.push(G.decode(n,n.uint32()));continue;case 3:if(26!==e)break;r.portraitGroup.push(H.decode(n,n.uint32()));continue;case 4:if(34!==e)break;r.localizedText.push(b.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({text:ue(e.text)?globalThis.String(e.text):"",portrait:globalThis.Array.isArray(e?.portrait)?e.portrait.map((e=>G.fromJSON(e))):[],portraitGroup:globalThis.Array.isArray(e?.portraitGroup)?e.portraitGroup.map((e=>H.fromJSON(e))):[],localizedText:globalThis.Array.isArray(e?.localizedText)?e.localizedText.map((e=>b.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.text&&""!==e.text&&(t.text=e.text),e.portrait?.length&&(t.portrait=e.portrait.map((e=>G.toJSON(e)))),e.portraitGroup?.length&&(t.portraitGroup=e.portraitGroup.map((e=>H.toJSON(e)))),e.localizedText?.length&&(t.localizedText=e.localizedText.map((e=>b.toJSON(e)))),t},create:e=>W.fromPartial(e??{}),fromPartial(e){const t={text:"",portrait:[],portraitGroup:[],localizedText:[]};return t.text=e.text??"",t.portrait=e.portrait?.map((e=>G.fromPartial(e)))||[],t.portraitGroup=e.portraitGroup?.map((e=>H.fromPartial(e)))||[],t.localizedText=e.localizedText?.map((e=>b.fromPartial(e)))||[],t}};const z={encode(e,t=s().Writer.create()){void 0!==e.number&&0!==e.number&&t.uint32(8).sint32(e.number),void 0!==e.name&&""!==e.name&&t.uint32(18).string(e.name);for(const n of e.track)N.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={number:0,name:"",track:[]};for(;n.pos>>3){case 1:if(8!==e)break;r.number=n.sint32();continue;case 2:if(18!==e)break;r.name=n.string();continue;case 3:if(26!==e)break;r.track.push(N.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({number:ue(e.number)?globalThis.Number(e.number):0,name:ue(e.name)?globalThis.String(e.name):"",track:globalThis.Array.isArray(e?.track)?e.track.map((e=>N.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.number&&0!==e.number&&(t.number=Math.round(e.number)),void 0!==e.name&&""!==e.name&&(t.name=e.name),e.track?.length&&(t.track=e.track.map((e=>N.toJSON(e)))),t},create:e=>z.fromPartial(e??{}),fromPartial(e){const t={number:0,name:"",track:[]};return t.number=e.number??0,t.name=e.name??"",t.track=e.track?.map((e=>N.fromPartial(e)))||[],t}};const K={encode:(e,t=s().Writer.create())=>(void 0!==e.type&&0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.text&&""!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:0,text:""};for(;n.pos>>3){case 1:if(8!==e)break;r.type=n.int32();continue;case 2:if(18!==e)break;r.text=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({type:ue(e.type)?m(e.type):0,text:ue(e.text)?globalThis.String(e.text):""}),toJSON(e){const t={};return void 0!==e.type&&0!==e.type&&(t.type=function(e){switch(e){case p.P:return"P";case p.C:return"C";case p.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.text&&""!==e.text&&(t.text=e.text),t},create:e=>K.fromPartial(e??{}),fromPartial(e){const t={type:0,text:""};return t.type=e.type??0,t.text=e.text??"",t}};const Y={encode(e,t=s().Writer.create()){t.uint32(10).fork();for(const n of e.catalogue)t.int32(n);t.ldelim(),void 0!==e.countriesAllowed&&t.uint32(18).string(e.countriesAllowed),void 0!==e.countriesForbidden&&t.uint32(26).string(e.countriesForbidden),void 0!==e.type&&0!==e.type&&t.uint32(32).int32(e.type);for(const n of e.catalogueStr)t.uint32(42).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};for(;n.pos>>3){case 1:if(8===e){r.catalogue.push(n.int32());continue}if(10===e){const e=n.uint32()+n.pos;for(;n.pos({catalogue:globalThis.Array.isArray(e?.catalogue)?e.catalogue.map((e=>function(e){switch(e){case 0:case"AD":return h.AD;case 1:case"SUBSCRIPTION":return h.SUBSCRIPTION;case 2:case"CATALOGUE_ALL":return h.CATALOGUE_ALL;case 3:case"SHUFFLE":return h.SHUFFLE;case 4:case"COMMERCIAL":return h.COMMERCIAL;default:return h.UNRECOGNIZED}}(e))):[],countriesAllowed:ue(e.countriesAllowed)?globalThis.String(e.countriesAllowed):void 0,countriesForbidden:ue(e.countriesForbidden)?globalThis.String(e.countriesForbidden):void 0,type:ue(e.type)?g(e.type):0,catalogueStr:globalThis.Array.isArray(e?.catalogueStr)?e.catalogueStr.map((e=>globalThis.String(e))):[]}),toJSON(e){const t={};return e.catalogue?.length&&(t.catalogue=e.catalogue.map((e=>function(e){switch(e){case h.AD:return"AD";case h.SUBSCRIPTION:return"SUBSCRIPTION";case h.CATALOGUE_ALL:return"CATALOGUE_ALL";case h.SHUFFLE:return"SHUFFLE";case h.COMMERCIAL:return"COMMERCIAL";case h.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e)))),void 0!==e.countriesAllowed&&(t.countriesAllowed=e.countriesAllowed),void 0!==e.countriesForbidden&&(t.countriesForbidden=e.countriesForbidden),void 0!==e.type&&0!==e.type&&(t.type=function(e){switch(e){case f.STREAMING:return"STREAMING";case f.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),e.catalogueStr?.length&&(t.catalogueStr=e.catalogueStr),t},create:e=>Y.fromPartial(e??{}),fromPartial(e){const t={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};return t.catalogue=e.catalogue?.map((e=>e))||[],t.countriesAllowed=e.countriesAllowed??void 0,t.countriesForbidden=e.countriesForbidden??void 0,t.type=e.type??0,t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t}};const q={encode(e,t=s().Writer.create()){for(const n of e.catalogueStr)t.uint32(10).string(n);return void 0!==e.start&&F.encode(e.start,t.uint32(18).fork()).ldelim(),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={catalogueStr:[],start:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.catalogueStr.push(n.string());continue;case 2:if(18!==e)break;r.start=F.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({catalogueStr:globalThis.Array.isArray(e?.catalogueStr)?e.catalogueStr.map((e=>globalThis.String(e))):[],start:ue(e.start)?F.fromJSON(e.start):void 0}),toJSON(e){const t={};return e.catalogueStr?.length&&(t.catalogueStr=e.catalogueStr),void 0!==e.start&&(t.start=F.toJSON(e.start)),t},create:e=>q.fromPartial(e??{}),fromPartial(e){const t={catalogueStr:[],start:void 0};return t.catalogueStr=e.catalogueStr?.map((e=>e))||[],t.start=void 0!==e.start&&null!==e.start?F.fromPartial(e.start):void 0,t}};const $={encode(e,t=s().Writer.create()){for(const n of e.restriction)Y.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.start&&F.encode(e.start,t.uint32(18).fork()).ldelim(),void 0!==e.end&&F.encode(e.end,t.uint32(26).fork()).ldelim(),t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={restriction:[],start:void 0,end:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.restriction.push(Y.decode(n,n.uint32()));continue;case 2:if(18!==e)break;r.start=F.decode(n,n.uint32());continue;case 3:if(26!==e)break;r.end=F.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Y.fromJSON(e))):[],start:ue(e.start)?F.fromJSON(e.start):void 0,end:ue(e.end)?F.fromJSON(e.end):void 0}),toJSON(e){const t={};return e.restriction?.length&&(t.restriction=e.restriction.map((e=>Y.toJSON(e)))),void 0!==e.start&&(t.start=F.toJSON(e.start)),void 0!==e.end&&(t.end=F.toJSON(e.end)),t},create:e=>$.fromPartial(e??{}),fromPartial(e){const t={restriction:[],start:void 0,end:void 0};return t.restriction=e.restriction?.map((e=>Y.fromPartial(e)))||[],t.start=void 0!==e.start&&null!==e.start?F.fromPartial(e.start):void 0,t.end=void 0!==e.end&&null!==e.end?F.fromPartial(e.end):void 0,t}};const Z={encode:(e,t=s().Writer.create())=>(void 0!==e.type&&""!==e.type&&t.uint32(10).string(e.type),void 0!==e.id&&""!==e.id&&t.uint32(18).string(e.id),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:"",id:""};for(;n.pos>>3){case 1:if(10!==e)break;r.type=n.string();continue;case 2:if(18!==e)break;r.id=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({type:ue(e.type)?globalThis.String(e.type):"",id:ue(e.id)?globalThis.String(e.id):""}),toJSON(e){const t={};return void 0!==e.type&&""!==e.type&&(t.type=e.type),void 0!==e.id&&""!==e.id&&(t.id=e.id),t},create:e=>Z.fromPartial(e??{}),fromPartial(e){const t={type:"",id:""};return t.type=e.type??"",t.id=e.id??"",t}};const Q={encode:(e,t=s().Writer.create())=>(void 0!==e.type&&""!==e.type&&t.uint32(10).string(e.type),void 0!==e.value&&""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={type:"",value:""};for(;n.pos>>3){case 1:if(10!==e)break;r.type=n.string();continue;case 2:if(18!==e)break;r.value=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({type:ue(e.type)?globalThis.String(e.type):"",value:ue(e.value)?globalThis.String(e.value):""}),toJSON(e){const t={};return void 0!==e.type&&""!==e.type&&(t.type=e.type),void 0!==e.value&&""!==e.value&&(t.value=e.value),t},create:e=>Q.fromPartial(e??{}),fromPartial(e){const t={type:"",value:""};return t.type=e.type??"",t.value=e.value??"",t}};function J(){return{fileId:new Uint8Array(0),format:0}}const X={encode:(e,t=s().Writer.create())=>(void 0!==e.fileId&&0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),void 0!==e.format&&0!==e.format&&t.uint32(16).int32(e.format),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=J();for(;n.pos>>3){case 1:if(10!==e)break;r.fileId=n.bytes();continue;case 2:if(16!==e)break;r.format=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({fileId:ue(e.fileId)?oe(e.fileId):new Uint8Array(0),format:ue(e.format)?_(e.format):0}),toJSON(e){const t={};return void 0!==e.fileId&&0!==e.fileId.length&&(t.fileId=le(e.fileId)),void 0!==e.format&&0!==e.format&&(t.format=function(e){switch(e){case E.OGG_VORBIS_96:return"OGG_VORBIS_96";case E.OGG_VORBIS_160:return"OGG_VORBIS_160";case E.OGG_VORBIS_320:return"OGG_VORBIS_320";case E.MP3_256:return"MP3_256";case E.MP3_320:return"MP3_320";case E.MP3_160:return"MP3_160";case E.MP3_96:return"MP3_96";case E.MP3_160_ENC:return"MP3_160_ENC";case E.AAC_24:return"AAC_24";case E.AAC_48:return"AAC_48";case E.MP4_128:return"MP4_128";case E.MP4_256:return"MP4_256";case E.MP4_128_DUAL:return"MP4_128_DUAL";case E.MP4_256_DUAL:return"MP4_256_DUAL";case E.MP4_128_CBCS:return"MP4_128_CBCS";case E.MP4_256_CBCS:return"MP4_256_CBCS";case E.FLAC_FLAC:return"FLAC_FLAC";case E.MP4_FLAC:return"MP4_FLAC";case E.XHE_AAC_24:return"XHE_AAC_24";case E.XHE_AAC_16:return"XHE_AAC_16";case E.XHE_AAC_12:return"XHE_AAC_12";case E.HE_AAC_64:return"HE_AAC_64";case E.FLAC_FLAC_24BIT:return"FLAC_FLAC_24BIT";case E.MP4_FLAC_24BIT:return"MP4_FLAC_24BIT";case E.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.format)),t},create:e=>X.fromPartial(e??{}),fromPartial(e){const t=J();return t.fileId=e.fileId??new Uint8Array(0),t.format=e.format??0,t}};function ee(){return{gid:new Uint8Array(0)}}const te={encode:(e,t=s().Writer.create())=>(void 0!==e.gid&&0!==e.gid.length&&t.uint32(10).bytes(e.gid),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r=ee();for(;n.pos>>3){case 1:if(10!==e)break;r.gid=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({gid:ue(e.gid)?oe(e.gid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=le(e.gid)),t},create:e=>te.fromPartial(e??{}),fromPartial(e){const t=ee();return t.gid=e.gid??new Uint8Array(0),t}};const ne={encode:(e,t=s().Writer.create())=>(void 0!==e.countries&&""!==e.countries&&t.uint32(10).string(e.countries),void 0!==e.type&&0!==e.type&&t.uint32(16).int32(e.type),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={countries:"",type:0};for(;n.pos>>3){case 1:if(10!==e)break;r.countries=n.string();continue;case 2:if(16!==e)break;r.type=n.int32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({countries:ue(e.countries)?globalThis.String(e.countries):"",type:ue(e.type)?v(e.type):0}),toJSON(e){const t={};return void 0!==e.countries&&""!==e.countries&&(t.countries=e.countries),void 0!==e.type&&0!==e.type&&(t.type=function(e){switch(e){case y.TOTAL:return"TOTAL";case y.COVERARTCP:return"COVERARTCP";case y.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),t},create:e=>ne.fromPartial(e??{}),fromPartial(e){const t={countries:"",type:0};return t.countries=e.countries??"",t.type=e.type??0,t}};const ie={encode(e,t=s().Writer.create()){void 0!==e.country&&""!==e.country&&t.uint32(10).string(e.country);for(const n of e.tag)t.uint32(18).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={country:"",tag:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.country=n.string();continue;case 2:if(18!==e)break;r.tag.push(n.string());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({country:ue(e.country)?globalThis.String(e.country):"",tag:globalThis.Array.isArray(e?.tag)?e.tag.map((e=>globalThis.String(e))):[]}),toJSON(e){const t={};return void 0!==e.country&&""!==e.country&&(t.country=e.country),e.tag?.length&&(t.tag=e.tag),t},create:e=>ie.fromPartial(e??{}),fromPartial(e){const t={country:"",tag:[]};return t.country=e.country??"",t.tag=e.tag?.map((e=>e))||[],t}};const re={encode:(e,t=s().Writer.create())=>(void 0!==e.earliestRevealDate&&F.encode(e.earliestRevealDate,t.uint32(10).fork()).ldelim(),void 0!==e.earliestCoverartRevealDate&&F.encode(e.earliestCoverartRevealDate,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={earliestRevealDate:void 0,earliestCoverartRevealDate:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.earliestRevealDate=F.decode(n,n.uint32());continue;case 2:if(18!==e)break;r.earliestCoverartRevealDate=F.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({earliestRevealDate:ue(e.earliestRevealDate)?F.fromJSON(e.earliestRevealDate):void 0,earliestCoverartRevealDate:ue(e.earliestCoverartRevealDate)?F.fromJSON(e.earliestCoverartRevealDate):void 0}),toJSON(e){const t={};return void 0!==e.earliestRevealDate&&(t.earliestRevealDate=F.toJSON(e.earliestRevealDate)),void 0!==e.earliestCoverartRevealDate&&(t.earliestCoverartRevealDate=F.toJSON(e.earliestCoverartRevealDate)),t},create:e=>re.fromPartial(e??{}),fromPartial(e){const t={earliestRevealDate:void 0,earliestCoverartRevealDate:void 0};return t.earliestRevealDate=void 0!==e.earliestRevealDate&&null!==e.earliestRevealDate?F.fromPartial(e.earliestRevealDate):void 0,t.earliestCoverartRevealDate=void 0!==e.earliestCoverartRevealDate&&null!==e.earliestCoverartRevealDate?F.fromPartial(e.earliestCoverartRevealDate):void 0,t}};const se={encode:(e,t=s().Writer.create())=>(void 0!==e.earliestRevealDate&&F.encode(e.earliestRevealDate,t.uint32(10).fork()).ldelim(),t),decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={earliestRevealDate:void 0};for(;n.pos>>3){case 1:if(10!==e)break;r.earliestRevealDate=F.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({earliestRevealDate:ue(e.earliestRevealDate)?F.fromJSON(e.earliestRevealDate):void 0}),toJSON(e){const t={};return void 0!==e.earliestRevealDate&&(t.earliestRevealDate=F.toJSON(e.earliestRevealDate)),t},create:e=>se.fromPartial(e??{}),fromPartial(e){const t={earliestRevealDate:void 0};return t.earliestRevealDate=void 0!==e.earliestRevealDate&&null!==e.earliestRevealDate?F.fromPartial(e.earliestRevealDate):void 0,t}};const ae={encode(e,t=s().Writer.create()){void 0!==e.releaseAdminId&&""!==e.releaseAdminId&&t.uint32(10).string(e.releaseAdminId),void 0!==e.personnelDescription&&""!==e.personnelDescription&&t.uint32(18).string(e.personnelDescription);for(const n of e.systemDescription)t.uint32(26).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:s().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const r={releaseAdminId:"",personnelDescription:"",systemDescription:[]};for(;n.pos>>3){case 1:if(10!==e)break;r.releaseAdminId=n.string();continue;case 2:if(18!==e)break;r.personnelDescription=n.string();continue;case 3:if(26!==e)break;r.systemDescription.push(n.string());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return r},fromJSON:e=>({releaseAdminId:ue(e.releaseAdminId)?globalThis.String(e.releaseAdminId):"",personnelDescription:ue(e.personnelDescription)?globalThis.String(e.personnelDescription):"",systemDescription:globalThis.Array.isArray(e?.systemDescription)?e.systemDescription.map((e=>globalThis.String(e))):[]}),toJSON(e){const t={};return void 0!==e.releaseAdminId&&""!==e.releaseAdminId&&(t.releaseAdminId=e.releaseAdminId),void 0!==e.personnelDescription&&""!==e.personnelDescription&&(t.personnelDescription=e.personnelDescription),e.systemDescription?.length&&(t.systemDescription=e.systemDescription),t},create:e=>ae.fromPartial(e??{}),fromPartial(e){const t={releaseAdminId:"",personnelDescription:"",systemDescription:[]};return t.releaseAdminId=e.releaseAdminId??"",t.personnelDescription=e.personnelDescription??"",t.systemDescription=e.systemDescription?.map((e=>e))||[],t}};function oe(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let e=0;e{t.push(globalThis.String.fromCharCode(e))})),globalThis.btoa(t.join(""))}}function ce(e){return e.toString()}function ue(e){return null!=e}s().util.Long!==i.A&&(s().util.Long=i.A,s().configure())},65008:(e,t,n)=>{"use strict";n.d(t,{KY:()=>o});n(1903);var i=n(22795),r=n.n(i);let s=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e[e.LARGE=2]="LARGE",e[e.XLARGE=3]="XLARGE",e[e.XXLARGE=4]="XXLARGE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function a(e){switch(e){case 0:case"DEFAULT":return s.DEFAULT;case 1:case"SMALL":return s.SMALL;case 2:case"LARGE":return s.LARGE;case 3:case"XLARGE":return s.XLARGE;case 4:case"XXLARGE":return s.XXLARGE;default:return s.UNRECOGNIZED}}const o={encode(e,t=r().Writer.create()){for(const n of e.videoAssociation)l.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={videoAssociation:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.videoAssociation.push(l.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({videoAssociation:globalThis.Array.isArray(e?.videoAssociation)?e.videoAssociation.map((e=>l.fromJSON(e))):[]}),toJSON(e){const t={};return e.videoAssociation?.length&&(t.videoAssociation=e.videoAssociation.map((e=>l.toJSON(e)))),t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={videoAssociation:[]};return t.videoAssociation=e.videoAssociation?.map((e=>l.fromPartial(e)))||[],t}};const l={encode:(e,t=r().Writer.create())=>(""!==e.trackUri&&t.uint32(10).string(e.trackUri),void 0!==e.images&&c.encode(e.images,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={trackUri:"",images:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.trackUri=n.string();continue;case 2:if(18!==e)break;s.images=c.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({trackUri:p(e.trackUri)?globalThis.String(e.trackUri):"",images:p(e.images)?c.fromJSON(e.images):void 0}),toJSON(e){const t={};return""!==e.trackUri&&(t.trackUri=e.trackUri),void 0!==e.images&&(t.images=c.toJSON(e.images)),t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={trackUri:"",images:void 0};return t.trackUri=e.trackUri??"",t.images=void 0!==e.images&&null!==e.images?c.fromPartial(e.images):void 0,t}};const c={encode(e,t=r().Writer.create()){for(const n of e.image)u.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={image:[]};for(;n.pos>>3){case 1:if(10!==e)break;s.image.push(u.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({image:globalThis.Array.isArray(e?.image)?e.image.map((e=>u.fromJSON(e))):[]}),toJSON(e){const t={};return e.image?.length&&(t.image=e.image.map((e=>u.toJSON(e)))),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>u.fromPartial(e)))||[],t}};const u={encode:(e,t=r().Writer.create())=>(void 0!==e.fileId&&t.uint32(10).bytes(e.fileId),void 0!==e.size&&t.uint32(16).int32(e.size),void 0!==e.width&&t.uint32(24).sint32(e.width),void 0!==e.height&&t.uint32(32).sint32(e.height),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={fileId:void 0,size:void 0,width:void 0,height:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.fileId=n.bytes();continue;case 2:if(16!==e)break;s.size=n.int32();continue;case 3:if(24!==e)break;s.width=n.sint32();continue;case 4:if(32!==e)break;s.height=n.sint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},fromJSON:e=>({fileId:p(e.fileId)?d(e.fileId):void 0,size:p(e.size)?a(e.size):void 0,width:p(e.width)?globalThis.Number(e.width):void 0,height:p(e.height)?globalThis.Number(e.height):void 0}),toJSON(e){const t={};return void 0!==e.fileId&&(t.fileId=function(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach((e=>{t.push(globalThis.String.fromCharCode(e))})),globalThis.btoa(t.join(""))}}(e.fileId)),void 0!==e.size&&(t.size=function(e){switch(e){case s.DEFAULT:return"DEFAULT";case s.SMALL:return"SMALL";case s.LARGE:return"LARGE";case s.XLARGE:return"XLARGE";case s.XXLARGE:return"XXLARGE";case s.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.size)),void 0!==e.width&&(t.width=Math.round(e.width)),void 0!==e.height&&(t.height=Math.round(e.height)),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={fileId:void 0,size:void 0,width:void 0,height:void 0};return t.fileId=e.fileId??void 0,t.size=e.size??void 0,t.width=e.width??void 0,t.height=e.height??void 0,t}};function d(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let e=0;e{"use strict";n.d(t,{v:()=>i});const i=(0,n(36285).u)("OfflineAPI")},87672:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,p:()=>s});var i=n(93827);let r=function(e){return e.UPDATE_CONNECTIVITY="update_connectivity",e.UPDATE_CAPABILITIES="update_capabilities",e.UPDATE_TOTAL_PROGRESS="update_total_progress",e.UPDATE_CONTEXT_PROGRESS="update_context_progress",e.UPDATE_AVAILABILITY="update_availability",e.ERROR="error",e}({});class s extends i.V{}},85829:(e,t,n)=>{"use strict";n.d(t,{I:()=>l});var i=n(96566),r=n(85907),s=n(62642),a=function(e){return e[e.Unknown=0]="Unknown",e[e.Computer=1]="Computer",e[e.Tablet=2]="Tablet",e[e.Smartphone=3]="Smartphone",e[e.Speaker=4]="Speaker",e[e.TV=5]="TV",e[e.AVR=6]="AVR",e[e.STB=7]="STB",e[e.AudioDongle=8]="AudioDongle",e[e.GameConsole=9]="GameConsole",e[e.CastVideo=10]="CastVideo",e[e.CastAudio=11]="CastAudio",e[e.Automobile=12]="Automobile",e[e.Smartwatch=13]="Smartwatch",e[e.Chromebook=14]="Chromebook",e[e.UnknownSpotifyHardware=100]="UnknownSpotifyHardware",e[e.CarThing=101]="CarThing",e[e.HomeThing=103]="HomeThing",e}(a||{});const o=(0,i.g)(a);function l(e){if(o(e))switch(e){case a.Unknown:return s.bq.UNKNOWN;case a.Computer:return s.bq.COMPUTER;case a.Tablet:return s.bq.TABLET;case a.Smartphone:return s.bq.SMARTPHONE;case a.Speaker:return s.bq.SPEAKER;case a.TV:return s.bq.TV;case a.AVR:return s.bq.AVR;case a.STB:return s.bq.STB;case a.AudioDongle:return s.bq.AUDIO_DONGLE;case a.GameConsole:return s.bq.GAME_CONSOLE;case a.CastVideo:return s.bq.CAST_VIDEO;case a.CastAudio:return s.bq.CAST_AUDIO;case a.Automobile:return s.bq.AUTOMOBILE;case a.Smartwatch:return s.bq.SMARTWATCH;case a.Chromebook:return s.bq.CHROMEBOOK;case a.UnknownSpotifyHardware:return s.bq.UNKNOWN;case a.CarThing:return s.bq.CarThing;case a.HomeThing:return s.bq.HomeThing;default:return(0,r.k)(e),s.bq.UNKNOWN}return s.bq.UNKNOWN}},85346:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var i=n(30758),r=n(87672),s=n(7604),a=n(15420);function o(e){const t=(0,a.B)(),[n,o]=(0,i.useState)(t.getAvailabilitySync(e)),l=r.I.UPDATE_AVAILABILITY,c=(0,i.useCallback)((t=>{t.data.uri===e&&o(t.data.availability)}),[e]);return(0,s.b)(l,c,{uri:e}),n}},13787:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var i=n(30758),r=n(15420),s=n(85346),a=n(87672),o=n(7604);function l(e,t=!0){const n=(0,r.B)(),l=function(e,t=!0){const n=(0,r.B)(),[s,l]=(0,i.useState)(n.getCapabilities().canDownload(e,t)),c=a.I.UPDATE_CAPABILITIES,u=(0,i.useCallback)((n=>l(n.data.capabilites.canDownload(e,t))),[e,t]);return(0,o.b)(c,u),s}(e,t);return{capability:l,availability:(0,s.T)(e),addDownload:(0,i.useCallback)((()=>n.addDownload(e)),[n,e]),removeDownload:(0,i.useCallback)((()=>n.removeDownload(e)),[n,e])}}},69285:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(30758),r=n(87672),s=n(7604);function a(e){const[t,n]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),a=r.I.UPDATE_CONTEXT_PROGRESS,o=(0,i.useCallback)((t=>{t.data.uri===e&&n(t.data.progress)}),[e]);return(0,s.b)(a,o,{uri:e}),t}},15420:(e,t,n)=>{"use strict";n.d(t,{B:()=>s});var i=n(17121),r=n(30157);function s(){return(0,r.N)(i.v)}},7604:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var i=n(30758),r=n(15420),s=n(88308);function a(e,t,n){const a=(0,r.B)(),o=(0,s.lB)((()=>n),[n]);(0,i.useEffect)((()=>a.getEvents().addListener(e,t,o)),[e,t,o,a])}},35035:(e,t,n)=>{"use strict";n.d(t,{NV:()=>a,O4:()=>o,kw:()=>s,uJ:()=>i,vs:()=>r});let i=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}({}),r=function(e){return e[e.NO_CAPABILITY=0]="NO_CAPABILITY",e[e.NO_PERMISSION=1]="NO_PERMISSION",e[e.NO_PERMISSION_HIDE=2]="NO_PERMISSION_HIDE",e[e.YES=3]="YES",e}({}),s=function(e){return e.NO="no",e.YES="yes",e.DOWNLOADING="downloading",e.WAITING="waiting",e}({}),a=function(e){return e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.NO_PERMISSION=2]="NO_PERMISSION",e}({}),o=function(e){return e[e.SUCCESS=0]="SUCCESS",e[e.GENERIC=1]="GENERIC",e[e.DISK_FULL=2]="DISK_FULL",e[e.EXPIRED=3]="EXPIRED",e[e.TOO_MANY_TRACKS=4]="TOO_MANY_TRACKS",e[e.NOT_ALLOWED=5]="NOT_ALLOWED",e[e.CONNECTION_DISABLED=6]="CONNECTION_DISABLED",e[e.DEVICE_LIMIT_REACHED=7]="DEVICE_LIMIT_REACHED",e[e.UNRECOGNIZED=8]="UNRECOGNIZED",e}({})},28999:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,x:()=>r});n(1903);function i(e,t={}){try{const n=document.getElementById(e);return n?JSON.parse(n.innerHTML):t}catch{return t}}function r(e,t={}){try{const i=document.getElementById(e);return i?JSON.parse((n=i.innerHTML,decodeURIComponent(Array.prototype.map.call(atob(n),(function(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`})).join("")))):t}catch{return t}var n}},46845:(e,t,n)=>{"use strict";n.d(t,{Ek:()=>s});n(21996);var i=n(13869);const r=/Spotify\/(?.+)\s/;function s(){return function(){if(window.navigator.userAgent.match(r))return i.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?i.m.PWA:i.m.Web}()===i.m.Desktop}},21996:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,f:()=>o});var i=n(9856),r=n.n(i),s=n(13869);function a(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?s.f.macOS:"Windows"===e?s.f.Windows:"Linux"===e?s.f.Linux:"Chrome OS"===e?s.f.ChromeOS:s.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},5537:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(9856),r=n.n(i);function s(){return"Microsoft Edge"===r().parse(window.navigator.userAgent).browser.name}},99146:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});const i=432;function r(){let e;if("undefined"==typeof window)return!1;if(void 0!==window.orientation)switch(window.orientation){case 0:case 180:e=window.screen.width;break;default:e=window.screen.height}else{const t=window.screen.orientation&&window.screen.orientation.type||window.screen.msOrientation||"";if(0===t.indexOf("portrait"))e=window.screen.width;else{if(0!==t.indexOf("landscape"))return!1;e=window.screen.height}}return e<=i}},44577:(e,t,n)=>{"use strict";function i(e=window.navigator.userAgent){return e.includes("OculusBrowser")}n.d(t,{g:()=>i})},44074:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(9856),r=n.n(i);function s(){return"Safari"===r().parse(window.navigator.userAgent).browser.name}},13869:(e,t,n)=>{"use strict";n.d(t,{f:()=>r,m:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({}),r=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},36406:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>a,M4:()=>r,UT:()=>s});var i=n(36285);const r="audio.saved-devices",s="audio.disable-normalization-override",a=(0,i.u)("PlaybackFiltersAPI")},89133:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,n:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e.NORMALIZATION_OVERRIDE_DISABLED="normalizationOverrideDisabled",e}({});class s extends i.V{}},23805:(e,t,n)=>{"use strict";n.d(t,{M:()=>r,N:()=>s});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'PlaybackFiltersContext' without 'PlaybackFiltersProvider'!");return e}},61985:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});const i=(0,n(36285).u)("PlaybackAPI")},32792:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,_:()=>r});var i=n(93827);let r=function(e){return e.VOLUME="volume",e.INFO="info",e}({});class s extends i.V{}},68800:(e,t,n)=>{"use strict";n.d(t,{C0:()=>a,Y0:()=>s,bv:()=>r});const i="playback",r=()=>{try{const e=localStorage.getItem(i);if(null===e)return null;const{volume:t}=JSON.parse(e);return t||null}catch(e){return null}},s=e=>{try{localStorage.setItem(i,JSON.stringify({volume:e}))}catch(e){}},a=()=>{localStorage.removeItem(i)}},3326:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var i=n(61985),r=n(30157);function s(){return(0,r.N)(i.B)}},93293:(e,t,n)=>{"use strict";n.d(t,{L:()=>p});var i=n(91008),r=n(16157),s=n(7307),a=n(85907),o=n(57776);n(59147);const l=new o.l("decorateContextEpisodesOrChapters","query","254ab9a2dea07d5dab9266afe54b57a773069ad35d57653ddd36fc7aad68f048",null),c=new o.l("decorateContextTracks","query","254ab9a2dea07d5dab9266afe54b57a773069ad35d57653ddd36fc7aad68f048",null);var u=n(95651);function d(e){const t=e??[];return t.length>1?"mixed":0===t.length||t[0]===r.Cx.Audio?"audio":t[0]===r.Cx.Video?"video":"audio"}async function p(e,t,n){const o=Array.from(new Set(n.map((e=>e.uri)).filter((e=>!t.has(e))))),p=o.filter((e=>(0,i.U_m)(e))),m=o.filter((e=>(0,i.gHQ)(e))),[h,f]=await Promise.all([p.length>0?e(c,{uris:p},["uris"]):Promise.resolve([]),m.length>0?e(l,{uris:m},["uris"]):Promise.resolve([])]);return[...h.reduce(((e,t)=>e.concat(t.tracks??[])),[]),...f.reduce(((e,t)=>e.concat(t.episodes??[])),[])].map((e=>"GenericError"===e.__typename||"NotFound"===e.__typename||"RestrictedContent"===e.__typename?null:function(e){return"Track"===e.__typename}(e)?function(e){return{type:s.c.TRACK,uri:e.uri,name:e.name,mediaType:"audio",duration:{milliseconds:e.duration.totalMilliseconds},album:{type:s.c.ALBUM,uri:e.albumOfTrack?.uri??"",name:e.albumOfTrack?.name??"",images:e.albumOfTrack?.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},artists:e.artists.items.map((e=>({type:s.c.ARTIST,uri:e.uri,name:e.profile.name}))),isLocal:!1,isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,hasAssociatedVideo:(e.associationsV2.totalCount||0)>0,get images(){return this.album.images},uid:null,provider:null}}(e):function(e){return"Episode"===e.__typename}(e)?function(e){if("Podcast"!==e.podcastV2.data.__typename)return null;const t=e.podcastV2.data;return{type:s.c.EPISODE,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},show:{type:s.c.SHOW,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,get images(){return this.show.images},uid:null,provider:null}}(e):function(e){return"Chapter"===e.__typename}(e)?function(e){if("Audiobook"!==e.audiobookV2.data.__typename)return null;const t=e.audiobookV2.data;return{type:s.c.CHAPTER,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},book:{type:s.c.AUDIOBOOK,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,u.m)(e)))??[]},isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus,get images(){return this.book.images},uid:null,provider:null}}(e):((0,a.k)(e),null))).forEach((e=>{null!==e&&t.set(e.uri,e)})),n.map((e=>({...e,...t.get(e.uri),uid:e.uid,provider:e.provider})))}},43281:(e,t,n)=>{"use strict";n.d(t,{H:()=>i});const i=(0,n(36285).u)("PlayerAPI")},70207:(e,t,n)=>{"use strict";n.d(t,{K7:()=>s,Z9:()=>r,bt:()=>l,q3:()=>o});let i=function(e){return e[e.TRANSIENT=0]="TRANSIENT",e[e.PERSISTENT=1]="PERSISTENT",e}({}),r=function(e){return e.SUCCESS="success",e.PLAYBACK_STUCK="playback_stuck",e.PLAYBACK_ERROR="playback_error",e.LICENSE_CHANGE="license_change",e.PLAY_RESTRICTED="play_restricted",e.STOP_RESTRICTED="stop_restricted",e.UPDATE_RESTRICTED="update_restricted",e.PAUSE_RESTRICTED="pause_restricted",e.RESUME_RESTRICTED="resume_restricted",e.SKIP_TO_PREV_RESTRICTED="skip_to_prev_restricted",e.SKIP_TO_NEXT_RESTRICTED="skip_to_next_restricted",e.SKIP_TO_NON_EXISTENT_TRACK="skip_to_non_existent_track",e.TOGGLE_REPEAT_CONTEXT_RESTRICTED="toggle_repeat_context_restricted",e.TOGGLE_REPEAT_TRACK_RESTRICTED="toggle_repeat_track_restricted",e.SET_OPTIONS_RESTRICTED="set_options_restricted",e.TOGGLE_SHUFFLE_RESTRICTED="toggle_shuffle_restricted",e.SET_QUEUE_RESTRICTED="set_queue_restricted",e.INTERRUPT_PLAYBACK_RESTRICTED="interrupt_playback_restricted",e.SEEK_TO_RESTRICTED="seek_to_restricted",e.ONE_TRACK_UNPLAYABLE="one_track_unplayable",e.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED="one_track_unplayable_auto_stopped",e.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED="all_tracks_unplayable_auto_stopped",e.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED="skip_to_non_existent_track_auto_stopped",e.QUEUE_REVISION_MISMATCH="queue_revision_mismatch",e.VIDEO_PLAYBACK_ERROR="video_playback_error",e.VIDEO_GEORESTRICTED="video_georestricted",e.VIDEO_UNSUPPORTED_PLATFORM_VERSION="video_unsupported_platform_version",e.VIDEO_UNSUPPORTED_CLIENT_VERSION="video_unsupported_client_version",e.VIDEO_UNSUPPORTED_KEY_SYSTEM="video_unsupported_key_system",e.VIDEO_COUNTRY_RESTRICTED="video_country_restricted",e.VIDEO_UNAVAILABLE="video_unavailable",e.VIDEO_CATALOGUE_RESTRICTED="video_catalogue_restricted",e.VIDEO_MANIFEST_DELETED="video_manifest_deleted",e.TIMEOUT="timeout",e.INVALID="invalid",e.PLAYBACK_REPORTING_ERROR="playback_reporting_error",e.AUDIOBOOK_NOT_PLAYABLE="audiobook_not_playable",e.UNKNOWN="unknown",e.UNRECOGNIZED="unrecognized",e}({}),s=function(e){return e.AD_DISALLOW="ad_disallow",e.AGE_RESTRICTION_FILTERED="age_restriction_filtered",e.ALREADY_PAUSED="already_paused",e.ALREADY_PLAYING="already_playing",e.BANNED_BY_USER_TRACK="banned_by_user/track",e.BANNED_BY_USER_ALBUM="banned_by_user/album",e.BANNED_BY_USER_ARTIST="banned_by_user/artist",e.CONTEXT_PLAYER_DISALLOW="context_player_disallow",e.ENDLESS_CONTEXT="endless_context",e.EXPLICIT_CONTENT_FILTERED="explicit_content_filtered",e.LOCAL_FILE_BAD_FORMAT="local_file_bad_format",e.LOCAL_FILE_DRM_PROTECTED="local_file_drm_protected",e.LOCAL_FILE_NOT_FOUND="local_file_not_found",e.MFT_DISALLOW="mft_disallow",e.MFT_DISALLOW_MISSING_TRAC="mft_disallow_missing_trac",e.NEWS_SET_TRACK_FILTERED="news_set_track_filtered",e.NO_NEXT_TRACK="no_next_track",e.NO_PREV_TRACK="no_prev_track",e.NO_SPECIFIC_TRACK="no_specific_track",e.NOT_AVAILABLE="not_available",e.NOT_AVAILABLE_BY_ARTIST_BAN="not_available_by_artist_ban",e.NOT_AVAILABLE_IN_CURRENT_REGION="not_available_in_current_region",e.NOT_AVAILABLE_IN_NON_PREMIUM="not_available_in_non_premium",e.NOT_AVAILABLE_OFFLINE="not_available_offline",e.NOT_AVAILABLE_ON_MOBILE_NETWORK="not_available_on_mobile_network",e.NOT_PAUSED="not_paused",e.NOT_PLAYING_CONTEXT="not_playing_context",e.NOT_PLAYING_LOCALLY="not_playing_locally",e.NOT_PLAYING_TRACK="not_playing_track",e.OFFLINE_CAPPING_REACHED="offline_capping_reached",e.PLAYER_CONTEXT_DISALLOW="player_context_disallow",e.PROTOCOL_LIMITATIONS="protocol_limitations",e.PROTOCOL_LIMITIATIONS="protocol_limitiations",e.THROTTLED="throttled",e.UNKNOWN="unknown",e.UNSUPPORTED_FILE_FORMAT="unsupported_file_format",e.USER_CAPPING_REACHED="user_capping_reached",e.USER_STREAMING_DISALLOWED="user_streaming_disallowed",e}({});class a extends Error{constructor(e,t,n,i=void 0){super(a.getMessage(t,n,i)),this.type=e,this.code=t,this.reasons=n,this.cause=i}static getMessage(e,t,n=void 0){return t.length>0?`Code '${e}' with reasons '${t.join(", ")}'`:void 0!==n?`Code '${e}' with cause '${n.name}: ${n.message}'`:`Code '${e}'`}}class o extends a{constructor(e,t,n=void 0){super(i.TRANSIENT,e,t,n)}}class l extends a{constructor(e,t,n=void 0){super(i.PERSISTENT,e,t,n)}}},87464:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>s,JW:()=>o,UC:()=>a,gd:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e.ERROR="error",e.ACTION="action",e.QUEUE_ACTION="queue_action",e.QUEUE_ACTION_COMPLETE="queue_action_complete",e.QUEUE_UPDATE="queue_update",e.CONTEXT_WRAPAROUND="context_wraparound",e}({}),s=function(e){return e.PLAY="play",e.PAUSE="pause",e.RESUME="resume",e.SKIP_TO_NEXT="skipToNext",e.SKIP_TO_PREVIOUS="skipToPrevious",e}({}),a=function(e){return e.ADD="add",e.REMOVE="remove",e.CLEAR="clear",e.INSERT="insert",e.REORDER="reorder",e}({});class o extends i.V{emitPlaySync(e,t,n){const{defaultPrevented:i}=this.emitSync(r.ACTION,{action:s.PLAY,context:e,origin:t,options:n});return i}emitPauseSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.PAUSE});return e}emitResumeSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.RESUME});return e}emitSkipToNextSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.SKIP_TO_NEXT});return e}emitSkipToPreviousSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:s.SKIP_TO_PREVIOUS});return e}emitQueueActionSync(e){const{defaultPrevented:t}=this.emitSync(r.QUEUE_ACTION,{action:e});return t}emitQueueActionComplete(e,t=null){this.emit(r.QUEUE_ACTION_COMPLETE,{action:e,error:t})}emitQueueUpdate(e){this.emit(r.QUEUE_UPDATE,e)}}},46173:(e,t,n)=>{"use strict";n.d(t,{F7:()=>o,aX:()=>l,gp:()=>d,nD:()=>u});var i=n(9856),r=n.n(i),s=n(32304),a=n(44074);function o(e){const t=r().getParser(window.navigator.userAgent),n=function(e){switch(e){case"macOS":return"osx";case"Chrome OS":return"chrome";default:return e}}(t.getOSName()||"not_applicable"),i=function(e,t){if("Windows"===e)switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return""}return t}(n,t.getOSVersion());return`web_player ${n} ${i};${t.getBrowserName()} ${t.getBrowserVersion()};${e}`.toLowerCase()}function l(){const e=r().getParser(window.navigator.userAgent);return e.satisfies({chrome:">=37",firefox:">=47",safari:">=13.1",edge:">=79"})||e.getUA().includes("Spotify")}let c=null;function u(e,t){const n=(0,a.n)();return c=(0,s.nD)({transport:e,client:{descriptor:{id:null,randomizeId:!0,name:`Web Player (${r().getParser(window.navigator.userAgent).getBrowserName()})`,brand:"spotify",model:"web_player",platform_identifier:t.platformIdentifier,capabilities:{video_playback:l()}}},streamer:{disallowRobustnessValues:[s.LW.EMPTY],cubicVolume:!0,videoPlayerContainer:t.videoPlayerContainer,playerContainerManager:t.playerContainerManager,disableMux:n,createPlayer:t.createPlayer},controller:{decorateTrackWindow:!0},claimInactivePlayerStates:!0,onlyLocalState:!1}),c}function d(){if(null===c)throw new Error("Missing `instance`. Have you called `createHarmony` yet?");return c}},99859:(e,t,n)=>{"use strict";n.d(t,{E:()=>l,F7:()=>o,Ue:()=>u,ds:()=>c});var i=n(3074),r=n.n(i),s=n(79126),a=n(62478);function o(e){return`Partner spotify ${e}`}function l(){return r().create().hex.replace(/-/g,"")}function c(e,t){return(0,s.Wq)({transport:e,...t})}function u(e,t,n){const i=(0,a.V)(),r=t||o("desktop");return c(i,{platform_identifier:r,config:{disallowRobustnessValues:[s.ci.EMPTY],enableWithoutEME:!!{}.DEBUG_OVERTURE_WITHOUT_EME,cubicVolume:!0,...e,loggerOptions:{...e.loggerOptions,deviceInfo:{...e.loggerOptions?.deviceInfo,platform:r,version:n}}},autoActivateElement:!0})}},28340:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var i=n(30758),r=n(85907),s=n(87182),a=n(37163),o=n(2679);function l(e,t,n,i,s,o){switch(t){case a.i.NOT_ACTIVE:o?o():e.play(n,i,s);break;case a.i.PLAYING:e.pause();break;case a.i.PAUSED:e.resume();break;default:(0,r.d)(t)}}function c(e,t,n,r,s,a){const c=(0,i.useRef)(a);c.current=a;const{playbackStatus:u,isActive:d,isPlaying:p}=(0,o.t6)({contextURI:t.current.uri,...r.current,...a}),m=(0,i.useCallback)(((i,a)=>{a?a():e.play(t.current,n.current,{...s.current,...i,skipTo:{...r.current,...c.current}})}),[e,t,n,s,r]),h=(0,i.useCallback)(((i,a)=>{l(e,u,t.current,n.current,{...s.current,...i,skipTo:{...r.current,...c.current}},a)}),[e,u,t,n,s,r]);return{playbackStatus:u,isActive:d,isPlaying:p,triggerPlay:m,togglePlay:h}}function u(e,t,n,r,s){const[a,u]=function(e,t,n){return e.getCapabilities().canPlayMultipleContextPages||void 0===n.pageURI?[t,n]:[{current:{uri:n.pageURI,metadata:t.current.metadata}},{pageURI:n.pageURI,pageIndex:0}]}(e,t,s),d=(0,i.useRef)(u);d.current=u;const{playbackStatus:p,isActive:m,isPlaying:h}=(0,o.ke)({contextURI:a.current.uri,pageIndex:u.pageIndex,pageURI:u.pageURI}),f=(0,i.useMemo)((()=>c.bind(null,e,a,n,d,r)),[e,a,n,r]),g=(0,i.useCallback)(((t,i)=>{i?i():e.play(a.current,n.current,{...r.current,...t,skipTo:d.current})}),[e,a,n,r]),E=(0,i.useCallback)(((t,i)=>{l(e,p,a.current,n.current,{...r.current,...t,skipTo:d.current},i)}),[e,p,a,n,r]);return{playbackStatus:p,isActive:m,isPlaying:h,triggerPlay:g,togglePlay:E,usePlayContextItem:f}}function d(e,t,n){const r=(0,s.z)(),a={...t,referrerIdentifier:t.referrerIdentifier??r.getReferrer()},d=(0,i.useRef)(e),p=(0,i.useRef)(a),m=(0,i.useRef)(n);d.current=e,p.current=a,m.current=n;const{playbackStatus:h,isActive:f,isPlaying:g}=(0,o.l_)(e.uri),E=(0,i.useMemo)((()=>u.bind(null,r,d,p,m)),[r]),_=(0,i.useMemo)((()=>c.bind(null,r,d,p,{current:null},m)),[r]),y=(0,i.useCallback)(((e,t)=>{r.play(t??d.current,p.current,{...m.current,...e})}),[r]),v=(0,i.useCallback)(((e,t)=>{l(r,h,t??d.current,p.current,{...m.current,...e})}),[r,h]);return{playbackStatus:h,isActive:f,isPlaying:g,triggerPlay:y,togglePlay:v,usePlayContextPage:E,usePlayContextItem:_}}},87182:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var i=n(43281),r=n(30157);function s(){return(0,r.N)(i.H)}},13009:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(29475),r=n(58685);const s=()=>(0,r.o)((e=>e?.playbackQuality.bitrateLevel??i.Yn.UNKNOWN))},36958:(e,t,n)=>{"use strict";n.d(t,{V:()=>d});var i=n(25357),r=n(87182),s=n(58685),a=n(41434),o=n(14343),l=n(43329),c=n(7307);const u=(e,t)=>e===l._9.ESPERANTO?t?.speedEsperanto??0:t?.speed??0;function d(){const e=(0,r.z)(),t=(0,o.NC)(l.hd),n=(0,s.o)((e=>({shuffle:e?.shuffle??!1,repeat:e?.repeat??i.p.REPEAT_NONE,speed:u(t,e),canToggleShuffle:e?.restrictions.canToggleShuffle??!1,canToggleRepeatContext:e?.restrictions.canToggleRepeatContext??!1,canToggleRepeatTrack:e?.restrictions.canToggleRepeatTrack??!1})),a.a),d=(0,s.o)((e=>e?.item?.type===c.c.EPISODE||e?.item?.type===c.c.CHAPTER||e?.item?.type===c.c.AD&&e?.item.isPodcastAd));return{...n,canChangeSpeed:e.getCapabilities().canChangeSpeed&&d,setShuffle:e.setShuffle.bind(e),setRepeat:e.setRepeat.bind(e),setSpeed:e.setSpeed.bind(e)}}},90326:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var i=n(30758),r=n(87182),s=n(66530);function a(e,t){const n=(0,i.useRef)(t),a=(0,r.z)(),o=(0,s.a)();(0,i.useLayoutEffect)((()=>{n.current=t})),(0,i.useEffect)((()=>a.getEvents().addListener(e,(e=>{o()&&n.current(e)}))),[e,o,a])}},86931:(e,t,n)=>{"use strict";n.d(t,{S:()=>c,f:()=>u});var i=n(30758),r=n(24620),s=n(58685),a=n(27102);const o=()=>!0;function l(e,t=o,n){const r=(0,a.ox)(),l=(0,s.o)((e=>e),((e,t)=>e?.timestamp===t?.timestamp&&e?.positionAsOfTimestamp===t?.positionAsOfTimestamp&&e?.duration===t?.duration&&e?.speed===t?.speed&&e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.isBuffering===t?.isBuffering)),[c,u]=(0,i.useState)((()=>null===l||t(l)?n(l)??0:0)),[d,p]=(0,i.useState)(!1),[m,h]=(0,i.useState)(null),f=(0,i.useCallback)((()=>{p(!0),setTimeout((()=>p(!1)),Math.floor(1e3/60))}),[]),g=(0,i.useCallback)((e=>{h(e),f()}),[f]),E=(0,i.useRef)(t);return E.current=t,(0,i.useEffect)((()=>{(null===l||E.current(l))&&(u(n(l)??0),l?.isPaused?p(!0):f())}),[l,n,f]),(0,i.useEffect)((()=>{l?.isPaused||l?.isBuffering||(h(null),f())}),[l?.timestamp,l?.isPaused,l?.isBuffering,f]),(0,i.useEffect)((()=>{let t=!0;if(null===l||!l.hasContext||l.isPaused||!E.current(l))return()=>{};u(n(l)??0),p(!0);const i=r?.setInterval((()=>{if(t){const e=n(l);u(e??0),p(!1)}}),e);return()=>{t=!1,null!==i&&r?.clearInterval(i)}}),[r,l,e,n]),[m??c,g,d]}function c(e,t=o){return l(e,t,r.s)}function u(e,t=o){return l(e,t,r.F)}},2679:(e,t,n)=>{"use strict";n.d(t,{GK:()=>d,gC:()=>a,ke:()=>l,l_:()=>o,t6:()=>u,te:()=>c});var i=n(37163),r=n(16581),s=n(58685);function a(e){const t=(0,s.o)(e);return{playbackStatus:t,isActive:t!==i.i.NOT_ACTIVE,isPlaying:t===i.i.PLAYING}}function o(e){return a((t=>(0,r.yc)(t,e)))}function l(e){return a((t=>(0,r.dt)(t,e)))}function c(e){return a((t=>(0,r.Ok)(t,e)))}function u(e){return a((t=>(0,r.cA)(t,e)))}function d(){return a((e=>(0,r.uW)(e)))}},43398:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var i=n(30758),r=n(7307),s=n(87182),a=n(58685);const o=5e3,l=15e3;function c(){const e=(0,s.z)(),t=function(e){return e===r.c.TRACK?o:e===r.c.EPISODE?l:0}((0,a.o)((e=>e?.item?.type)));return{seekBackward:(0,i.useCallback)((()=>(0!==t&&e.seekBackward(t),t)),[e,t]),seekForward:(0,i.useCallback)((()=>(0!==t&&e.seekForward(t),t)),[e,t]),seekOffsetMs:t}}},58685:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(30758),r=n(87464),s=n(87182),a=n(90326);function o(e,t=((e,t)=>e===t)){const n=(0,s.z)().getState(),[o,l]=(0,i.useState)(e(n));return(0,a.p)(r.gd.UPDATE,(n=>{const i=e(n.data);t(o,i)||l(i)})),o}},608:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var i=n(61451),r=n(58685),s=n(41434),a=n(91008),o=n(31417);function l(e){if(e?.metadata?.[i.W.CONTEXT_DESCRIPTION])return e.metadata[i.W.CONTEXT_DESCRIPTION];const t=(0,a.o_h)(e?.uri);if(t?.type===a.NQG.COLLECTION){const{category:e}=t;if("your-episodes"===e)return o.Ru.get("sidebar.your_episodes");if(void 0===e)return o.Ru.get("sidebar.liked_songs")}return null}function c(){return(0,r.o)((e=>({uri:e?.context.uri??null,description:l(e?.context)})),s.a)}},61451:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,W:()=>i});let i=function(e){return e.CONTEXT_DESCRIPTION="context_description",e.IS_AUDIOBOOK="is_audiobook",e.REPORTING_URI="reporting.uri",e.FILTERING_PREDICATE="filtering.predicate",e.SORTING_CRITERIA="sorting.criteria",e.LIST_UTIL_FILTER="list_util_filter",e.LIST_UTIL_SORT="list_util_sort",e}({}),r=function(e){return e.ALBUM_URI="album_uri",e.ARTIST_NAME="artist_name",e.ARTIST_URI="artist_uri",e.DURATION="duration",e.HAS_SEGMENTS="has_display_segments",e.SEGMENT_INDEX="segment.index",e.HAS_LYRICS="has_lyrics",e.PARENT_EPISODE_URI="parent_episode.uri",e.PAGE_INSTANCE_ID="page_instance_id",e.IMAGE_URL="image_url",e}({})},19555:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});let i=function(e){return e.SWITCH_TO_VIDEO="switch-to-video",e.SWITCH_TO_AUDIO="switch-to-audio",e.JUMP="jump",e.AUTOMIX_PREVIEW="automix-preview",e.PLUS="plus",e.MINUS="minus",e}({})},29475:(e,t,n)=>{"use strict";n.d(t,{Yn:()=>i,ZT:()=>r,p4:()=>s});let i=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.LOW=1]="LOW",e[e.NORMAL=2]="NORMAL",e[e.HIGH=3]="HIGH",e[e.VERY_HIGH=4]="VERY_HIGH",e[e.LOSSLESS=5]="LOSSLESS",e[e.LOSSLESS_24=6]="LOSSLESS_24",e}({}),r=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.BEST_MATCHING=1]="BEST_MATCHING",e[e.BACKEND_ADVISED=2]="BACKEND_ADVISED",e[e.OFFLINED_FILE=3]="OFFLINED_FILE",e[e.CACHED_FILE=4]="CACHED_FILE",e[e.LOCAL_FILE=5]="LOCAL_FILE",e}({}),s=function(e){return e[e.NONE=0]="NONE",e[e.OFF=1]="OFF",e[e.ON=2]="ON",e}({})},37163:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});let i=function(e){return e[e.NOT_ACTIVE=0]="NOT_ACTIVE",e[e.PLAYING=1]="PLAYING",e[e.PAUSED=2]="PAUSED",e}({})},25357:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});let i=function(e){return e[e.REPEAT_NONE=0]="REPEAT_NONE",e[e.REPEAT_CONTEXT=1]="REPEAT_CONTEXT",e[e.REPEAT_TRACK=2]="REPEAT_TRACK",e}({})},13659:(e,t,n)=>{"use strict";n.d(t,{D:()=>i});const i=["not_playing_locally","not_playing_context","not_playing_track","no_prev_track","no_next_track","no_specific_track","already_paused","not_paused","context_player_disallow","mft_disallow","ad_disallow","protocol_limitations","unknown","already_playing","throttled","endless_context","autoplay","narration","not_supported_by_device","no_associated_track"]},75497:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(7307);function r(e){return e?.type===i.c.AD}},13947:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var i=n(7307);function r(e){return e?.type===i.c.CHAPTER}},45627:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(7307);function r(e){return e?.type===i.c.EPISODE}},78613:(e,t,n)=>{"use strict";n.d(t,{F:()=>r});var i=n(19555);const r=(0,n(96566).g)(i.L)},5805:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(7307);function r(e){return e?.type===i.c.TRACK}},4861:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(7307);function r(e){return e?.type===i.c.UNKNOWN}},24620:(e,t,n)=>{"use strict";function i(e,t){if(null===e||null===t||null===e.duration)return null;const{timestamp:n,duration:i,speed:r,hasContext:s,isPaused:a,isBuffering:o}=e;if(!s||a||o)return t;const l=(Date.now()-n)*(r??0);return Math.min(t+l,i)}function r(e){return i(e,e?.positionAsOfTimestamp??null)}function s(e){const t=parseInt(e?.item?.metadata?.["segment.position_as_of_timestamp"]??"",10),n=e?.positionAsOfTimestamp??null;return i(e,isNaN(t)?n:t)}n.d(t,{F:()=>s,s:()=>r})},16368:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(85907),r=n(82585);const s=e=>{if("boolean"==typeof e)return e;switch(e){case r.j.OFF:return!1;case r.j.ON:case r.j.SMART_SHUFFLE:return!0;default:return(0,i.k)(e),!1}}},37474:(e,t,n)=>{"use strict";function i(e){const t=e?.uri;return Boolean(t)&&""!==t&&"invalid_context_uri"!==t}n.d(t,{O:()=>i})},16581:(e,t,n)=>{"use strict";n.d(t,{A3:()=>b,Ok:()=>y,Q3:()=>S,b8:()=>m,cA:()=>v,dt:()=>_,uW:()=>g,yc:()=>E});var i=n(91008),r=n(61451),s=n(75497),a=n(45627),o=n(5805),l=n(37163),c=n(29475),u=n(7307),d=n(85907),p=n(93004);function m(e,t){const n=(0,i.o_h)(e,{parseUnknown:!0}),r=(0,i.o_h)(t,{parseUnknown:!0});return!(!n||!r)&&((0,i.B2u)(n,r)??!1)}function h(e){return"queue"===e?.provider}function f(e,t){if(null===e)return!1;switch(e.type){case u.c.TRACK:if(m(e.album.uri,t)||m(e.uri,t))return!0;break;case u.c.EPISODE:if(m(e.show.uri,t)||m(e.uri,t))return!0;break;case u.c.CHAPTER:if(m(e.book.uri,t)||m(e.uri,t))return!0;break;case u.c.AD:case u.c.UNKNOWN:break;default:(0,d.d)(e)}return!1}function g(e){return null!==e&&e.hasContext?e.isPaused?l.i.PAUSED:l.i.PLAYING:l.i.NOT_ACTIVE}function E(e,t){return null===e?l.i.NOT_ACTIVE:(!h(e.item)&&(n=e.item,"autoplay"!==n?.provider)||f(e.item,t??null))&&(m(e.context.uri,t??null)||function(e,t){const n=(0,i.o_h)(t,{parseUnknown:!0});return(0,i.Z0m)(t)&&"your-episodes"===n?.category&&e===p.H3}(e.context.uri,t??null)||function(e,t){const n=(0,i.o_h)(t,{parseUnknown:!0}),r=void 0===n?.category||"tracks"===n?.category;return(0,i.Z0m)(t)&&r&&e===p.DK}(e.context.uri,t??null)||m(e.index?.pageURI??null,t??null)||m(e.item?.uri??null,e.context.uri??null)&&f(e.item,t??null))?g(e):l.i.NOT_ACTIVE;var n}function _(e,{contextURI:t,pageIndex:n,pageURI:i}){if(null===e)return l.i.NOT_ACTIVE;if(h(e.item)&&!f(e.item,i??null))return l.i.NOT_ACTIVE;if(m(e.context.uri,t??null)){if(r=e.index.pageIndex??null,s=n??null,null!==r&&null!==s&&r===s)return g(e);if(m(e.index.pageURI??null,i??null))return g(e)}var r,s;return m(e.context.uri,i??null)?g(e):l.i.NOT_ACTIVE}function y(e,t){return null===e?l.i.NOT_ACTIVE:m(e.item?.uri??null,t??null)?g(e):l.i.NOT_ACTIVE}function v(e,t){if(null===e)return l.i.NOT_ACTIVE;let n=function(e,t){if(!h(e.item))return l.i.NOT_ACTIVE;const{item:n}=e;if(m(n.uri,t.uri??null)){if(f(n,t.contextURI??null))return g(e);if(f(n,t.pageURI??null))return g(e)}return l.i.NOT_ACTIVE}(e,t);return n!==l.i.NOT_ACTIVE?n:(n=E(e,t.contextURI),n===l.i.NOT_ACTIVE&&(n=E(e,t.pageURI),n===l.i.NOT_ACTIVE)?l.i.NOT_ACTIVE:void 0!==t.uid?e.item?.uid===t.uid?n:l.i.NOT_ACTIVE:void 0!==t.uri?e.item?.uri===t.uri||e.item?.metadata&&e.item.metadata[r.I.PARENT_EPISODE_URI]===t.uri?n:l.i.NOT_ACTIVE:void 0!==t.index&&e.index.itemIndex===t.index?n:l.i.NOT_ACTIVE)}function b(e){const t=e?.item??void 0;if((0,o.v)(t)||(0,a.p)(t)||(0,s.N)(t)){return("video"===t.mediaType||"mixed"===t.mediaType)&&e?.playbackQuality.strategy!==c.ZT.OFFLINED_FILE}return!1}function S(e){return"true"===String(e?.context.metadata?.is_audiobook)}},98220:(e,t,n)=>{"use strict";n.d(t,{RU:()=>o,Ry:()=>a,jl:()=>s});var i=n(25357),r=n(7307);function s(e,t,n,i,r,s){const a=t.find((e=>i(n.after||n.before,e)));if(!a)return t;const o=[];e.forEach((e=>{const n=t.find((t=>i(e,t)));n&&o.push(n)}));const l=t.filter((e=>!o.includes(e))),c=o.map((e=>r(a)?s(e):e)),u=a?l.indexOf(a):0;return n.after?l.splice(u+1,0,...c):l.splice(u,0,...c),l}function a(e,t,n,i,r,s){const a=t.find((e=>i(n.after||n.before,e)));if(!a)return t;const o=e.map((e=>s(e,r(a)))),l=t.indexOf(a);return n.after?t.splice(l+1,0,...o):t.splice(l,0,...o),t}function o(e,t,n){if(0===e.length)return{current:null,queued:[],nextUp:[]};const s=t===i.p.REPEAT_CONTEXT&&n?2:1,a=[];let o=0;const l=e[0];for(let t=1;t=s)break;const d=i.startsWith("spotify:meta:"),p=n!==r.c.UNKNOWN&&c;d||u||"true"===l||p||a.push(e[t])}const c=a.findIndex((({provider:e})=>"queue"!==e));return{current:l,queued:-1===c?a:a.slice(0,c),nextUp:-1===c?[]:a.slice(c)}}},55347:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});const i="enhance",r="spotify-apply-lenses";function s(e,t){const n=new URL(e),s=new Set(n.searchParams.get(r)?.split(","));return t?s.add(i):s.delete(i),s.size?n.searchParams.set(r,[...s].join(",")):n.searchParams.delete(r),n.toString()}},34939:(e,t,n)=>{"use strict";n.d(t,{YB:()=>s,nw:()=>r,xB:()=>i});let i=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),r=function(e){return e.TITLE="TITLE",e.ADDED_BY="ADDED_BY",e.ADDED_AT="ADDED_AT",e.ARTIST="ARTIST",e.ALBUM="ALBUM",e.DURATION="DURATION",e.SHOW_NAME="SHOW_NAME",e.PUBLISH_DATE="PUBLISH_DATE",e}({}),s=function(e){return e.AVAILABLE="AVAILABLE",e.AVAILABLE_OFFLINE="AVAILABLE_OFFLINE",e.ARTIST_NOT_BANNED="ARTIST_NOT_BANNED",e.NOT_BANNED="NOT_BANNED",e.NOT_EXPLICIT="NOT_EXPLICIT",e.NOT_EPISODE="NOT_EPISODE",e.UNPLAYED="UNPLAYED",e.IN_PROGRESS="IN_PROGRESS",e.NOT_FULLY_PLAYED="NOT_FULLY_PLAYED",e}({})},43863:(e,t,n)=>{"use strict";n.d(t,{Jy:()=>s,Ki:()=>l,pW:()=>o,xp:()=>a});var i=n(36285),r=n(7307);function s(e){return e.type===r.c.TRACK}function a(e){return e.type===r.c.EPISODE}function o(e){return e.type===r.c.AUDIOBOOK}const l=(0,i.u)("PlaylistAPI")},20150:(e,t,n)=>{"use strict";n.d(t,{Lj:()=>s,Y0:()=>a,sP:()=>r});var i=n(93827);let r=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.UPDATE="update",e.SET_COLLABORATIVE="set_collaborative",e.SIGNAL="signal",e}({}),s=function(e){return e.UPDATE="update",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},61767:(e,t,n)=>{"use strict";n.d(t,{O:()=>i});const i=(0,n(36285).u)("PlaylistPermissionsAPI")},82726:(e,t,n)=>{"use strict";n.d(t,{GV:()=>s,KD:()=>a,mA:()=>r});var i=n(93827);let r=function(e){return e.CLAIM_PERMISSION="claim_permission",e.REMOVE_MEMBER="remove_member",e.SET_MEMBER_PERMISSION="set_member_permission",e.SET_BASE_PERMISSION="set_base_permission",e.GET_PERMISSION_GRANT="get_permission_grant",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{emitOperationSync(e){return this.emitSync(s.OPERATION,e).defaultPrevented}emitOperationComplete(e,t=null){this.emit(s.OPERATION_COMPLETE,{...e,error:t})}}},78565:(e,t,n)=>{"use strict";n.d(t,{Af:()=>s,Yi:()=>l,nw:()=>a,sA:()=>r,xB:()=>o});var i=n(36285);n(98871);function r(e){return"folder"===e.type}function s(e){return"playlist"===e.type}let a=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e.RECENTLY_PLAYED="RECENTLY_PLAYED",e.RELEVANCE="RELEVANCE",e.AVAILABLE_OFFLINE="AVAILABLE_OFFLINE",e}({}),o=function(e){return e.ASC="ASC",e.DESC="DESC",e}({});const l=(0,i.u)("RootlistAPI")},94572:(e,t,n)=>{"use strict";n.d(t,{OO:()=>a,tD:()=>s,ut:()=>r});var i=n(93827);let r=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.CREATE_PLAYLIST="create_playlist",e}({}),s=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class a extends i.V{}},98871:(e,t,n)=>{"use strict";n.d(t,{QG:()=>i});function i(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}},14150:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var i=n(61026),r=n(52898),s=n(23091);function a(e){return t=e,Object.prototype.hasOwnProperty.call(t,"uid")?{itemId:(0,s.xJ)(e.uid)}:{};var t}function o(e){const{before:t,after:n}=e;return"start"===t?{addFirst:!0}:void 0!==t?{addBeforeItem:{uri:(0,r.DY)(t.uri),attributes:a(t)}}:"end"===n?{addLast:!0}:void 0!==n?{addAfterItem:{uri:(0,r.DY)(n.uri),attributes:a(n)}}:{}}class l{_ops=[];_needsBaseRevision=!1;add(e,t,n=Date.now()){return this._ops.push({kind:i.H1.ADD,add:{...o(t),items:e.map((e=>({uri:e,attributes:{timestamp:n.toString()}})))}}),this}addByIndex(e,t,n,r=Date.now()){var s,a;return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.ADD,add:{...(s=e,a=t,0===s?{addFirst:!0}:s>=a?{addLast:!0}:{fromIndex:s}),items:n.map((e=>({uri:e,attributes:{timestamp:r.toString()}})))}}),this}removeByIndex(e,t=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.REM,rem:{fromIndex:e,length:t}}),this}remove(e){return this._ops.push({kind:i.H1.REM,rem:{itemsAsKey:!0,items:e.map((e=>({uri:e.uri})))}}),this}move(e,t){return this._ops.push({kind:i.H1.MOV,mov:{items:e.map((e=>({uri:e.uri,attributes:a(e)}))),...o(t)}}),this}moveByIndex(e,t,n=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.H1.MOV,mov:{fromIndex:e,toIndex:t,length:n}}),this}updateListAttributes(e){return this._ops.push({kind:i.H1.UPDATE_LIST_ATTRIBUTES,updateListAttributes:e}),this}updateItemAttributes(e){return this._ops.push({kind:i.H1.UPDATE_ITEM_ATTRIBUTES,updateItemAttributes:e}),this}buildDelta(){return{ops:this._ops,info:{source:{client:i.Gv.WEBPLAYER}}}}buildListChanges(e){if(this._needsBaseRevision&&void 0===e)throw new Error("Operation needs base revision, which was not provided!");return{baseRevision:e,deltas:[this.buildDelta()],wantResultingRevisions:!1,wantSyncResult:!1,nonces:[]}}}},96661:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var i=n(49769),r=n(20150);class s extends r.Y0{constructor(){super(),this._aggregator=(0,i.X)(this.onBatchChanged.bind(this)),this.onAddListener(r.Lj.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(r.Lj.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitAddSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.ADD,uri:e,items:t,silent:n}).defaultPrevented}emitMoveSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.MOVE,uri:e,items:t}).defaultPrevented}emitRemoveSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.REMOVE,uri:e,items:t,silent:n}).defaultPrevented}emitUpdateSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.UPDATE,uri:e,details:t}).defaultPrevented}emitSendSignalSync(e,t,n){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.SIGNAL,uri:e,itemId:n,signalIdentifier:t}).defaultPrevented}emitAddComplete(e,t=null,n=[],i){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.ADD,uri:e,uris:n,error:t,silent:i})}emitMoveComplete(e,t=null,n=[]){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.MOVE,uri:e,items:n,error:t})}emitRemoveComplete(e,t=null,n=[],i){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.REMOVE,uri:e,items:n,error:t,silent:i})}emitUpdateComplete(e,t=null,n={}){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.UPDATE,uri:e,details:n,error:t})}emitSendSignalComplete(e,t,n,i=null){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.SIGNAL,uri:e,itemId:n,signalIdentifier:t,error:i})}}},35612:(e,t,n)=>{"use strict";n.d(t,{N4:()=>l,S1:()=>a,f5:()=>o});var i=n(72671),r=n(15538);const s=6048e5;async function a(e,t,n,a=s){const o=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("POST").withPath(`/playlist/${o}/permission-grant`).withEndpointIdentifier("/playlist/{id}/permission-grant").withJsonContentType().withBody({permission:{permissionLevel:n},ttlMs:a}).withoutMarket().send()).body}async function o(e,t,n){const s=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("POST").withPath(`/playlist/${s}/permission-grant/token/${n}/claim`).withEndpointIdentifier("/playlist/{id}/permission-grant/token/{token}/claim").withJsonContentType().withoutMarket().send()).body}async function l(e,t){const n=(0,r.m)(t);return(await e.build().withHost(i.ZJ).withMethod("GET").withPath(`/playlist/${n}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withoutMarket().send()).body}},39559:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(94572),r=n(49769);class s extends i.OO{_numListeners=0;constructor(){super(),this._aggregator=(0,r.X)(this.onContainsItems.bind(this)),this.onAddListener(i.tD.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(i.tD.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(i.tD.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates();const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(i.tD.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates();const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitUpdateItems(e,t){e.forEach(((e,n)=>{this.emit(i.tD.UPDATE_ITEM,{uri:e,isInRootlist:Array.isArray(t)?t[n]:t})}))}emitCreatePlaylistSync(e,t,n){return this.emitSync(i.tD.OPERATION,{operation:i.ut.CREATE_PLAYLIST,name:e,position:t,silent:n}).defaultPrevented}emitAddSync(e,t,n){return this.emitSync(i.tD.OPERATION,{operation:i.ut.ADD,uris:e,position:t,silent:n}).defaultPrevented}emitMoveSync(e,t,n=!1){return this.emitSync(i.tD.OPERATION,{operation:i.ut.MOVE,item:e,position:t,showAddConfirmation:n}).defaultPrevented}emitRemoveSync(e){return this.emitSync(i.tD.OPERATION,{operation:i.ut.REMOVE,items:e}).defaultPrevented}emitCreatePlaylistComplete(e,t,n=null,r=null,s){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.CREATE_PLAYLIST,name:e,position:t,uri:n,error:r,silent:s})}emitAddComplete(e,t,n=null,r){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.ADD,uris:e,position:t,error:n,silent:r})}emitMoveComplete(e,t,n=null,r=!1){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.MOVE,item:e,position:t,error:n,showAddConfirmation:r})}emitRemoveComplete(e,t=null){this.emit(i.tD.OPERATION_COMPLETE,{operation:i.ut.REMOVE,items:e,error:t})}}},59384:(e,t,n)=>{"use strict";n.d(t,{IJ:()=>v,N7:()=>C,q1:()=>T,dG:()=>A,sh:()=>S,jH:()=>E,W3:()=>g});var i=n(91008),r=n(78565),s=n(13719),a=n(7307),o=n(23091);function l(e){return e?new Date(parseInt(e,10)):null}function c(e){return{type:a.c.USER,uri:(0,i.Qjr)(e).toURI(),username:e,displayName:null,images:[]}}function u(e,t){if(void 0!==e)return e.map((e=>e.url??null)).filter(s.P).map((e=>({url:e})));if(void 0!==t){return[{url:`https://i.scdn.co/image/${(0,o.U5)(t)}`}]}return[]}function d(e,t,n){const i=n.attributes;return{type:"folder",uri:e,name:t,addedAt:l(i?.timestamp),items:[]}}function p(e,t,n){const i=t.attributes,r=n.attributes;if(!(t.uri&&n.ownerUsername&&i&&r))return function(e){const t=e.attributes;return{type:"placeholder",uri:e.uri??"",addedAt:l(t?.timestamp),isNotFound:!0,isForbidden:!1}}(t);const s=c(n.ownerUsername),o=function(e){return void 0===e?null:c(e)}(r.formatAttributes?.find((e=>"madeFor.username"===e.key))?.value),d=e===s.username,p=i.public??!1,m=d,h=d;return{type:a.c.PLAYLIST,addedAt:l(i.timestamp),uri:t.uri,name:r.name??"",description:r.description??"",totalLength:n.length??0,unfilteredTotalLength:n.length??0,totalLikes:null,duration:null,images:u(r.pictureSize,r.picture),owner:s,madeFor:o,isLoaded:!0,isOwnedBySelf:d,isPublished:p,isRootlistable:!0,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:m,canRemove:h,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!0,permissions:null,collaborators:null}}var m=n(52898);function h(e){const t=e;return"folder"===t.type&&void 0!==t.hash&&void 0!==t.rawItemCount}function f(e,t){const n=e.contents?.items?.[t];return void 0===n?null:(0,i.o_h)(n.uri,{parseUnknown:!0})}function g(e,t){const n=f(e,t);return null!==n&&(n.type===i.NQG.UNKNOWN&&"start-group"===n.args?.[0]&&3===n.args.length)}function E(e,t){const n=f(e,t);return null!==n&&(n.type===i.NQG.UNKNOWN&&"end-group"===n.args?.[0]&&2===n.args.length)}function _(e,t){return{type:"folder",uri:e,name:"",addedAt:new Date(0),items:[],hash:"0000000000000000",rawItemCount:0,...t}}function y(e,t,n,i){return{...d((0,m.p0)(e,t,n),n,i),hash:t,rawItemCount:1}}class v{stack=[];seen=[];constructor(e){this.username=e;const t=(0,m.p0)(e,"0000000000000000","");this.root=_(t)}build(e){const t=e.contents,n=t?.items||[],r=t?.metaItems||[];for(let e=0;e0?this.stack[this.stack.length-1]:this.root}onPlaylist(e){this.peek().items.push(e)}onStartGroup(e){this.peek().items.push(e),this.stack.push(e),this.seen.push(e.hash)}onEndGroup(e){const t=this.stack.findIndex((t=>t.hash===e));-1!==t&&(this.stack.length=t)}hasSeen(e){return-1!==this.seen.indexOf(e)}increaseRawItemCount(){this.root.rawItemCount++;for(let e=0;e0;){const e=i.pop();for(const r of e.items)h(r)&&i.push(r),t(r)&&n.push(r)}return n}function S(e){return b(e,(e=>(0,r.Af)(e)))}function A(e){return _(e.uri,{items:S(e)})}function C(e,t){const n=(0,i.o_h)(t),r=b(e,(e=>(0,m.B2)(n,(0,i.o_h)(e.uri))));return r.length>0?r[0]:null}function T(e,t){const n=(0,i.o_h)(t);return b(e,(e=>(0,m.B2)(n,(0,i.o_h)(e.uri)))).at(0)??null}},55809:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var i=n(71506),r=n(57776);n(59147);const s=new r.l("decoratePlaylists","query","896382ce80ad65a99a7acef04886629b57f9673bdef3ed3d1c90cdc17237612b",null);var a=n(26702);const o=50;const l=e=>null===e.owner.displayName||0===e.images.length;async function c(e,t,n){try{for(let e=0;e!t.has(e.uri))),c=await async function(e,t){const n=(0,i.lY)(e);return{playlistsV2:(await(0,a.F)(t,(async e=>{const t=await n(s,{uris:e}),{errors:i,data:r}=t||{};if(!r?.playlistsV2)throw i&&i.length>0?new Error(`GraphQL error: ${i[0].message}`):new Error("Unknown GraphQL error!");return r}),o)).reduce(((e,t)=>e.concat(t.playlistsV2||[])),[])}}(e,r.map((e=>e.uri))),u=c.playlistsV2;for(let e=0;e({url:e,width:t||void 0,height:n||void 0}))),t.set(e,{owner:n.owner,images:n.images})}}}catch(e){window.console.error(e)}}},52898:(e,t,n)=>{"use strict";n.d(t,{B2:()=>u,BU:()=>c,DY:()=>f,Yu:()=>s,_U:()=>l,nK:()=>m,p0:()=>o});var i=n(91008),r=n(23091);function s(e){const t=new Uint8Array(e);return globalThis.crypto.getRandomValues(t),(0,r.U5)(t)}function a(e){const t=e.replace(/\s+/g," ");return encodeURIComponent(t).replace(/%20/g,"+")}function o(e,t,n){return`${(0,i.TRD)(e,t).toURI()}:${a(n)}`}function l(e){const t=(0,i.o_h)(e,{parseUnknown:!0});return null!==t&&t.type===i.NQG.UNKNOWN&&void 0!==t.args&&"start-group"===t.args[0]&&t.args.length>=2&&t.args.length<=3}function c(e){const t=(0,i.o_h)(e,{parseUnknown:!0});return null!==t&&t.type===i.NQG.UNKNOWN&&void 0!==t.args&&"end-group"===t.args[0]&&2===t.args.length}function u(e,t){const n=(0,i.o_h)(e,{parseUnknown:!0}),r=(0,i.o_h)(t,{parseUnknown:!0});return null!==n&&null!==r&&(n.type===i.NQG.FOLDER&&r.type===i.NQG.FOLDER?n.id===r.id:l(n)&&l(r)||c(n)&&c(r)?n.args[0]===r.args[0]:n.type===i.NQG.FOLDER&&l(r)?n.id===r.args[1]:l(n)&&r.type===i.NQG.FOLDER?n.args[1]===r.id:(0,i.B2u)(n,r))}function d(e,t){return void 0!==t?`spotify:start-group:${e}:${a(t)}`:`spotify:start-group:${e}`}function p(e){return`spotify:end-group:${e}`}function m(e={}){const{name:t,folderUri:n,hash:i=(n?h(n):s(8))}=e;return[d(i,t),p(i)]}function h(e){const t=(0,i.o_h)(e);if(null===t||t.type!==i.NQG.FOLDER)throw new Error("Failed to parse folder URI!");return t.id}function f(e){try{return d(h(e))}catch{return e}}},98228:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});const i=["daily-mix","my-mix","car-mix","personalized-podcasts","daylist"]},21108:(e,t,n)=>{"use strict";n.d(t,{u:()=>s,w:()=>a});var i=n(91008),r=n(72671);const s=async(e,t,n,s)=>{const a=await e.build().withMethod("POST").withHost(r.sG).withPath("/extendp/").withEndpointIdentifier("/extendp/").withJsonContentType().withBody({playlistURI:t,trackSkipIDs:n||[],numResults:s||10}).withoutMarket().send();return a.body?a.body.recommendedTracks.map((e=>{const{id:t,album:{id:n},artists:r}=e,s=(0,i.Mce)(t).toURI(),a=(0,i.Q00)(n).toURI(),o=r.map((({id:e,name:t})=>({id:e,name:t,uri:(0,i.ITr)(e).toURI()})));return{...e,uri:s,album:{...e.album,uri:a},artists:o,isMOGEFRestricted:!!e.contentRating?.find((e=>"KR"===e.country&&e.tag.includes("MOGEF-19+")))}})):[]},a=async(e,t,n,i)=>{try{return(await e.build().withMethod("POST").withHost(r.SX).withJsonContentType().withBody({curation_uri:t,suggested_audiobooks:{},skipItemUris:n,limit:i}).withoutMarket().send()).body.uris}catch(e){return[]}}},9786:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(72671);async function r(e,t){const n=await e.build().withHost(i.eX).withMethod("GET").withPath(`/resolve-uri/${encodeURIComponent(t)}`).withEndpointIdentifier("/resolve-uri/{uri}").withoutMarket().send(),{resolvedPlaylists:r}=n.body;if(r.length>0)return r[0].uri;throw new Error("Error resolving playlist format URI!")}},91318:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,k:()=>l});var i=n(61026),r=n(91008),s=n(14150),a=n(72671),o=n(23091);async function l(e,t,n){let l=null;const u=(0,r.o_h)(t).id;n.imageUploadToken&&(l=await c(e,u,n.imageUploadToken));const d={},p=[];if(null!==l?d.picture=l:null===n.imageUploadToken&&p.push(i.Dr.LIST_PICTURE),"name"in n){if(!n.name)throw Error("Can not set empty playlist name!");d.name=n.name}if("description"in n&&(d.description=n.description),0===Object.keys(d).length&&0===p.length)return null;const m=(new s.a).updateListAttributes({newAttributes:{values:d,noValue:p}}).buildListChanges(),h=i.Qm.toJSON(m),f=await e.build().withMethod("POST").withHost(a.eX).withPath(`/playlist/${u}/changes`).withEndpointIdentifier("/playlist/{id}/changes").withoutMarket().withJsonContentType().withBody(h).send();return(0,o.tX)(f.body.revision)}async function c(e,t,n){const i=await e.build().withEndpointIdentifier("playlist/${id}/register-image").withHost(a.eX).withMethod("POST").withPath(`/playlist/${t}/register-image`).withJsonContentType().withBody({uploadToken:n}).withoutMarket().send();if(!i.body)throw new Error("No image id from registration!");return(0,o.tX)(i.body.picture)}},78905:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});const i="https://image-upload.spotify.com/v4";async function r(e,t){const n=await e.build().withEndpointIdentifier("image-upload/v4/playlist").withHost(i).withMethod("POST").withPath("/playlist").withBody(t).withoutGlobalHeaders().withHeaders([{key:"Content-Type",value:"image/jpeg"}]).withoutMarket().send();if(!n.body)throw new Error("No upload token recieved");return n.body.uploadToken}},15538:(e,t,n)=>{"use strict";n.d(t,{m:()=>r,z:()=>s});var i=n(91008);function r(e){const t=(0,i.o_h)(e);return t?t.id:""}function s(e){return e instanceof Error?e:new Error("Unknown error!")}},57764:(e,t,n)=>{"use strict";n.d(t,{W:()=>g,r:()=>E});var i=n(30758),r=n(29074),s=n(89273),a=n(16273),o=n(50486),l=n(24909),c=n(88308),u=n(19640),d=n(13719),p=n(96131);var m=n(7493);const h=(e,t,n)=>["usePlaylist",e,t,n],f=(e,t,n,i,r)=>()=>e.getPlaylist(t,{...i,withSync:n},r),g=(e,t,n)=>{const g=(0,r.m)(),E=(0,a.jE)(),_=(0,i.useRef)(t?.withSync),y=(0,c.U0)((()=>h(e,t,n)),[e,t,n]),{data:v,isLoading:b,isError:S}=(0,o.I)({queryKey:y(),queryFn:(...i)=>f(g,e,_.current,t,n)(...i),gcTime:36e5,staleTime:5e3,placeholderData:l.rX}),A=(0,i.useCallback)((()=>{_.current=!1,E.invalidateQueries({queryKey:y()})}),[E,y]);return(0,m.l)(A),(0,s.H)(e,A),((e,t,n=!1)=>{const r=(0,u.a)(),s=(0,i.useRef)(null),a=(0,i.useRef)(t);(0,i.useLayoutEffect)((()=>{a.current=t})),(0,i.useEffect)((()=>n?r.subscribeToMembers(e,((e,t)=>{const n=s.current,i=new Set(t?.members?.map((e=>e.user?.uri??null)).filter(d.P)??[]);n&&!(0,p.j)(n,i)&&a.current(),s.current=i})):()=>{}),[e,r,n])})(e,A,t?.hydrateCollaboratorsWithMembers),{data:v??null,isLoading:b,isError:S}},E=(e,t,n)=>{const s=(0,r.m)(),o=(0,a.jE)();return(0,i.useCallback)((()=>{const i=h(e,t,n),r=f(s,e,!1,t,n);o.prefetchQuery({queryKey:i,queryFn:r})}),[s,n,t,o,e])}},29074:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var i=n(30157),r=n(43863);function s(){return(0,i.N)(r.Ki)}},66834:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(30758),r=n(29074),s=n(88308);function a(...e){const[t,n,a]=e,o=(0,i.useRef)(n),l=(0,s.lB)((()=>a),[a]),c=(0,r.m)();o.current=n,(0,i.useEffect)((()=>c.getEvents().addListener(t,(e=>o.current(e)),l)),[c,t,l])}},11893:(e,t,n)=>{"use strict";n.d(t,{J:()=>u});var i=n(30758),r=n(29074),s=n(89273),a=n(16273),o=n(50486),l=n(24909),c=n(88308);const u=(e,t)=>{const n=(0,r.m)(),u=(0,a.jE)(),d=(0,i.useRef)(t?.withSync),p=(0,c.U0)((()=>["usePlaylistMetadata",e,t]),[t,e]),{data:m}=(0,o.I)({queryKey:p(),queryFn:()=>n.getMetadata(e,{...t,withSync:d.current}),gcTime:36e5,placeholderData:l.rX}),h=(0,i.useCallback)((()=>{d.current=!1,u.invalidateQueries({queryKey:p()})}),[u,p]);return(0,s.H)(e,h),m??null}},31:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var i=n(30758),r=n(29074),s=n(19640);function a(e){const t=(0,r.m)(),n=(0,s.a)();return{addItems:(0,i.useCallback)(((n,i)=>t.add(e,n,i)),[e,t]),moveItems:(0,i.useCallback)(((n,i)=>t.move(e,n,i)),[e,t]),removeItems:(0,i.useCallback)((n=>t.remove(e,n)),[e,t]),updateDetails:(0,i.useCallback)((n=>t.updateDetails(e,n)),[e,t]),uploadImage:(0,i.useCallback)((e=>t.uploadImage(e)),[t]),setPrivateState:(0,i.useCallback)((t=>n.setBasePermission(e,t?"BLOCKED":"VIEWER")),[n,e]),removeMember:(0,i.useCallback)((t=>n.removeMember(e,t)),[n,e])}}},89273:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var i=n(20150),r=n(66834);function s(e,t){(0,r.e)(i.Lj.UPDATE,(n=>{n.data.uri===e&&t(n)}),{uri:e})}},81752:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(30157),r=n(78565);function s(){return(0,i.N)(r.Yi)}},7884:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var i=n(81752),r=n(78119),s=n(16273),a=n(50486);function o(e){const t=(0,i._)(),n=(0,s.jE)(),o=["rootlist-contents",e];return(0,r.L)((()=>n.invalidateQueries({queryKey:o},{cancelRefetch:!0}))),(0,a.I)({queryKey:o,queryFn:()=>t.getContents(e),gcTime:864e5,staleTime:0}).data}},46069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(30758),r=n(81752);function s(){const e=(0,r._)();return{createFolder:(0,i.useCallback)(((t,n)=>e.createFolder(t,n)),[e]),createPlaylist:(0,i.useCallback)(((t,n)=>e.createPlaylist(t,n)),[e]),moveFolder:(0,i.useCallback)(((t,n)=>e.moveFolder(t,n)),[e]),removeFolder:(0,i.useCallback)((t=>e.removeFolder(t)),[e]),renameFolder:(0,i.useCallback)(((t,n)=>e.renameFolder(t,n)),[e]),addPlaylists:(0,i.useCallback)(((t,n)=>e.add(t,n)),[e]),movePlaylists:(0,i.useCallback)(((t,n)=>e.move(t,n)),[e]),removePlaylists:(0,i.useCallback)((t=>e.remove(t)),[e]),containsPlaylists:(0,i.useCallback)((t=>e.contains(t)),[e]),setPublishedState:(0,i.useCallback)(((t,n)=>e.setPublishedState(t,n)),[e])}}},78119:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,b:()=>l});var i=n(30758),r=n(94572),s=n(81752),a=n(88308);function o(e){const t=(0,s._)();(0,i.useEffect)((()=>t.getEvents().addListener(r.tD.UPDATE,e)),[e,t])}function l(...e){const[t,n,r]=e,o=(0,i.useRef)(n),l=(0,a.lB)((()=>r),[r]),c=(0,s._)();o.current=n,(0,i.useEffect)((()=>c.getEvents().addListener(t,(e=>o.current(e)),l)),[c,t,l])}},61714:(e,t,n)=>{"use strict";function i(e){return!!e&&(Array.isArray(e)?e.some((e=>"is-editorial-booklist"===e.key&&"true"===e.value)):"true"===e["is-editorial-booklist"])}n.d(t,{p:()=>i})},83785:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(7307);function r(e){return{url:e.url,width:e.width||void 0,height:e.height||void 0}}function s(e){return{type:i.c.USER,uri:e.uri,username:e.id,displayName:e?.display_name||null,images:e?.images?.map(r)||[]}}},40294:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=(0,n(36285).u)("ProductStateAPI")},82381:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(30758),r=n(90293);function s(){const e=(0,r.g)(),[t,n]=(0,i.useState)(!0),[s,a]=(0,i.useState)({}),[o,l]=(0,i.useState)(null);return(0,i.useEffect)((()=>{let t=!0;return e.getValues().then((e=>{t&&a(e)})).catch((e=>{t&&l(e)})).finally((()=>{t&&n(!1)})),()=>{t=!1}}),[e]),{isLoading:t,data:s,error:o}}},90293:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(30157),r=n(40294);function s(){return(0,i.N)(r.c)}},65292:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var i=n(16273),r=n(50486),s=n(90293),a=n(30758);const o=e=>{const t=(0,s.g)(),n=(0,i.jE)(),{data:o}=(0,r.I)({queryKey:["useProductStateValue",e],queryFn:async()=>await t.getValues(),select:t=>t?.[e],placeholderData:()=>t.getCachedValues()??void 0,gcTime:0});return(0,a.useEffect)((()=>t.subValues((()=>{n.invalidateQueries({queryKey:["useProductStateValue",e]})}))),[e,t,n]),o}},53249:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});const i=(0,n(36285).u)("PubSubAPI")},3339:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,K:()=>r});var i=n(93827);let r=function(e){return e.CONNECTION="connection",e.MESSAGE="push",e.SUBSCRIBE="subscribe",e.CANCEL="cancel",e.REFRESH="refresh",e.ERROR="error",e}({});class s extends i.V{}},19096:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var i=n(3339);const r="hm://";class s{static NEXT_SUBSCRIPTION_ID=0;_subscriptions=new Map;_messages=[];constructor(e,t,n){this._subscribeToConnectionId=e,this._subscribeToMessages=t,this._isDeveloperMode=n,this._events=new i.D,this._connectionId=new Promise((e=>{this._subscribeToConnectionId((t=>{this.onConnectionId(t),e(t),this._events.emit(i.K.CONNECTION,{connectionId:t})}))})),this._isDeveloperMode&&this.subscribe({ident:r,isPrefix:!0,onMessage:()=>{}})}onConnectionId(e){this._connectionId=Promise.resolve(e);for(const t of this._subscriptions.values())this.refreshSubscription(t,e)}getConnectionId(){return this._connectionId}async cancelSubscription(e){const t=this._subscriptions.get(e);if(void 0!==t)try{await(t.onCancel?.(t.connectionId)),this._events.emit(i.K.CANCEL,{ident:t.ident,isPrefix:t.isPrefix??!1})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}this._subscriptions.delete(e)}async createSubscription(e,t,n){if(n.aborted)return;const r=s.NEXT_SUBSCRIPTION_ID++,{ident:a,isPrefix:o,onMessage:l}=e;this._subscriptions.set(r,{...e,connectionId:t});const c=this._subscribeToMessages(a,o??!1,(e=>{l(e),this._isDeveloperMode&&(this._messages.unshift(e),this._messages.length>1e3&&this._messages.pop(),this._messages.splice(0,this._messages.length,...function(e,t){const n=new Map;return e.forEach((e=>{const i=t(e);n.has(i)||n.set(i,e)})),Array.from(n.values())}(this._messages,(e=>`${e.timestamp}-${e.ident}`)))),this._events.emit(i.K.MESSAGE,e)}));n.addEventListener("abort",(()=>{this.cancelSubscription(r),c.cancel()}),{once:!0});try{await(e.onSubscribe?.(t)),this._events.emit(i.K.SUBSCRIBE,{ident:a,isPrefix:o??!1})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to subscribe!",{cause:e}))}}async refreshSubscription(e,t){try{await(e.onCancel?.(e.connectionId))}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}try{const n=e.connectionId;await(e.onSubscribe?.(t)),e.connectionId=t,this._events.emit(i.K.REFRESH,{ident:e.ident,isPrefix:e.isPrefix??!1,oldConnectionId:n,newConnectionId:t})}catch(e){this._events.emit(i.K.ERROR,new Error("Error while trying to subscribe!",{cause:e}))}}subscribe(e){const t=new AbortController,n=t.signal;return this._connectionId.then((t=>this.createSubscription(e,t,n))),{cancel:()=>t.abort()}}getSubscriptions(){return Array.from(this._subscriptions.values()).filter((e=>!(e.ident===r&&!0===e.isPrefix)))}getMessages(){return this._messages}getEvents(){return this._events}}},69732:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});const i=(e,t)=>{const n=t?new URLSearchParams(t.search):void 0;return"1"===n?.get(e)}},35008:(e,t,n)=>{"use strict";n.d(t,{K5:()=>l,X6:()=>o,d2:()=>s,hr:()=>c,m5:()=>a});var i=n(36285),r=n(93827);let s=function(e){return e.ARTIST="artist",e.ALBUM="album",e.SHOW="show",e.AUDIOBOOK="audiobook",e.PLAYLIST="playlist",e.LIKED_SONGS="liked_songs",e.YOUR_EPISODES="your_episodes",e.TRACK="track",e}({}),a=function(e){return e.UPDATE="update",e}({});const o=(0,i.u)("RecentlyPlayedAPI");class l{}class c extends r.V{}},32810:(e,t,n)=>{"use strict";n.d(t,{fE:()=>l,q6:()=>o});var i=n(68355),r=n(65019);let s;function a({isAnonymous:e,transport:t,tokenProvider:n}){const{DEBUG_SEMANTIC_METRICS:s}={};if("1"===s)return[new i.ConsoleReporter];if(!t&&!n)throw new Error("[SemanticMetricsHelper] An instance of either transport or tokenProvider is required!");let a={environment:"undefined"!=typeof window?"browser":"nodejs"};return e||(a={...a,getToken:async e=>{if(n){const t=await(0,r.C)(n);e(await t())}else t&&e(t.getLastToken())}}),[(0,i.createUniversalReporter)(a),..."2"===s?[new i.ConsoleReporter]:[]]}function o(e,t,n=!1){const{sendMetric:r}=(0,i.createSemanticMetrics)({key:e,dev:!"production"?.startsWith("prod")&&!0,reporter:a({transport:t,isAnonymous:n})});s=r}async function l(e){if(!s)throw new Error("Invalid call to sendMetric before initSemanticMetrics.");return e.tags||(e.tags={}),"review_build"in e.tags||(e.tags.review_build="1"==={}.IS_REVIEW_BUILD?"true":"false"),s(e)}},96057:(e,t,n)=>{"use strict";n.d(t,{AX:()=>s,K$:()=>a,WY:()=>r,fZ:()=>l,uj:()=>o});var i=n(36285);let r=function(e){return e.PUBLISH_DATE="PUBLISH_DATE",e}({}),s=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),a=function(e){return e.AVAILABLE="AVAILABLE",e.TEXT="TEXT",e.NAME="NAME",e.ISPLAYED="ISPLAYED",e.STARTEDPLAYING="STARTEDPLAYING",e}({}),o=function(e){return e.CONTAINS="CONTAINS",e.EQUALS="EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.GREATER_THAN="GREATER_THAN",e}({});const l=(0,i.u)("ShowAPI")},36416:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,r:()=>s});var i=n(93827);let r=function(e){return e.UPDATE_RESUME_EPISODE_LINK="update_resume_episode_link",e.UPDATE_RATING="update_rating",e.UPDATE_PLAYED_STATE="update_played_state",e.UPDATE_SHOW_ACCESS="update_show_access",e}({});class s extends i.V{}},41833:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var i=n(37295),r=n(69962),s=n(44577);async function a(e){const{body:t}=await i.createCheckoutSession(new r.t,e),{redirectToUrl:n}=t;if(!new URL(n).hostname.endsWith(".spotify.com"))throw new Error("Unknown URL host");(0,s.g)()?window.open(n,"_blank"):window.location.assign(n)}},48076:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});const i={fromJSON:e=>({entityUris:globalThis.Array.isArray(e?.entityUris)?e.entityUris.map((e=>globalThis.String(e))):[]}),toJSON(e){const t={};return e.entityUris?.length&&(t.entityUris=e.entityUris),t},create:e=>i.fromPartial(e??{}),fromPartial(e){const t={entityUris:[]};return t.entityUris=e.entityUris?.map((e=>e))||[],t}};var r=n(23091);function s(e,t){return e.subscribe({ident:"hm://show-access/update/json",onMessage:e=>{const{entityUris:n}=i.fromJSON(JSON.parse((0,r.dI)(e.payloads[0])));t(n)}})}},38307:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var i=n(33549);class r extends i.e{constructor(e,t){super(e,t),this.redirectUri=t.redirectUri}}},69072:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>a});var i=n(82550),r=n(16157);function s(e){return void 0===e||0===e.length?null:e.some((e=>[i.UG.OAP_OTP,i.UG.AUDIOBOOK_DIRECT_SALES].includes(e)))?"OTP":e.some((e=>[i.UG.OAP_LINKING,i.UG.ANCHOR_PAYWALL].includes(e)))?"SUBSCRIPTION":"OTHER"}function a(e){return e?.length?e.some((e=>e&&[r.UG.OapOtp,r.UG.AudiobookDirectSales].includes(e)))?"OTP":e.some((e=>e&&[r.UG.OapLinking,r.UG.AnchorPaywall].includes(e)))?"SUBSCRIPTION":"OTHER":null}},18464:(e,t,n)=>{"use strict";n.d(t,{d:()=>a});var i=n(50486),r=n(62270);const s=3e5;function a(e){const t=(0,r.T)(),{data:n,isError:a}=(0,i.I)({queryKey:["useEpisodeOrChapter",e],queryFn:()=>t.getEpisodeOrChapter(e),gcTime:s,retry:(e,t)=>!t});return n||a?{isError:a,episodeOrChapter:n}:null}},62270:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var i=n(96057),r=n(30157);function s(){return(0,r.N)(i.fZ)}},96571:(e,t,n)=>{"use strict";n.d(t,{W:()=>p});var i=n(16273),r=n(50486),s=n(62270),a=n(41031),o=n(30758),l=n(38307),c=n(36416);var u=n(7493);const d=3e5;function p(e){const t=(0,s.T)(),n=(0,i.jE)(),p=(0,o.useCallback)((()=>["useShowMetadata",e]),[e]),{data:m,error:h}=(0,r.I)({queryKey:p(),queryFn:()=>t.getMetadata(e),gcTime:d,refetchOnWindowFocus:!1,retry:(e,t)=>!(t.message===a.Xz.RestrictedContent||t instanceof l.W)&&e<3}),f=(0,o.useCallback)((()=>{m&&n.invalidateQueries({queryKey:p()})}),[m,p,n]);(0,u.l)(f),function({callback:e,uri:t}){const n=(0,s.T)();(0,o.useEffect)((()=>n.getEvents().addListener(c.K.UPDATE_RATING,(n=>{n.data.uri!==t&&void 0!==n.data.uri||e(n)}))),[n,t,e])}({callback:f,uri:e}),(0,o.useEffect)((()=>t.getEvents().addListener(c.K.UPDATE_RESUME_EPISODE_LINK,(e=>{n.setQueryData(p(),(t=>t?{...t,resumeEpisodeLink:e.data.resumeEpisodeLink,invalidateCache:f}:t))}),{uri:e})),[p,f,n,t,e]),(0,o.useEffect)((()=>t.getEvents().addListener(c.K.UPDATE_SHOW_ACCESS,(t=>{t.data.uri===e&&(f(),setTimeout(f,5e3))}),{uri:e})),[p,f,n,t,e]);const g=(0,o.useCallback)((async()=>{await t.invalidateShowMetadataCaches(e),f()}),[f,t,e]);return h?{data:null,error:h,redirectUri:h instanceof l.W?h.redirectUri:void 0,invalidateCache:g}:{data:m??null,invalidateCache:g}}},79678:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var i=n(16273),r=n(50486),s=n(62270),a=n(58685),o=n(30758),l=n(86931);const c=e=>{const t=(0,s.T)(),n=(0,i.jE)(),c=(0,o.useRef)(null),u=(0,o.useRef)(0),d=(0,a.o)((t=>t?.context.uri===e?t?.item?.uri??null:null)),[p]=(0,l.S)(1e4,(e=>e?.item?.uri===d)),{data:m}=(0,r.I)({queryKey:["useShowPlayedState",e],queryFn:async()=>{const n=t.getShowPlayedState(e);return u.current=p,n},refetchOnWindowFocus:!1});return(0,o.useEffect)((()=>{c.current&&d!==c.current&&n.invalidateQueries({queryKey:["useShowPlayedState",e]}),c.current=d}),[d,n,e]),(0,o.useMemo)((()=>m&&t.capabilities.canGetShowPlayedState?{state:m.state,playPositionMilliseconds:m.playPositionMilliseconds+p-u.current}:null),[m,t,p])}},41031:(e,t,n)=>{"use strict";n.d(t,{Cx:()=>s,Go:()=>d,Gr:()=>p,H7:()=>o,Uk:()=>l,Xz:()=>c,_w:()=>a,t5:()=>u,x7:()=>r});var i=n(7307);let r=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),s=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),a=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),o=function(e){return e.Unknown="UNKNOWN",e.NotStarted="NOT_STARTED",e.InProgress="IN_PROGRESS",e.Completed="COMPLETED",e.Unrecogniced="UNRECOGNIZED",e}({}),l=function(e){return e.AgeRestricted="AGE_RESTRICTED",e.Anonymous="ANONYMOUS",e.CatalogueRestricted="CATALOGUE_RESTRICTED",e.CountryRestricted="COUNTRY_RESTRICTED",e.Explicit="EXPLICIT",e.PaymentRequired="PAYMENT_REQUIRED",e.Playable="PLAYABLE",e.Unavailable="UNAVAILABLE",e.Unknown="UNKNOWN",e}({}),c=function(e){return e.RestrictedContent="Restricted content",e.Generic="Error while requesting the show metadata",e}({}),u=function(e){return e.UNKNOWN="unknown",e.TRAILER="trailer",e.CONTINUE_LISTENING="continue-listening",e.LATEST_PUBLISHED="latest-published",e.UP_NEXT="up-next",e.FIRST_PUBLISHED="first-published",e}({});function d(e){return e.type===i.c.AUDIOBOOK}function p(e){return e.type===i.c.CHAPTER}},91742:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(72671);const r=async(e,t,n)=>{const r=e.build();try{const e=await r.withMethod("POST").withHost(i.CC).withPath(`/rating/show/${t}`).withBody({rating:n}).withJsonContentType().withResponseType("json").send();return e.body?{showUri:e.body.show_uri,rating:e.body.rating,ratedAt:new Date(e.body.rated_at)}:null}catch(e){throw new Error("Error while rating show",{cause:e})}}},35529:(e,t,n)=>{"use strict";n.d(t,{Te:()=>P,xh:()=>y,el:()=>f,Ar:()=>g,Gv:()=>L,S:()=>v,_v:()=>T,Wt:()=>h,pE:()=>w,e$:()=>O});var i=n(31417),r=n(16157),s=n(7307),a=n(41031);const o="recent";var l=n(69072),c=n(34647),u=n(13719),d=n(68406),p=n(52971),m=n(61983);function h(e){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Episode"!==e.entity.data.__typename?null:v(e.entity.data)))}}function f(e,t){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Chapter"===e.entity.data.__typename?b(e.entity.data,t):null))}}function g(e,t){return"Chapter"===e.__typename?b(e,t):v(e)}function E(e){switch(e){case r.$c.AgeRestricted:return a.Uk.AgeRestricted;case r.$c.CatalogueRestricted:return a.Uk.CatalogueRestricted;case r.$c.CountryRestricted:return a.Uk.CountryRestricted;case r.$c.Explicit:return a.Uk.Explicit;case r.$c.PaymentRequired:return a.Uk.PaymentRequired;case r.$c.Playable:return a.Uk.Playable;case r.$c.Unavailable:default:return a.Uk.Unavailable}}function _(e,t=!1){return{playable:!t&&e.playable,reason:t?a.Uk.Anonymous:E(e.reason)}}function y(e){return e.previewPlayback?.audioPreview?.cdnUrl?{url:e.previewPlayback.audioPreview.cdnUrl}:null}function v(e){const t="Podcast"!==(n=e.podcastV2).data.__typename?null:{uri:n.data.uri,name:n.data.name,coverArt:n.data.coverArt?.sources||[],trailer:(i=n.data.trailerV2,("Episode"===i?.data.__typename?{uri:i.data.uri}:null)||null),showTypes:(n.data.showTypes||[]).filter(S)};var n,i;const r=(0,c.Wx)(e?.restrictions,e.playability),a="gatedEntityRelations"in e?e.gatedEntityRelations:null,o=(0,d.p)(a)?.accessInfo,l=(0,d.v)(o);return{type:s.c.EPISODE,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",podcast:t,episodeType:e.type,mediaTypes:e.mediaTypes,coverArt:e.coverArt?.sources||[],audio:e.audio,releaseDate:(u=e.releaseDate,u?{isoString:u.isoString,precision:u.precision}:null),playedState:e.playedState,playability:_(e.playability),audioPreview:y(e),sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,segmentsCount:0,podcastSubscription:r,contentInformation:e.contentInformation,transcript:e.transcripts?.items||null,upsellExplanation:l?R(l):null,gatedEntityRelations:a?L(a):null,hasGatedEntityRelationAccess:Boolean(o?.isUserMemberOfAtLeastOneGroup)};var u}function b(e,t){return{type:s.c.CHAPTER,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",coverArt:e.coverArt?.sources||[],audio:e.audio,playedState:e.playedState,audioPreview:e.audioPreview,sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,playability:_(e.playability,t),book:I(e.audiobookV2),isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus}}function S(e){return!!e}function A(e){return Boolean(e)}function C(e){const t=e.nextBestEpisodes.items.sort(((e,t)=>t.score-e.score)),n=t[0]?.item.data;if("Episode"!==n?.__typename)return;const i="ContextEpisodePage"===e.episodesV2?.__typename?e.episodesV2.items.at(0):null;let s,o="";e.consumptionOrderV2===r.y3.Recent&&i&&"EpisodeResponseWrapper"===i.entity.__typename&&"Episode"===i.entity.data.__typename&&(o=i.entity.data.uri);const l="Episode"===e.trailerV2?.data.__typename?e.trailerV2.data.uri:null;return s=n.uri===l?a.t5.TRAILER:n.playedState.state===r._w.InProgress?a.t5.CONTINUE_LISTENING:(0,p.B2)(n.uri,o)?a.t5.LATEST_PUBLISHED:a.t5.UP_NEXT,{type:s,data:v(n)}}function T(e){const t="Episode"===e.trailerV2?.data.__typename?(n=e.trailerV2.data,{type:s.c.EPISODE,uri:n.uri,name:n.name,coverArt:n.coverArt?.sources||[],audio:n.audio,audioPreview:y(n),sharingInfo:n.sharingInfo,duration:{milliseconds:n.duration.totalMilliseconds},contentRating:n.contentRating,mediaTypes:n.mediaTypes}):null;var n;const i=(0,l.q)(e?.accessInfo?.unlockedBy),r="gatedEntityRelations"in e?e.gatedEntityRelations:null,a=(0,d.p)(r),c=(0,d.v)(a?.accessInfo);return{type:s.c.SHOW,uri:e.uri,name:e.name,description:e.description||"",htmlDescription:e.htmlDescription||"",coverArt:e.coverArt?.sources||[],trailer:t,topics:e.topics.items,podcastType:e.musicAndTalk?"SHOW":"PODCAST",showTypes:(e.showTypes||[]).filter(S),publisherName:e.publisher?.name||"",consumptionOrder:o,nextBestEpisode:C(e),gatedContentAccessReason:i,isLocked:null===i,rating:e.rating,isSaved:e.saved,gatedEntityRelations:r?L(r):null,hasGatedEntityRelationAccess:Boolean(!!a&&a?.accessInfo?.isUserMemberOfAtLeastOneGroup),upsellExplanation:c?R(c):null,gatedEntityCoverArt:a?.coverArt?.sources||null}}function I(e){if("Audiobook"!==e.data.__typename)return null;const t=e.data;return{uri:t.uri,name:t.name,coverArt:t.coverArt?.sources||[],trailer:(n=t,"Chapter"===n.trailerV2?.data.__typename?{uri:n.trailerV2.data.uri}:null)};var n}function O(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,n=e?.unlockedBy?.includes(r.UG.Abp);return t&&!n}function w(e,t){return"Audiobook"===e.__typename?function(e,t){return{type:s.c.AUDIOBOOK,uri:e.uri,name:e.name,coverArt:e.coverArt?.sources??[],narrators:e.narrators?.map((e=>e?.name)).filter(A)??[],sample:"Chapter"===e.trailerV2?.data.__typename?(c=e.trailerV2.data,{type:s.c.CHAPTER,uri:c.uri,name:c.name,coverArt:c.coverArt?.sources||[],audio:c.audio,audioPreview:c.audioPreview,sharingInfo:c.sharingInfo,duration:{milliseconds:c.duration.totalMilliseconds},contentRating:c.contentRating,isPlayable:c.playability.playable}):null,htmlDescription:e.htmlDescription??"",htmlDescriptionPlain:e.htmlDescriptionPlain??"",authorName:e.authors?.map((e=>e?.name)).filter(Boolean).join(i.Ru.getSeparator())??"",rating:e.rating,isExplicit:e.contentRating?.label===r.x7.Explicit,duration:e.duration?.totalMilliseconds??0,copyrights:e.publisher?(n=e.publisher.name,a=e.copyrights,[(o=n,l="P",{text:o,type:l}),...a.items]):[],publishDate:e.publishDate?new Date(e.publishDate.isoString):null,price:e.price,isLocked:!!t||O(e.accessInfo),consumptionCapExplanation:(0,m.e)(e.accessInfo),signifierText:e.accessInfo?.signifier?.text??void 0,topics:e.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))||[],isPreRelease:(e.isPreRelease&&!e.accessInfo?.isUserMemberOfAtLeastOneGroup)??!1,preReleaseEndDateTime:e.preReleaseEndDateTime?new Date(e.preReleaseEndDateTime.isoString):void 0,isSaved:e.saved};var n,a,o,l,c}(e,t):T(e)}function N(e){return null!==e.displayText}function R({title:e,body:t,actionText:n,url:i}){return e&&t&&n&&i?{title:e,body:t,cta:n,url:i}:null}function P(e){if(!e)return{};const t=e.accessInfo?.accessExplanation;let n;switch("Podcast"===e.__typename&&"gatedEntityRelations"in e&&(n=e.gatedEntityRelations),t?.__typename){case"UpsellAccessExplanation":return{upsellLink:{title:t?.title||"",body:t?.body||"",cta:t?.actionText||"",url:t?.url||""},gatedEntityRelations:n&&L(n)};case"BasicAccessExplanation":return{basic:{title:t?.title||"",body:t?.body||"",cta:t?.actionText||""}};case"MultiPassAccessExplanation":{const e=[];return t?.soaPartners?.forEach((t=>{t&&e.push({displayName:t.displayName||"",linkUrl:t.linkUrl||"",logoUrl:t.logoUrl||""})})),{multiPass:{title:t?.title||"",body:t?.body||"",soaPartners:e}}}case"ConsumptionCappedAccessExplanation":return{consumptionCapped:{title:t?.title||"",body:t?.body||"",cta:t?.actionText||"",ctaUrl:t?.ctaUrl||"",dismiss:t?.dismiss||""}};default:return{}}}function L(e){return{entitiesWithValueProps:e.map((({badges:e,relatedEntity:t,summary:n,fallbackGatedEntity:i})=>"EpisodeResponseWrapper"===t?.__typename||"PodcastResponseWrapper"===t?.__typename?{uri:t._uri,summary:n?.forUserWithoutAccess?{forUserWithoutAccess:n.forUserWithoutAccess,forUserWithAccess:n.forUserWithAccess??void 0}:void 0,valueProps:e.filter(N),fallbackNavigation:i?.description?{uri:i.uri,description:i?.description}:void 0}:null)).filter(u.P)}}},68406:(e,t,n)=>{"use strict";n.d(t,{p:()=>i,v:()=>r});const i=e=>{const t=e?.at(0)?.relatedEntity;return t?"EpisodeResponseWrapper"===t.__typename&&"Episode"===t.data?.__typename&&"Podcast"===t.data.podcastV2.data.__typename?{accessInfo:t.data.podcastV2.data.accessInfo,coverArt:t.data.podcastV2.data.coverArt}:"PodcastResponseWrapper"===t.__typename&&"Podcast"===t.data?.__typename?{accessInfo:t.data.accessInfo,coverArt:t.data.coverArt}:null:null},r=e=>e&&"UpsellAccessExplanation"===e?.accessExplanation?.__typename?e.accessExplanation:null},24549:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});const i=(0,n(36285).u)("ShuffleAPI")},11336:(e,t,n)=>{"use strict";n.d(t,{L:()=>s,S:()=>r});var i=n(93827);let r=function(e){return e.UPDATE="update",e.UPDATE_COMPLETE="update_complete",e.UPDATE_ERROR="update_error",e}({});class s extends i.V{emitUpdateShuffleModeSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE,{shuffleMode:t,contextURI:e});return n}emitUpdateShuffleModeCompleteSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_COMPLETE,{shuffleMode:t,contextURI:e});return n}emitUpdateShuffleModeErrorSync(e,t){const{defaultPrevented:n}=this.emitSync(r.UPDATE_ERROR,{shuffleMode:t,contextURI:e});return n}}},74147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(23289);async function r(e,t){const n=e.getState()?.context?.uri;if(n){await t.getShuffle(n)===i.j.SMART_SHUFFLE&&t.setShuffle(n,i.j.ON)}}},71581:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});const i=(e,t)=>{const n=()=>{e.getValues().then((e=>{t("1"===e["dsa-mode-enabled"])}))};n(),e.subValues(n)}},31106:(e,t,n)=>{"use strict";n.d(t,{B:()=>s});var i=n(91008),r=n(23289);async function s(e,t,n,s,a){const o=!(!!t&&(0,i.B2u)(e,t))||n,l=o&&await s(e);return(a?[r.j.OFF,r.j.SMART_SHUFFLE,r.j.ON]:[r.j.OFF,r.j.ON,r.j.SMART_SHUFFLE]).filter((e=>e===r.j.ON?o:e!==r.j.SMART_SHUFFLE||l))}},32781:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d});var i=n(22795),r=n.n(i);let s=function(e){return e[e.NOT_ENHANCED=0]="NOT_ENHANCED",e[e.RECOMMENDATION=1]="RECOMMENDATION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({}),a=function(e){return e[e.UNKNOWN_FIELD_ID=0]="UNKNOWN_FIELD_ID",e[e.AUDIO_QUALITY=1]="AUDIO_QUALITY",e[e.SOCIAL_DISCOVERABLE=2]="SOCIAL_DISCOVERABLE",e[e.PLAYBACK_SPEED=3]="PLAYBACK_SPEED",e[e.SHUFFLE=4]="SHUFFLE",e[e.CONTEXT_ENHANCEMENT=5]="CONTEXT_ENHANCEMENT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const o={encode:(e,t=r().Writer.create())=>(void 0!==e.stringValue&&t.uint32(10).string(e.stringValue),void 0!==e.boolValue&&t.uint32(16).bool(e.boolValue),void 0!==e.intValue&&t.uint32(24).int32(e.intValue),void 0!==e.floatValue&&t.uint32(37).float(e.floatValue),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={stringValue:void 0,boolValue:void 0,intValue:void 0,floatValue:void 0};for(;n.pos>>3){case 1:if(10!==e)break;s.stringValue=n.string();continue;case 2:if(16!==e)break;s.boolValue=n.bool();continue;case 3:if(24!==e)break;s.intValue=n.int32();continue;case 4:if(37!==e)break;s.floatValue=n.float();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={stringValue:void 0,boolValue:void 0,intValue:void 0,floatValue:void 0};return t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.intValue=e.intValue??void 0,t.floatValue=e.floatValue??void 0,t}};const l={encode:(e,t=r().Writer.create())=>(0!==e.id&&t.uint32(8).int32(e.id),void 0!==e.value&&o.encode(e.value,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={id:0,value:void 0};for(;n.pos>>3){case 1:if(8!==e)break;s.id=n.int32();continue;case 2:if(18!==e)break;s.value=o.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={id:0,value:void 0};return t.id=e.id??0,t.value=void 0!==e.value&&null!==e.value?o.fromPartial(e.value):void 0,t}};const c={encode(e,t=r().Writer.create()){""!==e.contentId&&t.uint32(18).string(e.contentId);for(const n of e.changedFields)l.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof r().Reader?e:r().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={contentId:"",changedFields:[]};for(;n.pos>>3){case 2:if(18!==e)break;s.contentId=n.string();continue;case 3:if(26!==e)break;s.changedFields.push(l.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return s},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={contentId:"",changedFields:[]};return t.contentId=e.contentId??"",t.changedFields=e.changedFields?.map((e=>l.fromPartial(e)))||[],t}};var u=n(23289);function d(e,t){return e.subscribe({ident:"playback-settings/content-settings-update",isPrefix:!0,onMessage:e=>{const n=c.decode(e.payloads[0]),{contentId:i,changedFields:r}=n,o=r.find((({id:e})=>e===a.SHUFFLE))?.value?.boolValue,l=r.find((({id:e})=>e===a.CONTEXT_ENHANCEMENT))?.value?.intValue;let d;l===s.RECOMMENDATION?d=u.j.SMART_SHUFFLE:!0===o?d=u.j.ON:!1===o&&(d=u.j.OFF),void 0!==d&&t(i,d)}})}},40535:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(58752);function r(e,t,n){const r=new Map;return e.getEvents().addListener(i.$.UPDATE_COMPLETE,(({data:{contextURI:e,shuffleMode:i}})=>{r.get(e)!==i&&(r.set(e,i),t(e,i).then((()=>{n.emitUpdateShuffleModeCompleteSync(e,i)}),(()=>n.emitUpdateShuffleModeErrorSync(e,i))))}))}},23289:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});let i=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({})},81861:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(85907),r=n(23289);const s=e=>{switch(e){case r.j.OFF:return!1;case r.j.ON:case r.j.SMART_SHUFFLE:return!0;default:return(0,i.k)(e),!1}}},32257:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var i=n(23289);function r(e){return"true"===e?.context.metadata?.enhanced_context?i.j.SMART_SHUFFLE:!0===e?.shuffle?i.j.ON:!1===e?.shuffle?i.j.OFF:void 0}},90862:(e,t,n)=>{"use strict";n.d(t,{Y9:()=>r,nW:()=>s,qh:()=>a});var i=n(36285);let r=function(e){return e[e.HIGH=.25]="HIGH",e[e.LOW=.1]="LOW",e[e.SING_ALONG_OFF=.99999]="SING_ALONG_OFF",e}({}),s=function(e){return e.ENABLED="enabled",e.DISABLED="disabled",e}({});const a=(0,i.u)("SingAlongAPI")},13569:(e,t,n)=>{"use strict";n.d(t,{z:()=>i});const i=(0,n(36285).u)("SmartShuffleEligibilityAPI")},35685:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});const i=(0,n(36285).u)("SocialConnectAPI")},51975:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var i=n(52266),r=n(6530);class s extends i.s{}class a{constructor(){this._events=new s({current:null})}getLocalNetSessionDevices(){return null}async startBroadcastingLocalNetSessionDevice(){}async stopBroadcastingLocalNetSessionDevice(){}handleBroadcastStatusUpdate(){}handleWifiBroadcastUpdate(){}getLocalNetSesssionDeviceVisibility(){return Promise.resolve(r.MS.UNRECOGNIZED)}setBroadcastStatus(){return Promise.resolve()}getEvents(){return this._events}}},76562:(e,t,n)=>{"use strict";n.d(t,{o:()=>h});var i=n(64629),r=n(8046),s=n(35163);function a(e,t,n){return t.filter((t=>!function(e,t,n){return e.find((e=>e[t]===n))??null}(e,n,t[n])))}var o=n(85515),l=n(31417),c=n(92976);function u(e){const{id:t,username:n,display_name:i,image_url:r,large_image_url:s}=e;return{id:t,username:n,displayName:i,imageUrl:r,largeImageUrl:s}}function d(e,t,n){const{timestamp:i,session_id:r,join_session_token:s,session_owner_id:a,session_members:o,join_session_uri:l,is_session_owner:c,active:d,queue_only_mode:p,participantVolumeControl:m,wifi_broadcast:h,hostActiveDeviceId:f,host_device_info:g}=e;return{timestamp:i,sessionId:r,isSessionOwner:c,joinSessionToken:s??"",joinSessionShortLink:t,joinSessionShortLinkQR:n,sessionOwnerId:a??"",sessionMembers:o?.map(u)??[],joinSessionUri:l??"",queueOnlyMode:p,participantVolumeControl:m??"UNAVAILABLE",active:d??!1,wifiBroadcast:h??!1,hostActiveDeviceId:f??"",deviceName:g?.device_name??"",deviceType:g?.device_type}}var p=n(85907);var m=n(97265);class h{_fetchCurrentSessionInFlightCache=new o.od;constructor(e,t,n,s,a,l,c){this.socialConnectServiceClient=e,this.serviceEvents=t,this.urlDispenserServiceClient=n,this.socialConnectProductState=s,this.socialConnectConfig=a,this.waitForActiveOrLocalDeviceId=l,this.socialConnectBroadcastingAPI=c,this.socialConnectServiceClient=e,this.currentSession=null,this.events=new i.z,this.waitForActiveOrLocalDeviceId=l,this.shortLinkCaches={shortLinkCache:new o.fq,shortLinkQRCache:new o.fq},this.serviceEvents.addListener(r.n.SESSION_UPDATE,this.handleSessionUpdate.bind(this)),this.serviceEvents.addListener(r.n.SESSION_MESSAGE,this.handleSessionMessage.bind(this)),this.socialConnectServiceClient.onConnected(this.fetchCurrentSession.bind(this))}async handleSessionUpdate({data:e}){const t=this.getShortInviteLink(e.session.join_session_token,e.session.join_session_uri),n=this.getShortInviteLink(e.session.join_session_token,e.session.join_session_uri,!0),[i,r]=await Promise.all([t,n]),s=d(e.session,i,r);if(this.isSessionNewer(s))switch(e.reason){case c.YM.YOU_LEFT:case c.YM.YOU_WERE_KICKED:this.cleanupSession();break;case c.YM.SESSION_DELETED:this.currentSession&&this.emitSessionEnded(this.currentSession),this.cleanupSession();break;case c.YM.USER_JOINED:case c.YM.USER_LEFT:this.maybeEmitLeaveOrJoin(s,e.reason),this.setCurrentSession(s);break;case c.YM.YOU_JOINED:case c.YM.USER_KICKED:case c.YM.UNKNOWN_UPDATE_TYPE:case c.YM.NEW_SESSION:case c.YM.PARTICIPANT_PROMOTED_TO_HOST:case c.YM.VOLUME_CONTROL_PERMISSIONS_CHANGED:case c.YM.QUEUE_ONLY_MODE_CONTROL_CHANGED:case c.YM.WIFI_BROADCAST_CHANGED:case c.YM.ACTIVE_DEVICE_CHANGED:case c.YM.SESSION_MEMBER_UPDATED:case c.YM.SESSION_ACTIVATED:this.setCurrentSession(s);break;default:(0,p.d)(e.reason)}}handleSessionMessage({data:e}){this.events.emit(i.K.SESSION_MESSAGE,e.userMessage)}isSessionNewer(e){const t=parseInt(this.currentSession?.timestamp??"0",10);return parseInt(e.timestamp,10)>t}getEnabled(){return this.socialConnectConfig}getJamExperience(){return this.socialConnectProductState.getJamExperience()}addJamExperienceListener(e){return this.socialConnectProductState.addListener(e)}getCurrentSession(){return this.currentSession}cleanupSession(){this.shortLinkCaches.shortLinkCache.clear(),this.shortLinkCaches.shortLinkQRCache.clear(),this.setCurrentSession(null),this.socialConnectBroadcastingAPI.stopBroadcastingLocalNetSessionDevice()}emitSessionEnded(e){const t=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId))?.displayName??null;this.events.emit(i.K.SESSION_ENDED,{sessionId:e.sessionId??null,isSessionOwner:e.isSessionOwner??null,hostDisplayName:t})}maybeEmitLeaveOrJoin(e,t){if(!this.currentSession)return;if(this.currentSession.sessionId!==e.sessionId)return;const n=t===c.YM.USER_JOINED?a(this.currentSession.sessionMembers,e.sessionMembers,"id"):a(e.sessionMembers,this.currentSession.sessionMembers,"id");if(n.length<1)return;const r=Array.from(n,(e=>e.displayName)),s=t===c.YM.USER_JOINED?i.K.JOINED:i.K.LEFT;this.events.emit(s,{sessionId:this.currentSession.sessionId,isSessionOwner:this.currentSession.isSessionOwner,users:r})}setCurrentSession(e){this.currentSession=e,this.events.emit(i.K.UPDATE,e),e?.wifiBroadcast?this.socialConnectBroadcastingAPI.startBroadcastingLocalNetSessionDevice(e):this.socialConnectBroadcastingAPI.stopBroadcastingLocalNetSessionDevice()}getEvents(){return this.events}async handleSessionResponse(e){if(!e||!e.join_session_token||!e.join_session_uri)return this.cleanupSession(),null;const t=d(e,await this.getShortInviteLink(e.join_session_token,e.join_session_uri),await this.getShortInviteLink(e.join_session_token,e.join_session_uri,!0));return(e.session_id!==this.currentSession?.sessionId||this.isSessionNewer(t))&&this.setCurrentSession(t),t}async fetchCurrentSession(){try{const e=await this._fetchCurrentSessionInFlightCache.create("fetchCurrentSession",(async()=>this.socialConnectServiceClient.fetchCurrentSession(await this.waitForActiveOrLocalDeviceId()))),t=e?.session??null;return e?.device_broadcast_status&&this.socialConnectBroadcastingAPI.handleBroadcastStatusUpdate(e.device_broadcast_status.broadcast_status),this.handleSessionResponse(t)}catch(e){return(0,s.UD)(e),null}}async createSession(){try{const e=await this.socialConnectServiceClient.createSession();return this.handleSessionResponse(e)}catch(e){return(0,s.UD)(e),null}}async leaveSession(){let e=!1;if(this.currentSession)try{e=await this.socialConnectServiceClient.leaveSession(this.currentSession.sessionId)}catch(e){(0,s.UD)(e)}finally{this.cleanupSession()}return e}async deleteSession(){let e=!1;if(this.currentSession)try{e=await this.socialConnectServiceClient.deleteSession(this.currentSession.sessionId)}catch(e){(0,s.UD)(e)}finally{this.cleanupSession()}return e}async joinSession(e,t,n,i){const r=await this.socialConnectServiceClient.joinSession(e,t,n,i);return this.handleSessionResponse(r)}async getSessionInfo(e){const t=await this.socialConnectServiceClient.getSessionInfo(e);return t?d(t,null,null):null}async getJoinTokenFromConnectDeviceId(e){const t=await m.V.hash(e),n=this.socialConnectBroadcastingAPI.getLocalNetSessionDevices(),i=n?.devices.find((e=>e.deviceId===t));return i?.token??null}async removeSessionMember(e){if(this.currentSession)try{const t=await this.socialConnectServiceClient.removeSessionMember(this.currentSession.sessionId,e);return this.handleSessionResponse(t)}catch(e){return(0,s.UD)(e),null}return null}async kickAllParticipants(e){if(this.currentSession)try{const t=await this.socialConnectServiceClient.kickAllParticipants(e);return this.handleSessionResponse(t)}catch(e){return(0,s.UD)(e),null}return null}async getShortInviteLink(e,t,n){if(!e||!t)return null;let i=null;if(i=n?this.shortLinkCaches.shortLinkQRCache.get(e):this.shortLinkCaches.shortLinkCache.get(e),i)return i;try{const i={utm_campaign:null,utm_term:null,utm_medium:n?"qr":"share-link",utm_content:null,utm_source:"share-options-sheet"},s=[{key:"ssp",value:"1"},{key:"app_destination",value:"socialsession"}],a={title:l.Ru.get("web-player.social-connect.share.title"),image_url:`https://shareables.scdn.co/publish/socialsession/${e}`},o=await this.urlDispenserServiceClient.getShortUrl(t,{utmParameters:i,customData:s,linkPreview:a}),c={shareableUrl:(r=o).shareable_url,shareId:r.share_id,spotifyUri:r.spotify_uri};return n?this.shortLinkCaches.shortLinkQRCache.set(e,c):this.shortLinkCaches.shortLinkCache.set(e,c),c}catch(e){return(0,s.UD)(e),null}var r}async setQueueOnlyMode(e){const t=await this.socialConnectServiceClient.setQueueOnlyMode(e);return this.handleSessionResponse(t)}async setParticipantVolumeControl(e){const t=await this.socialConnectServiceClient.setParticipantVolumeControl(e);return this.handleSessionResponse(t)}getLocalNetSessionDevices(){return this.socialConnectBroadcastingAPI.getLocalNetSessionDevices()}setBroadcastStatus(e){return this.socialConnectBroadcastingAPI.setBroadcastStatus(e)}getBroadcastingEvents(){return this.socialConnectBroadcastingAPI.getEvents()}getLocalNetSesssionDeviceVisibility(e){return this.socialConnectBroadcastingAPI.getLocalNetSesssionDeviceVisibility(e)}}},64629:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,z:()=>s});var i=n(93827);let r=function(e){return e.UPDATE="update",e.SESSION_ENDED="session_ended",e.JOINED="joined",e.LEFT="left",e.SESSION_MESSAGE="session_message",e}({});class s extends i.V{}},52266:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,s:()=>s});var i=n(93827);let r=function(e){return e.BROADCAST_STATUS_UPDATE="broadcast_status_update",e.SCAN_UPDATE="scan_update",e.BROADCAST_NUDGE="broadcast_nudge",e}({});class s extends i.V{constructor(e){super(),this.broadcastStatus=e,this.onAddListener(r.BROADCAST_STATUS_UPDATE,(e=>{const t=this.broadcastStatus.current;t&&e.data.listener(this.createEvent(r.BROADCAST_STATUS_UPDATE,t))}))}}},8046:(e,t,n)=>{"use strict";n.d(t,{M:()=>s,n:()=>r});var i=n(93827);let r=function(e){return e.SESSION_UPDATE="SESSION_UPDATE",e.SESSION_MESSAGE="SESSION_MESSAGE",e}({});class s extends i.V{numUpdateListeners=0;numMessageListeners=0;constructor(){super(),this.onAddListener(r.SESSION_UPDATE,(()=>{this.numUpdateListeners++,1===this.numUpdateListeners&&this.subscribeToUpdates()})),this.onRemoveListener(r.SESSION_UPDATE,(()=>{this.numUpdateListeners--,0===this.numUpdateListeners&&this.unsubscribeToUpdates()})),this.onAddListener(r.SESSION_MESSAGE,(()=>{this.numMessageListeners++,1===this.numMessageListeners&&this.subscribeToMessages()})),this.onRemoveListener(r.SESSION_MESSAGE,(()=>{this.numMessageListeners--,0===this.numMessageListeners&&this.unsubscribeToMessages()}))}}},11837:(e,t,n)=>{"use strict";n.d(t,{v:()=>i});const i=(0,n(36285).u)("JamDevicesAPI")},85856:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var i=n(3225),r=n(330);const s=e=>"fulfilled"===e.status;class a{constructor(e){this.socialConnectAPI=e}async getJamDevices(){const e=(this.socialConnectAPI.getLocalNetSessionDevices()?.devices??[]).map((async e=>({device:e,jamSessionState:await this.socialConnectAPI.getSessionInfo(e.token)})));return await Promise.allSettled(e).then((e=>e.filter(s).map((e=>e.value))))}async fetchAndMatchJamsForDevices(e,t){const n=await this.getJamDevices(),r=e.map((e=>(0,i.gS)(e))),{matchedJamsIndexes:s,mergedDeviceList:a}=this.mergeJamsWithEntities(r,n),o=this.cleanupJams(n,s,t);return a.push(...this.createNearbyJamRowEntities(o)),a}areTheSame(e,t){return void 0!==e&&null!==t&&(e.includes(t)||t.includes(e))}removeJamIfWeAreOnItAlready(e,t){const n=e.findIndex((e=>this.areTheSame(e.jamSessionState?.sessionId,t)));return-1!==n?e.filter(((e,t)=>t!==n)):e.filter((e=>!0!==e.jamSessionState?.isSessionOwner))}removeMatchedJams(e,t){return e.filter(((e,n)=>!t.includes(n)))}createNearbyJamRowEntities(e){return e.map((e=>e.device.tech===r.x.CONNECT?null:(0,i.Bx)(e.device,e.jamSessionState))).filter((e=>null!==e))}mergeJamsWithEntities(e,t){const n=[],r=[];return e.forEach((e=>{const s=t.findIndex((t=>this.areTheSame(t.jamSessionState?.hostActiveDeviceId,e.connectStateId)));-1!==s?(n.push(s),r.push((0,i.kp)(t[s].device,t[s].jamSessionState))):r.push(e)})),{matchedJamsIndexes:n,mergedDeviceList:r.filter((e=>!e.isActive))}}cleanupJams(e,t,n){const i=this.removeJamIfWeAreOnItAlready(e,n);return this.removeMatchedJams(i,t)}}},15779:(e,t,n)=>{"use strict";n.d(t,{dR:()=>u,ez:()=>o,FI:()=>d,sV:()=>l});let i=function(e){return e[e.UNKNOWN_OUTPUT_DEVICE_TYPE=0]="UNKNOWN_OUTPUT_DEVICE_TYPE",e[e.BUILT_IN_SPEAKER=1]="BUILT_IN_SPEAKER",e[e.LINE_OUT=2]="LINE_OUT",e[e.BLUETOOTH=3]="BLUETOOTH",e[e.AIRPLAY=4]="AIRPLAY",e[e.AUTOMOTIVE=5]="AUTOMOTIVE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function r(e){switch(e){case 0:case"UNKNOWN_OUTPUT_DEVICE_TYPE":return i.UNKNOWN_OUTPUT_DEVICE_TYPE;case 1:case"BUILT_IN_SPEAKER":return i.BUILT_IN_SPEAKER;case 2:case"LINE_OUT":return i.LINE_OUT;case 3:case"BLUETOOTH":return i.BLUETOOTH;case 4:case"AIRPLAY":return i.AIRPLAY;case 5:case"AUTOMOTIVE":return i.AUTOMOTIVE;default:return i.UNRECOGNIZED}}const s={fromJSON:e=>({outputDeviceType:a(e.output_device_type)?r(e.output_device_type):0,deviceName:a(e.device_name)?globalThis.String(e.device_name):void 0}),toJSON(e){const t={};return 0!==e.outputDeviceType&&(t.output_device_type=function(e){switch(e){case i.UNKNOWN_OUTPUT_DEVICE_TYPE:return"UNKNOWN_OUTPUT_DEVICE_TYPE";case i.BUILT_IN_SPEAKER:return"BUILT_IN_SPEAKER";case i.LINE_OUT:return"LINE_OUT";case i.BLUETOOTH:return"BLUETOOTH";case i.AIRPLAY:return"AIRPLAY";case i.AUTOMOTIVE:return"AUTOMOTIVE";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.outputDeviceType)),void 0!==e.deviceName&&(t.device_name=e.deviceName),t},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={outputDeviceType:0,deviceName:void 0};return t.outputDeviceType=e.outputDeviceType??0,t.deviceName=e.deviceName??void 0,t}};function a(e){return null!=e}let o=function(e){return e[e.BROADCAST_STATUS_UNKNOWN=0]="BROADCAST_STATUS_UNKNOWN",e[e.BROADCAST_UNAVAILABLE=1]="BROADCAST_UNAVAILABLE",e[e.BROADCAST_ON=2]="BROADCAST_ON",e[e.BROADCAST_OFF=3]="BROADCAST_OFF",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function l(e){switch(e){case 0:case"BROADCAST_STATUS_UNKNOWN":return o.BROADCAST_STATUS_UNKNOWN;case 1:case"BROADCAST_UNAVAILABLE":return o.BROADCAST_UNAVAILABLE;case 2:case"BROADCAST_ON":return o.BROADCAST_ON;case 3:case"BROADCAST_OFF":return o.BROADCAST_OFF;default:return o.UNRECOGNIZED}}const c={fromJSON:e=>({timestamp:p(e.timestamp)?globalThis.String(e.timestamp):"0",broadcastStatus:p(e.broadcast_status)?l(e.broadcast_status):0,deviceId:p(e.device_id)?globalThis.String(e.device_id):"",outputDeviceInfo:p(e.output_device_info)?s.fromJSON(e.output_device_info):void 0}),toJSON(e){const t={};return"0"!==e.timestamp&&(t.timestamp=e.timestamp),0!==e.broadcastStatus&&(t.broadcast_status=function(e){switch(e){case o.BROADCAST_STATUS_UNKNOWN:return"BROADCAST_STATUS_UNKNOWN";case o.BROADCAST_UNAVAILABLE:return"BROADCAST_UNAVAILABLE";case o.BROADCAST_ON:return"BROADCAST_ON";case o.BROADCAST_OFF:return"BROADCAST_OFF";case o.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.broadcastStatus)),""!==e.deviceId&&(t.device_id=e.deviceId),void 0!==e.outputDeviceInfo&&(t.output_device_info=s.toJSON(e.outputDeviceInfo)),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={timestamp:"0",broadcastStatus:0,deviceId:"",outputDeviceInfo:void 0};return t.timestamp=e.timestamp??"0",t.broadcastStatus=e.broadcastStatus??0,t.deviceId=e.deviceId??"",t.outputDeviceInfo=void 0!==e.outputDeviceInfo&&null!==e.outputDeviceInfo?s.fromPartial(e.outputDeviceInfo):void 0,t}};const u={fromJSON:e=>({deviceBroadcastStatus:p(e.deviceBroadcastStatus)?c.fromJSON(e.deviceBroadcastStatus):void 0}),toJSON(e){const t={};return void 0!==e.deviceBroadcastStatus&&(t.deviceBroadcastStatus=c.toJSON(e.deviceBroadcastStatus)),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={deviceBroadcastStatus:void 0};return t.deviceBroadcastStatus=void 0!==e.deviceBroadcastStatus&&null!==e.deviceBroadcastStatus?c.fromPartial(e.deviceBroadcastStatus):void 0,t}};const d={fromJSON:e=>({deviceBroadcastStatus:p(e.device_broadcast_status)?c.fromJSON(e.device_broadcast_status):void 0}),toJSON(e){const t={};return void 0!==e.deviceBroadcastStatus&&(t.device_broadcast_status=c.toJSON(e.deviceBroadcastStatus)),t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={deviceBroadcastStatus:void 0};return t.deviceBroadcastStatus=void 0!==e.deviceBroadcastStatus&&null!==e.deviceBroadcastStatus?c.fromPartial(e.deviceBroadcastStatus):void 0,t}};function p(e){return null!=e}},61612:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var i=n(10565);function r(){return(0,i.d)().getEnabled()}},69693:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var i=n(30758),r=n(10565),s=n(19464),a=n(79237);const o=()=>{const e=(0,r.d)(),t=(0,i.useContext)(s.a),n=(0,a.v)((e=>{const t=e.activeDevice??e.devices.find((e=>e.isLocal));if(t)return t.connectStateId}));return{currentSession:t,createSession:(0,i.useCallback)((()=>e.createSession()),[e]),leaveSession:(0,i.useCallback)((()=>e.leaveSession()),[e]),deleteSession:(0,i.useCallback)((()=>e.deleteSession()),[e]),joinSession:(0,i.useCallback)(((t,i,r)=>e.joinSession(t,i,r,n)),[n,e]),refreshCurrentSession:(0,i.useCallback)((()=>e.fetchCurrentSession()),[e]),getSessionInfo:(0,i.useCallback)((t=>e.getSessionInfo(t)),[e]),removeSessionMember:(0,i.useCallback)((t=>e.removeSessionMember(t)),[e]),kickAllParticipants:(0,i.useCallback)((t=>e.kickAllParticipants(t)),[e]),setQueueOnlyMode:(0,i.useCallback)((t=>e.setQueueOnlyMode(t)),[e]),setParticipantVolumeControl:(0,i.useCallback)((t=>e.setParticipantVolumeControl(t)),[e])}}},10565:(e,t,n)=>{"use strict";n.d(t,{d:()=>s});var i=n(35685),r=n(30157);function s(){return(0,r.N)(i.j)}},6149:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var i=n(30758),r=n(10565);function s(e,t){const n=(0,i.useRef)(t),s=(0,r.d)();n.current=t,(0,i.useEffect)((()=>s.getEvents().addListener(e,(e=>{n.current(e)}))),[s,e])}},330:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r,x:()=>i});let i=function(e){return e[e.UNSPECIFIED_TECH=0]="UNSPECIFIED_TECH",e[e.CONNECT=1]="CONNECT",e[e.CAST_JS=2]="CAST_JS",e[e.CAST=3]="CAST",e[e.BLUETOOTH=4]="BLUETOOTH",e[e.AIRPLAY=5]="AIRPLAY",e[e.CARPLAY=6]="CARPLAY",e[e.WIRED=7]="WIRED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({}),r=function(e){return e[e.UNKNOWN_TYPE=0]="UNKNOWN_TYPE",e[e.COMPUTER=1]="COMPUTER",e[e.TABLET=2]="TABLET",e[e.SMARTPHONE=3]="SMARTPHONE",e[e.SPEAKER=4]="SPEAKER",e[e.SPEAKER_GROUP=5]="SPEAKER_GROUP",e[e.TV=6]="TV",e[e.AVR=7]="AVR",e[e.STB=8]="STB",e[e.AUDIO_DONGLE=9]="AUDIO_DONGLE",e[e.GAME_CONSOLE=10]="GAME_CONSOLE",e[e.CAST_VIDEO=11]="CAST_VIDEO",e[e.CAST_AUDIO=12]="CAST_AUDIO",e[e.AUTOMOBILE=13]="AUTOMOBILE",e[e.SMARTWATCH=14]="SMARTWATCH",e[e.CARTHING=15]="CARTHING",e[e.HOMETHING=16]="HOMETHING",e[e.MAYBE_HEADPHONES=17]="MAYBE_HEADPHONES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({})},6530:(e,t,n)=>{"use strict";n.d(t,{JO:()=>s,MS:()=>o,_H:()=>i,kr:()=>a,lz:()=>r});let i=function(e){return e.RESTRICTED="RESTRICTED",e.ENABLED="ENABLED",e}({}),r=function(e){return e.NONE="NONE",e.UNKNOWN="UNKNOWN",e.FREE="FREE",e.PREMIUM="PREMIUM",e}({}),s=function(e){return e.DEEPLINKING="deeplinking",e.DISCOVERED_DEVICE="discovered_device",e.NEARBY_DIALOG="nearby_dialog",e}({}),a=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.V4="V4",e.V6="V6",e.UNRECOGNIZED="UNRECOGNIZED",e}({}),o=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.INVISIBLE="INVISIBLE",e.VISIBLE="VISIBLE",e.NOTIFY="NOTIFY",e.UNRECOGNIZED="UNRECOGNIZED",e}({})},92976:(e,t,n)=>{"use strict";n.d(t,{HP:()=>r,RG:()=>s,Vl:()=>a,YM:()=>i,bq:()=>o});let i=function(e){return e.UNKNOWN_UPDATE_TYPE="UNKNOWN_UPDATE_TYPE",e.NEW_SESSION="NEW_SESSION",e.USER_JOINED="USER_JOINED",e.USER_LEFT="USER_LEFT",e.SESSION_DELETED="SESSION_DELETED",e.YOU_LEFT="YOU_LEFT",e.YOU_WERE_KICKED="YOU_WERE_KICKED",e.YOU_JOINED="YOU_JOINED",e.PARTICIPANT_PROMOTED_TO_HOST="PARTICIPANT_PROMOTED_TO_HOST",e.USER_KICKED="USER_KICKED",e.VOLUME_CONTROL_PERMISSIONS_CHANGED="VOLUME_CONTROL_PERMISSIONS_CHANGED",e.QUEUE_ONLY_MODE_CONTROL_CHANGED="QUEUE_ONLY_MODE_CONTROL_CHANGED",e.WIFI_BROADCAST_CHANGED="WIFI_BROADCAST_CHANGED",e.ACTIVE_DEVICE_CHANGED="ACTIVE_DEVICE_CHANGED",e.SESSION_MEMBER_UPDATED="SESSION_MEMBER_UPDATED",e.SESSION_ACTIVATED="SESSION_ACTIVATED",e}({});function r(e){return"object"==typeof e&&null!==e&&"session"in e&&"reason"in e&&"string"==typeof e.reason&&e.reason in i}let s=function(e){return e.UNKNOWN="UNKNOWN",e.PERMISSIONS_RESTRICTED_GENERIC="PERMISSIONS_RESTRICTED_GENERIC",e.CONNECTIVITY_ISSUES="CONNECTIVITY_ISSUES",e.CONTENT_ISSUES="CONTENT_ISSUES",e.NO_HOST_ACTIVE_DEVICE="NO_HOST_ACTIVE_DEVICE",e.GENERIC_ERROR="GENERIC_ERROR",e}({});function a(e){return"object"==typeof e&&null!==e&&"userMessage"in e&&"string"==typeof e.userMessage&&e.userMessage in s}let o=function(e){return e.UNKNOWN="UNKNOWN",e.COMPUTER="COMPUTER",e.TABLET="TABLET",e.SMARTPHONE="SMARTPHONE",e.SPEAKER="SPEAKER",e.TV="TV",e.AVR="AVR",e.STB="STB",e.AUDIO_DONGLE="AUDIO_DONGLE",e.GAME_CONSOLE="GAME_CONSOLE",e.CAST_VIDEO="CAST_VIDEO",e.CAST_AUDIO="CAST_AUDIO",e.AUTOMOBILE="AUTOMOBILE",e.SMARTWATCH="SMARTWATCH",e.CHROMEBOOK="CHROMEBOOK",e.UNKNOWN_SPOTIFY="UNKNOWN_SPOTIFY",e.CAR_THING="CAR_THING",e.OBSERVER="OBSERVER",e.HOME_THING="HOME_THING",e.UNRECOGNIZED="UNRECOGNIZED",e}({})},56394:(e,t,n)=>{"use strict";n.d(t,{C:()=>a});var i=n(78736);const r=5e3;function s(e){let t=()=>{};return new Promise(((n,r)=>{t=e.getEvents().addListener(i.P.UPDATE,(e=>{if(e.data){let t=e.data?.activeDevice||null;t||(t=e.data?.devices?.find((e=>e.isLocal))||null),t?n(t.connectStateId):r()}}))})).finally(t)}async function a(e){return function(e){let t=null;return t=e.getActiveDevice(),t||(t=e.getDevices().find((e=>e.isLocal))??null),t?.connectStateId??""}(e)??Promise.race([s(e),new Promise(((e,t)=>setTimeout(t,r)))])}},62478:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,V:()=>s});let i=null;function r(e){i=e}function s(){if(null===i)throw new Error("Missing `instance`. Have you called `setTransportInstance` yet?");return i}},65019:(e,t,n)=>{"use strict";function i(e){return async()=>{const t=await e.getToken();if(null===t)throw new Error("Token is currently unavailable.");const{accessToken:n,accessTokenExpirationTimestampMs:i}=t;return[n,Math.floor(((i||0)-Date.now())/1e3)]}}n.d(t,{C:()=>i})},78118:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(65019);const r={disconnectBeforeUnload:!0,reconnectionRetries:3,requestMode:"fetch"};function s(e,t,n,s={}){return e({providers:{endpoints:t,token:(0,i.C)(n)},...r,...s})}},88319:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var i=n(98708);const r="https://apresolve.spotify.com/",s="https://api.spotify.com/";var a=function(e){return e.DEALER="dealer",e.WEBGATE="spclient",e}(a||{});const o=3e3;function l({timeout:e=o}={}){const t=function(e){const t=`${r}?type=${a.DEALER}&type=${a.WEBGATE}`;return async()=>{const n=new AbortController,i=setTimeout((()=>n.abort()),e);let r;try{const e=await fetch(t,{signal:n.signal});clearTimeout(i),r=await e.json()}catch(t){if(n.signal.aborted)throw new Error(`x-resolve request timed out after ${e} ms`);throw t}if(!Array.isArray(r[a.DEALER])||!Array.isArray(r[a.WEBGATE])||0===r[a.DEALER].length||0===r[a.WEBGATE].length)throw new Error("x-resolve responded with incomplete results");const o=r[a.DEALER][0],l=r[a.WEBGATE][0];return{dealer:`wss://${o.replace(/:443$/,"")}`,webgate:`https://${l.replace(/:443$/,"")}`,webapi:s}}}(e),n=(0,i.Q)({});return async function(e){try{return await t(e)}catch(t){return console.error("Failed to resolve endpoints via x-resolve. Using fallbacks!",t),await n(e)}}}},47547:(e,t,n)=>{"use strict";function i(e,t={}){return void 0===e?t:{...e,...t}}n.d(t,{K:()=>i})},52429:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var i=n(12546),r=n(35484);class s{constructor(e){this.ubiLogger=e,this._events=new r.A}getEvents(){return this._events}logInteraction(e){const t=this.ubiLogger.logInteraction.bind(this.ubiLogger),n=this.ubiLogger.getPageInstanceId()??void 0;if("ui_navigate"!==e.actionName){this._events.emit(r.B.INTERACTION,{event:e});return{interactionId:t(e),pageInstanceId:n}}const i=this.formatUiNavigateEvent(e);this._events.emit(r.B.INTERACTION,{event:i});const s=t(i);return this.interaction={id:s,event:i},{interactionId:s,pageInstanceId:n}}logImpression(e){return this._events.emit(r.B.IMPRESSION,{event:e}),this.ubiLogger.logImpression(e)}logNavigation(e){this._events.emit(r.B.NAVIGATION_START,{event:e}),this.ubiLogger.logNavigationStart(e);const t={pageId:e.pageId,entityUri:e.entityUri};this._events.emit(r.B.NAVIGATION_END,{event:t}),this.ubiLogger.logNavigationEnd(t),this.interaction=void 0}logClientStarted(e,t){"navigationReason"in e&&(this._events.emit(r.B.CLIENT_STARTED,{event:e,isForeground:t}),this.ubiLogger.logClientStarted({navigationReason:e.navigationReason,navigationalRoot:e.navigationalRoot},{entityUri:e.entityUri,pageId:e.pageId},t))}getInteractionId(e){if(!this.interaction)return;const{event:t,id:n}=this.interaction,i=t.actionParameterNames?.findIndex((e=>"destination"===e));if(void 0===i||-1===i)return;const r=t.actionParameterValues?.[i];if(r&&r===e)return n}formatUiNavigateEvent=e=>{const t=e.actionParameterNames?.findIndex((e=>"destination"===e));return void 0===t||-1===t?e:{...e,actionParameterValues:e.actionParameterValues?.map(((e,n)=>n!==t?e:(0,i.y)(e)??""))}}}},35484:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,B:()=>r});var i=n(93827);let r=function(e){return e.INTERACTION="INTERACTION",e.IMPRESSION="IMPRESSION",e.NAVIGATION_START="NAVIGATION_START",e.NAVIGATION_END="NAVIGATION_END",e.CLIENT_STARTED="CLIENT_STARTED",e}({});class s extends i.V{}},12546:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(91008);const r=new Set([i.NQG.ALBUM,i.NQG.ARTIST,i.NQG.PLAYLIST,i.NQG.PLAYLIST_V2,i.NQG.TRACK,i.NQG.EPISODE,i.NQG.SHOW,i.NQG.LOCAL_TRACK,i.NQG.PRERELEASE]),s=e=>{const t=(0,i.o_h)(e);if(!t)return;if((0,i.ThT)(t))return r.has(t.id)?t.toString().replace(":app:",":"):t.toString();if(r.has(t.type))return t.toString();const n=t.args||t.query&&[t.query]||t.category&&[t.category]||void 0,s=(0,i.bXC)(t.type,n);return s?.toString()??void 0}},57361:(e,t,n)=>{"use strict";n.d(t,{J:()=>i.J});var i=n(22167)},34814:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,J:()=>r});var i=n(30758);const r=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(r);if(null===e)throw new Error("Trying to use 'UrlDispenserServiceContext' without 'UrlDispenserServiceProvider'!");return e}},22167:(e,t,n)=>{"use strict";n.d(t,{J:()=>s,p:()=>r});var i=n(36285);const r=(0,i.u)("UrlDispenserServiceClient");class s{constructor(e){this._builder=e}async getShortUrl(e,{utmParameters:t,customData:n,linkPreview:i}){const r=await this._builder.build().withHost("@webgate/url-dispenser/v1/generate-url").withMethod("POST").withJsonContentType().withoutMarket().withEndpointIdentifier("/v1/generate-url").withBody({spotify_uri:e,custom_data:n,link_preview:i,utm_parameters:t}).send();if(201===r.status)return r.body;throw new Error(`Failed to get short link for uri ${e}`)}}},83669:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});const i=(0,n(36285).u)("UserAPI")},16151:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(91008);function r(e){const t=(0,i.o_h)(e);if(null===t||void 0===t.username)throw new Error("Invalid URI or URI does not contain username!");return t.username}},94461:(e,t,n)=>{"use strict";n.d(t,{IB:()=>a,J2:()=>l,Np:()=>c,kX:()=>u});var i=n(31417),r=n(85907),s=n(63058);const a={[s.h.en]:{displayName:"English",displayNameEn:"English"},[s.h.af]:{displayName:"Afrikaans",displayNameEn:"Afrikaans"},[s.h.am]:{displayName:"አማርኛ",displayNameEn:"Amharic"},[s.h.ar]:{displayName:"العَرَبِيَّة",displayNameEn:"Arabic",isRTL:!0},[s.h.arEG]:{displayName:"عربي مصري",displayNameEn:"Arabic (Egypt)",isRTL:!0},[s.h.arMA]:{displayName:"العَرَبِيَّة مغربي",displayNameEn:"Arabic (Morocco)",isRTL:!0},[s.h.arSA]:{displayName:"العربية السعودية",displayNameEn:"Arabic (Saudi Arabia)",isRTL:!0},[s.h.az]:{displayName:"Azərbaycanca",displayNameEn:"Azerbaijani"},[s.h.bg]:{displayName:"Български",displayNameEn:"Bulgarian"},[s.h.bho]:{displayName:"भोजपुरी",displayNameEn:"Bhojpuri"},[s.h.bn]:{displayName:"বাংলা",displayNameEn:"Bengali"},[s.h.bs]:{displayName:"Bosanski",displayNameEn:"Bosnian"},[s.h.ca]:{displayName:"Català",displayNameEn:"Catalan"},[s.h.cs]:{displayName:"Čeština",displayNameEn:"Czech"},[s.h.da]:{displayName:"Dansk",displayNameEn:"Danish"},[s.h.de]:{displayName:"Deutsch",displayNameEn:"German"},[s.h.el]:{displayName:"Eλληνικά",displayNameEn:"Greek"},[s.h.enGB]:{displayName:"English",displayNameEn:"United Kingdom"},[s.h.es]:{displayName:"Español de España",displayNameEn:"European Spanish"},[s.h.esAR]:{displayName:"Español (Argentina)",displayNameEn:"Spanish (Argentina)"},[s.h.esMX]:{displayName:"Español (México)",displayNameEn:"Spanish (Mexico)"},[s.h.es419]:{displayName:"Español de Latinoamérica",displayNameEn:"Latin American Spanish"},[s.h.et]:{displayName:"Eesti",displayNameEn:"Estonian"},[s.h.eu]:{displayName:"Euskara",displayNameEn:"Basque"},[s.h.fa]:{displayName:"فارسی",displayNameEn:"Persian",isRTL:!0},[s.h.fi]:{displayName:"Suomeksi",displayNameEn:"Finnish"},[s.h.fil]:{displayName:"Filipino",displayNameEn:"Filipino"},[s.h.fr]:{displayName:"Français",displayNameEn:"French"},[s.h.frCA]:{displayName:"Français Canadien",displayNameEn:"Canadian French"},[s.h.gl]:{displayName:"Galego",displayNameEn:"Galician"},[s.h.gu]:{displayName:"ગુજરાતી",displayNameEn:"Gujarati"},[s.h.he]:{displayName:"עברית",displayNameEn:"Hebrew",isRTL:!0},[s.h.hi]:{displayName:"हिन्दी",displayNameEn:"Hindi"},[s.h.hr]:{displayName:"Hrvatski",displayNameEn:"Croatian"},[s.h.hu]:{displayName:"Magyar",displayNameEn:"Hungarian"},[s.h.id]:{displayName:"Bahasa Indonesia",displayNameEn:"Indonesian"},[s.h.is]:{displayName:"Íslenska",displayNameEn:"Icelandic"},[s.h.it]:{displayName:"Italiano",displayNameEn:"Italian"},[s.h.ja]:{displayName:"日本語",displayNameEn:"Japanese"},[s.h.kn]:{displayName:"ಕನ್ನಡ",displayNameEn:"Kannada"},[s.h.ko]:{displayName:"한국어",displayNameEn:"Korean"},[s.h.lt]:{displayName:"Lietuvių",displayNameEn:"Lithuanian"},[s.h.lv]:{displayName:"Latviešu",displayNameEn:"Latvian"},[s.h.mk]:{displayName:"Македонски",displayNameEn:"Macedonian"},[s.h.ml]:{displayName:"മലയാളം",displayNameEn:"Malayalam"},[s.h.mr]:{displayName:"मराठी",displayNameEn:"Marathi"},[s.h.ms]:{displayName:"Melayu",displayNameEn:"Malay"},[s.h.nb]:{displayName:"Norsk",displayNameEn:"Norwegian"},[s.h.ne]:{displayName:"नेपाली",displayNameEn:"Nepali"},[s.h.nl]:{displayName:"Nederlands",displayNameEn:"Dutch"},[s.h.or]:{displayName:"ଓଡ଼ିଆ",displayNameEn:"Odia"},[s.h.paIN]:{displayName:"ਪੰਜਾਬੀ",displayNameEn:"Punjabi"},[s.h.paPK]:{displayName:"پنجابی",displayNameEn:"Punjabi (Naskh)",isRTL:!0},[s.h.pl]:{displayName:"Polski",displayNameEn:"Polish"},[s.h.ptBR]:{displayName:"Português do Brasil",displayNameEn:"Brazilian Portuguese"},[s.h.ptPT]:{displayName:"Português",displayNameEn:"European Portuguese"},[s.h.ro]:{displayName:"Română",displayNameEn:"Romanian"},[s.h.ru]:{displayName:"Русский",displayNameEn:"Russian"},[s.h.sk]:{displayName:"Slovenčina",displayNameEn:"Slovak"},[s.h.sl]:{displayName:"Slovenski",displayNameEn:"Slovenian"},[s.h.sr]:{displayName:"Srpski",displayNameEn:"Serbian"},[s.h.sv]:{displayName:"Svenska",displayNameEn:"Swedish"},[s.h.sw]:{displayName:"Kiswahili",displayNameEn:"Swahili"},[s.h.ta]:{displayName:"தமிழ்",displayNameEn:"Tamil"},[s.h.te]:{displayName:"తెలుగు",displayNameEn:"Telugu"},[s.h.th]:{displayName:"ภาษาไทย",displayNameEn:"Thai"},[s.h.tr]:{displayName:"Türkçe",displayNameEn:"Turkish"},[s.h.uk]:{displayName:"Українська",displayNameEn:"Ukrainian"},[s.h.ur]:{displayName:"اردو",displayNameEn:"Urdu",isRTL:!0},[s.h.vi]:{displayName:"Tiếng Việt",displayNameEn:"Vietnamese"},[s.h.zhCN]:{displayName:"简体中文",displayNameEn:"Simplified Chinese"},[s.h.zhHK]:{displayName:"繁體中文 (香港)",displayNameEn:"Chinese (Traditional) Hong Kong"},[s.h.zhTW]:{displayName:"中文",displayNameEn:"Traditional Chinese"},[s.h.zu]:{displayName:"IsiZulu",displayNameEn:"Zulu"}},o=[s.h.en,s.h.af,s.h.am,s.h.ar,s.h.arEG,s.h.arMA,s.h.arSA,s.h.az,s.h.bg,s.h.bho,s.h.bn,s.h.bs,s.h.ca,s.h.cs,s.h.da,s.h.de,s.h.el,s.h.enGB,s.h.es,s.h.es419,s.h.esAR,s.h.esMX,s.h.et,s.h.eu,s.h.fa,s.h.fi,s.h.fil,s.h.fr,s.h.frCA,s.h.gl,s.h.gu,s.h.he,s.h.hi,s.h.hr,s.h.hu,s.h.id,s.h.is,s.h.it,s.h.ja,s.h.kn,s.h.ko,s.h.lt,s.h.lv,s.h.mk,s.h.ml,s.h.mr,s.h.ms,s.h.nb,s.h.ne,s.h.nl,s.h.or,s.h.paIN,s.h.paPK,s.h.pl,s.h.ptBR,s.h.ptPT,s.h.ro,s.h.ru,s.h.sk,s.h.sl,s.h.sr,s.h.sv,s.h.sw,s.h.ta,s.h.te,s.h.th,s.h.tr,s.h.uk,s.h.ur,s.h.vi,s.h.zhCN,s.h.zhHK,s.h.zhTW,s.h.zu],l=[...o],c=[...o],u=e=>{switch(e){case s.h.en:return i.Ru.get("locale.en");case s.h.af:return i.Ru.get("locale.af");case s.h.am:return i.Ru.get("locale.am");case s.h.ar:return i.Ru.get("locale.ar");case s.h.arEG:return i.Ru.get("locale.ar-EG");case s.h.arMA:return i.Ru.get("locale.ar-MA");case s.h.arSA:return i.Ru.get("locale.ar-SA");case s.h.az:return i.Ru.get("locale.az");case s.h.bg:return i.Ru.get("locale.bg");case s.h.bho:return i.Ru.get("locale.bho");case s.h.bn:return i.Ru.get("locale.bn");case s.h.bs:return i.Ru.get("locale.bs");case s.h.ca:return i.Ru.get("locale.ca");case s.h.cs:return i.Ru.get("locale.cs");case s.h.da:return i.Ru.get("locale.da");case s.h.de:return i.Ru.get("locale.de");case s.h.el:return i.Ru.get("locale.el");case s.h.enGB:return i.Ru.get("locale.en-GB");case s.h.es:return i.Ru.get("locale.es");case s.h.es419:return i.Ru.get("locale.es-419");case s.h.esAR:return i.Ru.get("locale.es-AR");case s.h.esMX:return i.Ru.get("locale.es-MX");case s.h.et:return i.Ru.get("locale.et");case s.h.eu:return i.Ru.get("locale.eu");case s.h.fa:return i.Ru.get("locale.fa");case s.h.fi:return i.Ru.get("locale.fi");case s.h.fil:return i.Ru.get("locale.fil");case s.h.fr:return i.Ru.get("locale.fr");case s.h.frCA:return i.Ru.get("locale.fr-CA");case s.h.gl:return i.Ru.get("locale.gl");case s.h.gu:return i.Ru.get("locale.gu");case s.h.he:return i.Ru.get("locale.he");case s.h.hi:return i.Ru.get("locale.hi");case s.h.hr:return i.Ru.get("locale.hr");case s.h.hu:return i.Ru.get("locale.hu");case s.h.id:return i.Ru.get("locale.id");case s.h.is:return i.Ru.get("locale.is");case s.h.it:return i.Ru.get("locale.it");case s.h.ja:return i.Ru.get("locale.ja");case s.h.kn:return i.Ru.get("locale.kn");case s.h.ko:return i.Ru.get("locale.ko");case s.h.lt:return i.Ru.get("locale.lt");case s.h.lv:return i.Ru.get("locale.lv");case s.h.mk:return i.Ru.get("locale.mk");case s.h.ml:return i.Ru.get("locale.ml");case s.h.mr:return i.Ru.get("locale.mr");case s.h.ms:return i.Ru.get("locale.ms");case s.h.nb:return i.Ru.get("locale.nb");case s.h.ne:return i.Ru.get("locale.ne");case s.h.nl:return i.Ru.get("locale.nl");case s.h.or:return i.Ru.get("locale.or");case s.h.paIN:return i.Ru.get("locale.pa-IN");case s.h.paPK:return i.Ru.get("locale.pa-PK");case s.h.pl:return i.Ru.get("locale.pl");case s.h.ptBR:return i.Ru.get("locale.pt-BR");case s.h.ptPT:return i.Ru.get("locale.pt-PT");case s.h.ro:return i.Ru.get("locale.ro");case s.h.ru:return i.Ru.get("locale.ru");case s.h.sk:return i.Ru.get("locale.sk");case s.h.sl:return i.Ru.get("locale.sl");case s.h.sr:return i.Ru.get("locale.sr");case s.h.sv:return i.Ru.get("locale.sv");case s.h.sw:return i.Ru.get("locale.sw");case s.h.ta:return i.Ru.get("locale.ta");case s.h.te:return i.Ru.get("locale.te");case s.h.th:return i.Ru.get("locale.th");case s.h.tr:return i.Ru.get("locale.tr");case s.h.uk:return i.Ru.get("locale.uk");case s.h.ur:return i.Ru.get("locale.ur");case s.h.vi:return i.Ru.get("locale.vi");case s.h.zhCN:return i.Ru.get("locale.zh-CN");case s.h.zhHK:return i.Ru.get("locale.zh-HK");case s.h.zhTW:return i.Ru.get("locale.zh-TW");case s.h.zu:return i.Ru.get("locale.zu");default:return(0,r.d)(e)}}},16157:(e,t,n)=>{"use strict";n.d(t,{$c:()=>C,B3:()=>a,Cx:()=>E,EK:()=>b,GN:()=>D,Ho:()=>o,I2:()=>p,I8:()=>f,I_:()=>y,JK:()=>u,Ll:()=>O,Nm:()=>r,PJ:()=>l,TA:()=>m,UG:()=>P,Yu:()=>v,_m:()=>s,_w:()=>_,by:()=>g,cf:()=>R,j3:()=>w,nz:()=>T,pb:()=>c,r7:()=>N,sg:()=>d,tC:()=>S,to:()=>A,tv:()=>L,x7:()=>h,xE:()=>i,y3:()=>I});let i=function(e){return e.Affinity="AFFINITY",e.LastPlayed="LAST_PLAYED",e.PlayCount="PLAY_COUNT",e}({}),r=function(e){return e.LongTerm="LONG_TERM",e.MidTerm="MID_TERM",e.ShortTerm="SHORT_TERM",e}({}),s=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({}),a=function(e){return e.Autobiography="AUTOBIOGRAPHY",e.Biography="BIOGRAPHY",e}({}),o=function(e){return e.Album="ALBUM",e.Artist="ARTIST",e.Concert="CONCERT",e.Episode="EPISODE",e.ExclusiveMerch="EXCLUSIVE_MERCH",e.Merch="MERCH",e.MusicVideo="MUSIC_VIDEO",e.Other="OTHER",e.Playlist="PLAYLIST",e.Podcast="PODCAST",e.Prerelease="PRERELEASE",e.Track="TRACK",e}({}),l=function(e){return e.Gif="GIF",e.Image="IMAGE",e.Unknown="UNKNOWN",e.Video="VIDEO",e.VideoLooping="VIDEO_LOOPING",e.VideoLoopingRandom="VIDEO_LOOPING_RANDOM",e}({}),c=function(e){return e.Albums="ALBUMS",e.Artists="ARTISTS",e.Audiobooks="AUDIOBOOKS",e.Episodes="EPISODES",e.Genres="GENRES",e.Playlists="PLAYLISTS",e.Podcasts="PODCASTS",e.TopResults="TOP_RESULTS",e.Tracks="TRACKS",e.Users="USERS",e}({}),u=function(e){return e.Artist="ARTIST",e.Concert="CONCERT",e}({}),d=function(e){return e.Available="AVAILABLE",e.FewLeft="FEW_LEFT",e.SoldOut="SOLD_OUT",e.Unknown="UNKNOWN",e}({}),p=function(e){return e.EventPage="EVENT_PAGE",e.TicketPage="TICKET_PAGE",e.Unknown="UNKNOWN",e}({}),m=function(e){return e.Cancelled="CANCELLED",e.Postponed="POSTPONED",e.Rescheduled="RESCHEDULED",e.Unknown="UNKNOWN",e}({}),h=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),f=function(e){return e.Curate="CURATE",e.Uncurate="UNCURATE",e}({}),g=function(e){return e.Day="DAY",e.Hour="HOUR",e.Minute="MINUTE",e.Month="MONTH",e.Year="YEAR",e}({}),E=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),_=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),y=function(e){return e.Episode="EPISODE",e.PodcastEpisode="PODCAST_EPISODE",e.Unknown="UNKNOWN",e}({}),v=function(e){return e.Events="EVENTS",e.LikedSongs="LIKED_SONGS",e.LikedSongsV2="LIKED_SONGS_V2",e.Prereleases="PRERELEASES",e.YourEpisodes="YOUR_EPISODES",e.YourEpisodesV2="YOUR_EPISODES_V2",e}({}),b=function(e){return e.Facebook="FACEBOOK",e.Instagram="INSTAGRAM",e.Other="OTHER",e.Soundbetter="SOUNDBETTER",e.Twitter="TWITTER",e.Whatsapp="WHATSAPP",e.Wikipedia="WIKIPEDIA",e}({}),S=function(e){return e.Description="DESCRIPTION",e.Guest="GUEST",e.Host="HOST",e.Lyrics="LYRICS",e.Name="NAME",e.UnknownField="UNKNOWN_FIELD",e}({}),A=function(e){return e.FailedItemInFolder="FAILED_ITEM_IN_FOLDER",e.FailedItemLimitReached="FAILED_ITEM_LIMIT_REACHED",e.FailedItemNotSupported="FAILED_ITEM_NOT_SUPPORTED",e.FailedNotInYourLibrary="FAILED_NOT_IN_YOUR_LIBRARY",e.Successful="SUCCESSFUL",e}({}),C=function(e){return e.AgeRestricted="AGE_RESTRICTED",e.CatalogueRestricted="CATALOGUE_RESTRICTED",e.CountryRestricted="COUNTRY_RESTRICTED",e.Explicit="EXPLICIT",e.PaymentRequired="PAYMENT_REQUIRED",e.Playable="PLAYABLE",e.Unavailable="UNAVAILABLE",e.Unknown="UNKNOWN",e}({}),T=function(e){return e.AfterUid="AFTER_UID",e.BeforeUid="BEFORE_UID",e.BottomOfPlaylist="BOTTOM_OF_PLAYLIST",e.TopOfPlaylist="TOP_OF_PLAYLIST",e}({}),I=function(e){return e.Episodic="EPISODIC",e.Recent="RECENT",e.Sequential="SEQUENTIAL",e.Unspecified="UNSPECIFIED",e}({}),O=function(e){return e.Audio="AUDIO",e.Mixed="MIXED",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),w=function(e){return e.AddToLibrary="ADD_TO_LIBRARY",e.Navigate="NAVIGATE",e.NotInterested="NOT_INTERESTED",e.Play="PLAY",e.Share="SHARE",e}({}),N=function(e){return e.Album="ALBUM",e.Artist="ARTIST",e.Audiobook="AUDIOBOOK",e.Default="DEFAULT",e.Playlist="PLAYLIST",e.Podcast="PODCAST",e.Track="TRACK",e.Video="VIDEO",e}({}),R=function(e){return e.TextAnnouncement="TEXT_ANNOUNCEMENT",e.TextBase="TEXT_BASE",e.TextBrightAccent="TEXT_BRIGHT_ACCENT",e.TextNegative="TEXT_NEGATIVE",e.TextPositive="TEXT_POSITIVE",e.TextSubdued="TEXT_SUBDUED",e.TextWarning="TEXT_WARNING",e}({}),P=function(e){return e.Abp="ABP",e.AnchorPaywall="ANCHOR_PAYWALL",e.AudiobookDirectSales="AUDIOBOOK_DIRECT_SALES",e.AudiobookPromotion="AUDIOBOOK_PROMOTION",e.OapLinking="OAP_LINKING",e.OapOtp="OAP_OTP",e.Unknown="UNKNOWN",e}({}),L=function(e){return e.Album="ALBUM",e.Episode="EPISODE",e.Unknown="UNKNOWN",e.WhatsNewFeedNotification="WHATS_NEW_FEED_NOTIFICATION",e}({}),D=function(e){return e.Hidden="HIDDEN",e.New="NEW",e.Seen="SEEN",e.Unknown="UNKNOWN",e}({})},63775:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,a:()=>s});var i=n(7307);function r(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:i.c.ARTIST,uri:e,name:t})))}function s(e){return e?e.items.map((({data:e})=>"Artist"===e.__typename?{type:i.c.ARTIST,uri:e.uri,name:e.profile.name}:null)).filter((e=>!!e)):[]}},61983:(e,t,n)=>{"use strict";function i(e){return"ConsumptionCappedAccessExplanation"===e?.accessExplanation?.__typename?{title:e.accessExplanation.title??"",body:e.accessExplanation.body??"",cta:e.accessExplanation.actionText??"",ctaUrl:e.accessExplanation.ctaUrl??"",dismiss:e.accessExplanation.dismiss??""}:null}n.d(t,{e:()=>i})},53149:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,r:()=>s});var i=n(16157);function r(e){return e?.label===i.x7.Explicit}function s(e){return e?.label===i.x7.NineteenPlus}},75049:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>a,JO:()=>s,ht:()=>o,mp:()=>l});var i=n(16157),r=n(85907);function s(e,t=null){if(null===e){return(t??new Date(0)).toISOString()}return e.isoString}function a(e){return null===e?null:s(e)}function o(e){switch(e){case i.by.Minute:case i.by.Hour:case i.by.Day:return"day";case i.by.Month:return"month";case i.by.Year:case void 0:return"year";default:return(0,r.d)(e)}}function l(e,t=null){return{isoString:s(e,t),precision:e?.precision??i.by.Year}}},34647:(e,t,n)=>{"use strict";n.d(t,{Wx:()=>c,fS:()=>d,jM:()=>l});var i=n(16157),r=n(7307),s=n(72051),a=n(95651),o=n(16717);function l(e){return{type:r.c.SHOW,uri:e.uri,name:e.name,publisher:e.publisher?.name??"",images:(0,a.r)(e.coverArt),mediaType:(0,o.w)(e.mediaType)}}function c(e,t){const n=e?.paywallContent??!1,r=t.reason;return{isPaywalled:n,isUserSubscribed:n&&r!==i.$c.PaymentRequired}}function u(e,t){return{milliseconds:e.totalMilliseconds-t.playPositionMilliseconds}}function d(e,t){let n=s.M.Unknown;switch(t.state){case i._w.NotStarted:n=s.M.NotStarted;break;case i._w.InProgress:n=s.M.InProgress;break;case i._w.Completed:n=s.M.Completed}return{timeLeft:u(e,t),state:n}}},68993:(e,t,n)=>{"use strict";function i(e,t,n){if(null!==e&&e.__typename!==t)throw new Error(n||`${e} is not a "${t}"`)}function r(e,t){try{!function(e){if(null===e)throw new Error(`${e} is \`null\``)}(e);const n=t.split(".");let i=e;for(;n.length;){i=i[n.shift()]}return function(e){if(e.message)throw new Error(`${e} is a \`PathfinderError\``)}(i),i}catch{throw new Error(`Could not get "${t}"!`)}}function s(e,t,n){try{return r(e,t)}catch{return n}}n.d(t,{Jt:()=>r,j:()=>i,no:()=>s})},95651:(e,t,n)=>{"use strict";function i(e){return null!==e?e.sources.map(r):[]}function r(e){return{url:e.url,width:e.width,height:e.height}}n.d(t,{m:()=>r,r:()=>i})},16717:(e,t,n)=>{"use strict";n.d(t,{S:()=>o,w:()=>a});var i=n(16157),r=n(59029),s=n(85907);function a(e){switch(e){case i.Ll.Audio:return r.Q.AUDIO;case i.Ll.Video:return r.Q.VIDEO;case i.Ll.Mixed:return r.Q.MIXED;case i.Ll.Unknown:return r.Q.UNKNOWN;default:return(0,s.d)(e)}}function o(e){return null!==e?[e.code]:[]}},1103:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,h:()=>o});var i=n(7307),r=n(95651);function s(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:i.c.ARTIST,uri:e,name:t})))}function a({items:e}){if(0===e.length)return{type:i.c.ARTIST,uri:"",name:""};const{uri:t,profile:{name:n}}=e[0];return{type:i.c.ARTIST,uri:t,name:n}}function o(e){return{type:i.c.ALBUM,uri:e.uri,name:e.name,images:(0,r.r)(e.coverArt),artist:a(e.artists)}}},43329:(e,t,n)=>{"use strict";n.d(t,{AM:()=>F,BC:()=>ce,Br:()=>I,CN:()=>y,CX:()=>k,Cf:()=>H,Cn:()=>O,Dq:()=>j,F1:()=>ae,HO:()=>fe,H_:()=>m,Iq:()=>G,LZ:()=>q,M4:()=>le,Mc:()=>te,NL:()=>D,O1:()=>ee,Ol:()=>a,PE:()=>de,QP:()=>P,QT:()=>ue,Ri:()=>U,S3:()=>C,Sd:()=>d,TQ:()=>me,Tc:()=>$,UP:()=>X,V1:()=>J,Vi:()=>S,WA:()=>Z,Wm:()=>p,XV:()=>T,YV:()=>r,Yr:()=>B,Yw:()=>g,Zy:()=>ge,_9:()=>ie,_E:()=>z,cc:()=>A,d8:()=>E,eh:()=>he,en:()=>Ee,gW:()=>w,gl:()=>ne,hU:()=>x,hd:()=>re,iL:()=>V,jO:()=>N,jY:()=>h,kA:()=>v,kr:()=>L,m2:()=>oe,mA:()=>Q,mY:()=>pe,o4:()=>u,tF:()=>_,tH:()=>se,ug:()=>M,uy:()=>K,vU:()=>Y,vq:()=>c,vr:()=>f,x_:()=>W,yf:()=>b,zu:()=>R});var i=n(92336);let r=function(e){return e.DISABLED="DISABLED",e.TWO_USER="TWO_USER",e.MULTI_USER="MULTI_USER",e}({}),s=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),a=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),o=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),l=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({});(0,i.m9)({name:"exampleOfSharedPropertyThatDoesNotExist",description:"Example of enabling a propoerty that is shared between Desktop, Mobile and Embed",default:!1});const c=(0,i.m9)({name:"enableOfflineVideoDev",description:"Enables Spotify videos to be offlined on DesktopX. Used during feature development",default:!1}),u=(0,i.m9)({name:"betamaxWidevineVersionSupported",description:"true if the version of widevine used is still supported.",default:!0}),d=(0,i.m9)({name:"betamaxBoomboxAudioSync",description:"true if video/audio sync is enabled (experimental).",default:!1}),p=(0,i.HW)({name:"betamaxOfflineTargetBitrate",description:"targetBitrate to use when offlining. The closest to this bitrate to this is used.",default:12e5,lower:1e3,upper:1e9}),m=(0,i.m9)({name:"enableBetamaxSdkSubtitlesDesktopX",description:"Enables subtitles setting and rendering subtitles on the betamax SDK on DesktopX",default:!0}),h=(0,i.m9)({name:"enableBetamaxSdkMuxDesktopXDev",description:"Enables MUX library for development on Desktop X",default:!1}),f=((0,i.m9)({name:"enableVideoOnVideoSaiDev",description:"Enables video-on-video SAI on videos Desktop X. Used during feature development",default:!0}),(0,i.m9)({name:"enableBetamaxSdkVmp",description:"Enables client-side widevine VMP (verified media path) on betamax SDK.",default:!0})),g=(0,i.m9)({name:"enableBetamaxSdkVideoOnVideoSai",description:"Enables video-on-video SAI on videos Desktop X",default:!1}),E=(0,i.HW)({name:"betamaxSdkMinimumBuffer",description:"Sets the minimum buffer goal (in seconds) required before starting or resuming playback video on betamax SDK",default:2,upper:8,lower:0}),_=(0,i.HW)({name:"betamaxSdkRetryAttempts",description:"The number of times to retry on network",default:2,upper:100,lower:1}),y=(0,i.m9)({name:"betamaxSdkDataSaverV2",description:"Enables the data saver feature on betamax SDK (linked to the video show/hide controls and close video window)",default:!0}),v=(0,i.HW)({name:"betamaxSdkDataSaverBufferMargin",description:"Sets the amount of buffer in seconds to be kept when disabling data saver (lower = faster variant change)",default:4,upper:100,lower:0}),b=(0,i.m9)({name:"betamaxVideoAutoplay",description:"Enables an alternative method for video autoplay to address Mux metrics",default:!1}),S=(0,i.m9)({name:"enableBetamaxSdkInitialLowBitrateV2",description:"Optimize startup time by choosing the lowest quality for the first segment",default:!0}),A=(0,i.m9)({name:"enableBetamaxSdkSurfaceBasedResolutionCapV2",description:"Enables surface-based resolution cap for adaptive video on betamax SDK",default:!0}),C=(0,i.HW)({name:"betamaxSdkMaxBitrate",description:"Sets the max bitrate cap for adaptive video on betamax SDK (0=disabled)",default:0,upper:1e8,lower:0}),T=(0,i.m9)({name:"enableBetamaxSdkPlayerPool",description:"Enables player pool for betamax SDK",default:!1}),I=(0,i.HW)({name:"betamaxSdkPlayerPoolSize",description:"Sets the player pool size, should it be enabled",default:20,upper:100,lower:0}),O=(0,i.m9)({name:"enableVideoPip",description:"Enables desktop picture-in-picture surface using betamax SDK.",default:!1}),w=(0,i.m9)({name:"betamaxUsePendingStorage",description:"true if pending storage is used to generate BetamaxPlaybackSession messages, false if using only the normal event sender.",default:!0}),N=(0,i.m9)({name:"betamaxAutoSeekToAdPosition",description:"If true, the player will seek to the ad position when an stop position is registered. Usefull for debugging ads.",default:!1}),R=(0,i.m9)({name:"enableAutoSeekToVideoBufferedStartPosition",description:"Automatically seek to the video buffered start position on load to avoid initial seek if the initial position is not buffered",default:!1}),P=(0,i.m9)({name:"enableVideoDebugOverlay",description:"Show debug overlay on video player with information about the current video",default:!1}),L=(0,i.m9)({name:"enableStreamReportingTracker3",description:"Enables use of the StreamReporting module for video playback",default:!0}),D=(0,i.m9)({name:"enableStreamReportingTrackerStopVideoPlaybackOnError",description:"The StreamReportingTracker module stop video playback when an error in reporting occurs",default:!1}),k=(0,i.BL)({name:"enableBlendInvitation",description:"Enable users to join Blends through client-web",values:r,default:r.DISABLED}),x=(0,i.m9)({name:"enableSubtitlesUsingHarmony",description:"Enable subtitles using Harmony",default:!1}),U=((0,i.m9)({name:"enableUriLinks",description:"Enable the `uri_link` type in Web API /views",default:!1}),(0,i.BL)({name:"enableI18nRoutes",description:"Enable internationalized routes for all locales in EXPERIMENTAL_INTERNATIONALIZED_LOCALES.",values:s,default:s.DEFAULT}),(0,i.m9)({name:"enableCastConnect",description:"Enable Google's new Cast Connect feature for Android TV from Web Player's Cast Sender implementation",default:!1})),M=(0,i.m9)({name:"enableTransferRestrictionsConnect",description:"This flag will enable/disable the new Connect Transfer Restrictions API",default:!1}),B=(0,i.m9)({name:"enableNearbyJams",description:"Enable the support for Nearby Jams feature in the Device Picker",default:!1}),j=((0,i.m9)({name:"enableNewEpisodes",description:"Enable the new episodes view",default:!1}),(0,i.BL)({name:"merchVariantExperiment",description:"Merch shelf re-ordering experiment on Artist Profile Page(A/B/C test)",values:a,default:a.DEFAULT})),F=((0,i.BL)({name:"OnTourVariantExperiment",description:"On Tour shelf re-ordering experiment on Artist Page(A/B/C test)",values:o,default:o.DEFAULT}),(0,i.m9)({name:"enableMerchOnAlbum",description:"Enable merch shelf view on album page",default:!1}),(0,i.m9)({name:"enableNewTicketingSection",description:"Enable New Ticketing section on Concert Event Pages",default:!1}),(0,i.m9)({name:"enableEqualizer",description:"Enable audio equalizer for Desktop and Web Player",default:!1})),V=(0,i.m9)({name:"betamaxFilterNegativeDuration",description:"Remove updates to esperanto for duration that is negative",default:!0}),G=(0,i.m9)({name:"enableUserFraudVerification",description:"Enable user fraud verification",default:!1}),H=((0,i.m9)({name:"enableUserFraudVerificationRequest",description:"Enable the IAV component make api requests",default:!0}),(0,i.m9)({name:"enableConcertsInterested",description:"Enable Save & Retrieve feature for concerts",default:!1}),(0,i.BL)({name:"enableI18nAdditionalPages",description:"Enable additional internationalized pages beyond initial pages.",values:l,default:l.DEFAULT}),(0,i.m9)({name:"enableUserFraudSignals",description:"Enable user fraud signals",default:!1}),(0,i.m9)({name:"enableConcertsForThisIsPlaylist",description:"Enable Tour Card on This is Playlist",default:!1}),(0,i.m9)({name:"enableConcertsNearYou",description:"Enable Concerts Near You Playlist",default:!1})),W=(0,i.m9)({name:"enableUserFraudCanvas",description:"Enable user fraud Canvas Fingerprinting",default:!1}),z=((0,i.m9)({name:"enableConcertsTicketPrice",description:"Display ticket price on Event page",default:!1}),(0,i.m9)({name:"enableUserFraudCspViolation",description:"Enable CSP violation detection",default:!0}),(0,i.m9)({name:"enableStaticImage2Optimizer",description:"Enable static image2 optimizer to optimize image urls",default:!1})),K=(0,i.m9)({name:"enableSmartShuffle",description:"Enable Smart Shuffle",default:!1}),Y=((0,i.m9)({name:"enableInteractionLogger",description:"Enables the old interaction logger",default:!0}),(0,i.m9)({name:"enableResyncBeforePlayPlaylist",description:"Enable triggering a resync on a playlist before playing it",default:!0}));(0,i.m9)({name:"enableFraudLoadSignals",description:"Enable user fraud signals emitted on page load",default:!0});let q=function(e){return e.CONTROL="CONTROL",e.SYSTEM_LANGUAGE="SYSTEM_LANGUAGE",e.ALL_LANGUAGES="ALL_LANGUAGES",e}({});const $=(0,i.BL)({name:"enableLyricsTranslations",description:"Enable Lyrics Translations",values:q,default:q.CONTROL}),Z=(0,i.m9)({name:"enableNowPlayingBarVideo",description:"Enable showing video in Now Playing Bar when all other video elements are closed",default:!1}),Q=(0,i.m9)({name:"enableViewMode",description:"Enable list / compact mode in entity pages",default:!1}),J=(0,i.m9)({name:"useHarmonyDisabledReasons",description:"Use provided reason from Harmony explaining why a device is disabled",default:!1}),X=((0,i.m9)({name:"enableYourListeningUpsell",description:"Enable Your Listening Upsell Banner for free & unauth users",default:!1}),(0,i.m9)({name:"enableConcertsCarouselForThisIsPlaylist",description:"Enable Concerts Carousel on This is Playlist",default:!1})),ee=((0,i.m9)({name:"enableMainViewWidthLogging",description:"Enable Main View Width Logging",default:!1}),(0,i.m9)({name:"enablePlaybackBarAnimation",description:"Enable the animation of the playback bar",default:!1})),te=(0,i.m9)({name:"enableNewShuffleModeOrder",description:"Enable new Shuffle Mode order where Smart Shuffle comes before normal Shuffle",default:!1}),ne=(0,i.m9)({name:"enableCentralisedSmartShuffle",description:"Enable centralised Smart Shuffle",default:!1});let ie=function(e){return e.DEFAULT="cosmos",e.ESPERANTO="esperanto",e}({});const re=(0,i.BL)({name:"enablePodcastSpeedControlEndpoint",description:"Feature flag that selects podcast speed controls endpoints esperanto or cosmos.",values:ie,default:ie.DEFAULT}),se=(0,i.m9)({name:"enableLiveEventsFeedLocationOnboarding",description:"Display live events feed location onboarding",default:!1}),ae=(0,i.m9)({name:"enableArtistConcertsPageLocationOnboarding",description:"Display location onboarding on the artist concerts page",default:!1}),oe=(0,i.m9)({name:"disableUnauthLyricsCTA",description:"Disable unauth lyrics CTA during lyrics holdout",default:!1}),le=(0,i.m9)({name:"useHarmonyCoreExtension",description:"Uses Harmony Core Extension module.",default:!1}),ce=(0,i.m9)({name:"enableHomeImpressions",description:"Enable impressions on home for impression economy (some impressions will still be logged with this disabled)",default:!1}),ue=(0,i.m9)({name:"enableSearchImpressions",description:"Enable impressions on search for impression economy",default:!1}),de=(0,i.m9)({name:"enableJamBroadcasting",description:"Enable Jam broadcasting and scanning",default:!1}),pe=(0,i.m9)({name:"enableConcertGenres",description:"Enable concert genres on the live events feed",default:!1}),me=(0,i.m9)({name:"enableConcertPageGenres",description:"Enable concert genres on individual concert pages",default:!1}),he=(0,i.m9)({name:"enableVenuePageGenres",description:"Enable genres on individual venue pages",default:!1}),fe=(0,i.m9)({name:"enableDynamicColors",description:"Enable dynamic colors for the app",default:!1}),ge=(0,i.m9)({name:"enableAdaptiveTitleEntities",description:"Enable Encore Adaptive Title implementation",default:!1}),Ee=(0,i.m9)({name:"enableContextualTrackBans",description:"Enable ability to ban/hide tracks from eligible contexts",default:!1})},6121:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});const i=e=>{if(!e)return!1;const t=e;return"number"==typeof t.timestamp&&(e=>{if(!e)return!1;const t=e;return"string"!=typeof t.uri||"string"!=typeof t.name||!t.imageUrl||"string"==typeof t.imageUrl})(t.user)&&(e=>{if(!e)return!1;const t=e;return"string"==typeof t.uri&&"string"==typeof t.name&&(!t.imageUrl||"string"==typeof t.imageUrl)&&(e=>{if(!e)return!1;const t=e;return"string"==typeof t.uri&&"string"==typeof t.name})(t.album)&&(e=>{if(!e)return!1;const t=e;return"string"==typeof t.uri&&"string"==typeof t.name})(t.artist)&&(e=>{if(!e)return!1;const t=e;return"string"==typeof t.uri&&"string"==typeof t.name&&"number"==typeof t.index})(t.context)})(t.track)}},16913:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});const i={ALBUM:"ALBUM",AUDIOBOOK:"AUDIOBOOK",EP:"EP",COMPILATION:"COMPILATION",PODCAST:"PODCAST",SINGLE:"SINGLE",UNKNOWN:"UNKNOWN"}},7307:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});let i=function(e){return e.AD="ad",e.ALBUM="album",e.ARTIST="artist",e.ARTIST_CONCERTS="artist-concerts",e.AUDIOBOOK="audiobook",e.CHAPTER="chapter",e.CONCERT="concert",e.CONCERTS="concerts",e.EPISODE="episode",e.PODCAST_SHORT="podcast-short",e.GENRE="genre",e.HOME="",e.VIEW="view",e.PLAYLIST="playlist",e.PLAYLISTV2="playlist-v2",e.SHOW="show",e.TRACK="track",e.UNKNOWN="unknown",e.USER="user",e.LIKED_SONGS="liked-songs",e.LOCAL_FILES="local-files",e.YOUR_EPISODES="your-episodes",e.FOLDER="folder",e.PREMIUM="premium",e.PRE_RELEASE_ALBUM="pre-release-album",e.PRE_RELEASE_BOOK="pre-release-book",e}({})},72051:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,M:()=>r});let i=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),r=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e.Unknown="UNKNOWN",e}({})},59029:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i});let i=function(e){return e[e.UNKNOWN=-1]="UNKNOWN",e[e.MIXED=0]="MIXED",e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e}({})},37999:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});let i=function(e){return e.I18nSEO="i18nSEO",e.I18nAdditionalPages="i18nap",e.YourSoundCapsule="ysc",e.ChartsMVPVariantA="cmvpv-a",e.ChartsMVPVariantB="cmvpv-b",e.ChartsMVPVariantC="cmvpv-c",e.DisableUnauthLyricsCTA="dulc",e.LyricsReturnsHoldout="lrh",e.LyricsReturnsTreatment="lrt",e.LazyLoadingForCWV="llcwv",e.SimilarAlbums="sa",e.UnauthHomeTrending="uht",e.BrotliCDNEnabled="bcdne",e.PopularEpisodesAbove="pea",e.PopularEpisodesBelow="peb",e.ArtistTitleTagSongs="atts",e.ArtistTitleTagSongsAndMusic="attsam",e.ArtistTitleTagSongsAndMore="attsamo",e.SpotifyPlaylistTitleTag1="sptt1",e.SpotifyPlaylistTitleTag2="sptt2",e.SpotifyPlaylistTitleTag3="sptt3",e.UserPlaylistTitleTag1="uptt1",e.UserPlaylistTitleTag2="uptt2",e.UserPlaylistTitleTag3="uptt3",e}({})},13719:(e,t,n)=>{"use strict";function i(e){return null!==e}n.d(t,{P:()=>i})},96566:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});const i=e=>t=>Object.values(e).includes(t)},85907:(e,t,n)=>{"use strict";function i(e,t){throw new Error(t??`Unexpectedly hit unreachable code! Unhandled discriminated union member: ${JSON.stringify(e)}`)}function r(e,t){try{i(e,t)}catch(e){console.error(e)}}n.d(t,{d:()=>i,k:()=>r})},55303:(e,t,n)=>{"use strict";n.d(t,{PW:()=>d,ie:()=>p,lM:()=>m});var i=n(27301);let r=()=>{window.location.reload()},s=e=>{window.location.assign(e)},a=()=>window.location.origin,o=()=>window.location.href;const l={reload(){r()},assign(e){s(e)},get origin(){return a()},get href(){return o()}},c=()=>{if(/iphone|ipod|ipad/i.test(navigator.userAgent)||/android/i.test(navigator.userAgent)){const e=new URL(l.href);return e.pathname=`${i.$K}${e.pathname}`,e.toString()}return l.href},u=(e,t)=>{var n;t&&(e+=`&${n=t,Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e]).replace(/%7C/g,"|")}`)).join("&")}`),l.assign(e)},d=e=>{const t=`https://accounts.spotify.com/login?continue=${encodeURIComponent(c())}`;u(t,e)},p=()=>{const e=`https://www.spotify.com/signup?forward_url=${encodeURIComponent(c())}`;u(e)},m=()=>{window.addEventListener("storage",(e=>{"login_success"===e.key&&(window.focus(),window.localStorage.removeItem("login_success"),l.reload())}))}},23091:(e,t,n)=>{"use strict";n.d(t,{U5:()=>a,dI:()=>r,sH:()=>s,tX:()=>l,xJ:()=>o});var i=n(22795);function r(e){return(new TextDecoder).decode(e)}function s(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);const t=new Uint8Array(e.length);for(let n=0;ne.toString(16).padStart(2,"0"))).join("")}function o(e){if(e.length%2!=0)throw new Error("Invalid encoding!");const t=e.length/2,n=new Array(t);for(let i=0,r=0;i{"use strict";function i(e){return(new TextEncoder).encode(e)}n.d(t,{V:()=>s});const r=async function(e){const t=i(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")};class s{static encode=i;static hash=r}},41434:(e,t,n)=>{"use strict";function i(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;const n=e?Object.keys(e):[],i=t?Object.keys(t):[];return n.length===i.length&&n.every((n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n]))}n.d(t,{a:()=>i})},79225:(e,t,n)=>{"use strict";n.d(t,{V2:()=>h,ad:()=>o,gD:()=>m,rh:()=>l,rk:()=>u,s7:()=>d});var i=n(31417),r=n(85907),s=n(16157),a=n(75049);const o=e=>new Date(e),l=(e,t,n,i)=>{const r=6e4*e.getTimezoneOffset(),s=n??{year:"numeric",month:"long",day:"numeric",weekday:"long"};return new Date(e.valueOf()+r).toLocaleDateString(t,d(s,i))},c=["year","month","weekday","day","hour","minute","second"],u=e=>(e=>["year","month","day"].includes(e))(e)?e:(0,a.ht)(e);function d(e,t){if(void 0===t)return e;const n={...e},i=c.indexOf(u(t));if(-1!==i)for(let e=i+1;e{const t=new Date;return e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()},m=(e,t=i.Ru)=>p(e)?t.get("date.today"):(new Date).getUTCFullYear()===e.getUTCFullYear()?t.formatDate(e,{month:"short",day:"numeric",timeZone:"UTC"}):t.formatDate(e,{month:"short",year:"numeric",timeZone:"UTC"}),h=(e,t,n=i.Ru)=>{if(p(e))return n.get("date.today");if((e=>{const t=new Date,n=t.getUTCDay(),i=new Date(t);i.setUTCDate(t.getUTCDate()-n),i.setUTCHours(0,0,0,0);const r=new Date(t);return r.setUTCDate(t.getUTCDate()+(6-n)),r.setUTCHours(23,59,59,999),e>=i&&e<=r})(e))return n.formatDate(e,{weekday:"long"});const a={timeZone:"UTC"};switch(t){case s.by.Year:a.year="numeric";break;case s.by.Month:a.month="short";break;case s.by.Day:case s.by.Hour:case s.by.Minute:a.month="short",a.day="numeric";break;default:(0,r.d)(t)}return t===s.by.Year||(new Date).getUTCFullYear()===e.getUTCFullYear()?n.formatDate(e,a):n.formatDate(e,{year:"numeric",...a})}},97701:(e,t,n)=>{"use strict";function i(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),i=Math.floor(n/60),r=60*i,s=n-r;return{hours:i,minutes:s,seconds:t-60*r-60*s}}n.d(t,{S:()=>i})},1533:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(31417);const r=e=>{if(!Number.isInteger(e))return"";const t=Date.now()-Number(e),n=Math.round(t/1e3/60),r=Math.round(t/1e3/60/60),s=Math.round(t/1e3/60/60/24),a=Math.round(t/1e3/60/60/24/7);return s>=7?i.Ru.get("time.weeks.short",a):r>=24?i.Ru.get("time.days.short",s):n>=60?i.Ru.get("time.hours.short",r):n>0?i.Ru.get("time.minutes.short",n):i.Ru.get("time.now")}},13155:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(31417),r=n(16913);function s(e){switch(e){case r.s.SINGLE:return i.Ru.get("single");case r.s.EP:return i.Ru.get("ep");case r.s.COMPILATION:return i.Ru.get("compilation");case r.s.ALBUM:default:return i.Ru.get("album")}}},33234:(e,t,n)=>{"use strict";async function i(e,t=document.body){if("clipboard"in navigator)try{if("string"==typeof e)return await navigator.clipboard.writeText(e);if("undefined"!=typeof ClipboardItem&&navigator.clipboard.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":e.then((e=>new Blob([e],{type:"text/plain"})))})]);const t=await e;return await navigator.clipboard.writeText(t)}catch(e){}if(null===t)throw new Error("Node is null, copy cannot be performed.");let n="";n="string"==typeof e?e:await e;const i=document.createElement("textarea");return i.value=n,i.setAttribute("readonly",""),i.style.position="absolute",i.style.left="-9999px",t.appendChild(i),i.select(),document.execCommand("copy"),t.removeChild(i),Promise.resolve()}n.d(t,{l:()=>i})},59961:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=()=>"undefined"==typeof window},43640:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});class i{constructor(e,t){this.x=e,this.y=t}static fromRadiusAndAngle(e,t){return new i(e*Math.cos(t),e*Math.sin(t))}static sum(e,t){return new i(e.x+t.x,e.y+t.y)}static mul(e,t){return new i(e*t.x,e*t.y)}controlPoint(e,t){return i.sum(this,i.fromRadiusAndAngle(e,t))}}},98704:(e,t,n)=>{"use strict";function i(e,t=1,n=0){if(n>t)return 1;let i=(e-n)/(t-n);return Number.isNaN(i)&&(i=1),Math.min(Math.max(i,0),1)}n.d(t,{i:()=>i})},24281:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});const i=[/bot/i,/crawler/i,/spider/i,/slurp/i,/facebookexternalhit/i,/google-structured-data-testing-tool/i,/whatsapp/i,/telegrambot/i,/chrome-lighthouse/i,/google page speed insights/i,/google-pagerenderer/i,/snapchat/i],r=e=>i.some((t=>t.test(e)))},56490:(e,t,n)=>{"use strict";n.d(t,{F$:()=>a,KY:()=>s,lM:()=>l,sH:()=>o});var i=n(67947);const r=({treatment:e,entityId:t,experimentId:n,treatmentVariation:i})=>{if(e&&e[t]){const r=e[t].find((e=>e.experimentId===n));return r?.treatment===i}return!1},s=(e,t)=>r({treatment:e,entityId:t,experimentId:i.R7.TRACK_SIMILAR_ALBUMS,treatmentVariation:i.d5.VARIANT}),a=(e,t,n)=>r({treatment:e,entityId:t,experimentId:i.R7.ARTIST_TITLE_TAG_TEST,treatmentVariation:n}),o=(e,t,n)=>r({treatment:e,entityId:t,experimentId:i.R7.SPOTIFY_PLAYLIST_TITLE_TAG_TEST,treatmentVariation:n}),l=(e,t,n)=>r({treatment:e,entityId:t,experimentId:i.R7.USER_PLAYLIST_TITLE_TAG_TEST,treatmentVariation:n})},67947:(e,t,n)=>{"use strict";n.d(t,{R7:()=>i,T:()=>s,d5:()=>r,mm:()=>a});let i=function(e){return e.TEST="test",e.TRACK_SIMILAR_ALBUMS="track_similar_album",e.ARTIST_TITLE_TAG_TEST="artist_title_tag",e.SPOTIFY_PLAYLIST_TITLE_TAG_TEST="playlist_title_tag_spotify",e.USER_PLAYLIST_TITLE_TAG_TEST="playlist_title_tag_user",e}({}),r=function(e){return e.CONTROL="0",e.VARIANT="1",e}({}),s=function(e){return e.CONTROL="0",e.VARIANT_1="1",e.VARIANT_2="2",e.VARIANT_3="3",e}({}),a=function(e){return e.CONTROL="0",e.SONGS="1",e.SONGS_AND_MUSIC="2",e.SONGS_AND_MORE="3",e}({})},14636:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});const i=e=>(t,n=!1)=>{let i;return(...r)=>{n?n=!1:(clearTimeout(i),i=setTimeout((()=>{e.apply(e,r)}),t))}}},63096:(e,t,n)=>{"use strict";n.d(t,{R:()=>r,g:()=>i});const i=(e,{desiredSize:t=Number.MAX_SAFE_INTEGER,desiredHeight:n=t,desiredWidth:i=t,desiredLabel:r=""}={})=>{if(!e||e.length<=0)return;if(1===e.length)return e[0];if(r){const[t]=e.filter((e=>e.label===r));if(t)return t}const[s]=e.map((e=>{const t=[(e.width||0)*(e.height||0),n*i];return{ratio:Math.max(...t)/Math.min(...t),image:e}})).sort(((e,t)=>e.ratio-t.ratio));return s.image},r=e=>({url:e.url,width:e.maxWidth,height:e.maxHeight})},3292:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});const i=e=>({xsmall:12,small:16,medium:24,large:32,xlarge:48,xxlarge:64,xxxlarge:64,xxxxlarge:88}[e])},71156:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});const i={setup(e=document){e.documentElement.classList.add("no-focus-outline"),e.addEventListener("keydown",(t=>{"Tab"===t.key&&e.documentElement.classList.remove("no-focus-outline")}),!0),e.addEventListener("mousedown",(()=>{e.documentElement.classList.add("no-focus-outline")}),!0)}}},66387:(e,t,n)=>{"use strict";n.d(t,{CW:()=>l,hF:()=>o,ll:()=>a});var i=n(31417),r=n(33558),s=n(7307);const a=(e,t=!0)=>{const n=t?"/":"";if(!e)return"";const i=e.split("/");return i[1].includes(r.CT)?`${n}${i.slice(2).join("/")}`:e},o=(e,t)=>{const n=t||i.Ru.getLocaleForURLPath();if(!e)return"";const s=e.split("/")[1];if(!n||n===r.Xn||s.includes(r.CT))return e;const a="/"===e?"":e;return`/${r.CT}${n}${a}`},l=e=>{if(!e)return s.c.HOME;const t=e.split("/");return t[1].includes(r.CT)?t[2]||s.c.HOME:t[1]||s.c.HOME}},77008:(e,t,n)=>{"use strict";n.d(t,{p:()=>u,vf:()=>d});var i=n(33558),r=n(7307);const s=[r.c.CONCERT,r.c.CONCERTS],a=(e,t)=>void 0!==t&&e.some((e=>e===t)),o=(e,t,n)=>{const r=n&&s.some((e=>e===n)),o=r?i.r0:i.IU,l=r?i.Xq:i._h,c=a(o,e)&&t,u=a(l,e);return c||u},l=(e,t)=>{if(void 0===e)return!1;const n=""===e;return t.some((t=>t===e))||n},c=(e,t)=>{if(void 0===e)return!1;const n=l(e,i.IH)&&t,r=l(e,i.eA);return n||r},u=({localeFeatureFlag:e,entityFeatureFlag:t,urlLocale:n,entity:i,type:r})=>{switch(r){case"locale":return o(n,e,i);case"route":return c(i,t);case"link":return o(n,e,i)&&c(i,t);default:return!1}},d=e=>["/",...i.NW.map((e=>`/${i.CT}${e}`))].includes(e)},55868:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});const i=({imageUriOrUrl:e="",desiredMosaicSize:t=300}={})=>{if(!e)return"";if(e.startsWith("spotify:")){const[,n,...i]=e.split(":");if("image"===n)return`https://i.scdn.co/image/${i[0]}`;if("mosaic"===n)return`https://mosaic.scdn.co/${t}/${i.join("")}`}return e}},7971:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"Fyc_tPyPKyRIT_59VZ2B"}},43560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={card:"LunqxlFIupJw_Dkx6mNx",cardLink:"tsv7E_RBBw6v0XTQlcRo",type:"iwsv8i7rNxA2c_VvC4CO",dividerAfter:"cCBLuxOGqZvSAQWNkDXw",cardTitle:"xHz124sSHSCYHecLCTfi",cardTitleWrapper:"Gi6Lr1whYBA2jutvHvjQ",spotifyOwnedHeaderText:"NUoUlYHQoMKe6r7dL2Hg",newEpisodeIndicator:"r9Oj1LabijReMkOyeUxw",imageContainer:"xBV4XgMq0gC5lQICFWY_",imageContainerOld:"NH6UaoYYe47eIHA2Rmal",imageContainerSkeleton:"AYwATC_zEPwCkmO1yc8R",cardMetadata:"E1N1ByPFWo4AJLHovIBQ",DownloadStatusIndicator:"w9Tpa4Y111UM5u1WMkEl",PlayButtonContainer:"woJQ5t2YiaJhjTv_KE7p",PlayButtonContainerVisible:"zuKTW9yEI9rToECOcWG3",cardContainer:"aAYpzGljXQv1_zfopxaH",scrollAnimation:"gXnwcpIMiR3cC2KCGf6R"}},98305:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={imageWrapper:"GOcsybnoHYyJGQGDRuwj",image:"yMQTWVwLJ5bV8VGiaqU3",headerImage:"w1vw8BvQZy1p9nKwpfVf",imagePlaceholder:"IUWOW7ZOUwEs57jTIQRP",circular:"MxmW8QkHqHWtuhO589PV",hero:"CByZAgiDBSO7504EXktW"}},31854:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={menu:"NbcaczStd8vD2rHWwaKv",menuHeading:"ig17e2GN63Tgv3JeRoJF",menuItemButton:"mWj8N7D_OlsbDgtQx5GW",disabled:"egE6UQjF_UUoCzvMxREj",menuItemStatic:"BmRbu742cR31_QlTDob1",subMenuIcon:"klmTmoDHY2lTsLzlA2qX",subMenuLeading:"lQEXaOyKiOHRJAkTf1EF",menuItem:"rQ6LXqVlEOGZdGIG0LgP",dividerBefore:"vvMORUKtQKpQcpQ992bR",dividerAfter:"Vz3pFUXmll6fKB5Fc4nd",menuItemLabel:"htqz7Vb8mLJvGKTi1vrs",loadingContainer:"eof5OA2Ldhob6LU1jNoF"}},34839:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={addToPlaylistTitle:"OVv1uDz67TLurN8o6LtQ",addToPlaylistSubtitle:"Cm3jbLBimhqdYEcNTVPj"}},5723:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={filterPlaylistSearch:"eG930DCaQXDFqjhxRGIs"}},52028:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={menu:"k4sYYpEpX2f7RMAPHv3F",menuHeading:"qUeWph4VP9DwR4xOfabh",menuItemButton:"SN9k988q2Seb_joCaEny",disabled:"jJzb9peSGYsUDKbc5QBy",menuItemStatic:"llTZj1tjDr5ZnIOkKdHv",subMenuIcon:"IJYRnAk_0OE4UPQABQcl",subMenuLeading:"abJqsjKClbniwiTCZ7bC",menuItem:"GqvHlGax1jo6vO9D0wHH",dividerBefore:"hYwu7ZpcbQIP6iM5fzAu",dividerAfter:"pXsnH0sMlWUGBffe24cr",menuItemLabel:"ctAknuakI8idqf_S9tvT",loadingContainer:"uEPiT_llP0oFNDYu_QZR",filterInputContainer:"dJzYRtCWK2U6k08EtqAg",expanded:"IErtLy9qyhR17riTrzYh",expandButton:"pc7Mq0FHh8Nlho4sOJH7",filterInput:"ycGdaksV3Z5Y7eav3ZyQ",filterInputFullWidth:"zfZEbT8RJbcAg13pTMDl",overlay:"T2BaFHODss7KUUqG8Ryq",expandRight:"qCnh1KNFmroitPazoXOc",searchIconContainer:"dgc81JRAlkNQTsZae3Bz",searchIcon:"_PqnQJddudWUtaIxOzo7",clearButton:"EyDGMdJOp8ktTzmRFcQM",filterPlaylistSearchContainer:"i8EjndRQjYlli0aLGYEm",trigger:"ExGt4YQfmcwvVFGM7tpN"}},55760:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",MINIMUM_HEADER_HEIGHT:"250px",MAXIMUM_HEADER_HEIGHT:"400px",IMAGE_SIZE:"192px",IMAGE_SIZE_BIG:"232px",BACKGROUND_HEIGHT_PERCENTAGE:"40vh",container:"NXiYChVp4Oydfxd7rT5r",withoutBackgroundImage:"JYKKZFIXuf9lIHVeszuS",largeHeader:"k9LEjzjnGgVaEm3BvhAb",xlargeHeader:"bvoBefUu_0EKwyW6ZOsg",withBackgroundImage:"XPjEhsPyuOvMZ9NsDrxT",smallHeader:"U1ypKorrS1qiWD1uQpAD",contentWrapper:"iWTIFTzhRZT0rCD0_gOK",headerText:"RP2rRchy4i8TIp1CTmb7",topbarTitle:"G7zO58ORUHxcUw0sXktM",topbarContent:"HcA9WjbLc4x02X8Ty0uO",topbarContentFadeIn:"lro6AjUrZFH6zxjmOGg0",title:"rEN7ncpaUeSGL9z0NGQR",titleInner:"o4KVKZmeHsoRZ2Ltl078",titleButton:"wCkmVGEQh3je1hrbsFBY",pretitle:"lp9Tfm4rsM9_pfbIE0zd",adaptiveHeaderContainer:"eFZahdafW8vQ7xY1kfBg",imageContainer:"_gLjHpwOxHFwo5nLM8hb",imageContainerNew:"_osiFNXU9Cy1X0CYaU9Z",imageContainerClickable:"GoU8CT9Vm_TP_LyYJTsf",image:"CmkY1Ag0tJDfnFXbGgju",shadow:"_EShSNaBK1wUIaZQFJJQ",imagePlaceholder:"MclJZ2TMkhjdlqqQfmQd",roundedCorners:"YbDIZ84mS7tzHr1tgWE9",circle:"ta4ePOlmGXjBYPTd90lh",detailsText:"Ydwa1P5GkCggtLlSvphs",uppercase:"E0MlERsQ_zvY3BX7ZzPp",creatorWrapper:"NO_VO3MRVl9z3z56d8Lg",piled:"YW4dYEf5ZuLzMfSjsqZk",creatorButton:"kuSGKO1BuKZ3fgas7_T7",metaDataText:"RANLXG3qKB61Bh33I0r2",divider:"n4hTP7ZeAOT_UQEkRUR7",smallMadeForIcon:"zjsGbrMpvbdA1HJ4rpfi",subtitle:"gSx70PISJg6PSRafbOXd",subtitleButton:"YxJ3zwH0R8K8njVQgMcw"}},28956:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"EhyK_jJzB2PcWXd5lg24",header:"e4ETsc5zxjzyF9nyb4LI",closeBtn:"IuU_JLhFTfKPXfDkmAaF",sectionsContainer:"cyXplMovoowBozEe4r2x",sections:"KDlcc1SFTcA90eMUcn5P",sectionHeading:"ARw2f2PkF29n9Ek_eWu3",sectionItem:"umavpIt6VOGqirdlUYWs",sectionItemName:"dYBZmh_ZIyvBZfaoducd",key:"hykQHtPI6EeFREwqRrOR"}},26340:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={PEEK_WIDTH:"40px",peek:"iXXcc7CtzmTm5yA3ZXbl",peekContent:"I6NEvCpflvkfINWthnVk",overlay:"CaB1dNDTJt7ce3QgH1Eq",counterWeight:"KL8t9WB65UfUEPuTFAhO",expanded:"pZizE2KqFA3w1AVF3kDT",collapsed:"hYAxYCXtABXg35wNC2TR",deferredCollapsed:"bMaQdOqIiAZtt4cKEhWf",overlayButton:"K6ufHKKr7ALiUKPsBVlV"}},69262:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={shelf:"QyANtc_r7ff_tqrf5Bvc",header:"q8AZzDc_1BumBHZg0tZb",fullPage:"yGNmd_gHDqy6we9VwoNj",subHeader:"hWGxHSAKACFWXowXPDTP",topRow:"OMuRYOdpUbGif12_lRJl",sideSpacer:"j8owGOBRuFHRQf2whbdI",scrollAnimation:"cjUMnKYsZHCnWBfn9xcf",titleWrapper:"onVWL7MW4PW9FyVajBAc",title:"MfVrtIzQJ7iZXfRWg6eM",seeAll:"HOgue4Eg4UdBR58M0633",shelfGrid:"Z4InHgCs2uhk0MU93y_a",singleRow:"deJGxfMNXUc8uApEGgoQ",withEncoreCards:"MKCgGhu_c8l6hsVuee46",skeletonShelf:"WkSW1U6jr3HDz3vApM56"}},2588:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",container:"facDIsOQo9q7kiWc4jSg",withBackgroundBlur:"coBkWVskipFo8KxLKief",background:"T1xI1RTSFU7Wu94UuvE6",contentContainer:"hV9v6y_uYwdAsoiOHpzk",indicators:"GTAFfOA_w5vh_bDaGJAG",overlay:"EvIR4O7jOSbNmxtMdIQ0",loggedOut:"qxbaGYC8rgMLfyOuYRCM",globalNavBarHistoryButtonsContainer:"VizXsWMIuNfKGN5pMyox",globalNavBarHistoryButton:"rBX1EWVZ2EaPwP4y1Gkd",historyButtons:"VgSbatGBB9XwTH2_dsxg",icon:"IYDlXmBmmUKHveMzIPCF",button:"ql0zZd7giPXSnPg75NR0",forward:"pfMoD1MbelMuF1m8QeMc",responsiveForward:"CWFTCu03cdDALodezHmA",topbarContentWrapper:"rovbQsmAS_mwvpKHaVhQ",topbarContent:"qHWqOt_TYlFxiF0Dm2fD",topNavBarLinks:"sNde2kloCY28V4GB9AvP",topNavBarSeparator:"k0vXhOdr0XE83lAQaJ1O",topbarContentRight:"rwdnt1SmeRC_lhLVfIzg",topBarRightButtonContainer:"NPvLJSRWfv1Joo8dF0D8",expand:"QTj1mCVVUuiwy6mQ0shv",globalNavBar:"LedDBMWCxYhMD20KtPJo",shrink:"MEbEPFcmpW1uJC9VI7He",loginButtons:"LKFFk88SIRC9QKKUWR5u",signupButton:"sibxBMlr_oxWTfBrEz2G",UpgradeButton:"Upqw01TOXETOmR5Td7Dj",contentArea:"MIX_wd0K1tVHme_pwV2F"}},13268:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={TRACKLIST_HEADER_HEIGHT:"36px",MINMIMUM_COLUMN_WIDTH:"120px"}},92942:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"iZrIHsls0lCEhoMDA9kc",pretitle:"F1aSUwAFI4YvWoalYJrv",ellipsis:"hKghsAg9t6lgWNvCb_1l",title:"PcH6VnzkkDqD36P93i9Q",text:"K9Nj3oI7bTNFh5AGp5GA",subtitle:"w_TTPh4y9H1YD6UrTMHa",subtitleWithGap:"r6Psl2_K_0vpdX6vFLQd",qualityLabel:"Eu2KnQixAss5VI1CR4Fb",badges:"p2ya1fQ3o9pY4alcW0o4",xsmallBadges:"MrkH0O1OzmNv_oCQdvI8"}},18665:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"dcSY8Zom_VXgK71Lbym_",button:"nnFPIbw3IAGJZGqI4NqD",switch:"wyd6QhFOJ2Z05gOCbsiE",loading:"lKGbdh7pkRv2AcabYSy6",loadingVisible:"a5FAjheOpWkqsE2by0mD",hidden:"RxYeristNjK4Ih8_s058",spinner:"Rkf_Pdsq1f6cGK9QHcWK",label:"O709C5asJqCetOmfheHV",npbSwitchButtonContainer:"ZCq05NqW5PjXZXaY4XEK",npbSwitchButton:"scigS24UKRq5t0GaI2aT"}},48261:()=>{},12989:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={container:"Ps9zgW56WZaBVLo1n3cg",icon:"sQXKZHWJrJ9_bbCs8NSv",text:"SgFtsvn3upY_tG6mnt4n",nonShrinkableBadge:"l67ZKWaTyRadDGEcLWcE"}},39332:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i={screenLg:"1200px",homeRegularDensityMinWidth:"210px",homeRegularDensityMinWidthSmallScreens:"160px",homeFeedBaselineMinWidth:"380px",homeFeedBaselineMaxWidth:"480px",gridContainer:"iKwGKEfAfW7Rkx2_Ba4E",withFiniteRowCount:"fJTotRs7ANTq1nrBwlqA",uniformRowHeight:"PmW2UCL9vlTcNPD7J0KJ"}},28333:()=>{},15644:()=>{},32941:e=>{e.exports={convertPathToURL:function(e,t,n){if("1"==={}.IS_SPOTIFY_DESKTOP_APP)return`/${e}`;if("hot"==={}.WEBPACK_BUILD&&e.startsWith("build/")){return`https://${{}.WEBPACK_HOT_HOST}:${{}.WEBPACK_HOT_PORT}/cdn/${e}`}return n?.enableBrotliCDNExperiment?`${t.brotli_cdn_url}/${e}`:`${t.cdn_url}/${e}`}}},94758:e=>{e.exports={af:"af-ZA",am:"am-ET",ar:"ar",az:"az-AZ",bg:"bg-BG",bn:"bn-IN",bho:"bp",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES","es-419":"es-LA",et:"et-EE",fa:"fa-IR",fr:"fr-FR",fi:"fi-FI",fil:"fp-PH","fr-CA":"fr-CA",gu:"gu-IN",hu:"hu-HU",he:"he-IL",hi:"hi-IN",hr:"hr-HR",id:"id-ID",is:"is-IS",it:"it-IT",ja:"ja-JP",kn:"kn-IN",ko:"ko-KR",lt:"lt-LT",lv:"lv-LV",ml:"ml-IN",mr:"mr-IN",ms:"ms-MY",nb:"nb-NO",ne:"ne-NP",nl:"nl-NL",or:"or-IN","pa-IN":"pa-IN","pa-PK":"pa-PK",pl:"pl-PL","pt-PT":"pt-PT","pt-BR":"pt-BR",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",sr:"sr-RS",sv:"sv-SE",sw:"sw",ta:"ta-IN",te:"te-IN",th:"th-TH",tr:"tr-TR",uk:"uk-UA",ur:"ur",vi:"vi-VN","zh-CN":"zh-CN","zh-TW":"zh-TW",zu:"zu-ZA","ar-EG":"ar-EG","ar-MA":"ar-MA","ar-SA":"ar-SA",eu:"eu-ES",bs:"bs-BA",ca:"ca-ES","zh-HK":"zh-HK","en-GB":"en-GB",gl:"gl-ES",mk:"mk-MK","es-AR":"es-AR","es-MX":"es-MX"}}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=a,l.amdO={},e=[],l.O=(t,n,i,r)=>{if(!n){var s=1/0;for(u=0;u=r)&&Object.keys(l.O).every((e=>l.O[e](n[o])))?n.splice(o--,1):(a=!1,r0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[n,i,r]},l.F={},l.E=e=>{Object.keys(l.F).map((t=>{l.F[t](e)}))},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var r=Object.create(null);l.r(r);var s={};t=t||[null,n({}),n([]),n(n)];for(var a=2&i&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,l.d(r,s),r},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>(({42:"xpui-routes-blend",319:"dwp-panel-section",347:"home-subfeed",352:"dwp-page-error-template",399:"xpui-routes-episode-more-like-this",599:"home-ad-card",777:"dwp-watch-feed-view-container",983:"xpui-debug-window-contents",987:"dwp-participant-list-page",1206:"xpui-root-dialogs",1396:"xpui-routes-premium-page",1408:"xpui-routes-artist",1460:"xpui-routes-play-history-page",1621:"home-v2-section",1785:"xpui-desktop-routes-settings",1845:"xpui-routes-all-show-ads",1955:"dwp-full-screen-mode-container",2183:"dwp-lyrics-cinema-mode-container",2205:"xpui-playlist-format-redirect-with-params",2233:"dwp-home-chips-row",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2630:"dwp-offline-empty-state",2889:"xpui-routes-recent-searches",3322:"dwp-now-playing-bar",3417:"xpui-feature-activation",3569:"xpui-routes-offline-browse",3632:"this-is-playlist-concerts-carousel",3667:"xpui-pip-mini-player",3838:"xpui-routes-cultural-moment-hub",3890:"xpui-routes-track",3934:"dev-playground",4084:"dwp-whats-new-feed",4312:"home-hpto",4389:"xpui-routes-collection-local-files",4496:"xpui-routes-create-playlist",4574:"your-sound-capsule-modal",4789:"concerts-on-tour-playlist-card",5040:"xpui-routes-see-all-playlist-leavebehinds",5094:"dwp-top-bar",5523:"xpui-routes-stage-page",5663:"xpui-routes-recently-played",5783:"xpui-routes-collection-concerts",5885:"home-ads-container",5962:"xpui-routes-album",6080:"xpui-routes-collection-episodes",6266:"browse-v2",6457:"xpui-routes-your-library-x",6505:"xpui-routes-lyrics",6548:"xpui-routes-buddy-feed-legacy",6665:"home-ads-visibility-logger",6863:"xpui-routes-track-v2",7067:"lottie-animation",7125:"xpui-routes-search",7170:"home-ads-fetcher",7241:"xpui-routes-venues",7564:"xpui-routes-buddy-feed",7599:"legacy-hpto-compatibility",7790:"xpui-routes-queue-page",7988:"dwp-video-player",8212:"xpui-routes-health-check",8493:"xpui-desktop-modals",8552:"dwp-feedback-bar",8588:"dwp-billboard-ad",8606:"xpui-routes-show",8828:"xpui-routes-collection-songs",8865:"xpui-routes-album-prerelease",9033:"xpui-routes-show-more-like-this",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile",9500:"dwp-leaderboard-component",9528:"xpui-routes-episode",9718:"playlist-leavebehinds"}[e]||e)+".js"),l.miniCssF=e=>(({42:"xpui-routes-blend",319:"dwp-panel-section",352:"dwp-page-error-template",399:"xpui-routes-episode-more-like-this",599:"home-ad-card",777:"dwp-watch-feed-view-container",983:"xpui-debug-window-contents",987:"dwp-participant-list-page",1206:"xpui-root-dialogs",1396:"xpui-routes-premium-page",1460:"xpui-routes-play-history-page",1845:"xpui-routes-all-show-ads",1955:"dwp-full-screen-mode-container",2183:"dwp-lyrics-cinema-mode-container",2233:"dwp-home-chips-row",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2630:"dwp-offline-empty-state",2889:"xpui-routes-recent-searches",3322:"dwp-now-playing-bar",3417:"xpui-feature-activation",3569:"xpui-routes-offline-browse",3667:"xpui-pip-mini-player",3838:"xpui-routes-cultural-moment-hub",4084:"dwp-whats-new-feed",4312:"home-hpto",4389:"xpui-routes-collection-local-files",4574:"your-sound-capsule-modal",4789:"concerts-on-tour-playlist-card",5040:"xpui-routes-see-all-playlist-leavebehinds",5523:"xpui-routes-stage-page",5663:"xpui-routes-recently-played",5783:"xpui-routes-collection-concerts",5962:"xpui-routes-album",6080:"xpui-routes-collection-episodes",6266:"browse-v2",6457:"xpui-routes-your-library-x",6488:"dwp-premium-page",6505:"xpui-routes-lyrics",6548:"xpui-routes-buddy-feed-legacy",6863:"xpui-routes-track-v2",7125:"xpui-routes-search",7241:"xpui-routes-venues",7564:"xpui-routes-buddy-feed",7599:"legacy-hpto-compatibility",7790:"xpui-routes-queue-page",7988:"dwp-video-player",8493:"xpui-desktop-modals",8552:"dwp-feedback-bar",8588:"dwp-billboard-ad",8606:"xpui-routes-show",8828:"xpui-routes-collection-songs",8865:"xpui-routes-album-prerelease",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile",9500:"dwp-leaderboard-component",9528:"xpui-routes-episode",9718:"playlist-leavebehinds"}[e]||e)+".css"),l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="client-web:",l.l=(e,t,n,s)=>{if(i[e])i[e].push(t);else{var a,o;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(m);var r=i[e];if(delete i[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),o&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.p="/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((t,n)=>{var i=l.miniCssF(e),r=l.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",l.nc&&(s.nonce=l.nc),s.onerror=s.onload=n=>{if(s.onerror=s.onload=null,"load"===n.type)i();else{var a=n&&n.type,o=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+o+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=o,s.parentNode&&s.parentNode.removeChild(s),r(l)}},s.href=t,n?n.parentNode.insertBefore(s,n.nextSibling):document.head.appendChild(s)})(e,r,null,t,n)})),t={9441:0};l.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{42:1,287:1,310:1,319:1,352:1,399:1,482:1,599:1,777:1,871:1,983:1,987:1,1206:1,1396:1,1460:1,1576:1,1845:1,1955:1,2183:1,2233:1,2355:1,2391:1,2630:1,2722:1,2889:1,3282:1,3322:1,3417:1,3569:1,3667:1,3838:1,4084:1,4312:1,4328:1,4389:1,4574:1,4789:1,4884:1,5040:1,5523:1,5663:1,5727:1,5783:1,5962:1,6080:1,6266:1,6457:1,6488:1,6505:1,6548:1,6863:1,7125:1,7241:1,7564:1,7599:1,7790:1,7988:1,8493:1,8552:1,8588:1,8606:1,8828:1,8865:1,9209:1,9319:1,9480:1,9500:1,9528:1,9705:1,9718:1,9927:1}[n]&&i.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))},l.F.miniCss=e=>{if(!(l.o(t,e)&&void 0!==t[e]||/^(1(6(21|77|83)|[04]08|109|113|435|504|706|785)|2(032|119|205|327|537|826|979)|3(63[28]|211|47|71|848|890|934)|4(003|295|496|900)|5(094|125|281|885)|6(234|486|665|704|872)|7((06|28|60)7|02|11|170|498|900)|8((08|21|88)2|161|497)|9(033|4|403|901|928))$/.test(e))){t[e]=null;var n=document.createElement("link");l.nc&&n.setAttribute("nonce",l.nc),n.rel="prefetch",n.as="style",n.href=l.p+l.miniCssF(e),document.head.appendChild(n)}}}})(),(()=>{var e={9441:0};l.f.j=(t,n)=>{var i=l.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else if(/^(310|6488|9927)$/.test(t))e[t]=0;else{var r=new Promise(((n,r)=>i=e[t]=[n,r]));n.push(i[2]=r);var s=l.p+l.u(t),a=new Error;l.l(s,(n=>{if(l.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,i[1](a)}}),"chunk-"+t,t)}},l.F.j=t=>{if(!(l.o(e,t)&&void 0!==e[t]||/^(310|6488|9927)$/.test(t))){e[t]=null;var n=document.createElement("link");l.nc&&n.setAttribute("nonce",l.nc),n.rel="prefetch",n.as="script",n.href=l.p+l.u(t),document.head.appendChild(n)}},l.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,[s,a,o]=n,c=0;if(s.some((t=>0!==e[t]))){for(i in a)l.o(a,i)&&(l.m[i]=a[i]);if(o)var u=o(l)}for(t&&t(n);cPromise.all(t).then((()=>{var t=s[e];Array.isArray(t)&&t.map(l.E)})),l.O(0,[9441],(()=>{[4151,4295,8497,8882,711,310,1683,2826,1008,1435,6486,7287,2537,1677,6872,7125,4003,4312,5885,3569].map(l.E)}),5);var c=l.O(void 0,[4151],(()=>l(35585)));c=l.O(c)})(); //# sourceMappingURL=xpui.js.map